@dropins/storefront-requisition-list 1.0.0-beta2 → 1.0.0-beta4

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.
Files changed (39) hide show
  1. package/api/fragments/RequisitionListItemsFragment.graphql.d.ts +1 -1
  2. package/api/index.d.ts +1 -0
  3. package/api/refineProduct/enrichConfigurableProducts.d.ts +10 -0
  4. package/api/refineProduct/index.d.ts +18 -0
  5. package/api.js +2 -2
  6. package/api.js.map +1 -1
  7. package/chunks/PaginationItemsCounter.js +4 -0
  8. package/chunks/PaginationItemsCounter.js.map +1 -0
  9. package/chunks/RequisitionListView.js +1 -1
  10. package/chunks/RequisitionListView.js.map +1 -1
  11. package/chunks/addRequisitionListItemsToCart.js +11 -37
  12. package/chunks/addRequisitionListItemsToCart.js.map +1 -1
  13. package/chunks/getRequisitionLists.js +3 -3
  14. package/chunks/getRequisitionLists.js.map +1 -1
  15. package/chunks/updateRequisitionList.js +34 -6
  16. package/chunks/updateRequisitionList.js.map +1 -1
  17. package/components/PaginationItemsCounter/PaginationItemsCounter.d.ts +10 -0
  18. package/components/PaginationItemsCounter/index.d.ts +19 -0
  19. package/components/ProductListTable/ProductListTable.d.ts +1 -1
  20. package/components/RequisitionListGridWrapper/RequisitionListGridWrapper.d.ts +4 -3
  21. package/components/index.d.ts +1 -0
  22. package/containers/RequisitionListGrid/RequisitionListGrid.d.ts +5 -0
  23. package/containers/RequisitionListGrid.js +1 -1
  24. package/containers/RequisitionListGrid.js.map +1 -1
  25. package/containers/RequisitionListSelector.js +2 -2
  26. package/containers/RequisitionListSelector.js.map +1 -1
  27. package/containers/RequisitionListView/RequisitionListView.d.ts +5 -0
  28. package/containers/RequisitionListView.js +1 -1
  29. package/containers/RequisitionListView.js.map +1 -1
  30. package/data/models/item.d.ts +22 -1
  31. package/data/transforms/transform-requisition-list.d.ts +4 -2
  32. package/hooks/useRequisitionListGrid.d.ts +1 -0
  33. package/i18n/en_US.json.d.ts +12 -3
  34. package/package.json +1 -1
  35. package/render.js +3 -3
  36. package/render.js.map +1 -1
  37. package/chunks/PageSizePicker.js +0 -4
  38. package/chunks/PageSizePicker.js.map +0 -1
  39. /package/api/{getRequisitionList → refineProduct}/graphql/refineProduct.d.ts +0 -0
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const REQUISITION_LIST_ITEMS_FRAGMENT = "\nfragment REQUISITION_LIST_ITEMS_FRAGMENT on RequistionListItems {\n items {\n uid\n quantity\n product {\n sku\n }\n customizable_options {\n customizable_option_uid\n is_required\n label\n sort_order\n type\n values {\n customizable_option_value_uid\n label\n value\n price {\n type\n units\n value\n }\n }\n }\n ... on ConfigurableRequisitionListItem {\n configurable_options {\n configurable_product_option_uid\n configurable_product_option_value_uid\n option_label\n value_label\n }\n }\n ... on DownloadableRequisitionListItem {\n links {\n price\n sample_url\n sort_order\n title\n uid\n }\n samples {\n sample_url\n sort_order\n title\n }\n }\n ... on BundleRequisitionListItem {\n bundle_options {\n uid\n type\n label\n values {\n uid\n label\n quantity\n priceV2 {\n value\n currency\n }\n original_price {\n value\n currency\n }\n }\n }\n }\n ... on GiftCardRequisitionListItem {\n gift_card_options {\n amount {\n currency\n value\n }\n custom_giftcard_amount {\n currency\n value\n }\n message\n recipient_email\n recipient_name\n sender_name\n sender_email\n }\n }\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n}\n";
17
+ export declare const REQUISITION_LIST_ITEMS_FRAGMENT = "\nfragment REQUISITION_LIST_ITEMS_FRAGMENT on RequistionListItems {\n items {\n uid\n quantity\n product {\n sku\n stock_status\n only_x_left_in_stock\n }\n customizable_options {\n customizable_option_uid\n is_required\n label\n sort_order\n type\n values {\n customizable_option_value_uid\n label\n value\n price {\n type\n units\n value\n }\n }\n }\n ... on ConfigurableRequisitionListItem {\n configurable_options {\n configurable_product_option_uid\n configurable_product_option_value_uid\n option_label\n value_label\n }\n }\n ... on DownloadableRequisitionListItem {\n links {\n price\n sample_url\n sort_order\n title\n uid\n }\n samples {\n sample_url\n sort_order\n title\n }\n }\n ... on BundleRequisitionListItem {\n bundle_options {\n uid\n type\n label\n values {\n uid\n label\n quantity\n priceV2 {\n value\n currency\n }\n original_price {\n value\n currency\n }\n }\n }\n }\n ... on GiftCardRequisitionListItem {\n gift_card_options {\n amount {\n currency\n value\n }\n custom_giftcard_amount {\n currency\n value\n }\n message\n recipient_email\n recipient_name\n sender_name\n sender_email\n }\n }\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n}\n";
18
18
  //# sourceMappingURL=RequisitionListItemsFragment.graphql.d.ts.map
package/api/index.d.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  *******************************************************************/
17
17
  export * from './initialize';
18
18
  export * from './fetch-graphql';
19
+ export * from './refineProduct';
19
20
  export * from './getStoreConfig';
20
21
  export * from './getRequisitionLists';
21
22
  export * from './getRequisitionList';
@@ -0,0 +1,10 @@
1
+ import { Item } from '../../data/models/item';
2
+
3
+ /**
4
+ * Enriches configurable products with variant data by calling the refineProduct query
5
+ *
6
+ * @param items - Array of requisition list items
7
+ * @returns Promise resolving to array of items with configured_product populated for configurable items
8
+ */
9
+ export declare const enrichConfigurableProducts: (items: Item[]) => Promise<Item[]>;
10
+ //# sourceMappingURL=enrichConfigurableProducts.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './enrichConfigurableProducts';
18
+ //# sourceMappingURL=index.d.ts.map
package/api.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{f as o,h as r}from"./chunks/updateRequisitionList.js";import{g as R,r as y,s as F,a as L,b as E,u as G}from"./chunks/updateRequisitionList.js";import{events as a}from"@dropins/tools/event-bus.js";import{g as Q}from"./chunks/getRequisitionLists.js";import{a as v,d as x,b as O,g as w,u as z}from"./chunks/addRequisitionListItemsToCart.js";import{d as S}from"./chunks/deleteRequisitionList.js";import{Initializer as c}from"@dropins/tools/lib.js";import{s as t}from"./chunks/state.js";import"@dropins/tools/fetch-graphql.js";const f=`
3
+ import{f as o,h as r}from"./chunks/updateRequisitionList.js";import{e as R,g as y,r as F,s as L,a as b,b as E,u as G}from"./chunks/updateRequisitionList.js";import{events as a}from"@dropins/tools/event-bus.js";import{g as Q}from"./chunks/getRequisitionLists.js";import{a as x,d as O,b as w,g as z,u as H}from"./chunks/addRequisitionListItemsToCart.js";import{d as T}from"./chunks/deleteRequisitionList.js";import{Initializer as c}from"@dropins/tools/lib.js";import{s as t}from"./chunks/state.js";import"@dropins/tools/fetch-graphql.js";const f=`
4
4
  query STORE_CONFIG_QUERY {
5
5
  storeConfig {
6
6
  is_requisition_list_active
7
7
  company_enabled
8
8
  }
9
9
  }
