@dropins/storefront-requisition-list 0.6.0-beta → 0.8.0-beta

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 (80) hide show
  1. package/api/addProductsToRequisitionList/addProductsToRequisitionList.d.ts +11 -2
  2. package/api/getRequisitionList/graphql/refineProduct.d.ts +18 -0
  3. package/api/getStoreConfig/{isRequisitionListEnabled.d.ts → getStoreConfig.d.ts} +2 -2
  4. package/api/getStoreConfig/graphql/storeConfigQuery.d.ts +1 -1
  5. package/api/getStoreConfig/index.d.ts +1 -1
  6. package/api/updateRequisitionList/index.d.ts +1 -1
  7. package/api/updateRequisitionList/updateRequisitionList.d.ts +1 -1
  8. package/api.js +3 -2
  9. package/api.js.map +1 -1
  10. package/chunks/PageSizePicker.js +1 -1
  11. package/chunks/PageSizePicker.js.map +1 -1
  12. package/chunks/RequisitionListActions.js +4 -0
  13. package/chunks/RequisitionListActions.js.map +1 -0
  14. package/chunks/RequisitionListForm.js +1 -37
  15. package/chunks/RequisitionListForm.js.map +1 -1
  16. package/chunks/RequisitionListForm2.js +21 -0
  17. package/chunks/RequisitionListForm2.js.map +1 -0
  18. package/chunks/RequisitionListHeader.js +4 -0
  19. package/chunks/RequisitionListHeader.js.map +1 -0
  20. package/chunks/RequisitionListModal.js +4 -0
  21. package/chunks/RequisitionListModal.js.map +1 -0
  22. package/chunks/RequisitionListView.js +4 -0
  23. package/chunks/RequisitionListView.js.map +1 -0
  24. package/chunks/addRequisitionListItemsToCart.js +40 -14
  25. package/chunks/addRequisitionListItemsToCart.js.map +1 -1
  26. package/chunks/deleteRequisitionList.js +1 -1
  27. package/chunks/deleteRequisitionList.js.map +1 -1
  28. package/chunks/getRequisitionLists.js +1 -1
  29. package/chunks/getRequisitionLists.js.map +1 -1
  30. package/chunks/state.js +4 -0
  31. package/chunks/state.js.map +1 -0
  32. package/chunks/updateRequisitionList.js +108 -0
  33. package/chunks/updateRequisitionList.js.map +1 -0
  34. package/components/NotFound/NotFound.d.ts +11 -0
  35. package/{containers/RequisitionListNames → components/NotFound}/index.d.ts +2 -2
  36. package/components/RequisitionListHeader/RequisitionListHeader.d.ts +20 -0
  37. package/components/RequisitionListHeader/index.d.ts +19 -0
  38. package/components/index.d.ts +2 -0
  39. package/containers/RequisitionListForm.js +1 -1
  40. package/containers/RequisitionListGrid/RequisitionListGrid.d.ts +0 -2
  41. package/containers/RequisitionListGrid.js +1 -1
  42. package/containers/RequisitionListGrid.js.map +1 -1
  43. package/containers/RequisitionListHeader/RequisitionListHeader.d.ts +10 -0
  44. package/containers/RequisitionListHeader/index.d.ts +19 -0
  45. package/containers/RequisitionListHeader.d.ts +1 -0
  46. package/containers/RequisitionListHeader.js +4 -0
  47. package/containers/RequisitionListHeader.js.map +1 -0
  48. package/containers/RequisitionListSelector/RequisitionListSelector.d.ts +12 -0
  49. package/containers/RequisitionListSelector/index.d.ts +19 -0
  50. package/containers/RequisitionListSelector.d.ts +3 -0
  51. package/containers/RequisitionListSelector.js +23 -0
  52. package/containers/RequisitionListSelector.js.map +1 -0
  53. package/containers/RequisitionListView/RequisitionListView.d.ts +12 -5
  54. package/containers/RequisitionListView.js +1 -1
  55. package/containers/RequisitionListView.js.map +1 -1
  56. package/containers/index.d.ts +2 -1
  57. package/data/models/item.d.ts +89 -66
  58. package/data/transforms/transform-requisition-list.d.ts +8 -68
  59. package/hooks/index.d.ts +2 -0
  60. package/hooks/useRequisitionListEnabled.d.ts +20 -0
  61. package/hooks/useRequisitionListGrid.d.ts +1 -2
  62. package/hooks/useRequisitionListSelectedItems.d.ts +3 -3
  63. package/hooks/useRequisitionLists.d.ts +7 -0
  64. package/i18n/en_US.json.d.ts +32 -10
  65. package/lib/constants.d.ts +28 -0
  66. package/lib/state.d.ts +16 -16
  67. package/lib/validate-uid.d.ts +25 -0
  68. package/package.json +1 -1
  69. package/render.js +4 -3
  70. package/render.js.map +1 -1
  71. package/chunks/PageSizePicker2.js +0 -4
  72. package/chunks/PageSizePicker2.js.map +0 -1
  73. package/chunks/RequisitionListItemsFragment.graphql.js +0 -75
  74. package/chunks/RequisitionListItemsFragment.graphql.js.map +0 -1
  75. package/chunks/transform-requisition-list.js +0 -12
  76. package/chunks/transform-requisition-list.js.map +0 -1
  77. package/containers/RequisitionListNames/RequisitionListNames.d.ts +0 -15
  78. package/containers/RequisitionListNames.d.ts +0 -3
  79. package/containers/RequisitionListNames.js +0 -23
  80. package/containers/RequisitionListNames.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as I,f as o,h as a,t as _}from"./transform-requisition-list.js";import{R as l}from"./RequisitionListItemsFragment.graphql.js";import{events as T}from"@dropins/tools/event-bus.js";function m(i){var e;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:((e=i.images)==null?void 0:e.map(t=>({url:t.url,label:t.label||"",roles:t.roles||[]})))||[]}}function c(i){return i!=null&&i.length?i.map(m):[]}const R=`
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=`
4
4
  query GET_REQUISITION_LIST_QUERY(
5
5
  $requisitionListUid: String,
6
6
  $currentPage: Int = 1,
@@ -23,9 +23,35 @@ import{R as I,f as o,h as a,t as _}from"./transform-requisition-list.js";import{
23
23
  }
24
24
  }
