@dropins/storefront-quote-management 0.0.1-alpha8 → 1.0.0-beta1
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/api/acceptQuoteTemplate/acceptQuoteTemplate.d.ts +13 -0
- package/api/{getCustomerData/getCustomerData.d.ts → acceptQuoteTemplate/graphql/acceptQuoteTemplate.d.ts} +2 -2
- package/{data/transforms/__fixtures__/customerData.d.ts → api/acceptQuoteTemplate/index.d.ts} +2 -2
- package/api/addQuoteTemplateLineItemNote/addQuoteTemplateLineItemNote.d.ts +15 -0
- package/api/addQuoteTemplateLineItemNote/graphql/setQuoteTemplateLineItemNote.d.ts +10 -0
- package/api/addQuoteTemplateLineItemNote/index.d.ts +10 -0
- package/api/addQuoteTemplateShippingAddress/addQuoteTemplateShippingAddress.d.ts +37 -0
- package/api/addQuoteTemplateShippingAddress/graphql/setNegotiableQuoteTemplateShippingAddress.d.ts +10 -0
- package/api/addQuoteTemplateShippingAddress/index.d.ts +10 -0
- package/api/cancelQuoteTemplate/cancelQuoteTemplate.d.ts +14 -0
- package/api/cancelQuoteTemplate/graphql/cancelQuoteTemplate.d.ts +10 -0
- package/api/cancelQuoteTemplate/index.d.ts +10 -0
- package/api/closeNegotiableQuote/closeNegotiableQuote.d.ts +31 -0
- package/api/closeNegotiableQuote/graphql/CloseNegotiableQuoteMutation.d.ts +2 -0
- package/api/closeNegotiableQuote/index.d.ts +10 -0
- package/api/createQuoteTemplate/createQuoteTemplate.d.ts +4 -0
- package/api/createQuoteTemplate/graphql/createQuoteTemplate.d.ts +10 -0
- package/api/createQuoteTemplate/index.d.ts +10 -0
- package/api/deleteQuote/deleteQuote.d.ts +28 -0
- package/api/deleteQuote/graphql/DeleteQuoteMutation.d.ts +10 -0
- package/api/{getCustomerData → deleteQuote}/index.d.ts +1 -1
- package/{data/models/customer-model.d.ts → api/deleteQuoteTemplate/deleteQuoteTemplate.d.ts} +6 -8
- package/api/deleteQuoteTemplate/graphql/deleteQuoteTemplate.d.ts +10 -0
- package/api/deleteQuoteTemplate/index.d.ts +10 -0
- package/api/duplicateNegotiableQuote/duplicateNegotiableQuote.d.ts +8 -0
- package/api/duplicateNegotiableQuote/graphql/duplicateNegotiableQuoteMutation.d.ts +10 -0
- package/api/duplicateNegotiableQuote/index.d.ts +10 -0
- package/api/generateQuoteFromTemplate/generateQuoteFromTemplate.d.ts +15 -0
- package/api/generateQuoteFromTemplate/graphql/generateNegotiableQuoteFromTemplate.d.ts +10 -0
- package/api/generateQuoteFromTemplate/index.d.ts +10 -0
- package/api/getQuoteData/getQuoteData.d.ts +10 -0
- package/api/getQuoteData/graphql/QuoteDataQuery.d.ts +2 -0
- package/api/getQuoteData/index.d.ts +10 -0
- package/api/getQuoteTemplateData/getQuoteTemplateData.d.ts +4 -0
- package/api/getQuoteTemplateData/graphql/getQuoteTemplateData.d.ts +10 -0
- package/api/getQuoteTemplateData/index.d.ts +10 -0
- package/api/getQuoteTemplates/getQuoteTemplates.d.ts +34 -0
- package/api/getQuoteTemplates/graphql/getQuoteTemplates.d.ts +10 -0
- package/api/getQuoteTemplates/index.d.ts +10 -0
- package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
- package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +10 -0
- package/api/getStoreConfig/index.d.ts +10 -0
- package/api/graphql/NegotiableQuoteAddressFragment.d.ts +10 -0
- package/api/graphql/NegotiableQuoteFragment.d.ts +5 -13
- package/api/graphql/NegotiableQuoteListFragment.d.ts +10 -0
- package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +10 -0
- package/api/graphql/ShippingMethodFragment.d.ts +10 -0
- package/api/index.d.ts +33 -1
- package/api/initialize/initialize.d.ts +2 -0
- package/api/openQuoteTemplate/graphql/openQuoteTemplate.d.ts +10 -0
- package/api/openQuoteTemplate/index.d.ts +10 -0
- package/api/openQuoteTemplate/openQuoteTemplate.d.ts +13 -0
- package/api/removeNegotiableQuoteItems/graphql/RemoveNegotiableQuoteItemsMutation.d.ts +10 -0
- package/api/removeNegotiableQuoteItems/index.d.ts +10 -0
- package/api/removeNegotiableQuoteItems/removeNegotiableQuoteItems.d.ts +8 -0
- package/api/removeQuoteTemplateItems/graphql/removeNegotiableQuoteTemplateItems.d.ts +10 -0
- package/api/removeQuoteTemplateItems/index.d.ts +10 -0
- package/api/removeQuoteTemplateItems/removeQuoteTemplateItems.d.ts +14 -0
- package/api/renameNegotiableQuote/graphql/RenameNegotiableQuoteMutation.d.ts +10 -0
- package/api/renameNegotiableQuote/index.d.ts +10 -0
- package/api/renameNegotiableQuote/renameNegotiableQuote.d.ts +9 -0
- package/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.d.ts +4 -12
- package/api/requestNegotiableQuote/requestNegotiableQuote.d.ts +3 -0
- package/api/sendForReview/graphql/SendNegotiableQuoteForReviewMutation.d.ts +10 -0
- package/api/sendForReview/index.d.ts +10 -0
- package/api/sendForReview/sendForReview.d.ts +11 -0
- package/api/sendQuoteTemplateForReview/graphql/sendQuoteTemplateForReview.d.ts +10 -0
- package/api/sendQuoteTemplateForReview/index.d.ts +10 -0
- package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +15 -0
- package/api/setLineItemNote/graphql/SetLineItemNoteMutation.d.ts +10 -0
- package/api/setLineItemNote/index.d.ts +10 -0
- package/api/setLineItemNote/setLineItemNote.d.ts +10 -0
- package/api/setShippingAddress/graphql/SetNegotiableQuoteShippingAddressMutation.d.ts +10 -0
- package/api/setShippingAddress/index.d.ts +2 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +110 -0
- package/api/updateQuantities/graphql/UpdateNegotiableQuoteQuantitiesMutation.d.ts +10 -0
- package/api/updateQuantities/index.d.ts +10 -0
- package/api/updateQuantities/updateQuantities.d.ts +36 -0
- package/api/updateQuoteTemplateItemQuantities/graphql/updateNegotiableQuoteTemplateQuantities.d.ts +10 -0
- package/api/updateQuoteTemplateItemQuantities/index.d.ts +10 -0
- package/api/updateQuoteTemplateItemQuantities/updateQuoteTemplateItemQuantities.d.ts +20 -0
- package/api/uploadFile/graphql/FinishUploadMutation.d.ts +10 -0
- package/api/uploadFile/graphql/InitiateUploadMutation.d.ts +10 -0
- package/api/uploadFile/index.d.ts +10 -0
- package/api/uploadFile/uploadFile.d.ts +12 -0
- package/api.js +95 -22
- package/api.js.map +1 -1
- package/chunks/AttachedFilesList.js +4 -0
- package/chunks/AttachedFilesList.js.map +1 -0
- package/chunks/CheckWithCircle.js +4 -0
- package/chunks/CheckWithCircle.js.map +1 -0
- package/chunks/ChevronDown.js +4 -0
- package/chunks/ChevronDown.js.map +1 -0
- package/chunks/ConfirmationModal.js +4 -0
- package/chunks/ConfirmationModal.js.map +1 -0
- package/chunks/ItemsQuoted.js +4 -0
- package/chunks/ItemsQuoted.js.map +1 -0
- package/chunks/ItemsQuotedTemplate.js +4 -0
- package/chunks/ItemsQuotedTemplate.js.map +1 -0
- package/chunks/LineItemNoteModal2.js +4 -0
- package/chunks/LineItemNoteModal2.js.map +1 -0
- package/chunks/NegotiableQuoteFragment.js +342 -7
- package/chunks/NegotiableQuoteFragment.js.map +1 -1
- package/chunks/NegotiableQuoteTemplateFragment.js +190 -0
- package/chunks/NegotiableQuoteTemplateFragment.js.map +1 -0
- package/chunks/OrderSummaryLine.js +4 -0
- package/chunks/OrderSummaryLine.js.map +1 -0
- package/chunks/QuoteCommentsList.js +4 -0
- package/chunks/QuoteCommentsList.js.map +1 -0
- package/chunks/QuoteCommentsList3.js +4 -0
- package/chunks/QuoteCommentsList3.js.map +1 -0
- package/chunks/QuoteHistoryLog.js +4 -0
- package/chunks/QuoteHistoryLog.js.map +1 -0
- package/chunks/QuoteHistoryLog3.js +4 -0
- package/chunks/QuoteHistoryLog3.js.map +1 -0
- package/chunks/QuoteTemplateCommentsList.js +4 -0
- package/chunks/QuoteTemplateCommentsList.js.map +1 -0
- package/chunks/QuoteTemplateHistoryLog.js +4 -0
- package/chunks/QuoteTemplateHistoryLog.js.map +1 -0
- package/chunks/ShippingAddressDisplay.js +4 -0
- package/chunks/ShippingAddressDisplay.js.map +1 -0
- package/chunks/TabbedContent.js +4 -0
- package/chunks/TabbedContent.js.map +1 -0
- package/chunks/WarningFilled.js +4 -0
- package/chunks/WarningFilled.js.map +1 -0
- package/chunks/addQuoteTemplateLineItemNote.js +13 -0
- package/chunks/addQuoteTemplateLineItemNote.js.map +1 -0
- package/chunks/dateUtils.js +4 -0
- package/chunks/dateUtils.js.map +1 -0
- package/chunks/duplicateNegotiableQuote.js +121 -0
- package/chunks/duplicateNegotiableQuote.js.map +1 -0
- package/chunks/generateQuoteFromTemplate.js +12 -0
- package/chunks/generateQuoteFromTemplate.js.map +1 -0
- package/chunks/getQuoteTemplates.js +50 -0
- package/chunks/getQuoteTemplates.js.map +1 -0
- package/chunks/negotiableQuotes.js +35 -5
- package/chunks/negotiableQuotes.js.map +1 -1
- package/chunks/openQuoteTemplate.js +31 -0
- package/chunks/openQuoteTemplate.js.map +1 -0
- package/chunks/requestNegotiableQuote.js +3 -3
- package/chunks/requestNegotiableQuote.js.map +1 -1
- package/chunks/setLineItemNote.js +47 -0
- package/chunks/setLineItemNote.js.map +1 -0
- package/chunks/state.js +4 -0
- package/chunks/state.js.map +1 -0
- package/chunks/transform-quote-template.js +4 -0
- package/chunks/transform-quote-template.js.map +1 -0
- package/chunks/transform-quote.js +4 -0
- package/chunks/transform-quote.js.map +1 -0
- package/chunks/uploadFile.js +20 -0
- package/chunks/uploadFile.js.map +1 -0
- package/components/ActionsBar/ActionsBar.d.ts +15 -0
- package/components/ActionsBar/index.d.ts +11 -0
- package/components/AttachedFilesList/AttachedFilesList.d.ts +16 -0
- package/components/AttachedFilesList/index.d.ts +11 -0
- package/components/ConfirmationModal/ConfirmationModal.d.ts +17 -0
- package/components/ConfirmationModal/index.d.ts +11 -0
- package/components/ItemsQuoted/ItemsQuoted.d.ts +11 -0
- package/components/ItemsQuoted/index.d.ts +11 -0
- package/components/LineItemNoteModal/LineItemNoteModal.d.ts +17 -0
- package/components/LineItemNoteModal/index.d.ts +11 -0
- package/components/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +22 -0
- package/components/ManageNegotiableQuote/__fixtures__/ManageNegotiableQuoteProps.d.ts +4 -0
- package/components/ManageNegotiableQuote/index.d.ts +11 -0
- package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +20 -0
- package/components/ManageNegotiableQuoteTemplate/__fixtures__/ManageNegotiableQuoteTemplateProps.d.ts +4 -0
- package/components/ManageNegotiableQuoteTemplate/index.d.ts +11 -0
- package/components/OrderSummary/OrderSummary.d.ts +48 -0
- package/components/OrderSummary/index.d.ts +11 -0
- package/components/OrderSummaryLine/OrderSummaryLine.d.ts +13 -0
- package/components/OrderSummaryLine/index.d.ts +11 -0
- package/components/ProductListTable/ProductListTable.d.ts +61 -0
- package/components/ProductListTable/index.d.ts +11 -0
- package/components/QuoteCommentsList/QuoteCommentsList.d.ts +17 -0
- package/components/QuoteCommentsList/index.d.ts +11 -0
- package/components/QuoteHistoryLog/QuoteHistoryLog.d.ts +77 -0
- package/components/QuoteHistoryLog/index.d.ts +11 -0
- package/components/QuotePricesSummary/QuotePricesSummary.d.ts +16 -0
- package/components/QuotePricesSummary/index.d.ts +11 -0
- package/components/QuoteSummaryList/QuoteSummaryList.d.ts +13 -0
- package/components/QuoteSummaryList/index.d.ts +11 -0
- package/components/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +29 -0
- package/components/QuoteTemplatesListTable/index.d.ts +10 -0
- package/components/RenameQuoteModal/RenameQuoteModal.d.ts +18 -0
- package/components/RenameQuoteModal/index.d.ts +11 -0
- package/components/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +1 -0
- package/components/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +12 -0
- package/components/ShippingAddressDisplay/index.d.ts +11 -0
- package/components/TabbedContent/TabbedContent.d.ts +10 -0
- package/components/TabbedContent/index.d.ts +11 -0
- package/components/index.d.ts +28 -1
- package/containers/ItemsQuoted/ItemsQuoted.d.ts +30 -0
- package/containers/ItemsQuoted/index.d.ts +11 -0
- package/containers/ItemsQuoted.d.ts +3 -0
- package/containers/ItemsQuoted.js +4 -0
- package/containers/ItemsQuoted.js.map +1 -0
- package/containers/ItemsQuotedTemplate/ItemsQuotedTemplate.d.ts +21 -0
- package/containers/ItemsQuotedTemplate/index.d.ts +11 -0
- package/containers/ItemsQuotedTemplate.d.ts +3 -0
- package/containers/ItemsQuotedTemplate.js +4 -0
- package/containers/ItemsQuotedTemplate.js.map +1 -0
- package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +87 -0
- package/containers/ManageNegotiableQuote/index.d.ts +11 -0
- package/containers/ManageNegotiableQuote.d.ts +3 -0
- package/containers/ManageNegotiableQuote.js +4 -0
- package/containers/ManageNegotiableQuote.js.map +1 -0
- package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +67 -0
- package/containers/ManageNegotiableQuoteTemplate/index.d.ts +11 -0
- package/containers/ManageNegotiableQuoteTemplate.d.ts +3 -0
- package/containers/ManageNegotiableQuoteTemplate.js +4 -0
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -0
- package/containers/OrderSummary/OrderSummary.d.ts +11 -0
- package/containers/OrderSummary/index.d.ts +11 -0
- package/containers/OrderSummary.d.ts +3 -0
- package/containers/OrderSummary.js +4 -0
- package/containers/OrderSummary.js.map +1 -0
- package/containers/OrderSummaryLine/OrderSummaryLine.d.ts +14 -0
- package/containers/OrderSummaryLine/index.d.ts +11 -0
- package/containers/OrderSummaryLine.d.ts +3 -0
- package/containers/OrderSummaryLine.js +4 -0
- package/containers/OrderSummaryLine.js.map +1 -0
- package/containers/QuoteCommentsList/QuoteCommentsList.d.ts +9 -0
- package/containers/QuoteCommentsList/index.d.ts +11 -0
- package/containers/QuoteCommentsList.d.ts +3 -0
- package/containers/QuoteCommentsList.js +4 -0
- package/containers/QuoteCommentsList.js.map +1 -0
- package/containers/QuoteHistoryLog/QuoteHistoryLog.d.ts +9 -0
- package/containers/QuoteHistoryLog/index.d.ts +11 -0
- package/containers/QuoteHistoryLog.d.ts +3 -0
- package/containers/QuoteHistoryLog.js +4 -0
- package/containers/QuoteHistoryLog.js.map +1 -0
- package/containers/QuoteSummaryList/QuoteSummaryList.d.ts +51 -0
- package/containers/QuoteSummaryList/index.d.ts +11 -0
- package/containers/QuoteSummaryList.d.ts +3 -0
- package/containers/QuoteSummaryList.js +4 -0
- package/containers/QuoteSummaryList.js.map +1 -0
- package/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.d.ts +9 -0
- package/containers/QuoteTemplateCommentsList/index.d.ts +11 -0
- package/containers/QuoteTemplateCommentsList.d.ts +3 -0
- package/containers/QuoteTemplateCommentsList.js +4 -0
- package/containers/QuoteTemplateCommentsList.js.map +1 -0
- package/containers/QuoteTemplateHistoryLog/QuoteTemplateHistoryLog.d.ts +9 -0
- package/containers/QuoteTemplateHistoryLog/index.d.ts +11 -0
- package/containers/QuoteTemplateHistoryLog.d.ts +3 -0
- package/containers/QuoteTemplateHistoryLog.js +4 -0
- package/containers/QuoteTemplateHistoryLog.js.map +1 -0
- package/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +74 -0
- package/containers/QuoteTemplatesListTable/index.d.ts +11 -0
- package/containers/QuoteTemplatesListTable.d.ts +3 -0
- package/containers/QuoteTemplatesListTable.js +4 -0
- package/containers/QuoteTemplatesListTable.js.map +1 -0
- package/containers/QuotesListTable/QuotesListTable.d.ts +9 -9
- package/containers/QuotesListTable.js +1 -1
- package/containers/QuotesListTable.js.map +1 -1
- package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +10 -0
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js.map +1 -1
- package/containers/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +10 -0
- package/containers/ShippingAddressDisplay/index.d.ts +11 -0
- package/containers/ShippingAddressDisplay.d.ts +1 -0
- package/containers/ShippingAddressDisplay.js +4 -0
- package/containers/ShippingAddressDisplay.js.map +1 -0
- package/containers/index.d.ts +21 -0
- package/data/models/__fixtures__/negotiableQuoteModel.d.ts +8 -0
- package/data/models/__fixtures__/negotiableQuoteTemplateModel.d.ts +4 -0
- package/data/models/__fixtures__/negotiableQuoteTemplatesListModel.d.ts +5 -0
- package/data/models/__fixtures__/storeConfigModel.d.ts +5 -0
- package/data/models/index.d.ts +10 -1
- package/data/models/negotiable-quote-model.d.ts +228 -31
- package/data/models/negotiable-quote-template-model.d.ts +147 -0
- package/data/models/store-config-model.d.ts +27 -0
- package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +590 -2
- package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +1610 -0
- package/data/transforms/__fixtures__/storeConfigData.d.ts +31 -0
- package/data/transforms/index.d.ts +6 -13
- package/data/transforms/transform-quote-template.d.ts +5 -0
- package/data/transforms/transform-quote.d.ts +8 -0
- package/data/transforms/transform-store-config.d.ts +4 -0
- package/hooks/useQuoteSummaryData.d.ts +10 -0
- package/i18n/en_US.json.d.ts +346 -0
- package/lib/configurationTransformers.d.ts +27 -0
- package/lib/itemFormatters.d.ts +47 -0
- package/lib/priceCalculators.d.ts +41 -0
- package/lib/state.d.ts +6 -0
- package/package.json +1 -1
- package/render.js +6 -3
- package/render.js.map +1 -1
- package/types/state.types.d.ts +13 -0
- package/utils/dateUtils.d.ts +26 -0
- package/utils/fileUtils.d.ts +46 -0
- package/utils/mapAuthPermissions.d.ts +39 -0
- package/api/getCustomerData/graphql/CustomerQuery.d.ts +0 -2
- package/api/graphql/CustomerFragment.d.ts +0 -2
- package/data/models/__fixtures__/customerModel.d.ts +0 -4
- package/data/transforms/transform-customer.d.ts +0 -15
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*! Copyright 2025 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
|
+
uid
|
|
32
|
+
product {
|
|
33
|
+
name
|
|
34
|
+
sku
|
|
35
|
+
uid
|
|
36
|
+
stock_status
|
|
37
|
+
}
|
|
38
|
+
prices {
|
|
39
|
+
price {
|
|
40
|
+
currency
|
|
41
|
+
value
|
|
42
|
+
}
|
|
43
|
+
original_item_price {
|
|
44
|
+
currency
|
|
45
|
+
value
|
|
46
|
+
}
|
|
47
|
+
row_total {
|
|
48
|
+
currency
|
|
49
|
+
value
|
|
50
|
+
}
|
|
51
|
+
catalog_discount {
|
|
52
|
+
amount_off
|
|
53
|
+
percent_off
|
|
54
|
+
}
|
|
55
|
+
discounts {
|
|
56
|
+
label
|
|
57
|
+
value
|
|
58
|
+
amount {
|
|
59
|
+
currency
|
|
60
|
+
value
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
quantity
|
|
65
|
+
note_from_buyer {
|
|
66
|
+
created_at
|
|
67
|
+
creator_id
|
|
68
|
+
creator_type
|
|
69
|
+
# negotiable_quote_template_item_uid
|
|
70
|
+
note
|
|
71
|
+
note_uid
|
|
72
|
+
}
|
|
73
|
+
note_from_seller {
|
|
74
|
+
created_at
|
|
75
|
+
creator_id
|
|
76
|
+
creator_type
|
|
77
|
+
# negotiable_quote_template_item_uid
|
|
78
|
+
note
|
|
79
|
+
note_uid
|
|
80
|
+
}
|
|
81
|
+
... on ConfigurableCartItem {
|
|
82
|
+
configurable_options {
|
|
83
|
+
option_label
|
|
84
|
+
value_label
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
... on BundleCartItem {
|
|
88
|
+
bundle_options {
|
|
89
|
+
label
|
|
90
|
+
values {
|
|
91
|
+
label
|
|
92
|
+
quantity
|
|
93
|
+
original_price {
|
|
94
|
+
currency
|
|
95
|
+
value
|
|
96
|
+
}
|
|
97
|
+
priceV2 {
|
|
98
|
+
currency
|
|
99
|
+
value
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
history {
|
|
106
|
+
uid
|
|
107
|
+
created_at
|
|
108
|
+
author {
|
|
109
|
+
firstname
|
|
110
|
+
lastname
|
|
111
|
+
}
|
|
112
|
+
change_type
|
|
113
|
+
changes {
|
|
114
|
+
comment_added {
|
|
115
|
+
comment
|
|
116
|
+
}
|
|
117
|
+
custom_changes {
|
|
118
|
+
new_value
|
|
119
|
+
old_value
|
|
120
|
+
title
|
|
121
|
+
}
|
|
122
|
+
statuses {
|
|
123
|
+
changes {
|
|
124
|
+
new_status
|
|
125
|
+
old_status
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
expiration {
|
|
129
|
+
new_expiration
|
|
130
|
+
old_expiration
|
|
131
|
+
}
|
|
132
|
+
total {
|
|
133
|
+
new_price {
|
|
134
|
+
currency
|
|
135
|
+
value
|
|
136
|
+
}
|
|
137
|
+
old_price {
|
|
138
|
+
currency
|
|
139
|
+
value
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
prices {
|
|
145
|
+
subtotal_excluding_tax {
|
|
146
|
+
currency
|
|
147
|
+
value
|
|
148
|
+
}
|
|
149
|
+
subtotal_including_tax {
|
|
150
|
+
currency
|
|
151
|
+
value
|
|
152
|
+
}
|
|
153
|
+
subtotal_with_discount_excluding_tax {
|
|
154
|
+
currency
|
|
155
|
+
value
|
|
156
|
+
}
|
|
157
|
+
applied_taxes {
|
|
158
|
+
amount {
|
|
159
|
+
currency
|
|
160
|
+
value
|
|
161
|
+
}
|
|
162
|
+
label
|
|
163
|
+
}
|
|
164
|
+
grand_total {
|
|
165
|
+
currency
|
|
166
|
+
value
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
shipping_addresses {
|
|
170
|
+
uid
|
|
171
|
+
firstname
|
|
172
|
+
lastname
|
|
173
|
+
company
|
|
174
|
+
street
|
|
175
|
+
city
|
|
176
|
+
region {
|
|
177
|
+
code
|
|
178
|
+
label
|
|
179
|
+
region_id
|
|
180
|
+
}
|
|
181
|
+
postcode
|
|
182
|
+
country {
|
|
183
|
+
code
|
|
184
|
+
label
|
|
185
|
+
}
|
|
186
|
+
telephone
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
`;export{e as N};
|
|
190
|
+
//# sourceMappingURL=NegotiableQuoteTemplateFragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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 uid\n product {\n name\n sku\n uid\n stock_status\n }\n prices {\n price {\n currency\n value\n }\n original_item_price {\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 note_from_buyer {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\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 }\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 }\n`;\n"],"names":["NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT"],"mappings":"AASO,MAAMA,EAAmD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 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
|
|
@@ -0,0 +1 @@
|
|
|
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":"uXAwBO,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as e,jsxs as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as d,VComponent as n}from"@dropins/tools/lib.js";/* empty css */import{useText as c}from"@dropins/tools/i18n.js";const _=({className:o,comments:a,...u})=>{const m=c({emptyState:"NegotiableQuote.Manage.quoteComments.emptyState",by:"NegotiableQuote.Manage.quoteComments.by",attachments:"NegotiableQuote.Manage.quoteComments.attachments"});return!a||a.length===0?e("ul",{...u,className:d(["quote-management-quote-comments-list","quote-management-quote-comments-list--empty",o]),"data-testid":"quote-comments-list",children:e("li",{className:"quote-management-quote-comments-list__empty-state","data-testid":"quote-comments-empty-state",children:m.emptyState})}):e("ul",{...u,className:d(["quote-management-quote-comments-list",o]),"data-testid":"quote-comments-list",children:a.map(t=>s("li",{className:"quote-management-quote-comments-list__item","data-testid":`quote-comment-${t.uid}`,children:[s("div",{className:"quote-management-quote-comments-list__header",children:[e(n,{className:"quote-management-quote-comments-list__date",node:t.createdAt,"data-testid":`quote-comment-date-${t.uid}`}),e("span",{className:"quote-management-quote-comments-list__by",children:m.by}),e(n,{className:"quote-management-quote-comments-list__author",node:t.author,"data-testid":`quote-comment-author-${t.uid}`})]}),e(n,{className:"quote-management-quote-comments-list__text",node:t.text,"data-testid":`quote-comment-text-${t.uid}`}),t.attachments&&t.attachments.length>0&&s("div",{className:"quote-management-quote-comments-list__attachments","data-testid":`quote-comment-attachments-${t.uid}`,children:[e("span",{className:"quote-management-quote-comments-list__attachments-label",children:m.attachments}),t.attachments.map((i,l)=>e("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"quote-management-quote-comments-list__attachment-link","data-testid":`quote-comment-attachment-${t.uid}-${l}`,children:i.name},`${t.uid}-attachment-${l}`))]})]},t.uid))})};export{_ as Q};
|
|
4
|
+
//# sourceMappingURL=QuoteCommentsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuoteCommentsList.js","sources":["/@dropins/storefront-quote-management/src/components/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 { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/quote-management/components/QuoteCommentsList/QuoteCommentsList.css';\n\nexport interface QuoteCommentsListProps\n extends HTMLAttributes<HTMLUListElement> {\n comments: Array<{\n uid: string;\n createdAt: VNode;\n author: VNode;\n text: VNode;\n attachments?: Array<{\n name: string;\n url: string;\n }>;\n }>;\n}\n\nexport const QuoteCommentsList: FunctionComponent<QuoteCommentsListProps> = ({\n className,\n comments,\n ...props\n}) => {\n const dictionary = useText({\n emptyState: 'NegotiableQuote.Manage.quoteComments.emptyState',\n by: 'NegotiableQuote.Manage.quoteComments.by',\n attachments: 'NegotiableQuote.Manage.quoteComments.attachments',\n });\n\n if (!comments || comments.length === 0) {\n return (\n <ul\n {...props}\n className={classes([\n 'quote-management-quote-comments-list',\n 'quote-management-quote-comments-list--empty',\n className,\n ])}\n data-testid=\"quote-comments-list\"\n >\n <li\n className=\"quote-management-quote-comments-list__empty-state\"\n data-testid=\"quote-comments-empty-state\"\n >\n {dictionary.emptyState}\n </li>\n </ul>\n );\n }\n\n return (\n <ul\n {...props}\n className={classes(['quote-management-quote-comments-list', className])}\n data-testid=\"quote-comments-list\"\n >\n {comments.map((comment) => (\n <li\n key={comment.uid}\n className=\"quote-management-quote-comments-list__item\"\n data-testid={`quote-comment-${comment.uid}`}\n >\n <div className=\"quote-management-quote-comments-list__header\">\n <VComponent\n className=\"quote-management-quote-comments-list__date\"\n node={comment.createdAt}\n data-testid={`quote-comment-date-${comment.uid}`}\n />\n <span className=\"quote-management-quote-comments-list__by\">\n {dictionary.by}\n </span>\n <VComponent\n className=\"quote-management-quote-comments-list__author\"\n node={comment.author}\n data-testid={`quote-comment-author-${comment.uid}`}\n />\n </div>\n <VComponent\n className=\"quote-management-quote-comments-list__text\"\n node={comment.text}\n data-testid={`quote-comment-text-${comment.uid}`}\n />\n {comment.attachments && comment.attachments.length > 0 && (\n <div\n className=\"quote-management-quote-comments-list__attachments\"\n data-testid={`quote-comment-attachments-${comment.uid}`}\n >\n <span className=\"quote-management-quote-comments-list__attachments-label\">\n {dictionary.attachments}\n </span>\n {comment.attachments.map((attachment, index) => (\n <a\n key={`${comment.uid}-attachment-${index}`}\n href={attachment.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"quote-management-quote-comments-list__attachment-link\"\n data-testid={`quote-comment-attachment-${comment.uid}-${index}`}\n >\n {attachment.name}\n </a>\n ))}\n </div>\n )}\n </li>\n ))}\n </ul>\n );\n};\n"],"names":["QuoteCommentsList","className","comments","props","dictionary","useText","jsx","classes","comment","jsxs","VComponent","attachment","index"],"mappings":"sNA6BO,MAAMA,EAA+D,CAAC,CAC3E,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,WAAY,kDACZ,GAAI,0CACJ,YAAa,kDAAA,CACd,EAED,MAAI,CAACH,GAAYA,EAAS,SAAW,EAEjCI,EAAC,KAAA,CACE,GAAGH,EACJ,UAAWI,EAAQ,CACjB,uCACA,8CACAN,CAAA,CACD,EACD,cAAY,sBAEZ,SAAAK,EAAC,KAAA,CACC,UAAU,oDACV,cAAY,6BAEX,SAAAF,EAAW,UAAA,CAAA,CACd,CAAA,EAMJE,EAAC,KAAA,CACE,GAAGH,EACJ,UAAWI,EAAQ,CAAC,uCAAwCN,CAAS,CAAC,EACtE,cAAY,sBAEX,SAAAC,EAAS,IAAKM,GACbC,EAAC,KAAA,CAEC,UAAU,6CACV,cAAa,iBAAiBD,EAAQ,GAAG,GAEzC,SAAA,CAAAC,EAAC,MAAA,CAAI,UAAU,+CACb,SAAA,CAAAH,EAACI,EAAA,CACC,UAAU,6CACV,KAAMF,EAAQ,UACd,cAAa,sBAAsBA,EAAQ,GAAG,EAAA,CAAA,EAEhDF,EAAC,OAAA,CAAK,UAAU,2CACb,WAAW,GACd,EACAA,EAACI,EAAA,CACC,UAAU,+CACV,KAAMF,EAAQ,OACd,cAAa,wBAAwBA,EAAQ,GAAG,EAAA,CAAA,CAClD,EACF,EACAF,EAACI,EAAA,CACC,UAAU,6CACV,KAAMF,EAAQ,KACd,cAAa,sBAAsBA,EAAQ,GAAG,EAAA,CAAA,EAE/CA,EAAQ,aAAeA,EAAQ,YAAY,OAAS,GACnDC,EAAC,MAAA,CACC,UAAU,oDACV,cAAa,6BAA6BD,EAAQ,GAAG,GAErD,SAAA,CAAAF,EAAC,OAAA,CAAK,UAAU,0DACb,SAAAF,EAAW,YACd,EACCI,EAAQ,YAAY,IAAI,CAACG,EAAYC,IACpCN,EAAC,IAAA,CAEC,KAAMK,EAAW,IACjB,OAAO,SACP,IAAI,sBACJ,UAAU,wDACV,cAAa,4BAA4BH,EAAQ,GAAG,IAAII,CAAK,GAE5D,SAAAD,EAAW,IAAA,EAPP,GAAGH,EAAQ,GAAG,eAAeI,CAAK,EAAA,CAS1C,CAAA,CAAA,CAAA,CACH,CAAA,EA5CGJ,EAAQ,GAAA,CA+ChB,CAAA,CAAA,CAGP"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsxs as d,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as R}from"@dropins/tools/lib.js";import{f as c}from"./dateUtils.js";/* empty css */import{useText as $}from"@dropins/tools/i18n.js";const H=({className:g,children:q,history:x,items:y,buyer:n,salesRepName:D,...F})=>{const t=$({quoteCreated:"historyLog.changeTypes.created",quoteUpdated:"historyLog.changeTypes.updated",statusChanged:"historyLog.changeTypes.statusChanged",commentAdded:"historyLog.changeTypes.commentAdded",expirationChanged:"historyLog.changeTypes.expirationChanged",buyerNoteAdded:"historyLog.noteTypes.buyerNoteAdded",sellerNoteAdded:"historyLog.noteTypes.sellerNoteAdded",buyerLabel:"historyLog.authorLabels.buyer",sellerLabel:"historyLog.authorLabels.seller",commentDetail:"historyLog.changeDetails.comment",statusChangedFromTo:"historyLog.changeDetails.statusChangedFromTo",statusSetTo:"historyLog.changeDetails.statusSetTo",expirationChangedFromTo:"historyLog.changeDetails.expirationChangedFromTo",expirationSetTo:"historyLog.changeDetails.expirationSetTo",totalChangedFromTo:"historyLog.changeDetails.totalChangedFromTo",customChange:"historyLog.changeDetails.customChange",productsRemovedFromCatalog:"historyLog.changeDetails.productsRemovedFromCatalog",productsRemovedFromQuote:"historyLog.changeDetails.productsRemovedFromQuote",noDetailsAvailable:"historyLog.changeDetails.noDetailsAvailable",emptyState:"historyLog.emptyState",never:"dateUtils.never"}),w=e=>{switch(e){case"CREATED":return t.quoteCreated;case"UPDATED":return t.quoteUpdated;case"STATUS_CHANGED":return t.statusChanged;case"COMMENT_ADDED":return t.commentAdded;case"EXPIRATION_CHANGED":return t.expirationChanged;default:return e.replace(/_/g," ").toLowerCase().replace(/\b\w/g,o=>o.toUpperCase())}},E=e=>{var a,m,p,u,i,v,T,C,L,N,_,f;const o=[];if((a=e==null?void 0:e.commentAdded)!=null&&a.comment&&o.push(t.commentDetail.replace("{comment}",e.commentAdded.comment)),(m=e==null?void 0:e.statuses)!=null&&m.changes&&e.statuses.changes.forEach(r=>{r.oldStatus&&r.newStatus?o.push(t.statusChangedFromTo.replace("{oldStatus}",r.oldStatus).replace("{newStatus}",r.newStatus)):r.newStatus&&o.push(t.statusSetTo.replace("{newStatus}",r.newStatus))}),(p=e==null?void 0:e.expiration)!=null&&p.newExpiration&&((u=e==null?void 0:e.expiration)!=null&&u.oldExpiration)){const r=c(e.expiration.newExpiration),l=c(e.expiration.oldExpiration);o.push(t.expirationChangedFromTo.replace("{oldExpiration}",l).replace("{newExpiration}",r))}else if((i=e==null?void 0:e.expiration)!=null&&i.newExpiration){const r=c(e.expiration.newExpiration);o.push(t.expirationSetTo.replace("{newExpiration}",r))}if((v=e==null?void 0:e.total)!=null&&v.newPrice&&((T=e==null?void 0:e.total)!=null&&T.oldPrice)){const r=`${e.total.newPrice.currency} ${e.total.newPrice.value}`,l=`${e.total.oldPrice.currency} ${e.total.oldPrice.value}`;o.push(t.totalChangedFromTo.replace("{oldTotal}",l).replace("{newTotal}",r))}if((C=e==null?void 0:e.customChanges)!=null&&C.title&&((L=e==null?void 0:e.customChanges)!=null&&L.old_value)&&((N=e==null?void 0:e.customChanges)!=null&&N.new_value)&&o.push(t.customChange.replace("{title}",e.customChanges.title).replace("{oldValue}",e.customChanges.old_value).replace("{newValue}",e.customChanges.new_value)),(_=e==null?void 0:e.productsRemoved)!=null&&_.productsRemovedFromCatalog&&e.productsRemoved.productsRemovedFromCatalog.length>0&&o.push(t.productsRemovedFromCatalog.replace("{products}",e.productsRemoved.productsRemovedFromCatalog.join(", "))),(f=e==null?void 0:e.productsRemoved)!=null&&f.productsRemovedFromQuote&&e.productsRemoved.productsRemovedFromQuote.length>0){const r=e.productsRemoved.productsRemovedFromQuote.map(l=>l.name||l.sku||l.uid).join(", ");o.push(t.productsRemovedFromQuote.replace("{products}",r))}return o.length>0?o:[t.noDetailsAvailable]},S=(()=>{const e=[],o=(a,m,p,u)=>{a&&Array.isArray(a)&&a.forEach(i=>{i&&i.note&&i.note.trim()&&e.push({...i,type:m,productName:u.product.name,productSku:u.product.sku,authorName:p})})};return y&&y.forEach(a=>{o(a.noteFromBuyer,"buyer",`${n.firstname} ${n.lastname} ${t.buyerLabel}`,a),o(a.noteFromSeller,"seller",`${D} ${t.sellerLabel}`,a)}),e})(),A=(x||[]).map(e=>({...e,entryType:"history"})),b=S.map(e=>({...e,entryType:"note"})),h=[...A,...b];return d("div",{...F,className:R(["quote-management-quote-history-log",g]),children:[h.length>0?s("div",{className:"quote-management-quote-history-log__entries",children:h.map((e,o)=>d("div",{className:"quote-management-quote-history-log__entry",children:[d("div",{className:"quote-management-quote-history-log__entry-header",children:[d("div",{className:"quote-management-quote-history-log__entry-meta",children:[s("span",{className:"quote-management-quote-history-log__entry-date",children:c(e.createdAt,"long")}),s("span",{className:"quote-management-quote-history-log__entry-author",children:e.entryType==="history"?`by ${e.author.firstname} ${e.author.lastname} ${e.author.firstname===n.firstname&&e.author.lastname===n.lastname?t.buyerLabel:t.sellerLabel}`:`by ${e.authorName}`})]}),s("div",{className:"quote-management-quote-history-log__entry-type",children:e.entryType==="history"?w(e.changeType):e.type==="buyer"?t.buyerNoteAdded:t.sellerNoteAdded})]}),s("div",{className:"quote-management-quote-history-log__entry-changes",children:e.entryType==="history"?E(e.changes).map((a,m)=>s("div",{className:"quote-management-quote-history-log__entry-change",children:a},m)):d("div",{className:"quote-management-quote-history-log__entry-change",children:[d("div",{children:[e.productName,"(",e.productSku,")"]}),d("div",{children:['"',e.note,'"']})]})})]},e.entryType==="history"?e.uid:`${e.noteUid}-${o}`))}):s("div",{className:"quote-management-quote-history-log__empty",children:t.emptyState}),q]})};export{H as Q};
|
|
4
|
+
//# sourceMappingURL=QuoteHistoryLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuoteHistoryLog.js","sources":["/@dropins/storefront-quote-management/src/components/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 { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\nimport '@/quote-management/components/QuoteHistoryLog/QuoteHistoryLog.css';\n\nexport interface HistoryEntry {\n uid: string;\n createdAt: string;\n author: {\n firstname: string;\n lastname: string;\n };\n changeType: string;\n changes: {\n commentAdded?: { comment: string };\n statuses?: { changes: Array<{ oldStatus?: string; newStatus?: string }> };\n expiration?: { oldExpiration?: string; newExpiration?: string };\n total?: {\n oldPrice?: { value: number; currency: string };\n newPrice?: { value: number; currency: string };\n };\n customChanges?: { title: string; old_value: string; new_value: string };\n productsRemoved?: {\n productsRemovedFromCatalog?: string[];\n productsRemovedFromQuote?: Array<{ name?: string; sku?: string; uid: string }>;\n };\n };\n}\n\nexport interface ItemNote {\n createdAt: string;\n creatorId: number;\n creatorType: number;\n negotiableQuoteItemUid: string;\n note: string;\n noteUid: string;\n}\n\nexport interface QuoteItem {\n product: {\n name: string;\n sku: string;\n };\n noteFromBuyer?: ItemNote[];\n noteFromSeller?: ItemNote[];\n}\n\nexport interface QuoteHistoryLogProps extends HTMLAttributes<HTMLDivElement> {\n history?: HistoryEntry[];\n items?: QuoteItem[];\n buyer: {\n firstname: string;\n lastname: string;\n };\n salesRepName: string;\n}\n\nexport const QuoteHistoryLog: FunctionComponent<QuoteHistoryLogProps> = ({\n className,\n children,\n history,\n items,\n buyer,\n salesRepName,\n ...props\n}) => {\n const dictionary = useText({\n quoteCreated: 'historyLog.changeTypes.created',\n quoteUpdated: 'historyLog.changeTypes.updated',\n statusChanged: 'historyLog.changeTypes.statusChanged',\n commentAdded: 'historyLog.changeTypes.commentAdded',\n expirationChanged: 'historyLog.changeTypes.expirationChanged',\n buyerNoteAdded: 'historyLog.noteTypes.buyerNoteAdded',\n sellerNoteAdded: 'historyLog.noteTypes.sellerNoteAdded',\n buyerLabel: 'historyLog.authorLabels.buyer',\n sellerLabel: 'historyLog.authorLabels.seller',\n commentDetail: 'historyLog.changeDetails.comment',\n statusChangedFromTo: 'historyLog.changeDetails.statusChangedFromTo',\n statusSetTo: 'historyLog.changeDetails.statusSetTo',\n expirationChangedFromTo: 'historyLog.changeDetails.expirationChangedFromTo',\n expirationSetTo: 'historyLog.changeDetails.expirationSetTo',\n totalChangedFromTo: 'historyLog.changeDetails.totalChangedFromTo',\n customChange: 'historyLog.changeDetails.customChange',\n productsRemovedFromCatalog: 'historyLog.changeDetails.productsRemovedFromCatalog',\n productsRemovedFromQuote: 'historyLog.changeDetails.productsRemovedFromQuote',\n noDetailsAvailable: 'historyLog.changeDetails.noDetailsAvailable',\n emptyState: 'historyLog.emptyState',\n never: 'dateUtils.never',\n });\n\n\n const formatChangeType = (changeType: string) => {\n switch (changeType) {\n case 'CREATED':\n return dictionary.quoteCreated;\n case 'UPDATED':\n return dictionary.quoteUpdated;\n case 'STATUS_CHANGED':\n return dictionary.statusChanged;\n case 'COMMENT_ADDED':\n return dictionary.commentAdded;\n case 'EXPIRATION_CHANGED':\n return dictionary.expirationChanged;\n default:\n return changeType\n .replace(/_/g, ' ')\n .toLowerCase()\n .replace(/\\b\\w/g, (l) => l.toUpperCase());\n }\n };\n\n // Handle status or expiration changes\n const formatChanges = (changes: any) => {\n const changeDetails = [];\n\n if (changes?.commentAdded?.comment) {\n changeDetails.push(\n dictionary.commentDetail.replace(\n '{comment}',\n changes.commentAdded.comment\n )\n );\n }\n\n if (changes?.statuses?.changes) {\n changes.statuses.changes.forEach((statusChange: any) => {\n if (statusChange.oldStatus && statusChange.newStatus) {\n changeDetails.push(\n dictionary.statusChangedFromTo\n .replace('{oldStatus}', statusChange.oldStatus)\n .replace('{newStatus}', statusChange.newStatus)\n );\n } else if (statusChange.newStatus) {\n changeDetails.push(\n dictionary.statusSetTo.replace(\n '{newStatus}',\n statusChange.newStatus\n )\n );\n }\n });\n }\n\n if (\n changes?.expiration?.newExpiration &&\n changes?.expiration?.oldExpiration\n ) {\n const newDateFormatted = formattedDate(changes.expiration.newExpiration);\n const oldDateFormatted = formattedDate(changes.expiration.oldExpiration);\n changeDetails.push(\n dictionary.expirationChangedFromTo\n .replace('{oldExpiration}', oldDateFormatted)\n .replace('{newExpiration}', newDateFormatted)\n );\n } else if (changes?.expiration?.newExpiration) {\n const newDateFormatted = formattedDate(changes.expiration.newExpiration);\n changeDetails.push(\n dictionary.expirationSetTo.replace('{newExpiration}', newDateFormatted)\n );\n }\n\n if (changes?.total?.newPrice && changes?.total?.oldPrice) {\n const newTotal = `${changes.total.newPrice.currency} ${changes.total.newPrice.value}`;\n const oldTotal = `${changes.total.oldPrice.currency} ${changes.total.oldPrice.value}`;\n changeDetails.push(\n dictionary.totalChangedFromTo\n .replace('{oldTotal}', oldTotal)\n .replace('{newTotal}', newTotal)\n );\n }\n\n if (changes?.customChanges?.title && changes?.customChanges?.old_value && changes?.customChanges?.new_value) {\n changeDetails.push(\n dictionary.customChange\n .replace('{title}', changes.customChanges.title)\n .replace('{oldValue}', changes.customChanges.old_value)\n .replace('{newValue}', changes.customChanges.new_value)\n );\n }\n\n if (changes?.productsRemoved?.productsRemovedFromCatalog && changes.productsRemoved.productsRemovedFromCatalog.length > 0) {\n changeDetails.push(\n dictionary.productsRemovedFromCatalog.replace(\n '{products}',\n changes.productsRemoved.productsRemovedFromCatalog.join(', ')\n )\n );\n }\n\n if (changes?.productsRemoved?.productsRemovedFromQuote && changes.productsRemoved.productsRemovedFromQuote.length > 0) {\n const productNames = changes.productsRemoved.productsRemovedFromQuote.map((product: any) =>\n product.name || product.sku || product.uid\n ).join(', ');\n changeDetails.push(\n dictionary.productsRemovedFromQuote.replace('{products}', productNames)\n );\n }\n\n return changeDetails.length > 0\n ? changeDetails\n : [dictionary.noDetailsAvailable];\n };\n\n // Get item notes outside of history entries\n const getItemNotes = () => {\n const notes: Array<{\n createdAt: string;\n creatorId: number;\n creatorType: number;\n negotiableQuoteItemUid: string;\n note: string;\n noteUid: string;\n type: 'buyer' | 'seller';\n productName: string;\n productSku: string;\n authorName: string;\n }> = [];\n\n const processNotes = (\n noteArray: ItemNote[] | undefined,\n type: 'buyer' | 'seller',\n authorName: string,\n item: QuoteItem\n ) => {\n if (noteArray && Array.isArray(noteArray)) {\n noteArray.forEach((note) => {\n if (note && note.note && note.note.trim()) {\n notes.push({\n ...note,\n type,\n productName: item.product.name,\n productSku: item.product.sku,\n authorName,\n });\n }\n });\n }\n };\n\n if (items) {\n items.forEach((item) => {\n processNotes(\n item.noteFromBuyer,\n 'buyer',\n `${buyer.firstname} ${buyer.lastname} ${dictionary.buyerLabel}`,\n item\n );\n\n processNotes(\n item.noteFromSeller,\n 'seller',\n `${salesRepName} ${dictionary.sellerLabel}`,\n item\n );\n });\n }\n\n return notes;\n };\n\n const itemNotes = getItemNotes();\n\n // Get history entries\n const historyEntries = (history || []).map((entry) => ({\n ...entry,\n entryType: 'history' as const,\n }));\n const noteEntries = itemNotes.map((note) => ({\n ...note,\n entryType: 'note' as const,\n }));\n\n // Combine history and item notes without sorting\n const allEntries = [...historyEntries, ...noteEntries];\n\n return (\n <div\n {...props}\n className={classes(['quote-management-quote-history-log', className])}\n >\n {allEntries.length > 0 ? (\n <div className=\"quote-management-quote-history-log__entries\">\n {allEntries.map((entry, index) => (\n <div\n key={\n entry.entryType === 'history'\n ? entry.uid\n : `${entry.noteUid}-${index}`\n }\n className=\"quote-management-quote-history-log__entry\"\n >\n <div className=\"quote-management-quote-history-log__entry-header\">\n <div className=\"quote-management-quote-history-log__entry-meta\">\n <span className=\"quote-management-quote-history-log__entry-date\">\n {formattedDate(entry.createdAt, 'long')}\n </span>\n <span className=\"quote-management-quote-history-log__entry-author\">\n {entry.entryType === 'history'\n ? `by ${entry.author.firstname} ${entry.author.lastname\n } ${entry.author.firstname === buyer.firstname &&\n entry.author.lastname === buyer.lastname\n ? dictionary.buyerLabel\n : dictionary.sellerLabel\n }`\n : `by ${entry.authorName}`}\n </span>\n </div>\n <div className=\"quote-management-quote-history-log__entry-type\">\n {entry.entryType === 'history'\n ? formatChangeType(entry.changeType)\n : entry.type === 'buyer'\n ? dictionary.buyerNoteAdded\n : dictionary.sellerNoteAdded}\n </div>\n </div>\n <div className=\"quote-management-quote-history-log__entry-changes\">\n {entry.entryType === 'history' ? (\n formatChanges(entry.changes).map((change, changeIndex) => (\n <div\n key={changeIndex}\n className=\"quote-management-quote-history-log__entry-change\"\n >\n {change}\n </div>\n ))\n ) : (\n <div className=\"quote-management-quote-history-log__entry-change\">\n <div>\n {entry.productName}({entry.productSku})\n </div>\n <div>\"{entry.note}\"</div>\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n ) : (\n <div className=\"quote-management-quote-history-log__empty\">\n {dictionary.emptyState}\n </div>\n )}\n {children}\n </div>\n );\n};\n"],"names":["QuoteHistoryLog","className","children","history","items","buyer","salesRepName","props","dictionary","useText","formatChangeType","changeType","l","formatChanges","changes","changeDetails","_a","_b","statusChange","_c","_d","newDateFormatted","formattedDate","oldDateFormatted","_e","_f","_g","newTotal","oldTotal","_h","_i","_j","_k","_l","productNames","product","itemNotes","notes","processNotes","noteArray","type","authorName","item","note","historyEntries","entry","noteEntries","allEntries","jsxs","classes","jsx","index","change","changeIndex"],"mappings":"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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 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 p}from"@dropins/tools/preact-compat.js";import{Q as d}from"./QuoteCommentsList.js";import{events as l}from"@dropins/tools/event-bus.js";import{f as c}from"./dateUtils.js";const C=({templateData:a,...s})=>{var r;const[e,m]=f(a);if(p(()=>{const t=l.on("quote-management/quote-template-data",u=>{m(u.quoteTemplate)},{eager:!0});return()=>t==null?void 0:t.off()},[]),!e)return null;const n=(r=e==null?void 0:e.comments)==null?void 0:r.map(t=>({uid:t.uid,createdAt:o("span",{children:c(t.createdAt,"long")}),author:i("span",{children:[t.author.firstname," ",t.author.lastname]}),text:o("p",{children:t.text})}));return o(d,{"data-testid":"quote-template-comments-list-container",...s,comments:n||[]})};export{C as Q};
|
|
4
|
+
//# sourceMappingURL=QuoteTemplateCommentsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuoteTemplateCommentsList.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.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 { NegotiableQuoteTemplateModel } from '@/quote-management/data/models/negotiable-quote-template-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuoteTemplateCommentsListProps extends HTMLAttributes<HTMLUListElement> {\n templateData?: NegotiableQuoteTemplateModel;\n}\n\nexport const QuoteTemplateCommentsList: Container<QuoteTemplateCommentsListProps> = ({\n templateData: initialData,\n ...props\n}) => {\n const [templateData, setTemplateData] = useState<NegotiableQuoteTemplateModel | undefined>(initialData);\n\n useEffect(() => {\n const templateDataEvent = events.on('quote-management/quote-template-data', (data: { quoteTemplate: NegotiableQuoteTemplateModel }) => {\n setTemplateData(data.quoteTemplate);\n }, { eager: true });\n return () => templateDataEvent?.off();\n }, []);\n\n if (!templateData) {\n return null;\n }\n\n // Format comments data\n const formattedComments = templateData?.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 }));\n\n return (\n <QuoteCommentsListComponent\n data-testid=\"quote-template-comments-list-container\"\n {...props}\n comments={formattedComments || []}\n />\n );\n};\n"],"names":["QuoteTemplateCommentsList","initialData","props","templateData","setTemplateData","useState","useEffect","templateDataEvent","events","data","formattedComments","_a","comment","jsx","QuoteCommentsListComponent"],"mappings":"kRAoBO,MAAMA,EAAuE,CAAC,CACnF,aAAcC,EACd,GAAGC,CACL,IAAM,OACJ,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAmDJ,CAAW,EAStG,GAPAK,EAAU,IAAM,CACd,MAAMC,EAAoBC,EAAO,GAAG,uCAAyCC,GAA0D,CACrIL,EAAgBK,EAAK,aAAa,CACpC,EAAG,CAAE,MAAO,GAAM,EAClB,MAAO,IAAMF,GAAA,YAAAA,EAAmB,KAClC,EAAG,CAAA,CAAE,EAED,CAACJ,EACH,OAAO,KAIT,MAAMO,GAAoBC,EAAAR,GAAA,YAAAA,EAAc,WAAd,YAAAQ,EAAwB,IAAKC,IAAa,CAClE,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,IAAA,CAAK,CAAA,IAGzB,OACEC,EAACC,EAAA,CACC,cAAY,yCACX,GAAGZ,EACJ,SAAUQ,GAAqB,CAAA,CAAC,CAAA,CAGtC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{useState as u,useEffect as i}from"@dropins/tools/preact-compat.js";import{events as p}from"@dropins/tools/event-bus.js";import{Q as n}from"./QuoteHistoryLog.js";const g=({templateData:r,...a})=>{const[e,s]=u(r);return i(()=>{const t=p.on("quote-management/quote-template-data",m=>{s(m.quoteTemplate)},{eager:!0});return()=>t==null?void 0:t.off()},[]),e?o("div",{...a,children:o(n,{history:e.history,items:e.items,buyer:e.buyer,salesRepName:e.salesRepName})}):null};export{g as Q};
|
|
4
|
+
//# sourceMappingURL=QuoteTemplateHistoryLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuoteTemplateHistoryLog.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteTemplateHistoryLog/QuoteTemplateHistoryLog.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 { NegotiableQuoteTemplateModel } from '@/quote-management/data/models/negotiable-quote-template-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { QuoteHistoryLog as QuoteHistoryLogComponent } from '@/quote-management/components/QuoteHistoryLog';\n\nexport interface QuoteTemplateHistoryLogProps extends HTMLAttributes<HTMLDivElement> {\n templateData?: NegotiableQuoteTemplateModel;\n}\n\nexport const QuoteTemplateHistoryLog: Container<QuoteTemplateHistoryLogProps> = ({\n templateData: initialData,\n ...props\n}) => {\n const [templateData, setTemplateData] = useState<NegotiableQuoteTemplateModel | undefined>(initialData);\n\n useEffect(() => {\n const templateDataEvent = events.on('quote-management/quote-template-data', (payload) => {\n setTemplateData(payload.quoteTemplate);\n }, { eager: true });\n\n return () => templateDataEvent?.off();\n }, []);\n\n if (!templateData) {\n return null;\n }\n\n return (\n <div {...props}>\n <QuoteHistoryLogComponent \n history={templateData.history}\n items={templateData.items}\n buyer={templateData.buyer}\n salesRepName={templateData.salesRepName}\n />\n </div>\n );\n};\n"],"names":["QuoteTemplateHistoryLog","initialData","props","templateData","setTemplateData","useState","useEffect","templateDataEvent","events","payload","jsx","QuoteHistoryLogComponent"],"mappings":"mOAmBO,MAAMA,EAAmE,CAAC,CAC/E,aAAcC,EACd,GAAGC,CACL,IAAM,CACJ,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAmDJ,CAAW,EAUtG,OARAK,EAAU,IAAM,CACd,MAAMC,EAAoBC,EAAO,GAAG,uCAAyCC,GAAY,CACvFL,EAAgBK,EAAQ,aAAa,CACvC,EAAG,CAAE,MAAO,GAAM,EAElB,MAAO,IAAMF,GAAA,YAAAA,EAAmB,KAClC,EAAG,CAAA,CAAE,EAEAJ,EAKHO,EAAC,MAAA,CAAK,GAAGR,EACP,SAAAQ,EAACC,EAAA,CACC,QAASR,EAAa,QACtB,MAAOA,EAAa,MACpB,MAAOA,EAAa,MACpB,aAAcA,EAAa,YAAA,CAAA,EAE/B,EAXO,IAaX"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as s,jsxs as p}from"@dropins/tools/preact-jsx-runtime.js";import{useState as y,useEffect as c}from"@dropins/tools/preact-compat.js";import{classes as u}from"@dropins/tools/lib.js";import{Skeleton as h,SkeletonRow as f}from"@dropins/tools/components.js";import{useText as _}from"@dropins/tools/i18n.js";import{events as g}from"@dropins/tools/event-bus.js";const q=({className:t,shippingAddress:e,loading:r,noAddressMessage:n,...d})=>{const o=_({noAddress:"NegotiableQuote.Manage.shippingAddress.noAddress"});return r?s(N,{}):e?p("div",{className:u(["quote-management-shipping-address-display",t]),"data-testid":"shipping-address-display",...d,children:[s("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-name",children:p("span",{className:"quote-management-shipping-address-display__name",children:[e.firstname," ",e.lastname]})}),e.company&&s("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-company",children:e.company}),e.street.map((i,a)=>s("div",{className:"quote-management-shipping-address-display__field","data-testid":`address-street-${a}`,children:i},a)),p("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-city-region",children:[e.city,e.region&&`, ${e.region.label}`," ",e.postcode]}),s("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-country",children:e.country.label}),s("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-telephone",children:e.telephone})]}):s("div",{className:u(["quote-management-shipping-address-display","quote-management-shipping-address-display--empty",t]),"data-testid":"shipping-address-display-empty",...d,children:s("p",{className:"quote-management-shipping-address-display__no-address",children:n||o.noAddress})})},N=()=>s(h,{"data-testid":"shipping-address-display-skeleton",children:s(f,{variant:"row",fullWidth:!0,size:"small",lines:5,multilineGap:"xsmall"})}),j=({quoteData:t,loading:e,...r})=>{var i;const[n,d]=y(t);c(()=>{t!==void 0&&d(t)},[t]),c(()=>{const a=g.on("quote-management/quote-data",l=>{const{quote:m}=l;d(m)},{eager:!0});return()=>a==null?void 0:a.off()},[]),c(()=>{const a=g.on("quote-management/shipping-address-set",l=>{const{quote:m}=l;d(m)},{eager:!0});return()=>a==null?void 0:a.off()},[]);const o=(i=n==null?void 0:n.shippingAddresses)==null?void 0:i[0];return s(q,{shippingAddress:o,loading:e,...r})};export{j as S};
|
|
4
|
+
//# sourceMappingURL=ShippingAddressDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShippingAddressDisplay.js","sources":["/@dropins/storefront-quote-management/src/components/ShippingAddressDisplay/ShippingAddressDisplay.tsx","/@dropins/storefront-quote-management/src/containers/ShippingAddressDisplay/ShippingAddressDisplay.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 } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\nimport { ShippingAddress } from '@/quote-management/data/models/negotiable-quote-model';\nimport '@/quote-management/components/ShippingAddressDisplay/ShippingAddressDisplay.css';\n\nexport interface ShippingAddressDisplayProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n shippingAddress?: ShippingAddress;\n loading?: boolean;\n noAddressMessage?: string;\n}\n\nexport const ShippingAddressDisplay: FunctionComponent<ShippingAddressDisplayProps> = ({\n className,\n shippingAddress,\n loading,\n noAddressMessage,\n ...props\n}) => {\n const dictionary = useText({\n noAddress: 'NegotiableQuote.Manage.shippingAddress.noAddress',\n });\n\n if (loading) {\n return <ShippingAddressDisplaySkeleton />;\n }\n\n if (!shippingAddress) {\n return (\n <div \n className={classes(['quote-management-shipping-address-display', 'quote-management-shipping-address-display--empty', className])}\n data-testid=\"shipping-address-display-empty\"\n {...props}\n >\n <p className=\"quote-management-shipping-address-display__no-address\">\n {noAddressMessage || dictionary.noAddress}\n </p>\n </div>\n );\n }\n\n return (\n <div \n className={classes(['quote-management-shipping-address-display', className])}\n data-testid=\"shipping-address-display\"\n {...props}\n >\n <div className=\"quote-management-shipping-address-display__field\" data-testid=\"address-name\">\n <span className=\"quote-management-shipping-address-display__name\">\n {shippingAddress.firstname} {shippingAddress.lastname}\n </span>\n </div>\n \n {shippingAddress.company && (\n <div className=\"quote-management-shipping-address-display__field\" data-testid=\"address-company\">\n {shippingAddress.company}\n </div>\n )}\n \n {shippingAddress.street.map((line, index) => (\n <div \n key={index} \n className=\"quote-management-shipping-address-display__field\" \n data-testid={`address-street-${index}`}\n >\n {line}\n </div>\n ))}\n \n <div className=\"quote-management-shipping-address-display__field\" data-testid=\"address-city-region\">\n {shippingAddress.city}\n {shippingAddress.region && `, ${shippingAddress.region.label}`}\n {' '}\n {shippingAddress.postcode}\n </div>\n \n <div className=\"quote-management-shipping-address-display__field\" data-testid=\"address-country\">\n {shippingAddress.country.label}\n </div>\n \n <div className=\"quote-management-shipping-address-display__field\" data-testid=\"address-telephone\">\n {shippingAddress.telephone}\n </div>\n </div>\n );\n};\n\nexport const ShippingAddressDisplaySkeleton: FunctionComponent = () => {\n return (\n <Skeleton data-testid=\"shipping-address-display-skeleton\">\n <SkeletonRow variant=\"row\" fullWidth={true} size=\"small\" lines={5} multilineGap='xsmall' />\n </Skeleton>\n );\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 { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { NegotiableQuoteModel } from '@/quote-management/data/models/negotiable-quote-model';\nimport { ShippingAddressDisplay as ShippingAddressDisplayComponent } from '@/quote-management/components/ShippingAddressDisplay';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface ShippingAddressDisplayProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n quoteData?: NegotiableQuoteModel;\n loading?: boolean;\n}\n\nexport const ShippingAddressDisplay: Container<ShippingAddressDisplayProps> = ({\n quoteData: initialQuoteData,\n loading,\n ...props\n}) => {\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(initialQuoteData);\n\n // Sync prop changes to internal state\n useEffect(() => {\n if (initialQuoteData !== undefined) {\n setQuoteData(initialQuoteData);\n }\n }, [initialQuoteData]);\n\n // Listen for quote-data events\n useEffect(() => {\n const quoteDataEvent = events.on('quote-management/quote-data', (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n setQuoteData(quote);\n }, {\n eager: true,\n });\n return () => quoteDataEvent?.off();\n }, []);\n\n // Listen for shipping-address-set events\n useEffect(() => {\n const shippingAddressSetEvent = events.on('quote-management/shipping-address-set', (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n setQuoteData(quote);\n }, {\n eager: true,\n });\n return () => shippingAddressSetEvent?.off();\n }, []);\n\n const primaryShippingAddress = quoteData?.shippingAddresses?.[0];\n\n return (\n <ShippingAddressDisplayComponent\n shippingAddress={primaryShippingAddress}\n loading={loading}\n {...props}\n />\n );\n};\n\n"],"names":["ShippingAddressDisplay","className","shippingAddress","loading","noAddressMessage","props","dictionary","useText","ShippingAddressDisplaySkeleton","jsxs","classes","jsx","line","index","Skeleton","SkeletonRow","initialQuoteData","quoteData","setQuoteData","useState","useEffect","quoteDataEvent","events","data","quote","shippingAddressSetEvent","primaryShippingAddress","_a","ShippingAddressDisplayComponent"],"mappings":"8WAuBO,MAAMA,EAAyE,CAAC,CACrF,UAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,iBAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,UAAW,kDAAA,CACZ,EAED,OAAIJ,IACMK,EAAA,EAA+B,EAGpCN,EAeHO,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,4CAA6CT,CAAS,CAAC,EAC3E,cAAY,2BACX,GAAGI,EAEJ,SAAA,CAAAM,EAAC,MAAA,CAAI,UAAU,mDAAmD,cAAY,eAC5E,SAAAF,EAAC,OAAA,CAAK,UAAU,kDACb,SAAA,CAAAP,EAAgB,UAAU,IAAEA,EAAgB,QAAA,CAAA,CAC/C,CAAA,CACF,EAECA,EAAgB,SACfS,EAAC,MAAA,CAAI,UAAU,mDAAmD,cAAY,kBAC3E,SAAAT,EAAgB,OAAA,CACnB,EAGDA,EAAgB,OAAO,IAAI,CAACU,EAAMC,IACjCF,EAAC,MAAA,CAEC,UAAU,mDACV,cAAa,kBAAkBE,CAAK,GAEnC,SAAAD,CAAA,EAJIC,CAAA,CAMR,EAEDJ,EAAC,MAAA,CAAI,UAAU,mDAAmD,cAAY,sBAC3E,SAAA,CAAAP,EAAgB,KAChBA,EAAgB,QAAU,KAAKA,EAAgB,OAAO,KAAK,GAC3D,IACAA,EAAgB,QAAA,EACnB,EAEAS,EAAC,OAAI,UAAU,mDAAmD,cAAY,kBAC3E,SAAAT,EAAgB,QAAQ,KAAA,CAC3B,IAEC,MAAA,CAAI,UAAU,mDAAmD,cAAY,oBAC3E,WAAgB,SAAA,CACnB,CAAA,CAAA,CAAA,EArDAS,EAAC,MAAA,CACC,UAAWD,EAAQ,CAAC,4CAA6C,mDAAoDT,CAAS,CAAC,EAC/H,cAAY,iCACX,GAAGI,EAEJ,WAAC,IAAA,CAAE,UAAU,wDACV,SAAAD,GAAoBE,EAAW,SAAA,CAClC,CAAA,CAAA,CAiDR,EAEaE,EAAoD,MAE5DM,EAAA,CAAS,cAAY,oCACpB,SAAAH,EAACI,GAAY,QAAQ,MAAM,UAAW,GAAM,KAAK,QAAQ,MAAO,EAAG,aAAa,SAAS,EAC3F,EClFSf,EAAiE,CAAC,CAC7E,UAAWgB,EACX,QAAAb,EACA,GAAGE,CACL,IAAM,OACJ,KAAM,CAACY,EAAWC,CAAY,EAAIC,EAA2CH,CAAgB,EAG7FI,EAAU,IAAM,CACVJ,IAAqB,QACvBE,EAAaF,CAAgB,CAEjC,EAAG,CAACA,CAAgB,CAAC,EAGrBI,EAAU,IAAM,CACd,MAAMC,EAAiBC,EAAO,GAAG,8BAAgCC,GAA0C,CACzG,KAAM,CAAE,MAAAC,GAAUD,EAClBL,EAAaM,CAAK,CACpB,EAAG,CACD,MAAO,EAAA,CACR,EACD,MAAO,IAAMH,GAAA,YAAAA,EAAgB,KAC/B,EAAG,CAAA,CAAE,EAGLD,EAAU,IAAM,CACd,MAAMK,EAA0BH,EAAO,GAAG,wCAA0CC,GAA0C,CAC5H,KAAM,CAAE,MAAAC,GAAUD,EAClBL,EAAaM,CAAK,CACpB,EAAG,CACD,MAAO,EAAA,CACR,EACD,MAAO,IAAMC,GAAA,YAAAA,EAAyB,KACxC,EAAG,CAAA,CAAE,EAEL,MAAMC,GAAyBC,EAAAV,GAAA,YAAAA,EAAW,oBAAX,YAAAU,EAA+B,GAE9D,OACEhB,EAACiB,EAAA,CACC,gBAAiBF,EACjB,QAAAvB,EACC,GAAGE,CAAA,CAAA,CAGV"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as n,jsxs as u}from"@dropins/tools/preact-jsx-runtime.js";import{classes as s,VComponent as _}from"@dropins/tools/lib.js";/* empty css */import{Picker as h}from"@dropins/tools/components.js";import{useState as g,useMemo as q}from"@dropins/tools/preact-compat.js";const x=({className:r,dropdownPlaceholder:m,dropdownOptions:a,dropdownValue:o,handleDropdownChange:d,buttons:e,...l})=>{const b=a&&a.length>0,i=e&&e.length>0,t=(a==null?void 0:a.map(c=>({text:c.label,value:c.value})))||[];return t.unshift({text:m||"",value:""}),n("div",{className:"quote-management-actions-bar__container","data-testid":"actions-bar-container",children:u("div",{className:s(["quote-management-actions-bar",r]),"data-testid":"actions-bar",...l,children:[b&&n(h,{name:"dropdown",id:"dropdown",handleSelect:d,className:"quote-management-actions-bar__dropdown","data-testid":"dropdown",options:t,value:o||""},`actions-bar-picker-${o||"empty"}`),i&&n("div",{className:"quote-management-actions-bar__buttons","data-testid":"buttons-container",children:e==null?void 0:e.map((c,v)=>n(_,{node:c,className:s(["quote-management-actions-bar__button"])},v))})]})})},A=({className:r,tabs:m,tabsContent:a,defaultActiveTab:o,...d})=>{const[e,l]=g(o||Array.from(m.keys())[0]),b=t=>{l(t)},i=q(()=>a.get(e),[e,a]);return u("div",{...d,className:s(["quote-management-tabbed-content",r]),children:[m&&n("div",{"data-testid":"tabbed-content-tabs",className:s(["quote-management-tabbed-content__tabs"]),children:Array.from(m.entries()).map(([t,c])=>n("button",{className:s(["quote-management-tabbed-content__tab",["quote-management-tabbed-content__tab--active",t===e]]),onClick:()=>b(t),children:c},t))}),i&&n("div",{className:s(["quote-management-tabbed-content__active-tab-content"]),children:n(_,{node:i})})]})};export{x as A,A as T};
|
|
4
|
+
//# sourceMappingURL=TabbedContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabbedContent.js","sources":["/@dropins/storefront-quote-management/src/components/ActionsBar/ActionsBar.tsx","/@dropins/storefront-quote-management/src/components/TabbedContent/TabbedContent.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, 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"],"names":["ActionsBar","className","dropdownPlaceholder","dropdownOptions","dropdownValue","handleDropdownChange","buttons","props","hasDropdown","hasButtons","pickerOptions","option","jsx","jsxs","classes","Picker","button","index","VComponent","TabbedContent","tabs","tabsContent","defaultActiveTab","activeTabId","setActiveTabId","useState","handleTabClick","tabId","activeTabContent","useMemo","tabLabel"],"mappings":"kSA0BO,MAAMA,EAAiD,CAAC,CAC7D,UAAAC,EACA,oBAAAC,EACA,gBAAAC,EACA,cAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAcL,GAAmBA,EAAgB,OAAS,EAC1DM,EAAaH,GAAWA,EAAQ,OAAS,EAEzCI,GACJP,GAAA,YAAAA,EAAiB,IAAKQ,IAAY,CAChC,KAAMA,EAAO,MACb,MAAOA,EAAO,KAAA,MACT,CAAA,EACT,OAAAD,EAAc,QAAQ,CACpB,KAAMR,GAAuB,GAC7B,MAAO,EAAA,CACR,EAGCU,EAAC,MAAA,CACC,UAAU,0CACV,cAAY,wBAEZ,SAAAC,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,+BAAgCb,CAAS,CAAC,EAC9D,cAAY,cACX,GAAGM,EAEH,SAAA,CAAAC,GACCI,EAACG,EAAA,CAEC,KAAK,WACL,GAAG,WACH,aAAcV,EACd,UAAU,yCACV,cAAY,WACZ,QAASK,EACT,MAAON,GAAiB,EAAA,EAPnB,sBAAsBA,GAAiB,OAAO,EAAA,EAUtDK,GACCG,EAAC,MAAA,CACC,UAAU,wCACV,cAAY,oBAEX,SAAAN,GAAA,YAAAA,EAAS,IAAI,CAACU,EAAQC,IACrBL,EAACM,EAAA,CACC,KAAMF,EACN,UAAWF,EAAQ,CAAC,sCAAsC,CAAC,CAAA,EACtDG,CAAA,EAER,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CAGN,ECnEaE,EAAuD,CAAC,CACnE,UAAAlB,EACA,KAAAmB,EACA,YAAAC,EACA,iBAAAC,EACA,GAAGf,CACL,IAAM,CACJ,KAAM,CAACgB,EAAaC,CAAc,EAAIC,EACpCH,GAAoB,MAAM,KAAKF,EAAK,KAAA,CAAM,EAAE,CAAC,CAAA,EAGzCM,EAAkBC,GAAkB,CACxCH,EAAeG,CAAK,CACtB,EAEMC,EAAmBC,EAAQ,IACxBR,EAAY,IAAIE,CAAW,EACjC,CAACA,EAAaF,CAAW,CAAC,EAE7B,OACER,EAAC,MAAA,CAAK,GAAGN,EAAO,UAAWO,EAAQ,CAAC,kCAAmCb,CAAS,CAAC,EAC9E,SAAA,CAAAmB,GACCR,EAAC,OAAI,cAAY,sBAAsB,UAAWE,EAAQ,CAAC,uCAAuC,CAAC,EAChG,eAAM,KAAKM,EAAK,SAAS,EAAE,IAAI,CAAC,CAACO,EAAOG,CAAQ,IAC/ClB,EAAC,SAAA,CACC,UACEE,EAAQ,CACN,uCACA,CAAC,+CAAgDa,IAAUJ,CAAW,CAAA,CACvE,EAEH,QAAS,IAAMG,EAAeC,CAAK,EAElC,SAAAG,CAAA,EAHIH,CAAA,CAKR,EACH,EAGAC,KACC,MAAA,CAAI,UAAWd,EAAQ,CAAC,qDAAqD,CAAC,EAC7E,SAAAF,EAACM,EAAA,CACC,KAAMU,CAAA,CAAA,CACR,CACF,CAAA,EAEJ,CAEJ"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 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
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{events as i}from"@dropins/tools/event-bus.js";import{a as m}from"./transform-quote-template.js";import{s as a}from"./state.js";import{N as n}from"./NegotiableQuoteTemplateFragment.js";import{f as T}from"./transform-quote.js";const p=`
|
|
4
|
+
mutation SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION(
|
|
5
|
+
$input: QuoteTemplateLineItemNoteInput!
|
|
6
|
+
) {
|
|
7
|
+
setQuoteTemplateLineItemNote(input: $input) {
|
|
8
|
+
...NegotiableQuoteTemplateFragment
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
${n}
|
|
12
|
+
`,l=async t=>{var r;if(!t.templateId)throw new Error("Template ID is required");if(!t.itemId)throw new Error("Item ID is required");if(!a.authenticated)throw new Error("Unauthorized");try{const e=await T(p,{variables:{input:{templateId:t.templateId,item_id:t.itemId,note:t.note}}});if(!((r=e==null?void 0:e.data)!=null&&r.setQuoteTemplateLineItemNote))throw new Error("No quote template data received");const o=m(e.data.setQuoteTemplateLineItemNote);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:a.permissions}),o}catch(e){return Promise.reject(e)}};export{l as a};
|
|
13
|
+
//# sourceMappingURL=addQuoteTemplateLineItemNote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addQuoteTemplateLineItemNote.js","sources":["/@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 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_id: 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":["SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION","NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT","addQuoteTemplateLineItemNote","params","state","results","fetchGraphQl","_a","transformedData","transformQuoteTemplate","events","error"],"mappings":"wOAWO,MAAMA,EAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQpEC,CAAkC;AAAA,ECEzBC,EAA+B,MAC1CC,GACG,OACH,GAAI,CAACA,EAAO,WACV,MAAM,IAAI,MAAM,yBAAyB,EAG3C,GAAI,CAACA,EAAO,OACV,MAAM,IAAI,MAAM,qBAAqB,EAGvC,GAAI,CAACC,EAAM,cACT,MAAM,IAAI,MAAM,cAAc,EAGhC,GAAI,CACF,MAAMC,EAAe,MAAMC,EACzBN,EACA,CACE,UAAW,CACT,MAAO,CACL,WAAYG,EAAO,WACnB,QAASA,EAAO,OAChB,KAAMA,EAAO,IAAA,CACf,CACF,CACF,EAGF,GAAI,GAACI,EAAAF,GAAA,YAAAA,EAAS,OAAT,MAAAE,EAAe,8BAClB,MAAM,IAAI,MAAM,iCAAiC,EAGnD,MAAMC,EAAkBC,EACtBJ,EAAQ,KAAK,4BAAA,EAGf,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,yCAAyC,EAG3D,OAAAE,EAAO,KAAK,uCAAwC,CAClD,cAAeF,EACf,YAAaJ,EAAM,WAAA,CACpB,EAEMI,CACT,OAASG,EAAO,CACd,OAAO,QAAQ,OAAOA,CAAK,CAC7B,CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{getGlobalLocale as n}from"@dropins/tools/lib.js";function a(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return console.warn("Failed to detect user timezone, falling back to UTC:",e),"UTC"}}function o(e){const t=new Date(e);return!isNaN(t.getTime())}function c(e,t="short"){if(!o(e))return"–";const r=n()||"en-US";return t==="short"?new Date(e).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"}):new Date(e).toLocaleDateString(r,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0})}export{c as f,a as g};
|
|
4
|
+
//# sourceMappingURL=dateUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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 if (type === 'short') {\n return new Date(dateString).toLocaleDateString(locale, {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n });\n }\n\n return new Date(dateString).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"],"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,QAEpC,OAAIF,IAAS,QACJ,IAAI,KAAKH,CAAU,EAAE,mBAAmBI,EAAQ,CACrD,KAAM,UACN,MAAO,UACP,IAAK,SAAA,CACN,EAGI,IAAI,KAAKJ,CAAU,EAAE,mBAAmBI,EAAQ,CACrD,KAAM,UACN,MAAO,OACP,IAAK,UACL,KAAM,UACN,OAAQ,UACR,OAAQ,UACR,OAAQ,EAAA,CACT,CACH"}
|