@dropins/storefront-quote-management 0.0.1-alpha10

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 (94) hide show
  1. package/LICENSE.md +128 -0
  2. package/api/fetch-graphql/fetch-graphql.d.ts +8 -0
  3. package/api/fetch-graphql/index.d.ts +2 -0
  4. package/api/getCustomerData/getCustomerData.d.ts +10 -0
  5. package/api/getCustomerData/graphql/CustomerQuery.d.ts +2 -0
  6. package/api/getCustomerData/index.d.ts +10 -0
  7. package/api/getQuoteData/getQuoteData.d.ts +10 -0
  8. package/api/getQuoteData/graphql/QuoteDataQuery.d.ts +2 -0
  9. package/api/getQuoteData/index.d.ts +10 -0
  10. package/api/graphql/CustomerFragment.d.ts +2 -0
  11. package/api/graphql/NegotiableQuoteFragment.d.ts +18 -0
  12. package/api/graphql/NegotiableQuoteListFragment.d.ts +10 -0
  13. package/api/graphql/SearchResultPageInfoFragment.d.ts +10 -0
  14. package/api/graphql/SortFieldsFragment.d.ts +10 -0
  15. package/api/index.d.ts +7 -0
  16. package/api/initialize/index.d.ts +2 -0
  17. package/api/initialize/initialize.d.ts +11 -0
  18. package/api/negotiableQuotes/graphql/NegotiableQuotesQuery.d.ts +10 -0
  19. package/api/negotiableQuotes/index.d.ts +10 -0
  20. package/api/negotiableQuotes/negotiableQuotes.d.ts +39 -0
  21. package/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.d.ts +18 -0
  22. package/api/requestNegotiableQuote/index.d.ts +10 -0
  23. package/api/requestNegotiableQuote/requestNegotiableQuote.d.ts +10 -0
  24. package/api.d.ts +1 -0
  25. package/api.js +41 -0
  26. package/api.js.map +1 -0
  27. package/chunks/WarningFilled.js +4 -0
  28. package/chunks/WarningFilled.js.map +1 -0
  29. package/chunks/negotiableQuotes.js +66 -0
  30. package/chunks/negotiableQuotes.js.map +1 -0
  31. package/chunks/requestNegotiableQuote.js +169 -0
  32. package/chunks/requestNegotiableQuote.js.map +1 -0
  33. package/chunks/transform-quote.js +4 -0
  34. package/chunks/transform-quote.js.map +1 -0
  35. package/components/ActionsBar/ActionsBar.d.ts +14 -0
  36. package/components/ActionsBar/index.d.ts +11 -0
  37. package/components/ItemsQuoted/ItemsQuoted.d.ts +11 -0
  38. package/components/ItemsQuoted/index.d.ts +11 -0
  39. package/components/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +20 -0
  40. package/components/ManageNegotiableQuote/__fixtures__/ManageNegotiableQuoteProps.d.ts +4 -0
  41. package/components/ManageNegotiableQuote/index.d.ts +11 -0
  42. package/components/ProductListTable/ProductListTable.d.ts +13 -0
  43. package/components/ProductListTable/index.d.ts +11 -0
  44. package/components/QuotePricesSummary/QuotePricesSummary.d.ts +16 -0
  45. package/components/QuotePricesSummary/index.d.ts +11 -0
  46. package/components/QuotesListTable/QuotesListTable.d.ts +29 -0
  47. package/components/QuotesListTable/index.d.ts +11 -0
  48. package/components/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +15 -0
  49. package/components/RequestNegotiableQuoteForm/index.d.ts +11 -0
  50. package/components/TabbedContent/TabbedContent.d.ts +10 -0
  51. package/components/TabbedContent/index.d.ts +11 -0
  52. package/components/index.d.ts +9 -0
  53. package/containers/ItemsQuoted/ItemsQuoted.d.ts +25 -0
  54. package/containers/ItemsQuoted/index.d.ts +11 -0
  55. package/containers/ItemsQuoted.d.ts +3 -0
  56. package/containers/ItemsQuoted.js +4 -0
  57. package/containers/ItemsQuoted.js.map +1 -0
  58. package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +48 -0
  59. package/containers/ManageNegotiableQuote/index.d.ts +11 -0
  60. package/containers/ManageNegotiableQuote.d.ts +3 -0
  61. package/containers/ManageNegotiableQuote.js +4 -0
  62. package/containers/ManageNegotiableQuote.js.map +1 -0
  63. package/containers/QuotesListTable/QuotesListTable.d.ts +72 -0
  64. package/containers/QuotesListTable/index.d.ts +11 -0
  65. package/containers/QuotesListTable.d.ts +3 -0
  66. package/containers/QuotesListTable.js +4 -0
  67. package/containers/QuotesListTable.js.map +1 -0
  68. package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +58 -0
  69. package/containers/RequestNegotiableQuoteForm/index.d.ts +11 -0
  70. package/containers/RequestNegotiableQuoteForm.d.ts +3 -0
  71. package/containers/RequestNegotiableQuoteForm.js +4 -0
  72. package/containers/RequestNegotiableQuoteForm.js.map +1 -0
  73. package/containers/index.d.ts +5 -0
  74. package/data/models/__fixtures__/customerModel.d.ts +4 -0
  75. package/data/models/__fixtures__/negotiableQuoteModel.d.ts +7 -0
  76. package/data/models/__fixtures__/negotiableQuotesListModel.d.ts +5 -0
  77. package/data/models/customer-model.d.ts +18 -0
  78. package/data/models/index.d.ts +3 -0
  79. package/data/models/negotiable-quote-model.d.ts +136 -0
  80. package/data/transforms/__fixtures__/customerData.d.ts +10 -0
  81. package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +358 -0
  82. package/data/transforms/index.d.ts +19 -0
  83. package/data/transforms/transform-customer.d.ts +15 -0
  84. package/data/transforms/transform-quote.d.ts +7 -0
  85. package/i18n/en_US.json.d.ts +94 -0
  86. package/lib/state.d.ts +10 -0
  87. package/package.json +1 -0
  88. package/render/Provider.d.ts +8 -0
  89. package/render/index.d.ts +2 -0
  90. package/render/render.d.ts +4 -0
  91. package/render.d.ts +1 -0
  92. package/render.js +7 -0
  93. package/render.js.map +1 -0
  94. package/types/state.types.d.ts +10 -0