25
25
  }
26
- ${l}
27
- ${I}
28
- `,O=async(i,e,t)=>o(R,{variables:{requisitionListUid:i,currentPage:e,pageSize:t}}).then(({errors:r,data:s})=>{var u;if(r)return a(r);if(!((u=s==null?void 0:s.customer)!=null&&u.requisition_lists))return null;const n=_(s.customer.requisition_lists.items[0]);return T.emit("requisitionList/data",n),n}),d=`
26
+ ${c}
27
+ ${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=`
29
55
  mutation UPDATE_REQUISITION_LIST_ITEMS_MUTATION(
30
56
  $requisitionListUid: ID!,
31
57
  $requisitionListItems: [UpdateRequisitionListItemsInput!]!,
@@ -44,9 +70,9 @@ ${I}
44
70
  }
45
71
  }
46
72
  }
47
- ${I}
48
- ${l}
49
- `,A=async(i,e,t,r)=>o(d,{variables:{requisitionListUid:i,requisitionListItems:e,pageSize:t,currentPage:r}}).then(({errors:s,data:n})=>{if(s)return a(s);const u=_(n.updateRequisitionListItems.requisition_list);return T.emit("requisitionList/data",u),u}),E=`
73
+ ${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=`
50
76
  mutation DELETE_REQUISITION_LIST_ITEMS_MUTATION(
51
77
  $requisitionListUid: ID!,
52
78
  $requisitionListItemUids: [ID!]!,
@@ -65,9 +91,9 @@ ${l}
65
91
  }
66
92
  }
67
93
  }
68
- ${I}
69
- ${l}
70
- `,g=async(i,e,t,r)=>o(E,{variables:{requisitionListUid:i,requisitionListItemUids:e,pageSize:t,currentPage:r}}).then(({errors:s,data:n})=>{if(s)return a(s);const u=_(n.deleteRequisitionListItems.requisition_list);return T.emit("requisitionList/data",u),u}),S=`
94
+ ${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}),$=`
71
97
  fragment PRODUCT_FRAGMENT on ProductView {
72
98
  __typename
73
99
  id
@@ -200,14 +226,14 @@ fragment PRICE_RANGE_FRAGMENT on ComplexProductView {
200
226
  }
201
227
  }
202
228
  }
203
- `,L=`
229
+ `,O=`
204
230
  query GET_PRODUCT_DATA($skus: [String]) {
205
231
  products(skus: $skus) {
206
232
  ...PRODUCT_FRAGMENT
207
233
  }
208
234
  }
209
- ${S}
210
- `,$=async i=>o(L,{variables:{skus:i}}).then(({errors:e,data:t})=>e?a(e):t!=null&&t.products?c(t.products):null),q=`
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=`
211
237
  mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(
212
238
  $requisitionListUid: ID!,
213
239
  $requisitionListItemUids: [ID!]!
@@ -237,5 +263,5 @@ fragment PRICE_RANGE_FRAGMENT on ComplexProductView {
237
263
  }
238
264
  }