10
- `,u=async()=>{try{const{errors:e,data:i}=await o(f,{cache:"force-cache"});return e?e.some(s=>s.message&&s.message.includes('Cannot query field "is_requisition_list_active"')||s.message.includes('Cannot query field "company_enabled"'))?!1:r(e):i==null?void 0:i.storeConfig}catch{return{is_requisition_list_active:"0",company_enabled:!1}}},n=new c({init:async e=>{const i={};t.config||(t.config=await u(),a.emit("requisitionList/initialized",t.config)),n.config.setConfig({...i,...e})},listeners:()=>[a.on("authenticated",e=>{t.authenticated=e})]}),_=n.config;export{v as addRequisitionListItemsToCart,_ as config,S as deleteRequisitionList,x as deleteRequisitionListItems,o as fetchGraphQl,R as getConfig,O as getProductData,w as getRequisitionList,Q as getRequisitionLists,u as getStoreConfig,n as initialize,y as removeFetchGraphQlHeader,F as setEndpoint,L as setFetchGraphQlHeader,E as setFetchGraphQlHeaders,G as updateRequisitionList,z as updateRequisitionListItems};
10
+ `,u=async()=>{try{const{errors:e,data:i}=await o(f,{cache:"force-cache"});return e?e.some(s=>s.message&&s.message.includes('Cannot query field "is_requisition_list_active"')||s.message.includes('Cannot query field "company_enabled"'))?!1:r(e):i==null?void 0:i.storeConfig}catch{return{is_requisition_list_active:"0",company_enabled:!1}}},n=new c({init:async e=>{const i={};t.config||(t.config=await u(),a.emit("requisitionList/initialized",t.config)),n.config.setConfig({...i,...e})},listeners:()=>[a.on("authenticated",e=>{t.authenticated=e})]}),_=n.config;export{x as addRequisitionListItemsToCart,_ as config,T as deleteRequisitionList,O as deleteRequisitionListItems,R as enrichConfigurableProducts,o as fetchGraphQl,y as getConfig,w as getProductData,z as getRequisitionList,Q as getRequisitionLists,u as getStoreConfig,n as initialize,F as removeFetchGraphQlHeader,L as setEndpoint,b as setFetchGraphQlHeader,E as setFetchGraphQlHeaders,G as updateRequisitionList,H as updateRequisitionListItems};
11
11
  //# sourceMappingURL=api.js.map
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":"ihBAiBO,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":"whBAiBO,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"}
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{jsxs as d,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{Icon as p,Button as f,Picker as h}from"@dropins/tools/components.js";import{classes as P}from"@dropins/tools/lib.js";import"./RequisitionListView.js";import*as o from"@dropins/tools/preact-compat.js";import{useText as u}from"@dropins/tools/i18n.js";import{D as S}from"./RequisitionListForm.js";const E=e=>o.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",...e},o.createElement("g",{id:"Large"},o.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),o.createElement("g",{id:"Search_icon","data-name":"Search icon",transform:"translate(3.75 3.75)"},o.createElement("circle",{vectorEffect:"non-scaling-stroke",id:"Ellipse_186","data-name":"Ellipse 186",cx:6,cy:6,r:6,fill:"none",stroke:"currentColor"}),o.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"})))),C=({className:e,title:n="404 - Not Found",message:a="The requisition list you are looking for does not exist.",actionLabel:i,onAction:r,...c})=>d("div",{className:P(["not-found",e]),"data-testid":"not-found",...c,children:[s(p,{source:E,size:"64",stroke:"2"}),s("h2",{children:n}),a&&s("p",{children:a}),i&&r&&s(f,{variant:"primary",onClick:r,children:i})]}),y=({currentPageSize:e,onPageSizeChange:n,disabled:a=!1,pageSizeOptions:i=[10,25,50,100]})=>{const r=u({itemsPerPage:"RequisitionList.PageSizePicker.itemsPerPage"}),c=t=>{const m=t.target,g=parseInt(m.value,10);n(g)},l=i.map(t=>({value:t.toString(),text:t.toString()}));return s(h,{disabled:a,"data-testid":"page-size-picker",variant:"primary",size:"medium",value:e.toString(),options:l,handleSelect:c,"aria-label":r.itemsPerPage})},I=({pageInfo:e,totalCount:n,className:a=""})=>{const i=u({itemsCounter:"RequisitionList.PaginationItemsCounter.itemsCounter"});if(!e||!n)return null;const r=e.page_size??S,c=e.current_page??1,l=r*c,t=n,m=l-r+1,g=l>t?t:l;return s("span",{className:`pagination-items-counter ${a}`.trim(),children:i.itemsCounter.replace("{from}",m.toString()).replace("{to}",g.toString()).replace("{total}",t.toString())})};export{C as N,I as P,y as a};
4
+ //# sourceMappingURL=PaginationItemsCounter.js.map
@@ -0,0 +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,GAA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C,GAAI,GAAI,GAAI,GAAG,CACpC,IAA2B,CACzB,MAAMC,EAAeC,EAAQ,CAC3B,aAAc,6CAAA,CACf,EAEKC,EAAwBC,GAAiB,CAC7C,MAAMC,EAASD,EAAM,OACfE,EAAc,SAASD,EAAO,MAAO,EAAE,EAC7CP,EAAiBQ,CAAW,CAC9B,EAEMC,EAAUP,EAAgB,IAAKQ,IAAU,CAC7C,MAAOA,EAAK,SAAA,EACZ,KAAMA,EAAK,SAAA,CAAS,EACpB,EAEF,OACEhB,EAACiB,EAAA,CACC,SAAAV,EACA,cAAY,mBACZ,QAAQ,UACR,KAAK,SACL,MAAOF,EAAgB,SAAA,EACvB,QAAAU,EACA,aAAcJ,EACd,aAAYF,EAAa,YAAA,CAAA,CAG/B,EC9BaS,EAET,CAAC,CAAE,SAAAC,EAAU,WAAAC,EAAY,UAAA3B,EAAY,MAAS,CAChD,MAAMgB,EAAeC,EAAQ,CAC3B,aAAc,qDAAA,CACf,EAGD,GAAI,CAACS,GAAY,CAACC,EAChB,OAAO,KAGT,MAAMC,EAAWF,EAAS,WAAaG,EACjCC,EAAcJ,EAAS,cAAgB,EACvCd,EAAkBgB,EAAWE,EAC7BC,EAAQJ,EAERK,EAAOpB,EAAkBgB,EAAW,EACpCK,EAAKrB,EAAkBmB,EAAQA,EAAQnB,EAE7C,OACEL,EAAC,OAAA,CAAK,UAAW,4BAA4BP,CAAS,GAAG,KAAA,EACtD,SAAAgB,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,4 +1,4 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import*as t from"@dropins/tools/preact-compat.js";import{useState as p,useMemo as l,useCallback as A}from"@dropins/tools/preact-compat.js";import{useText as y}from"@dropins/tools/i18n.js";import{jsxs as x,jsx as a}from"@dropins/tools/preact-jsx-runtime.js";import{Icon as C}from"@dropins/tools/components.js";import{classes as h}from"@dropins/tools/lib.js";function E(s){const[r,i]=p(null),c=y({errorCreate:"RequisitionList.RequisitionListAlert.errorCreate",successCreate:"RequisitionList.RequisitionListAlert.successCreate",errorDeleteItem:"RequisitionList.RequisitionListAlert.errorDeleteItem",successDeleteItem:"RequisitionList.RequisitionListAlert.successDeleteItem",errorDeleteReqList:"RequisitionList.RequisitionListAlert.errorDeleteReqList",successDeleteReqList:"RequisitionList.RequisitionListAlert.successDeleteReqList",errorAddToCart:"RequisitionList.RequisitionListAlert.errorAddToCart",successAddToCart:"RequisitionList.RequisitionListAlert.successAddToCart",errorUpdateQuantity:"RequisitionList.RequisitionListAlert.errorUpdateQuantity",successUpdateQuantity:"RequisitionList.RequisitionListAlert.successUpdateQuantity",errorUpdate:"RequisitionList.RequisitionListAlert.errorUpdate",successUpdate:"RequisitionList.RequisitionListAlert.successUpdate",errorMove:"RequisitionList.RequisitionListAlert.errorMove",successMove:"RequisitionList.RequisitionListAlert.successMove",errorAddToRequisitionList:"RequisitionList.RequisitionListAlert.errorAddToRequisitionList",successAddToRequisitionList:"RequisitionList.RequisitionListAlert.successAddToRequisitionList"}),e=l(()=>({...c,...s}),[c,s]),u=l(()=>({create:{requisitionList:{success:e.successCreate,error:e.errorCreate}},add:{product:{success:e.successAddToRequisitionList,error:e.errorAddToRequisitionList}},update:{product:{success:e.successUpdateQuantity,error:e.errorUpdateQuantity},requisitionList:{success:e.successUpdate,error:e.errorUpdate}},delete:{product:{success:e.successDeleteItem,error:e.errorDeleteItem},requisitionList:{success:e.successDeleteReqList,error:e.errorDeleteReqList}},move:{product:{success:e.successMove,error:e.errorMove}}}),[e]),d=A(L=>{const{type:n,action:q,context:R,skus:o}=L;i({type:n,description:u[q][R][n],sku:o==null?void 0:o[0]});const m=setTimeout(()=>{i(null)},5e3);return()=>clearTimeout(m)},[u]);return{alert:r,setAlert:i,handleRequisitionListAlert:d}}const T=s=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("rect",{x:4.89282,y:2.75,width:14.2143,height:18.5,rx:2.25,stroke:"currentColor",strokeWidth:1}),t.createElement("line",{x1:9.85718,y1:7.67871,x2:16.2857,y2:7.67871,stroke:"currentColor",strokeWidth:1}),t.createElement("line",{x1:9.85718,y1:11.9644,x2:16.2857,y2:11.9644,stroke:"currentColor",strokeWidth:1}),t.createElement("line",{x1:9.85718,y1:16.25,x2:16.2857,y2:16.25,stroke:"currentColor",strokeWidth:1}),t.createElement("circle",{cx:7.71429,cy:7.71429,r:.714286,fill:"currentColor"}),t.createElement("circle",{cx:7.71429,cy:11.9999,r:.714286,fill:"currentColor"}),t.createElement("circle",{cx:7.71429,cy:16.2856,r:.714286,fill:"currentColor"})),g=({className:s,textContent:r,...i})=>x("div",{className:h(["empty-list",s]),"data-testid":"empty-list",...i,children:[a(C,{source:T,size:"64",stroke:"2"}),r&&a("h4",{children:r})]});export{g as E,T as S,E as u};
3
+ import*as i from"@dropins/tools/preact-compat.js";import{useState as L,useEffect as y,useMemo as d,useCallback as f}from"@dropins/tools/preact-compat.js";import{s as n}from"./state.js";import{events as x}from"@dropins/tools/event-bus.js";import{useText as C}from"@dropins/tools/i18n.js";import{jsxs as h,jsx as q}from"@dropins/tools/preact-jsx-runtime.js";import{Icon as v}from"@dropins/tools/components.js";import{classes as E}from"@dropins/tools/lib.js";const M=()=>{var s,o;const[t,r]=L(((s=n.config)==null?void 0:s.is_requisition_list_active)==="1"&&((o=n.config)==null?void 0:o.company_enabled)===!0);return y(()=>{const e=x.on("requisitionList/initialized",()=>{var c,u;r(((c=n.config)==null?void 0:c.is_requisition_list_active)==="1"&&((u=n.config)==null?void 0:u.company_enabled)===!0)});return()=>e==null?void 0:e.off()},[]),{isEnabled:t}},T=t=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("rect",{x:4.89282,y:2.75,width:14.2143,height:18.5,rx:2.25,stroke:"currentColor",strokeWidth:1}),i.createElement("line",{x1:9.85718,y1:7.67871,x2:16.2857,y2:7.67871,stroke:"currentColor",strokeWidth:1}),i.createElement("line",{x1:9.85718,y1:11.9644,x2:16.2857,y2:11.9644,stroke:"currentColor",strokeWidth:1}),i.createElement("line",{x1:9.85718,y1:16.25,x2:16.2857,y2:16.25,stroke:"currentColor",strokeWidth:1}),i.createElement("circle",{cx:7.71429,cy:7.71429,r:.714286,fill:"currentColor"}),i.createElement("circle",{cx:7.71429,cy:11.9999,r:.714286,fill:"currentColor"}),i.createElement("circle",{cx:7.71429,cy:16.2856,r:.714286,fill:"currentColor"}));function b(t){const[r,s]=L(null),o=C({errorCreate:"RequisitionList.RequisitionListAlert.errorCreate",successCreate:"RequisitionList.RequisitionListAlert.successCreate",errorDeleteItem:"RequisitionList.RequisitionListAlert.errorDeleteItem",successDeleteItem:"RequisitionList.RequisitionListAlert.successDeleteItem",errorDeleteReqList:"RequisitionList.RequisitionListAlert.errorDeleteReqList",successDeleteReqList:"RequisitionList.RequisitionListAlert.successDeleteReqList",errorAddToCart:"RequisitionList.RequisitionListAlert.errorAddToCart",successAddToCart:"RequisitionList.RequisitionListAlert.successAddToCart",errorUpdateQuantity:"RequisitionList.RequisitionListAlert.errorUpdateQuantity",successUpdateQuantity:"RequisitionList.RequisitionListAlert.successUpdateQuantity",errorUpdate:"RequisitionList.RequisitionListAlert.errorUpdate",successUpdate:"RequisitionList.RequisitionListAlert.successUpdate",errorMove:"RequisitionList.RequisitionListAlert.errorMove",successMove:"RequisitionList.RequisitionListAlert.successMove",errorAddToRequisitionList:"RequisitionList.RequisitionListAlert.errorAddToRequisitionList",successAddToRequisitionList:"RequisitionList.RequisitionListAlert.successAddToRequisitionList"}),e=d(()=>({...o,...t}),[o,t]),c=d(()=>({create:{requisitionList:{success:e.successCreate,error:e.errorCreate}},add:{product:{success:e.successAddToRequisitionList,error:e.errorAddToRequisitionList}},update:{product:{success:e.successUpdateQuantity,error:e.errorUpdateQuantity},requisitionList:{success:e.successUpdate,error:e.errorUpdate}},delete:{product:{success:e.successDeleteItem,error:e.errorDeleteItem},requisitionList:{success:e.successDeleteReqList,error:e.errorDeleteReqList}},move:{product:{success:e.successMove,error:e.errorMove}}}),[e]),u=f(R=>{const{type:a,action:m,context:p,skus:l}=R;s({type:a,description:c[m][p][a],sku:l==null?void 0:l[0]});const A=setTimeout(()=>{s(null)},5e3);return()=>clearTimeout(A)},[c]);return{alert:r,setAlert:s,handleRequisitionListAlert:u}}const Q=({className:t,textContent:r,...s})=>h("div",{className:E(["empty-list",t]),"data-testid":"empty-list",...s,children:[q(v,{source:T,size:"64",stroke:"2"}),r&&q("h4",{children:r})]});export{Q as E,T as S,b as a,M as u};
4
4
  //# sourceMappingURL=RequisitionListView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequisitionListView.js","sources":["/@dropins/storefront-requisition-list/src/hooks/useRequisitionListAlert.tsx","../../node_modules/@adobe-commerce/elsie/src/icons/List.svg","/@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 { 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 } = payload;\n setAlert({\n type,\n description: messages[action][context][type],\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","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 *******************************************************************/\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":["useRequisitionListAlert","translationsOverride","alert","setAlert","useState","defaultTranslations","useText","translations","useMemo","messages","handleRequisitionListAlert","useCallback","payload","type","action","context","skus","timer","SvgList","props","React","EmptyList","className","textContent","jsxs","classes","jsx","Icon","List"],"mappings":"qWA4BO,SAASA,EACdC,EACA,CACA,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAuB,IAAI,EAE/CC,EAAsBC,EAAQ,CAClC,YAAa,mDACb,cAAe,qDACf,gBAAiB,uDACjB,kBAAmB,yDACnB,mBAAoB,0DACpB,qBAAsB,4DACtB,eAAgB,sDAChB,iBAAkB,wDAClB,oBAAqB,2DACrB,sBAAuB,6DACvB,YAAa,mDACb,cAAe,qDACf,UAAW,iDACX,YAAa,mDACb,0BAA2B,iEAC3B,4BAA6B,kEAAA,CAC9B,EAEKC,EAAeC,EACnB,KAAO,CACL,GAAGH,EACH,GAAGJ,CAAA,GAEL,CAACI,EAAqBJ,CAAoB,CAAA,EAGtCQ,EAAWD,EACf,KAAO,CACL,OAAQ,CAEN,gBAAiB,CACf,QAASD,EAAa,cACtB,MAAOA,EAAa,WAAA,CACtB,EAEF,IAAK,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,EAAM,cAAc,OAAQ,CAAE,GAAI,QAAS,GAAI,QAAS,GAAI,QAAS,GAAI,QAAS,OAAQ,eAAgB,YAAa,CAAC,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,GAAI,QAAS,GAAI,MAAO,GAAI,QAAS,GAAI,MAAO,OAAQ,eAAgB,YAAa,CAAC,CAAE,EAAmBA,EAAM,cAAc,SAAU,CAAE,GAAI,QAAS,GAAI,QAAS,EAAG,QAAU,KAAM,cAAc,CAAE,EAAmBA,EAAM,cAAc,SAAU,CAAE,GAAI,QAAS,GAAI,QAAS,EAAG,QAAU,KAAM,cAAc,CAAE,EAAmBA,EAAM,cAAc,SAAU,CAAE,GAAI,QAAS,GAAI,QAAS,EAAG,QAAU,KAAM,cAAc,CAAE,CAAC,EC0B9iCC,EAA+C,CAAC,CAC3D,UAAAC,EACA,YAAAC,EACA,GAAGJ,CACL,IAEIK,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,aAAcH,CAAS,CAAC,EAC5C,cAAY,aACX,GAAGH,EAEJ,SAAA,CAAAO,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 } = payload;\n setAlert({\n type,\n description: messages[action][context][type],\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","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,8BAA+B,OAC3CE,EAAAD,EAAM,SAAN,YAAAC,EAAc,mBAAoB,EAAA,CAExC,CAAC,EAED,MAAO,IAAME,GAAA,YAAAA,EAAgB,KAC/B,EAAG,CAAA,CAAE,EAEE,CAAE,UAAAP,CAAA,CACX,ECvCMS,EAAWC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAK,EAAoBC,EAAM,cAAc,OAAQ,CAAE,EAAG,QAAS,EAAG,KAAM,MAAO,QAAS,OAAQ,KAAM,GAAI,KAAM,OAAQ,eAAgB,YAAa,CAAC,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,GAAI,QAAS,GAAI,QAAS,GAAI,QAAS,GAAI,QAAS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,EAAa,cACtB,MAAOA,EAAa,WAAA,CACtB,EAEF,OAAQ,CACN,QAAS,CACP,QAASA,EAAa,kBACtB,MAAOA,EAAa,eAAA,EAEtB,gBAAiB,CACf,QAASA,EAAa,qBACtB,MAAOA,EAAa,kBAAA,CACtB,EAEF,KAAM,CAEJ,QAAS,CACP,QAASA,EAAa,YACtB,MAAOA,EAAa,SAAA,CACtB,CACF,GAEF,CAACA,CAAY,CAAA,EAGTG,EAA6BC,EAChCC,GAA0C,CACzC,KAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,KAAAC,GAASJ,EACxCR,EAAS,CACP,KAAAS,EACA,YAAaJ,EAASK,CAAM,EAAEC,CAAO,EAAEF,CAAI,EAC3C,IAAKG,GAAA,YAAAA,EAAO,EAAC,CACd,EAED,MAAMC,EAAQ,WAAW,IAAM,CAC7Bb,EAAS,IAAI,CACf,EAAG,GAAI,EAEP,MAAO,IAAM,aAAaa,CAAK,CACjC,EACA,CAACR,CAAQ,CAAA,EAGX,MAAO,CAAE,MAAAN,EAAO,SAAAC,EAAU,2BAAAM,CAAA,CAC5B,CClGO,MAAMQ,EAA+C,CAAC,CAC3D,UAAAC,EACA,YAAAC,EACA,GAAGrB,CACL,IAEIsB,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,aAAcH,CAAS,CAAC,EAC5C,cAAY,aACX,GAAGpB,EAEJ,SAAA,CAAAwB,EAACC,GAAK,OAAQC,EAAM,KAAM,KAAM,OAAQ,IAAK,EAC5CL,GAAeG,EAAC,KAAA,CAAI,SAAAH,CAAA,CAAY,CAAA,CAAA,CAAA","x_google_ignoreList":[1]}
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{c,R as m,f as a,h as I,t as T}from"./updateRequisitionList.js";import{events as p}from"@dropins/tools/event-bus.js";function S(i){var r;return{sku:i.sku,parent_sku:i.sku,name:i.name,price:i.price,shortDescription:i.shortDescription||"",metaDescription:i.metaDescription||"",metaKeyword:i.metaKeyword||"",metaTitle:i.metaTitle||"",description:i.description||"",addToCartAllowed:i.addToCartAllowed,url:i.url||"",urlKey:i.urlKey||"",externalId:i.externalId||"",images:((r=i.images)==null?void 0:r.map(t=>({url:t.url,label:t.label||"",roles:t.roles||[]})))||[]}}function U(i){return i!=null&&i.length?i.map(S):[]}const L=`
3
+ import{c as m,R as a,f as I,h as _,e as T,t as c}from"./updateRequisitionList.js";import{events as q}from"@dropins/tools/event-bus.js";function R(i){var r;return{sku:i.sku,parent_sku:i.sku,name:i.name,price:i.price,shortDescription:i.shortDescription||"",metaDescription:i.metaDescription||"",metaKeyword:i.metaKeyword||"",metaTitle:i.metaTitle||"",description:i.description||"",addToCartAllowed:i.addToCartAllowed,stock_status:i.inStock?"IN_STOCK":"OUT_OF_STOCK",only_x_left_in_stock:null,url:i.url||"",urlKey:i.urlKey||"",externalId:i.externalId||"",images:((r=i.images)==null?void 0:r.map(t=>({url:t.url,label:t.label||"",roles:t.roles||[]})))||[]}}function L(i){return i!=null&&i.length?i.map(R):[]}const E=`
4
4
  query GET_REQUISITION_LIST_QUERY(
5
5
  $requisitionListUid: String,
6
6
  $currentPage: Int = 1,
@@ -23,35 +23,9 @@ import{c,R as m,f as a,h as I,t as T}from"./updateRequisitionList.js";import{eve
23
23
  }
24
24
  }
