@dropins/storefront-requisition-list 0.3.0-beta → 0.5.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 (70) hide show
  1. package/api/addRequisitionListItemsToCart/graphql/addRequisitionListItemsToCart.d.ts +1 -1
  2. package/api/addRequisitionListItemsToCart/index.d.ts +1 -1
  3. package/api/deleteRequisitionList/deleteRequisitionList.d.ts +5 -1
  4. package/api/deleteRequisitionListItems/index.d.ts +1 -1
  5. package/api/fragments/ProductFragment.graphql.d.ts +18 -0
  6. package/api/fragments/RequisitionListItemsFragment.graphql.d.ts +1 -1
  7. package/api/fragments.d.ts +17 -0
  8. package/api/getProductData/getProductData.d.ts +4 -0
  9. package/api/getProductData/graphql/getProductData.d.ts +18 -0
  10. package/api/getProductData/index.d.ts +18 -0
  11. package/api/getRequisitionList/index.d.ts +1 -1
  12. package/api/index.d.ts +1 -0
  13. package/api/updateRequisitionListItems/index.d.ts +1 -1
  14. package/api/updateRequisitionListItems/updateRequisitionListItems.d.ts +11 -2
  15. package/api.js +2 -2
  16. package/api.js.map +1 -1
  17. package/chunks/PageSizePicker2.js +4 -0
  18. package/chunks/PageSizePicker2.js.map +1 -0
  19. package/chunks/RequisitionListForm.js +3 -3
  20. package/chunks/RequisitionListForm.js.map +1 -1
  21. package/chunks/RequisitionListItemsFragment.graphql.js +75 -0
  22. package/chunks/RequisitionListItemsFragment.graphql.js.map +1 -0
  23. package/chunks/addRequisitionListItemsToCart.js +237 -0
  24. package/chunks/addRequisitionListItemsToCart.js.map +1 -0
  25. package/chunks/deleteRequisitionList.js +3 -3
  26. package/chunks/deleteRequisitionList.js.map +1 -1
  27. package/chunks/getRequisitionLists.js +3 -3
  28. package/chunks/getRequisitionLists.js.map +1 -1
  29. package/chunks/transform-requisition-list.js +2 -2
  30. package/chunks/transform-requisition-list.js.map +1 -1
  31. package/components/BatchActions/BatchActions.d.ts +16 -0
  32. package/components/BatchActions/index.d.ts +19 -0
  33. package/components/EmptyList/EmptyList.d.ts +8 -0
  34. package/components/{RequisitionListItem → EmptyList}/index.d.ts +1 -1
  35. package/components/PageSizePicker/PageSizePicker.d.ts +10 -0
  36. package/components/ProductListTable/ProductListTable.d.ts +18 -0
  37. package/components/ProductListTable/__fixtures__/RequisitionListModel.d.ts +50 -0
  38. package/components/ProductListTable/index.d.ts +19 -0
  39. package/components/RequisitionListGridWrapper/RequisitionListGridWrapper.d.ts +14 -3
  40. package/components/index.d.ts +4 -1
  41. package/containers/RequisitionListForm.js +1 -1
  42. package/containers/RequisitionListGrid/RequisitionListGrid.d.ts +3 -2
  43. package/containers/RequisitionListGrid.js +1 -1
  44. package/containers/RequisitionListGrid.js.map +1 -1
  45. package/containers/RequisitionListNames/RequisitionListNames.d.ts +2 -0
  46. package/containers/RequisitionListNames.js +4 -92
  47. package/containers/RequisitionListNames.js.map +1 -1
  48. package/containers/RequisitionListView/RequisitionListView.d.ts +22 -0
  49. package/containers/RequisitionListView/index.d.ts +19 -0
  50. package/containers/RequisitionListView.d.ts +3 -0
  51. package/containers/RequisitionListView.js +4 -0
  52. package/containers/RequisitionListView.js.map +1 -0
  53. package/containers/index.d.ts +1 -0
  54. package/data/models/item.d.ts +16 -5
  55. package/data/models/requisitionList.d.ts +6 -0
  56. package/data/transforms/__fixtures__/requisitionListViewData.d.ts +5 -0
  57. package/data/transforms/index.d.ts +1 -0
  58. package/data/transforms/transform-product.d.ts +118 -0
  59. package/data/transforms/transform-requisition-list.d.ts +3 -0
  60. package/hooks/index.d.ts +21 -0
  61. package/hooks/useRequisitionListAlert.d.ts +27 -0
  62. package/hooks/useRequisitionListForm.d.ts +6 -4
  63. package/hooks/useRequisitionListGrid.d.ts +25 -0
  64. package/hooks/useRequisitionListSelectedItems.d.ts +14 -0
  65. package/i18n/en_US.json.d.ts +58 -9
  66. package/package.json +1 -1
  67. package/render.js +3 -3
  68. package/render.js.map +1 -1
  69. package/components/RequisitionListItem/RequisitionListItem.d.ts +0 -16
  70. package/data/transforms/__fixtures__/requisitionListItemData.d.ts +0 -5
