@dropins/storefront-quote-management 1.1.2 → 1.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/api.js +1172 -5
- package/api.js.map +1 -1
- package/chunks/ItemsQuoted.js +1 -1
- package/chunks/ItemsQuoted.js.map +1 -1
- package/chunks/ItemsQuotedTemplate.js +1 -1
- package/chunks/ItemsQuotedTemplate.js.map +1 -1
- package/chunks/QuoteCommentsList.js +1 -1
- package/chunks/QuoteCommentsList.js.map +1 -1
- package/chunks/QuoteHistoryLog.js +1 -1
- package/chunks/QuoteHistoryLog.js.map +1 -1
- package/chunks/QuoteTemplateCommentsList.js +1 -1
- package/chunks/QuoteTemplateCommentsList.js.map +1 -1
- package/chunks/QuoteTemplateHistoryLog.js +1 -1
- package/chunks/QuoteTemplateHistoryLog.js.map +1 -1
- package/chunks/ShippingAddressDisplay.js +1 -1
- package/chunks/ShippingAddressDisplay.js.map +1 -1
- package/chunks/components.js +4 -0
- package/chunks/components.js.map +1 -0
- package/containers/ItemsQuoted.js +1 -1
- package/containers/ItemsQuotedTemplate.js +1 -1
- package/containers/ManageNegotiableQuote.js +1 -1
- package/containers/ManageNegotiableQuote.js.map +1 -1
- package/containers/ManageNegotiableQuoteTemplate.js +2 -2
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
- package/containers/OrderSummary.js +1 -1
- package/containers/OrderSummary.js.map +1 -1
- package/containers/OrderSummaryLine.js +1 -1
- package/containers/QuoteCommentsList.js +1 -1
- package/containers/QuoteHistoryLog.js +1 -1
- package/containers/QuoteSummaryList.js +1 -1
- package/containers/QuoteSummaryList.js.map +1 -1
- package/containers/QuoteTemplateCommentsList.js +1 -1
- package/containers/QuoteTemplateHistoryLog.js +1 -1
- package/containers/QuoteTemplatesListTable.js +1 -1
- package/containers/QuoteTemplatesListTable.js.map +1 -1
- package/containers/QuotesListTable.js +1 -1
- package/containers/QuotesListTable.js.map +1 -1
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js.map +1 -1
- package/containers/ShippingAddressDisplay.js +1 -1
- package/package.json +1 -1
- package/render.js +2 -7
- package/render.js.map +1 -1
- package/chunks/AttachedFilesList.js +0 -4
- package/chunks/AttachedFilesList.js.map +0 -1
- package/chunks/CheckWithCircle.js +0 -4
- package/chunks/CheckWithCircle.js.map +0 -1
- package/chunks/ChevronDown.js +0 -4
- package/chunks/ChevronDown.js.map +0 -1
- package/chunks/ConfirmationModal.js +0 -4
- package/chunks/ConfirmationModal.js.map +0 -1
- package/chunks/LineItemNoteModal.js +0 -4
- package/chunks/LineItemNoteModal.js.map +0 -1
- package/chunks/NegotiableQuoteFragment.js +0 -396
- package/chunks/NegotiableQuoteFragment.js.map +0 -1
- package/chunks/NegotiableQuoteTemplateFragment.js +0 -342
- package/chunks/NegotiableQuoteTemplateFragment.js.map +0 -1
- package/chunks/OrderSummaryLine.js +0 -4
- package/chunks/OrderSummaryLine.js.map +0 -1
- package/chunks/QuoteCommentsList3.js +0 -4
- package/chunks/QuoteCommentsList3.js.map +0 -1
- package/chunks/QuoteHistoryLog3.js +0 -4
- package/chunks/QuoteHistoryLog3.js.map +0 -1
- package/chunks/RenameQuoteModal.js +0 -4
- package/chunks/RenameQuoteModal.js.map +0 -1
- package/chunks/WarningFilled.js +0 -4
- package/chunks/WarningFilled.js.map +0 -1
- package/chunks/addQuoteTemplateLineItemNote.js +0 -33
- package/chunks/addQuoteTemplateLineItemNote.js.map +0 -1
- package/chunks/dateUtils.js +0 -4
- package/chunks/dateUtils.js.map +0 -1
- package/chunks/duplicateNegotiableQuote.js +0 -109
- package/chunks/duplicateNegotiableQuote.js.map +0 -1
- package/chunks/generateQuoteFromTemplate.js +0 -12
- package/chunks/generateQuoteFromTemplate.js.map +0 -1
- package/chunks/getQuoteData.js +0 -16
- package/chunks/getQuoteData.js.map +0 -1
- package/chunks/getQuoteTemplateData.js +0 -28
- package/chunks/getQuoteTemplateData.js.map +0 -1
- package/chunks/getQuoteTemplates.js +0 -52
- package/chunks/getQuoteTemplates.js.map +0 -1
- package/chunks/negotiableQuotes.js +0 -77
- package/chunks/negotiableQuotes.js.map +0 -1
- package/chunks/openQuoteTemplate.js +0 -62
- package/chunks/openQuoteTemplate.js.map +0 -1
- package/chunks/requestNegotiableQuote.js +0 -25
- package/chunks/requestNegotiableQuote.js.map +0 -1
- package/chunks/setLineItemNote.js +0 -47
- package/chunks/setLineItemNote.js.map +0 -1
- package/chunks/state.js +0 -4
- package/chunks/state.js.map +0 -1
- package/chunks/transform-quote-template.js +0 -4
- package/chunks/transform-quote-template.js.map +0 -1
- package/chunks/transform-quote.js +0 -4
- package/chunks/transform-quote.js.map +0 -1
- package/chunks/uploadFile.js +0 -20
- package/chunks/uploadFile.js.map +0 -1
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
const e=`
|
|
4
|
-
fragment NegotiableQuoteTemplateFragment on NegotiableQuoteTemplate {
|
|
5
|
-
uid
|
|
6
|
-
template_id
|
|
7
|
-
name
|
|
8
|
-
created_at
|
|
9
|
-
updated_at
|
|
10
|
-
status
|
|
11
|
-
sales_rep_name
|
|
12
|
-
expiration_date
|
|
13
|
-
buyer {
|
|
14
|
-
firstname
|
|
15
|
-
lastname
|
|
16
|
-
}
|
|
17
|
-
comments {
|
|
18
|
-
uid
|
|
19
|
-
created_at
|
|
20
|
-
author {
|
|
21
|
-
firstname
|
|
22
|
-
lastname
|
|
23
|
-
}
|
|
24
|
-
text
|
|
25
|
-
attachments {
|
|
26
|
-
name
|
|
27
|
-
url
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
items {
|
|
31
|
-
__typename
|
|
32
|
-
uid
|
|
33
|
-
product {
|
|
34
|
-
name
|
|
35
|
-
sku
|
|
36
|
-
uid
|
|
37
|
-
stock_status
|
|
38
|
-
quantity
|
|
39
|
-
thumbnail {
|
|
40
|
-
label
|
|
41
|
-
url
|
|
42
|
-
}
|
|
43
|
-
price_range {
|
|
44
|
-
minimum_price {
|
|
45
|
-
regular_price {
|
|
46
|
-
value
|
|
47
|
-
currency
|
|
48
|
-
}
|
|
49
|
-
final_price {
|
|
50
|
-
value
|
|
51
|
-
currency
|
|
52
|
-
}
|
|
53
|
-
discount {
|
|
54
|
-
percent_off
|
|
55
|
-
amount_off
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
maximum_price {
|
|
59
|
-
regular_price {
|
|
60
|
-
value
|
|
61
|
-
currency
|
|
62
|
-
}
|
|
63
|
-
final_price {
|
|
64
|
-
value
|
|
65
|
-
currency
|
|
66
|
-
}
|
|
67
|
-
discount {
|
|
68
|
-
percent_off
|
|
69
|
-
amount_off
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
price_tiers {
|
|
74
|
-
quantity
|
|
75
|
-
final_price {
|
|
76
|
-
value
|
|
77
|
-
}
|
|
78
|
-
discount {
|
|
79
|
-
amount_off
|
|
80
|
-
percent_off
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
prices {
|
|
85
|
-
price {
|
|
86
|
-
currency
|
|
87
|
-
value
|
|
88
|
-
}
|
|
89
|
-
price_including_tax {
|
|
90
|
-
value
|
|
91
|
-
currency
|
|
92
|
-
}
|
|
93
|
-
original_item_price {
|
|
94
|
-
currency
|
|
95
|
-
value
|
|
96
|
-
}
|
|
97
|
-
original_row_total {
|
|
98
|
-
currency
|
|
99
|
-
value
|
|
100
|
-
}
|
|
101
|
-
row_total {
|
|
102
|
-
currency
|
|
103
|
-
value
|
|
104
|
-
}
|
|
105
|
-
row_total_including_tax {
|
|
106
|
-
value
|
|
107
|
-
currency
|
|
108
|
-
}
|
|
109
|
-
catalog_discount {
|
|
110
|
-
amount_off
|
|
111
|
-
percent_off
|
|
112
|
-
}
|
|
113
|
-
row_catalog_discount {
|
|
114
|
-
amount_off
|
|
115
|
-
percent_off
|
|
116
|
-
}
|
|
117
|
-
discounts {
|
|
118
|
-
label
|
|
119
|
-
value
|
|
120
|
-
amount {
|
|
121
|
-
currency
|
|
122
|
-
value
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
quantity
|
|
127
|
-
is_available
|
|
128
|
-
note_from_buyer {
|
|
129
|
-
created_at
|
|
130
|
-
creator_id
|
|
131
|
-
creator_type
|
|
132
|
-
negotiable_quote_item_uid
|
|
133
|
-
note
|
|
134
|
-
note_uid
|
|
135
|
-
__typename
|
|
136
|
-
}
|
|
137
|
-
note_from_seller {
|
|
138
|
-
created_at
|
|
139
|
-
creator_id
|
|
140
|
-
creator_type
|
|
141
|
-
negotiable_quote_item_uid
|
|
142
|
-
note
|
|
143
|
-
note_uid
|
|
144
|
-
__typename
|
|
145
|
-
}
|
|
146
|
-
... on SimpleCartItem {
|
|
147
|
-
customizable_options {
|
|
148
|
-
type
|
|
149
|
-
label
|
|
150
|
-
values {
|
|
151
|
-
label
|
|
152
|
-
value
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
... on ConfigurableCartItem {
|
|
157
|
-
configurable_options {
|
|
158
|
-
option_label
|
|
159
|
-
value_label
|
|
160
|
-
}
|
|
161
|
-
configured_variant {
|
|
162
|
-
uid
|
|
163
|
-
sku
|
|
164
|
-
stock_status
|
|
165
|
-
thumbnail {
|
|
166
|
-
label
|
|
167
|
-
url
|
|
168
|
-
}
|
|
169
|
-
price_range {
|
|
170
|
-
minimum_price {
|
|
171
|
-
regular_price {
|
|
172
|
-
value
|
|
173
|
-
currency
|
|
174
|
-
}
|
|
175
|
-
final_price {
|
|
176
|
-
value
|
|
177
|
-
currency
|
|
178
|
-
}
|
|
179
|
-
discount {
|
|
180
|
-
percent_off
|
|
181
|
-
amount_off
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
maximum_price {
|
|
185
|
-
regular_price {
|
|
186
|
-
value
|
|
187
|
-
currency
|
|
188
|
-
}
|
|
189
|
-
final_price {
|
|
190
|
-
value
|
|
191
|
-
currency
|
|
192
|
-
}
|
|
193
|
-
discount {
|
|
194
|
-
percent_off
|
|
195
|
-
amount_off
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
price_tiers {
|
|
200
|
-
quantity
|
|
201
|
-
final_price {
|
|
202
|
-
value
|
|
203
|
-
}
|
|
204
|
-
discount {
|
|
205
|
-
amount_off
|
|
206
|
-
percent_off
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
customizable_options {
|
|
211
|
-
type
|
|
212
|
-
label
|
|
213
|
-
values {
|
|
214
|
-
label
|
|
215
|
-
value
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
... on BundleCartItem {
|
|
220
|
-
bundle_options {
|
|
221
|
-
label
|
|
222
|
-
values {
|
|
223
|
-
label
|
|
224
|
-
quantity
|
|
225
|
-
original_price {
|
|
226
|
-
currency
|
|
227
|
-
value
|
|
228
|
-
}
|
|
229
|
-
priceV2 {
|
|
230
|
-
currency
|
|
231
|
-
value
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
... on DownloadableCartItem {
|
|
237
|
-
links {
|
|
238
|
-
sort_order
|
|
239
|
-
title
|
|
240
|
-
}
|
|
241
|
-
customizable_options {
|
|
242
|
-
type
|
|
243
|
-
label
|
|
244
|
-
values {
|
|
245
|
-
label
|
|
246
|
-
value
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
history {
|
|
252
|
-
uid
|
|
253
|
-
created_at
|
|
254
|
-
author {
|
|
255
|
-
firstname
|
|
256
|
-
lastname
|
|
257
|
-
}
|
|
258
|
-
change_type
|
|
259
|
-
changes {
|
|
260
|
-
comment_added {
|
|
261
|
-
comment
|
|
262
|
-
}
|
|
263
|
-
custom_changes {
|
|
264
|
-
new_value
|
|
265
|
-
old_value
|
|
266
|
-
title
|
|
267
|
-
}
|
|
268
|
-
statuses {
|
|
269
|
-
changes {
|
|
270
|
-
new_status
|
|
271
|
-
old_status
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
expiration {
|
|
275
|
-
new_expiration
|
|
276
|
-
old_expiration
|
|
277
|
-
}
|
|
278
|
-
total {
|
|
279
|
-
new_price {
|
|
280
|
-
currency
|
|
281
|
-
value
|
|
282
|
-
}
|
|
283
|
-
old_price {
|
|
284
|
-
currency
|
|
285
|
-
value
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
prices {
|
|
291
|
-
subtotal_excluding_tax {
|
|
292
|
-
currency
|
|
293
|
-
value
|
|
294
|
-
}
|
|
295
|
-
subtotal_including_tax {
|
|
296
|
-
currency
|
|
297
|
-
value
|
|
298
|
-
}
|
|
299
|
-
subtotal_with_discount_excluding_tax {
|
|
300
|
-
currency
|
|
301
|
-
value
|
|
302
|
-
}
|
|
303
|
-
applied_taxes {
|
|
304
|
-
amount {
|
|
305
|
-
currency
|
|
306
|
-
value
|
|
307
|
-
}
|
|
308
|
-
label
|
|
309
|
-
}
|
|
310
|
-
grand_total {
|
|
311
|
-
currency
|
|
312
|
-
value
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
shipping_addresses {
|
|
316
|
-
uid
|
|
317
|
-
firstname
|
|
318
|
-
lastname
|
|
319
|
-
company
|
|
320
|
-
street
|
|
321
|
-
city
|
|
322
|
-
region {
|
|
323
|
-
code
|
|
324
|
-
label
|
|
325
|
-
region_id
|
|
326
|
-
}
|
|
327
|
-
postcode
|
|
328
|
-
country {
|
|
329
|
-
code
|
|
330
|
-
label
|
|
331
|
-
}
|
|
332
|
-
telephone
|
|
333
|
-
}
|
|
334
|
-
reference_document_links {
|
|
335
|
-
link_id
|
|
336
|
-
document_name
|
|
337
|
-
document_identifier
|
|
338
|
-
reference_document_url
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
`;export{e as N};
|
|
342
|
-
//# sourceMappingURL=NegotiableQuoteTemplateFragment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NegotiableQuoteTemplateFragment.js","sources":["/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteTemplateFragment.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\nexport const NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT = /* GraphQL */ `\n fragment NegotiableQuoteTemplateFragment on NegotiableQuoteTemplate {\n uid\n template_id\n name\n created_at\n updated_at\n status\n sales_rep_name\n expiration_date\n buyer {\n firstname\n lastname\n }\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n attachments {\n name\n url\n }\n }\n items {\n __typename\n uid\n product {\n name\n sku\n uid\n stock_status\n quantity\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n prices {\n price {\n currency\n value\n }\n price_including_tax {\n value\n currency\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 row_total_including_tax {\n value\n currency\n }\n catalog_discount {\n amount_off\n percent_off\n }\n row_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 is_available\n note_from_buyer {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n ... on SimpleCartItem {\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\n }\n configured_variant {\n uid\n sku\n stock_status\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on BundleCartItem {\n bundle_options {\n label\n values {\n label\n quantity\n original_price {\n currency\n value\n }\n priceV2 {\n currency\n value\n }\n }\n }\n }\n ... on DownloadableCartItem {\n links {\n sort_order\n title\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\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 custom_changes {\n new_value\n old_value\n title\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n total {\n new_price {\n currency\n value\n }\n old_price {\n currency\n value\n }\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 shipping_addresses {\n uid\n firstname\n lastname\n company\n street\n city\n region {\n code\n label\n region_id\n }\n postcode\n country {\n code\n label\n }\n telephone\n }\n reference_document_links {\n link_id\n document_name\n document_identifier\n reference_document_url\n }\n }\n`;\n"],"names":["NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT"],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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import{jsx as p,jsxs as u}from"@dropins/tools/preact-jsx-runtime.js";import{classes as n,VComponent as _}from"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/components.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";/* empty css *//* empty css */const V=({label:o,price:e,classSuffixes:t=[],labelClassSuffix:r,testId:m,children:s,...a})=>p(y,{...a,label:o,price:e,classSuffixes:t,labelClassSuffix:r,testId:m,children:s}),y=({label:o,price:e,classSuffixes:t=[],labelClassSuffix:r,testId:m,children:s,...a})=>{const i="quote-order-summary__label",c="quote-order-summary__price";return u("div",{...a,...m?{"data-testid":m}:{},className:n(["quote-order-summary__entry",...t.map(d=>`quote-order-summary__${d}`)]),children:[p("span",{className:n([i,...r?[`${i}--${r}`]:[]]),children:o}),p(_,{node:e,className:n([c,...r?[`${c}--${r}`]:[]])}),s]})};export{V as O};
|
|
4
|
-
//# sourceMappingURL=OrderSummaryLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OrderSummaryLine.js","sources":["/@dropins/storefront-quote-management/src/containers/OrderSummaryLine/OrderSummaryLine.tsx","/@dropins/storefront-quote-management/src/components/OrderSummaryLine/OrderSummaryLine.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 { HTMLAttributes } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { VNode } from 'preact';\nimport { OrderSummaryLine as OrderSummaryLineComponent } from '@/quote-management/components';\n\nexport interface OrderSummaryLineProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'label'> {\n label: VNode | string;\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n classSuffixes?: Array<string>;\n labelClassSuffix?: string;\n testId?: string;\n children?: any;\n}\n\nexport const OrderSummaryLine: Container<OrderSummaryLineProps> = ({\n label,\n price,\n classSuffixes = [],\n labelClassSuffix,\n testId,\n children,\n ...props\n}) => {\n return (\n <OrderSummaryLineComponent\n {...props}\n label={label}\n price={price}\n classSuffixes={classSuffixes}\n labelClassSuffix={labelClassSuffix}\n testId={testId}\n >\n {children}\n </OrderSummaryLineComponent>\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 '@/quote-management/components/OrderSummaryLine/OrderSummaryLine.css';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nexport interface OrderSummaryLineComponentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'label'> {\n label: VNode | string;\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n classSuffixes?: Array<string>;\n labelClassSuffix?: string;\n testId?: string;\n children?: any;\n}\n\nexport const OrderSummaryLine: FunctionComponent<\n OrderSummaryLineComponentProps\n> = ({\n label,\n price,\n classSuffixes = [],\n labelClassSuffix,\n testId,\n children,\n ...props\n}) => {\n const labelClass = 'quote-order-summary__label';\n const priceClass = 'quote-order-summary__price';\n return (\n <div\n {...props}\n {...(testId ? { 'data-testid': testId } : {})}\n className={classes([\n 'quote-order-summary__entry',\n ...classSuffixes.map(\n (classSuffix) => `quote-order-summary__${classSuffix}`\n ),\n ])}\n >\n <span\n className={classes([\n labelClass,\n ...(labelClassSuffix ? [`${labelClass}--${labelClassSuffix}`] : []),\n ])}\n >\n {label}\n </span>\n\n <VComponent\n node={price}\n className={classes([\n priceClass,\n ...(labelClassSuffix ? [`${priceClass}--${labelClassSuffix}`] : []),\n ])}\n />\n\n {children}\n </div>\n );\n};\n"],"names":["OrderSummaryLine","label","price","classSuffixes","labelClassSuffix","testId","children","props","jsx","OrderSummaryLineComponent","labelClass","priceClass","jsxs","classes","classSuffix","VComponent"],"mappings":"4XAwBO,MAAMA,EAAqD,CAAC,CACjE,MAAAC,EACA,MAAAC,EACA,cAAAC,EAAgB,CAAA,EAChB,iBAAAC,EACA,OAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAEIC,EAACC,EAAA,CACE,GAAGF,EACJ,MAAAN,EACA,MAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,OAAAC,EAEC,SAAAC,CAAA,CAAA,ECnBMN,EAET,CAAC,CACH,MAAAC,EACA,MAAAC,EACA,cAAAC,EAAgB,CAAA,EAChB,iBAAAC,EACA,OAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMG,EAAa,6BACbC,EAAa,6BACnB,OACEC,EAAC,MAAA,CACE,GAAGL,EACH,GAAIF,EAAS,CAAE,cAAeA,CAAA,EAAW,CAAA,EAC1C,UAAWQ,EAAQ,CACjB,6BACA,GAAGV,EAAc,IACdW,GAAgB,wBAAwBA,CAAW,EAAA,CACtD,CACD,EAED,SAAA,CAAAN,EAAC,OAAA,CACC,UAAWK,EAAQ,CACjBH,EACA,GAAIN,EAAmB,CAAC,GAAGM,CAAU,KAAKN,CAAgB,EAAE,EAAI,CAAA,CAAC,CAClE,EAEA,SAAAH,CAAA,CAAA,EAGHO,EAACO,EAAA,CACC,KAAMb,EACN,UAAWW,EAAQ,CACjBF,EACA,GAAIP,EAAmB,CAAC,GAAGO,CAAU,KAAKP,CAAgB,EAAE,EAAI,CAAA,CAAC,CAClE,CAAA,CAAA,EAGFE,CAAA,CAAA,CAAA,CAGP"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import{jsx as o,jsxs as i}from"@dropins/tools/preact-jsx-runtime.js";import{useState as f,useEffect as d}from"@dropins/tools/preact-compat.js";import{Q as c}from"./QuoteCommentsList.js";import{events as p}from"@dropins/tools/event-bus.js";import{f as h}from"./dateUtils.js";const C=({quoteData:a,...s})=>{var r;const[e,n]=f(a);if(d(()=>{const t=p.on("quote-management/quote-data",u=>{n(u.quote)},{eager:!0});return()=>t==null?void 0:t.off()},[]),!e)return null;const m=(r=e==null?void 0:e.comments)==null?void 0:r.map(t=>({uid:t.uid,createdAt:o("span",{children:h(t.createdAt,"long")}),author:i("span",{children:[t.author.firstname," ",t.author.lastname]}),text:o("p",{children:t.text}),attachments:t.attachments}));return o(c,{"data-testid":"quote-comments-list-container",...s,comments:m||[]})};export{C as Q};
|
|
4
|
-
//# sourceMappingURL=QuoteCommentsList3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteCommentsList3.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteCommentsList/QuoteCommentsList.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 { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { QuoteCommentsList as QuoteCommentsListComponent } from '@/quote-management/components/QuoteCommentsList';\nimport { NegotiableQuoteModel } from '@/quote-management/data/models/negotiable-quote-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuoteCommentsListProps\n extends HTMLAttributes<HTMLUListElement> {\n quoteData?: NegotiableQuoteModel;\n}\n\nexport const QuoteCommentsList: Container<QuoteCommentsListProps> = ({\n quoteData: initialData,\n ...props\n}) => {\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(\n initialData\n );\n\n useEffect(() => {\n const quoteDataEvent = events.on(\n 'quote-management/quote-data',\n (data: { quote: NegotiableQuoteModel }) => {\n setQuoteData(data.quote);\n },\n {\n eager: true,\n }\n );\n return () => quoteDataEvent?.off();\n }, []);\n\n if (!quoteData) {\n return null;\n }\n\n // Format comments data\n const formattedComments = quoteData?.comments?.map((comment) => ({\n uid: comment.uid,\n createdAt: <span>{formattedDate(comment.createdAt, 'long')}</span>,\n author: (\n <span>\n {comment.author.firstname} {comment.author.lastname}\n </span>\n ),\n text: <p>{comment.text}</p>,\n attachments: comment.attachments,\n }));\n\n return (\n <QuoteCommentsListComponent\n data-testid=\"quote-comments-list-container\"\n {...props}\n comments={formattedComments || []}\n />\n );\n};\n"],"names":["QuoteCommentsList","initialData","props","quoteData","setQuoteData","useState","useEffect","quoteDataEvent","events","data","formattedComments","_a","comment","jsx","QuoteCommentsListComponent"],"mappings":"kRAqBO,MAAMA,EAAuD,CAAC,CACnE,UAAWC,EACX,GAAGC,CACL,IAAM,OACJ,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAChCJ,CAAA,EAgBF,GAbAK,EAAU,IAAM,CACd,MAAMC,EAAiBC,EAAO,GAC5B,8BACCC,GAA0C,CACzCL,EAAaK,EAAK,KAAK,CACzB,EACA,CACE,MAAO,EAAA,CACT,EAEF,MAAO,IAAMF,GAAA,YAAAA,EAAgB,KAC/B,EAAG,CAAA,CAAE,EAED,CAACJ,EACH,OAAO,KAIT,MAAMO,GAAoBC,EAAAR,GAAA,YAAAA,EAAW,WAAX,YAAAQ,EAAqB,IAAKC,IAAa,CAC/D,IAAKA,EAAQ,IACb,UAAWC,EAAC,OAAA,CAAM,WAAcD,EAAQ,UAAW,MAAM,EAAE,EAC3D,SACG,OAAA,CACE,SAAA,CAAAA,EAAQ,OAAO,UAAU,IAAEA,EAAQ,OAAO,QAAA,EAC7C,EAEF,KAAMC,EAAC,IAAA,CAAG,SAAAD,EAAQ,KAAK,EACvB,YAAaA,EAAQ,WAAA,IAGvB,OACEC,EAACC,EAAA,CACC,cAAY,gCACX,GAAGZ,EACJ,SAAUQ,GAAqB,CAAA,CAAC,CAAA,CAGtC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{useState as m,useEffect as i}from"@dropins/tools/preact-compat.js";import{events as n}from"@dropins/tools/event-bus.js";import{Q as f}from"./QuoteHistoryLog.js";const Q=({quoteData:r,...s})=>{const[e,a]=m(r);return i(()=>{const t=n.on("quote-management/quote-data",u=>{a(u.quote)},{eager:!0});return()=>t==null?void 0:t.off()},[]),e?o("div",{...s,children:o(f,{history:e.history,items:e.items,buyer:e.buyer,salesRepName:e.salesRepName})}):null};export{Q};
|
|
4
|
-
//# sourceMappingURL=QuoteHistoryLog3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteHistoryLog3.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteHistoryLog/QuoteHistoryLog.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 { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { NegotiableQuoteModel } from '@/quote-management/data/models/negotiable-quote-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { QuoteHistoryLog as QuoteHistoryLogComponent } from '@/quote-management/components/QuoteHistoryLog';\n\nexport interface QuoteHistoryLogProps extends HTMLAttributes<HTMLDivElement> {\n quoteData?: NegotiableQuoteModel;\n}\n \nexport const QuoteHistoryLog: Container<QuoteHistoryLogProps> = ({ quoteData: initialData, ...props }) => {\n\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(\n initialData\n );\n\n useEffect(() => {\n const quoteDataEvent = events.on(\n 'quote-management/quote-data',\n (data: { quote: NegotiableQuoteModel }) => {\n setQuoteData(data.quote);\n },\n {\n eager: true,\n }\n );\n return () => quoteDataEvent?.off();\n }, []);\n\n if (!quoteData) {\n return null;\n }\n\n return (\n <div {...props}>\n <QuoteHistoryLogComponent \n history={quoteData.history}\n items={quoteData.items}\n buyer={quoteData.buyer}\n salesRepName={quoteData.salesRepName}\n />\n </div>\n );\n};\n"],"names":["QuoteHistoryLog","initialData","props","quoteData","setQuoteData","useState","useEffect","quoteDataEvent","events","data","jsx","QuoteHistoryLogComponent"],"mappings":"mOAmBO,MAAMA,EAAmD,CAAC,CAAE,UAAWC,EAAa,GAAGC,KAAY,CAExG,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAChCJ,CAAA,EAgBF,OAbAK,EAAU,IAAM,CACd,MAAMC,EAAiBC,EAAO,GAC5B,8BACCC,GAA0C,CACzCL,EAAaK,EAAK,KAAK,CACzB,EACA,CACE,MAAO,EAAA,CACT,EAEF,MAAO,IAAMF,GAAA,YAAAA,EAAgB,KAC/B,EAAG,CAAA,CAAE,EAEAJ,EAKHO,EAAC,MAAA,CAAK,GAAGR,EACP,SAAAQ,EAACC,EAAA,CACC,QAASR,EAAU,QACnB,MAAOA,EAAU,MACjB,MAAOA,EAAU,MACjB,aAAcA,EAAU,YAAA,CAAA,EAE5B,EAXO,IAaX"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import*as v from"@dropins/tools/preact-compat.js";import{useState as p,useMemo as f}from"@dropins/tools/preact-compat.js";import{jsx as e,jsxs as d,Fragment as k}from"@dropins/tools/preact-jsx-runtime.js";import{classes as a,VComponent as N}from"@dropins/tools/lib.js";/* empty css */import{Picker as x,Modal as L,Input as T,TextArea as M,Button as _}from"@dropins/tools/components.js";import{useText as y}from"@dropins/tools/i18n.js";const S=i=>v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-edit-2",...i},v.createElement("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})),j=({className:i,dropdownPlaceholder:m,dropdownOptions:n,dropdownValue:c,handleDropdownChange:s,buttons:t,...l})=>{const b=n&&n.length>0,u=t&&t.length>0,o=(n==null?void 0:n.map(r=>({text:r.label,value:r.value})))||[];return o.unshift({text:m||"",value:""}),e("div",{className:"quote-management-actions-bar__container","data-testid":"actions-bar-container",children:d("div",{className:a(["quote-management-actions-bar",i]),"data-testid":"actions-bar",...l,children:[b&&e(x,{name:"dropdown",id:"dropdown",handleSelect:s,className:"quote-management-actions-bar__dropdown","data-testid":"dropdown",options:o,value:c||""},`actions-bar-picker-${c||"empty"}`),u&&e("div",{className:"quote-management-actions-bar__buttons","data-testid":"buttons-container",children:t==null?void 0:t.map((r,q)=>e(N,{node:r,className:a(["quote-management-actions-bar__button"])},q))})]})})},D=({className:i,tabs:m,tabsContent:n,defaultActiveTab:c,...s})=>{const[t,l]=p(c||Array.from(m.keys())[0]),b=o=>{l(o)},u=f(()=>n.get(t),[t,n]);return d("div",{...s,className:a(["quote-management-tabbed-content",i]),children:[m&&e("div",{"data-testid":"tabbed-content-tabs",className:a(["quote-management-tabbed-content__tabs"]),children:Array.from(m.entries()).map(([o,r])=>e("button",{className:a(["quote-management-tabbed-content__tab",["quote-management-tabbed-content__tab--active",o===t]]),onClick:()=>b(o),children:r},o))}),u&&e("div",{className:a(["quote-management-tabbed-content__active-tab-content"]),children:e(N,{node:u})})]})},I=({className:i,open:m,quoteName:n,renameReason:c,quoteNameError:s,errorBanner:t,successBanner:l,showCloseButton:b=!0,onQuoteNameChange:u,onRenameReasonChange:o,onSave:r,onClose:q})=>{const g=y({title:"NegotiableQuote.Manage.rename.title",quoteNameLabel:"NegotiableQuote.Manage.rename.quoteNameLabel",reasonLabel:"NegotiableQuote.Manage.rename.reasonLabel",renameButton:"NegotiableQuote.Manage.rename.renameButton",cancelButton:"NegotiableQuote.Manage.rename.cancelButton"});return m?d(L,{open:m,size:"medium",title:e(k,{children:g.title}),onClose:q,clickToDismiss:!0,escapeToDismiss:!0,showCloseButton:b,className:a(["quote-management-rename-quote-modal",i]),"data-testid":"rename-quote-modal",children:[t&&e("div",{className:a(["quote-management-rename-quote-modal__error-banner"]),"data-testid":"rename-quote-modal-error-banner",children:t}),l&&e("div",{className:a(["quote-management-rename-quote-modal__success-banner"]),"data-testid":"rename-quote-modal-success-banner",children:l}),d("div",{className:a(["quote-management-rename-quote-modal__content"]),children:[d("div",{children:[e(T,{name:"quoteName",type:"text",value:n,onInput:h=>u(h.target.value),floatingLabel:g.quoteNameLabel,required:!0,error:!!s}),s&&e("span",{className:a(["quote-management-rename-quote-modal__error-text"]),children:s})]}),e(M,{name:"quoteComment",value:c,onInput:h=>o(h.target.value),label:g.reasonLabel,rows:3})]}),d("div",{className:a(["quote-management-rename-quote-modal__actions"]),children:[e(_,{variant:"secondary",size:"medium",onClick:q,className:a(["quote-management-rename-quote-modal__cancel-button"]),children:g.cancelButton}),e(_,{variant:"primary",size:"medium",onClick:r,className:a(["quote-management-rename-quote-modal__save-button"]),children:g.renameButton})]})]}):null};export{j as A,I as R,S,D as T};
|
|
4
|
-
//# sourceMappingURL=RenameQuoteModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenameQuoteModal.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/Edit.svg","/@dropins/storefront-quote-management/src/components/ActionsBar/ActionsBar.tsx","/@dropins/storefront-quote-management/src/components/TabbedContent/TabbedContent.tsx","/@dropins/storefront-quote-management/src/components/RenameQuoteModal/RenameQuoteModal.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgEdit = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"feather feather-edit-2\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z\" }));\nexport default SvgEdit;\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/ActionsBar/ActionsBar.css';\nimport { Picker } from '@adobe-commerce/elsie/components';\n\nexport interface ActionsBarProps extends HTMLAttributes<HTMLDivElement> {\n dropdownPlaceholder?: string;\n dropdownOptions?: {\n label: string;\n value: string;\n }[];\n dropdownValue?: string;\n handleDropdownChange?: (event: Event) => void;\n buttons?: VNode[];\n}\n\nexport const ActionsBar: FunctionComponent<ActionsBarProps> = ({\n className,\n dropdownPlaceholder,\n dropdownOptions,\n dropdownValue,\n handleDropdownChange,\n buttons,\n ...props\n}) => {\n const hasDropdown = dropdownOptions && dropdownOptions.length > 0;\n const hasButtons = buttons && buttons.length > 0;\n\n const pickerOptions =\n dropdownOptions?.map((option) => ({\n text: option.label,\n value: option.value,\n })) || [];\n pickerOptions.unshift({\n text: dropdownPlaceholder || '',\n value: '',\n });\n\n return (\n <div\n className=\"quote-management-actions-bar__container\"\n data-testid=\"actions-bar-container\"\n >\n <div\n className={classes(['quote-management-actions-bar', className])}\n data-testid=\"actions-bar\"\n {...props}\n >\n {hasDropdown && (\n <Picker\n key={`actions-bar-picker-${dropdownValue || 'empty'}`}\n name=\"dropdown\"\n id=\"dropdown\"\n handleSelect={handleDropdownChange}\n className=\"quote-management-actions-bar__dropdown\"\n data-testid=\"dropdown\"\n options={pickerOptions}\n value={dropdownValue || ''}\n />\n )}\n {hasButtons && (\n <div\n className=\"quote-management-actions-bar__buttons\"\n data-testid=\"buttons-container\"\n >\n {buttons?.map((button, index) => (\n <VComponent\n node={button}\n className={classes(['quote-management-actions-bar__button'])}\n key={index}\n />\n ))}\n </div>\n )}\n </div>\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, useMemo, useState } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@/quote-management/components/TabbedContent/TabbedContent.css';\n\nexport interface TabbedContentProps extends HTMLAttributes<HTMLDivElement> {\n tabs: Map<string, string>;\n tabsContent: Map<string, VNode>;\n defaultActiveTab?: string;\n}\n\nexport const TabbedContent: FunctionComponent<TabbedContentProps> = ({\n className,\n tabs,\n tabsContent,\n defaultActiveTab,\n ...props\n}) => {\n const [activeTabId, setActiveTabId] = useState<string>(\n defaultActiveTab || Array.from(tabs.keys())[0]\n );\n\n const handleTabClick = (tabId: string) => {\n setActiveTabId(tabId);\n };\n\n const activeTabContent = useMemo(() => {\n return tabsContent.get(activeTabId);\n }, [activeTabId, tabsContent]);\n\n return (\n <div {...props} className={classes(['quote-management-tabbed-content', className])}>\n {tabs &&\n <div data-testid=\"tabbed-content-tabs\" className={classes(['quote-management-tabbed-content__tabs'])}>\n {Array.from(tabs.entries()).map(([tabId, tabLabel]) => (\n <button\n className={\n classes([\n 'quote-management-tabbed-content__tab',\n ['quote-management-tabbed-content__tab--active', tabId === activeTabId]\n ])}\n key={tabId}\n onClick={() => handleTabClick(tabId)}\n >\n {tabLabel}\n </button>\n ))}\n </div>\n }\n {\n activeTabContent &&\n <div className={classes(['quote-management-tabbed-content__active-tab-content'])}>\n <VComponent\n node={activeTabContent as VNode}\n />\n </div>\n }\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 } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, Input, TextArea, Modal } from '@adobe-commerce/elsie/components';\nimport '@/quote-management/components/RenameQuoteModal/RenameQuoteModal.css';\n\nexport interface RenameQuoteModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n open: boolean;\n quoteName: string;\n renameReason: string;\n quoteNameError?: string;\n errorBanner?: VNode;\n successBanner?: VNode;\n showCloseButton?: boolean;\n onQuoteNameChange: (value: string) => void;\n onRenameReasonChange: (value: string) => void;\n onSave: () => void;\n onClose?: () => void;\n}\n\nexport const RenameQuoteModal: FunctionComponent<RenameQuoteModalProps> = ({\n className,\n open,\n quoteName,\n renameReason,\n quoteNameError,\n errorBanner,\n successBanner,\n showCloseButton = true,\n onQuoteNameChange,\n onRenameReasonChange,\n onSave,\n onClose,\n}) => {\n const dictionary = useText({\n title: 'NegotiableQuote.Manage.rename.title',\n quoteNameLabel: 'NegotiableQuote.Manage.rename.quoteNameLabel',\n reasonLabel: 'NegotiableQuote.Manage.rename.reasonLabel',\n renameButton: 'NegotiableQuote.Manage.rename.renameButton',\n cancelButton: 'NegotiableQuote.Manage.rename.cancelButton',\n });\n\n if (!open) {\n return null;\n }\n\n return (\n <Modal\n open={open}\n size=\"medium\"\n title={<>{dictionary.title}</>}\n onClose={onClose}\n clickToDismiss={true}\n escapeToDismiss={true}\n showCloseButton={showCloseButton}\n className={classes(['quote-management-rename-quote-modal', className])}\n data-testid=\"rename-quote-modal\"\n >\n {errorBanner && (\n <div className={classes(['quote-management-rename-quote-modal__error-banner'])} data-testid=\"rename-quote-modal-error-banner\">\n {errorBanner}\n </div>\n )}\n\n {successBanner && (\n <div className={classes(['quote-management-rename-quote-modal__success-banner'])} data-testid=\"rename-quote-modal-success-banner\">\n {successBanner}\n </div>\n )}\n\n <div className={classes(['quote-management-rename-quote-modal__content'])}>\n <div>\n <Input\n name=\"quoteName\"\n type=\"text\"\n value={quoteName}\n onInput={(e: any) => onQuoteNameChange(e.target.value)}\n floatingLabel={dictionary.quoteNameLabel}\n required\n error={!!quoteNameError}\n />\n {quoteNameError && (\n <span className={classes(['quote-management-rename-quote-modal__error-text'])}>\n {quoteNameError}\n </span>\n )}\n </div>\n\n <TextArea\n name=\"quoteComment\"\n value={renameReason}\n onInput={(e: any) => onRenameReasonChange(e.target.value)}\n label={dictionary.reasonLabel}\n rows={3}\n />\n </div>\n\n <div className={classes(['quote-management-rename-quote-modal__actions'])}>\n <Button \n variant=\"secondary\"\n size=\"medium\"\n onClick={onClose}\n className={classes(['quote-management-rename-quote-modal__cancel-button'])}\n >\n {dictionary.cancelButton}\n </Button>\n <Button \n variant=\"primary\"\n size=\"medium\"\n onClick={onSave}\n className={classes(['quote-management-rename-quote-modal__save-button'])}\n >\n {dictionary.renameButton}\n </Button>\n </div>\n </Modal>\n );\n};\n"],"names":["SvgEdit","props","React","ActionsBar","className","dropdownPlaceholder","dropdownOptions","dropdownValue","handleDropdownChange","buttons","hasDropdown","hasButtons","pickerOptions","option","jsx","jsxs","classes","Picker","button","index","VComponent","TabbedContent","tabs","tabsContent","defaultActiveTab","activeTabId","setActiveTabId","useState","handleTabClick","tabId","activeTabContent","useMemo","tabLabel","RenameQuoteModal","open","quoteName","renameReason","quoteNameError","errorBanner","successBanner","showCloseButton","onQuoteNameChange","onRenameReasonChange","onSave","onClose","dictionary","useText","Modal","Fragment","Input","e","TextArea","Button"],"mappings":"wcACK,MAACA,EAAWC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,OAAQ,eAAgB,YAAa,EAAG,cAAe,QAAS,eAAgB,QAAS,UAAW,yBAA0B,GAAGD,CAAK,EAAoBC,EAAM,cAAc,OAAQ,CAAE,EAAG,0DAA2D,CAAC,ECyBlZC,EAAiD,CAAC,CAC7D,UAAAC,EACA,oBAAAC,EACA,gBAAAC,EACA,cAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,GAAGR,CACL,IAAM,CACJ,MAAMS,EAAcJ,GAAmBA,EAAgB,OAAS,EAC1DK,EAAaF,GAAWA,EAAQ,OAAS,EAEzCG,GACJN,GAAA,YAAAA,EAAiB,IAAKO,IAAY,CAChC,KAAMA,EAAO,MACb,MAAOA,EAAO,KAAA,MAC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ACrD,cAAeL,EAAW,eAC1B,SAAQ,GACR,MAAO,CAAC,CAACR,CAAA,CAAA,EAEVA,KACE,OAAA,CAAK,UAAWrB,EAAQ,CAAC,iDAAiD,CAAC,EACzE,SAAAqB,CAAA,CACH,CAAA,EAEJ,EAEAvB,EAACqC,EAAA,CACC,KAAK,eACL,MAAOf,EACP,QAAUc,GAAWR,EAAqBQ,EAAE,OAAO,KAAK,EACxD,MAAOL,EAAW,YAClB,KAAM,CAAA,CAAA,CACR,EACF,IAEC,MAAA,CAAI,UAAW7B,EAAQ,CAAC,8CAA8C,CAAC,EACtE,SAAA,CAAAF,EAACsC,EAAA,CACC,QAAQ,YACR,KAAK,SACL,QAASR,EACT,UAAW5B,EAAQ,CAAC,oDAAoD,CAAC,EAExE,SAAA6B,EAAW,YAAA,CAAA,EAEd/B,EAACsC,EAAA,CACC,QAAQ,UACR,KAAK,SACL,QAAST,EACT,UAAW3B,EAAQ,CAAC,kDAAkD,CAAC,EAEtE,SAAA6B,EAAW,YAAA,CAAA,CACd,CAAA,CACF,CAAA,CAAA,CAAA,EAvEK,IA0EX","x_google_ignoreList":[0]}
|
package/chunks/WarningFilled.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import*as e from"@dropins/tools/preact-compat.js";const l=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"}));export{l as S};
|
|
4
|
-
//# sourceMappingURL=WarningFilled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WarningFilled.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/WarningFilled.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgWarningFilled = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z\", fill: \"currentColor\" }));\nexport default SvgWarningFilled;\n"],"names":["SvgWarningFilled","props","React"],"mappings":"kDACK,MAACA,EAAoBC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAK,EAAoBC,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,SAAU,UAAW,SAAU,UAAW,EAAG,yJAA0J,KAAM,eAAgB,CAAC","x_google_ignoreList":[0]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*! Copyright 2026 Adobe
|
|
2
|
-
All Rights Reserved. */
|
|
3
|
-
import{events as n}from"@dropins/tools/event-bus.js";import{a as u}from"./transform-quote-template.js";import{s as r}from"./state.js";import{N as T}from"./NegotiableQuoteTemplateFragment.js";import{f as p}from"./transform-quote.js";const s=`
|
|
4
|
-
mutation UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION(
|
|
5
|
-
$input: UpdateNegotiableQuoteTemplateQuantitiesInput!
|
|
6
|
-
) {
|
|
7
|
-
updateNegotiableQuoteTemplateQuantities(input: $input) {
|
|
8
|
-
quote_template {
|
|
9
|
-
...NegotiableQuoteTemplateFragment
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
${T}
|
|
14
|
-
`,w=async e=>{var o,t;if(!e.templateId)throw new Error("Template ID is required");if(!e.items||e.items.length===0)throw new Error("Items array is required and must not be empty");if(!r.authenticated)throw new Error("Unauthorized");try{const a=await p(s,{variables:{input:{template_id:e.templateId,items:e.items.map(i=>({item_id:i.itemId,quantity:i.quantity,min_qty:i.minQty,max_qty:i.maxQty}))}}});if(!((t=(o=a==null?void 0:a.data)==null?void 0:o.updateNegotiableQuoteTemplateQuantities)!=null&&t.quote_template))throw new Error("No quote template data received");const m=u(a.data.updateNegotiableQuoteTemplateQuantities.quote_template);if(!m)throw new Error("Failed to transform quote template data");return n.emit("quote-management/quote-template-data",{quoteTemplate:m,permissions:r.permissions}),m}catch(a){return Promise.reject(a)}},E=`
|
|
15
|
-
mutation REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION(
|
|
16
|
-
$input: RemoveNegotiableQuoteTemplateItemsInput!
|
|
17
|
-
) {
|
|
18
|
-
removeNegotiableQuoteTemplateItems(input: $input) {
|
|
19
|
-
...NegotiableQuoteTemplateFragment
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
${T}
|
|
23
|
-
`,c=async e=>{var o;if(!e.templateId)throw new Error("Template ID is required");if(!e.itemUids||e.itemUids.length===0)throw new Error("Item UIDs array is required and must not be empty");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await p(E,{variables:{input:{template_id:e.templateId,item_uids:e.itemUids}}});if(!((o=t==null?void 0:t.data)!=null&&o.removeNegotiableQuoteTemplateItems))throw new Error("No quote template data received");const a=u(t.data.removeNegotiableQuoteTemplateItems);if(!a)throw new Error("Failed to transform quote template data");return n.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(t){return Promise.reject(t)}},d=`
|
|
24
|
-
mutation SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION(
|
|
25
|
-
$input: QuoteTemplateLineItemNoteInput!
|
|
26
|
-
) {
|
|
27
|
-
setQuoteTemplateLineItemNote(input: $input) {
|
|
28
|
-
...NegotiableQuoteTemplateFragment
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
${T}
|
|
32
|
-
`,f=async e=>{var o;if(!e.templateId)throw new Error("Template ID is required");if(!e.itemId)throw new Error("Item ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await p(d,{variables:{input:{templateId:e.templateId,item_uid:e.itemId,note:e.note}}});if(!((o=t==null?void 0:t.data)!=null&&o.setQuoteTemplateLineItemNote))throw new Error("No quote template data received");const a=u(t.data.setQuoteTemplateLineItemNote);if(!a)throw new Error("Failed to transform quote template data");return n.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(t){return Promise.reject(t)}};export{f as a,c as r,w as u};
|
|
33
|
-
//# sourceMappingURL=addQuoteTemplateLineItemNote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addQuoteTemplateLineItemNote.js","sources":["/@dropins/storefront-quote-management/src/api/updateQuoteTemplateItemQuantities/graphql/updateNegotiableQuoteTemplateQuantities.ts","/@dropins/storefront-quote-management/src/api/updateQuoteTemplateItemQuantities/updateQuoteTemplateItemQuantities.ts","/@dropins/storefront-quote-management/src/api/removeQuoteTemplateItems/graphql/removeNegotiableQuoteTemplateItems.ts","/@dropins/storefront-quote-management/src/api/removeQuoteTemplateItems/removeQuoteTemplateItems.ts","/@dropins/storefront-quote-management/src/api/addQuoteTemplateLineItemNote/graphql/setQuoteTemplateLineItemNote.ts","/@dropins/storefront-quote-management/src/api/addQuoteTemplateLineItemNote/addQuoteTemplateLineItemNote.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 { NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT } from '@/quote-management/api/graphql/NegotiableQuoteTemplateFragment';\n\nexport const UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION = /* GraphQL */ `\n mutation UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION(\n $input: UpdateNegotiableQuoteTemplateQuantitiesInput!\n ) {\n updateNegotiableQuoteTemplateQuantities(input: $input) {\n quote_template {\n ...NegotiableQuoteTemplateFragment\n }\n }\n }\n ${NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT}\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 { fetchGraphQl } from '@/quote-management/api';\nimport { UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION } from './graphql/updateNegotiableQuoteTemplateQuantities';\nimport { transformQuoteTemplate } from '@/quote-management/data/transforms';\nimport { state } from '@/quote-management/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface NegotiableQuoteTemplateItemQuantityInput {\n itemId: string;\n quantity: number;\n minQty?: number;\n maxQty?: number;\n}\n\nexport interface UpdateQuoteTemplateItemQuantitiesParams {\n templateId: string;\n items: NegotiableQuoteTemplateItemQuantityInput[];\n}\n\nexport const updateQuoteTemplateItemQuantities = async (\n params: UpdateQuoteTemplateItemQuantitiesParams\n) => {\n if (!params.templateId) {\n throw new Error('Template ID is required');\n }\n\n if (!params.items || params.items.length === 0) {\n throw new Error('Items array is required and must not be empty');\n }\n\n if (!state.authenticated) {\n throw new Error('Unauthorized');\n }\n\n try {\n const results: any = await fetchGraphQl(\n UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION,\n {\n variables: {\n input: {\n template_id: params.templateId,\n items: params.items.map((item) => ({\n item_id: item.itemId,\n quantity: item.quantity,\n min_qty: item.minQty,\n max_qty: item.maxQty,\n })),\n },\n },\n }\n );\n\n if (\n !results?.data?.updateNegotiableQuoteTemplateQuantities?.quote_template\n ) {\n throw new Error('No quote template data received');\n }\n\n const transformedData = transformQuoteTemplate(\n results.data.updateNegotiableQuoteTemplateQuantities.quote_template\n );\n\n if (!transformedData) {\n throw new Error('Failed to transform quote template data');\n }\n\n events.emit('quote-management/quote-template-data', {\n quoteTemplate: transformedData,\n permissions: state.permissions,\n });\n\n return transformedData;\n } catch (error) {\n return Promise.reject(error);\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 { NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT } from '@/quote-management/api/graphql/NegotiableQuoteTemplateFragment';\n\nexport const REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION = /* GraphQL */ `\n mutation REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION(\n $input: RemoveNegotiableQuoteTemplateItemsInput!\n ) {\n removeNegotiableQuoteTemplateItems(input: $input) {\n ...NegotiableQuoteTemplateFragment\n }\n }\n ${NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT}\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 { fetchGraphQl } from '@/quote-management/api';\nimport { REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION } from './graphql/removeNegotiableQuoteTemplateItems';\nimport { transformQuoteTemplate } from '@/quote-management/data/transforms';\nimport { state } from '@/quote-management/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface RemoveQuoteTemplateItemsParams {\n templateId: string;\n itemUids: string[];\n}\n\nexport const removeQuoteTemplateItems = async (\n params: RemoveQuoteTemplateItemsParams\n) => {\n if (!params.templateId) {\n throw new Error('Template ID is required');\n }\n\n if (!params.itemUids || params.itemUids.length === 0) {\n throw new Error('Item UIDs array is required and must not be empty');\n }\n\n if (!state.authenticated) {\n throw new Error('Unauthorized');\n }\n\n try {\n const results: any = await fetchGraphQl(\n REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION,\n {\n variables: {\n input: {\n template_id: params.templateId,\n item_uids: params.itemUids,\n },\n },\n }\n );\n\n if (!results?.data?.removeNegotiableQuoteTemplateItems) {\n throw new Error('No quote template data received');\n }\n\n const transformedData = transformQuoteTemplate(\n results.data.removeNegotiableQuoteTemplateItems\n );\n\n if (!transformedData) {\n throw new Error('Failed to transform quote template data');\n }\n\n events.emit('quote-management/quote-template-data', {\n quoteTemplate: transformedData,\n permissions: state.permissions,\n });\n\n return transformedData;\n } catch (error) {\n return Promise.reject(error);\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 { NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT } from '@/quote-management/api/graphql/NegotiableQuoteTemplateFragment';\n\nexport const SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION = /* GraphQL */ `\n mutation SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION(\n $input: QuoteTemplateLineItemNoteInput!\n ) {\n setQuoteTemplateLineItemNote(input: $input) {\n ...NegotiableQuoteTemplateFragment\n }\n }\n ${NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT}\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 { fetchGraphQl } from '@/quote-management/api';\nimport { SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION } from './graphql/setQuoteTemplateLineItemNote';\nimport { transformQuoteTemplate } from '@/quote-management/data/transforms';\nimport { state } from '@/quote-management/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface AddQuoteTemplateLineItemNoteParams {\n templateId: string;\n itemId: string;\n note?: string;\n}\n\nexport const addQuoteTemplateLineItemNote = async (\n params: AddQuoteTemplateLineItemNoteParams\n) => {\n if (!params.templateId) {\n throw new Error('Template ID is required');\n }\n\n if (!params.itemId) {\n throw new Error('Item ID is required');\n }\n\n if (!state.authenticated) {\n throw new Error('Unauthorized');\n }\n\n try {\n const results: any = await fetchGraphQl(\n SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION,\n {\n variables: {\n input: {\n templateId: params.templateId,\n item_uid: params.itemId,\n note: params.note,\n },\n },\n }\n );\n\n if (!results?.data?.setQuoteTemplateLineItemNote) {\n throw new Error('No quote template data received');\n }\n\n const transformedData = transformQuoteTemplate(\n results.data.setQuoteTemplateLineItemNote\n );\n\n if (!transformedData) {\n throw new Error('Failed to transform quote template data');\n }\n\n events.emit('quote-management/quote-template-data', {\n quoteTemplate: transformedData,\n permissions: state.permissions,\n });\n\n return transformedData;\n } catch (error) {\n return Promise.reject(error);\n }\n};\n"],"names":["UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION","NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT","updateQuoteTemplateItemQuantities","params","state","results","fetchGraphQl","item","_b","_a","transformedData","transformQuoteTemplate","events","error","REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION","removeQuoteTemplateItems","SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION","addQuoteTemplateLineItemNote"],"mappings":"wOAWO,MAAMA,EAAqE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAU9EC,CAAkC;AAAA,ECMzBC,EAAoC,MAC/CC,GACG,SACH,GAAI,CAAC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
import{getGlobalLocale as c}from"@dropins/tools/lib.js";function l(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return console.warn("Failed to detect user timezone, falling back to UTC:",e),"UTC"}}function m(e){const r=new Date(e);return!isNaN(r.getTime())}function s(e,r="short"){if(!m(e))return"–";const n=c()||"en-US";let t;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const[o,a,i]=e.split("-").map(Number);t=new Date(o,a-1,i)}else t=new Date(e);return r==="short"?t.toLocaleDateString(n,{year:"numeric",month:"numeric",day:"numeric"}):t.toLocaleDateString(n,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0})}export{s as f,l as g};
|
|
4
|
-
//# sourceMappingURL=dateUtils.js.map
|
package/chunks/dateUtils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.js","sources":["/@dropins/storefront-quote-management/src/utils/dateUtils.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 { getGlobalLocale } from \"@adobe-commerce/elsie/lib\";\n\n/**\n * Gets the user's timezone with fallback to UTC if detection fails\n * @returns The user's timezone string (e.g., 'America/New_York') or 'UTC' as fallback\n */\nexport function getUserTimezone(): string {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (error) {\n console.warn('Failed to detect user timezone, falling back to UTC:', error);\n return 'UTC';\n }\n}\n\n/**\n * Checks if a date string is a valid date\n * @param dateString - The date string to check\n * @returns True if the date string is a valid date, false otherwise\n */\nexport function isValidDate(dateString: string): boolean {\n const date = new Date(dateString);\n return !isNaN(date.getTime());\n}\n\n/**\n * Formats a date string to locale date string, returning \"–\" for invalid dates\n * @param dateString - The date string to format\n * @returns Formatted date string or \"–\" for invalid dates\n */\nexport function formattedDate(dateString: string, type: 'short' | 'long' = 'short'): string {\n if (!isValidDate(dateString)) {\n return '–';\n }\n\n const locale = getGlobalLocale() || 'en-US';\n \n // For dates in YYYY-MM-DD format (like expiration dates), parse as local date to avoid timezone issues\n // This prevents dates from shifting when displayed in different timezones\n let date: Date;\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateString)) {\n // Parse as local date (not UTC) to avoid timezone conversion\n const [year, month, day] = dateString.split('-').map(Number);\n date = new Date(year, month - 1, day);\n } else {\n // For ISO timestamps or other formats, parse normally\n date = new Date(dateString);\n }\n\n if (type === 'short') {\n return date.toLocaleDateString(locale, {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n });\n }\n\n return date.toLocaleDateString(locale, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: true,\n });\n}\n"],"names":["getUserTimezone","error","isValidDate","dateString","date","formattedDate","type","locale","getGlobalLocale","year","month","day"],"mappings":"wDAeO,SAASA,GAA0B,CACxC,GAAI,CACF,OAAO,KAAK,iBAAiB,gBAAA,EAAkB,QACjD,OAASC,EAAO,CACd,eAAQ,KAAK,uDAAwDA,CAAK,EACnE,KACT,CACF,CAOO,SAASC,EAAYC,EAA6B,CACvD,MAAMC,EAAO,IAAI,KAAKD,CAAU,EAChC,MAAO,CAAC,MAAMC,EAAK,SAAS,CAC9B,CAOO,SAASC,EAAcF,EAAoBG,EAAyB,QAAiB,CAC1F,GAAI,CAACJ,EAAYC,CAAU,EACzB,MAAO,IAGT,MAAMI,EAASC,KAAqB,QAIpC,IAAIJ,EACJ,GAAI,sBAAsB,KAAKD,CAAU,EAAG,CAE1C,KAAM,CAACM,EAAMC,EAAOC,CAAG,EAAIR,EAAW,MAAM,GAAG,EAAE,IAAI,MAAM,EAC3DC,EAAO,IAAI,KAAKK,EAAMC,EAAQ,EAAGC,CAAG,CACtC,MAEEP,EAAO,IAAI,KAAKD,CAAU,EAG5B,OAAIG,IAAS,QACJF,EAAK,mBAAmBG,EAAQ,CACrC,KAAM,UACN,MAAO,UACP,IAAK,SAAA,CACN,EAGIH,EAAK,mBAAmBG,EAAQ,CACrC,KAAM,UACN,MAAO,OACP,IAAK,UACL,KAAM,UACN,OAAQ,UACR,OAAQ,UACR,OAAQ,EAAA,CACT,CACH"}
|