25
25
  }
26
- ${c}
27
26
  ${m}
28
- `,f=`
29
- query REFINE_PRODUCT(
30
- $optionIds: [String!]!,
31
- $sku: String!
32
- ) {
33
- refineProduct(
34
- optionIds: $optionIds
35
- sku: $sku
36
- ) {
37
- sku
38
- name
39
- images {
40
- url
41
- }
42
- ... on SimpleProductView {
43
- price {
44
- final {
45
- amount {
46
- value
47
- currency
48
- }
49
- }
50
- }
51
- }
52
- }
53
- }
54
- `;function g(i){return!i||typeof i!="string"||i.length<2||!/^[A-Za-z0-9+/]+(==|=)?$/.test(i)?!1:i.length%4===0}const M=async(i,r,t)=>{if(!g(i))return console.error("Invalid requisition list UID format:",i),null;const n=s=>s.configurable_options.map(e=>btoa(`configurable/${atob(e.configurable_product_option_uid)}/${atob(e.configurable_product_option_value_uid)}`));return a(L,{variables:{requisitionListUid:i,currentPage:r,pageSize:t}}).then(async({errors:s,data:e})=>{var d,R;if(s)return I(s);if(!((d=e==null?void 0:e.customer)!=null&&d.requisition_lists))return null;const l=await Promise.all((R=e==null?void 0:e.customer)==null?void 0:R.requisition_lists.items[0].items.items.map(async o=>{if(!o.product||!o.configurable_options)return o;const q=n(o),{errors:E,data:_}=await a(f,{variables:{optionIds:q,sku:o.product.sku}});return E?(console.error("Failed to refine product:",E),o):_!=null&&_.refineProduct?{...o,configured_product:_.refineProduct}:o}));e.customer.requisition_lists.items[0].items.items=l;const u=T(e.customer.requisition_lists.items[0]);return p.emit("requisitionList/data",u),u})},N=`
27
+ ${a}
28
+ `;function S(i){return!i||typeof i!="string"||i.length<2||!/^[A-Za-z0-9+/]+(==|=)?$/.test(i)?!1:i.length%4===0}const y=async(i,r,t)=>S(i)?I(E,{variables:{requisitionListUid:i,currentPage:r,pageSize:t}}).then(async({errors:n,data:s})=>{var u,o;if(n)return _(n);if(!((u=s==null?void 0:s.customer)!=null&&u.requisition_lists))return null;(o=s.customer.requisition_lists.items[0].items)!=null&&o.items&&(s.customer.requisition_lists.items[0].items.items=await T(s.customer.requisition_lists.items[0].items.items));const e=c(s.customer.requisition_lists.items[0]);return q.emit("requisitionList/data",e),e}):(console.error("Invalid requisition list UID format:",i),null),p=`
55
29
  mutation UPDATE_REQUISITION_LIST_ITEMS_MUTATION(
56
30
  $requisitionListUid: ID!,
57
31
  $requisitionListItems: [UpdateRequisitionListItemsInput!]!,
@@ -70,9 +44,9 @@ ${m}
70
44
  }