@@ -0,0 +1,169 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{fetchGraphQl as _}from"@dropins/tools/fetch-graphql.js";import{events as d}from"@dropins/tools/event-bus.js";import{t as p}from"./transform-quote.js";const g=`
4
+ fragment NegotiableQuoteFragment on NegotiableQuote {
5
+ uid
6
+ name
7
+ created_at
8
+ status
9
+ sales_rep_name
10
+ expiration_date
11
+ updated_at
12
+ buyer {
13
+ firstname
14
+ lastname
15
+ }
16
+ comments {
17
+ uid
18
+ created_at
19
+ author {
20
+ firstname
21
+ lastname
22
+ }
23
+ text
24
+ }
25
+ template_id
26
+ template_name
27
+ items {
28
+ product {
29
+ name
30
+ sku
31
+ uid
32
+ stock_status
33
+ quantity
34
+ price_range {
35
+ maximum_price {
36
+ regular_price {
37
+ value
38
+ }
39
+ }
40
+ }
41
+ }
42
+ prices {
43
+ price {
44
+ currency
45
+ value
46
+ }
47
+ original_item_price {
48
+ currency
49
+ value
50
+ }
51
+ original_row_total {
52
+ currency
53
+ value
54
+ }
55
+ row_total {
56
+ currency
57
+ value
58
+ }
59
+ catalog_discount {
60
+ amount_off
61
+ percent_off
62
+ }
63
+ discounts {
64
+ label
65
+ value
66
+ amount {
67
+ currency
68
+ value
69
+ }
70
+ }
71
+ }
72
+ quantity
73
+ ... on ConfigurableCartItem {
74
+ configurable_options {
75
+ option_label
76
+ value_label
77
+ }
78
+ }
79
+ ... on BundleCartItem {
80
+ bundle_options {
81
+ label
82
+ values {
83
+ label
84
+ quantity
85
+ original_price {
86
+ currency
87
+ value
88
+ }
89
+ priceV2 {
90
+ currency
91
+ value
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ history {
98
+ uid
99
+ created_at
100
+ author {
101
+ firstname
102
+ lastname
103
+ }
104
+ change_type
105
+ changes {
106
+ comment_added {
107
+ comment
108
+ }
109
+ statuses {
110
+ changes {
111
+ new_status
112
+ old_status
113
+ }
114
+ }
115
+ expiration {
116
+ new_expiration
117
+ old_expiration
118
+ }
119
+ }
120
+ }
121
+ prices {
122
+ subtotal_excluding_tax {
123
+ currency
124
+ value
125
+ }
126
+ subtotal_including_tax {
127
+ currency
128
+ value
129
+ }
130
+ subtotal_with_discount_excluding_tax {
131
+ currency
132
+ value
133
+ }
134
+ applied_taxes {
135
+ amount {
136
+ currency
137
+ value
138
+ }
139
+ label
140
+ }
141
+ grand_total {
142
+ currency
143
+ value
144
+ }
145
+ }
146
+ }
147
+ `,f=`
148
+ mutation REQUEST_NEGOTIABLE_QUOTE_MUTATION(
149
+ $cartId: ID!
150
+ $quoteName: String!
151
+ $comment: NegotiableQuoteCommentInput!
152
+ $isDraft: Boolean
153
+ ) {
154
+ requestNegotiableQuote(
155
+ input: {
156
+ cart_id: $cartId
157
+ quote_name: $quoteName
158
+ comment: $comment
159
+ is_draft: $isDraft
160
+ }
161
+ ) {
162
+ quote {
163
+ ...NegotiableQuoteFragment
164
+ }
165
+ }
166
+ }
167
+ ${g}
168
+ `,y=async c=>{const{cartId:e,quoteName:t,comment:a,isDraft:o}=c;if(!e)throw new Error("Cart ID is required");if(!t)throw new Error("Quote name is required");if(!a)throw new Error("Comment is required");return _(f,{variables:{cartId:e,quoteName:t,comment:{comment:a},isDraft:o}}).then(n=>{var i,s;const{errors:u}=n;if(u){const l=u.map(m=>m.message).join("; ");throw new Error(`Failed to request negotiable quote: ${l}`)}const r=p((s=(i=n.data)==null?void 0:i.requestNegotiableQuote)==null?void 0:s.quote);if(!r)throw new Error("Failed to transform quote data: Invalid response structure");return d.emit("quote-management/negotiable-quote-requested",{quote:r,input:{cartId:e,quoteName:t,comment:a,isDraft:o}}),r})};export{g as N,y as r};
169
+ //# sourceMappingURL=requestNegotiableQuote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestNegotiableQuote.js","sources":["/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteFragment.ts","/@dropins/storefront-quote-management/src/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.ts","/@dropins/storefront-quote-management/src/api/requestNegotiableQuote/requestNegotiableQuote.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 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 NEGOTIABLE_QUOTE_FRAGMENT = /* GraphQL */ `\n fragment NegotiableQuoteFragment on NegotiableQuote {\n uid\n name\n created_at\n status\n sales_rep_name\n expiration_date\n updated_at\n buyer {\n firstname\n lastname\n }\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n }\n template_id\n template_name\n items {\n product {\n name\n sku\n uid\n stock_status\n quantity\n price_range {\n maximum_price {\n regular_price {\n value\n }\n }\n }\n }\n prices {\n price {\n currency\n value\n }\n original_item_price {\n currency\n value\n }\n original_row_total {\n currency\n value\n }\n row_total {\n currency\n value\n }\n catalog_discount {\n amount_off\n percent_off\n }\n discounts {\n label\n value\n amount {\n currency\n value\n }\n }\n }\n quantity\n ... on ConfigurableCartItem {\n\t\t\t\tconfigurable_options {\n\t\t\t\t\toption_label\n\t\t\t\t\tvalue_label\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on BundleCartItem {\n\t\t\t\tbundle_options {\n\t\t\t\t\tlabel\n\t\t\t\t\tvalues {\n\t\t\t\t\t\tlabel\n\t\t\t\t\t\tquantity\n original_price {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpriceV2 {\n\t\t\t\t\t\t\tcurrency\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n history {\n uid\n created_at\n author {\n firstname\n lastname\n }\n change_type\n changes {\n comment_added {\n comment\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n }\n }\n prices {\n subtotal_excluding_tax {\n currency\n value\n }\n subtotal_including_tax {\n currency\n value\n }\n subtotal_with_discount_excluding_tax {\n currency\n value\n }\n applied_taxes {\n amount {\n currency\n value\n }\n label\n }\n grand_total {\n currency\n value\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 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 { NEGOTIABLE_QUOTE_FRAGMENT } from '@/quote-management/api/graphql/NegotiableQuoteFragment';\n\nexport const REQUEST_NEGOTIABLE_QUOTE_MUTATION = `\n mutation REQUEST_NEGOTIABLE_QUOTE_MUTATION(\n $cartId: ID!\n $quoteName: String!\n $comment: NegotiableQuoteCommentInput!\n $isDraft: Boolean\n ) {\n requestNegotiableQuote(\n input: {\n cart_id: $cartId\n quote_name: $quoteName\n comment: $comment\n is_draft: $isDraft\n }\n ) {\n quote {\n ...NegotiableQuoteFragment\n }\n }\n }\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@adobe-commerce/fetch-graphql';\nimport { events } from '@adobe-commerce/event-bus';\nimport { REQUEST_NEGOTIABLE_QUOTE_MUTATION } from './graphql/RequestNegotiableQuoteMutation';\nimport { NegotiableQuoteModel } from '@/quote-management/data/models/negotiable-quote-model';\nimport { transformQuote } from '@/quote-management/data/transforms';\n\nexport interface RequestNegotiableQuoteInput {\n cartId: string;\n quoteName: string;\n comment: string;\n isDraft?: boolean;\n}\n\nexport const requestNegotiableQuote = async (\n input: RequestNegotiableQuoteInput\n): Promise<NegotiableQuoteModel | null> => {\n const { cartId, quoteName, comment, isDraft } = input;\n\n if (!cartId) {\n throw new Error('Cart ID is required');\n }\n\n if (!quoteName) {\n throw new Error('Quote name is required');\n }\n\n if (!comment) {\n throw new Error('Comment is required');\n }\n\n return fetchGraphQl(REQUEST_NEGOTIABLE_QUOTE_MUTATION, {\n variables: {\n cartId,\n quoteName,\n comment: {\n comment\n },\n isDraft,\n },\n }).then((response) => {\n const { errors } = response;\n\n if (errors) {\n // Provide more detailed error information\n const errorMessages = errors.map((error) => error.message).join('; ');\n throw new Error(`Failed to request negotiable quote: ${errorMessages}`);\n }\n\n // Transform the quote data\n const quoteData = transformQuote(response.data?.requestNegotiableQuote?.quote);\n\n if (!quoteData) {\n throw new Error(\n 'Failed to transform quote data: Invalid response structure'\n );\n }\n\n // Emit event with transformed quote data on success\n events.emit('quote-management/negotiable-quote-requested', {\n quote: quoteData,\n input: { cartId, quoteName, comment, isDraft },\n });\n\n return quoteData;\n });\n};\n"],"names":["NEGOTIABLE_QUOTE_FRAGMENT","REQUEST_NEGOTIABLE_QUOTE_MUTATION","requestNegotiableQuote","input","cartId","quoteName","comment","isDraft","fetchGraphQl","response","errors","errorMessages","error","quoteData","transformQuote","_b","_a","events"],"mappings":"6JAiBO,MAAMA,EAA0C;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;AAA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,CAAE,OAAAT,EAAQ,UAAAC,EAAW,QAAAC,EAAS,QAAAC,CAAA,CAAQ,CAC9C,EAEMM,CACT,CAAC,CACH"}
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ const d={requestQuote:!1,editQuote:!1,deleteQuote:!1,checkoutQuote:!1},_={authenticated:!1,permissions:d},p=new Proxy(_,{get:(a,t)=>a[t],set:(a,t,n)=>(a[t]=n,!0)});function g(a){var t,n,i;return{uid:a.uid,name:a.name,createdAt:a.created_at,updatedAt:a.updated_at,expirationDate:a.expiration_date,status:a.status,salesRepName:a.sales_rep_name,buyer:{firstname:a.buyer.firstname,lastname:a.buyer.lastname},templateName:a.template_name,comments:(t=a.comments)==null?void 0:t.map(e=>({uid:e.uid,createdAt:e.created_at,author:{firstname:e.author.firstname,lastname:e.author.lastname}})),prices:a.prices&&{subtotalExcludingTax:a.prices.subtotal_excluding_tax&&{value:a.prices.subtotal_excluding_tax.value,currency:a.prices.subtotal_excluding_tax.currency},subtotalIncludingTax:a.prices.subtotal_including_tax&&{value:a.prices.subtotal_including_tax.value,currency:a.prices.subtotal_including_tax.currency},subtotalWithDiscountExcludingTax:a.prices.subtotal_with_discount_excluding_tax&&{value:a.prices.subtotal_with_discount_excluding_tax.value,currency:a.prices.subtotal_with_discount_excluding_tax.currency},appliedTaxes:(n=a.prices.applied_taxes)==null?void 0:n.map(e=>({amount:{value:e.amount.value,currency:e.amount.currency},label:e.label})),grandTotal:a.prices.grand_total&&{value:a.prices.grand_total.value,currency:a.prices.grand_total.currency}},items:((i=a.items)==null?void 0:i.map(e=>{var s,l,u,o;return{product:{uid:e.product.uid,sku:e.product.sku,name:e.product.name},catalogDiscount:{amountOff:e.prices.catalog_discount.amount_off,percentOff:e.prices.catalog_discount.percent_off},discounts:((l=(s=e.prices)==null?void 0:s.discounts)==null?void 0:l.map(r=>({label:r.label,value:r.value,amount:{value:r.amount.value,currency:r.amount.currency}})))??[],stockStatus:e.product.stock_status,quantity:e.quantity,prices:{originalItemPrice:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency},rowTotal:{value:e.prices.row_total.value,currency:e.prices.row_total.currency}},configurableOptions:(u=e.configurable_options)==null?void 0:u.map(r=>({optionLabel:r.option_label,valueLabel:r.value_label})),bundleOptions:(o=e.bundle_options)==null?void 0:o.map(r=>({label:r.label,values:r.values.map(c=>({label:c.label,quantity:c.quantity,originalPrice:{value:c.original_price.value,currency:c.original_price.currency},price:{value:c.priceV2.value,currency:c.priceV2.currency}}))}))}}))||[],canCheckout:["UPDATED","DECLINED"].includes(a.status)&&p.permissions.checkoutQuote,canSendForReview:["SUBMITTED","DRAFT","UPDATED","DECLINED","EXPIRED"].includes(a.status)&&p.permissions.editQuote}}function b(a){return a?g(a):null}function f(a){return{uid:a.uid,name:a.name,createdAt:a.created_at,updatedAt:a.updated_at,status:a.status,buyer:{firstname:a.buyer.firstname,lastname:a.buyer.lastname},templateName:a.template_name,prices:{grandTotal:{value:a.prices.grand_total.value,currency:a.prices.grand_total.currency}}}}function y(a){var i;if(!a)return null;const t={items:((i=a.items)==null?void 0:i.filter(e=>e==null?void 0:e.uid).map(f))||[],pageInfo:{currentPage:a.page_info.current_page,pageSize:a.page_info.page_size,totalPages:a.page_info.total_pages},totalCount:a.total_count,sortFields:a.sort_fields?{default:a.sort_fields.default,options:a.sort_fields.options}:void 0},n=m(t);return{...t,paginationInfo:n||void 0}}function m(a){if(!(a!=null&&a.pageInfo)||!a.totalCount)return null;const{currentPage:t,pageSize:n,totalPages:i}=a.pageInfo,{totalCount:e}=a,s=e>0?(t-1)*n+1:0,l=Math.min(t*n,e);return{currentPage:t,totalCount:e,pageSize:n,startItem:s,endItem:l,totalPages:i,pageSizeOptions:[20,30,50,100,200]}}const v=()=>[20,30,50,100,200];export{d as D,y as a,v as g,p as s,b as t};
4
+ //# sourceMappingURL=transform-quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform-quote.js","sources":["/@dropins/storefront-quote-management/src/lib/state.ts","/@dropins/storefront-quote-management/src/data/transforms/transform-quote.ts"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { State } from '../types/state.types';\n\nexport const DEFAULT_PERMISSIONS = {\n requestQuote: false,\n editQuote: false,\n deleteQuote: false,\n checkoutQuote: false,\n};\n\nconst _state: State = {\n authenticated: false,\n permissions: DEFAULT_PERMISSIONS,\n}\n\n// Proxy state to make it reactive\nexport const state = new Proxy(_state, {\n get: (target, key) => {\n return target[key as keyof State];\n },\n set: (target, key, value) => {\n target[key as keyof State] = value;\n return true;\n }\n})","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 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 {\n NegotiableQuoteListEntry,\n NegotiableQuoteModel,\n NegotiableQuotesListModel,\n PaginationInfo,\n} from '@/quote-management/data/models/negotiable-quote-model';\nimport { state } from '@/quote-management/lib/state';\n\n// Base helper that transforms a single quote object directly\nfunction transformSingleQuote(quote: any): NegotiableQuoteModel {\n return {\n uid: quote.uid,\n name: quote.name,\n createdAt: quote.created_at,\n updatedAt: quote.updated_at,\n expirationDate: quote.expiration_date,\n status: quote.status,\n salesRepName: quote.sales_rep_name,\n buyer: {\n firstname: quote.buyer.firstname,\n lastname: quote.buyer.lastname,\n },\n templateName: quote.template_name,\n comments: quote.comments?.map((comment: any) => ({\n uid: comment.uid,\n createdAt: comment.created_at,\n author: {\n firstname: comment.author.firstname,\n lastname: comment.author.lastname,\n },\n })),\n prices: quote.prices && {\n subtotalExcludingTax: quote.prices.subtotal_excluding_tax && {\n value: quote.prices.subtotal_excluding_tax.value,\n currency: quote.prices.subtotal_excluding_tax.currency,\n },\n subtotalIncludingTax: quote.prices.subtotal_including_tax && {\n value: quote.prices.subtotal_including_tax.value,\n currency: quote.prices.subtotal_including_tax.currency,\n },\n subtotalWithDiscountExcludingTax: quote.prices\n .subtotal_with_discount_excluding_tax && {\n value: quote.prices.subtotal_with_discount_excluding_tax.value,\n currency: quote.prices.subtotal_with_discount_excluding_tax.currency,\n },\n appliedTaxes: quote.prices.applied_taxes?.map((tax: any) => ({\n amount: { value: tax.amount.value, currency: tax.amount.currency },\n label: tax.label,\n })),\n grandTotal: quote.prices.grand_total && {\n value: quote.prices.grand_total.value,\n currency: quote.prices.grand_total.currency,\n },\n },\n items: quote.items?.map((item: any) => ({\n product: {\n uid: item.product.uid,\n sku: item.product.sku,\n name: item.product.name,\n },\n catalogDiscount: {\n amountOff: item.prices.catalog_discount.amount_off,\n percentOff: item.prices.catalog_discount.percent_off,\n },\n discounts: item.prices?.discounts?.map((discount: any) => ({\n label: discount.label,\n value: discount.value,\n amount: { value: discount.amount.value, currency: discount.amount.currency },\n })) ?? [],\n stockStatus: item.product.stock_status,\n quantity: item.quantity,\n prices: {\n originalItemPrice: {\n value: item.prices.original_item_price.value,\n currency: item.prices.original_item_price.currency,\n },\n rowTotal: {\n value: item.prices.row_total.value,\n currency: item.prices.row_total.currency,\n },\n },\n configurableOptions: item.configurable_options?.map((option: any) => ({\n optionLabel: option.option_label,\n valueLabel: option.value_label,\n })),\n bundleOptions: item.bundle_options?.map((option: any) => ({\n label: option.label,\n values: option.values.map((value: any) => ({\n label: value.label,\n quantity: value.quantity,\n originalPrice: {\n value: value.original_price.value,\n currency: value.original_price.currency,\n },\n price: {\n value: value.priceV2.value,\n currency: value.priceV2.currency,\n },\n })),\n })),\n })) || [],\n canCheckout: ['UPDATED', 'DECLINED'].includes(quote.status) && state.permissions.checkoutQuote,\n canSendForReview: ['SUBMITTED', 'DRAFT', 'UPDATED', 'DECLINED', 'EXPIRED'].includes(quote.status) && state.permissions.editQuote,\n };\n}\n\nexport function transformQuote(quoteData: any): NegotiableQuoteModel | null {\n if (!quoteData) {\n return null;\n }\n\n return transformSingleQuote(quoteData);\n}\n\nfunction transformNegotiableQuoteListEntry(quote: any): NegotiableQuoteListEntry {\n return {\n uid: quote.uid,\n name: quote.name,\n createdAt: quote.created_at,\n updatedAt: quote.updated_at,\n status: quote.status,\n buyer: {\n firstname: quote.buyer.firstname,\n lastname: quote.buyer.lastname,\n },\n templateName: quote.template_name,\n prices: {\n grandTotal: {\n value: quote.prices.grand_total.value,\n currency: quote.prices.grand_total.currency,\n },\n },\n };\n}\n\nexport function transformNegotiableQuotesList(\n quotesData: any\n): NegotiableQuotesListModel | null {\n if (!quotesData) {\n return null;\n }\n\n const transformedModel = {\n items:\n quotesData.items\n ?.filter((quote: any) => quote?.uid)\n .map(transformNegotiableQuoteListEntry) || [],\n pageInfo: {\n currentPage: quotesData.page_info.current_page,\n pageSize: quotesData.page_info.page_size,\n totalPages: quotesData.page_info.total_pages,\n },\n totalCount: quotesData.total_count,\n sortFields: quotesData.sort_fields\n ? {\n default: quotesData.sort_fields.default,\n options: quotesData.sort_fields.options,\n }\n : undefined,\n };\n\n // Calculate pagination info\n const paginationInfo = transformPaginationInfo(transformedModel);\n\n return {\n ...transformedModel,\n paginationInfo: paginationInfo || undefined,\n };\n}\n\nexport function transformPaginationInfo(\n quotesData: NegotiableQuotesListModel | null\n): PaginationInfo | null {\n if (!quotesData?.pageInfo || !quotesData.totalCount) {\n return null;\n }\n\n const { currentPage, pageSize, totalPages } = quotesData.pageInfo;\n const { totalCount } = quotesData;\n\n const startItem = totalCount > 0 ? (currentPage - 1) * pageSize + 1 : 0;\n const endItem = Math.min(currentPage * pageSize, totalCount);\n\n const pageSizeOptions = [20, 30, 50, 100, 200]; // Default page size options\n\n return {\n currentPage,\n totalCount,\n pageSize,\n startItem,\n endItem,\n totalPages,\n pageSizeOptions,\n };\n}\n\n// TODO: Check if admin has this configuration\nexport const getDefaultPageSizeOptions = () => [20, 30, 50, 100, 200];\n"],"names":["DEFAULT_PERMISSIONS","_state","state","target","key","value","transformSingleQuote","quote","_a","_b","_c","comment","tax","item","_d","discount","option","transformQuote","quoteData","transformNegotiableQuoteListEntry","transformNegotiableQuotesList","quotesData","transformedModel","paginationInfo","transformPaginationInfo","currentPage","pageSize","totalPages","totalCount","startItem","endItem","getDefaultPageSizeOptions"],"mappings":"AAWO,MAAMA,EAAsB,CAC/B,aAAc,GACd,UAAW,GACX,YAAa,GACb,cAAe,EACnB,EAEMC,EAAgB,CAClB,cAAe,GACf,YAAaD,CACjB,EAGaE,EAAQ,IAAI,MAAMD,EAAQ,CACnC,IAAK,CAACE,EAAQC,IACHD,EAAOC,CAAkB,EAEpC,IAAK,CAACD,EAAQC,EAAKC,KACfF,EAAOC,CAAkB,EAAIC,EACtB,GAEf,CAAC,ECPD,SAASC,EAAqBC,EAAkC,CDdzD,IAAAC,EAAAC,EAAAC,ECeL,MAAO,CACL,IAAKH,EAAM,IACX,KAAMA,EAAM,KACZ,UAAWA,EAAM,WACjB,UAAWA,EAAM,WACjB,eAAgBA,EAAM,gBACtB,OAAQA,EAAM,OACd,aAAcA,EAAM,eACpB,MAAO,CACL,UAAWA,EAAM,MAAM,UACvB,SAAUA,EAAM,MAAM,QAAA,EAExB,aAAcA,EAAM,cACpB,UAAUC,EAAAD,EAAM,WAAN,YAAAC,EAAgB,IAAKG,IAAkB,CAC/C,IAAKA,EAAQ,IACb,UAAWA,EAAQ,WACnB,OAAQ,CACN,UAAWA,EAAQ,OAAO,UAC1B,SAAUA,EAAQ,OAAO,QAAA,CAC3B,IAEF,OAAQJ,EAAM,QAAU,CACtB,qBAAsBA,EAAM,OAAO,wBAA0B,CAC3D,MAAOA,EAAM,OAAO,uBAAuB,MAC3C,SAAUA,EAAM,OAAO,uBAAuB,QAAA,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U,CACR,YAAaE,EAAW,UAAU,aAClC,SAAUA,EAAW,UAAU,UAC/B,WAAYA,EAAW,UAAU,WAAA,EAEnC,WAAYA,EAAW,YACvB,WAAYA,EAAW,YACnB,CACE,QAASA,EAAW,YAAY,QAChC,QAASA,EAAW,YAAY,OAAA,EAElC,MAAA,EAIAE,EAAiBC,EAAwBF,CAAgB,EAE/D,MAAO,CACL,GAAGA,EACH,eAAgBC,GAAkB,MAAA,CAEtC,CAEO,SAASC,EACdH,EACuB,CACvB,GAAI,EAACA,GAAA,MAAAA,EAAY,WAAY,CAACA,EAAW,WACvC,OAAO,KAGT,KAAM,CAAE,YAAAI,EAAa,SAAAC,EAAU,WAAAC,CAAA,EAAeN,EAAW,SACnD,CAAE,WAAAO,GAAeP,EAEjBQ,EAAYD,EAAa,GAAKH,EAAc,GAAKC,EAAW,EAAI,EAChEI,EAAU,KAAK,IAAIL,EAAcC,EAAUE,CAAU,EAI3D,MAAO,CACL,YAAAH,EACA,WAAAG,EACA,SAAAF,EACA,UAAAG,EACA,QAAAC,EACA,WAAAH,EACA,gBATsB,CAAC,GAAI,GAAI,GAAI,IAAK,GAAG,CAS3C,CAEJ,CAGO,MAAMI,EAA4B,IAAM,CAAC,GAAI,GAAI,GAAI,IAAK,GAAG"}
@@ -0,0 +1,14 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface ActionsBarProps extends HTMLAttributes<HTMLDivElement> {
5
+ dropdownPlaceholder?: string;
6
+ dropdownOptions?: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ handleDropdownChange?: (event: Event) => void;
11
+ buttons?: VNode[];
12
+ }
13
+ export declare const ActionsBar: FunctionComponent<ActionsBarProps>;
14
+ //# sourceMappingURL=ActionsBar.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './ActionsBar';
10
+ export { ActionsBar as default } from './ActionsBar';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface ItemsQuotedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {
5
+ loading?: boolean;
6
+ table?: VNode;
7
+ pricesSummary?: VNode;
8
+ }
9
+ export declare const ItemsQuoted: FunctionComponent<ItemsQuotedProps>;
10
+ export declare const ItemsQuotedSkeleton: FunctionComponent;
11
+ //# sourceMappingURL=ItemsQuoted.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './ItemsQuoted';
10
+ export { ItemsQuoted as default } from './ItemsQuoted';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface ManageNegotiableQuoteProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {
5
+ loading?: boolean;
6
+ quoteName: VNode;
7
+ quoteStatus: VNode;
8
+ banner?: VNode;
9
+ details: VNode;
10
+ actionBar?: VNode;
11
+ quoteContent: VNode;
12
+ shippingInformationTitle: VNode;
13
+ shippingInformation: VNode;
14
+ quoteCommentsTitle: VNode;
15
+ quoteComments: VNode;
16
+ footer: VNode;
17
+ }
18
+ export declare const ManageNegotiableQuote: FunctionComponent<ManageNegotiableQuoteProps>;
19
+ export declare const ManageNegotiableQuoteSkeleton: FunctionComponent;
20
+ //# sourceMappingURL=ManageNegotiableQuote.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { ManageNegotiableQuoteProps } from '../ManageNegotiableQuote';
2
+
3
+ export declare const baseProps: ManageNegotiableQuoteProps;
4
+ //# sourceMappingURL=ManageNegotiableQuoteProps.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './ManageNegotiableQuote';
10
+ export { ManageNegotiableQuote as default } from './ManageNegotiableQuote';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+ import { NegotiableQuoteCartItem } from '../../data/models/negotiable-quote-model';
4
+
5
+ export interface ProductListTableProps extends HTMLAttributes<HTMLDivElement | HTMLFormElement> {
6
+ items: NegotiableQuoteCartItem[];
7
+ canEdit: boolean;
8
+ onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;
9
+ onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;
10
+ onUpdate?: (e: SubmitEvent) => void;
11
+ }
12
+ export declare const ProductListTable: FunctionComponent<ProductListTableProps>;
13
+ //# sourceMappingURL=ProductListTable.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './ProductListTable';
10
+ export { ProductListTable as default } from './ProductListTable';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ interface Entry {
5
+ label: string;
6
+ id: string;
7
+ value: VNode;
8
+ strong?: boolean;
9
+ children?: Entry[];
10
+ }
11
+ export interface QuotePricesSummaryProps extends HTMLAttributes<HTMLDivElement> {
12
+ entries?: Entry[];
13
+ }
14
+ export declare const QuotePricesSummary: FunctionComponent<QuotePricesSummaryProps>;
15
+ export {};
16
+ //# sourceMappingURL=QuotePricesSummary.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuotePricesSummary';
10
+ export { QuotePricesSummary as default } from './QuotePricesSummary';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface QuotesListTableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading' | 'children'> {
5
+ rowData: QuoteRowData[];
6
+ loading?: boolean;
7
+ className?: string;
8
+ emptyStateMessage?: VNode;
9
+ showItemRange?: boolean;
10
+ itemRangeMessage?: VNode;
11
+ showPageSizePicker?: boolean;
12
+ pageSizePickerMessage?: VNode;
13
+ showPagination?: boolean;
14
+ paginationMessage?: VNode;
15
+ }
16
+ export type QuoteRowData = {
17
+ id: string;
18
+ quoteName: VNode;
19
+ created: VNode;
20
+ createdBy: VNode;
21
+ status: VNode;
22
+ lastUpdated: VNode;
23
+ quoteTemplate: VNode;
24
+ quoteTotal: VNode;
25
+ actions: VNode;
26
+ [key: string]: VNode | string | number | undefined;
27
+ };
28
+ export declare const QuotesListTable: FunctionComponent<QuotesListTableProps>;
29
+ //# sourceMappingURL=QuotesListTable.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuotesListTable';
10
+ export { QuotesListTable as default } from './QuotesListTable';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface RequestNegotiableQuoteFormProps extends Omit<HTMLAttributes<HTMLFormElement>, 'title'> {
5
+ title: VNode;
6
+ banner?: VNode;
7
+ commentField?: VNode;
8
+ quoteNameField?: VNode;
9
+ attachFile?: VNode;
10
+ requestButton?: VNode;
11
+ saveButton?: VNode;
12
+ onSubmit: (e: Event) => void;
13
+ }
14
+ export declare const RequestNegotiableQuoteForm: FunctionComponent<RequestNegotiableQuoteFormProps>;
15
+ //# sourceMappingURL=RequestNegotiableQuoteForm.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './RequestNegotiableQuoteForm';
10
+ export { RequestNegotiableQuoteForm as default } from './RequestNegotiableQuoteForm';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface TabbedContentProps extends HTMLAttributes<HTMLDivElement> {
5
+ tabs: Map<string, string>;
6
+ tabsContent: Map<string, VNode>;
7
+ defaultActiveTab?: string;
8
+ }
9
+ export declare const TabbedContent: FunctionComponent<TabbedContentProps>;
10
+ //# sourceMappingURL=TabbedContent.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './TabbedContent';
10
+ export { TabbedContent as default } from './TabbedContent';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ export * from './RequestNegotiableQuoteForm';
2
+ export * from './ManageNegotiableQuote';
3
+ export * from './TabbedContent';
4
+ export * from './ActionsBar';
5
+ export * from './ProductListTable';
6
+ export * from './QuotePricesSummary';
7
+ export * from './ItemsQuoted';
8
+ export * from './QuotesListTable';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteModel, NegotiableQuoteCartItem } from '../../data/models/negotiable-quote-model';
4
+
5
+ export interface ItemsQuotedProps extends HTMLAttributes<HTMLDivElement> {
6
+ quoteData?: NegotiableQuoteModel;
7
+ onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;
8
+ onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;
9
+ onUpdate?: (e: SubmitEvent) => void;
10
+ slots?: {
11
+ ProductListTable?: SlotProps<{
12
+ items: NegotiableQuoteModel['items'];
13
+ canEdit: boolean;
14
+ onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;
15
+ onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;
16
+ onUpdate?: (e: SubmitEvent) => void;
17
+ }>;
18
+ QuotePricesSummary?: SlotProps<{
19
+ items: NegotiableQuoteModel['items'];
20
+ prices: NegotiableQuoteModel['prices'];
21
+ }>;
22
+ };
23
+ }
24
+ export declare const ItemsQuoted: Container<ItemsQuotedProps>;
25
+ //# sourceMappingURL=ItemsQuoted.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './ItemsQuoted';
10
+ export { ItemsQuoted as default } from './ItemsQuoted';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './ItemsQuoted/index'
2
+ import _default from './ItemsQuoted/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{jsx as e,jsxs as s,Fragment as E}from"@dropins/tools/preact-jsx-runtime.js";import{useState as O,useEffect as j}from"@dropins/tools/preact-compat.js";import{VComponent as v,classes as g,Slot as f}from"@dropins/tools/lib.js";import{h as x}from"@dropins/tools/preact.js";import{Picker as A,Price as b,Checkbox as D,Button as z,Table as F,Accordion as G,AccordionSection as R,Skeleton as V,SkeletonRow as W}from"@dropins/tools/components.js";/* empty css */import{useText as S}from"@dropins/tools/i18n.js";import{events as J}from"@dropins/tools/event-bus.js";const K=({className:d,items:c,canEdit:u,onItemCheckboxChange:n,onItemDropdownChange:a,onUpdate:i,...o})=>{const l=S({updateButton:"NegotiableQuote.Manage.productListTable.submitButton",productNameHeader:"NegotiableQuote.Manage.productListTable.headers.productName",skuHeader:"NegotiableQuote.Manage.productListTable.headers.sku",priceHeader:"NegotiableQuote.Manage.productListTable.headers.price",quantityHeader:"NegotiableQuote.Manage.productListTable.headers.quantity",discountHeader:"NegotiableQuote.Manage.productListTable.headers.discount",subtotalHeader:"NegotiableQuote.Manage.productListTable.headers.subtotal",actionsHeader:"NegotiableQuote.Manage.productListTable.headers.actions",editNoteToSeller:"NegotiableQuote.Manage.productListTable.actions.editNoteToSeller",remove:"NegotiableQuote.Manage.productListTable.actions.remove"}),p=[{label:l.productNameHeader,key:"productName"},{label:l.skuHeader,key:"sku"},{label:l.priceHeader,key:"price"},{label:l.quantityHeader,key:"quantity"},{label:l.discountHeader,key:"discount"},{label:l.subtotalHeader,key:"subtotal"}];u&&(p.unshift({label:"",key:"checkbox"}),p.push({label:l.actionsHeader,key:"actions"}));const q=(t,r)=>{const N=t.target.checked;n==null||n(r,N)},_=(t,r)=>{const N=t.target.value;a==null||a(r,N)},h=t=>{t.preventDefault(),i==null||i(t)},L=(t,r)=>t>0?s("div",{className:"quote-management-product-list-table__discount-container",children:[s("span",{className:"quote-management-product-list-table__discount-percent",children:[r,"%"]}),s("span",{className:"quote-management-product-list-table__discount-price",children:["(",e(b,{amount:t}),")"]})]}):void 0,P=t=>{var T,k;const r=(T=t.configurableOptions)==null?void 0:T.map(m=>s("div",{className:"quote-management-product-list-table__configurable-option",children:[s("span",{className:"quote-management-product-list-table__configurable-option-label",children:[m.optionLabel,":"]}),e("span",{className:"quote-management-product-list-table__configurable-option-value",children:m.valueLabel})]},m.optionLabel)),N=(k=t.bundleOptions)==null?void 0:k.map(m=>s("div",{className:"quote-management-product-list-table__bundle-option",children:[e("span",{className:"quote-management-product-list-table__bundle-option-label",children:m.label}),e("div",{className:"quote-management-product-list-table__bundle-option-values",children:m.values.map(y=>s("span",{className:"quote-management-product-list-table__bundle-option-value",children:[s("span",{className:"quote-management-product-list-table__bundle-option-value-quantity",children:[y.quantity," x"]}),e("span",{className:"quote-management-product-list-table__bundle-option-value-label",children:y.label}),e(b,{className:"quote-management-product-list-table__bundle-option-value-original-price",amount:y.originalPrice.value,currency:y.originalPrice.currency,weight:"normal"})]},y.label))})]},m.label));return s("div",{className:"quote-management-product-list-table__product-name-container",children:[e("span",{className:"quote-management-product-list-table__product-name",children:t.product.name}),r,N]})},H=c.map(t=>({checkbox:e(D,{className:"quote-management-product-list-table__checkbox",name:"itemSelected","data-testid":`item-checkbox-${t.product.sku}`,onChange:r=>q(r,t),value:t.product.sku}),productName:P(t),sku:e("span",{className:"quote-management-product-list-table__sku",children:t.product.sku}),price:e(b,{className:"quote-management-product-list-table__price",amount:t.prices.originalItemPrice.value,currency:t.prices.originalItemPrice.currency}),quantity:e("span",{className:"quote-management-product-list-table__quantity",children:t.quantity}),discount:L(t.catalogDiscount.amountOff,t.catalogDiscount.percentOff),subtotal:e(b,{className:"quote-management-product-list-table__subtotal",amount:t.prices.rowTotal.value,currency:t.prices.rowTotal.currency}),actions:e(A,{className:"quote-management-product-list-table__actions","data-testid":`item-dropdown-${t.product.sku}`,name:`item-dropdown-${t.product.sku}`,onChange:r=>_(r,t),placeholder:"Select",options:[{text:l.editNoteToSeller,value:"edit"},{text:l.remove,value:"remove"}],value:t.product.sku})})),M=e(F,{columns:p,rowData:H,"data-testid":"product-list-table",mobileLayout:"stacked"}),$=u?x("form",{}):x("div",{}),w=u?{onSubmit:h,...o}:o,B=u?e(z,{type:"submit","data-testid":"product-list-table-submit-button",children:l.updateButton}):void 0;return s(v,{node:$,className:g(["quote-management-product-list-table-container",d]),"data-testid":"product-list-table-container",...w,children:[M,e("div",{className:"quote-management-product-list-table-container__submit-container",children:B})]})},X=({className:d,entries:c,...u})=>{const n=a=>{var o;const i=(o=a.children)==null?void 0:o.map(n);return e("div",{className:"quote-management-quote-prices-summary__entry","data-testid":`quote-prices-summary-entry-${a.id}`,children:i?e(G,{className:"quote-management-quote-prices-summary__accordion","data-testid":`quote-prices-summary-entry-accordion-${a.id}`,children:e(R,{className:"quote-management-quote-prices-summary__accordion-section",title:a.label,ariaLabelTitle:a.label,secondaryText:a.value,children:i})}):s(E,{children:[e("span",{className:g(["quote-management-quote-prices-summary__label",["quote-management-quote-prices-summary__label--strong",a.strong]]),"data-testid":`quote-prices-summary-entry-label-${a.id}`,children:a.label}),e("span",{className:"quote-management-quote-prices-summary__value","data-testid":`quote-prices-summary-entry-value-${a.id}`,children:a.value})]})},a.id)};return e("div",{className:g(["quote-management-quote-prices-summary",d]),"data-testid":"quote-prices-summary",...u,children:c==null?void 0:c.map(n)})},Q=({className:d,loading:c,table:u,pricesSummary:n,...a})=>c?e(Y,{}):s("div",{className:g(["quote-management-items-quoted",d]),...a,children:[u&&e(v,{node:u,className:g(["quote-management-items-quoted__table"]),"data-testid":"quote-management-items-quoted__table"}),n&&e(v,{node:n,className:g(["quote-management-items-quoted__prices-summary"]),"data-testid":"quote-management-items-quoted__prices-summary"})]}),Y=()=>e(V,{"data-testid":"items-quoted-skeleton",children:e(W,{variant:"row",fullWidth:!0,size:"medium",lines:4,multilineGap:"xsmall"})}),ue=({quoteData:d,onItemCheckboxChange:c,onItemDropdownChange:u,onUpdate:n,slots:a,...i})=>{const[o,l]=O(d),p=S({subtotal:"NegotiableQuote.Manage.quotePricesSummary.subtotal.excludingTax",grandTotal:"NegotiableQuote.Manage.quotePricesSummary.grandTotal.includingTax",appliedTaxes:"NegotiableQuote.Manage.quotePricesSummary.appliedTaxes"});if(j(()=>{const _=J.on("quote-management/quote-data",h=>{l(h.quote)},{eager:!0});return()=>_==null?void 0:_.off()},[]),!o)return e(Q,{loading:!0});const q=[];return o.prices.subtotalExcludingTax&&q.push({label:p.subtotal,id:"subtotal",value:e(b,{amount:o.prices.subtotalExcludingTax.value,currency:o.prices.subtotalExcludingTax.currency,weight:"normal"})}),o.prices.grandTotal&&q.push({label:p.grandTotal,id:"total",value:e(b,{amount:o.prices.grandTotal.value,currency:o.prices.grandTotal.currency}),strong:!0}),e(Q,{"data-testid":"items-quoted-container",...i,loading:!1,table:e(f,{name:"ProductListTable",slot:a==null?void 0:a.ProductListTable,context:{items:o.items,canEdit:!0,onItemCheckboxChange:c,onItemDropdownChange:u,onUpdate:n},children:e(K,{items:o.items,canEdit:!0,onItemCheckboxChange:c,onItemDropdownChange:u,onUpdate:n})}),pricesSummary:e(f,{name:"QuotePricesSummary",slot:a==null?void 0:a.QuotePricesSummary,context:{items:o.items,prices:o.prices},children:e(X,{entries:q})})})};export{ue as ItemsQuoted,ue as default};
4
+ //# sourceMappingURL=ItemsQuoted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemsQuoted.js","sources":["/@dropins/storefront-quote-management/src/components/ProductListTable/ProductListTable.tsx","/@dropins/storefront-quote-management/src/components/QuotePricesSummary/QuotePricesSummary.tsx","/@dropins/storefront-quote-management/src/components/ItemsQuoted/ItemsQuoted.tsx","/@dropins/storefront-quote-management/src/containers/ItemsQuoted/ItemsQuoted.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, h } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { Table, Checkbox, Picker, Price, Button } from '@adobe-commerce/elsie/components';\nimport '@/quote-management/components/ProductListTable/ProductListTable.css';\nimport { NegotiableQuoteCartItem } from '@/quote-management/data/models/negotiable-quote-model';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ProductListTableProps extends HTMLAttributes<HTMLDivElement | HTMLFormElement> {\n items: NegotiableQuoteCartItem[];\n canEdit: boolean;\n onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;\n onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;\n onUpdate?: (e: SubmitEvent) => void;\n}\n\nexport const ProductListTable: FunctionComponent<ProductListTableProps> = ({\n className,\n items,\n canEdit,\n onItemCheckboxChange,\n onItemDropdownChange,\n onUpdate,\n ...props\n}) => {\n\n const dictionary = useText({\n updateButton: 'NegotiableQuote.Manage.productListTable.submitButton',\n productNameHeader: 'NegotiableQuote.Manage.productListTable.headers.productName',\n skuHeader: 'NegotiableQuote.Manage.productListTable.headers.sku',\n priceHeader: 'NegotiableQuote.Manage.productListTable.headers.price',\n quantityHeader: 'NegotiableQuote.Manage.productListTable.headers.quantity',\n discountHeader: 'NegotiableQuote.Manage.productListTable.headers.discount',\n subtotalHeader: 'NegotiableQuote.Manage.productListTable.headers.subtotal',\n actionsHeader: 'NegotiableQuote.Manage.productListTable.headers.actions',\n editNoteToSeller: 'NegotiableQuote.Manage.productListTable.actions.editNoteToSeller',\n remove: 'NegotiableQuote.Manage.productListTable.actions.remove',\n });\n\n const columns = [\n {\n label: dictionary.productNameHeader,\n key: 'productName',\n },\n {\n label: dictionary.skuHeader,\n key: 'sku',\n },\n {\n label: dictionary.priceHeader,\n key: 'price',\n },\n {\n label: dictionary.quantityHeader,\n key: 'quantity',\n },\n {\n label: dictionary.discountHeader,\n key: 'discount',\n },\n {\n label: dictionary.subtotalHeader,\n key: 'subtotal',\n },\n ];\n\n if (canEdit) {\n columns.unshift({\n label: '',\n key: 'checkbox',\n });\n columns.push({\n label: dictionary.actionsHeader,\n key: 'actions',\n });\n }\n\n const handleItemCheckboxChange = (event: Event, item: NegotiableQuoteCartItem) => {\n const isSelected = (event.target as HTMLInputElement).checked;\n onItemCheckboxChange?.(item, isSelected);\n };\n\n const handleItemDropdownChange = (event: Event, item: NegotiableQuoteCartItem) => {\n const action = (event.target as HTMLSelectElement).value;\n onItemDropdownChange?.(item, action);\n };\n\n const handleUpdate = (event: SubmitEvent) => {\n event.preventDefault();\n onUpdate?.(event);\n };\n\n const discountElement = (amountOff: number, percentOff: number) => {\n return amountOff > 0 ?\n <div className=\"quote-management-product-list-table__discount-container\">\n <span className=\"quote-management-product-list-table__discount-percent\">{percentOff}%</span>\n <span className=\"quote-management-product-list-table__discount-price\">(<Price amount={amountOff} />)</span>\n </div>\n : undefined;\n };\n\n const getProductNameContent = (item: NegotiableQuoteCartItem) => {\n const configurableOptions = item.configurableOptions?.map((option) =>\n <div key={option.optionLabel} className=\"quote-management-product-list-table__configurable-option\">\n <span className=\"quote-management-product-list-table__configurable-option-label\">{option.optionLabel}:</span>\n <span className=\"quote-management-product-list-table__configurable-option-value\">{option.valueLabel}</span>\n </div>);\n\n const bundleOptions = item.bundleOptions?.map((option) =>\n <div key={option.label} className=\"quote-management-product-list-table__bundle-option\">\n <span className=\"quote-management-product-list-table__bundle-option-label\">{option.label}</span>\n <div className=\"quote-management-product-list-table__bundle-option-values\">\n {option.values.map((value) =>\n <span key={value.label} className=\"quote-management-product-list-table__bundle-option-value\">\n <span className=\"quote-management-product-list-table__bundle-option-value-quantity\">{value.quantity} x</span>\n <span className=\"quote-management-product-list-table__bundle-option-value-label\">{value.label}</span>\n <Price className=\"quote-management-product-list-table__bundle-option-value-original-price\"\n amount={value.originalPrice.value}\n currency={value.originalPrice.currency}\n weight=\"normal\"\n />\n </span>\n )}\n </div>\n </div>);\n\n return (\n <div className=\"quote-management-product-list-table__product-name-container\">\n <span className=\"quote-management-product-list-table__product-name\">{item.product.name}</span>\n {configurableOptions}\n {bundleOptions}\n </div>\n )\n };\n\n const rowData = items.map((item) => {\n return {\n checkbox: <Checkbox className=\"quote-management-product-list-table__checkbox\" name=\"itemSelected\" data-testid={`item-checkbox-${item.product.sku}`} onChange={(e) => handleItemCheckboxChange(e, item)} value={item.product.sku} />,\n productName: getProductNameContent(item),\n sku: <span className=\"quote-management-product-list-table__sku\">{item.product.sku}</span>,\n price: <Price className=\"quote-management-product-list-table__price\" amount={item.prices.originalItemPrice.value} currency={item.prices.originalItemPrice.currency} />,\n quantity: <span className=\"quote-management-product-list-table__quantity\">{item.quantity}</span>,\n discount: discountElement(item.catalogDiscount.amountOff, item.catalogDiscount.percentOff),\n subtotal: <Price className=\"quote-management-product-list-table__subtotal\" amount={item.prices.rowTotal.value} currency={item.prices.rowTotal.currency} />,\n actions: <Picker\n className=\"quote-management-product-list-table__actions\"\n data-testid={`item-dropdown-${item.product.sku}`}\n name={`item-dropdown-${item.product.sku}`}\n onChange={(e) => handleItemDropdownChange(e, item)}\n placeholder=\"Select\"\n options={[{ text: dictionary.editNoteToSeller, value: 'edit' }, { text: dictionary.remove, value: 'remove' }]}\n value={item.product.sku}\n />,\n }\n });\n\n const table = <Table columns={columns} rowData={rowData} data-testid=\"product-list-table\" mobileLayout='stacked' />\n\n // if can edit, the wrapper node should use the form element, else use the div element\n const wrapperNode = canEdit ? h('form', {}) : h('div', {});\n const wrapperProps = canEdit ? {\n onSubmit: handleUpdate,\n ...props,\n } : props;\n\n const submitButton = canEdit ? <Button type=\"submit\" data-testid=\"product-list-table-submit-button\">{dictionary.updateButton}</Button> : undefined;\n\n return (\n <VComponent\n node={wrapperNode}\n className={classes(['quote-management-product-list-table-container', className])}\n data-testid=\"product-list-table-container\"\n {...wrapperProps}\n >\n {table}\n <div className=\"quote-management-product-list-table-container__submit-container\">\n {submitButton}\n </div>\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n \nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@/quote-management/components/QuotePricesSummary/QuotePricesSummary.css';\nimport { Accordion, AccordionSection } from '@adobe-commerce/elsie/components';\n\ninterface Entry {\n label: string;\n id: string;\n value: VNode;\n strong?: boolean;\n children?: Entry[];\n}\n\nexport interface QuotePricesSummaryProps extends HTMLAttributes<HTMLDivElement> {\n entries?: Entry[];\n}\n\nexport const QuotePricesSummary: FunctionComponent<QuotePricesSummaryProps> = ({\n className,\n entries,\n ...props\n}) => {\n const createEntry = (entry: Entry) => {\n const children = entry.children?.map(createEntry);\n return (\n <div key={entry.id} className=\"quote-management-quote-prices-summary__entry\" data-testid={`quote-prices-summary-entry-${entry.id}`}>\n {children ? <Accordion\n className=\"quote-management-quote-prices-summary__accordion\"\n data-testid={`quote-prices-summary-entry-accordion-${entry.id}`}\n >\n <AccordionSection className=\"quote-management-quote-prices-summary__accordion-section\" title={entry.label} ariaLabelTitle={entry.label} secondaryText={entry.value}>\n {children}\n </AccordionSection>\n </Accordion>\n :\n <>\n <span className={classes(['quote-management-quote-prices-summary__label', ['quote-management-quote-prices-summary__label--strong', entry.strong]])} data-testid={`quote-prices-summary-entry-label-${entry.id}`}>{entry.label}</span>\n <span className=\"quote-management-quote-prices-summary__value\" data-testid={`quote-prices-summary-entry-value-${entry.id}`}>{entry.value}</span>\n </>\n }\n </div>\n );\n };\n\n return (\n <div className={classes(['quote-management-quote-prices-summary', className])} data-testid=\"quote-prices-summary\" {...props}>\n {entries?.map(createEntry)}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@/quote-management/components/ItemsQuoted/ItemsQuoted.css';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport interface ItemsQuotedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n loading?: boolean;\n table?: VNode;\n pricesSummary?: VNode;\n}\n\nexport const ItemsQuoted: FunctionComponent<ItemsQuotedProps> = ({\n className,\n loading,\n table,\n pricesSummary,\n ...props\n}) => {\n if (loading) {\n return <ItemsQuotedSkeleton />;\n }\n\n return (\n <div className={classes(['quote-management-items-quoted', className])} {...props}>\n {table && (\n <VComponent\n node={table}\n className={classes(['quote-management-items-quoted__table'])}\n data-testid=\"quote-management-items-quoted__table\"\n />\n )}\n {pricesSummary && (\n <VComponent\n node={pricesSummary}\n className={classes(['quote-management-items-quoted__prices-summary'])}\n data-testid=\"quote-management-items-quoted__prices-summary\"\n />\n )}\n </div>\n );\n};\n\nexport const ItemsQuotedSkeleton: FunctionComponent = () => {\n return (\n <Skeleton data-testid=\"items-quoted-skeleton\">\n <SkeletonRow variant=\"row\" fullWidth={true} size=\"medium\" lines={4} multilineGap='xsmall' />\n </Skeleton>\n );\n};","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport { ProductListTable } from '@/quote-management/components/ProductListTable/ProductListTable';\nimport { NegotiableQuoteModel, NegotiableQuoteCartItem } from '@/quote-management/data/models/negotiable-quote-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { QuotePricesSummary } from '@/quote-management/components/QuotePricesSummary';\nimport { ItemsQuoted as ItemsQuotedComponent } from '@/quote-management/components/ItemsQuoted';\nimport { Price } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ItemsQuotedProps extends HTMLAttributes<HTMLDivElement> {\n quoteData?: NegotiableQuoteModel;\n onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;\n onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;\n onUpdate?: (e: SubmitEvent) => void;\n slots?: {\n ProductListTable?: SlotProps<{\n items: NegotiableQuoteModel['items'];\n canEdit: boolean;\n onItemCheckboxChange?: (item: NegotiableQuoteCartItem, isSelected: boolean) => void;\n onItemDropdownChange?: (item: NegotiableQuoteCartItem, action: string) => void;\n onUpdate?: (e: SubmitEvent) => void;\n }>;\n QuotePricesSummary?: SlotProps<{\n items: NegotiableQuoteModel['items'];\n prices: NegotiableQuoteModel['prices'];\n }>;\n }\n}\n\nexport const ItemsQuoted: Container<ItemsQuotedProps> = ({\n quoteData: initialData,\n onItemCheckboxChange,\n onItemDropdownChange,\n onUpdate,\n slots,\n ...props\n}) => {\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(initialData);\n\n const dictionary = useText({\n subtotal: 'NegotiableQuote.Manage.quotePricesSummary.subtotal.excludingTax',\n grandTotal: 'NegotiableQuote.Manage.quotePricesSummary.grandTotal.includingTax',\n appliedTaxes: 'NegotiableQuote.Manage.quotePricesSummary.appliedTaxes',\n });\n\n useEffect(() => {\n const quoteDataEvent = events.on('quote-management/quote-data', (data: { quote: NegotiableQuoteModel }) => {\n setQuoteData(data.quote);\n }, {\n eager: true,\n });\n return () => quoteDataEvent?.off();\n }, []);\n\n if (!quoteData) {\n return <ItemsQuotedComponent loading={true} />;\n }\n\n const quotePricesSummaryEntries = [];\n\n quoteData.prices.subtotalExcludingTax && quotePricesSummaryEntries.push({\n label: dictionary.subtotal,\n id: 'subtotal',\n value: <Price amount={quoteData.prices.subtotalExcludingTax.value} currency={quoteData.prices.subtotalExcludingTax.currency} weight='normal' />,\n })\n\n quoteData.prices.grandTotal && quotePricesSummaryEntries.push({\n label: dictionary.grandTotal,\n id: 'total',\n value: <Price amount={quoteData.prices.grandTotal.value} currency={quoteData.prices.grandTotal.currency} />,\n strong: true,\n })\n\n return (\n <ItemsQuotedComponent data-testid=\"items-quoted-container\" {...props} loading={false}\n table={<Slot name=\"ProductListTable\" slot={slots?.ProductListTable}\n context={{\n items: quoteData.items,\n canEdit: true,\n onItemCheckboxChange,\n onItemDropdownChange,\n onUpdate\n }}>\n <ProductListTable\n items={quoteData.items}\n canEdit={true}\n onItemCheckboxChange={onItemCheckboxChange}\n onItemDropdownChange={onItemDropdownChange}\n onUpdate={onUpdate}\n />\n </Slot>}\n pricesSummary={<Slot name=\"QuotePricesSummary\" slot={slots?.QuotePricesSummary} context={{\n items: quoteData.items,\n prices: quoteData.prices,\n }}>\n <QuotePricesSummary entries={quotePricesSummaryEntries} />\n </Slot>\n }\n />\n );\n};"],"names":["ProductListTable","className","items","canEdit","onItemCheckboxChange","onItemDropdownChange","onUpdate","props","dictionary","useText","columns","handleItemCheckboxChange","event","item","isSelected","handleItemDropdownChange","action","handleUpdate","discountElement","amountOff","percentOff","jsxs","jsx","Price","getProductNameContent","configurableOptions","_a","option","bundleOptions","_b","value","rowData","Checkbox","e","Picker","table","Table","wrapperNode","h","wrapperProps","submitButton","Button","VComponent","classes","QuotePricesSummary","entries","createEntry","entry","children","Accordion","AccordionSection","Fragment","ItemsQuoted","loading","pricesSummary","ItemsQuotedSkeleton","Skeleton","SkeletonRow","initialData","slots","quoteData","setQuoteData","useState","useEffect","quoteDataEvent","events","data","ItemsQuotedComponent","quotePricesSummaryEntries","Slot"],"mappings":"qkBAyBO,MAAMA,EAA6D,CAAC,CACzE,UAAAC,EACA,MAAAC,EACA,QAAAC,EACA,qBAAAC,EACA,qBAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CAEJ,MAAMC,EAAaC,EAAQ,CACzB,aAAc,uDACd,kBAAmB,8DACnB,UAAW,sDACX,YAAa,wDACb,eAAgB,2DAChB,eAAgB,2DAChB,eAAgB,2DAChB,cAAe,0DACf,iBAAkB,mEAClB,OAAQ,wDAAA,CACT,EAEKC,EAAU,CACd,CACE,MAAOF,EAAW,kBAClB,IAAK,aAAA,EAEP,CACE,MAAOA,EAAW,UAClB,IAAK,KAAA,EAEP,CACE,MAAOA,EAAW,YAClB,IAAK,OAAA,EAEP,CACE,MAAOA,EAAW,eAClB,IAAK,UAAA,EAEP,CACE,MAAOA,EAAW,eAClB,IAAK,UAAA,EAEP,CACE,MAAOA,EAAW,eAClB,IAAK,UAAA,CACP,EAGEL,IACFO,EAAQ,QAAQ,CACd,MAAO,GACP,IAAK,UAAA,CACN,EACDA,EAAQ,KAAK,CACX,MAAOF,EAAW,cAClB,IAAK,SAAA,CACN,GAGH,MAAMG,EAA2B,CAACC,EAAcC,IAAkC,CAChF,MAAMC,EAAcF,EAAM,OAA4B,QACtDR,GAAA,MAAAA,EAAuBS,EAAMC,EAC/B,EAEMC,EAA2B,CAACH,EAAcC,IAAkC,CAChF,MAAMG,EAAUJ,EAAM,OAA6B,MACnDP,GAAA,MAAAA,EAAuBQ,EAAMG,EAC/B,EAEMC,EAAgBL,GAAuB,CAC3CA,EAAM,eAAA,EACNN,GAAA,MAAAA,EAAWM,EACb,EAEMM,EAAkB,CAACC,EAAmBC,IACnCD,EAAY,EACjBE,EAAC,MAAA,CAAI,UAAU,0DACb,S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