{"version":3,"file":"BookButton-DLU3027q.js","sources":["../../../node_modules/lodash/_assignValue.js","../../../app/javascript/features/BookButton/constants/StatusColors.ts","../../../node_modules/lodash/_baseSet.js","../../../node_modules/lodash/_basePickBy.js","../../../node_modules/lodash/_basePick.js","../../../node_modules/lodash/_flatRest.js","../../../node_modules/lodash/pick.js","../../../app/javascript/services/UserBookService/constants.ts","../../../app/javascript/services/UserBookService/actions/update.ts","../../../app/javascript/services/UserBookService/actions/insert.ts","../../../app/javascript/services/UserBookService/actions/delete.ts","../../../app/javascript/services/UserBookService/UserBookServiceClient.ts","../../../app/javascript/features/BookButton/components/BookButton/StatusButton/StatusButton.tsx","../../../app/javascript/features/BookButton/components/BookButton/BookButton.tsx"],"sourcesContent":["var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","export const sharedButtonClasses =\n \"inline-flex items-center focus:outline-none focus:ring-2 focus:ring-offset-2 border rounded-lg active:translate-y-1 transition-all w-fit\";\n\nconst NoStatus = {\n buttonClasses:\n \"dark:border-gray-700 dark:bg-gray-700 bg-white border-gray-100 dark:text-gray-400 text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 focus:ring-gray-200\",\n accentColor: \"text-gray-700 dark:text-gray-300\",\n fillColor: \"fill-gray-700 dark:fill-gray-300\",\n};\n\nconst WantToReadColor = {\n buttonClasses:\n \"border-yellow-400 bg-yellow-400 text-gray-800 hover:bg-yellow-300 focus:ring-yellow-600\",\n accentColor: \"text-yellow-900\",\n fillColor: \"fill-yellow-900\",\n};\n\nconst CurrentlyReadingColor = {\n buttonClasses:\n \"border-green-500 bg-green-500 text-green-900 hover:bg-green-600 focus:ring-green-700\",\n accentColor: \"text-green-900\",\n fillColor: \"fill-green-900\",\n};\n\nconst ReadColor = {\n buttonClasses:\n \"border-green-400 bg-green-400 text-green-900 hover:bg-green-500 focus:ring-green-600\",\n accentColor: \"text-green-900\",\n fillColor: \"fill-green-900\",\n};\n\nconst StoppedColor = {\n buttonClasses:\n \"dark:border-gray-700 border-gray-300 bg-gray-300 dark:bg-gray-700 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-900 focus:ring-gray-600\",\n accentColor: \"dark:text-gray-400 text-gray-500\",\n fillColor: \"dark:fill-gray-400 fill-gray-500\",\n};\n\nconst StatusColors = [\n NoStatus,\n WantToReadColor,\n CurrentlyReadingColor,\n ReadColor,\n StoppedColor,\n StoppedColor,\n StoppedColor,\n];\n\nexport default StatusColors;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","import snakeCase from \"lodash/snakeCase\";\n\nexport const editFields = [\n \"edition_id\",\n \"review_has_spoilers\",\n \"first_started_reading_date\",\n \"last_read_date\",\n \"read_count\",\n \"status_id\",\n \"rating\",\n \"private_notes\",\n \"recommended_by\",\n \"recommended_for\",\n \"review\",\n \"privacy_setting_id\",\n \"review_slate\",\n \"referrer_user_id\",\n \"reviewed_at\",\n \"url\",\n \"media_url\",\n \"date_added\",\n \"sponsored_review\",\n];\n\nexport const transform = (ob) => {\n return Object.fromEntries(\n Object.entries(ob).map(([k, v]) => [snakeCase(k), v])\n );\n};\n","import { gql } from \"graphql-tag\";\nimport { ApolloClient } from \"@apollo/client/core\";\nimport pick from \"lodash/pick\";\nimport { editFields } from \"../constants\";\nimport { transformCamelToSnake } from \"lib/stringFunctions\";\nimport { UserBookSerializersUserBook } from \"types/serializers\";\n\nconst updateUserBookQuery = gql`\n mutation UpdateUserBook($id: Int!, $object: UserBookUpdateInput!) {\n updateResponse: update_user_book(id: $id, object: $object) {\n error\n userBook: user_book {\n ...UserBookFragment\n }\n }\n }\n`;\n\nexport async function updateUserBook({\n client,\n id,\n userBook,\n}: {\n client: ApolloClient;\n id: number;\n userBook: UserBookSerializersUserBook;\n}): Promise {\n return new Promise((resolve, reject) => {\n client\n .mutate({\n mutation: updateUserBookQuery,\n variables: {\n id,\n object: pick(transformCamelToSnake(userBook), editFields),\n },\n })\n .then((result) => {\n if (result.data.updateResponse.error) {\n reject(result.data.updateResponse.error);\n } else {\n resolve(result.data.updateResponse.userBook);\n }\n })\n .catch((e) => {\n reject(e.message);\n });\n });\n}\n","import { gql } from \"graphql-tag\";\nimport { ApolloClient } from \"@apollo/client/core\";\nimport pick from \"lodash/pick\";\nimport { editFields } from \"../constants\";\nimport { transformCamelToSnake } from \"lib/stringFunctions\";\nimport { UserBookSerializersUserBook } from \"types/serializers\";\nimport { NewUserBookType } from \"types/UserBookType\";\n\nconst insertUserBookQuery = `\n mutation CreateUserBook($object: UserBookCreateInput!) {\n insertResponse: insert_user_book(object: $object) {\n error\n userBook: user_book {\n ...UserBookFragment\n }\n }\n }\n`;\nconst insertUserBookQueryCompiled = gql(insertUserBookQuery);\n\nconst insertFields = [\"book_id\", ...editFields];\n\nexport async function insertUserBook({\n client,\n userBook,\n}: {\n client: ApolloClient;\n userBook: NewUserBookType;\n}): Promise {\n const objectCamel = transformCamelToSnake(userBook);\n const object = pick(objectCamel, insertFields);\n\n return new Promise((resolve, reject) => {\n client\n .mutate({\n mutation: insertUserBookQueryCompiled,\n variables: {\n object,\n },\n })\n .then((result) => {\n if (result.data.insertResponse.error) {\n reject(result.data.insertResponse.error);\n } else {\n resolve(result.data.insertResponse.userBook);\n }\n })\n .catch((e) => {\n reject(e.message);\n });\n });\n}\n","import { gql } from \"graphql-tag\";\nimport { ApolloClient } from \"@apollo/client/core\";\n\n// Delete\nconst deleteUserBookQuery = gql`\n mutation DestroyUserBook($id: Int!) {\n deleteResponse: delete_user_book(id: $id) {\n id\n bookId: book_id\n userId: user_id\n }\n }\n`;\n\nexport type DeleteUserBookResponseType = {\n id: number;\n bookId: number;\n userId: number;\n};\n\nexport async function deleteUserBook({\n client,\n id,\n}: {\n client: ApolloClient;\n id: number;\n}): Promise {\n return new Promise((resolve, reject) => {\n client\n .mutate({\n mutation: deleteUserBookQuery,\n variables: {\n id,\n },\n update: (cache, response) => {\n const normalizedId = cache.identify({\n __typename: \"user_books\",\n userId: response.data.deleteResponse.userId,\n bookId: response.data.deleteResponse.bookId,\n });\n cache.evict({ id: normalizedId });\n },\n })\n .then((result) => {\n if (result.data.deleteResponse.id) {\n resolve(result.data.deleteResponse);\n } else {\n reject();\n }\n })\n .catch((e) => {\n reject(e.message);\n });\n });\n}\n","import { ApolloClient } from \"@apollo/client/core\";\nimport {\n updateUserBook as updateUserBookService,\n insertUserBook as insertUserBookService,\n deleteUserBook as deleteUserBookService,\n} from \"./index\";\nimport { UserBookSerializersUserBook } from \"types/serializers\";\nimport { NewUserBookType } from \"types/UserBookType\";\n\n// UPDATE\nexport async function updateUserBook({\n id,\n userBook,\n client,\n}: {\n id: number;\n userBook: UserBookSerializersUserBook;\n client: ApolloClient;\n}) {\n return updateUserBookService({ client, id, userBook });\n}\n\n// INSERT\nexport async function insertUserBook({ userBook, client }: { userBook: NewUserBookType, client: ApolloClient }) {\n return insertUserBookService({ client, userBook });\n}\n\n// Delete\nexport async function deleteUserBook(id: number, client: ApolloClient) {\n return deleteUserBookService({ client, id });\n}\n","/* eslint-disable import/no-cycle */\n/* eslint-disable camelcase */\nimport { ForwardedRef, MouseEvent, useEffect, useMemo, useState } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { STATUS_MAP } from \"components/shared/UserBookStatuses\";\nimport Icon from \"hardcover-ui/components/Icon\";\nimport faChevronDown from \"icons/solid/chevron-down.svg\";\nimport { uiActions } from \"store/ui/uiSlice\";\nimport { getBookDrawerStatus } from \"store/bookButton/bookButtonSelector\";\nimport classNames from \"lib/classNames\";\nimport StatusColors, {\n sharedButtonClasses,\n} from \"features/BookButton/constants/StatusColors\";\nimport { buttonTheme } from \"hardcover-ui/theme/components/button\";\nimport { slugIdConstants } from \"types/UserBookStatusType\";\nimport { toast } from \"sonner\";\nimport { BookButtonSizeType } from \"../BookButton\";\nimport useCurrentUser from \"hooks/fragments/useCurrentUser\";\nimport useCurrentUserId from \"hooks/user/useCurrentUserId\";\nimport { useApolloClient } from \"lib/apollo/client\";\nimport { setUserBook } from \"store/books/booksSlice\";\nimport { bookButtonActions } from \"store/bookButton/bookButtonSlice\"\nimport { insertUserBook } from \"services/UserBookService/UserBookServiceClient\";\nimport LoadingSpinner from \"hardcover-ui/components/LoadingSpinner\";\n\nexport default function StatusButton({\n el,\n bookId,\n referrerUserId,\n statusId,\n size,\n onClick,\n}: {\n bookId: number;\n el: ForwardedRef;\n referrerUserId?: number;\n size: BookButtonSizeType;\n statusId: number | null | undefined;\n onClick?: any;\n}) {\n const client = useApolloClient();\n const currentUserId = useCurrentUserId();\n const loggedIn = currentUserId !== null;\n\n const dispatch = useDispatch();\n const defaultPrivacySettingId = useCurrentUser(\n (u) => u?.accountPrivacySettingId || 1\n );\n const [open, setOpen] = useState(false);\n const { open: isOpen, bookId: activeBookId } =\n useSelector(getBookDrawerStatus);\n const uid = `book-button-${bookId}`;\n\n const { status, buttonClasses, accentColor, fillColor, noStatus, loading } =\n useMemo(() => {\n const statusColor = StatusColors[statusId || 0];\n return {\n status: STATUS_MAP[statusId] || STATUS_MAP[0],\n buttonClasses: statusColor.buttonClasses,\n accentColor: statusColor.accentColor,\n fillColor: statusColor.fillColor,\n noStatus: !statusId,\n loading: statusId === undefined,\n };\n }, [statusId]);\n\n // Only open if:\n // Drawer is marked as open\n // Drawer book matches this one\n useEffect(() => {\n if (open) {\n setOpen(isOpen && bookId === activeBookId);\n }\n }, [isOpen, activeBookId, bookId]);\n\n const markAsWantToRead = function (e: MouseEvent) {\n e.stopPropagation();\n\n if (!loggedIn) {\n // Not logged in, show login\n dispatch(uiActions.toggleLoginVisible(\"Login\"));\n return;\n }\n\n // This will update cache and rerender this component\n insertUserBook({\n client,\n userBook: {\n userId: currentUserId,\n bookId: bookId,\n statusId: slugIdConstants[\"want-to-read\"],\n privacySettingId: defaultPrivacySettingId,\n referrerUserId,\n },\n })\n .then((newUserBook) => {\n if (newUserBook) {\n dispatch(setUserBook({ userBook: newUserBook }));\n dispatch(bookButtonActions.setUserBook({ userBook: newUserBook }));\n toast.success(\"Saved as Want to Read.\");\n }\n })\n .catch(() => {\n toast.error(\"Error saving book. Try again?\");\n });\n };\n\n return (\n \n \n { loading ? (\n \n ) : (\n \n )}\n\n \n {size === \"md\" ? (\n <>{status.name}\n ) : (\n .\n )}\n \n {!(noStatus && size === \"md\") ? (\n \n ) : (\n false\n )}\n \n\n {/* Drop down button only for no-status */}\n {noStatus && size === \"md\" ? (\n \n \n \n ) : (\n false\n )}\n \n );\n}\n","/* eslint-disable import/no-cycle */\nimport StatusButton from \"./StatusButton/StatusButton\";\nimport { MouseEvent, Suspense, useCallback, useRef, useId } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { uiActions } from \"store/ui/uiSlice\";\nimport { Drawer } from \"features/Drawer\";\nimport { BookButtonDrawer } from \"features/BookButtonDrawer\";\nimport { Placement } from \"@popperjs/core\";\nimport useIsLoggedIn from \"hooks/user/useIsLoggedIn\";\nimport { useUserBookStatus } from \"store/bookButton/bookButtonSelector\";\nimport { RootState } from \"store/types\";\n\nexport type BookButtonSizeType = \"sm\" | \"md\";\nexport interface Props {\n bookId: number;\n referrerUserId?: number;\n size?: BookButtonSizeType;\n onClick?: any;\n placement?: Placement;\n}\n\nexport default function BookButton({\n bookId,\n referrerUserId,\n size = \"md\",\n onClick,\n placement = \"bottom-start\",\n}: Props) {\n const bookButtonRef = useRef();\n const buttonId = useId();\n const isLoggedIn = useIsLoggedIn();\n const statusId = useUserBookStatus(bookId);\n const dispatch = useDispatch();\n const openButtonId = useSelector((state: RootState) => state.ui.openButtonId);\n const isOpen = openButtonId === buttonId;\n\n const openDropdown = useCallback(\n (e: MouseEvent) => {\n if (e) {\n e.stopPropagation();\n }\n\n if (!isLoggedIn) {\n dispatch(uiActions.toggleLoginVisible(\"Login\"));\n if (onClick) {\n onClick();\n }\n return;\n }\n\n dispatch(uiActions.setOpenDropdown(isOpen ? null : buttonId));\n },\n [buttonId, isLoggedIn, dispatch, onClick, isOpen]\n );\n\n return (\n
\n \n\n {isOpen && bookButtonRef.current ? (\n {},\n ref: bookButtonRef.current,\n placement,\n }}\n />\n }\n >\n dispatch(uiActions.setOpenDropdown(null)),\n ref: bookButtonRef.current,\n placement,\n }}\n />\n \n ) : (\n false\n )}\n
\n );\n}\n"],"names":["baseAssignValue","require$$0","eq","require$$1","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","_assignValue","sharedButtonClasses","NoStatus","WantToReadColor","CurrentlyReadingColor","ReadColor","StoppedColor","StatusColors","castPath","isIndex","require$$2","isObject","require$$3","toKey","require$$4","baseSet","path","customizer","index","length","lastIndex","nested","newValue","_baseSet","baseGet","basePickBy","paths","predicate","result","_basePickBy","hasIn","basePick","_basePick","flatten","overRest","setToString","flatRest","func","_flatRest","pick","pick_1","editFields","updateUserBookQuery","gql","updateUserBook","client","id","userBook","resolve","reject","transformCamelToSnake","e","insertUserBookQuery","insertUserBookQueryCompiled","insertFields","insertUserBook","objectCamel","deleteUserBookQuery","deleteUserBook","cache","response","normalizedId","updateUserBookService","insertUserBookService","deleteUserBookService","StatusButton","el","bookId","referrerUserId","statusId","size","onClick","useApolloClient","currentUserId","useCurrentUserId","loggedIn","dispatch","useDispatch","defaultPrivacySettingId","useCurrentUser","u","open","setOpen","useState","isOpen","activeBookId","useSelector","getBookDrawerStatus","uid","status","buttonClasses","accentColor","fillColor","noStatus","loading","useMemo","statusColor","STATUS_MAP","useEffect","markAsWantToRead","uiActions","slugIdConstants","newUserBook","setUserBook","bookButtonActions","toast","jsxs","classNames","buttonTheme","jsx","LoadingSpinner","Icon","Fragment","faChevronDown","BookButton","placement","bookButtonRef","useRef","buttonId","useId","isLoggedIn","useIsLoggedIn","useUserBookStatus","state","openDropdown","useCallback","Suspense","Drawer","BookButtonDrawer"],"mappings":"+5BAAA,IAAIA,GAAkBC,GAClBC,GAAKC,GAGLC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAYjC,SAASE,GAAYC,EAAQC,EAAKC,EAAO,CACvC,IAAIC,EAAWH,EAAOC,CAAG,GACrB,EAAEH,GAAe,KAAKE,EAAQC,CAAG,GAAKN,GAAGQ,EAAUD,CAAK,IACvDA,IAAU,QAAa,EAAED,KAAOD,KACnCP,GAAgBO,EAAQC,EAAKC,CAAK,CAEtC,CAEA,IAAAE,GAAiBL,GC3BV,MAAMM,EACX,2IAEIC,GAAW,CACf,cACE,+JACF,YAAa,mCACb,UAAW,kCACb,EAEMC,G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