71
45
  }
72
46
  }
47
+ ${a}
73
48
  ${m}
74
- ${c}
75
- `,b=async(i,r,t,n)=>a(N,{variables:{requisitionListUid:i,requisitionListItems:r,pageSize:t,currentPage:n}}).then(({errors:s,data:e})=>{var u;if(s)return I(s);if(!((u=e==null?void 0:e.updateRequisitionListItems)!=null&&u.requisition_list))return null;const l=T(e.updateRequisitionListItems.requisition_list);return p.emit("requisitionList/data",l),l}),P=`
49
+ `,A=async(i,r,t,n)=>I(p,{variables:{requisitionListUid:i,requisitionListItems:r,pageSize:t,currentPage:n}}).then(async({errors:s,data:e})=>{var o,l;if(s)return _(s);if(!((o=e==null?void 0:e.updateRequisitionListItems)!=null&&o.requisition_list))return null;(l=e.updateRequisitionListItems.requisition_list.items)!=null&&l.items&&(e.updateRequisitionListItems.requisition_list.items.items=await T(e.updateRequisitionListItems.requisition_list.items.items));const u=c(e.updateRequisitionListItems.requisition_list);return q.emit("requisitionList/data",u),u}),U=`
76
50
  mutation DELETE_REQUISITION_LIST_ITEMS_MUTATION(
77
51
  $requisitionListUid: ID!,
78
52
  $requisitionListItemUids: [ID!]!,
@@ -91,9 +65,9 @@ ${c}
91
65
  }