@@ -0,0 +1,237 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{R as I,f as n,h as u,t as a}from"./transform-requisition-list.js";import{R as _}from"./RequisitionListItemsFragment.graphql.js";import{events as l}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=`
4
+ query GET_REQUISITION_LIST_QUERY(
5
+ $requisitionListUid: String,
6
+ $currentPage: Int = 1,
7
+ $pageSize: Int = 10,
8
+ ) {
9
+ customer {
10
+ requisition_lists (
11
+ filter: {
12
+ uids: {
13
+ eq: $requisitionListUid
14
+ }
15
+ }
16
+ ){
17
+ items {
18
+ ...REQUISITION_LIST_FRAGMENT
19
+ items(pageSize: $pageSize, currentPage: $currentPage) {
20
+ ...REQUISITION_LIST_ITEMS_FRAGMENT
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ ${_}
27
+ ${I}
28
+ `,O=async(i,e,t)=>n(R,{variables:{requisitionListUid:i,currentPage:e,pageSize:t}}).then(({errors:r,data:s})=>{var T;if(r)return u(r);if(!((T=s==null?void 0:s.customer)!=null&&T.requisition_lists))return null;const o=a(s.customer.requisition_lists.items[0]);return l.emit("requisitionList/data",o),o}),d=`
29
+ mutation UPDATE_REQUISITION_LIST_ITEMS_MUTATION(
30
+ $requisitionListUid: ID!,
31
+ $requisitionListItems: [UpdateRequisitionListItemsInput!]!,
32
+ ) {
33
+ updateRequisitionListItems(
34
+ requisitionListUid: $requisitionListUid
35
+ requisitionListItems: $requisitionListItems
36
+ ) {
37
+ requisition_list {
38
+ ...REQUISITION_LIST_FRAGMENT
39
+ items {
40
+ ...REQUISITION_LIST_ITEMS_FRAGMENT
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ${I}
46
+ ${_}
47
+ `,A=async(i,e)=>n(d,{variables:{requisitionListUid:i,requisitionListItems:e}}).then(({errors:t,data:r})=>{if(t)return u(t);const s=a(r.updateRequisitionListItems.requisition_list);return l.emit("requisitionList/data",s),s}),E=`
48
+ mutation DELETE_REQUISITION_LIST_ITEMS_MUTATION(
49
+ $requisitionListUid: ID!,
50
+ $requisitionListItemUids: [ID!]!
51
+ ) {
52
+ deleteRequisitionListItems(
53
+ requisitionListUid: $requisitionListUid
54
+ requisitionListItemUids: $requisitionListItemUids
55
+ ) {
56
+ requisition_list {
57
+ ...REQUISITION_LIST_FRAGMENT
58
+ items {
59
+ ...REQUISITION_LIST_ITEMS_FRAGMENT
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ${I}
65
+ ${_}
66
+ `,y=async(i,e)=>n(E,{variables:{requisitionListUid:i,requisitionListItemUids:e}}).then(({errors:t,data:r})=>{if(t)return u(t);const s=a(r.deleteRequisitionListItems.requisition_list);return l.emit("requisitionList/data",s),s}),L=`
67
+ fragment PRODUCT_FRAGMENT on ProductView {
68
+ __typename
69
+ id
70
+ sku
71
+ name
72
+ shortDescription
73
+ metaDescription
74
+ metaKeyword
75
+ metaTitle
76
+ description
77
+ inStock
78
+ addToCartAllowed
79
+ url
80
+ urlKey
81
+ externalId
82
+ images(roles: []) {
83
+ url
84
+ label
85
+ roles
86
+ }
87
+ attributes(roles: []) {
88
+ name
89
+ label
90
+ value
91
+ roles
92
+ }
93
+ ... on SimpleProductView {
94
+ price {
95
+ roles
96
+ regular {
97
+ amount {
98
+ value
99
+ currency
100
+ }
101
+ }
102
+ final {
103
+ amount {
104
+ value
105
+ currency
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ... on ComplexProductView {
111
+ options {
112
+ ...PRODUCT_OPTION_FRAGMENT
113
+ }
114
+ ...PRICE_RANGE_FRAGMENT
115
+ }
116
+ }
117
+ fragment PRODUCT_OPTION_FRAGMENT on ProductViewOption {
118
+ id
119
+ title
120
+ required
121
+ multi
122
+ values {
123
+ id
124
+ title
125
+ inStock
126
+ __typename
127
+ ... on ProductViewOptionValueProduct {
128
+ title
129
+ quantity
130
+ isDefault
131
+ __typename
132
+ product {
133
+ sku
134
+ shortDescription
135
+ metaDescription
136
+ metaKeyword
137
+ metaTitle
138
+ name
139
+ price {
140
+ final {
141
+ amount {
142
+ value
143
+ currency
144
+ }
145
+ }
146
+ regular {
147
+ amount {
148
+ value
149
+ currency
150
+ }
151
+ }
152
+ roles
153
+ }
154
+ }
155
+ }
156
+ ... on ProductViewOptionValueSwatch {
157
+ id
158
+ title
159
+ type
160
+ value
161
+ inStock
162
+ }
163
+ }
164
+ }
165
+ fragment PRICE_RANGE_FRAGMENT on ComplexProductView {
166
+ priceRange {
167
+ maximum {
168
+ final {
169
+ amount {
170
+ value
171
+ currency
172
+ }
173
+ }
174
+ regular {
175
+ amount {
176
+ value
177
+ currency
178
+ }
179
+ }
180
+ roles
181
+ }
182
+ minimum {
183
+ final {
184
+ amount {
185
+ value
186
+ currency
187
+ }
188
+ }
189
+ regular {
190
+ amount {
191
+ value
192
+ currency
193
+ }
194
+ }
195
+ roles
196
+ }
197
+ }
198
+ }
199
+ `,q=`
200
+ query GET_PRODUCT_DATA($skus: [String]) {
201
+ products(skus: $skus) {
202
+ ...PRODUCT_FRAGMENT
203
+ }
204
+ }
205
+ ${L}
206
+ `,D=async i=>n(q,{variables:{skus:i}}).then(({errors:e,data:t})=>e?u(e):t!=null&&t.products?c(t.products):null),U=`
207
+ mutation ADD_REQUISITION_LIST_ITEMS_TO_CART_MUTATION(
208
+ $requisitionListUid: ID!,
209
+ $requisitionListItemUids: [ID!]!
210
+ ) {
211
+ addRequisitionListItemsToCart(
212
+ requisitionListUid: $requisitionListUid
213
+ requisitionListItemUids: $requisitionListItemUids
214
+ ) {
215
+ status
216
+ add_requisition_list_items_to_cart_user_errors {
217
+ message
218
+ type
219
+ }
220
+ cart {
221
+ id
222
+ itemsV2 {
223
+ items {
224
+ uid
225
+ quantity
226
+ is_available
227
+ }
228
+ total_count
229
+ }
230
+ email
231
+ total_quantity
232
+ is_virtual
233
+ }
234
+ }
235
+ }
236
+ `,M=async(i,e)=>n(U,{variables:{requisitionListUid:i,requisitionListItemUids:e}}).then(({errors:t,data:r})=>{var s;return t?u(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(o=>o.type):null});export{M as a,D as b,y as d,O as g,A as u};
237
+ //# sourceMappingURL=addRequisitionListItemsToCart.js.map
@@ -0,0 +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 ) {\n updateRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItems: $requisitionListItems\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items {\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): Promise<RequisitionList | null> => {\n return fetchGraphQl(UPDATE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItems,\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 ) {\n deleteRequisitionListItems(\n requisitionListUid: $requisitionListUid\n requisitionListItemUids: $requisitionListItemUids\n ) {\n requisition_list {\n ...REQUISITION_LIST_FRAGMENT\n items {\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): Promise<RequisitionList | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_ITEMS_MUTATION, {\n variables: {\n requisitionListUid,\n requisitionListItemUids: items,\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,CAAyB;AAAA,ECnBdC,EAAqB,MAChCC,EACAC,EACAC,IAEOC,EAAaP,EAA4B,CAC9C,UAAW,CACT,mBAAoBI,EACpB,YAAAC,EACA,SAAAC,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAb,KAAW,OACxB,GAAAa,EAAe,OAAAC,EAAiBD,CAAM,EAEtC,GAAA,GAACZ,EAAAD,GAAA,YAAAA,EAAM,WAAN,MAAAC,EAAgB,mBACZ,OAAA,KAGT,MAAMc,EAAUC,EACdhB,EAAK,SAAS,kBAAkB,MAAM,CAAC,CACzC,EACO,OAAAiB,EAAA,KAAK,uBAAwBF,CAAO,EACpCA,CAAA,CACR,EC5BUG,EAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBpDX,CAAyB;AAAA,EACzBD,CAA+B;AAAA,ECbpBa,EAA6B,MACxCC,EACAC,IAEOT,EAAaM,EAAwC,CAC1D,UAAW,CACT,mBAAAE,EACA,qBAAAC,CAAA,CAEH,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAR,EAAQ,KAAAb,KAAW,CACxB,GAAAa,EAAe,OAAAC,EAAiBD,CAAM,EAE1C,MAAME,EAAUC,EACdhB,EAAK,2BAA2B,gBAClC,EAEO,OAAAiB,EAAA,KAAK,uBAAwBF,CAAO,EAEpCA,CAAA,CACR,ECxBUO,EAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBpDf,CAAyB;AAAA,EACzBD,CAA+B;AAAA,ECbpBiB,EAA6B,MACxCH,EACAI,IAEOZ,EAAaU,EAAwC,CAC1D,UAAW,CACT,mBAAAF,EACA,wBAAyBI,CAAA,CAE5B,CAAA,EAAE,KAAK,CAAC,CAAE,OAAAX,EAAQ,KAAAb,KAAW,CACxB,GAAAa,EAAe,OAAAC,EAAiBD,CAAM,EAE1C,MAAME,EAAUC,EACdhB,EAAK,2BAA2B,gBAClC,EACO,OAAAiB,EAAA,KAAK,uBAAwBF,CAAO,EAEpCA,CAAA,CACR,ECzBUU,EAAmB;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;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;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECEnBC,EAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMlCD,CAAgB;AAAA,ECFPE,EAAiB,MAC5BC,GAEOhB,EAAac,EAAwB,CAC1C,UAAW,CACT,KAAAE,CAAA,CAEH,CAAA,EAAE,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,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as I,f as T,h as L,t as R}from"./transform-requisition-list.js";const q=`
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=`
4
4
  mutation DELETE_REQUISITION_LIST_MUTATION(
5
5
  $requisitionListUid: ID!,
6
6
  ) {
@@ -21,6 +21,6 @@ import{R as I,f as T,h as L,t as R}from"./transform-requisition-list.js";const q
21
21
  }
22
22
  }
23
23
  }
24
- ${I}
25
- `,a=async t=>T(q,{variables:{requisitionListUid:t}}).then(({errors:e,data:i})=>{var s,n,o,u,r,_;return t?e?L(e):(s=i==null?void 0:i.deleteRequisitionList)!=null&&s.requisition_lists?{items:((o=(n=i.deleteRequisitionList.requisition_lists)==null?void 0:n.items)==null?void 0:o.map(l=>R(l)))||[],page_info:(r=(u=i.deleteRequisitionList)==null?void 0:u.requisition_lists)==null?void 0:r.page_info,status:(_=i.deleteRequisitionList)==null?void 0:_.status}:null:null});export{a as d};
24
+ ${L}
25
+ `,p=async t=>T(a,{variables:{requisitionListUid:t}}).then(({errors:e,data:i})=>{var n,o,r,u,_,l;if(!t)return null;if(e)return q(e);if(!((n=i==null?void 0:i.deleteRequisitionList)!=null&&n.requisition_lists))return null;const s=((r=(o=i.deleteRequisitionList.requisition_lists)==null?void 0:o.items)==null?void 0:r.map(I=>R(I)))||[];return E.emit("requisitionLists/data",s),{items:s,page_info:(_=(u=i.deleteRequisitionList)==null?void 0:u.requisition_lists)==null?void 0:_.page_info,status:(l=i.deleteRequisitionList)==null?void 0:l.status}});export{p as d};
26
26
  //# sourceMappingURL=deleteRequisitionList.js.map
@@ -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';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<RequisitionList[] | 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 return {\n items:\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [],\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","_c","_b","requisitionList","transformRequisitionList","_e","_d","_f"],"mappings":"yEAkBO,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,EChBdC,EAAwB,MACnCC,GAEOC,EAAaJ,EAAkC,CACpD,UAAW,CACT,mBAAAG,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,iBAC5B,OAAKH,EACDE,EAAeE,EAAiBF,CAAM,GAErCG,EAAAF,GAAA,YAAAA,EAAM,wBAAN,MAAAE,EAA6B,kBAI3B,CACL,QACEC,GAAAC,EAAAJ,EAAK,sBAAsB,oBAA3B,YAAAI,EAA8C,QAA9C,YAAAD,EAAqD,IAClDE,GAAyBC,EAAyBD,CAAe,KAC/D,CAAA,EACP,WAAWE,GAAAC,EAAAR,EAAK,wBAAL,YAAAQ,EAA4B,oBAA5B,YAAAD,EAA+C,UAC1D,QAAQE,EAAAT,EAAK,wBAAL,YAAAS,EAA4B,MAAA,EAT7B,KAJuB,IAelC,CAAC"}
1
+ {"version":3,"file":"deleteRequisitionList.js","sources":["/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/graphql/deleteRequisitionList.ts","/@dropins/storefront-requisition-list/src/api/deleteRequisitionList/deleteRequisitionList.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const DELETE_REQUISITION_LIST_MUTATION = `\n mutation DELETE_REQUISITION_LIST_MUTATION(\n $requisitionListUid: ID!,\n ) {\n deleteRequisitionList(\n requisitionListUid: $requisitionListUid\n ) {\n status\n requisition_lists {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { DELETE_REQUISITION_LIST_MUTATION } from '@/requisitionList/api/deleteRequisitionList/graphql/deleteRequisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const deleteRequisitionList = async (\n requisitionListUid: string\n): Promise<{\n items: RequisitionList[];\n page_info: any;\n status: any;\n} | null> => {\n return fetchGraphQl(DELETE_REQUISITION_LIST_MUTATION, {\n variables: {\n requisitionListUid,\n },\n }).then(({ errors, data }) => {\n if (!requisitionListUid) return null;\n if (errors) return handleFetchError(errors);\n\n if (!data?.deleteRequisitionList?.requisition_lists) {\n return null;\n }\n\n const reqLists =\n data.deleteRequisitionList.requisition_lists?.items?.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n ) || [];\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.deleteRequisitionList?.requisition_lists?.page_info,\n status: data.deleteRequisitionList?.status,\n };\n });\n};\n"],"names":["DELETE_REQUISITION_LIST_MUTATION","REQUISITION_LIST_FRAGMENT","deleteRequisitionList","requisitionListUid","fetchGraphQl","errors","data","handleFetchError","_a","reqLists","_c","_b","requisitionList","transformRequisitionList","events","_e","_d","_f"],"mappings":"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,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{R as _,f as I,h as a,t as c}from"./transform-requisition-list.js";const g=`
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=`
4
4
  query GET_REQUISITION_LISTS_QUERY(
5
5
  $currentPage: Int = 1
6
6
  $pageSize: Int = 10,
@@ -19,6 +19,6 @@ import{R as _,f as I,h as a,t as c}from"./transform-requisition-list.js";const g
19
19
  }
20
20
  }
21
21
  }
22
- ${_}
23
- `,S=async(n,o)=>I(g,{variables:{currentPage:n,pageSize:o}}).then(({errors:i,data:e})=>{var t,s,r;return i?a(i):(t=e==null?void 0:e.customer)!=null&&t.requisition_lists?{items:e.customer.requisition_lists.items.map(u=>c(u)),page_info:(r=(s=e.customer)==null?void 0:s.requisition_lists)==null?void 0:r.page_info}:null});export{S as g};
22
+ ${I}
23
+ `,l=async(o,u)=>a(p,{variables:{currentPage:o,pageSize:u}}).then(({errors:t,data:e})=>{var s,r,n;if(t)return c(t);if(!((s=e==null?void 0:e.customer)!=null&&s.requisition_lists))return null;const i=e.customer.requisition_lists.items.map(_=>g(_));return m.emit("requisitionLists/data",i),{items:i,page_info:(n=(r=e.customer)==null?void 0:r.requisition_lists)==null?void 0:n.page_info}});export{l as g};
24
24
  //# sourceMappingURL=getRequisitionLists.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRequisitionLists.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionLists/graphql/getRequisitionLists.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionLists/getRequisitionLists.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const GET_REQUISITION_LISTS_QUERY = `\n query GET_REQUISITION_LISTS_QUERY(\n $currentPage: Int = 1\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists(pageSize: $pageSize, currentPage: $currentPage) {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LISTS_QUERY } from '@/requisitionList/api/getRequisitionLists/graphql/getRequisitionLists';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\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 return {\n items: data.customer.requisition_lists.items.map((requisitionList: any) =>\n transformRequisitionList(requisitionList)\n ),\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","requisitionList","transformRequisitionList","_c","_b"],"mappings":"yEAkBO,MAAMA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzCC,CAAyB;AAAA,ECddC,EAAsB,MACjCC,EACAC,IAEOC,EAAaL,EAA6B,CAC/C,UAAW,CACT,YAAAG,EACA,SAAAC,CAAA,CACF,CACD,EAAE,KAAK,CAAC,CAAE,OAAAE,EAAQ,KAAAC,KAAW,WAC5B,OAAID,EAAeE,EAAiBF,CAAM,GAErCG,EAAAF,GAAA,YAAAA,EAAM,WAAN,MAAAE,EAAgB,kBAId,CACL,MAAOF,EAAK,SAAS,kBAAkB,MAAM,IAAKG,GAChDC,EAAyBD,CAAe,CAAA,EAE1C,WAAWE,GAAAC,EAAAN,EAAK,WAAL,YAAAM,EAAe,oBAAf,YAAAD,EAAkC,SAAA,EAPtC,IASX,CAAC"}
1
+ {"version":3,"file":"getRequisitionLists.js","sources":["/@dropins/storefront-requisition-list/src/api/getRequisitionLists/graphql/getRequisitionLists.ts","/@dropins/storefront-requisition-list/src/api/getRequisitionLists/getRequisitionLists.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\nimport { REQUISITION_LIST_FRAGMENT } from '@/requisitionList/api/fragments/RequisitionListFragment.graphql';\n\nexport const GET_REQUISITION_LISTS_QUERY = `\n query GET_REQUISITION_LISTS_QUERY(\n $currentPage: Int = 1\n $pageSize: Int = 10,\n ) {\n customer {\n requisition_lists(pageSize: $pageSize, currentPage: $currentPage) {\n items {\n ...REQUISITION_LIST_FRAGMENT\n }\n page_info {\n page_size\n current_page\n total_pages\n }\n total_count\n }\n }\n }\n${REQUISITION_LIST_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_REQUISITION_LISTS_QUERY } from '@/requisitionList/api/getRequisitionLists/graphql/getRequisitionLists';\nimport { transformRequisitionList } from '@/requisitionList/data/transforms';\nimport { fetchGraphQl } from '@/requisitionList/api';\nimport { handleFetchError } from '@/requisitionList/lib/fetch-error';\nimport { RequisitionList } from '@/requisitionList/data/models/requisitionList';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const getRequisitionLists = async (\n currentPage?: number,\n pageSize?: number\n): Promise<RequisitionList[] | null> => {\n return fetchGraphQl(GET_REQUISITION_LISTS_QUERY, {\n variables: {\n currentPage,\n pageSize,\n },\n }).then(({ errors, data }) => {\n if (errors) return handleFetchError(errors);\n\n if (!data?.customer?.requisition_lists) {\n return null;\n }\n\n const reqLists = data.customer.requisition_lists.items.map(\n (requisitionList: any) => transformRequisitionList(requisitionList)\n );\n\n events.emit('requisitionLists/data', reqLists);\n\n return {\n items: reqLists,\n page_info: data.customer?.requisition_lists?.page_info,\n };\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,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";const{setEndpoint:u,setFetchGraphQlHeader:n,removeFetchGraphQlHeader:_,setFetchGraphQlHeaders:l,fetchGraphQl:p,getConfig:d}=new s().getMethods(),c=o=>{const r=o.map(e=>e.message).join(" ");throw Error(r)},b=`
3
+ import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";const{setEndpoint:u,setFetchGraphQlHeader:n,removeFetchGraphQlHeader:_,setFetchGraphQlHeaders:l,fetchGraphQl:p,getConfig:c}=new s().getMethods(),d=r=>{const o=r.map(e=>e.message).join(" ");throw Error(o)},b=`
4
4
  fragment REQUISITION_LIST_FRAGMENT on RequisitionList {
5
5
  uid
6
6
  name
@@ -8,5 +8,5 @@ fragment REQUISITION_LIST_FRAGMENT on RequisitionList {
8
8
  items_count
9
9
  updated_at
10
10
  }
11
- `;function f(o){var r;return{uid:o.uid,name:o.name,description:o.description,updated_at:o.updated_at,items_count:o.items_count,items:a((r=o.items)==null?void 0:r.items)}}function a(o){return o!=null&&o.length?o.map(r=>({uid:r.uid,quantity:r.quantity,customizable_options:r.customizable_options?r.customizable_options.map(e=>({uid:e.customizable_option_uid,is_required:e.is_required,label:e.label,sort_order:e.sort_order,type:e.type,values:e.values.map(t=>({uid:t.customizable_option_value_uid,label:t.label,price:t.price,value:t.value}))})):[],bundle_options:r.bundle_options||[],configurable_options:r.configurable_options?r.configurable_options.map(e=>({option_uid:e.configurable_product_option_uid,option_label:e.option_label,value_uid:e.configurable_product_option_value_uid,value_label:e.value_label})):[],samples:r.samples?r.samples.map(e=>({url:e.sample_url,sort_order:e.sort_order,title:e.title})):[],gift_card_options:r.gift_card_options||{}})):[]}export{b as R,n as a,l as b,p as f,d as g,c as h,_ as r,u as s,f as t};
11
+ `;function f(r){var o,e;return{uid:r.uid,name:r.name,description:r.description,updated_at:r.updated_at,items_count:r.items_count,items:a((o=r.items)==null?void 0:o.items),page_info:(e=r.items)==null?void 0:e.page_info}}function a(r){return r!=null&&r.length?r.map(o=>({uid:o.uid,sku:o.product.sku,quantity:o.quantity,customizable_options:o.customizable_options?o.customizable_options.map(e=>({uid:e.customizable_option_uid,is_required:e.is_required,label:e.label,sort_order:e.sort_order,type:e.type,values:e.values.map(t=>({uid:t.customizable_option_value_uid,label:t.label,price:t.price,value:t.value}))})):[],bundle_options:o.bundle_options||[],configurable_options:o.configurable_options?o.configurable_options.map(e=>({option_uid:e.configurable_product_option_uid,option_label:e.option_label,value_uid:e.configurable_product_option_value_uid,value_label:e.value_label})):[],samples:o.samples?o.samples.map(e=>({url:e.sample_url,sort_order:e.sort_order,title:e.title})):[],gift_card_options:o.gift_card_options||{}})):[]}export{b as R,n as a,l as b,p as f,c as g,d as h,_ as r,u as s,f as t};
12
12
  //# sourceMappingURL=transform-requisition-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform-requisition-list.js","sources":["/@dropins/storefront-requisition-list/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-requisition-list/src/lib/fetch-error.ts","/@dropins/storefront-requisition-list/src/api/fragments/RequisitionListFragment.graphql.ts","/@dropins/storefront-requisition-list/src/data/transforms/transform-requisition-list.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 { 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\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\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 { Item } 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 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 };\n}\n\n// Interface for raw item data\ninterface RawItemData {\n uid: string;\n quantity: number;\n customizable_options?: {\n customizable_option_uid: string;\n is_required: boolean;\n label: string;\n sort_order: number;\n type: string;\n values: {\n customizable_option_value_uid: string;\n label: string;\n price: { type: string; units: string; value: number };\n value: string;\n }[];\n }[];\n bundle_options?: {\n uid: string;\n label: string;\n type: string;\n values: {\n uid: string;\n label: string;\n original_price: { value: number; currency: string };\n priceV2: { value: number; currency: string };\n quantity: number;\n }[];\n }[];\n configurable_options?: {\n configurable_product_option_uid: string;\n option_label: string;\n configurable_product_option_value_uid: string;\n value_label: string;\n }[];\n links?: {\n uid: string;\n price?: number;\n sample_url?: string;\n sort_order?: number;\n title?: string;\n }[];\n samples?: {\n sample_url?: string;\n sort_order?: number;\n title?: string;\n }[];\n gift_card_options?: {\n amount?: {\n value?: number;\n currency?: string;\n };\n custom_giftcard_amount?: {\n value?: number;\n currency?: string;\n };\n message?: string;\n recipient_email?: string;\n recipient_name?: string;\n sender_name?: string;\n sender_email?: string;\n };\n}\n\nfunction transformItems(items: RawItemData[]): Item[] {\n if (!items?.length) return [];\n\n return items.map((item: RawItemData) => {\n return {\n uid: item.uid,\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}\n"],"names":["setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","handleFetchError","errors","errorMessage","REQUISITION_LIST_FRAGMENT","transformRequisitionList","data","transformItems","_a","items","item","option","value","sample"],"mappings":"+DAmBO,KAAM,CACX,YAAAA,EACA,sBAAAC,EACA,yBAAAC,EACA,uBAAAC,EACA,aAAAC,EACA,UAAAC,CACF,EAAI,IAAIC,EAAA,EAAe,WAAA,ECRVC,EAAoBC,GAAuC,CACtE,MAAMC,EAAeD,EAAO,IAAK,GAAW,EAAE,OAAO,EAAE,KAAK,GAAG,EAE/D,MAAM,MAAMC,CAAY,CAC1B,ECLaC,EAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECmBlC,SAASC,EACdC,EACwB,OACxB,MAAO,CACL,IAAKA,EAAK,IACV,KAAMA,EAAK,KACX,YAAaA,EAAK,YAClB,WAAYA,EAAK,WACjB,YAAaA,EAAK,YAClB,MAAOC,GAAeC,EAAAF,EAAK,QAAL,YAAAE,EAAY,KAAK,CAAA,CAE3C,CAkEA,SAASD,EAAeE,EAA8B,CACpD,OAAKA,GAAA,MAAAA,EAAO,OAELA,EAAM,IAAKC,IACT,CACL,IAAKA,EAAK,IACV,SAAUA,EAAK,SACf,qBAAsBA,EAAK,qBACvBA,EAAK,qBAAqB,IAAKC,IAAY,CACzC,IAAKA,EAAO,wBACZ,YAAaA,EAAO,YACpB,MAAOA,EAAO,MACd,WAAYA,EAAO,WACnB,KAAMA,EAAO,KACb,OAAQA,EAAO,OAAO,IAAKC,IAAW,CACpC,IAAKA,EAAM,8BACX,MAAOA,EAAM,MACb,MAAOA,EAAM,MACb,MAAOA,EAAM,KAAA,EACb,CAAA,EACF,EACF,CAAA,EACJ,eAAgBF,EAAK,gBAAkB,CAAA,EACvC,qBAAsBA,EAAK,qBACvBA,EAAK,qBAAqB,IAAKC,IAAY,CACzC,WAAYA,EAAO,gCACnB,aAAcA,EAAO,aACrB,UAAWA,EAAO,sCAClB,YAAaA,EAAO,WAAA,EACpB,EACF,CAAA,EACJ,QAASD,EAAK,QACVA,EAAK,QAAQ,IAAKG,IAAY,CAC5B,IAAKA,EAAO,WACZ,WAAYA,EAAO,WACnB,MAAOA,EAAO,KAAA,EACd,EACF,CAAA,EACJ,kBAAmBH,EAAK,mBAAqB,CAAA,CAAC,EAEjD,EAvC0B,CAAA,CAwC7B"}
1
+ {"version":3,"file":"transform-requisition-list.js","sources":["/@dropins/storefront-requisition-list/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-requisition-list/src/lib/fetch-error.ts","/@dropins/storefront-requisition-list/src/api/fragments/RequisitionListFragment.graphql.ts","/@dropins/storefront-requisition-list/src/data/transforms/transform-requisition-list.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 { 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\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\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 { Item } 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 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?: {\n customizable_option_uid: string;\n is_required: boolean;\n label: string;\n sort_order: number;\n type: string;\n values: {\n customizable_option_value_uid: string;\n label: string;\n price: { type: string; units: string; value: number };\n value: string;\n }[];\n }[];\n bundle_options?: {\n uid: string;\n label: string;\n type: string;\n values: {\n uid: string;\n label: string;\n original_price: { value: number; currency: string };\n priceV2: { value: number; currency: string };\n quantity: number;\n }[];\n }[];\n configurable_options?: {\n configurable_product_option_uid: string;\n option_label: string;\n configurable_product_option_value_uid: string;\n value_label: string;\n }[];\n links?: {\n uid: string;\n price?: number;\n sample_url?: string;\n sort_order?: number;\n title?: string;\n }[];\n samples?: {\n sample_url?: string;\n sort_order?: number;\n title?: string;\n }[];\n gift_card_options?: {\n amount?: {\n value?: number;\n currency?: string;\n };\n custom_giftcard_amount?: {\n value?: number;\n currency?: string;\n };\n message?: string;\n recipient_email?: string;\n recipient_name?: string;\n sender_name?: string;\n sender_email?: string;\n };\n}\n\nfunction transformItems(items: RawItemData[]): Item[] {\n if (!items?.length) return [];\n\n return items.map((item: RawItemData) => {\n return {\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}\n"],"names":["setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","handleFetchError","errors","errorMessage","REQUISITION_LIST_FRAGMENT","transformRequisitionList","data","transformItems","_a","_b","items","item","option","value","sample"],"mappings":"+DAmBa,KAAA,CACX,YAAAA,EACA,sBAAAC,EACA,yBAAAC,EACA,uBAAAC,EACA,aAAAC,EACA,UAAAC,CACF,EAAI,IAAIC,EAAa,EAAE,WAAW,ECRrBC,EAAoBC,GAAuC,CAChE,MAAAC,EAAeD,EAAO,IAAK,GAAW,EAAE,OAAO,EAAE,KAAK,GAAG,EAE/D,MAAM,MAAMC,CAAY,CAC1B,ECLaC,EAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECmBlC,SAASC,EACdC,EACwB,SACjB,MAAA,CACL,IAAKA,EAAK,IACV,KAAMA,EAAK,KACX,YAAaA,EAAK,YAClB,WAAYA,EAAK,WACjB,YAAaA,EAAK,YAClB,MAAOC,GAAeC,EAAAF,EAAK,QAAL,YAAAE,EAAY,KAAK,EACvC,WAAWC,EAAAH,EAAK,QAAL,YAAAG,EAAY,SACzB,CACF,CAqEA,SAASF,EAAeG,EAA8B,CACpD,OAAKA,GAAA,MAAAA,EAAO,OAELA,EAAM,IAAKC,IACT,CACL,IAAKA,EAAK,IACV,IAAKA,EAAK,QAAQ,IAClB,SAAUA,EAAK,SACf,qBAAsBA,EAAK,qBACvBA,EAAK,qBAAqB,IAAKC,IAAY,CACzC,IAAKA,EAAO,wBACZ,YAAaA,EAAO,YACpB,MAAOA,EAAO,MACd,WAAYA,EAAO,WACnB,KAAMA,EAAO,KACb,OAAQA,EAAO,OAAO,IAAKC,IAAW,CACpC,IAAKA,EAAM,8BACX,MAAOA,EAAM,MACb,MAAOA,EAAM,MACb,MAAOA,EAAM,KAAA,EACb,CACJ,EAAE,EACF,CAAC,EACL,eAAgBF,EAAK,gBAAkB,CAAC,EACxC,qBAAsBA,EAAK,qBACvBA,EAAK,qBAAqB,IAAKC,IAAY,CACzC,WAAYA,EAAO,gCACnB,aAAcA,EAAO,aACrB,UAAWA,EAAO,sCAClB,YAAaA,EAAO,WACtB,EAAE,EACF,CAAC,EACL,QAASD,EAAK,QACVA,EAAK,QAAQ,IAAKG,IAAY,CAC5B,IAAKA,EAAO,WACZ,WAAYA,EAAO,WACnB,MAAOA,EAAO,KAChB,EAAE,EACF,CAAC,EACL,kBAAmBH,EAAK,mBAAqB,CAAA,CAC/C,EACD,EAxC0B,CAAC,CAyC9B"}
@@ -0,0 +1,16 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface BatchActionsProps extends HTMLAttributes<HTMLDivElement | HTMLFormElement> {
5
+ selectedItems: Set<string>;
6
+ deletingItemId: string | null;
7
+ addingToCartItemId: string | null;
8
+ bulkAddingToCart: boolean;
9
+ updatingQuantityItemId: string | null;
10
+ onSelectAll: () => void;
11
+ onSelectNone: () => void;
12
+ onBulkAddToCart: () => void;
13
+ onBulkDelete: () => void;
14
+ }
15
+ export declare const BatchActions: FunctionComponent<BatchActionsProps>;
16
+ //# sourceMappingURL=BatchActions.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 * from './BatchActions';
18
+ export { BatchActions as default } from './BatchActions';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export interface EmptyListProps {
4
+ className?: string;
5
+ textContent?: string | null;
6
+ }
7
+ export declare const EmptyList: FunctionComponent<EmptyListProps>;
8
+ //# sourceMappingURL=EmptyList.d.ts.map
@@ -15,5 +15,5 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
17
  export * from '.';
18
- export { RequisitionListItem } from './RequisitionListItem';
18
+ export { EmptyList } from './EmptyList';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+
3
+ export interface PageSizePickerProps extends HTMLAttributes<HTMLDivElement> {
4
+ currentPageSize: number;
5
+ onPageSizeChange: (pageSize: number) => void;
6
+ disabled?: boolean;
7
+ pageSizeOptions?: number[];
8
+ }
9
+ export declare const PageSizePicker: ({ currentPageSize, onPageSizeChange, disabled, pageSizeOptions, }: PageSizePickerProps) => import("preact/compat").JSX.Element;
10
+ //# sourceMappingURL=PageSizePicker.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+ import { RequisitionListModel } from '../../data/models/requisitionList';
4
+
5
+ export interface ProductListTableProps extends HTMLAttributes<HTMLDivElement | HTMLFormElement> {
6
+ className?: string;
7
+ items: RequisitionListModel['items'];
8
+ selectedItems: Set<string>;
9
+ currentPage: number;
10
+ pageSize: number;
11
+ canEdit?: boolean;
12
+ handleItemSelection: (itemUid: string, isSelected: boolean) => void;
13
+ handleUpdateQuantity: (itemUid: string, newQuantity: number) => void;
14
+ onAddToCart: (itemUids: string[] | undefined) => void;
15
+ onDeleteItem: (itemUids: string[] | undefined) => void;
16
+ }
17
+ export declare const ProductListTable: FunctionComponent<ProductListTableProps>;
18
+ //# sourceMappingURL=ProductListTable.d.ts.map
@@ -0,0 +1,50 @@
1
+ export declare const RequisitionListModel: {
2
+ description: string;
3
+ items: ({
4
+ bundle_options: {
5
+ label: string;
6
+ type: string;
7
+ uid: string;
8
+ values: {
9
+ label: string;
10
+ original_price: {
11
+ currency: string;
12
+ value: number;
13
+ };
14
+ priceV2: {
15
+ currency: string;
16
+ value: number;
17
+ };
18
+ quantity: number;
19
+ uid: string;
20
+ }[];
21
+ }[];
22
+ configurable_options: never[];
23
+ customizable_options: never[];
24
+ gift_card_options: {};
25
+ quantity: number;
26
+ samples: never[];
27
+ sku: string;
28
+ uid: string;
29
+ } | {
30
+ bundle_options: never[];
31
+ configurable_options: {
32
+ option_label: string;
33
+ option_uid: string;
34
+ value_label: string;
35
+ value_uid: string;
36
+ }[];
37
+ customizable_options: never[];
38
+ gift_card_options: {};
39
+ quantity: number;
40
+ samples: never[];
41
+ sku: string;
42
+ uid: string;
43
+ })[];
44
+ items_count: number;
45
+ name: string;
46
+ page_info: undefined;
47
+ uid: string;
48
+ updated_at: string;
49
+ };
50
+ //# sourceMappingURL=RequisitionListModel.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 * from './ProductListTable';
18
+ export { ProductListTable as default } from './ProductListTable';
19
+ //# sourceMappingURL=index.d.ts.map