239
265
  }
240
- `,y=async(i,e)=>o(q,{variables:{requisitionListUid:i,requisitionListItemUids:e}}).then(({errors:t,data:r})=>{var s;return t?a(t):(s=r.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors)!=null&&s.length?r.addRequisitionListItemsToCart.add_requisition_list_items_to_cart_user_errors.map(n=>n.type):null});export{y as a,$ as b,g as d,O as g,A as u};
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};
241
267
  //# 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/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\nimport { GET_REQUISITION_LIST_QUERY } from '@/requisitionList/api/getRequisitionList/graphql/getRequisitionList';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { 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 return fetchGraphQl(GET_REQUISITION_LIST_QUERY, {\n variables: {\n requisitionListUid: requisitionListID,\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 payload = transformRequisitionList(\n data.customer.requisition_lists.items[0]\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 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 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","getRequisitionList","requisitionListID","currentPage","pageSize","fetchGraphQl","errors","handleFetchError","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","e"],"mappings":"4LAsIO,SAASA,EAAiBC,EAA+B,OACvD,MAAA,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,CACxB,MAAO,CAAA,CACX,CACF,CAEO,SAASC,EAAkBC,EAAuC,CACvE,OAAKA,GAAA,MAAAA,EAAU,OAERA,EAAS,IAAIL,CAAgB,EAFN,CAAC,CAGjC,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,C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,KAAK,CAAC,CAAE,OAAAf,EAAQ,KAAAb,KACba,EAAeC,EAAiBD,CAAM,EAErCb,GAAA,MAAAA,EAAM,SAIJG,EAAkBH,EAAK,QAAQ,EAH7B,IAIV,ECrBU6B,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,IAEOnB,EAAaiB,EAA6C,CAC/D,UAAW,CACT,mBAAAT,EACA,wBAAAW,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAlB,EAAQ,KAAAb,KAAW,OACxB,OAAAa,EAAeC,EAAiBD,CAAM,GAGxCZ,EAAAD,EAAK,8BACF,iDADH,MAAAC,EACmD,OAE5CD,EAAK,8BAA8B,+CAA+C,IACtFgC,GAAWA,EAAE,IAChB,EAEK,IAAA,CACR"}
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,OACvD,MAAA,CACL,IAAKA,EAAK,IACV,WAAYA,EAAK,IACjB,KAAMA,EAAK,KACX,MAAOA,EAAK,MACZ,iBAAkBA,EAAK,kBAAoB,GAC3C,gBAAiBA,EAA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,KAAAnB,KAAW,OACxB,OAAAmB,EAAeC,EAAiBD,CAAM,GAGxClB,EAAAD,EAAK,8BACF,iDADH,MAAAC,EACmD,OAE5CD,EAAK,8BAA8B,+CAA+C,IACtF,GAAW,EAAE,IAChB,EAEK,IAAA,CACR"}
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as L,f as T,h as q,t as R}from"./transform-requisition-list.js";import{events as E}from"@dropins/tools/event-bus.js";const a=`
3
+ import{R as L,f as T,h as q,t as R}from"./updateRequisitionList.js";import{events as E}from"@dropins/tools/event-bus.js";const a=`
4
4
  mutation DELETE_REQUISITION_LIST_MUTATION(
5
5
  $requisitionListUid: ID!,
6
6
  ) {
@@ -1 +1 @@
1
- {"version":3,"file":"deleteRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/graphql/deleteRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/deleteRequisitionList.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_MUTATION = `\n mutation DELETE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n ) {\n deleteRequisitionList(\n requisitionListUid: $requisitionListUid\n ) {\n status\n requisition_lists {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { DELETE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/deleteRequisitionList/graphql/deleteRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<{\n items: RequisitionList[];\n page_info: any;\n status: any;\n} | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n },\n }).then(({ errors, data }) => {\n if (!requisitionListUid) return null;\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionList?.requisition_lists) {\n return null;\n }\n\n const reqLists =\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [];\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.deleteRequisitionList?.requisition_lists?.page_info,\n status: data.deleteRequisitionList?.status,\n };\n });\n};\n"],"names":["DELETE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","deleteRequisitionList","requisitionListUid","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","_c","_b","requisitionList","transformRequisitionList","events","_e","_d","_f"],"mappings":"8HAkBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9CC,CAAyB;AAAA,ECfdC,EAAwB,MACnCC,GAMOC,EAAaJ,EAAkC,CACpD,UAAW,CACT,mBAAAG,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,iBACxB,GAAA,CAACH,EAA2B,OAAA,KAC5B,GAAAE,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,mBACzB,OAAA,KAGT,MAAMC,IACJC,GAAAC,EAAAL,EAAK,sBAAsB,oBAA3B,YAAAK,EAA8C,QAA9C,YAAAD,EAAqD,IAClDE,GAAyBC,EAAyBD,CAAe,KAC/D,CAAC,EAED,OAAAE,EAAA,KAAK,wBAAyBL,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWM,GAAAC,EAAAV,EAAK,wBAAL,YAAAU,EAA4B,oBAA5B,YAAAD,EAA+C,UAC1D,QAAQE,EAAAX,EAAK,wBAAL,YAAAW,EAA4B,MACtC,CAAA,CACD"}
1
+ {"version":3,"file":"deleteRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/graphql/deleteRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/deleteRequisitionList.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_MUTATION = `\n mutation DELETE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n ) {\n deleteRequisitionList(\n requisitionListUid: $requisitionListUid\n ) {\n status\n requisition_lists {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { DELETE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/deleteRequisitionList/graphql/deleteRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<{\n items: RequisitionList[];\n page_info: any;\n status: any;\n} | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n },\n }).then(({ errors, data }) => {\n if (!requisitionListUid) return null;\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionList?.requisition_lists) {\n return null;\n }\n\n const reqLists =\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [];\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.deleteRequisitionList?.requisition_lists?.page_info,\n status: data.deleteRequisitionList?.status,\n };\n });\n};\n"],"names":["DELETE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","deleteRequisitionList","requisitionListUid","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","_c","_b","requisitionList","transformRequisitionList","events","_e","_d","_f"],"mappings":"yHAkBO,MAAMA,EAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9CC,CAAyB;AAAA,ECfdC,EAAwB,MACnCC,GAMOC,EAAaJ,EAAkC,CACpD,UAAW,CACT,mBAAAG,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,iBACxB,GAAA,CAACH,EAA2B,OAAA,KAC5B,GAAAE,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,mBACzB,OAAA,KAGT,MAAMC,IACJC,GAAAC,EAAAL,EAAK,sBAAsB,oBAA3B,YAAAK,EAA8C,QAA9C,YAAAD,EAAqD,IAClDE,GAAyBC,EAAyBD,CAAe,KAC/D,CAAC,EAED,OAAAE,EAAA,KAAK,wBAAyBL,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWM,GAAAC,EAAAV,EAAK,wBAAL,YAAAU,EAA4B,oBAA5B,YAAAD,EAA+C,UAC1D,QAAQE,EAAAX,EAAK,wBAAL,YAAAW,EAA4B,MACtC,CAAA,CACD"}
@@ -1,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"./transform-requisition-list.js";import{events as m}from"@dropins/tools/event-bus.js";const p=`
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=`
4
4
  query GET_REQUISITION_LISTS_QUERY(
5
5
  $currentPage: Int = 1
6
6
  $pageSize: Int = 10,
@@ -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":"8HAkBO,MAAMA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzCC,CAAyB;AAAA,ECbdC,EAAsB,MACjCC,EACAC,IAEOC,EAAaL,EAA6B,CAC/C,UAAW,CACT,YAAAG,EACA,SAAAC,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,WACxB,GAAAD,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,WAAN,MAAAE,EAAgB,mBACZ,OAAA,KAGT,MAAMC,EAAWH,EAAK,SAAS,kBAAkB,MAAM,IACpDI,GAAyBC,EAAyBD,CAAe,CACpE,EAEO,OAAAE,EAAA,KAAK,wBAAyBH,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWI,GAAAC,EAAAR,EAAK,WAAL,YAAAQ,EAAe,oBAAf,YAAAD,EAAkC,SAC/C,CAAA,CACD"}
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,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,WACxB,GAAAD,EAAe,OAAAE,EAAiBF,CAAM,EAEtC,GAAA,GAACG,EAAAF,GAAA,YAAAA,EAAM,WAAN,MAAAE,EAAgB,mBACZ,OAAA,KAGT,MAAMC,EAAWH,EAAK,SAAS,kBAAkB,MAAM,IACpDI,GAAyBC,EAAyBD,CAAe,CACpE,EAEO,OAAAE,EAAA,KAAK,wBAAyBH,CAAQ,EAEtC,CACL,MAAOA,EACP,WAAWI,GAAAC,EAAAR,EAAK,WAAL,YAAAQ,EAAe,oBAAf,YAAAD,EAAkC,SAC/C,CAAA,CACD"}
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ const n={authenticated:!1,config:void 0,requisitionLists:[],requisitionListsLoading:!1,requisitionListsVersion:0},s=new Proxy(n,{set(i,e,t){return Reflect.set(i,e,t)},get(i,e){return i[e]}}),o=i=>{s.requisitionLists=i,s.requisitionListsVersion++},u=i=>{s.requisitionLists.some(t=>t.uid===i.uid)?s.requisitionLists=s.requisitionLists.map(t=>t.uid===i.uid?i:t):s.requisitionLists=[...s.requisitionLists,i],s.requisitionListsVersion++},r=i=>{s.requisitionListsLoading=i};export{r as a,o as b,s,u};
4
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sources":["/@dropins/storefront-requisition-list/src/lib/state.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 { RequisitionList } from '@/requisitionList/data/models/requisitionList';\n\nexport type StoreConfig = {\n is_requisition_list_active?: string;\n company_enabled?: boolean;\n [key: string]: any; // Allow additional config properties\n};\n\ntype State = {\n authenticated: boolean;\n config: StoreConfig | undefined;\n requisitionLists: RequisitionList[];\n requisitionListsLoading: boolean;\n requisitionListsVersion: number;\n};\n\nconst _state: State = (() => {\n return {\n authenticated: false,\n config: undefined,\n requisitionLists: [],\n requisitionListsLoading: false,\n requisitionListsVersion: 0,\n };\n})();\n\n// Proxy state to allow reactivity\nexport const state = new Proxy(_state, {\n set(target, key, value) {\n return Reflect.set(target, key, value);\n },\n get(target, key) {\n return target[key as keyof State];\n },\n});\n\n// Helper functions for managing requisition lists\nexport const setRequisitionLists = (lists: RequisitionList[]) => {\n state.requisitionLists = lists;\n state.requisitionListsVersion++;\n};\n\nexport const addRequisitionList = (list: RequisitionList) => {\n state.requisitionLists = [...state.requisitionLists, list];\n state.requisitionListsVersion++;\n};\n\nexport const updateRequisitionList = (list: RequisitionList) => {\n const exists = state.requisitionLists.some(\n (l: RequisitionList) => l.uid === list.uid\n );\n\n if (exists) {\n state.requisitionLists = state.requisitionLists.map((l: RequisitionList) =>\n l.uid === list.uid ? list : l\n );\n } else {\n state.requisitionLists = [...state.requisitionLists, list];\n }\n state.requisitionListsVersion++;\n};\n\nexport const getRequisitionListsFromState = () => {\n return state.requisitionLists;\n};\n\nexport const setRequisitionListsLoading = (loading: boolean) => {\n state.requisitionListsLoading = loading;\n};\n"],"names":["_state","state","target","key","value","setRequisitionLists","lists","updateRequisitionList","list","l","setRequisitionListsLoading","loading"],"mappings":"AAiCA,MAAMA,EACG,CACL,cAAe,GACf,OAAQ,OACR,iBAAkB,CAAC,EACnB,wBAAyB,GACzB,wBAAyB,CAC3B,EAIWC,EAAQ,IAAI,MAAMD,EAAQ,CACrC,IAAIE,EAAQC,EAAKC,EAAO,CACtB,OAAO,QAAQ,IAAIF,EAAQC,EAAKC,CAAK,CACvC,EACA,IAAIF,EAAQC,EAAK,CACf,OAAOD,EAAOC,CAAkB,CAAA,CAEpC,CAAC,EAGYE,EAAuBC,GAA6B,CAC/DL,EAAM,iBAAmBK,EACnBL,EAAA,yBACR,EAOaM,EAAyBC,GAA0B,CAC/CP,EAAM,iBAAiB,KACnCQ,GAAuBA,EAAE,MAAQD,EAAK,GACzC,EAGQP,EAAA,iBAAmBA,EAAM,iBAAiB,IAAKQ,GACnDA,EAAE,MAAQD,EAAK,IAAMA,EAAOC,CAC9B,EAEAR,EAAM,iBAAmB,CAAC,GAAGA,EAAM,iBAAkBO,CAAI,EAErDP,EAAA,yBACR,EAMaS,EAA8BC,GAAqB,CAC9DV,EAAM,wBAA0BU,CAClC"}
@@ -0,0 +1,108 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{events as _}from"@dropins/tools/event-bus.js";import{FetchGraphQL as l}from"@dropins/tools/fetch-graphql.js";const p=t=>{const e=t.map(o=>o.message).join(" ");throw Error(e)},{setEndpoint:R,setFetchGraphQlHeader:S,removeFetchGraphQlHeader:q,setFetchGraphQlHeaders:L,fetchGraphQl:c,getConfig:E}=new l().getMethods(),d=`
4
+ fragment REQUISITION_LIST_FRAGMENT on RequisitionList {
5
+ uid
6
+ name
7
+ description
8
+ items_count
9
+ updated_at
10
+ }
11
+ `;function I(t){var e,o;return t?{uid:t.uid,name:t.name,description:t.description,updated_at:t.updated_at,items_count:t.items_count,items:m((e=t.items)==null?void 0:e.items),page_info:(o=t.items)==null?void 0:o.page_info}:null}function m(t){return t!=null&&t.length?t.map(e=>{var n,s;const o={uid:e.uid,sku:(n=e.product)==null?void 0:n.sku,quantity:e.quantity,customizable_options:e.customizable_options?e.customizable_options.map(i=>({uid:i.customizable_option_uid,is_required:i.is_required,label:i.label,sort_order:i.sort_order,type:i.type,values:i.values.map(r=>({uid:r.customizable_option_value_uid,label:r.label,price:r.price,value:r.value}))})):[],bundle_options:e.bundle_options||[],configurable_options:e.configurable_options?e.configurable_options.map(i=>({option_uid:i.configurable_product_option_uid,option_label:i.option_label,value_uid:i.configurable_product_option_value_uid,value_label:i.value_label})):[],samples:e.samples?e.samples.map(i=>({url:i.sample_url,sort_order:i.sort_order,title:i.title})):[],gift_card_options:e.gift_card_options||{}};return(s=e.configured_product)!=null&&s.name?{...o,configured_product:e.configured_product}:o}):[]}const g=`
12
+ fragment REQUISITION_LIST_ITEMS_FRAGMENT on RequistionListItems {
13
+ items {
14
+ uid
15
+ quantity
16
+ product {
17
+ sku
18
+ }
19
+ customizable_options {
20
+ customizable_option_uid
21
+ is_required
22
+ label
23
+ sort_order
24
+ type
25
+ values {
26
+ customizable_option_value_uid
27
+ label
28
+ value
29
+ price {
30
+ type
31
+ units
32
+ value
33
+ }
34
+ }
35
+ }
36
+ ... on ConfigurableRequisitionListItem {
37
+ configurable_options {
38
+ configurable_product_option_uid
39
+ configurable_product_option_value_uid
40
+ option_label
41
+ value_label
42
+ }
43
+ }
44
+ ... on DownloadableRequisitionListItem {
45
+ links {
46
+ price
47
+ sample_url
48
+ sort_order
49
+ title
50
+ uid
51
+ }
52
+ samples {
53
+ sample_url
54
+ sort_order
55
+ title
56
+ }
57
+ }
58
+ ... on GiftCardRequisitionListItem {
59
+ gift_card_options {
60
+ amount {
61
+ currency
62
+ value
63
+ }
64
+ custom_giftcard_amount {
65
+ currency
66
+ value
67
+ }
68
+ message
69
+ recipient_email
70
+ recipient_name
71
+ sender_name
72
+ sender_email
73
+ }
74
+ }
75
+ }
76
+ page_info {
77
+ page_size
78
+ current_page
79
+ total_pages
80
+ }
81
+ }
82
+ `,f=`
83
+ mutation UPDATE_REQUISITION_LIST_MUTATION(
84
+ $requisitionListUid: ID!,
85
+ $name: String!,
86
+ $description: String,
87
+ $pageSize: Int,
88
+ $currentPage: Int
89
+ ) {
90
+ updateRequisitionList(
91
+ requisitionListUid: $requisitionListUid
92
+ input: {
93
+ name: $name
94
+ description: $description
95
+ }
96
+ ) {
97
+ requisition_list {
98
+ ...REQUISITION_LIST_FRAGMENT
99
+ items(pageSize: $pageSize, currentPage: $currentPage) {
100
+ ...REQUISITION_LIST_ITEMS_FRAGMENT
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ${d}
106
+ ${g}
107
+ `,h=async(t,e,o,n,s)=>c(f,{variables:{requisitionListUid:t,name:e,description:o,pageSize:n,currentPage:s}}).then(({errors:i,data:r})=>{var a;if(i)return p(i);if(!((a=r==null?void 0:r.updateRequisitionList)!=null&&a.requisition_list))return null;const u=I(r.updateRequisitionList.requisition_list);return _.emit("requisitionList/data",u),u});export{d as R,S as a,L as b,g as c,c as f,E as g,p as h,q as r,R as s,I as t,h as u};
108
+ //# sourceMappingURL=updateRequisitionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/lib/fetch-error.ts","/@dropins/storefront-requisition-list/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-requisition-list/src/api/fragments/RequisitionListFragment.graphql.ts","/@dropins/storefront-requisition-list/src/data/transforms/transform-requisition-list.ts","/@dropins/storefront-requisition-list/src/api/fragments/RequisitionListItemsFragment.graphql.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionList/graphql/updateRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/updateRequisitionList/updateRequisitionList.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\n/** Actions */\nexport const handleFetchError = (errors: Array<{ message: string }>) => {\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n throw Error(errorMessage);\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 '@adobe-commerce/fetch-graphql';\n\nexport const {\n setEndpoint,\n setFetchGraphQlHeader,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeaders,\n fetchGraphQl,\n getConfig,\n} = new FetchGraphQL().getMethods();\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 REQUISITION_LIST_FRAGMENT = `\nfragment REQUISITION_LIST_FRAGMENT on RequisitionList {\n uid\n name\n description\n items_count\n updated_at\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 { RequisitionList } from '../models/requisitionList';\nimport {\n Item,\n ConfiguredProduct,\n Link,\n Sample,\n BundleOption,\n ConfigurableOption,\n CustomizableOption,\n GiftCardOption,\n} from '@/requisitionList/data/models/item';\n\n// Interface for raw API response data for a requisition list\nexport interface RawRequisitionListData {\n name: string;\n description: string;\n uid: string;\n updated_at: string;\n items_count: number;\n items: {\n items: RawItemData[];\n page_info: {\n total_pages: number;\n current_page: number;\n page_size: number;\n };\n };\n}\n\nexport function transformRequisitionList(\n data: RawRequisitionListData\n): RequisitionList | null {\n if (!data) {\n return null;\n }\n\n return {\n uid: data.uid,\n name: data.name,\n description: data.description,\n updated_at: data.updated_at,\n items_count: data.items_count,\n items: transformItems(data.items?.items),\n page_info: data.items?.page_info,\n };\n}\n\n// Interface for raw item data\ninterface RawItemData {\n uid: string;\n product: {\n sku: string;\n };\n quantity: number;\n customizable_options?: CustomizableOption[];\n bundle_options?: BundleOption[];\n configurable_options?: ConfigurableOption[];\n configured_product?: ConfiguredProduct;\n links?: Link[];\n samples?: Sample[];\n gift_card_options?: GiftCardOption;\n}\n\nfunction transformItems(items: RawItemData[]): Item[] {\n if (!items?.length) return [];\n\n return items.map((item: RawItemData) => {\n const transformedItem = {\n uid: item.uid,\n sku: item.product?.sku,\n quantity: item.quantity,\n customizable_options: item.customizable_options\n ? item.customizable_options.map((option) => ({\n uid: option.customizable_option_uid,\n is_required: option.is_required,\n label: option.label,\n sort_order: option.sort_order,\n type: option.type,\n values: option.values.map((value) => ({\n uid: value.customizable_option_value_uid,\n label: value.label,\n price: value.price,\n value: value.value,\n })),\n }))\n : [],\n bundle_options: item.bundle_options || [],\n configurable_options: item.configurable_options\n ? item.configurable_options.map((option) => ({\n option_uid: option.configurable_product_option_uid,\n option_label: option.option_label,\n value_uid: option.configurable_product_option_value_uid,\n value_label: option.value_label,\n }))\n : [],\n samples: item.samples\n ? item.samples.map((sample) => ({\n url: sample.sample_url,\n sort_order: sample.sort_order,\n title: sample.title,\n }))\n : [],\n gift_card_options: item.gift_card_options || {},\n };\n\n if (item.configured_product?.name) {\n return {\n ...transformedItem,\n configured_product: item.configured_product,\n };\n }\n return transformedItem;\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 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 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`;\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_MUTATION = `\n mutation UPDATE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n $name: String!,\n $description: String,\n $pageSize: Int,\n $currentPage: Int\n ) {\n updateRequisitionList(\n requisitionListUid: $requisitionListUid\n input: {\n name: $name\n description: $description\n }\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_MUTATION } from '@/requisitionList/api/updateRequisitionList/graphql/updateRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const updateRequisitionList = async (\n requisitionListUid: string,\n name: string,\n description?: string,\n pageSize?: number,\n currentPage?: number\n): Promise<RequisitionList | null> => {\n return fetchGraphQl(UPDATE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n name,\n description,\n pageSize,\n currentPage,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.updateRequisitionList?.requisition_list) {\n return null;\n }\n\n const payload = transformRequisitionList(\n data.updateRequisitionList.requisition_list\n );\n\n events.emit('requisitionList/data', payload);\n\n return payload;\n });\n};\n"],"names":["handleFetchError","errors","errorMessage","e","setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","REQUISITION_LIST_FRAGMENT","transformRequisitionList","data","transformItems","_a","_b","items","item","transformedItem","option","value","sample","REQUISITION_LIST_ITEMS_FRAGMENT","UPDATE_REQUISITION_LIST_MUTATION","updateRequisitionList","requisitionListUid","name","description","pageSize","currentPage","payload","events"],"mappings":"oHAkBa,MAAAA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C,GAAA,GAACc,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,kBACzB,OAAA,KAGT,MAAMgB,EAAUnB,EACdC,EAAK,sBAAsB,gBAC7B,EAEO,OAAAmB,EAAA,KAAK,uBAAwBD,CAAO,EAEpCA,CAAA,CACR"}
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export interface NotFoundProps {
4
+ className?: string;
5
+ title?: string;
6
+ message?: string;
7
+ actionLabel?: string;
8
+ onAction?: () => void;
9
+ }
10
+ export declare const NotFound: FunctionComponent<NotFoundProps>;
11
+ //# sourceMappingURL=NotFound.d.ts.map
@@ -14,6 +14,6 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export * from './RequisitionListNames';
18
- export { RequisitionListNames as default } from './RequisitionListNames';
17
+ export { NotFound } from './NotFound';
18
+ export type { NotFoundProps } from './NotFound';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface RequisitionListHeaderProps extends HTMLAttributes<HTMLDivElement> {
5
+ name: string;
6
+ description?: string;
7
+ backLink?: {
8
+ url: string;
9
+ label: string;
10
+ onClick?: (e: Event) => void;
11
+ };
12
+ actions?: {
13
+ onRename?: () => void;
14
+ onDelete?: () => void;
15
+ renameLabel?: string;
16
+ deleteLabel?: string;
17
+ };
18
+ }
19
+ export declare const RequisitionListHeader: FunctionComponent<RequisitionListHeaderProps>;
20
+ //# sourceMappingURL=RequisitionListHeader.d.ts.map
@@ -0,0 +1,19 @@
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 { RequisitionListHeader } from './RequisitionListHeader';
18
+ export type { RequisitionListHeaderProps } from './RequisitionListHeader';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -18,7 +18,9 @@ export * from './RequisitionListForm/RequisitionListForm';
18
18
  export * from './RequisitionListGridWrapper/RequisitionListGridWrapper';
19
19
  export * from './RequisitionListActions/RequisitionListActions';
20
20
  export * from './RequisitionListModal/RequisitionListModal';
21
+ export * from './RequisitionListHeader/RequisitionListHeader';
21
22
  export * from './EmptyList/EmptyList';
23
+ export * from './NotFound/NotFound';
22
24
  export * from './ProductListTable/ProductListTable';
23
25
  export * from './BatchActions/BatchActions';
24
26
  export * from './PageSizePicker/PageSizePicker';
@@ -1,4 +1,4 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as u,R as d}from"../chunks/RequisitionListForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/components.js";import"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/i18n.js";import"../chunks/transform-requisition-list.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/event-bus.js";export{u as RequisitionListForm,d as default};
3
+ import{R as u,R as d}from"../chunks/RequisitionListForm2.js";import"@dropins/tools/preact-jsx-runtime.js";import"../chunks/RequisitionListForm.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/components.js";import"@dropins/tools/lib.js";import"@dropins/tools/i18n.js";import"../chunks/updateRequisitionList.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";export{u as RequisitionListForm,d as default};
4
4
  //# sourceMappingURL=RequisitionListForm.js.map
@@ -1,9 +1,7 @@
1
1
  import { HTMLAttributes } from 'preact/compat';
2
2
  import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
- import { RequisitionLists as RequisitionListsModel } from '../../data/models/requisitionLists';
4
3
 
5
4
  export interface RequisitionListGridProps extends HTMLAttributes<HTMLDivElement> {
6
- requisitionLists?: RequisitionListsModel | null;
7
5
  routeRequisitionListDetails?: (uid: string) => string | void;
8
6
  slots?: {
9
7
  Header?: SlotProps;