92
66
  }
93
67
  }
68
+ ${a}
94
69
  ${m}
95
- ${c}
96
- `,v=async(i,r,t,n)=>a(P,{variables:{requisitionListUid:i,requisitionListItemUids:r,pageSize:t,currentPage:n}}).then(({errors:s,data:e})=>{var u;if(s)return I(s);if(!((u=e==null?void 0:e.deleteRequisitionListItems)!=null&&u.requisition_list))return null;const l=T(e.deleteRequisitionListItems.requisition_list);return p.emit("requisitionList/data",l),l}),$=`
70
+ `,P=async(i,r,t,n)=>I(U,{variables:{requisitionListUid:i,requisitionListItemUids:r,pageSize:t,currentPage:n}}).then(async({errors:s,data:e})=>{var o,l;if(s)return _(s);if(!((o=e==null?void 0:e.deleteRequisitionListItems)!=null&&o.requisition_list))return null;(l=e.deleteRequisitionListItems.requisition_list.items)!=null&&l.items&&(e.deleteRequisitionListItems.requisition_list.items.items=await T(e.deleteRequisitionListItems.requisition_list.items.items));const u=c(e.deleteRequisitionListItems.requisition_list);return q.emit("requisitionList/data",u),u}),d=`
97
71
  fragment PRODUCT_FRAGMENT on ProductView {
98
72
  __typename
99
73
  id
@@ -226,14 +200,14 @@ fragment PRICE_RANGE_FRAGMENT on ComplexProductView {
226
200
  }
227
201
  }
228
202
  }
229
- `,O=`
203
+ `,f=`
230
204
  query GET_PRODUCT_DATA($skus: [String]) {
231
205
  products(skus: $skus) {
232
206
  ...PRODUCT_FRAGMENT
233
207
  }
234
208
  }
235
- ${$}
236
- `,C=async i=>a(O,{variables:{skus:i}}).then(({errors:r,data:t})=>r?I(r):t!=null&&t.products?U(t.products):null),y=`
209
+ ${d}
210
+ `,$=async i=>I(f,{variables:{skus:i}}).then(({errors:r,data:t})=>r?_(r):t!=null&&t.products?L(t.products):null),N=`
237
211
  mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(
238
212
  $requisitionListUid: ID!,
239
213
  $requisitionListItemUids: [ID!]!
@@ -263,5 +237,5 @@ fragment PRICE_RANGE_FRAGMENT on ComplexProductView {
263
237
  }
264
238
  }
265
239
  }
