@dropins/storefront-requisition-list 1.2.0-alpha1 → 1.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sources":["/@dropins/storefront-requisition-list/src/api/getStoreConfig/graphql/storeConfigQuery.ts","/@dropins/storefront-requisition-list/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-requisition-list/src/api/initialize/initialize.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const STORE_CONFIG_QUERY = `\nquery STORE_CONFIG_QUERY {\n storeConfig {\n is_requisition_list_active\n company_enabled\n }\n}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/requisitionList/api';\n\nimport { STORE_CONFIG_QUERY } from './graphql/storeConfigQuery';\nimport { handleFetchError } from '../../lib/fetch-error';\nimport { StoreConfig } from '@/requisitionList/lib/state';\n\nexport const getStoreConfig = async (): Promise<any> => {\n try {\n const { errors, data } = await fetchGraphQl(STORE_CONFIG_QUERY, {\n cache: 'force-cache',\n });\n\n if (errors) {\n const missingField = errors.some(\n (error) =>\n (error.message &&\n error.message.includes(\n 'Cannot query field \"is_requisition_list_active\"'\n )) ||\n error.message.includes('Cannot query field \"company_enabled\"')\n );\n if (missingField) {\n return false;\n }\n return handleFetchError(errors);\n }\n\n return data?.storeConfig;\n } catch {\n return {\n is_requisition_list_active: '0',\n company_enabled: false,\n } as StoreConfig;\n }\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Initializer } from '@adobe-commerce/elsie/lib';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { events } from '@adobe-commerce/event-bus';\nimport { state } from '@/requisitionList/lib/state';\nimport { getStoreConfig } from '@/requisitionList/api/getStoreConfig';\n\ntype ConfigProps = {\n langDefinitions?: Lang;\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (config) => {\n const defaultConfig = {};\n\n // set config\n if (!state.config) {\n state.config = await getStoreConfig();\n // Emit event to notify listeners that requisition list has been initialized\n events.emit('requisitionList/initialized', state.config);\n }\n\n initialize.config.setConfig({ ...defaultConfig, ...config });\n },\n\n listeners: () => [\n events.on('authenticated', (authenticated) => {\n state.authenticated = authenticated;\n }),\n ],\n});\n\nexport const config = initialize.config;\n"],"names":["STORE_CONFIG_QUERY","getStoreConfig","errors","data","fetchGraphQl","error","handleFetchError","initialize","Initializer","config","defaultConfig","state","events","authenticated"],"mappings":"0gBAiBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECMrBC,EAAiB,SAA0B,CACtD,GAAI,CACF,KAAM,CAAE,OAAAC,EAAQ,KAAAC,CAAA,EAAS,MAAMC,EAAaJ,EAAoB,CAC9D,MAAO,aAAA,CACR,EAED,OAAIE,EACmBA,EAAO,KACzBG,GACEA,EAAM,SACLA,EAAM,QAAQ,SACZ,iDAAA,GAEJA,EAAM,QAAQ,SAAS,sCAAsC,CAAA,EAGxD,GAEFC,EAAiBJ,CAAM,EAGzBC,GAAA,YAAAA,EAAM,WACf,MAAQ,CACN,MAAO,CACL,2BAA4B,IAC5B,gBAAiB,EAAA,CAErB,CACF,ECxBaI,EAAa,IAAIC,EAAyB,CACrD,KAAM,MAAOC,GAAW,CACtB,MAAMC,EAAgB,CAAA,EAGjBC,EAAM,SACTA,EAAM,OAAS,MAAMV,EAAA,EAErBW,EAAO,KAAK,8BAA+BD,EAAM,MAAM,GAGzDJ,EAAW,OAAO,UAAU,CAAE,GAAGG,EAAe,GAAGD,EAAQ,CAC7D,EAEA,UAAW,IAAM,CACfG,EAAO,GAAG,gBAAkBC,GAAkB,CAC5CF,EAAM,cAAgBE,CACxB,CAAC,CAAA,CAEL,CAAC,EAEYJ,EAASF,EAAW"}
1
+ {"version":3,"file":"api.js","sources":["/@dropins/storefront-requisition-list/src/api/getStoreConfig/graphql/storeConfigQuery.ts","/@dropins/storefront-requisition-list/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-requisition-list/src/api/initialize/initialize.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const STORE_CONFIG_QUERY = `\nquery STORE_CONFIG_QUERY {\n storeConfig {\n is_requisition_list_active\n company_enabled\n }\n}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/requisitionList/api';\n\nimport { STORE_CONFIG_QUERY } from './graphql/storeConfigQuery';\nimport { handleFetchError } from '../../lib/fetch-error';\nimport { StoreConfig } from '@/requisitionList/lib/state';\n\nexport const getStoreConfig = async (): Promise<any> => {\n try {\n const { errors, data } = await fetchGraphQl(STORE_CONFIG_QUERY, {\n cache: 'force-cache',\n });\n\n if (errors) {\n const missingField = errors.some(\n (error) =>\n (error.message &&\n error.message.includes(\n 'Cannot query field \"is_requisition_list_active\"'\n )) ||\n error.message.includes('Cannot query field \"company_enabled\"')\n );\n if (missingField) {\n return false;\n }\n return handleFetchError(errors);\n }\n\n return data?.storeConfig;\n } catch {\n return {\n is_requisition_list_active: '0',\n company_enabled: false,\n } as StoreConfig;\n }\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Initializer } from '@adobe-commerce/elsie/lib';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { events } from '@adobe-commerce/event-bus';\nimport { state } from '@/requisitionList/lib/state';\nimport { getStoreConfig } from '@/requisitionList/api/getStoreConfig';\n\ntype ConfigProps = {\n langDefinitions?: Lang;\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (config) => {\n const defaultConfig = {};\n\n // set config\n if (!state.config) {\n state.config = await getStoreConfig();\n // Emit event to notify listeners that requisition list has been initialized\n events.emit('requisitionList/initialized', state.config);\n }\n\n initialize.config.setConfig({ ...defaultConfig, ...config });\n },\n\n listeners: () => [\n events.on('authenticated', (authenticated) => {\n state.authenticated = authenticated;\n }),\n ],\n});\n\nexport const config = initialize.config;\n"],"names":["STORE_CONFIG_QUERY","getStoreConfig","errors","data","fetchGraphQl","error","handleFetchError","initialize","Initializer","config","defaultConfig","state","events","authenticated"],"mappings":"0gBAiBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECMrBC,EAAiB,SAA0B,CAClD,GAAA,CACF,KAAM,CAAE,OAAAC,EAAQ,KAAAC,CAAS,EAAA,MAAMC,EAAaJ,EAAoB,CAC9D,MAAO,aAAA,CACR,EAED,OAAIE,EACmBA,EAAO,KACzBG,GACEA,EAAM,SACLA,EAAM,QAAQ,SACZ,iDAAA,GAEJA,EAAM,QAAQ,SAAS,sCAAsC,CACjE,EAES,GAEFC,EAAiBJ,CAAM,EAGzBC,GAAA,YAAAA,EAAM,WAAA,MACP,CACC,MAAA,CACL,2BAA4B,IAC5B,gBAAiB,EACnB,CAAA,CAEJ,ECxBaI,EAAa,IAAIC,EAAyB,CACrD,KAAM,MAAOC,GAAW,CACtB,MAAMC,EAAgB,CAAC,EAGlBC,EAAM,SACHA,EAAA,OAAS,MAAMV,EAAe,EAE7BW,EAAA,KAAK,8BAA+BD,EAAM,MAAM,GAGzDJ,EAAW,OAAO,UAAU,CAAE,GAAGG,EAAe,GAAGD,EAAQ,CAC7D,EAEA,UAAW,IAAM,CACfG,EAAO,GAAG,gBAAkBC,GAAkB,CAC5CF,EAAM,cAAgBE,CACvB,CAAA,CAAA,CAEL,CAAC,EAEYJ,EAASF,EAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationItemsCounter.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/Search.svg","/@dropins/storefront-requisition-list/src/components/NotFound/NotFound.tsx","/@dropins/storefront-requisition-list/src/components/PageSizePicker/PageSizePicker.tsx","/@dropins/storefront-requisition-list/src/components/PaginationItemsCounter/PaginationItemsCounter.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgSearch = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Search_Base\", \"data-name\": \"Icon \\\\u2013 Search \\\\u2013 Base\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, fill: \"none\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Large\" }, /* @__PURE__ */ React.createElement(\"rect\", { id: \"Placement_area\", \"data-name\": \"Placement area\", width: 24, height: 24, fill: \"#fff\", opacity: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"Search_icon\", \"data-name\": \"Search icon\", transform: \"translate(3.75 3.75)\" }, /* @__PURE__ */ React.createElement(\"circle\", { vectorEffect: \"non-scaling-stroke\", id: \"Ellipse_186\", \"data-name\": \"Ellipse 186\", cx: 6, cy: 6, r: 6, fill: \"none\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_556\", \"data-name\": \"Line 556\", x2: 6, y2: 6, transform: \"translate(10.5 10.5)\", fill: \"none\", stroke: \"currentColor\" }))));\nexport default SvgSearch;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Icon, Button } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Search } from '@adobe-commerce/elsie/icons';\nimport '@/requisitionList/components/NotFound/NotFound.css';\n\nexport interface NotFoundProps {\n className?: string;\n title?: string;\n message?: string;\n actionLabel?: string;\n onAction?: () => void;\n}\n\nexport const NotFound: FunctionComponent<NotFoundProps> = ({\n className,\n title = '404 - Not Found',\n message = 'The requisition list you are looking for does not exist.',\n actionLabel,\n onAction,\n ...props\n}) => {\n return (\n <div\n className={classes(['not-found', className])}\n data-testid=\"not-found\"\n {...props}\n >\n <Icon source={Search} size={'64'} stroke={'2'} />\n <h2>{title}</h2>\n {message && <p>{message}</p>}\n {actionLabel && onAction && (\n <Button variant=\"primary\" onClick={onAction}>\n {actionLabel}\n </Button>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { HTMLAttributes } from 'preact/compat';\nimport { Picker } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/requisitionList/components/PageSizePicker/PageSizePicker.css';\n\nexport interface PageSizePickerProps extends HTMLAttributes<HTMLDivElement> {\n currentPageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n disabled?: boolean;\n pageSizeOptions?: number[];\n}\n\nexport const PageSizePicker = ({\n currentPageSize,\n onPageSizeChange,\n disabled = false,\n pageSizeOptions = [10, 25, 50, 100],\n}: PageSizePickerProps) => {\n const translations = useText({\n itemsPerPage: `RequisitionList.PageSizePicker.itemsPerPage`,\n });\n\n const handlePageSizeChange = (event: Event) => {\n const target = event.target as HTMLSelectElement;\n const newPageSize = parseInt(target.value, 10);\n onPageSizeChange(newPageSize);\n };\n\n const options = pageSizeOptions.map((size) => ({\n value: size.toString(),\n text: size.toString(),\n }));\n\n return (\n <Picker\n disabled={disabled}\n data-testid=\"page-size-picker\"\n variant=\"primary\"\n size=\"medium\"\n value={currentPageSize.toString()}\n options={options}\n handleSelect={handlePageSizeChange}\n aria-label={translations.itemsPerPage}\n />\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\n\nimport { PageInfo } from '@/requisitionList/data/models';\nimport { DEFAULT_PAGE_SIZE } from '@/requisitionList/lib/constants';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/requisitionList/components/PaginationItemsCounter/PaginationItemsCounter.css';\n\nexport interface PaginationItemsCounterProps {\n pageInfo?: PageInfo;\n totalCount?: number;\n className?: string;\n}\n\nexport const PaginationItemsCounter: FunctionComponent<\n PaginationItemsCounterProps\n> = ({ pageInfo, totalCount, className = '' }) => {\n const translations = useText({\n itemsCounter: `RequisitionList.PaginationItemsCounter.itemsCounter`,\n });\n\n // Don't show counter if no pageInfo or if there's no total count\n if (!pageInfo || !totalCount) {\n return null;\n }\n\n const pageSize = pageInfo.page_size ?? DEFAULT_PAGE_SIZE;\n const currentPage = pageInfo.current_page ?? 1;\n const currentPageSize = pageSize * currentPage;\n const total = totalCount;\n\n const from = currentPageSize - pageSize + 1;\n const to = currentPageSize > total ? total : currentPageSize;\n\n return (\n <span className={`pagination-items-counter ${className}`.trim()}>\n {translations.itemsCounter\n .replace('{from}', from.toString())\n .replace('{to}', to.toString())\n .replace('{total}', total.toString())}\n </span>\n );\n};\n"],"names":["SvgSearch","props","React","NotFound","className","title","message","actionLabel","onAction","jsxs","classes","jsx","Icon","Search","Button","PageSizePicker","currentPageSize","onPageSizeChange","disabled","pageSizeOptions","translations","useText","handlePageSizeChange","event","target","newPageSize","options","size","Picker","PaginationItemsCounter","pageInfo","totalCount","pageSize","DEFAULT_PAGE_SIZE","currentPage","total","from","to"],"mappings":"kXACA,MAAMA,EAAaC,GAA0BC,EAAM,cAAc,MAAO,CAAE,GAAI,mBAAoB,YAAa,mCAAoC,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,YAAa,GAAGD,CAAK,EAAoBC,EAAM,cAAc,IAAK,CAAE,GAAI,OAAO,EAAoBA,EAAM,cAAc,OAAQ,CAAE,GAAI,iBAAkB,YAAa,iBAAkB,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,EAAG,EAAmBA,EAAM,cAAc,IAAK,CAAE,GAAI,cAAe,YAAa,cAAe,UAAW,sBAAsB,EAAoBA,EAAM,cAAc,SAAU,CAAE,aAAc,qBAAsB,GAAI,cAAe,YAAa,cAAe,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,KAAM,OAAQ,OAAQ,cAAc,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,EAAG,GAAI,EAAG,UAAW,uBAAwB,KAAM,OAAQ,OAAQ,cAAc,CAAE,CAAC,CAAC,CAAC,EC6Bv9BC,EAA6C,CAAC,CACzD,UAAAC,EACA,MAAAC,EAAQ,kBACR,QAAAC,EAAU,2DACV,YAAAC,EACA,SAAAC,EACA,GAAGP,CACL,IAEIQ,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,YAAaN,CAAS,CAAC,EAC3C,cAAY,YACX,GAAGH,EAEJ,SAAA,CAA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gB,EAAa,aACX,QAAQ,SAAUgB,EAAK,SAAA,CAAU,EACjC,QAAQ,OAAQC,EAAG,UAAU,EAC7B,QAAQ,UAAWF,EAAM,SAAA,CAAU,CAAA,CACxC,CAEJ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"PaginationItemsCounter.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/Search.svg","/@dropins/storefront-requisition-list/src/components/NotFound/NotFound.tsx","/@dropins/storefront-requisition-list/src/components/PageSizePicker/PageSizePicker.tsx","/@dropins/storefront-requisition-list/src/components/PaginationItemsCounter/PaginationItemsCounter.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgSearch = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Search_Base\", \"data-name\": \"Icon \\\\u2013 Search \\\\u2013 Base\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, fill: \"none\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Large\" }, /* @__PURE__ */ React.createElement(\"rect\", { id: \"Placement_area\", \"data-name\": \"Placement area\", width: 24, height: 24, fill: \"#fff\", opacity: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"Search_icon\", \"data-name\": \"Search icon\", transform: \"translate(3.75 3.75)\" }, /* @__PURE__ */ React.createElement(\"circle\", { vectorEffect: \"non-scaling-stroke\", id: \"Ellipse_186\", \"data-name\": \"Ellipse 186\", cx: 6, cy: 6, r: 6, fill: \"none\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_556\", \"data-name\": \"Line 556\", x2: 6, y2: 6, transform: \"translate(10.5 10.5)\", fill: \"none\", stroke: \"currentColor\" }))));\nexport default SvgSearch;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Icon, Button } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Search } from '@adobe-commerce/elsie/icons';\nimport '@/requisitionList/components/NotFound/NotFound.css';\n\nexport interface NotFoundProps {\n className?: string;\n title?: string;\n message?: string;\n actionLabel?: string;\n onAction?: () => void;\n}\n\nexport const NotFound: FunctionComponent<NotFoundProps> = ({\n className,\n title = '404 - Not Found',\n message = 'The requisition list you are looking for does not exist.',\n actionLabel,\n onAction,\n ...props\n}) => {\n return (\n <div\n className={classes(['not-found', className])}\n data-testid=\"not-found\"\n {...props}\n >\n <Icon source={Search} size={'64'} stroke={'2'} />\n <h2>{title}</h2>\n {message && <p>{message}</p>}\n {actionLabel && onAction && (\n <Button variant=\"primary\" onClick={onAction}>\n {actionLabel}\n </Button>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { HTMLAttributes } from 'preact/compat';\nimport { Picker } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/requisitionList/components/PageSizePicker/PageSizePicker.css';\n\nexport interface PageSizePickerProps extends HTMLAttributes<HTMLDivElement> {\n currentPageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n disabled?: boolean;\n pageSizeOptions?: number[];\n}\n\nexport const PageSizePicker = ({\n currentPageSize,\n onPageSizeChange,\n disabled = false,\n pageSizeOptions = [10, 25, 50, 100],\n}: PageSizePickerProps) => {\n const translations = useText({\n itemsPerPage: `RequisitionList.PageSizePicker.itemsPerPage`,\n });\n\n const handlePageSizeChange = (event: Event) => {\n const target = event.target as HTMLSelectElement;\n const newPageSize = parseInt(target.value, 10);\n onPageSizeChange(newPageSize);\n };\n\n const options = pageSizeOptions.map((size) => ({\n value: size.toString(),\n text: size.toString(),\n }));\n\n return (\n <Picker\n disabled={disabled}\n data-testid=\"page-size-picker\"\n variant=\"primary\"\n size=\"medium\"\n value={currentPageSize.toString()}\n options={options}\n handleSelect={handlePageSizeChange}\n aria-label={translations.itemsPerPage}\n />\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\n\nimport { PageInfo } from '@/requisitionList/data/models';\nimport { DEFAULT_PAGE_SIZE } from '@/requisitionList/lib/constants';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/requisitionList/components/PaginationItemsCounter/PaginationItemsCounter.css';\n\nexport interface PaginationItemsCounterProps {\n pageInfo?: PageInfo;\n totalCount?: number;\n className?: string;\n}\n\nexport const PaginationItemsCounter: FunctionComponent<\n PaginationItemsCounterProps\n> = ({ pageInfo, totalCount, className = '' }) => {\n const translations = useText({\n itemsCounter: `RequisitionList.PaginationItemsCounter.itemsCounter`,\n });\n\n // Don't show counter if no pageInfo or if there's no total count\n if (!pageInfo || !totalCount) {\n return null;\n }\n\n const pageSize = pageInfo.page_size ?? DEFAULT_PAGE_SIZE;\n const currentPage = pageInfo.current_page ?? 1;\n const currentPageSize = pageSize * currentPage;\n const total = totalCount;\n\n const from = currentPageSize - pageSize + 1;\n const to = currentPageSize > total ? total : currentPageSize;\n\n return (\n <span className={`pagination-items-counter ${className}`.trim()}>\n {translations.itemsCounter\n .replace('{from}', from.toString())\n .replace('{to}', to.toString())\n .replace('{total}', total.toString())}\n </span>\n );\n};\n"],"names":["SvgSearch","props","React","NotFound","className","title","message","actionLabel","onAction","jsxs","classes","jsx","Icon","Search","Button","PageSizePicker","currentPageSize","onPageSizeChange","disabled","pageSizeOptions","translations","useText","handlePageSizeChange","event","target","newPageSize","options","size","Picker","PaginationItemsCounter","pageInfo","totalCount","pageSize","DEFAULT_PAGE_SIZE","currentPage","total","from","to"],"mappings":"kXACA,MAAMA,EAAaC,GAA0BC,EAAM,cAAc,MAAO,CAAE,GAAI,mBAAoB,YAAa,mCAAoC,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,YAAa,GAAGD,CAAK,EAAoBC,EAAM,cAAc,IAAK,CAAE,GAAI,OAAS,EAAkBA,EAAM,cAAc,OAAQ,CAAE,GAAI,iBAAkB,YAAa,iBAAkB,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,EAAG,EAAmBA,EAAM,cAAc,IAAK,CAAE,GAAI,cAAe,YAAa,cAAe,UAAW,sBAAsB,EAAoBA,EAAM,cAAc,SAAU,CAAE,aAAc,qBAAsB,GAAI,cAAe,YAAa,cAAe,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,KAAM,OAAQ,OAAQ,cAAc,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,EAAG,GAAI,EAAG,UAAW,uBAAwB,KAAM,OAAQ,OAAQ,cAAgB,CAAA,CAAC,CAAC,CAAC,EC6Bv9BC,EAA6C,CAAC,CACzD,UAAAC,EACA,MAAAC,EAAQ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,EAAWE,EAC7BC,EAAQJ,EAERK,EAAOpB,EAAkBgB,EAAW,EACpCK,EAAKrB,EAAkBmB,EAAQA,EAAQnB,EAG3C,OAAAL,EAAC,OAAK,CAAA,UAAW,4BAA4BP,CAAS,GAAG,KAAA,EACtD,SAAAgB,EAAa,aACX,QAAQ,SAAUgB,EAAK,SAAS,CAAC,EACjC,QAAQ,OAAQC,EAAG,UAAU,EAC7B,QAAQ,UAAWF,EAAM,SAAS,CAAC,CACxC,CAAA,CAEJ","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListActions.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/Add.svg","/@dropins/storefront-requisition-list/src/components/RequisitionListActions/RequisitionListActions.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgAdd = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Add_Base\", \"data-name\": \"Icon \\\\u2013 Add \\\\u2013 Base\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Large\" }, /* @__PURE__ */ React.createElement(\"rect\", { id: \"Placement_area\", \"data-name\": \"Placement area\", width: 24, height: 24, fill: \"#fff\", opacity: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"Add_icon\", \"data-name\": \"Add icon\", transform: \"translate(9.734 9.737)\" }, /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_579\", \"data-name\": \"Line 579\", y2: 12.7, transform: \"translate(2.216 -4.087)\", fill: \"none\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_580\", \"data-name\": \"Line 580\", x2: 12.7, transform: \"translate(-4.079 2.263)\", fill: \"none\", stroke: \"currentColor\" }))));\nexport default SvgAdd;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Add } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/requisitionList/components/RequisitionListActions/RequisitionListActions.css';\n\nexport interface RequisitionListActionsProps {\n className?: string;\n selectable?: boolean;\n onAddNew?: () => void;\n}\n\nexport const RequisitionListActions: FunctionComponent<\n RequisitionListActionsProps\n> = ({ selectable, className, onAddNew }) => {\n const translations = useText({\n addNewReqListBtn: `RequisitionList.AddNewReqList.addNewReqListBtn`,\n });\n\n return (\n <button\n type=\"button\"\n aria-label={translations.addNewReqListBtn}\n role=\"button\"\n className={classes([\n 'requisition-list-actions',\n ['requisition-list-actions--selectable', selectable],\n className,\n ])}\n data-testid=\"requisition-list-actions-button\"\n onClick={onAddNew}\n >\n <span\n className=\"requisition-list-actions__title\"\n data-testid=\"requisition-list-actions-button-text\"\n >\n {translations.addNewReqListBtn}\n </span>\n <Icon source={Add} size=\"32\" />\n </button>\n );\n};\n"],"names":["SvgAdd","props","React","RequisitionListActions","selectable","className","onAddNew","translations","useText","jsxs","classes","jsx","Icon","Add"],"mappings":"6SACA,MAAMA,EAAUC,GAA0BC,EAAM,cAAc,MAAO,CAAE,GAAI,gBAAiB,YAAa,gCAAiC,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,GAAGD,GAAyBC,EAAM,cAAc,IAAK,CAAE,GAAI,OAAO,EAAoBA,EAAM,cAAc,OAAQ,CAAE,GAAI,iBAAkB,YAAa,iBAAkB,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,CAAC,CAAE,EAAmBA,EAAM,cAAc,IAAK,CAAE,GAAI,WAAY,YAAa,WAAY,UAAW,wBAAwB,EAAoBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,KAAM,UAAW,0BAA2B,KAAM,OAAQ,OAAQ,cAAc,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,KAAM,UAAW,0BAA2B,KAAM,OAAQ,OAAQ,eAAgB,CAAC,CAAC,CAAC,EC6B/8BC,EAET,CAAC,CAAE,WAAAC,EAAY,UAAAC,EAAW,SAAAC,KAAe,CAC3C,MAAMC,EAAeC,EAAQ,CAC3B,iBAAkB,gDAAA,CACnB,EAED,OACEC,EAAC,SAAA,CACC,KAAK,SACL,aAAYF,EAAa,iBACzB,KAAK,SACL,UAAWG,EAAQ,CACjB,2BACA,CAAC,uCAAwCN,CAAU,EACnDC,CAAA,CACD,EACD,cAAY,kCACZ,QAASC,EAET,SAAA,CAAAK,EAAC,OAAA,CACC,UAAU,kCACV,cAAY,uCAEX,SAAAJ,EAAa,gBAAA,CAAA,EAEhBI,EAACC,EAAA,CAAK,OAAQC,EAAK,KAAK,IAAA,CAAK,CAAA,CAAA,CAAA,CAGnC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"RequisitionListActions.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/Add.svg","/@dropins/storefront-requisition-list/src/components/RequisitionListActions/RequisitionListActions.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgAdd = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Add_Base\", \"data-name\": \"Icon \\\\u2013 Add \\\\u2013 Base\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Large\" }, /* @__PURE__ */ React.createElement(\"rect\", { id: \"Placement_area\", \"data-name\": \"Placement area\", width: 24, height: 24, fill: \"#fff\", opacity: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"Add_icon\", \"data-name\": \"Add icon\", transform: \"translate(9.734 9.737)\" }, /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_579\", \"data-name\": \"Line 579\", y2: 12.7, transform: \"translate(2.216 -4.087)\", fill: \"none\", stroke: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"line\", { vectorEffect: \"non-scaling-stroke\", id: \"Line_580\", \"data-name\": \"Line 580\", x2: 12.7, transform: \"translate(-4.079 2.263)\", fill: \"none\", stroke: \"currentColor\" }))));\nexport default SvgAdd;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Add } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/requisitionList/components/RequisitionListActions/RequisitionListActions.css';\n\nexport interface RequisitionListActionsProps {\n className?: string;\n selectable?: boolean;\n onAddNew?: () => void;\n}\n\nexport const RequisitionListActions: FunctionComponent<\n RequisitionListActionsProps\n> = ({ selectable, className, onAddNew }) => {\n const translations = useText({\n addNewReqListBtn: `RequisitionList.AddNewReqList.addNewReqListBtn`,\n });\n\n return (\n <button\n type=\"button\"\n aria-label={translations.addNewReqListBtn}\n role=\"button\"\n className={classes([\n 'requisition-list-actions',\n ['requisition-list-actions--selectable', selectable],\n className,\n ])}\n data-testid=\"requisition-list-actions-button\"\n onClick={onAddNew}\n >\n <span\n className=\"requisition-list-actions__title\"\n data-testid=\"requisition-list-actions-button-text\"\n >\n {translations.addNewReqListBtn}\n </span>\n <Icon source={Add} size=\"32\" />\n </button>\n );\n};\n"],"names":["SvgAdd","props","React","RequisitionListActions","selectable","className","onAddNew","translations","useText","jsxs","classes","jsx","Icon","Add"],"mappings":"6SACA,MAAMA,EAAUC,GAA0BC,EAAM,cAAc,MAAO,CAAE,GAAI,gBAAiB,YAAa,gCAAiC,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,GAAGD,GAAyBC,EAAM,cAAc,IAAK,CAAE,GAAI,OAAS,EAAkBA,EAAM,cAAc,OAAQ,CAAE,GAAI,iBAAkB,YAAa,iBAAkB,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,CAAG,CAAA,EAAmBA,EAAM,cAAc,IAAK,CAAE,GAAI,WAAY,YAAa,WAAY,UAAW,wBAAwB,EAAoBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,KAAM,UAAW,0BAA2B,KAAM,OAAQ,OAAQ,cAAgB,CAAA,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,WAAY,YAAa,WAAY,GAAI,KAAM,UAAW,0BAA2B,KAAM,OAAQ,OAAQ,eAAgB,CAAC,CAAC,CAAC,EC6B/8BC,EAET,CAAC,CAAE,WAAAC,EAAY,UAAAC,EAAW,SAAAC,KAAe,CAC3C,MAAMC,EAAeC,EAAQ,CAC3B,iBAAkB,gDAAA,CACnB,EAGC,OAAAC,EAAC,SAAA,CACC,KAAK,SACL,aAAYF,EAAa,iBACzB,KAAK,SACL,UAAWG,EAAQ,CACjB,2BACA,CAAC,uCAAwCN,CAAU,EACnDC,CAAA,CACD,EACD,cAAY,kCACZ,QAASC,EAET,SAAA,CAAAK,EAAC,OAAA,CACC,UAAU,kCACV,cAAY,uCAEX,SAAaJ,EAAA,gBAAA,CAChB,EACCI,EAAAC,EAAA,CAAK,OAAQC,EAAK,KAAK,IAAK,CAAA,CAAA,CAAA,CAC/B,CAEJ","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListForm.js","sources":["/@dropins/storefront-requisition-list/src/lib/constants.ts","/@dropins/storefront-requisition-list/src/components/RequisitionListForm/RequisitionListForm.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Default page size for pagination in requisition lists\n */\nexport const DEFAULT_PAGE_SIZE = 10;\n\n/**\n * Validation constants for requisition list forms\n */\nexport const NAME_MIN_LENGTH = 3;\nexport const NAME_MAX_LENGTH = 40;\nexport const DESCRIPTION_MAX_LENGTH = 255;\n// Allow letters, numbers, spaces, and common punctuation: . , - _ ! ? ' \" ( ) &\nexport const NAME_VALID_CHARS = /^[a-zA-Z0-9\\s.,\\-_!?'\"()&]+$/;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useState } from 'preact/hooks';\nimport {\n Field,\n Input,\n TextArea,\n Button,\n InLineAlert,\n ProgressSpinner,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n RequisitionListFormMode,\n RequisitionListFormValues,\n} from '@/requisitionList/hooks/useRequisitionListForm';\nimport {\n NAME_MIN_LENGTH,\n NAME_MAX_LENGTH,\n DESCRIPTION_MAX_LENGTH,\n NAME_VALID_CHARS,\n} from '@/requisitionList/lib/constants';\n\nimport '@/requisitionList/components/RequisitionListForm/RequisitionListForm.css';\n\nexport interface RequisitionListFormProps\n extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n mode: RequisitionListFormMode;\n defaultValues?: RequisitionListFormValues;\n error?: string | null;\n onSubmit: (values: RequisitionListFormValues) => Promise<void> | void;\n onCancel: () => void;\n}\n\nexport const RequisitionListForm: FunctionComponent<\n RequisitionListFormProps\n> = ({\n className,\n mode,\n defaultValues = { name: '', description: '' },\n error = null,\n onSubmit,\n onCancel,\n ...props\n}) => {\n const [values, setValues] =\n useState<RequisitionListFormValues>(defaultValues);\n const [touched, setTouched] = useState({\n name: false,\n });\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const translations = useText({\n actionCancel: `RequisitionList.RequisitionListForm.actionCancel`,\n actionSave: `RequisitionList.RequisitionListForm.actionSave`,\n requiredField: `RequisitionList.RequisitionListForm.requiredField`,\n nameMinLength: `RequisitionList.RequisitionListForm.nameMinLength`,\n nameInvalidCharacters: `RequisitionList.RequisitionListForm.nameInvalidCharacters`,\n floatingLabel: `RequisitionList.RequisitionListForm.floatingLabel`,\n placeholder: `RequisitionList.RequisitionListForm.placeholder`,\n label: `RequisitionList.RequisitionListForm.label`,\n updateTitle: `RequisitionList.RequisitionListForm.updateTitle`,\n createTitle: `RequisitionList.RequisitionListForm.createTitle`,\n });\n\n // Validation functions\n const validateName = (name: string): string => {\n const trimmedName = name.trim();\n\n if (!trimmedName) {\n return translations.requiredField;\n }\n\n if (trimmedName.length < NAME_MIN_LENGTH) {\n return translations.nameMinLength.replace(\n '{min}',\n NAME_MIN_LENGTH.toString()\n );\n }\n\n if (!NAME_VALID_CHARS.test(trimmedName)) {\n return translations.nameInvalidCharacters;\n }\n\n return '';\n };\n\n const handleChange =\n (field: keyof RequisitionListFormValues) => (e: Event) => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n setValues((prevValues) => ({\n ...prevValues,\n [field]: target.value,\n }));\n };\n\n const handleBlur = (field: keyof RequisitionListFormValues) => () => {\n setTouched((prev) => ({ ...prev, [field]: true }));\n };\n\n const handleSubmit = async (e: Event) => {\n e.preventDefault();\n\n // Mark all fields as touched on submit attempt\n setTouched({ name: true, description: true });\n\n // Validate all fields\n const nameError = validateName(values.name);\n\n if (nameError || isSubmitting) return;\n\n setIsSubmitting(true);\n try {\n await onSubmit({\n name: values.name.trim(),\n description: values.description?.trim() ?? '',\n });\n } catch {\n setIsSubmitting(false);\n }\n };\n\n // Calculate error messages\n const nameError = touched.name ? validateName(values.name) : '';\n\n const title =\n mode === 'update' ? translations.updateTitle : translations.createTitle;\n\n return (\n <div {...props} className={classes(['requisition-list-form', className])}>\n <div className=\"requisition-list-form__title\">\n {title}\n {isSubmitting ? (\n <div\n className={classes([\n 'requisition-list-form_progress-spinner',\n className,\n ])}\n data-testid=\"requisition-list-form-progress-spinner\"\n >\n <ProgressSpinner stroke={'4'} size={'small'} />\n </div>\n ) : null}\n </div>\n\n {error ? (\n <InLineAlert\n type=\"error\"\n className=\"requisition-list-form__notification\"\n variant=\"secondary\"\n heading={error}\n data-testid=\"requisition-list-alert\"\n />\n ) : null}\n\n <form\n className={classes(['requisition-list-form__form', className])}\n onSubmit={handleSubmit}\n >\n <Field error={nameError} disabled={isSubmitting}>\n <Input\n id=\"requisition-list-form-name\"\n name=\"name\"\n type=\"text\"\n floatingLabel={translations.floatingLabel}\n placeholder={translations.placeholder}\n maxLength={NAME_MAX_LENGTH}\n value={values.name}\n onChange={handleChange('name')}\n onBlur={handleBlur('name')}\n />\n </Field>\n\n <Field disabled={isSubmitting}>\n <TextArea\n id=\"requisition-list-form-description\"\n name=\"description\"\n label={translations.label}\n placeholder={translations.label}\n maxLength={DESCRIPTION_MAX_LENGTH}\n value={values.description}\n onChange={handleChange('description')}\n onBlur={handleBlur('description')}\n />\n </Field>\n\n <div className=\"requisition-list-form__actions\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n onClick={onCancel}\n disabled={isSubmitting}\n data-testid=\"requisition-list-form-cancel\"\n >\n {translations.actionCancel}\n </Button>\n <Button\n type=\"submit\"\n disabled={isSubmitting}\n data-testid=\"requisition-list-form-save\"\n >\n {translations.actionSave}\n </Button>\n </div>\n </form>\n </div>\n );\n};\n"],"names":["DEFAULT_PAGE_SIZE","NAME_MIN_LENGTH","NAME_MAX_LENGTH","DESCRIPTION_MAX_LENGTH","NAME_VALID_CHARS","RequisitionListForm","className","mode","defaultValues","error","onSubmit","onCancel","props","values","setValues","useState","touched","setTouched","isSubmitting","setIsSubmitting","translations","useText","validateName","name","trimmedName","handleChange","field","e","target","prevValues","handleBlur","prev","handleSubmit","nameError","_a","title","jsxs","classes","jsx","ProgressSpinner","InLineAlert","Field","Input","TextArea","Button"],"mappings":"gWAoBO,MAAMA,EAAoB,GAKpBC,EAAkB,EAClBC,EAAkB,GAClBC,EAAyB,IAEzBC,EAAmB,+BCwBnBC,EAET,CAAC,CACH,UAAAC,EACA,KAAAC,EACA,cAAAC,EAAgB,CAAE,KAAM,GAAI,YAAa,EAAA,EACzC,MAAAC,EAAQ,KACR,SAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAACC,EAAQC,CAAS,EACtBC,EAAoCP,CAAa,EAC7C,CAACQ,EAASC,CAAU,EAAIF,EAAS,CACrC,KAAM,EAAA,CACP,EACK,CAACG,EAAcC,CAAe,EAAIJ,EAAS,EAAK,EAEhDK,EAAeC,EAAQ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D,EAAQ,CACjB,yCACA/B,CAAA,CACD,EACD,cAAY,yCAEZ,SAAAgC,EAACC,EAAA,CAAgB,OAAQ,IAAK,KAAM,OAAA,CAAS,CAAA,CAAA,EAE7C,IAAA,EACN,EAEC9B,EACC6B,EAACE,EAAA,CACC,KAAK,QACL,UAAU,sCACV,QAAQ,YACR,QAAS/B,EACT,cAAY,wBAAA,CAAA,EAEZ,KAEJ2B,EAAC,OAAA,CACC,UAAWC,EAAQ,CAAC,8BAA+B/B,CAAS,CAAC,EAC7D,SAAU0B,EAEV,SAAA,CAAAM,EAACG,EAAA,CAAM,MAAOR,EAAW,SAAUf,EACjC,SAAAoB,EAACI,EAAA,CACC,GAAG,6BACH,KAAK,OACL,KAAK,OACL,cAAetB,EAAa,cAC5B,YAAaA,EAAa,YAC1B,UAAWlB,EACX,MAAOW,EAAO,KACd,SAAUY,EAAa,MAAM,EAC7B,OAAQK,EAAW,MAAM,CAAA,CAAA,EAE7B,EAEAQ,EAACG,EAAA,CAAM,SAAUvB,EACf,SAAAoB,EAACK,EAAA,CACC,GAAG,oCACH,KAAK,cACL,MAAOvB,EAAa,MACpB,YAAaA,EAAa,MAC1B,UAAWjB,EACX,MAAOU,EAAO,YACd,SAAUY,EAAa,aAAa,EACpC,OAAQK,EAAW,aAAa,CAAA,CAAA,EAEpC,EAEAM,EAAC,MAAA,CAAI,UAAU,iCACb,SAAA,CAAAE,EAACM,EAAA,CACC,KAAK,SACL,QAAQ,YACR,QAASjC,EACT,SAAUO,EACV,cAAY,+BAEX,SAAAE,EAAa,YAAA,CAAA,EAEhBkB,EAACM,EAAA,CACC,KAAK,SACL,SAAU1B,EACV,cAAY,6BAEX,SAAAE,EAAa,UAAA,CAAA,CAChB,CAAA,CACF,CAAA,CAAA,CAAA,CACF,EACF,CAEJ"}
1
+ {"version":3,"file":"RequisitionListForm.js","sources":["/@dropins/storefront-requisition-list/src/lib/constants.ts","/@dropins/storefront-requisition-list/src/components/RequisitionListForm/RequisitionListForm.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Default page size for pagination in requisition lists\n */\nexport const DEFAULT_PAGE_SIZE = 10;\n\n/**\n * Validation constants for requisition list forms\n */\nexport const NAME_MIN_LENGTH = 3;\nexport const NAME_MAX_LENGTH = 40;\nexport const DESCRIPTION_MAX_LENGTH = 255;\n// Allow letters, numbers, spaces, and common punctuation: . , - _ ! ? ' \" ( ) &\nexport const NAME_VALID_CHARS = /^[a-zA-Z0-9\\s.,\\-_!?'\"()&]+$/;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useState } from 'preact/hooks';\nimport {\n Field,\n Input,\n TextArea,\n Button,\n InLineAlert,\n ProgressSpinner,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n RequisitionListFormMode,\n RequisitionListFormValues,\n} from '@/requisitionList/hooks/useRequisitionListForm';\nimport {\n NAME_MIN_LENGTH,\n NAME_MAX_LENGTH,\n DESCRIPTION_MAX_LENGTH,\n NAME_VALID_CHARS,\n} from '@/requisitionList/lib/constants';\n\nimport '@/requisitionList/components/RequisitionListForm/RequisitionListForm.css';\n\nexport interface RequisitionListFormProps\n extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n mode: RequisitionListFormMode;\n defaultValues?: RequisitionListFormValues;\n error?: string | null;\n onSubmit: (values: RequisitionListFormValues) => Promise<void> | void;\n onCancel: () => void;\n}\n\nexport const RequisitionListForm: FunctionComponent<\n RequisitionListFormProps\n> = ({\n className,\n mode,\n defaultValues = { name: '', description: '' },\n error = null,\n onSubmit,\n onCancel,\n ...props\n}) => {\n const [values, setValues] =\n useState<RequisitionListFormValues>(defaultValues);\n const [touched, setTouched] = useState({\n name: false,\n });\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const translations = useText({\n actionCancel: `RequisitionList.RequisitionListForm.actionCancel`,\n actionSave: `RequisitionList.RequisitionListForm.actionSave`,\n requiredField: `RequisitionList.RequisitionListForm.requiredField`,\n nameMinLength: `RequisitionList.RequisitionListForm.nameMinLength`,\n nameInvalidCharacters: `RequisitionList.RequisitionListForm.nameInvalidCharacters`,\n floatingLabel: `RequisitionList.RequisitionListForm.floatingLabel`,\n placeholder: `RequisitionList.RequisitionListForm.placeholder`,\n label: `RequisitionList.RequisitionListForm.label`,\n updateTitle: `RequisitionList.RequisitionListForm.updateTitle`,\n createTitle: `RequisitionList.RequisitionListForm.createTitle`,\n });\n\n // Validation functions\n const validateName = (name: string): string => {\n const trimmedName = name.trim();\n\n if (!trimmedName) {\n return translations.requiredField;\n }\n\n if (trimmedName.length < NAME_MIN_LENGTH) {\n return translations.nameMinLength.replace(\n '{min}',\n NAME_MIN_LENGTH.toString()\n );\n }\n\n if (!NAME_VALID_CHARS.test(trimmedName)) {\n return translations.nameInvalidCharacters;\n }\n\n return '';\n };\n\n const handleChange =\n (field: keyof RequisitionListFormValues) => (e: Event) => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n setValues((prevValues) => ({\n ...prevValues,\n [field]: target.value,\n }));\n };\n\n const handleBlur = (field: keyof RequisitionListFormValues) => () => {\n setTouched((prev) => ({ ...prev, [field]: true }));\n };\n\n const handleSubmit = async (e: Event) => {\n e.preventDefault();\n\n // Mark all fields as touched on submit attempt\n setTouched({ name: true, description: true });\n\n // Validate all fields\n const nameError = validateName(values.name);\n\n if (nameError || isSubmitting) return;\n\n setIsSubmitting(true);\n try {\n await onSubmit({\n name: values.name.trim(),\n description: values.description?.trim() ?? '',\n });\n } catch {\n setIsSubmitting(false);\n }\n };\n\n // Calculate error messages\n const nameError = touched.name ? validateName(values.name) : '';\n\n const title =\n mode === 'update' ? translations.updateTitle : translations.createTitle;\n\n return (\n <div {...props} className={classes(['requisition-list-form', className])}>\n <div className=\"requisition-list-form__title\">\n {title}\n {isSubmitting ? (\n <div\n className={classes([\n 'requisition-list-form_progress-spinner',\n className,\n ])}\n data-testid=\"requisition-list-form-progress-spinner\"\n >\n <ProgressSpinner stroke={'4'} size={'small'} />\n </div>\n ) : null}\n </div>\n\n {error ? (\n <InLineAlert\n type=\"error\"\n className=\"requisition-list-form__notification\"\n variant=\"secondary\"\n heading={error}\n data-testid=\"requisition-list-alert\"\n />\n ) : null}\n\n <form\n className={classes(['requisition-list-form__form', className])}\n onSubmit={handleSubmit}\n >\n <Field error={nameError} disabled={isSubmitting}>\n <Input\n id=\"requisition-list-form-name\"\n name=\"name\"\n type=\"text\"\n floatingLabel={translations.floatingLabel}\n placeholder={translations.placeholder}\n maxLength={NAME_MAX_LENGTH}\n value={values.name}\n onChange={handleChange('name')}\n onBlur={handleBlur('name')}\n />\n </Field>\n\n <Field disabled={isSubmitting}>\n <TextArea\n id=\"requisition-list-form-description\"\n name=\"description\"\n label={translations.label}\n placeholder={translations.label}\n maxLength={DESCRIPTION_MAX_LENGTH}\n value={values.description}\n onChange={handleChange('description')}\n onBlur={handleBlur('description')}\n />\n </Field>\n\n <div className=\"requisition-list-form__actions\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n onClick={onCancel}\n disabled={isSubmitting}\n data-testid=\"requisition-list-form-cancel\"\n >\n {translations.actionCancel}\n </Button>\n <Button\n type=\"submit\"\n disabled={isSubmitting}\n data-testid=\"requisition-list-form-save\"\n >\n {translations.actionSave}\n </Button>\n </div>\n </form>\n </div>\n );\n};\n"],"names":["DEFAULT_PAGE_SIZE","NAME_MIN_LENGTH","NAME_MAX_LENGTH","DESCRIPTION_MAX_LENGTH","NAME_VALID_CHARS","RequisitionListForm","className","mode","defaultValues","error","onSubmit","onCancel","props","values","setValues","useState","touched","setTouched","isSubmitting","setIsSubmitting","translations","useText","validateName","name","trimmedName","handleChange","field","e","target","prevValues","handleBlur","prev","handleSubmit","nameError","_a","title","jsxs","classes","jsx","ProgressSpinner","InLineAlert","Field","Input","TextArea","Button"],"mappings":"gWAoBO,MAAMA,EAAoB,GAKpBC,EAAkB,EAClBC,EAAkB,GAClBC,EAAyB,IAEzBC,EAAmB,+BCwBnBC,EAET,CAAC,CACH,UAAAC,EACA,KAAAC,EACA,cAAAC,EAAgB,CAAE,KAAM,GAAI,YAAa,EAAG,EAC5C,MAAAC,EAAQ,KACR,SAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAACC,EAAQC,CAAS,EACtBC,EAAoCP,CAAa,EAC7C,CAACQ,EAASC,CAAU,EAAIF,EAAS,CACrC,KAAM,EAAA,CACP,EACK,CAACG,EAAcC,CAAe,EAAIJ,EAAS,EAAK,EAEhDK,EAAeC,EAAQ,CAC3B,aAAc,mDACd,WAAY,iDACZ,cAAe,oDACf,cAAe,oDACf,sBAAuB,4DACvB,cAAe,oDACf,YAAa,kDACb,MAAO,4CACP,YAAa,kDACb,YAAa,iDAAA,CACd,EAGKC,EAAgBC,GAAyB,CACvC,MAAAC,EAAcD,EAAK,KAAK,EAE9B,OAAKC,EAIDA,EAAY,OAASvB,EAChBmB,EAAa,cAAc,QAChC,QACAnB,EAAgB,SAAS,CAC3B,EAGGG,EAAiB,KAAKoB,CAAW,E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,CAAC,EAC7D,SAAU0B,EAEV,SAAA,CAAAM,EAACG,EAAM,CAAA,MAAOR,EAAW,SAAUf,EACjC,SAAAoB,EAACI,EAAA,CACC,GAAG,6BACH,KAAK,OACL,KAAK,OACL,cAAetB,EAAa,cAC5B,YAAaA,EAAa,YAC1B,UAAWlB,EACX,MAAOW,EAAO,KACd,SAAUY,EAAa,MAAM,EAC7B,OAAQK,EAAW,MAAM,CAAA,CAAA,EAE7B,EAEAQ,EAACG,EAAM,CAAA,SAAUvB,EACf,SAAAoB,EAACK,EAAA,CACC,GAAG,oCACH,KAAK,cACL,MAAOvB,EAAa,MACpB,YAAaA,EAAa,MAC1B,UAAWjB,EACX,MAAOU,EAAO,YACd,SAAUY,EAAa,aAAa,EACpC,OAAQK,EAAW,aAAa,CAAA,CAAA,EAEpC,EAEAM,EAAC,MAAI,CAAA,UAAU,iCACb,SAAA,CAAAE,EAACM,EAAA,CACC,KAAK,SACL,QAAQ,YACR,QAASjC,EACT,SAAUO,EACV,cAAY,+BAEX,SAAaE,EAAA,YAAA,CAChB,EACAkB,EAACM,EAAA,CACC,KAAK,SACL,SAAU1B,EACV,cAAY,6BAEX,SAAaE,EAAA,UAAA,CAAA,CAChB,CACF,CAAA,CAAA,CAAA,CAAA,CACF,EACF,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListForm2.js","sources":["/@dropins/storefront-requisition-list/src/api/createRequisitionList/graphql/createRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/createRequisitionList/createRequisitionList.ts","/@dropins/storefront-requisition-list/src/hooks/useRequisitionListForm.ts","/@dropins/storefront-requisition-list/src/containers/RequisitionListForm/RequisitionListForm.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const CREATE_REQUISITION_LIST_MUTATION = `\n mutation CREATE_REQUISITION_LIST_MUTATION(\n $requisitionListName: String!,\n $requisitionListDescription: String,\n ) {\n createRequisitionList(\n input: {\n name: $requisitionListName\n description: $requisitionListDescription\n }\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { CREATE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/createRequisitionList/graphql/createRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const createRequisitionList = async (\n name: string,\n description?: string\n): Promise<RequisitionList | null> => {\n return fetchGraphQl(CREATE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListName: name,\n requisitionListDescription: description,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.createRequisitionList?.requisition_list) {\n return null;\n }\n\n const payload = transformRequisitionList(\n data.createRequisitionList.requisition_list\n );\n events.emit('requisitionList/data', payload);\n return payload;\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useState } from 'preact/hooks';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { createRequisitionList } from '@/requisitionList/api/createRequisitionList/createRequisitionList';\nimport { updateRequisitionList } from '@/requisitionList/api/updateRequisitionList/updateRequisitionList';\n\nexport type RequisitionListFormMode = 'create' | 'update';\nexport type RequisitionListFormValues = { name: string; description?: string };\n\ntype UseRequisitionListFormReturn = {\n error: string | null;\n submit: (\n values: RequisitionListFormValues\n ) => Promise<RequisitionList | null>;\n};\n\nexport function useRequisitionListForm(\n mode: RequisitionListFormMode,\n requisitionListUid?: string,\n onSuccess?: (rl: RequisitionList) => void,\n onError?: (msg: string) => void\n): UseRequisitionListFormReturn {\n const [error, setError] = useState<string | null>(null);\n\n const submit = async (\n values: RequisitionListFormValues\n ): Promise<RequisitionList | null> => {\n setError(null);\n try {\n const description = values.description ?? '';\n const result =\n mode === 'update' && requisitionListUid\n ? await updateRequisitionList(\n requisitionListUid,\n values.name,\n description\n )\n : await createRequisitionList(values.name, description);\n if (result) onSuccess?.(result);\n return result;\n } catch (e: any) {\n const msg = e?.message || 'Unexpected error';\n setError(msg);\n onError?.(msg);\n return null;\n }\n };\n\n return { error, submit };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { RequisitionListForm as RequisitionListFormComponent } from '@/requisitionList/components/RequisitionListForm/RequisitionListForm';\nimport {\n useRequisitionListForm,\n RequisitionListFormMode,\n RequisitionListFormValues,\n} from '@/requisitionList/hooks/useRequisitionListForm';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\n\nexport interface RequisitionListFormProps {\n mode: RequisitionListFormMode;\n requisitionListUid?: string;\n defaultValues?: RequisitionListFormValues;\n onSuccess?: (newList: RequisitionList) => void;\n onError?: (message: string) => void;\n onCancel: () => void;\n}\n\nexport const RequisitionListForm: Container<RequisitionListFormProps> = ({\n mode,\n requisitionListUid,\n defaultValues = { name: '', description: '' },\n onSuccess,\n onError,\n onCancel,\n}) => {\n const { error, submit } = useRequisitionListForm(\n mode,\n requisitionListUid,\n onSuccess,\n onError\n );\n\n const handleSubmit = async (values: RequisitionListFormValues) => {\n await submit(values);\n };\n\n return (\n <RequisitionListFormComponent\n mode={mode}\n defaultValues={defaultValues}\n error={error}\n onSubmit={handleSubmit}\n onCancel={onCancel}\n />\n );\n};\n"],"names":["CREATE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","createRequisitionList","name","description","fetchGraphQl","errors","data","handleFetchError","_a","payload","transformRequisitionList","events","useRequisitionListForm","mode","requisitionListUid","onSuccess","onError","error","setError","useState","values","result","updateRequisitionList","e","msg","RequisitionListForm","defaultValues","onCancel","submit","jsx","RequisitionListFormComponent"],"mappings":"6RAmBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB9CC,CAAyB;AAAA,ECXdC,EAAwB,MACnCC,EACAC,IAEOC,EAAaL,EAAkC,CACpD,UAAW,CACT,oBAAq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"RequisitionListForm2.js","sources":["/@dropins/storefront-requisition-list/src/api/createRequisitionList/graphql/createRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/createRequisitionList/createRequisitionList.ts","/@dropins/storefront-requisition-list/src/hooks/useRequisitionListForm.ts","/@dropins/storefront-requisition-list/src/containers/RequisitionListForm/RequisitionListForm.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const CREATE_REQUISITION_LIST_MUTATION = `\n mutation CREATE_REQUISITION_LIST_MUTATION(\n $requisitionListName: String!,\n $requisitionListDescription: String,\n ) {\n createRequisitionList(\n input: {\n name: $requisitionListName\n description: $requisitionListDescription\n }\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { CREATE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/createRequisitionList/graphql/createRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const createRequisitionList = async (\n name: string,\n description?: string\n): Promise<RequisitionList | null> => {\n return fetchGraphQl(CREATE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListName: name,\n requisitionListDescription: description,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.createRequisitionList?.requisition_list) {\n return null;\n }\n\n const payload = transformRequisitionList(\n data.createRequisitionList.requisition_list\n );\n events.emit('requisitionList/data', payload);\n return payload;\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useState } from 'preact/hooks';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { createRequisitionList } from '@/requisitionList/api/createRequisitionList/createRequisitionList';\nimport { updateRequisitionList } from '@/requisitionList/api/updateRequisitionList/updateRequisitionList';\n\nexport type RequisitionListFormMode = 'create' | 'update';\nexport type RequisitionListFormValues = { name: string; description?: string };\n\ntype UseRequisitionListFormReturn = {\n error: string | null;\n submit: (\n values: RequisitionListFormValues\n ) => Promise<RequisitionList | null>;\n};\n\nexport function useRequisitionListForm(\n mode: RequisitionListFormMode,\n requisitionListUid?: string,\n onSuccess?: (rl: RequisitionList) => void,\n onError?: (msg: string) => void\n): UseRequisitionListFormReturn {\n const [error, setError] = useState<string | null>(null);\n\n const submit = async (\n values: RequisitionListFormValues\n ): Promise<RequisitionList | null> => {\n setError(null);\n try {\n const description = values.description ?? '';\n const result =\n mode === 'update' && requisitionListUid\n ? await updateRequisitionList(\n requisitionListUid,\n values.name,\n description\n )\n : await createRequisitionList(values.name, description);\n if (result) onSuccess?.(result);\n return result;\n } catch (e: any) {\n const msg = e?.message || 'Unexpected error';\n setError(msg);\n onError?.(msg);\n return null;\n }\n };\n\n return { error, submit };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { RequisitionListForm as RequisitionListFormComponent } from '@/requisitionList/components/RequisitionListForm/RequisitionListForm';\nimport {\n useRequisitionListForm,\n RequisitionListFormMode,\n RequisitionListFormValues,\n} from '@/requisitionList/hooks/useRequisitionListForm';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\n\nexport interface RequisitionListFormProps {\n mode: RequisitionListFormMode;\n requisitionListUid?: string;\n defaultValues?: RequisitionListFormValues;\n onSuccess?: (newList: RequisitionList) => void;\n onError?: (message: string) => void;\n onCancel: () => void;\n}\n\nexport const RequisitionListForm: Container<RequisitionListFormProps> = ({\n mode,\n requisitionListUid,\n defaultValues = { name: '', description: '' },\n onSuccess,\n onError,\n onCancel,\n}) => {\n const { error, submit } = useRequisitionListForm(\n mode,\n requisitionListUid,\n onSuccess,\n onError\n );\n\n const handleSubmit = async (values: RequisitionListFormValues) => {\n await submit(values);\n };\n\n return (\n <RequisitionListFormComponent\n mode={mode}\n defaultValues={defaultValues}\n error={error}\n onSubmit={handleSubmit}\n onCancel={onCancel}\n />\n );\n};\n"],"names":["CREATE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","createRequisitionList","name","description","fetchGraphQl","errors","data","handleFetchError","_a","payload","transformRequisitionList","events","useRequisitionListForm","mode","requisitionListUid","onSuccess","onError","error","setError","useState","values","result","updateRequisitionList","e","msg","RequisitionListForm","defaultValues","onCancel","submit","jsx","RequisitionListFormComponent"],"mappings":"6RAmBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB9CC,CAAyB;AAAA,ECXdC,EAAwB,MACnCC,EACAC,IAEOC,EAAaL,EAAkC,CACpD,UAAW,CACT,oBAAqBG,EACrB,2BAA4BC,CAAA,CAE/B,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,OACxB,GAAAD,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,kBACzB,OAAA,KAGT,MAAMC,EAAUC,EACdJ,EAAK,sBAAsB,gBAC7B,EACO,OAAAK,EAAA,KAAK,uBAAwBF,CAAO,EACpCA,CAAA,CACR,ECbI,SAASG,EACdC,EACAC,EACAC,EACAC,EAC8B,CAC9B,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAwB,IAAI,EA0B/C,MAAA,CAAE,MAAAF,EAAO,OAxBD,MACbG,GACoC,CACpCF,EAAS,IAAI,EACT,GAAA,CACI,MAAAf,EAAciB,EAAO,aAAe,GACpCC,EACJR,IAAS,UAAYC,EACjB,MAAMQ,EACJR,EACAM,EAAO,KACPjB,CAEF,EAAA,MAAMF,EAAsBmB,EAAO,KAAMjB,CAAW,EACtD,OAAAkB,eAAoBA,IACjBA,QACAE,EAAQ,CACT,MAAAC,GAAMD,GAAA,YAAAA,EAAG,UAAW,mBAC1B,OAAAL,EAASM,CAAG,EACZR,GAAA,MAAAA,EAAUQ,GACH,IAAA,CAEX,CAEuB,CACzB,CC9BO,MAAMC,EAA2D,CAAC,CACvE,KAAAZ,EACA,mBAAAC,EACA,cAAAY,EAAgB,CAAE,KAAM,GAAI,YAAa,EAAG,EAC5C,UAAAX,EACA,QAAAC,EACA,SAAAW,CACF,IAAM,CACE,KAAA,CAAE,MAAAV,EAAO,OAAAW,CAAA,EAAWhB,EACxBC,EACAC,EACAC,EACAC,CACF,EAOE,OAAAa,EAACC,EAAA,CACC,KAAAjB,EACA,cAAAa,EACA,MAAAT,EACA,SATiB,MAAOG,GAAsC,CAChE,MAAMQ,EAAOR,CAAM,CACrB,EAQI,SAAAO,CAAA,CACF,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListHeader.js","sources":["/@dropins/storefront-requisition-list/src/components/RequisitionListHeader/RequisitionListHeader.tsx","/@dropins/storefront-requisition-list/src/containers/RequisitionListHeader/RequisitionListHeader.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@/requisitionList/components/RequisitionListHeader/RequisitionListHeader.css';\n\nexport interface RequisitionListHeaderProps\n extends HTMLAttributes<HTMLDivElement> {\n name: string;\n description?: string;\n backLink?: {\n url: string;\n label: string;\n onClick?: (e: Event) => void;\n };\n actions?: {\n onRename?: () => void;\n onDelete?: () => void;\n renameLabel?: string;\n deleteLabel?: string;\n };\n}\n\nexport const RequisitionListHeader: FunctionComponent<\n RequisitionListHeaderProps\n> = ({ name, description, backLink, actions, className, ...props }) => {\n return (\n <div {...props} className={`requisition-list-header ${className || ''}`}>\n {/* Back Link */}\n {backLink && (\n <div className=\"requisition-list-header__back\">\n <a\n href={backLink.url}\n className=\"requisition-list-header__back-link\"\n onClick={backLink.onClick}\n >\n <span className=\"requisition-list-header__back-arrow\">&lt;</span>\n {backLink.label}\n </a>\n </div>\n )}\n\n {/* Title and Actions Row */}\n <div className=\"requisition-list-header__main\">\n <div className=\"requisition-list-header__title-section\">\n <h1 className=\"requisition-list-header__title\">{name}</h1>\n {description && (\n <p className=\"requisition-list-header__description\">\n {description}\n </p>\n )}\n </div>\n\n {/* Action Links */}\n {actions && (actions.onRename || actions.onDelete) && (\n <div className=\"requisition-list-header__actions\">\n {actions.onRename && (\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n actions.onRename?.();\n }}\n className=\"requisition-list-header__action-link\"\n data-testid=\"rename-list-btn\"\n >\n {actions.renameLabel}\n </a>\n )}\n {actions.onDelete && (\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n actions.onDelete?.();\n }}\n className=\"requisition-list-header__action-link\"\n data-testid=\"delete-list-btn\"\n >\n {actions.deleteLabel}\n </a>\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useState, useCallback } from 'preact/hooks';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { RequisitionListHeader as RequisitionListHeaderComponent } from '@/requisitionList/components/RequisitionListHeader/RequisitionListHeader';\nimport { RequisitionListForm } from '@/requisitionList/components/RequisitionListForm/RequisitionListForm';\nimport { RequisitionListModal } from '@/requisitionList/components/RequisitionListModal/RequisitionListModal';\nimport { updateRequisitionList } from '@/requisitionList/api/updateRequisitionList';\nimport { deleteRequisitionList } from '@/requisitionList/api/deleteRequisitionList';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\n\nexport interface RequisitionListHeaderProps {\n requisitionList: RequisitionList;\n routeRequisitionListGrid?: () => string | void;\n onUpdate?: (updatedList: RequisitionList) => void | Promise<void>;\n onAlert?: (payload: {\n action: string;\n type: string;\n context: string;\n }) => void;\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>;\n}\n\nexport const RequisitionListHeader: Container<RequisitionListHeaderProps> = ({\n requisitionList,\n routeRequisitionListGrid,\n onUpdate,\n onAlert,\n enrichConfigurableProducts,\n}) => {\n const [showRenameModal, setShowRenameModal] = useState<boolean>(false);\n const [showDeleteModal, setShowDeleteModal] = useState<boolean>(false);\n const [isDeleting, setIsDeleting] = useState<boolean>(false);\n\n const translations = useText({\n actionBackToRequisitionLists: `RequisitionList.RequisitionListView.actionBackToRequisitionLists`,\n actionRename: `RequisitionList.RequisitionListView.actionRename`,\n actionDeleteList: `RequisitionList.RequisitionListView.actionDeleteList`,\n deleteListTitle: `RequisitionList.RequisitionListView.deleteListTitle`,\n deleteListMessage: `RequisitionList.RequisitionListView.deleteListMessage`,\n confirmAction: `RequisitionList.RequisitionListWrapper.confirmAction`,\n cancelAction: `RequisitionList.RequisitionListWrapper.cancelAction`,\n updateTitle: `RequisitionList.RequisitionListForm.updateTitle`,\n });\n\n const handleRename = useCallback(() => {\n setShowRenameModal(true);\n }, []);\n\n const handleRenameSubmit = useCallback(\n async (values: { name: string; description?: string }) => {\n try {\n const updatedList = await updateRequisitionList(\n requisitionList.uid,\n values.name,\n values.description,\n requisitionList.page_info?.page_size,\n requisitionList.page_info?.current_page,\n enrichConfigurableProducts\n );\n if (updatedList) {\n onUpdate?.(updatedList);\n setShowRenameModal(false);\n onAlert?.({\n action: 'update',\n type: 'success',\n context: 'requisitionList',\n });\n } else {\n onAlert?.({\n action: 'update',\n type: 'error',\n context: 'requisitionList',\n });\n }\n } catch (error) {\n onAlert?.({\n action: 'update',\n type: 'error',\n context: 'requisitionList',\n });\n }\n },\n [\n requisitionList.uid,\n requisitionList.page_info,\n onUpdate,\n onAlert,\n enrichConfigurableProducts,\n ]\n );\n\n const handleDeleteList = useCallback(() => {\n setShowDeleteModal(true);\n }, []);\n\n const handleDeleteConfirm = useCallback(async () => {\n setIsDeleting(true);\n try {\n const result = await deleteRequisitionList(requisitionList.uid);\n if (result) {\n const alertPayload = {\n action: 'delete',\n type: 'success',\n context: 'requisitionList',\n };\n\n // Store alert in localStorage before redirecting\n // This ensures the alert is shown after redirect to grid view\n try {\n localStorage.setItem(\n 'requisitionListPendingAlert',\n JSON.stringify(alertPayload)\n );\n } catch (e) {\n // Ignore localStorage errors (e.g., in private browsing mode)\n }\n\n if (routeRequisitionListGrid) {\n const url = routeRequisitionListGrid();\n // If a URL is returned, navigate to it\n if (url && typeof url === 'string') {\n window.location.href = url;\n }\n }\n } else {\n onAlert?.({\n action: 'delete',\n type: 'error',\n context: 'requisitionList',\n });\n }\n } catch (error) {\n onAlert?.({\n action: 'delete',\n type: 'error',\n context: 'requisitionList',\n });\n } finally {\n setIsDeleting(false);\n setShowDeleteModal(false);\n }\n }, [requisitionList.uid, routeRequisitionListGrid, onAlert]);\n\n return (\n <>\n <RequisitionListHeaderComponent\n name={requisitionList.name}\n description={requisitionList.description}\n backLink={\n routeRequisitionListGrid\n ? {\n url: '#',\n label: translations.actionBackToRequisitionLists,\n onClick: (e: Event) => {\n e.preventDefault();\n const result = routeRequisitionListGrid();\n // If a URL is returned, navigate to it\n if (result && typeof result === 'string') {\n window.location.href = result;\n }\n },\n }\n : undefined\n }\n actions={{\n onRename: handleRename,\n onDelete: handleDeleteList,\n renameLabel: translations.actionRename,\n deleteLabel: translations.actionDeleteList,\n }}\n />\n\n {/* Rename Modal */}\n {showRenameModal && (\n <RequisitionListModal\n isOpen={showRenameModal}\n isLoading={false}\n title={translations.updateTitle}\n modalContent={\n <RequisitionListForm\n mode=\"update\"\n defaultValues={{\n name: requisitionList.name,\n description: requisitionList.description || '',\n }}\n onSubmit={handleRenameSubmit}\n onCancel={() => setShowRenameModal(false)}\n />\n }\n handleModalOnClose={() => setShowRenameModal(false)}\n />\n )}\n\n {/* Delete Confirmation Modal */}\n {showDeleteModal && (\n <RequisitionListModal\n isOpen={showDeleteModal}\n isLoading={isDeleting}\n title={translations.deleteListTitle}\n modalContent={translations.deleteListMessage}\n confirmBtnCaption={translations.confirmAction}\n closeBtnCaption={translations.cancelAction}\n handleModalOnClose={() => setShowDeleteModal(false)}\n handleModalOnConfirm={handleDeleteConfirm}\n />\n )}\n </>\n );\n};\n"],"names":["RequisitionListHeader","name","description","backLink","actions","className","props","jsxs","jsx","e","_a","requisitionList","routeRequisitionListGrid","onUpdate","onAlert","enrichConfigurableProducts","showRenameModal","setShowRenameModal","useState","showDeleteModal","setShowDeleteModal","isDeleting","setIsDeleting","translations","useText","handleRename","useCallback","handleRenameSubmit","values","updatedList","updateRequisitionList","_b","handleDeleteList","handleDeleteConfirm","deleteRequisitionList","alertPayload","url","Fragment","RequisitionListHeaderComponent","result","RequisitionListModal","RequisitionListForm"],"mappings":"wYAsCO,MAAMA,EAET,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,SAAAC,EAAU,QAAAC,EAAS,UAAAC,EAAW,GAAGC,KAEvDC,EAAC,OAAK,GAAGD,EAAO,UAAW,2BAA2BD,GAAa,EAAE,GAElE,SAAA,CAAAF,GACCK,EAAC,MAAA,CAAI,UAAU,gCACb,SAAAD,EAAC,IAAA,CACC,KAAMJ,EAAS,IACf,UAAU,qCACV,QAASA,EAAS,QAElB,SAAA,CAAAK,EAAC,OAAA,CAAK,UAAU,sCAAsC,SAAA,IAAI,EACzDL,EAAS,KAAA,CAAA,CAAA,EAEd,EAIFI,EAAC,MAAA,CAA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AA7B,EAAC8B,EAAA,CACC,KAAM3B,EAAgB,KACtB,YAAaA,EAAgB,YAC7B,SACEC,EACI,CACE,IAAK,IACL,MAAOW,EAAa,6BACpB,QAAUd,GAAa,CACrBA,EAAE,eAAA,EACF,MAAM8B,EAAS3B,EAAA,EAEX2B,GAAU,OAAOA,GAAW,WAC9B,OAAO,SAAS,KAAOA,EAE3B,CAAA,EAEF,OAEN,QAAS,CACP,SAAUd,EACV,SAAUO,EACV,YAAaT,EAAa,aAC1B,YAAaA,EAAa,gBAAA,CAC5B,CAAA,EAIDP,GACCR,EAACgC,EAAA,CACC,OAAQxB,EACR,UAAW,GACX,MAAOO,EAAa,YACpB,aACEf,EAACiC,EAAA,CACC,KAAK,SACL,cAAe,CACb,KAAM9B,EAAgB,KACtB,YAAaA,EAAgB,aAAe,EAAA,EAE9C,SAAUgB,EACV,SAAU,IAAMV,EAAmB,EAAK,CAAA,CAAA,EAG5C,mBAAoB,IAAMA,EAAmB,EAAK,CAAA,CAAA,EAKrDE,GACCX,EAACgC,EAAA,CACC,OAAQrB,EACR,UAAWE,EACX,MAAOE,EAAa,gBACpB,aAAcA,EAAa,kBAC3B,kBAAmBA,EAAa,cAChC,gBAAiBA,EAAa,aAC9B,mBAAoB,IAAMH,EAAmB,EAAK,EAClD,qBAAsBa,CAAA,CAAA,CACxB,EAEJ,CAEJ"}
1
+ {"version":3,"file":"RequisitionListHeader.js","sources":["/@dropins/storefront-requisition-list/src/components/RequisitionListHeader/RequisitionListHeader.tsx","/@dropins/storefront-requisition-list/src/containers/RequisitionListHeader/RequisitionListHeader.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@/requisitionList/components/RequisitionListHeader/RequisitionListHeader.css';\n\nexport interface RequisitionListHeaderProps\n extends HTMLAttributes<HTMLDivElement> {\n name: string;\n description?: string;\n backLink?: {\n url: string;\n label: string;\n onClick?: (e: Event) => void;\n };\n actions?: {\n onRename?: () => void;\n onDelete?: () => void;\n renameLabel?: string;\n deleteLabel?: string;\n };\n}\n\nexport const RequisitionListHeader: FunctionComponent<\n RequisitionListHeaderProps\n> = ({ name, description, backLink, actions, className, ...props }) => {\n return (\n <div {...props} className={`requisition-list-header ${className || ''}`}>\n {/* Back Link */}\n {backLink && (\n <div className=\"requisition-list-header__back\">\n <a\n href={backLink.url}\n className=\"requisition-list-header__back-link\"\n onClick={backLink.onClick}\n >\n <span className=\"requisition-list-header__back-arrow\">&lt;</span>\n {backLink.label}\n </a>\n </div>\n )}\n\n {/* Title and Actions Row */}\n <div className=\"requisition-list-header__main\">\n <div className=\"requisition-list-header__title-section\">\n <h1 className=\"requisition-list-header__title\">{name}</h1>\n {description && (\n <p className=\"requisition-list-header__description\">\n {description}\n </p>\n )}\n </div>\n\n {/* Action Links */}\n {actions && (actions.onRename || actions.onDelete) && (\n <div className=\"requisition-list-header__actions\">\n {actions.onRename && (\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n actions.onRename?.();\n }}\n className=\"requisition-list-header__action-link\"\n data-testid=\"rename-list-btn\"\n >\n {actions.renameLabel}\n </a>\n )}\n {actions.onDelete && (\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n actions.onDelete?.();\n }}\n className=\"requisition-list-header__action-link\"\n data-testid=\"delete-list-btn\"\n >\n {actions.deleteLabel}\n </a>\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useState, useCallback } from 'preact/hooks';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { RequisitionListHeader as RequisitionListHeaderComponent } from '@/requisitionList/components/RequisitionListHeader/RequisitionListHeader';\nimport { RequisitionListForm } from '@/requisitionList/components/RequisitionListForm/RequisitionListForm';\nimport { RequisitionListModal } from '@/requisitionList/components/RequisitionListModal/RequisitionListModal';\nimport { updateRequisitionList } from '@/requisitionList/api/updateRequisitionList';\nimport { deleteRequisitionList } from '@/requisitionList/api/deleteRequisitionList';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\n\nexport interface RequisitionListHeaderProps {\n requisitionList: RequisitionList;\n routeRequisitionListGrid?: () => string | void;\n onUpdate?: (updatedList: RequisitionList) => void | Promise<void>;\n onAlert?: (payload: {\n action: string;\n type: string;\n context: string;\n }) => void;\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>;\n}\n\nexport const RequisitionListHeader: Container<RequisitionListHeaderProps> = ({\n requisitionList,\n routeRequisitionListGrid,\n onUpdate,\n onAlert,\n enrichConfigurableProducts,\n}) => {\n const [showRenameModal, setShowRenameModal] = useState<boolean>(false);\n const [showDeleteModal, setShowDeleteModal] = useState<boolean>(false);\n const [isDeleting, setIsDeleting] = useState<boolean>(false);\n\n const translations = useText({\n actionBackToRequisitionLists: `RequisitionList.RequisitionListView.actionBackToRequisitionLists`,\n actionRename: `RequisitionList.RequisitionListView.actionRename`,\n actionDeleteList: `RequisitionList.RequisitionListView.actionDeleteList`,\n deleteListTitle: `RequisitionList.RequisitionListView.deleteListTitle`,\n deleteListMessage: `RequisitionList.RequisitionListView.deleteListMessage`,\n confirmAction: `RequisitionList.RequisitionListWrapper.confirmAction`,\n cancelAction: `RequisitionList.RequisitionListWrapper.cancelAction`,\n updateTitle: `RequisitionList.RequisitionListForm.updateTitle`,\n });\n\n const handleRename = useCallback(() => {\n setShowRenameModal(true);\n }, []);\n\n const handleRenameSubmit = useCallback(\n async (values: { name: string; description?: string }) => {\n try {\n const updatedList = await updateRequisitionList(\n requisitionList.uid,\n values.name,\n values.description,\n requisitionList.page_info?.page_size,\n requisitionList.page_info?.current_page,\n enrichConfigurableProducts\n );\n if (updatedList) {\n onUpdate?.(updatedList);\n setShowRenameModal(false);\n onAlert?.({\n action: 'update',\n type: 'success',\n context: 'requisitionList',\n });\n } else {\n onAlert?.({\n action: 'update',\n type: 'error',\n context: 'requisitionList',\n });\n }\n } catch (error) {\n onAlert?.({\n action: 'update',\n type: 'error',\n context: 'requisitionList',\n });\n }\n },\n [\n requisitionList.uid,\n requisitionList.page_info,\n onUpdate,\n onAlert,\n enrichConfigurableProducts,\n ]\n );\n\n const handleDeleteList = useCallback(() => {\n setShowDeleteModal(true);\n }, []);\n\n const handleDeleteConfirm = useCallback(async () => {\n setIsDeleting(true);\n try {\n const result = await deleteRequisitionList(requisitionList.uid);\n if (result) {\n const alertPayload = {\n action: 'delete',\n type: 'success',\n context: 'requisitionList',\n };\n\n // Store alert in localStorage before redirecting\n // This ensures the alert is shown after redirect to grid view\n try {\n localStorage.setItem(\n 'requisitionListPendingAlert',\n JSON.stringify(alertPayload)\n );\n } catch (e) {\n // Ignore localStorage errors (e.g., in private browsing mode)\n }\n\n if (routeRequisitionListGrid) {\n const url = routeRequisitionListGrid();\n // If a URL is returned, navigate to it\n if (url && typeof url === 'string') {\n window.location.href = url;\n }\n }\n } else {\n onAlert?.({\n action: 'delete',\n type: 'error',\n context: 'requisitionList',\n });\n }\n } catch (error) {\n onAlert?.({\n action: 'delete',\n type: 'error',\n context: 'requisitionList',\n });\n } finally {\n setIsDeleting(false);\n setShowDeleteModal(false);\n }\n }, [requisitionList.uid, routeRequisitionListGrid, onAlert]);\n\n return (\n <>\n <RequisitionListHeaderComponent\n name={requisitionList.name}\n description={requisitionList.description}\n backLink={\n routeRequisitionListGrid\n ? {\n url: '#',\n label: translations.actionBackToRequisitionLists,\n onClick: (e: Event) => {\n e.preventDefault();\n const result = routeRequisitionListGrid();\n // If a URL is returned, navigate to it\n if (result && typeof result === 'string') {\n window.location.href = result;\n }\n },\n }\n : undefined\n }\n actions={{\n onRename: handleRename,\n onDelete: handleDeleteList,\n renameLabel: translations.actionRename,\n deleteLabel: translations.actionDeleteList,\n }}\n />\n\n {/* Rename Modal */}\n {showRenameModal && (\n <RequisitionListModal\n isOpen={showRenameModal}\n isLoading={false}\n title={translations.updateTitle}\n modalContent={\n <RequisitionListForm\n mode=\"update\"\n defaultValues={{\n name: requisitionList.name,\n description: requisitionList.description || '',\n }}\n onSubmit={handleRenameSubmit}\n onCancel={() => setShowRenameModal(false)}\n />\n }\n handleModalOnClose={() => setShowRenameModal(false)}\n />\n )}\n\n {/* Delete Confirmation Modal */}\n {showDeleteModal && (\n <RequisitionListModal\n isOpen={showDeleteModal}\n isLoading={isDeleting}\n title={translations.deleteListTitle}\n modalContent={translations.deleteListMessage}\n confirmBtnCaption={translations.confirmAction}\n closeBtnCaption={translations.cancelAction}\n handleModalOnClose={() => setShowDeleteModal(false)}\n handleModalOnConfirm={handleDeleteConfirm}\n />\n )}\n </>\n );\n};\n"],"names":["RequisitionListHeader","name","description","backLink","actions","className","props","jsxs","jsx","e","_a","requisitionList","routeRequisitionListGrid","onUpdate","onAlert","enrichConfigurableProducts","showRenameModal","setShowRenameModal","useState","showDeleteModal","setShowDeleteModal","isDeleting","setIsDeleting","translations","useText","handleRename","useCallback","handleRenameSubmit","values","updatedList","updateRequisitionList","_b","handleDeleteList","handleDeleteConfirm","deleteRequisitionList","alertPayload","url","Fragment","RequisitionListHeaderComponent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,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListModal.js","sources":["/@dropins/storefront-requisition-list/src/components/RequisitionListModal/RequisitionListModal.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent, VNode } from 'preact';\nimport {\n Modal,\n Button,\n ProgressSpinner,\n} from '@adobe-commerce/elsie/components';\nimport '@/requisitionList/components/RequisitionListModal/RequisitionListModal.css';\n\nexport interface RequisitionListModalProps {\n isOpen: boolean;\n isLoading: boolean;\n title: VNode | string;\n modalContent: VNode | string;\n closeBtnCaption?: string;\n confirmBtnCaption?: string;\n handleModalOnClose?: () => void;\n handleModalOnConfirm?: () => void;\n}\n\nexport const RequisitionListModal: FunctionComponent<\n RequisitionListModalProps\n> = ({\n isOpen,\n isLoading,\n title,\n modalContent,\n closeBtnCaption,\n confirmBtnCaption,\n handleModalOnClose,\n handleModalOnConfirm,\n}) => {\n if (!isOpen) return null;\n\n return (\n <Modal\n className=\"requisition-list-modal--overlay\"\n data-testid=\"requisition-list-modal\"\n size={'medium'}\n centered={false}\n title={title}\n onClose={handleModalOnClose}\n backgroundDim={true}\n clickToDismiss={true}\n escapeToDismiss={true}\n role=\"dialog\"\n aria-label={title}\n >\n <div className=\"requisition-list-modal\">\n {isLoading ? (\n <div\n className=\"requisition-list-modal__spinner\"\n data-testid=\"progress-spinner\"\n >\n <ProgressSpinner stroke={'4'} size={'large'} />\n </div>\n ) : null}\n <p>{modalContent}</p>\n <div className=\"requisition-list-modal__buttons\">\n {handleModalOnClose && closeBtnCaption && (\n <Button\n data-testid=\"rl-modal-close-button\"\n type={'button'}\n onClick={handleModalOnClose}\n variant=\"secondary\"\n disabled={isLoading}\n >\n {closeBtnCaption}\n </Button>\n )}\n {handleModalOnConfirm && confirmBtnCaption && (\n <Button\n data-testid=\"rl-modal-confirm-button\"\n type={'button'}\n onClick={handleModalOnConfirm}\n disabled={isLoading}\n >\n {confirmBtnCaption}\n </Button>\n )}\n </div>\n </div>\n </Modal>\n );\n};\n"],"names":["RequisitionListModal","isOpen","isLoading","title","modalContent","closeBtnCaption","confirmBtnCaption","handleModalOnClose","handleModalOnConfirm","jsx","Modal","jsxs","ProgressSpinner","Button"],"mappings":"2JAmCO,MAAMA,EAET,CAAC,CACH,OAAAC,EACA,UAAAC,EACA,MAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,mBAAAC,EACA,qBAAAC,CACF,IACOP,EAGHQ,EAACC,EAAA,CACC,UAAU,kCACV,cAAY,yBACZ,KAAM,SACN,SAAU,GACV,MAAAP,EACA,QAASI,EACT,cAAe,GACf,eAAgB,GAChB,gBAAiB,GACjB,KAAK,SACL,aAAYJ,EAEZ,SAAAQ,EAAC,MAAA,CAAI,UAAU,yBACZ,SAAA,CAAAT,EACCO,EAAC,MAAA,CACC,UAAU,kCACV,cAAY,mBAEZ,SAAAA,EAACG,EAAA,CAAgB,OAAQ,IAAK,KAAM,OAAA,CAAS,CAAA,CAAA,EAE7C,KACJH,EAAC,KAAG,SAAAL,CAAA,CAAa,EACjBO,EAAC,MAAA,CAAI,UAAU,kCACZ,SAAA,CAAAJ,GAAsBF,GACrBI,EAACI,EAAA,CACC,cAAY,wBACZ,KAAM,SACN,QAASN,EACT,QAAQ,YACR,SAAUL,EAET,SAAAG,CAAA,CAAA,EAGJG,GAAwBF,GACvBG,EAACI,EAAA,CACC,cAAY,0BACZ,KAAM,SACN,QAASL,EACT,SAAUN,EAET,SAAAI,CAAA,CAAA,CACH,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,EAjDgB"}
1
+ {"version":3,"file":"RequisitionListModal.js","sources":["/@dropins/storefront-requisition-list/src/components/RequisitionListModal/RequisitionListModal.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent, VNode } from 'preact';\nimport {\n Modal,\n Button,\n ProgressSpinner,\n} from '@adobe-commerce/elsie/components';\nimport '@/requisitionList/components/RequisitionListModal/RequisitionListModal.css';\n\nexport interface RequisitionListModalProps {\n isOpen: boolean;\n isLoading: boolean;\n title: VNode | string;\n modalContent: VNode | string;\n closeBtnCaption?: string;\n confirmBtnCaption?: string;\n handleModalOnClose?: () => void;\n handleModalOnConfirm?: () => void;\n}\n\nexport const RequisitionListModal: FunctionComponent<\n RequisitionListModalProps\n> = ({\n isOpen,\n isLoading,\n title,\n modalContent,\n closeBtnCaption,\n confirmBtnCaption,\n handleModalOnClose,\n handleModalOnConfirm,\n}) => {\n if (!isOpen) return null;\n\n return (\n <Modal\n className=\"requisition-list-modal--overlay\"\n data-testid=\"requisition-list-modal\"\n size={'medium'}\n centered={false}\n title={title}\n onClose={handleModalOnClose}\n backgroundDim={true}\n clickToDismiss={true}\n escapeToDismiss={true}\n role=\"dialog\"\n aria-label={title}\n >\n <div className=\"requisition-list-modal\">\n {isLoading ? (\n <div\n className=\"requisition-list-modal__spinner\"\n data-testid=\"progress-spinner\"\n >\n <ProgressSpinner stroke={'4'} size={'large'} />\n </div>\n ) : null}\n <p>{modalContent}</p>\n <div className=\"requisition-list-modal__buttons\">\n {handleModalOnClose && closeBtnCaption && (\n <Button\n data-testid=\"rl-modal-close-button\"\n type={'button'}\n onClick={handleModalOnClose}\n variant=\"secondary\"\n disabled={isLoading}\n >\n {closeBtnCaption}\n </Button>\n )}\n {handleModalOnConfirm && confirmBtnCaption && (\n <Button\n data-testid=\"rl-modal-confirm-button\"\n type={'button'}\n onClick={handleModalOnConfirm}\n disabled={isLoading}\n >\n {confirmBtnCaption}\n </Button>\n )}\n </div>\n </div>\n </Modal>\n );\n};\n"],"names":["RequisitionListModal","isOpen","isLoading","title","modalContent","closeBtnCaption","confirmBtnCaption","handleModalOnClose","handleModalOnConfirm","jsx","Modal","jsxs","ProgressSpinner","Button"],"mappings":"2JAmCO,MAAMA,EAET,CAAC,CACH,OAAAC,EACA,UAAAC,EACA,MAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,mBAAAC,EACA,qBAAAC,CACF,IACOP,EAGHQ,EAACC,EAAA,CACC,UAAU,kCACV,cAAY,yBACZ,KAAM,SACN,SAAU,GACV,MAAAP,EACA,QAASI,EACT,cAAe,GACf,eAAgB,GAChB,gBAAiB,GACjB,KAAK,SACL,aAAYJ,EAEZ,SAAAQ,EAAC,MAAI,CAAA,UAAU,yBACZ,SAAA,CACCT,EAAAO,EAAC,MAAA,CACC,UAAU,kCACV,cAAY,mBAEZ,SAACA,EAAAG,EAAA,CAAgB,OAAQ,IAAK,KAAM,OAAS,CAAA,CAAA,CAAA,EAE7C,KACJH,EAAC,KAAG,SAAaL,CAAA,CAAA,EACjBO,EAAC,MAAI,CAAA,UAAU,kCACZ,SAAA,CAAAJ,GAAsBF,GACrBI,EAACI,EAAA,CACC,cAAY,wBACZ,KAAM,SACN,QAASN,EACT,QAAQ,YACR,SAAUL,EAET,SAAAG,CAAA,CACH,EAEDG,GAAwBF,GACvBG,EAACI,EAAA,CACC,cAAY,0BACZ,KAAM,SACN,QAASL,EACT,SAAUN,EAET,SAAAI,CAAA,CAAA,CACH,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CACF,EAlDkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListView.js","sources":["/@dropins/storefront-requisition-list/src/hooks/useRequisitionListEnabled.ts","../../node_modules/@adobe-commerce/elsie/src/icons/List.svg","/@dropins/storefront-requisition-list/src/hooks/useRequisitionListAlert.tsx","/@dropins/storefront-requisition-list/src/components/EmptyList/EmptyList.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useEffect, useState } from 'preact/compat';\nimport { state } from '@/requisitionList/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const useRequisitionListEnabled = () => {\n const [isEnabled, setIsEnabled] = useState<boolean>(\n state.config?.is_requisition_list_active === '1' &&\n state.config?.company_enabled === true\n );\n\n useEffect(() => {\n // Listen for requisition list initialization via event bus\n const configListener = events.on('requisitionList/initialized', () => {\n setIsEnabled(\n state.config?.is_requisition_list_active === '1' &&\n state.config?.company_enabled === true\n );\n });\n\n return () => configListener?.off();\n }, []);\n\n return { isEnabled };\n};\n","import * as React from \"react\";\nconst SvgList = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { x: 4.89282, y: 2.75, width: 14.2143, height: 18.5, rx: 2.25, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 7.67871, x2: 16.2857, y2: 7.67871, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 11.9644, x2: 16.2857, y2: 11.9644, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 16.25, x2: 16.2857, y2: 16.25, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 7.71429, r: 0.714286, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 11.9999, r: 0.714286, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 16.2856, r: 0.714286, fill: \"currentColor\" }));\nexport default SvgList;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useCallback, useMemo, useState } from 'preact/compat';\nimport { RequisitionListActionPayload } from 'adobe-commerce/event-bus';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface Alert {\n type: string;\n description: string;\n action?: string;\n sku?: string;\n}\n\nexport function useRequisitionListAlert(\n translationsOverride?: Record<string, string>\n) {\n const [alert, setAlert] = useState<Alert | null>(null);\n\n const defaultTranslations = useText({\n errorCreate: `RequisitionList.RequisitionListAlert.errorCreate`,\n successCreate: `RequisitionList.RequisitionListAlert.successCreate`,\n errorDeleteItem: `RequisitionList.RequisitionListAlert.errorDeleteItem`,\n successDeleteItem: `RequisitionList.RequisitionListAlert.successDeleteItem`,\n errorDeleteReqList: `RequisitionList.RequisitionListAlert.errorDeleteReqList`,\n successDeleteReqList: `RequisitionList.RequisitionListAlert.successDeleteReqList`,\n errorAddToCart: `RequisitionList.RequisitionListAlert.errorAddToCart`,\n successAddToCart: `RequisitionList.RequisitionListAlert.successAddToCart`,\n errorUpdateQuantity: `RequisitionList.RequisitionListAlert.errorUpdateQuantity`,\n successUpdateQuantity: `RequisitionList.RequisitionListAlert.successUpdateQuantity`,\n errorUpdate: `RequisitionList.RequisitionListAlert.errorUpdate`,\n successUpdate: `RequisitionList.RequisitionListAlert.successUpdate`,\n errorMove: `RequisitionList.RequisitionListAlert.errorMove`,\n successMove: `RequisitionList.RequisitionListAlert.successMove`,\n errorAddToRequisitionList: `RequisitionList.RequisitionListAlert.errorAddToRequisitionList`,\n successAddToRequisitionList: `RequisitionList.RequisitionListAlert.successAddToRequisitionList`,\n });\n\n const translations = useMemo(\n () => ({\n ...defaultTranslations,\n ...translationsOverride,\n }),\n [defaultTranslations, translationsOverride]\n );\n\n const messages = useMemo(\n () => ({\n create: {\n // adding context for consistency, although 'create' action only applies to requisition lists\n requisitionList: {\n success: translations.successCreate,\n error: translations.errorCreate,\n },\n },\n add: {\n product: {\n success: translations.successAddToRequisitionList,\n error: translations.errorAddToRequisitionList,\n },\n },\n update: {\n product: {\n success: translations.successUpdateQuantity,\n error: translations.errorUpdateQuantity,\n },\n requisitionList: {\n success: translations.successUpdate,\n error: translations.errorUpdate,\n },\n },\n delete: {\n product: {\n success: translations.successDeleteItem,\n error: translations.errorDeleteItem,\n },\n requisitionList: {\n success: translations.successDeleteReqList,\n error: translations.errorDeleteReqList,\n },\n },\n move: {\n // adding context for consistency, although 'move' action only applies to products\n product: {\n success: translations.successMove,\n error: translations.errorMove,\n },\n },\n }),\n [translations]\n );\n\n const handleRequisitionListAlert = useCallback(\n (payload: RequisitionListActionPayload) => {\n const { type, action, context, skus, message } = payload;\n // Use custom message if provided, otherwise use predefined message\n const description =\n message && message.length > 0\n ? message.join('. ')\n : messages[action][context][type];\n setAlert({\n type,\n description,\n sku: skus?.[0],\n });\n\n const timer = setTimeout(() => {\n setAlert(null);\n }, 5000);\n\n return () => clearTimeout(timer);\n },\n [messages]\n );\n\n return { alert, setAlert, handleRequisitionListAlert };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { List } from '@adobe-commerce/elsie/icons';\nimport '@/requisitionList/components/EmptyList/EmptyList.css';\n\nexport interface EmptyListProps {\n className?: string;\n textContent?: string | null;\n}\n\nexport const EmptyList: FunctionComponent<EmptyListProps> = ({\n className,\n textContent,\n ...props\n}) => {\n return (\n <div\n className={classes(['empty-list', className])}\n data-testid=\"empty-list\"\n {...props}\n >\n <Icon source={List} size={'64'} stroke={'2'} />\n {textContent && <h4>{textContent}</h4>}\n </div>\n );\n};\n"],"names":["useRequisitionListEnabled","isEnabled","setIsEnabled","useState","_a","state","_b","useEffect","configListener","events","SvgList","props","React","useRequisitionListAlert","translationsOverride","alert","setAlert","defaultTranslations","useText","translations","useMemo","messages","handleRequisitionListAlert","useCallback","payload","type","action","context","skus","message","description","timer","EmptyList","className","textContent","jsxs","classes","jsx","Icon","List"],"mappings":"wcAqBO,MAAMA,EAA4B,IAAM,SAC7C,KAAM,CAACC,EAAWC,CAAY,EAAIC,IAChCC,EAAAC,EAAM,SAAN,YAAAD,EAAc,8BAA+B,OAC3CE,EAAAD,EAAM,SAAN,YAAAC,EAAc,mBAAoB,EAAA,EAGtC,OAAAC,EAAU,IAAM,CAEd,MAAMC,EAAiBC,EAAO,GAAG,8BAA+B,IAAM,SACpEP,IACEE,EAAAC,EAAM,SAAN,YAAAD,EAAc,8BA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EAAO,SAAAC,EAAU,2BAAAM,CAAA,CAC5B,CCvGO,MAAMU,EAA+C,CAAC,CAC3D,UAAAC,EACA,YAAAC,EACA,GAAGvB,CACL,IAEIwB,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,aAAcH,CAAS,CAAC,EAC5C,cAAY,aACX,GAAGtB,EAEJ,SAAA,CAAA0B,EAACC,GAAK,OAAQC,EAAM,KAAM,KAAM,OAAQ,IAAK,EAC5CL,GAAeG,EAAC,KAAA,CAAI,SAAAH,CAAA,CAAY,CAAA,CAAA,CAAA","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"RequisitionListView.js","sources":["/@dropins/storefront-requisition-list/src/hooks/useRequisitionListEnabled.ts","../../node_modules/@adobe-commerce/elsie/src/icons/List.svg","/@dropins/storefront-requisition-list/src/hooks/useRequisitionListAlert.tsx","/@dropins/storefront-requisition-list/src/components/EmptyList/EmptyList.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useEffect, useState } from 'preact/compat';\nimport { state } from '@/requisitionList/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const useRequisitionListEnabled = () => {\n const [isEnabled, setIsEnabled] = useState<boolean>(\n state.config?.is_requisition_list_active === '1' &&\n state.config?.company_enabled === true\n );\n\n useEffect(() => {\n // Listen for requisition list initialization via event bus\n const configListener = events.on('requisitionList/initialized', () => {\n setIsEnabled(\n state.config?.is_requisition_list_active === '1' &&\n state.config?.company_enabled === true\n );\n });\n\n return () => configListener?.off();\n }, []);\n\n return { isEnabled };\n};\n","import * as React from \"react\";\nconst SvgList = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { x: 4.89282, y: 2.75, width: 14.2143, height: 18.5, rx: 2.25, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 7.67871, x2: 16.2857, y2: 7.67871, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 11.9644, x2: 16.2857, y2: 11.9644, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"line\", { x1: 9.85718, y1: 16.25, x2: 16.2857, y2: 16.25, stroke: \"currentColor\", strokeWidth: 1 }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 7.71429, r: 0.714286, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 11.9999, r: 0.714286, fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"circle\", { cx: 7.71429, cy: 16.2856, r: 0.714286, fill: \"currentColor\" }));\nexport default SvgList;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { useCallback, useMemo, useState } from 'preact/compat';\nimport { RequisitionListActionPayload } from 'adobe-commerce/event-bus';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface Alert {\n type: string;\n description: string;\n action?: string;\n sku?: string;\n}\n\nexport function useRequisitionListAlert(\n translationsOverride?: Record<string, string>\n) {\n const [alert, setAlert] = useState<Alert | null>(null);\n\n const defaultTranslations = useText({\n errorCreate: `RequisitionList.RequisitionListAlert.errorCreate`,\n successCreate: `RequisitionList.RequisitionListAlert.successCreate`,\n errorDeleteItem: `RequisitionList.RequisitionListAlert.errorDeleteItem`,\n successDeleteItem: `RequisitionList.RequisitionListAlert.successDeleteItem`,\n errorDeleteReqList: `RequisitionList.RequisitionListAlert.errorDeleteReqList`,\n successDeleteReqList: `RequisitionList.RequisitionListAlert.successDeleteReqList`,\n errorAddToCart: `RequisitionList.RequisitionListAlert.errorAddToCart`,\n successAddToCart: `RequisitionList.RequisitionListAlert.successAddToCart`,\n errorUpdateQuantity: `RequisitionList.RequisitionListAlert.errorUpdateQuantity`,\n successUpdateQuantity: `RequisitionList.RequisitionListAlert.successUpdateQuantity`,\n errorUpdate: `RequisitionList.RequisitionListAlert.errorUpdate`,\n successUpdate: `RequisitionList.RequisitionListAlert.successUpdate`,\n errorMove: `RequisitionList.RequisitionListAlert.errorMove`,\n successMove: `RequisitionList.RequisitionListAlert.successMove`,\n errorAddToRequisitionList: `RequisitionList.RequisitionListAlert.errorAddToRequisitionList`,\n successAddToRequisitionList: `RequisitionList.RequisitionListAlert.successAddToRequisitionList`,\n });\n\n const translations = useMemo(\n () => ({\n ...defaultTranslations,\n ...translationsOverride,\n }),\n [defaultTranslations, translationsOverride]\n );\n\n const messages = useMemo(\n () => ({\n create: {\n // adding context for consistency, although 'create' action only applies to requisition lists\n requisitionList: {\n success: translations.successCreate,\n error: translations.errorCreate,\n },\n },\n add: {\n product: {\n success: translations.successAddToRequisitionList,\n error: translations.errorAddToRequisitionList,\n },\n },\n update: {\n product: {\n success: translations.successUpdateQuantity,\n error: translations.errorUpdateQuantity,\n },\n requisitionList: {\n success: translations.successUpdate,\n error: translations.errorUpdate,\n },\n },\n delete: {\n product: {\n success: translations.successDeleteItem,\n error: translations.errorDeleteItem,\n },\n requisitionList: {\n success: translations.successDeleteReqList,\n error: translations.errorDeleteReqList,\n },\n },\n move: {\n // adding context for consistency, although 'move' action only applies to products\n product: {\n success: translations.successMove,\n error: translations.errorMove,\n },\n },\n }),\n [translations]\n );\n\n const handleRequisitionListAlert = useCallback(\n (payload: RequisitionListActionPayload) => {\n const { type, action, context, skus, message } = payload;\n // Use custom message if provided, otherwise use predefined message\n const description =\n message && message.length > 0\n ? message.join('. ')\n : messages[action][context][type];\n setAlert({\n type,\n description,\n sku: skus?.[0],\n });\n\n const timer = setTimeout(() => {\n setAlert(null);\n }, 5000);\n\n return () => clearTimeout(timer);\n },\n [messages]\n );\n\n return { alert, setAlert, handleRequisitionListAlert };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { FunctionComponent } from 'preact';\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { List } from '@adobe-commerce/elsie/icons';\nimport '@/requisitionList/components/EmptyList/EmptyList.css';\n\nexport interface EmptyListProps {\n className?: string;\n textContent?: string | null;\n}\n\nexport const EmptyList: FunctionComponent<EmptyListProps> = ({\n className,\n textContent,\n ...props\n}) => {\n return (\n <div\n className={classes(['empty-list', className])}\n data-testid=\"empty-list\"\n {...props}\n >\n <Icon source={List} size={'64'} stroke={'2'} />\n {textContent && <h4>{textContent}</h4>}\n </div>\n );\n};\n"],"names":["useRequisitionListEnabled","isEnabled","setIsEnabled","useState","_a","state","_b","useEffect","configListener","events","SvgList","props","React","useRequisitionListAlert","translationsOverride","alert","setAlert","defaultTranslations","useText","translations","useMemo","messages","handleRequisitionListAlert","useCallback","payload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L,EAE3CM,EACJD,GAAWA,EAAQ,OAAS,EACxBA,EAAQ,KAAK,IAAI,EACjBR,EAASK,CAAM,EAAEC,CAAO,EAAEF,CAAI,EAC3BT,EAAA,CACP,KAAAS,EACA,YAAAK,EACA,IAAKF,GAAA,YAAAA,EAAO,EAAC,CACd,EAEK,MAAAG,EAAQ,WAAW,IAAM,CAC7Bf,EAAS,IAAI,GACZ,GAAI,EAEA,MAAA,IAAM,aAAae,CAAK,CACjC,EACA,CAACV,CAAQ,CACX,EAEO,MAAA,CAAE,MAAAN,EAAO,SAAAC,EAAU,2BAAAM,CAA2B,CACvD,CCvGO,MAAMU,EAA+C,CAAC,CAC3D,UAAAC,EACA,YAAAC,EACA,GAAGvB,CACL,IAEIwB,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,aAAcH,CAAS,CAAC,EAC5C,cAAY,aACX,GAAGtB,EAEJ,SAAA,CAAA0B,EAACC,GAAK,OAAQC,EAAM,KAAM,KAAM,OAAQ,IAAK,EAC5CL,GAAgBG,EAAA,KAAA,CAAI,SAAYH,CAAA,CAAA,CAAA,CAAA,CACnC","x_google_ignoreList":[1]}
@@ -1 +1 @@
1
- {"version":3,"file":"addRequisitionListItemsToCart.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionList/graphql/getRequisitionList.ts","/@dropins/storefront-requisition-list/src/lib/validate-uid.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionList/getRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionListItems/graphql/updateRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionListItems/updateRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionListItems/graphql/deleteRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionListItems/deleteRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart.ts","/@dropins/storefront-requisition-list/src/api/addRequisitionListItemsToCart/addRequisitionListItemsToCart.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const GET_REQUISITION_LIST_QUERY = `\n query GET_REQUISITION_LIST_QUERY(\n $requisitionListUid: String,\n $currentPage: Int = 1,\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists (\n filter: {\n uids: {\n eq: $requisitionListUid\n }\n }\n ){\n items {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n }\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Validates if a string is a valid base64-encoded UID\n * Adobe Commerce/Magento UIDs are base64 encoded\n *\n * @param uid - The UID to validate\n * @returns true if the UID appears to be valid base64 encoding\n */\nexport function isValidBase64Uid(uid: string | undefined | null): boolean {\n if (!uid || typeof uid !== 'string' || uid.length < 2) {\n return false;\n }\n\n // Base64 pattern: alphanumeric, +, /\n // Valid base64 can end with 0, 1, or 2 '=' padding characters\n // But the length must be a multiple of 4 when padded\n const base64Pattern = /^[A-Za-z0-9+/]+(==|=)?$/;\n\n if (!base64Pattern.test(uid)) {\n return false;\n }\n\n // Check that the total length is a multiple of 4 (valid base64 requirement)\n return uid.length % 4 === 0;\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LIST_QUERY } from '@/requisitionList/api/getRequisitionList/graphql/getRequisitionList';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { isValidBase64Uid } from '@/requisitionList/lib/validate-uid';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionList = async (\n requisitionListID: string,\n currentPage?: number,\n pageSize?: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n // Validate UID format before making API call\n if (!isValidBase64Uid(requisitionListID)) {\n console.error('Invalid requisition list UID format:', requisitionListID);\n return null;\n }\n\n const { errors, data } = await fetchGraphQl(GET_REQUISITION_LIST_QUERY, {\n variables: {\n requisitionListUid: requisitionListID,\n currentPage,\n pageSize,\n },\n });\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists?.items?.[0]) {\n return null;\n }\n\n const rawList = data.customer.requisition_lists.items[0];\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const UPDATE_REQUISITION_LIST_ITEMS_MUTATION = `\n mutation UPDATE_REQUISITION_LIST_ITEMS_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItems: [UpdateRequisitionListItemsInput!]!,\n $pageSize: Int = 20,\n $currentPage: Int = 1\n ) {\n updateRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItems: $requisitionListItems\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { UPDATE_REQUISITION_LIST_ITEMS_MUTATION } from '@/requisitionList/api/updateRequisitionListItems/graphql/updateRequisitionListItems';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const updateRequisitionListItems = async (\n requisitionListUid: string,\n requisitionListItems: Array<UpdateRequisitionListItemsInput>,\n pageSize: number,\n currentPage: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n const { errors, data } = await fetchGraphQl(\n UPDATE_REQUISITION_LIST_ITEMS_MUTATION,\n {\n variables: {\n requisitionListUid,\n requisitionListItems,\n pageSize,\n currentPage,\n },\n }\n );\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.updateRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const rawList = data.updateRequisitionListItems.requisition_list;\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n\ntype UpdateRequisitionListItemsInput = {\n item_id: string;\n quantity?: number;\n entered_options?: Array<{ uid: string; value: string }>;\n selected_options?: Array<string>;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_ITEMS_MUTATION = `\n mutation DELETE_REQUISITION_LIST_ITEMS_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItemUids: [ID!]!,\n $pageSize: Int = 20,\n $currentPage: Int = 1\n ) {\n deleteRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { DELETE_REQUISITION_LIST_ITEMS_MUTATION } from '@/requisitionList/api/deleteRequisitionListItems/graphql/deleteRequisitionListItems';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionListItems = async (\n requisitionListUid: string,\n items: Array<string>,\n pageSize: number,\n currentPage: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n const { errors, data } = await fetchGraphQl(\n DELETE_REQUISITION_LIST_ITEMS_MUTATION,\n {\n variables: {\n requisitionListUid,\n requisitionListItemUids: items,\n pageSize,\n currentPage,\n },\n }\n );\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const rawList = data.deleteRequisitionListItems.requisition_list;\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION = `\n mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItemUids: [ID!]!\n ) {\n addRequisitionListItemsToCart(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n status\n add_requisition_list_items_to_cart_user_errors {\n message\n type\n }\n cart {\n id\n itemsV2 {\n items {\n uid\n quantity\n is_available\n }\n total_count\n }\n email\n total_quantity\n is_virtual\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION } from '@/requisitionList/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart';\n\nexport interface AddToCartError {\n type: string;\n message: string;\n}\n\nexport const addRequisitionListItemsToCart = async (\n requisitionListUid: string,\n requisitionListItemUids: Array<string>\n): Promise<Array<AddToCartError> | null> => {\n return fetchGraphQl(ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItemUids,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (\n data.addRequisitionListItemsToCart\n .add_requisition_list_items_to_cart_user_errors?.length\n ) {\n return data.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors.map(\n (e: any) => ({\n type: e.type,\n message: e.message || '',\n })\n );\n }\n return null;\n });\n};\n"],"names":["GET_REQUISITION_LIST_QUERY","REQUISITION_LIST_ITEMS_FRAGMENT","REQUISITION_LIST_FRAGMENT","isValidBase64Uid","uid","getRequisitionList","requisitionListID","currentPage","pageSize","enrichConfigurableProducts","errors","data","fetchGraphQl","handleFetchError","_c","_b","_a","rawList","payload","transformRequisitionList","_d","events","UPDATE_REQUISITION_LIST_ITEMS_MUTATION","updateRequisitionListItems","requisitionListUid","requisitionListItems","DELETE_REQUISITION_LIST_ITEMS_MUTATION","deleteRequisitionListItems","items","ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION","addRequisitionListItemsToCart","requisitionListItemUids"],"mappings":"gIAmBO,MAAMA,EAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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CAAA,GAGzDG,EAAO,KAAK,uBAAwBH,CAAO,EACpCA,CACT,EC3CaW,EAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECS9CC,EAAgC,MAC3CN,EACAO,IAEOnB,EAAaiB,EAA6C,CAC/D,UAAW,CACT,mBAAAL,EACA,wBAAAO,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAArB,EAAQ,KAAAC,KAAW,OAC5B,OAAID,EAAeG,EAAiBH,CAAM,GAGxCM,EAAAL,EAAK,8BACF,iDADH,MAAAK,EACmD,OAE5CL,EAAK,8BAA8B,+CAA+C,IACtF,IAAY,CACX,KAAM,EAAE,KACR,QAAS,EAAE,SAAW,EAAA,EACxB,EAGG,IACT,CAAC"}
1
+ {"version":3,"file":"addRequisitionListItemsToCart.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionList/graphql/getRequisitionList.ts","/@dropins/storefront-requisition-list/src/lib/validate-uid.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionList/getRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionListItems/graphql/updateRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionListItems/updateRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionListItems/graphql/deleteRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionListItems/deleteRequisitionListItems.ts","/@dropins/storefront-requisition-list/src/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart.ts","/@dropins/storefront-requisition-list/src/api/addRequisitionListItemsToCart/addRequisitionListItemsToCart.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const GET_REQUISITION_LIST_QUERY = `\n query GET_REQUISITION_LIST_QUERY(\n $requisitionListUid: String,\n $currentPage: Int = 1,\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists (\n filter: {\n uids: {\n eq: $requisitionListUid\n }\n }\n ){\n items {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n }\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Validates if a string is a valid base64-encoded UID\n * Adobe Commerce/Magento UIDs are base64 encoded\n *\n * @param uid - The UID to validate\n * @returns true if the UID appears to be valid base64 encoding\n */\nexport function isValidBase64Uid(uid: string | undefined | null): boolean {\n if (!uid || typeof uid !== 'string' || uid.length < 2) {\n return false;\n }\n\n // Base64 pattern: alphanumeric, +, /\n // Valid base64 can end with 0, 1, or 2 '=' padding characters\n // But the length must be a multiple of 4 when padded\n const base64Pattern = /^[A-Za-z0-9+/]+(==|=)?$/;\n\n if (!base64Pattern.test(uid)) {\n return false;\n }\n\n // Check that the total length is a multiple of 4 (valid base64 requirement)\n return uid.length % 4 === 0;\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LIST_QUERY } from '@/requisitionList/api/getRequisitionList/graphql/getRequisitionList';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { isValidBase64Uid } from '@/requisitionList/lib/validate-uid';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionList = async (\n requisitionListID: string,\n currentPage?: number,\n pageSize?: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n // Validate UID format before making API call\n if (!isValidBase64Uid(requisitionListID)) {\n console.error('Invalid requisition list UID format:', requisitionListID);\n return null;\n }\n\n const { errors, data } = await fetchGraphQl(GET_REQUISITION_LIST_QUERY, {\n variables: {\n requisitionListUid: requisitionListID,\n currentPage,\n pageSize,\n },\n });\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists?.items?.[0]) {\n return null;\n }\n\n const rawList = data.customer.requisition_lists.items[0];\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const UPDATE_REQUISITION_LIST_ITEMS_MUTATION = `\n mutation UPDATE_REQUISITION_LIST_ITEMS_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItems: [UpdateRequisitionListItemsInput!]!,\n $pageSize: Int = 20,\n $currentPage: Int = 1\n ) {\n updateRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItems: $requisitionListItems\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { UPDATE_REQUISITION_LIST_ITEMS_MUTATION } from '@/requisitionList/api/updateRequisitionListItems/graphql/updateRequisitionListItems';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const updateRequisitionListItems = async (\n requisitionListUid: string,\n requisitionListItems: Array<UpdateRequisitionListItemsInput>,\n pageSize: number,\n currentPage: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n const { errors, data } = await fetchGraphQl(\n UPDATE_REQUISITION_LIST_ITEMS_MUTATION,\n {\n variables: {\n requisitionListUid,\n requisitionListItems,\n pageSize,\n currentPage,\n },\n }\n );\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.updateRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const rawList = data.updateRequisitionListItems.requisition_list;\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n\ntype UpdateRequisitionListItemsInput = {\n item_id: string;\n quantity?: number;\n entered_options?: Array<{ uid: string; value: string }>;\n selected_options?: Array<string>;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\nimport { REQUISITION_LIST_ITEMS_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListItemsFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_ITEMS_MUTATION = `\n mutation DELETE_REQUISITION_LIST_ITEMS_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItemUids: [ID!]!,\n $pageSize: Int = 20,\n $currentPage: Int = 1\n ) {\n deleteRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items(pageSize: $pageSize, currentPage: $currentPage) {\n ...REQUISITION_LIST_ITEMS_FRAGMENT\n }\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n${REQUISITION_LIST_ITEMS_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { Item } from '@/requisitionList/data/models/item';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { DELETE_REQUISITION_LIST_ITEMS_MUTATION } from '@/requisitionList/api/deleteRequisitionListItems/graphql/deleteRequisitionListItems';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionListItems = async (\n requisitionListUid: string,\n items: Array<string>,\n pageSize: number,\n currentPage: number,\n enrichConfigurableProducts?: (items: Item[]) => Promise<Item[]>\n): Promise<RequisitionList | null> => {\n const { errors, data } = await fetchGraphQl(\n DELETE_REQUISITION_LIST_ITEMS_MUTATION,\n {\n variables: {\n requisitionListUid,\n requisitionListItemUids: items,\n pageSize,\n currentPage,\n },\n }\n );\n\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const rawList = data.deleteRequisitionListItems.requisition_list;\n let payload = transformRequisitionList(rawList);\n if (payload?.items?.length && enrichConfigurableProducts) {\n payload = {\n ...payload,\n items: await enrichConfigurableProducts(payload.items),\n };\n }\n events.emit('requisitionList/data', payload);\n return payload;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION = `\n mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(\n $requisitionListUid: ID!, \n $requisitionListItemUids: [ID!]!\n ) {\n addRequisitionListItemsToCart(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n status\n add_requisition_list_items_to_cart_user_errors {\n message\n type\n }\n cart {\n id\n itemsV2 {\n items {\n uid\n quantity\n is_available\n }\n total_count\n }\n email\n total_quantity\n is_virtual\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION } from '@/requisitionList/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart';\n\nexport interface AddToCartError {\n type: string;\n message: string;\n}\n\nexport const addRequisitionListItemsToCart = async (\n requisitionListUid: string,\n requisitionListItemUids: Array<string>\n): Promise<Array<AddToCartError> | null> => {\n return fetchGraphQl(ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItemUids,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (\n data.addRequisitionListItemsToCart\n .add_requisition_list_items_to_cart_user_errors?.length\n ) {\n return data.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors.map(\n (e: any) => ({\n type: e.type,\n message: e.message || '',\n })\n );\n }\n return null;\n });\n};\n"],"names":["GET_REQUISITION_LIST_QUERY","REQUISITION_LIST_ITEMS_FRAGMENT","REQUISITION_LIST_FRAGMENT","isValidBase64Uid","uid","getRequisitionList","requisitionListID","currentPage","pageSize","enrichConfigurableProducts","errors","data","fetchGraphQl","handleFetchError","_c","_b","_a","rawList","payload","transformRequisitionList","_d","events","UPDATE_REQUISITION_LIST_ITEMS_MUTATION","updateRequisitionListItems","requisitionListUid","requisitionListItems","DELETE_REQUISITION_LIST_ITEMS_MUTATION","deleteRequisitionListItems","items","ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION","addRequisitionListItemsToCart","requisitionListItemUids"],"mappings":"gIAmBO,MAAMA,EAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBxCC,CAA+B;AAAA,EAC/BC,CAAyB;AAAA,ECnBpB,S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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECS9CC,EAAgC,MAC3CN,EACAO,IAEOnB,EAAaiB,EAA6C,CAC/D,UAAW,CACT,mBAAAL,EACA,wBAAAO,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAArB,EAAQ,KAAAC,KAAW,OACxB,OAAAD,EAAeG,EAAiBH,CAAM,GAGxCM,EAAAL,EAAK,8BACF,iDADH,MAAAK,EACmD,OAE5CL,EAAK,8BAA8B,+CAA+C,IACtF,IAAY,CACX,KAAM,EAAE,KACR,QAAS,EAAE,SAAW,EACxB,EACF,EAEK,IAAA,CACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/graphql/deleteRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/deleteRequisitionList.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_MUTATION = `\n mutation DELETE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n ) {\n deleteRequisitionList(\n requisitionListUid: $requisitionListUid\n ) {\n status\n requisition_lists {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { DELETE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/deleteRequisitionList/graphql/deleteRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<{\n items: RequisitionList[];\n page_info: any;\n status: any;\n} | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n },\n }).then(({ errors, data }) => {\n if (!requisitionListUid) return null;\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionList?.requisition_lists) {\n return null;\n }\n\n const reqLists =\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [];\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.deleteRequisitionList?.requisition_lists?.page_info,\n status: data.deleteRequisitionList?.status,\n };\n });\n};\n"],"names":["DELETE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","deleteRequisitionList","requisitionListUid","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","_c","_b","requisitionList","transformRequisitionList","events","_e","_d","_f"],"mappings":"yHAkBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9CC,CAAyB;AAAA,ECfdC,EAAwB,MACnCC,GAMOC,EAAaJ,EAAkC,CACpD,UAAW,CACT,mBAAAG,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,iBAC5B,GAAI,CAACH,EAAoB,OAAO,KAChC,GAAIE,EAAQ,OAAOE,EAAiBF,CAAM,EAE1C,GAAI,GAACG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,mBAChC,OAAO,KAGT,MAAMC,IACJC,GAAAC,EAAAL,EAAK,sBAAsB,oBAA3B,YAAAK,EAA8C,QAA9C,YAAAD,EAAqD,IAClDE,GAAyBC,EAAyBD,CAAe,KAC/D,CAAA,EAEP,OAAAE,EAAO,KAAK,wBAAyBL,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWM,GAAAC,EAAAV,EAAK,wBAAL,YAAAU,EAA4B,oBAA5B,YAAAD,EAA+C,UAC1D,QAAQE,EAAAX,EAAK,wBAAL,YAAAW,EAA4B,MAAA,CAExC,CAAC"}
1
+ {"version":3,"file":"deleteRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/graphql/deleteRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/deleteRequisitionList.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_MUTATION = `\n mutation DELETE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n ) {\n deleteRequisitionList(\n requisitionListUid: $requisitionListUid\n ) {\n status\n requisition_lists {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { DELETE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/deleteRequisitionList/graphql/deleteRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<{\n items: RequisitionList[];\n page_info: any;\n status: any;\n} | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n },\n }).then(({ errors, data }) => {\n if (!requisitionListUid) return null;\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionList?.requisition_lists) {\n return null;\n }\n\n const reqLists =\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [];\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.deleteRequisitionList?.requisition_lists?.page_info,\n status: data.deleteRequisitionList?.status,\n };\n });\n};\n"],"names":["DELETE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","deleteRequisitionList","requisitionListUid","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","_c","_b","requisitionList","transformRequisitionList","events","_e","_d","_f"],"mappings":"yHAkBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9CC,CAAyB;AAAA,ECfdC,EAAwB,MACnCC,GAMOC,EAAaJ,EAAkC,CACpD,UAAW,CACT,mBAAAG,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,iBACxB,GAAA,CAACH,EAA2B,OAAA,KAC5B,GAAAE,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,mBACzB,OAAA,KAGT,MAAMC,IACJC,GAAAC,EAAAL,EAAK,sBAAsB,oBAA3B,YAAAK,EAA8C,QAA9C,YAAAD,EAAqD,IAClDE,GAAyBC,EAAyBD,CAAe,KAC/D,CAAC,EAED,OAAAE,EAAA,KAAK,wBAAyBL,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWM,GAAAC,EAAAV,EAAK,wBAAL,YAAAU,EAA4B,oBAA5B,YAAAD,EAA+C,UAC1D,QAAQE,EAAAX,EAAK,wBAAL,YAAAW,EAA4B,MACtC,CAAA,CACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRequisitionLists.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionLists/graphql/getRequisitionLists.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionLists/getRequisitionLists.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const GET_REQUISITION_LISTS_QUERY = `\n query GET_REQUISITION_LISTS_QUERY(\n $currentPage: Int = 1\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists(pageSize: $pageSize, currentPage: $currentPage) {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LISTS_QUERY } from '@/requisitionList/api/getRequisitionLists/graphql/getRequisitionLists';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionLists = async (\n currentPage?: number,\n pageSize?: number\n): Promise<RequisitionList[] | null> => {\n return fetchGraphQl(GET_REQUISITION_LISTS_QUERY, {\n variables: {\n currentPage,\n pageSize,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists) {\n return null;\n }\n\n const reqLists = data.customer.requisition_lists.items.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n );\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.customer?.requisition_lists?.page_info,\n total_count: data.customer?.requisition_lists?.total_count,\n };\n });\n};\n"],"names":["GET_REQUISITION_LISTS_QUERY","REQUISITION_LIST_FRAGMENT","getRequisitionLists","currentPage","pageSize","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","requisitionList","transformRequisitionList","events","_c","_b","_e","_d"],"mappings":"yHAkBO,MAAMA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzCC,CAAyB;AAAA,ECbdC,EAAsB,MACjCC,EACAC,IAEOC,EAAaL,EAA6B,CAC/C,UAAW,CACT,YAAAG,EACA,SAAAC,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,eAC5B,GAAID,EAAQ,OAAOE,EAAiBF,CAAM,EAE1C,GAAI,GAACG,EAAAF,GAAA,YAAAA,EAAM,WAAN,MAAAE,EAAgB,mBACnB,OAAO,KAGT,MAAMC,EAAWH,EAAK,SAAS,kBAAkB,MAAM,IACpDI,GAAyBC,EAAyBD,CAAe,CAAA,EAGpE,OAAAE,EAAO,KAAK,wBAAyBH,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWI,GAAAC,EAAAR,EAAK,WAAL,YAAAQ,EAAe,oBAAf,YAAAD,EAAkC,UAC7C,aAAaE,GAAAC,EAAAV,EAAK,WAAL,YAAAU,EAAe,oBAAf,YAAAD,EAAkC,WAAA,CAEnD,CAAC"}
1
+ {"version":3,"file":"getRequisitionLists.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionLists/graphql/getRequisitionLists.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionLists/getRequisitionLists.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const GET_REQUISITION_LISTS_QUERY = `\n query GET_REQUISITION_LISTS_QUERY(\n $currentPage: Int = 1\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists(pageSize: $pageSize, currentPage: $currentPage) {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LISTS_QUERY } from '@/requisitionList/api/getRequisitionLists/graphql/getRequisitionLists';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionLists = async (\n currentPage?: number,\n pageSize?: number\n): Promise<RequisitionList[] | null> => {\n return fetchGraphQl(GET_REQUISITION_LISTS_QUERY, {\n variables: {\n currentPage,\n pageSize,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists) {\n return null;\n }\n\n const reqLists = data.customer.requisition_lists.items.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n );\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.customer?.requisition_lists?.page_info,\n total_count: data.customer?.requisition_lists?.total_count,\n };\n });\n};\n"],"names":["GET_REQUISITION_LISTS_QUERY","REQUISITION_LIST_FRAGMENT","getRequisitionLists","currentPage","pageSize","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","requisitionList","transformRequisitionList","events","_c","_b","_e","_d"],"mappings":"yHAkBO,MAAMA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzCC,CAAyB;AAAA,ECbdC,EAAsB,MACjCC,EACAC,IAEOC,EAAaL,EAA6B,CAC/C,UAAW,CACT,YAAAG,EACA,SAAAC,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,eACxB,GAAAD,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,WAAN,MAAAE,EAAgB,mBACZ,OAAA,KAGT,MAAMC,EAAWH,EAAK,SAAS,kBAAkB,MAAM,IACpDI,GAAyBC,EAAyBD,CAAe,CACpE,EAEO,OAAAE,EAAA,KAAK,wBAAyBH,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWI,GAAAC,EAAAR,EAAK,WAAL,YAAAQ,EAAe,oBAAf,YAAAD,EAAkC,UAC7C,aAAaE,GAAAC,EAAAV,EAAK,WAAL,YAAAU,EAAe,oBAAf,YAAAD,EAAkC,WACjD,CAAA,CACD"}