266
- `,G=async(i,r)=>a(y,{variables:{requisitionListUid:i,requisitionListItemUids:r}}).then(({errors:t,data:n})=>{var s;return t?I(t):(s=n.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors)!=null&&s.length?n.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors.map(e=>e.type):null});export{G as a,C as b,v as d,M as g,g as i,b as u};
240
+ `,D=async(i,r)=>I(N,{variables:{requisitionListUid:i,requisitionListItemUids:r}}).then(({errors:t,data:n})=>{var s;return t?_(t):(s=n.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors)!=null&&s.length?n.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors.map(e=>e.type):null});export{D as a,$ as b,P as d,y as g,S as i,A as u};
267
241
  //# sourceMappingURL=addRequisitionListItemsToCart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addRequisitionListItemsToCart.js","sources":["/@dropins/storefront-requisition-list/src/data/transforms/transform-product.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionList/graphql/getRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionList/graphql/refineProduct.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/fragments/ProductFragment.graphql.ts","/@dropins/storefront-requisition-list/src/api/getProductData/graphql/getProductData.ts","/@dropins/storefront-requisition-list/src/api/getProductData/getProductData.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 *******************************************************************/\n\nimport { Product } from '@/requisitionList/data/models';\n\n// Interface for raw product data from GraphQL API\nexport interface RawProductData {\n __typename: string;\n id: string;\n sku: string;\n name: string;\n shortDescription?: string;\n metaDescription?: string;\n metaKeyword?: string;\n metaTitle?: string;\n description?: string;\n inStock: boolean;\n addToCartAllowed: boolean;\n url?: string;\n urlKey?: string;\n externalId?: string;\n images?: {\n url: string;\n label?: string;\n roles?: string[];\n }[];\n attributes?: {\n name: string;\n label: string;\n value: string;\n roles?: string[];\n }[];\n price?: {\n roles?: string[];\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n };\n priceRange?: {\n maximum?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n minimum?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n };\n options?: {\n id: string;\n title: string;\n required: boolean;\n multi: boolean;\n values: {\n id: string;\n title: string;\n inStock: boolean;\n __typename: string;\n quantity?: number;\n isDefault?: boolean;\n type?: string;\n value?: string;\n product?: {\n sku: string;\n name: string;\n shortDescription?: string;\n metaDescription?: string;\n metaKeyword?: string;\n metaTitle?: string;\n price?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n };\n }[];\n }[];\n}\n\nexport function transformProduct(data: RawProductData): Product {\n return {\n sku: data.sku,\n parent_sku: data.sku, // Use same SKU as parent for simple products\n name: data.name,\n price: data.price,\n shortDescription: data.shortDescription || '',\n metaDescription: data.metaDescription || '',\n metaKeyword: data.metaKeyword || '',\n metaTitle: data.metaTitle || '',\n description: data.description || '',\n addToCartAllowed: data.addToCartAllowed,\n url: data.url || '',\n urlKey: data.urlKey || '',\n externalId: data.externalId || '',\n images:\n data.images?.map((image) => ({\n url: image.url,\n label: image.label || '',\n roles: image.roles || [],\n })) || [],\n };\n}\n\nexport function transformProducts(products: RawProductData[]): Product[] {\n if (!products?.length) return [];\n\n return products.map(transformProduct);\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 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\nexport const REFINE_PRODUCT = `\n query REFINE_PRODUCT(\n $optionIds: [String!]!,\n $sku: String!\n ) {\n refineProduct(\n optionIds: $optionIds\n sku: $sku\n ) {\n sku\n name\n images {\n url\n }\n ... on SimpleProductView {\n price {\n final {\n amount {\n value\n currency\n }\n }\n }\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\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 { REFINE_PRODUCT } from '@/requisitionList/api/getRequisitionList/graphql/refineProduct';\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, ConfigurableOption } 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): 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 // encodes option UID string into base64 string for refineProduct query\n // 'configurable/93/13' -> 'Y29uZmlndXJhYmxlLzkzLzEz'\n const encodeOptionUids = (item: Item): string[] => {\n return item.configurable_options.map((option: ConfigurableOption) => {\n return btoa(\n `configurable/${atob(option.configurable_product_option_uid)}/${atob(\n option.configurable_product_option_value_uid\n )}`\n );\n });\n };\n\n return fetchGraphQl(GET_REQUISITION_LIST_QUERY, {\n variables: {\n requisitionListUid: requisitionListID,\n currentPage,\n pageSize,\n },\n }).then(async ({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists) {\n return null;\n }\n const itemsWithConfigurableProducts = await Promise.all(\n data?.customer?.requisition_lists.items[0].items.items.map(\n async (item: Item) => {\n if (!item.product || !item.configurable_options) return item;\n\n const optionIds = encodeOptionUids(item);\n\n const { errors, data: refineData } = await fetchGraphQl(\n REFINE_PRODUCT,\n {\n variables: {\n optionIds,\n sku: item.product.sku,\n },\n }\n );\n\n if (errors) {\n console.error('Failed to refine product:', errors);\n return item;\n }\n\n if (!refineData?.refineProduct) {\n return item;\n }\n\n return {\n ...item,\n configured_product: refineData.refineProduct,\n };\n }\n )\n );\n\n // Update the items in the data structure\n data.customer.requisition_lists.items[0].items.items =\n itemsWithConfigurableProducts;\n\n const payload = transformRequisitionList(\n data.customer.requisition_lists.items[0]\n );\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 *******************************************************************/\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 { 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): Promise<RequisitionList | null> => {\n return fetchGraphQl(UPDATE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItems,\n pageSize,\n currentPage,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.updateRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const payload = transformRequisitionList(\n data.updateRequisitionListItems.requisition_list\n );\n\n events.emit('requisitionList/data', payload);\n\n return payload;\n });\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 { 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): Promise<RequisitionList | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItemUids: items,\n pageSize,\n currentPage,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionListItems?.requisition_list) {\n return null;\n }\n\n const payload = transformRequisitionList(\n data.deleteRequisitionListItems.requisition_list\n );\n events.emit('requisitionList/data', payload);\n\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\nexport const PRODUCT_FRAGMENT = `\nfragment PRODUCT_FRAGMENT on ProductView {\n __typename\n id\n sku\n name\n shortDescription\n metaDescription\n metaKeyword\n metaTitle\n description\n inStock\n addToCartAllowed\n url\n urlKey\n externalId\n images(roles: []) {\n url\n label\n roles\n }\n attributes(roles: []) {\n name\n label\n value\n roles\n }\n ... on SimpleProductView {\n price {\n roles\n regular {\n amount {\n value\n currency\n }\n }\n final {\n amount {\n value\n currency\n }\n }\n }\n }\n ... on ComplexProductView {\n options {\n ...PRODUCT_OPTION_FRAGMENT\n }\n ...PRICE_RANGE_FRAGMENT\n }\n}\nfragment PRODUCT_OPTION_FRAGMENT on ProductViewOption {\n id\n title\n required\n multi\n values {\n id\n title\n inStock\n __typename\n ... on ProductViewOptionValueProduct {\n title\n quantity\n isDefault\n __typename\n product {\n sku\n shortDescription\n metaDescription\n metaKeyword\n metaTitle\n name\n price {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\n }\n }\n }\n ... on ProductViewOptionValueSwatch {\n id\n title\n type\n value\n inStock\n }\n }\n}\nfragment PRICE_RANGE_FRAGMENT on ComplexProductView {\n priceRange {\n maximum {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\n }\n minimum {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\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 { PRODUCT_FRAGMENT } from '@/requisitionList/api/fragments/ProductFragment.graphql';\n\nexport const GET_PRODUCT_DATA_QUERY = `\n query GET_PRODUCT_DATA($skus: [String]) {\n products(skus: $skus) {\n ...PRODUCT_FRAGMENT\n }\n }\n ${PRODUCT_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 { transformProducts } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { GET_PRODUCT_DATA_QUERY } from './graphql/getProductData';\nimport { Product } from '@/requisitionList/data/models/item';\n\nexport const getProductData = async (\n skus: string[]\n): Promise<Product[] | null> => {\n return fetchGraphQl(GET_PRODUCT_DATA_QUERY, {\n variables: {\n skus,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.products) {\n return null;\n }\n\n return transformProducts(data.products);\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\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 const addRequisitionListItemsToCart = async (\n requisitionListUid: string,\n requisitionListItemUids: Array<string>\n): Promise<Array<string> | 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) => e.type\n );\n }\n return null;\n });\n};\n"],"names":["transformProduct","data","_a","image","transformProducts","products","GET_REQUISITION_LIST_QUERY","REQUISITION_LIST_ITEMS_FRAGMENT","REQUISITION_LIST_FRAGMENT","REFINE_PRODUCT","isValidBase64Uid","uid","getRequisitionList","requisitionListID","currentPage","pageSize","encodeOptionUids","item","option","fetchGraphQl","errors","handleFetchError","itemsWithConfigurableProducts","_b","optionIds","refineData","payload","transformRequisitionList","events","UPDATE_REQUISITION_LIST_ITEMS_MUTATION","updateRequisitionListItems","requisitionListUid","requisitionListItems","DELETE_REQUISITION_LIST_ITEMS_MUTATION","deleteRequisitionListItems","items","PRODUCT_FRAGMENT","GET_PRODUCT_DATA_QUERY","getProductData","skus","ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION","addRequisitionListItemsToCart","requisitionListItemUids"],"mappings":"2HAsIO,SAASA,EAAiBC,EAA+B,OAC9D,MAAO,CACL,IAAKA,EAAK,IACV,WAAYA,EAAK,IACjB,KAAMA,EAAK,KACX,MAAOA,EAAK,MACZ,iBAAkBA,EAAK,kBAAoB,GAC3C,gBAAiBA,EAAK,iBAAmB,GACzC,YAAaA,EAAK,aAAe,GACjC,UAAWA,EAAK,WAAa,GAC7B,YAAaA,EAAK,aAAe,GACjC,iBAAkBA,EAAK,iBACvB,IAAKA,EAAK,KAAO,GACjB,OAAQA,EAAK,QAAU,GACvB,WAAYA,EAAK,YAAc,GAC/B,SACEC,EAAAD,EAAK,SAAL,YAAAC,EAAa,IAAKC,IAAW,CAC3B,IAAKA,EAAM,IACX,MAAOA,EAAM,OAAS,GACtB,MAAOA,EAAM,OAAS,CAAA,CAAC,MAClB,CAAA,CAAC,CAEd,CAEO,SAASC,EAAkBC,EAAuC,CACvE,OAAKA,GAAA,MAAAA,EAAU,OAERA,EAAS,IAAIL,CAAgB,EAFN,CAAA,CAGhC,CC/IO,MAAMM,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,EC1BdC,EAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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nB,GAAA,MAAAA,EAAM,SAIJG,EAAkBH,EAAK,QAAQ,EAH7B,IAIV,ECrBUuC,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,ECI9CC,EAAgC,MAC3CV,EACAW,IAEOvB,EAAaqB,EAA6C,CAC/D,UAAW,CACT,mBAAAT,EACA,wBAAAW,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAAtB,EAAQ,KAAAnB,KAAW,OAC5B,OAAImB,EAAeC,EAAiBD,CAAM,GAGxClB,EAAAD,EAAK,8BACF,iDADH,MAAAC,EACmD,OAE5CD,EAAK,8BAA8B,+CAA+C,IACtF,GAAW,EAAE,IAAA,EAGX,IACT,CAAC"}
1
+ {"version":3,"file":"addRequisitionListItemsToCart.js","sources":["/@dropins/storefront-requisition-list/src/data/transforms/transform-product.ts","/@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/fragments/ProductFragment.graphql.ts","/@dropins/storefront-requisition-list/src/api/getProductData/graphql/getProductData.ts","/@dropins/storefront-requisition-list/src/api/getProductData/getProductData.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 *******************************************************************/\n\nimport { Product } from '@/requisitionList/data/models';\n\n// Interface for raw product data from GraphQL API\nexport interface RawProductData {\n __typename: string;\n id: string;\n sku: string;\n name: string;\n shortDescription?: string;\n metaDescription?: string;\n metaKeyword?: string;\n metaTitle?: string;\n description?: string;\n inStock: boolean;\n addToCartAllowed: boolean;\n url?: string;\n urlKey?: string;\n externalId?: string;\n images?: {\n url: string;\n label?: string;\n roles?: string[];\n }[];\n attributes?: {\n name: string;\n label: string;\n value: string;\n roles?: string[];\n }[];\n price?: {\n roles?: string[];\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n };\n priceRange?: {\n maximum?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n minimum?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n };\n options?: {\n id: string;\n title: string;\n required: boolean;\n multi: boolean;\n values: {\n id: string;\n title: string;\n inStock: boolean;\n __typename: string;\n quantity?: number;\n isDefault?: boolean;\n type?: string;\n value?: string;\n product?: {\n sku: string;\n name: string;\n shortDescription?: string;\n metaDescription?: string;\n metaKeyword?: string;\n metaTitle?: string;\n price?: {\n final?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n regular?: {\n amount: {\n value: number;\n currency: string;\n };\n };\n roles?: string[];\n };\n };\n }[];\n }[];\n}\n\nexport function transformProduct(data: RawProductData): Product {\n return {\n sku: data.sku,\n parent_sku: data.sku, // Use same SKU as parent for simple products\n name: data.name,\n price: data.price,\n shortDescription: data.shortDescription || '',\n metaDescription: data.metaDescription || '',\n metaKeyword: data.metaKeyword || '',\n metaTitle: data.metaTitle || '',\n description: data.description || '',\n addToCartAllowed: data.addToCartAllowed,\n stock_status: data.inStock ? 'IN_STOCK' : 'OUT_OF_STOCK',\n only_x_left_in_stock: null,\n url: data.url || '',\n urlKey: data.urlKey || '',\n externalId: data.externalId || '',\n images:\n data.images?.map((image) => ({\n url: image.url,\n label: image.label || '',\n roles: image.roles || [],\n })) || [],\n };\n}\n\nexport function transformProducts(products: RawProductData[]): Product[] {\n if (!products?.length) return [];\n\n return products.map(transformProduct);\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 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 { enrichConfigurableProducts } from '@/requisitionList/api/refineProduct';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { isValidBase64Uid } from '@/requisitionList/lib/validate-uid';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionList = async (\n requisitionListID: string,\n currentPage?: number,\n pageSize?: number\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 return fetchGraphQl(GET_REQUISITION_LIST_QUERY, {\n variables: {\n requisitionListUid: requisitionListID,\n currentPage,\n pageSize,\n },\n }).then(async ({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists) {\n return null;\n }\n\n // Enrich configurable products with variant data if items are present\n if (data.customer.requisition_lists.items[0].items?.items) {\n data.customer.requisition_lists.items[0].items.items =\n await enrichConfigurableProducts(\n data.customer.requisition_lists.items[0].items.items\n );\n }\n\n const payload = transformRequisitionList(\n data.customer.requisition_lists.items[0]\n );\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 *******************************************************************/\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 { enrichConfigurableProducts } from '@/requisitionList/api/refineProduct';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\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): Promise<RequisitionList | null> => {\n return fetchGraphQl(UPDATE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItems,\n pageSize,\n currentPage,\n },\n }).then(async ({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.updateRequisitionListItems?.requisition_list) {\n return null;\n }\n\n // Enrich configurable products with variant data if items are present\n if (data.updateRequisitionListItems.requisition_list.items?.items) {\n data.updateRequisitionListItems.requisition_list.items.items =\n await enrichConfigurableProducts(\n data.updateRequisitionListItems.requisition_list.items.items\n );\n }\n\n const payload = transformRequisitionList(\n data.updateRequisitionListItems.requisition_list\n );\n\n events.emit('requisitionList/data', payload);\n\n return payload;\n });\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 { fetchGraphQl } from '@/requisitionList/api';\nimport { enrichConfigurableProducts } from '@/requisitionList/api/refineProduct';\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): Promise<RequisitionList | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItemUids: items,\n pageSize,\n currentPage,\n },\n }).then(async ({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionListItems?.requisition_list) {\n return null;\n }\n\n // Enrich configurable products with variant data if items are present\n if (data.deleteRequisitionListItems.requisition_list.items?.items) {\n data.deleteRequisitionListItems.requisition_list.items.items =\n await enrichConfigurableProducts(\n data.deleteRequisitionListItems.requisition_list.items.items\n );\n }\n\n const payload = transformRequisitionList(\n data.deleteRequisitionListItems.requisition_list\n );\n events.emit('requisitionList/data', payload);\n\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\nexport const PRODUCT_FRAGMENT = `\nfragment PRODUCT_FRAGMENT on ProductView {\n __typename\n id\n sku\n name\n shortDescription\n metaDescription\n metaKeyword\n metaTitle\n description\n inStock\n addToCartAllowed\n url\n urlKey\n externalId\n images(roles: []) {\n url\n label\n roles\n }\n attributes(roles: []) {\n name\n label\n value\n roles\n }\n ... on SimpleProductView {\n price {\n roles\n regular {\n amount {\n value\n currency\n }\n }\n final {\n amount {\n value\n currency\n }\n }\n }\n }\n ... on ComplexProductView {\n options {\n ...PRODUCT_OPTION_FRAGMENT\n }\n ...PRICE_RANGE_FRAGMENT\n }\n}\nfragment PRODUCT_OPTION_FRAGMENT on ProductViewOption {\n id\n title\n required\n multi\n values {\n id\n title\n inStock\n __typename\n ... on ProductViewOptionValueProduct {\n title\n quantity\n isDefault\n __typename\n product {\n sku\n shortDescription\n metaDescription\n metaKeyword\n metaTitle\n name\n price {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\n }\n }\n }\n ... on ProductViewOptionValueSwatch {\n id\n title\n type\n value\n inStock\n }\n }\n}\nfragment PRICE_RANGE_FRAGMENT on ComplexProductView {\n priceRange {\n maximum {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\n }\n minimum {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\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 { PRODUCT_FRAGMENT } from '@/requisitionList/api/fragments/ProductFragment.graphql';\n\nexport const GET_PRODUCT_DATA_QUERY = `\n query GET_PRODUCT_DATA($skus: [String]) {\n products(skus: $skus) {\n ...PRODUCT_FRAGMENT\n }\n }\n ${PRODUCT_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 { transformProducts } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { GET_PRODUCT_DATA_QUERY } from './graphql/getProductData';\nimport { Product } from '@/requisitionList/data/models/item';\n\nexport const getProductData = async (\n skus: string[]\n): Promise<Product[] | null> => {\n return fetchGraphQl(GET_PRODUCT_DATA_QUERY, {\n variables: {\n skus,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.products) {\n return null;\n }\n\n return transformProducts(data.products);\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\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 const addRequisitionListItemsToCart = async (\n requisitionListUid: string,\n requisitionListItemUids: Array<string>\n): Promise<Array<string> | 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) => e.type\n );\n }\n return null;\n });\n};\n"],"names":["transformProduct","data","_a","image","transformProducts","products","GET_REQUISITION_LIST_QUERY","REQUISITION_LIST_ITEMS_FRAGMENT","REQUISITION_LIST_FRAGMENT","isValidBase64Uid","uid","getRequisitionList","requisitionListID","currentPage","pageSize","fetchGraphQl","errors","handleFetchError","_b","enrichConfigurableProducts","payload","transformRequisitionList","events","UPDATE_REQUISITION_LIST_ITEMS_MUTATION","updateRequisitionListItems","requisitionListUid","requisitionListItems","DELETE_REQUISITION_LIST_ITEMS_MUTATION","deleteRequisitionListItems","items","PRODUCT_FRAGMENT","GET_PRODUCT_DATA_QUERY","getProductData","skus","ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION","addRequisitionListItemsToCart","requisitionListItemUids"],"mappings":"uIAsIO,SAASA,EAAiBC,EAA+B,OAC9D,MAAO,CACL,IAAKA,EAAK,IACV,WAAYA,EAAK,IACjB,KAAMA,EAAK,KACX,MAAOA,EAAK,MACZ,iBAAkBA,EAAK,kBAAoB,GAC3C,gBAAiBA,EAAK,iBAAmB,GACzC,YAAaA,EAAK,aAAe,GACjC,UAAWA,EAAK,WAAa,GAC7B,YAAaA,EAAK,aAAe,GACjC,iBAAkBA,EAAK,iBACvB,aAAcA,EAAK,QAAU,WAAa,eAC1C,qBAAsB,KACtB,IAAKA,EAAK,KAAO,GACjB,OAAQA,EAAK,QAAU,GACvB,WAAYA,EAAK,YAAc,GAC/B,SACEC,EAAAD,EAAK,SAAL,YAAAC,EAAa,IAAKC,IAAW,CAC3B,IAAKA,EAAM,IACX,MAAOA,EAAM,OAAS,GACtB,MAAOA,EAAM,OAAS,CAAA,CAAC,MAClB,CAAA,CAAC,CAEd,CAEO,SAASC,EAAkBC,EAAuC,CACvE,OAAKA,GAAA,MAAAA,EAAU,OAERA,EAAS,IAAIL,CAAgB,EAFN,CAAA,CAGhC,CCjJO,MAAMM,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,SAASC,EAAiBC,EAAyC,CAUxE,MAT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W,IAEOrB,EAAamB,EAA6C,CAC/D,UAAW,CACT,mBAAAT,EACA,wBAAAW,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAApB,EAAQ,KAAAf,KAAW,OAC5B,OAAIe,EAAeC,EAAiBD,CAAM,GAGxCd,EAAAD,EAAK,8BACF,iDADH,MAAAC,EACmD,OAE5CD,EAAK,8BAA8B,+CAA+C,IACtF,GAAW,EAAE,IAAA,EAGX,IACT,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as I,f as a,h as c,t as g}from"./updateRequisitionList.js";import{events as m}from"@dropins/tools/event-bus.js";const p=`
3
+ import{R as a,f as m,h as g,t as l}from"./updateRequisitionList.js";import{events as p}from"@dropins/tools/event-bus.js";const S=`
4
4
  query GET_REQUISITION_LISTS_QUERY(
5
5
  $currentPage: Int = 1
6
6
  $pageSize: Int = 10,
@@ -19,6 +19,6 @@ import{R as I,f as a,h as c,t as g}from"./updateRequisitionList.js";import{event
19
19
  }
20
20
  }
21
21
  }
22
- ${I}
23
- `,l=async(o,u)=>a(p,{variables:{currentPage:o,pageSize:u}}).then(({errors:t,data:e})=>{var s,r,n;if(t)return c(t);if(!((s=e==null?void 0:e.customer)!=null&&s.requisition_lists))return null;const i=e.customer.requisition_lists.items.map(_=>g(_));return m.emit("requisitionLists/data",i),{items:i,page_info:(n=(r=e.customer)==null?void 0:r.requisition_lists)==null?void 0:n.page_info}});export{l as g};
22
+ ${a}
23
+ `,R=async(_,c)=>m(S,{variables:{currentPage:_,pageSize:c}}).then(({errors:e,data:t})=>{var s,r,n,o,u;if(e)return g(e);if(!((s=t==null?void 0:t.customer)!=null&&s.requisition_lists))return null;const i=t.customer.requisition_lists.items.map(I=>l(I));return p.emit("requisitionLists/data",i),{items:i,page_info:(n=(r=t.customer)==null?void 0:r.requisition_lists)==null?void 0:n.page_info,total_count:(u=(o=t.customer)==null?void 0:o.requisition_lists)==null?void 0:u.total_count}});export{R as g};
24
24
  //# sourceMappingURL=getRequisitionLists.js.map
@@ -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 };\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"],"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,WAC5B,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,SAAA,CAEjD,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,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"}