@dropins/storefront-quote-management 0.0.1-alpha9 → 1.0.0-beta2
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/SearchResultPageInfoFragment.d.ts +10 -0
- package/api/graphql/ShippingMethodFragment.d.ts +10 -0
- package/api/graphql/SortFieldsFragment.d.ts +10 -0
- package/api/index.d.ts +34 -1
- package/api/initialize/initialize.d.ts +2 -0
- package/api/negotiableQuotes/graphql/NegotiableQuotesQuery.d.ts +10 -0
- package/api/negotiableQuotes/index.d.ts +10 -0
- package/api/negotiableQuotes/negotiableQuotes.d.ts +39 -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 +0 -3
- 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 +22 -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 +56 -22
- package/api.js.map +1 -1
- package/chunks/AttachedFilesList.js +4 -0
- package/chunks/AttachedFilesList.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/LineItemNoteModal.js +4 -0
- package/chunks/LineItemNoteModal.js.map +1 -0
- package/chunks/NegotiableQuoteFragment.js +391 -0
- package/chunks/NegotiableQuoteFragment.js.map +1 -0
- package/chunks/NegotiableQuoteTemplateFragment.js +196 -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 +33 -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 +77 -0
- package/chunks/negotiableQuotes.js.map +1 -0
- package/chunks/openQuoteTemplate.js +51 -0
- package/chunks/openQuoteTemplate.js.map +1 -0
- package/chunks/requestNegotiableQuote.js +6 -81
- 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 +19 -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/QuotesListTable/QuotesListTable.d.ts +29 -0
- package/components/QuotesListTable/index.d.ts +11 -0
- package/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.d.ts +30 -0
- package/components/ReferenceDocumentFormModal/index.d.ts +11 -0
- package/components/ReferenceDocumentsList/ReferenceDocumentsList.d.ts +18 -0
- package/components/ReferenceDocumentsList/index.d.ts +11 -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 +30 -0
- 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 +25 -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 +73 -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 +72 -0
- package/containers/QuotesListTable/index.d.ts +11 -0
- package/containers/QuotesListTable.d.ts +3 -0
- package/containers/QuotesListTable.js +4 -0
- package/containers/QuotesListTable.js.map +1 -0
- package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +10 -1
- 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 +22 -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__/negotiableQuotesListModel.d.ts +5 -0
- package/data/models/__fixtures__/storeConfigModel.d.ts +5 -0
- package/data/models/index.d.ts +11 -1
- package/data/models/negotiable-quote-model.d.ts +262 -27
- package/data/models/negotiable-quote-template-model.d.ts +148 -0
- package/data/models/store-config-model.d.ts +27 -0
- package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +665 -2
- package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +1665 -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 +13 -2
- package/data/transforms/transform-store-config.d.ts +4 -0
- package/hooks/useItemsQuotedTemplate.d.ts +16 -0
- package/hooks/useQuoteSummaryData.d.ts +10 -0
- package/hooks/useReferenceDocumentLinks.d.ts +34 -0
- package/hooks/useRemoveTemplateItems.d.ts +25 -0
- package/hooks/useUpdateTemplateQuantities.d.ts +27 -0
- package/i18n/en_US.json.d.ts +419 -1
- 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 -2
- 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,73 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
+
import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
|
|
3
|
+
import { NegotiableQuoteTemplateModel } from '../../data/models/negotiable-quote-template-model';
|
|
4
|
+
import { ReferenceDocument } from '../../components';
|
|
5
|
+
|
|
6
|
+
export interface ManageNegotiableQuoteTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
onActionsButtonClick?: (action: string) => void;
|
|
8
|
+
onSendForReview?: (params: {
|
|
9
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
10
|
+
comment?: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
slots?: {
|
|
13
|
+
TemplateName?: SlotProps<{
|
|
14
|
+
templateName?: string;
|
|
15
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
16
|
+
}>;
|
|
17
|
+
TemplateId?: SlotProps<{
|
|
18
|
+
templateId?: string;
|
|
19
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
20
|
+
}>;
|
|
21
|
+
Banner?: SlotProps<{
|
|
22
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
23
|
+
}>;
|
|
24
|
+
Details?: SlotProps<{
|
|
25
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
26
|
+
}>;
|
|
27
|
+
ActionBar?: SlotProps<{
|
|
28
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
29
|
+
}>;
|
|
30
|
+
ReferenceDocuments?: SlotProps<{
|
|
31
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
32
|
+
referenceDocuments?: ReferenceDocument[];
|
|
33
|
+
isEditable?: boolean;
|
|
34
|
+
onAddDocument?: () => void;
|
|
35
|
+
onEditDocument?: (document: ReferenceDocument) => void;
|
|
36
|
+
onRemoveDocument?: (document: ReferenceDocument) => void;
|
|
37
|
+
referenceDocumentsTitle?: string;
|
|
38
|
+
}>;
|
|
39
|
+
ItemsTable?: SlotProps<{
|
|
40
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
41
|
+
}>;
|
|
42
|
+
ItemsQuotedTab?: SlotProps<{
|
|
43
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
44
|
+
}>;
|
|
45
|
+
CommentsTab?: SlotProps<{
|
|
46
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
47
|
+
}>;
|
|
48
|
+
HistoryLogTab?: SlotProps<{
|
|
49
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
50
|
+
}>;
|
|
51
|
+
CommentsTitle?: SlotProps<{
|
|
52
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
53
|
+
}>;
|
|
54
|
+
Comments?: SlotProps<{
|
|
55
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
56
|
+
}>;
|
|
57
|
+
HistoryLogTitle?: SlotProps<{
|
|
58
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
59
|
+
}>;
|
|
60
|
+
HistoryLog?: SlotProps<{
|
|
61
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
62
|
+
}>;
|
|
63
|
+
Footer?: SlotProps<{
|
|
64
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
65
|
+
comment?: string;
|
|
66
|
+
isSubmitting?: boolean;
|
|
67
|
+
referenceDocuments?: ReferenceDocument[];
|
|
68
|
+
hasUnsavedChanges?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export declare const ManageNegotiableQuoteTemplate: Container<ManageNegotiableQuoteTemplateProps>;
|
|
73
|
+
//# sourceMappingURL=ManageNegotiableQuoteTemplate.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './ManageNegotiableQuoteTemplate';
|
|
10
|
+
export { ManageNegotiableQuoteTemplate as default } from './ManageNegotiableQuoteTemplate';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as a,jsxs as p,Fragment as Ee}from"@dropins/tools/preact-jsx-runtime.js";import{useState as d,useEffect as Y,useCallback as u,useMemo as Q,useRef as ra,createPortal as U}from"@dropins/tools/preact-compat.js";import{classes as g,VComponent as _,Slot as N}from"@dropins/tools/lib.js";import{f as Le}from"../chunks/dateUtils.js";import{events as ia}from"@dropins/tools/event-bus.js";import{Skeleton as ca,SkeletonRow as R,InLineAlert as S,Modal as la,Input as ie,Button as y,TextArea as ma,Icon as K}from"@dropins/tools/components.js";import{N as Se}from"../chunks/transform-quote-template.js";import{A as da,T as sa}from"../chunks/TabbedContent.js";/* empty css */import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import{C as X}from"../chunks/ConfirmationModal.js";/* empty css *//* empty css */import{a as ce,S as ke}from"../chunks/WarningFilled.js";import{useText as le}from"@dropins/tools/i18n.js";import"../chunks/state.js";import{d as ua,c as ga,s as fa,a as pa,o as ba}from"../chunks/openQuoteTemplate.js";import{g as Ma}from"../chunks/generateQuoteFromTemplate.js";import{I as ha}from"../chunks/ItemsQuotedTemplate.js";import{Q as Ta}from"../chunks/QuoteTemplateCommentsList.js";import{Q as Na}from"../chunks/QuoteTemplateHistoryLog.js";import"../chunks/transform-quote.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/NegotiableQuoteTemplateFragment.js";import"../chunks/LineItemNoteModal.js";import"../chunks/addQuoteTemplateLineItemNote.js";import"../chunks/QuoteCommentsList.js";import"../chunks/QuoteHistoryLog.js";const Qa=({className:t,loading:s,templateName:l,templateId:v,banner:e,details:h,actionBar:q,referenceDocuments:c,itemsTable:m,commentsTitle:T,comments:r,footer:b,...k})=>s?a(va,{}):p("div",{...k,className:g(["quote-management-manage-negotiable-quote-template",t]),children:[p("div",{className:g(["quote-management-manage-negotiable-quote-template__header"]),children:[l&&a(_,{node:l,className:g(["quote-management-manage-negotiable-quote-template__template-name"])}),v&&a(_,{node:v,className:g(["quote-management-manage-negotiable-quote-template__template-id"])})]}),e&&a(_,{node:e,className:g(["quote-management-manage-negotiable-quote-template__banner"])}),h&&a(_,{node:h,className:g(["quote-management-manage-negotiable-quote-template__details"])}),q&&a(_,{node:q,className:g(["quote-management-manage-negotiable-quote-template__action-bar"])}),c&&a("div",{"data-testid":"reference-documents-container",className:g(["quote-management-manage-negotiable-quote-template__reference-documents-container"]),children:a(_,{node:c,className:g(["quote-management-manage-negotiable-quote-template__reference-documents"])})}),m&&a(_,{node:m,className:g(["quote-management-manage-negotiable-quote-template__items-table"])}),p("div",{"data-testid":"comments-container",className:g(["quote-management-manage-negotiable-quote-template__comments-container"]),children:[T&&a(_,{node:T,className:g(["quote-management-manage-negotiable-quote-template__comments-title"])}),r&&a(_,{node:r,className:g(["quote-management-manage-negotiable-quote-template__comments"])})]}),b&&a(_,{node:b,className:g(["quote-management-manage-negotiable-quote-template__footer"])})]}),va=()=>p(ca,{"data-testid":"manage-negotiable-quote-template-skeleton",children:[a(R,{variant:"heading",fullWidth:!0,size:"large"}),a(R,{variant:"row",fullWidth:!1,size:"small"}),a(R,{variant:"row",fullWidth:!1,size:"small"}),a(R,{variant:"row",fullWidth:!0}),a(R,{variant:"row",fullWidth:!0,size:"xlarge",lines:2}),a(R,{variant:"row",fullWidth:!1,size:"small"})]}),Ca=({className:t,open:s,document:l,errorMessage:v,errorBanner:e,successBanner:h,showCloseButton:q=!0,isSubmitting:c=!1,onSave:m,onClose:T})=>{const[r,b]=d(""),[k,E]=d(""),[w,L]=d(""),[D,C]=d({}),M=le({title:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.title",documentNameLabel:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentNameLabel",documentIdentifierLabel:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentIdentifierLabel",referenceUrlLabel:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.referenceUrlLabel",addButton:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.addButton",updateButton:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.updateButton",cancelButton:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.cancelButton",documentNameRequired:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentNameRequired",referenceUrlRequired:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.referenceUrlRequired",invalidUrl:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.invalidUrl",errorHeading:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.errorHeading"}),B=e||(v?a(S,{type:"error",variant:"primary",icon:a(ce,{}),heading:M.errorHeading,description:v,"data-testid":"reference-document-form-modal-error-banner-inline"}):null),A=!!l;Y(()=>{s&&(l?(b(l.name||""),E(l.identifier||""),L(l.url||"")):(b(""),E(""),L("")),C({}))},[s,l]);const F=u(f=>{if(!f.trim())return!1;try{return new URL(f),!0}catch{return!1}},[]),Z=u(()=>{const f={};if(r.trim()||(f.documentName=M.documentNameRequired),w.trim()?F(w.trim())||(f.referenceUrl=M.invalidUrl):f.referenceUrl=M.referenceUrlRequired,Object.keys(f).length>0){C(f);return}m({uid:l==null?void 0:l.uid,name:r.trim(),identifier:k.trim()||void 0,url:w.trim()})},[r,k,w,l,M,F,m]),I=u(()=>{b(""),E(""),L(""),C({}),T==null||T()},[T]);return s?p(la,{open:s,size:"medium",title:a(Ee,{children:M.title}),onClose:I,clickToDismiss:!0,escapeToDismiss:!0,showCloseButton:q,className:g(["quote-management-reference-document-form-modal",t]),"data-testid":"reference-document-form-modal",children:[B&&a("div",{className:g(["quote-management-reference-document-form-modal__error-banner"]),"data-testid":"reference-document-form-modal-error-banner",children:B}),h&&a("div",{className:g(["quote-management-reference-document-form-modal__success-banner"]),"data-testid":"reference-document-form-modal-success-banner",children:h}),p("div",{className:g(["quote-management-reference-document-form-modal__content"]),children:[p("div",{children:[a(ie,{name:"documentName",type:"text",value:r,onInput:f=>{b(f.target.value),C({...D,documentName:void 0})},floatingLabel:M.documentNameLabel,required:!0,error:!!D.documentName,disabled:c,"data-testid":"reference-document-name-input"}),D.documentName&&a("span",{className:g(["quote-management-reference-document-form-modal__error-text"]),"data-testid":"reference-document-name-error",children:D.documentName})]}),a("div",{children:a(ie,{name:"documentIdentifier",type:"text",value:k,onInput:f=>{E(f.target.value)},floatingLabel:M.documentIdentifierLabel,disabled:c,"data-testid":"reference-document-identifier-input"})}),p("div",{children:[a(ie,{name:"referenceUrl",type:"url",value:w,onInput:f=>{L(f.target.value),C({...D,referenceUrl:void 0})},floatingLabel:M.referenceUrlLabel,required:!0,error:!!D.referenceUrl,disabled:c,"data-testid":"reference-document-url-input"}),D.referenceUrl&&a("span",{className:g(["quote-management-reference-document-form-modal__error-text"]),"data-testid":"reference-document-url-error",children:D.referenceUrl})]})]}),p("div",{className:g(["quote-management-reference-document-form-modal__actions"]),children:[a(y,{variant:"secondary",size:"medium",onClick:I,disabled:c,className:g(["quote-management-reference-document-form-modal__cancel-button"]),"data-testid":"reference-document-form-cancel-button",children:M.cancelButton}),a(y,{variant:"primary",size:"medium",onClick:Z,disabled:c,className:g(["quote-management-reference-document-form-modal__save-button"]),"data-testid":"reference-document-form-save-button",children:A?M.updateButton:M.addButton})]})]}):null},qa=({className:t,documents:s,isEditable:l=!1,onAdd:v,onEdit:e,onRemove:h,...q})=>{const c=le({add:"NegotiableQuoteTemplate.Manage.referenceDocuments.add",edit:"NegotiableQuoteTemplate.Manage.referenceDocuments.edit",remove:"NegotiableQuoteTemplate.Manage.referenceDocuments.remove",noReferenceDocuments:"NegotiableQuoteTemplate.Manage.referenceDocuments.noReferenceDocuments"}),m=r=>r.identifier?`${r.name}, ${r.identifier}`:`${r.name} ${r.url}`,T=(r,b)=>{r.preventDefault(),window.open(b,"_blank","noopener,noreferrer")};return a("div",{className:g(["quote-management-reference-documents-list",t]),"data-testid":"reference-documents-list",...q,children:p("div",{className:"quote-management-reference-documents-list__content",children:[s.map(r=>p("div",{className:"quote-management-reference-documents-list__document","data-testid":`reference-document-${r.uid||r.url}`,children:[a("a",{href:r.url,onClick:b=>T(b,r.url),className:"quote-management-reference-documents-list__document-link",target:"_blank",rel:"noopener noreferrer","data-testid":`reference-document-link-${r.uid||r.url}`,children:m(r)}),l&&p("div",{className:"quote-management-reference-documents-list__document-actions",children:[a(y,{variant:"tertiary",onClick:()=>e==null?void 0:e(r),className:"quote-management-reference-documents-list__edit-button","data-testid":`reference-document-edit-${r.uid||r.url}`,children:c.edit}),a("span",{className:"quote-management-reference-documents-list__separator",children:"|"}),a(y,{variant:"tertiary",onClick:()=>h==null?void 0:h(r),className:"quote-management-reference-documents-list__remove-button","data-testid":`reference-document-remove-${r.uid||r.url}`,children:c.remove})]})]},r.uid||r.url)),l&&p(y,{variant:"tertiary",onClick:v,className:"quote-management-reference-documents-list__add-button","data-testid":"reference-documents-add-button",children:["+ ",c.add]}),s.length===0&&!l&&a("div",{className:"quote-management-reference-documents-list__empty",children:c.noReferenceDocuments})]})})},Da=t=>{const{templateReferenceDocuments:s,localReferenceDocuments:l}=t,v=u(c=>s?s.some(m=>c.uid&&m.uid?m.uid===c.uid:m.url===c.url):!1,[s]),e=u(()=>s?l.filter(c=>!s.some(m=>c.uid&&m.uid?m.uid===c.uid:m.url===c.url)):l,[s,l]),h=u(()=>l.map(c=>({uid:c.uid,name:c.name,identifier:c.identifier,url:c.url})),[l]),q=Q(()=>s?l.some(c=>!s.some(m=>c.uid&&m.uid?m.uid===c.uid:m.url===c.url)):l.length>0,[s,l]);return{isDocumentInTemplateData:v,getNewDocuments:e,getReferenceDocumentLinks:h,hasUnsavedChanges:q}},nt=({slots:t,onActionsButtonClick:s,onSendForReview:l,...v})=>{const[e,h]=d(void 0),[q,c]=d(!0),[m,T]=d(""),[r,b]=d(!1),[k,E]=d(!1),[w,L]=d(null),[D,C]=d(!1),[M,B]=d(!1),[A,F]=d(null),[Z,I]=d(!1),[f,H]=d([]),[me,W]=d(!1),[O,G]=d(void 0),[we,$]=d(null),[de,se]=d(!1),[ue,ge]=d(!1),[fe,z]=d(""),[pe,P]=d(""),[be,Me]=d(!1),[he,Te]=d(!1),[Ne,j]=d(""),[Qe,V]=d(""),ve=ra(!1),{getReferenceDocumentLinks:Ce,hasUnsavedChanges:ee}=Da({templateReferenceDocuments:e==null?void 0:e.referenceDocuments,localReferenceDocuments:f}),n=le({createdLabel:"NegotiableQuoteTemplate.Manage.createdLabel",salesRepLabel:"NegotiableQuoteTemplate.Manage.salesRepLabel",expiresLabel:"NegotiableQuoteTemplate.Manage.expiresLabel",actionsLabel:"NegotiableQuoteTemplate.Manage.actionsLabel",referenceDocumentsTitle:"NegotiableQuoteTemplate.Manage.referenceDocuments.title",commentsTitle:"NegotiableQuoteTemplate.Manage.comments.title",historyLogTitle:"NegotiableQuoteTemplate.Manage.historyLog.title",itemsQuotedTab:"NegotiableQuoteTemplate.Manage.tabs.itemsQuoted",commentsTab:"NegotiableQuoteTemplate.Manage.tabs.comments",historyLogTab:"NegotiableQuoteTemplate.Manage.tabs.historyLog",templateCommentsPlaceholder:"NegotiableQuoteTemplate.Manage.templateComments.placeholder",sendForReview:"NegotiableQuoteTemplate.Manage.actionButtons.sendForReview",delete:"NegotiableQuoteTemplate.Manage.actionButtons.delete",cancel:"NegotiableQuoteTemplate.Manage.actionButtons.cancel",confirmationModalDeleteTitle:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.title",confirmationModalDeleteMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.message",confirmationModalDeleteConfirm:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.confirm",confirmationModalDeleteErrorHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.errorHeading",confirmationModalDeleteErrorFallback:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.errorFallback",confirmationModalDeleteSuccessHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.successHeading",confirmationModalDeleteSuccessDescription:"NegotiableQuoteTemplate.Manage.confirmationModal.delete.successDescription",confirmationModalCancelTitle:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.title",confirmationModalCancelMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.message",confirmationModalCancelConfirm:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.confirm",confirmationModalCancelErrorHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.errorHeading",confirmationModalCancelErrorFallback:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.errorFallback",confirmationModalCancelSuccessHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.successHeading",confirmationModalCancelSuccessDescription:"NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.successDescription",confirmationModalCancel:"NegotiableQuoteTemplate.Manage.confirmationModal.cancel",accept:"NegotiableQuoteTemplate.Manage.actionButtons.accept",generateQuote:"NegotiableQuoteTemplate.Manage.actionButtons.generateQuote",generateQuoteModalTitle:"NegotiableQuoteTemplate.Manage.actionButtons.generateQuote",generateQuoteModalMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.message",generateQuoteModalCancel:"NegotiableQuoteTemplate.Manage.confirmationModal.cancel",generateQuoteModalConfirm:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirm",generateQuoteModalConfirmLoading:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirmLoading",generateQuoteModalSuccessHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.successHeading",generateQuoteSuccessMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.successDescription",generateQuoteModalErrorHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.errorHeading",generateQuoteErrorFallback:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.errorFallback",acceptModalTitle:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.title",acceptModalMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.message",acceptModalCancel:"NegotiableQuoteTemplate.Manage.confirmationModal.cancel",acceptModalConfirm:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.confirm",acceptModalConfirmLoading:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.confirmLoading",acceptModalSuccessHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.successHeading",acceptSuccessMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.successDescription",acceptModalErrorHeading:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.errorHeading",acceptErrorFallback:"NegotiableQuoteTemplate.Manage.confirmationModal.accept.errorFallback",documentDuplicateUidError:"NegotiableQuoteTemplate.Manage.referenceDocuments.form.duplicateUidError"});Y(()=>{const o=ia.on("quote-management/quote-template-data",i=>{i.quoteTemplate&&(h(i.quoteTemplate),c(!1),T(""),b(!1),H(i.quoteTemplate.referenceDocuments||[]))},{eager:!0});return()=>o==null?void 0:o.off()},[]),Y(()=>{e!=null&&e.referenceDocuments&&H(e.referenceDocuments)},[e==null?void 0:e.referenceDocuments]),Y(()=>{e&&e.status===Se.UPDATED&&!ve.current&&(ve.current=!0,(async()=>{try{await ba({templateId:e.id})}catch(i){console.error("Failed to auto-open quote template:",i)}})())},[e]);const Ie=u(()=>{E(!1),L(null),C(!1)},[]),Fe=u(async()=>{if(e!=null&&e.id){L(null),C(!1);try{await ua({templateId:e.id}),C(!0),setTimeout(()=>{E(!1),C(!1)},2e3)}catch(o){const i=o.message||n.confirmationModalDeleteErrorFallback;L(i)}}},[e,n.confirmationModalDeleteErrorFallback]),Be=u(()=>{L(null)},[]),Re=u(()=>{C(!1)},[]),He=u(()=>{B(!1),F(null),I(!1)},[]),xe=u(async()=>{if(e!=null&&e.id){F(null),I(!1);try{await ga({templateId:e.id}),I(!0),setTimeout(()=>{B(!1),I(!1)},2e3)}catch(o){const i=o.message||n.confirmationModalCancelErrorFallback;F(i)}}},[e,n.confirmationModalCancelErrorFallback]),Ue=u(()=>{F(null)},[]),Ae=u(()=>{I(!1)},[]),qe=u(async()=>{const o=Ce();if(l){l({templateData:e,comment:m.trim()||void 0});return}b(!0);try{await fa({templateId:e.id,comment:m.trim()||void 0,referenceDocumentLinks:o.length>0?o:void 0})}catch(i){console.error("Failed to send quote template for review:",i),b(!1)}},[e,l,m,Ce]),ae=u(()=>{G(void 0),$(null),W(!0)},[]),te=u(o=>{G(o),$(null),W(!0)},[]),ne=u(o=>{H(i=>i.filter(x=>x.uid!==o.uid||x.url!==o.url))},[]),We=u(o=>{$(null),H(O?i=>i.map(x=>x.identifier===O.identifier?o:x):i=>[...i,o]),W(!1),G(void 0)},[O]),Oe=u(()=>{W(!1),G(void 0),$(null)},[]),Ge=u(async()=>{ge(!0),P(""),z("");try{await Ma({templateId:e.id}),z(n.generateQuoteSuccessMessage)}catch(o){console.error("Failed to generate quote from template:",o);const i=o instanceof Error?o.message:n.generateQuoteErrorFallback;P(i)}finally{ge(!1)}},[e,n.generateQuoteSuccessMessage,n.generateQuoteErrorFallback]),$e=u(()=>{se(!1),P(""),z("")},[]),ze=u(async()=>{Te(!0),V(""),j("");try{await pa({templateId:e.id}),j(n.acceptSuccessMessage)}catch(o){console.error("Failed to accept quote template:",o);const i=o instanceof Error?o.message:n.acceptErrorFallback;V(i)}finally{Te(!1)}},[e,n.acceptSuccessMessage,n.acceptErrorFallback]),Pe=u(()=>{Me(!1),V(""),j("")},[]),je=Q(()=>a(N,{name:"TemplateName",slot:t==null?void 0:t.TemplateName,context:{templateName:e==null?void 0:e.name,templateData:e},children:a("h1",{"data-testid":"template-name",children:e==null?void 0:e.name})}),[t==null?void 0:t.TemplateName,e]),Ve=Q(()=>a(N,{name:"TemplateId",slot:t==null?void 0:t.TemplateId,context:{templateId:e==null?void 0:e.uid,templateData:e},children:p("div",{"data-testid":"template-id",children:["Template #",e==null?void 0:e.uid]})}),[t==null?void 0:t.TemplateId,e]),Je=Q(()=>{if(!e)return;const o=e.expirationDate?Le(e.expirationDate,"short"):void 0;return p(N,{name:"Details",slot:t==null?void 0:t.Details,context:{templateData:e},children:[p("div",{className:"quote-management-manage-negotiable-quote-template__detail",children:[a("span",{className:"quote-management-manage-negotiable-quote-template__detail-title","data-testid":"created-label",children:n.createdLabel}),p("span",{className:"quote-management-manage-negotiable-quote-template__detail-content","data-testid":"created-value",children:[Le(e.createdAt,"short")," (",e.buyer.firstname," ",e.buyer.lastname,")"]})]}),p("div",{className:"quote-management-manage-negotiable-quote-template__detail",children:[a("span",{className:"quote-management-manage-negotiable-quote-template__detail-title","data-testid":"sales-rep-label",children:n.salesRepLabel}),a("span",{className:"quote-management-manage-negotiable-quote-template__detail-content","data-testid":"sales-rep-value",children:e.salesRepName})]}),o&&p("div",{className:"quote-management-manage-negotiable-quote-template__detail",children:[a("span",{className:"quote-management-manage-negotiable-quote-template__detail-title","data-testid":"expires-label",children:n.expiresLabel}),a("span",{className:"quote-management-manage-negotiable-quote-template__detail-content","data-testid":"expires-value",children:o})]})]})},[t==null?void 0:t.Details,n,e]),De=Q(()=>[{label:n.generateQuote,value:"generateQuote",disabled:!(e!=null&&e.canGenerateQuoteFromTemplate)}],[n,e==null?void 0:e.canGenerateQuoteFromTemplate]),Ke=Q(()=>{const o=i=>{switch(i){case"generateQuote":se(!0),P(""),z(""),s==null||s(i);break}};return a(N,{name:"ActionBar",slot:t==null?void 0:t.ActionBar,context:{templateData:e},children:a(da,{dropdownPlaceholder:n.actionsLabel,dropdownOptions:[],buttons:De.map(i=>a(y,{variant:"tertiary",onClick:()=>o(i.value),"data-testid":`actions-bar-${i.value}-button`,"data-action":i.value,disabled:i.disabled,children:i.label},i.value))})})},[De,n,t==null?void 0:t.ActionBar,e,s]),J=Q(()=>{const o=e==null?void 0:e.status;return o==="Draft"||o==="Open"},[e==null?void 0:e.status]),Xe=Q(()=>{const o=f.length>0||J,i=o?n.referenceDocumentsTitle:void 0;return a(N,{name:"ReferenceDocuments",slot:t==null?void 0:t.ReferenceDocuments,context:{templateData:e,referenceDocuments:f,isEditable:J,onAddDocument:ae,onEditDocument:te,onRemoveDocument:ne,referenceDocumentsTitle:n.referenceDocumentsTitle},children:p("div",{"data-testid":"reference-documents",children:[o&&a("h2",{children:i}),a(qa,{documents:f,isEditable:J,onAdd:ae,onEdit:te,onRemove:ne})]})})},[t==null?void 0:t.ReferenceDocuments,n,e,f,J,ae,te,ne]),Ye=Q(()=>a(N,{name:"ItemsTable",slot:t==null?void 0:t.ItemsTable,context:{templateData:e},children:a(sa,{tabs:new Map([["items-quoted",n.itemsQuotedTab],["comments",n.commentsTab],["history-log",n.historyLogTab]]),tabsContent:new Map([["items-quoted",a(N,{name:"ItemsQuotedTab",slot:t==null?void 0:t.ItemsQuotedTab,context:{templateData:e},children:a(ha,{templateData:e})},"items-quoted")],["comments",a(N,{name:"CommentsTab",slot:t==null?void 0:t.CommentsTab,context:{templateData:e},children:a(Ta,{templateData:e})},"comments")],["history-log",a(N,{name:"HistoryLogTab",slot:t==null?void 0:t.HistoryLogTab,context:{templateData:e},children:a(Na,{templateData:e})},"history-log")]])})}),[t==null?void 0:t.ItemsTable,t==null?void 0:t.ItemsQuotedTab,t==null?void 0:t.CommentsTab,t==null?void 0:t.HistoryLogTab,n,e]),Ze=Q(()=>a(N,{name:"CommentsTitle",slot:t==null?void 0:t.CommentsTitle,context:{templateData:e},children:a("h2",{children:n.commentsTitle})}),[t==null?void 0:t.CommentsTitle,n,e]),ea=Q(()=>a(N,{name:"Comments",slot:t==null?void 0:t.Comments,context:{templateData:e},children:a(ma,{name:"templateComments",placeholder:n.templateCommentsPlaceholder,rows:3,value:m,onInput:o=>{T(o.target.value)},disabled:!(e!=null&&e.canSendForReview)||r})}),[t==null?void 0:t.Comments,n,e,m,r]),aa=Q(()=>{const o=(e==null?void 0:e.status)===Se.OPEN&&(e==null?void 0:e.canAccept);return p(N,{name:"Footer",slot:t==null?void 0:t.Footer,context:{templateData:e,comment:m,isSubmitting:r,referenceDocuments:f,hasUnsavedChanges:ee},children:[o&&a(y,{variant:"primary",onClick:()=>{Me(!0),V(""),j("")},"data-testid":"accept-button",disabled:r||ee,children:n.accept}),(e==null?void 0:e.canSendForReview)&&a(y,{variant:"primary",onClick:qe,"data-testid":"send-for-review-button",disabled:r,children:n.sendForReview}),(e==null?void 0:e.canCancel)&&a(y,{variant:"tertiary",onClick:()=>B(!0),"data-testid":"cancel-template-button",disabled:r,children:n.cancel}),(e==null?void 0:e.canDelete)&&a(y,{variant:"tertiary",onClick:()=>E(!0),"data-testid":"delete-template-button",disabled:r,children:n.delete})]})},[t==null?void 0:t.Footer,n,e,m,r,qe,f,ee]),ta=w?a(S,{type:"error",variant:"primary",icon:a(ce,{}),heading:n.confirmationModalDeleteErrorHeading,description:w,onDismiss:Be,"data-testid":"confirmation-modal-error-banner"}):null,_e=(D?a(S,{type:"success",variant:"primary",icon:a(ke,{}),heading:n.confirmationModalDeleteSuccessHeading,description:n.confirmationModalDeleteSuccessDescription,onDismiss:Re,"data-testid":"confirmation-modal-success-banner"}):null)||ta,na=A?a(S,{type:"error",variant:"primary",icon:a(ce,{}),heading:n.confirmationModalCancelErrorHeading,description:A,onDismiss:Ue,"data-testid":"confirmation-modal-cancel-error-banner"}):null,ye=(Z?a(S,{type:"success",variant:"primary",icon:a(ke,{}),heading:n.confirmationModalCancelSuccessHeading,description:n.confirmationModalCancelSuccessDescription,onDismiss:Ae,"data-testid":"confirmation-modal-cancel-success-banner"}):null)||na,oa={...v,loading:q,templateName:je,templateId:Ve,details:Je,actionBar:Ke,referenceDocuments:Xe,itemsTable:Ye,commentsTitle:Ze,comments:ea,footer:aa};let oe=null;fe?oe=a(S,{type:"success",variant:"primary",icon:a(K,{source:"CheckWithCircle"}),heading:n.generateQuoteModalSuccessHeading,description:fe,"data-testid":"generate-quote-success-banner"}):pe&&(oe=a(S,{type:"error",variant:"primary",icon:a(K,{source:"WarningFilled"}),heading:n.generateQuoteModalErrorHeading,description:pe,"data-testid":"generate-quote-error-banner"}));let re=null;return Ne?re=a(S,{type:"success",variant:"primary",icon:a(K,{source:"CheckWithCircle"}),heading:n.acceptModalSuccessHeading,description:Ne,"data-testid":"accept-success-banner"}):Qe&&(re=a(S,{type:"error",variant:"primary",icon:a(K,{source:"WarningFilled"}),heading:n.acceptModalErrorHeading,description:Qe,"data-testid":"accept-error-banner"})),p(Ee,{children:[a(Qa,{...oa}),k&&U(a(X,{open:k,title:n.confirmationModalDeleteTitle,message:n.confirmationModalDeleteMessage,cancelLabel:n.confirmationModalCancel,confirmLabel:n.confirmationModalDeleteConfirm,onCancel:Ie,onConfirm:Fe,showCloseButton:!_e,confirmationBanner:_e}),document.body),M&&U(a(X,{open:M,title:n.confirmationModalCancelTitle,message:n.confirmationModalCancelMessage,cancelLabel:n.confirmationModalCancel,confirmLabel:n.confirmationModalCancelConfirm,onCancel:He,onConfirm:xe,showCloseButton:!ye,confirmationBanner:ye}),document.body),me&&U(a(Ca,{open:me,document:O,errorMessage:we||void 0,onSave:We,onClose:Oe,isSubmitting:r}),document.body),de&&U(a(X,{open:de,title:n.generateQuoteModalTitle,message:n.generateQuoteModalMessage,cancelLabel:n.generateQuoteModalCancel,confirmLabel:ue?n.generateQuoteModalConfirmLoading:n.generateQuoteModalConfirm,onCancel:$e,onConfirm:ue?void 0:Ge,showCloseButton:!0,confirmationBanner:oe,"data-testid":"generate-quote-confirmation-modal"}),document.body),be&&U(a(X,{open:be,title:n.acceptModalTitle,message:n.acceptModalMessage,cancelLabel:n.acceptModalCancel,confirmLabel:he?n.acceptModalConfirmLoading:n.acceptModalConfirm,onCancel:Pe,onConfirm:he?void 0:ze,showCloseButton:!0,confirmationBanner:re,"data-testid":"accept-confirmation-modal"}),document.body)]})};export{nt as ManageNegotiableQuoteTemplate,nt as default};
|
|
4
|
+
//# sourceMappingURL=ManageNegotiableQuoteTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageNegotiableQuoteTemplate.js","sources":["/@dropins/storefront-quote-management/src/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.tsx","/@dropins/storefront-quote-management/src/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.tsx","/@dropins/storefront-quote-management/src/components/ReferenceDocumentsList/ReferenceDocumentsList.tsx","/@dropins/storefront-quote-management/src/hooks/useReferenceDocumentLinks.ts","/@dropins/storefront-quote-management/src/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.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 { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nimport '@/quote-management/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.css';\n\nexport interface ManageNegotiableQuoteTemplateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n loading?: boolean;\n templateName: VNode;\n templateId: VNode;\n banner?: VNode;\n details?: VNode;\n actionBar?: VNode;\n referenceDocuments?: VNode;\n itemsTable: VNode;\n commentsTitle: VNode;\n comments: VNode;\n footer?: VNode;\n}\n\nexport const ManageNegotiableQuoteTemplate: FunctionComponent<ManageNegotiableQuoteTemplateProps> = ({\n className,\n loading,\n templateName,\n templateId,\n banner,\n details,\n actionBar,\n referenceDocuments,\n itemsTable,\n commentsTitle,\n comments,\n footer,\n ...props\n}) => {\n if (loading) {\n return <ManageNegotiableQuoteTemplateSkeleton />;\n }\n\n return (\n <div {...props} className={classes(['quote-management-manage-negotiable-quote-template', className])}>\n <div className={classes(['quote-management-manage-negotiable-quote-template__header'])}>\n {templateName &&\n <VComponent\n node={templateName}\n className={classes(['quote-management-manage-negotiable-quote-template__template-name'])}\n />\n }\n {templateId &&\n <VComponent\n node={templateId}\n className={classes(['quote-management-manage-negotiable-quote-template__template-id'])}\n />\n }\n </div>\n {banner &&\n <VComponent\n node={banner}\n className={classes(['quote-management-manage-negotiable-quote-template__banner'])}\n />\n }\n {details &&\n <VComponent\n node={details}\n className={classes(['quote-management-manage-negotiable-quote-template__details'])}\n />\n }\n {actionBar &&\n <VComponent\n node={actionBar}\n className={classes(['quote-management-manage-negotiable-quote-template__action-bar'])}\n />\n }\n {referenceDocuments &&\n <div data-testid=\"reference-documents-container\" className={classes(['quote-management-manage-negotiable-quote-template__reference-documents-container'])}>\n <VComponent\n node={referenceDocuments}\n className={classes(['quote-management-manage-negotiable-quote-template__reference-documents'])}\n />\n </div>\n }\n {itemsTable &&\n <VComponent\n node={itemsTable}\n className={classes(['quote-management-manage-negotiable-quote-template__items-table'])}\n />\n }\n <div data-testid=\"comments-container\" className={classes(['quote-management-manage-negotiable-quote-template__comments-container'])}>\n {commentsTitle &&\n <VComponent\n node={commentsTitle}\n className={classes(['quote-management-manage-negotiable-quote-template__comments-title'])}\n />\n }\n {comments &&\n <VComponent\n node={comments}\n className={classes(['quote-management-manage-negotiable-quote-template__comments'])}\n />\n }\n </div>\n {footer &&\n <VComponent\n node={footer}\n className={classes(['quote-management-manage-negotiable-quote-template__footer'])}\n />\n }\n </div>\n );\n};\n\nexport const ManageNegotiableQuoteTemplateSkeleton: FunctionComponent = () => {\n return (\n <Skeleton data-testid=\"manage-negotiable-quote-template-skeleton\">\n <SkeletonRow variant=\"heading\" fullWidth={true} size=\"large\" />\n <SkeletonRow variant=\"row\" fullWidth={false} size=\"small\" />\n <SkeletonRow variant=\"row\" fullWidth={false} size=\"small\" />\n <SkeletonRow variant=\"row\" fullWidth={true} />\n <SkeletonRow variant=\"row\" fullWidth={true} size=\"xlarge\" lines={2} />\n <SkeletonRow variant=\"row\" fullWidth={false} size=\"small\" />\n </Skeleton>\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, useCallback, useEffect, useState, HTMLAttributes } from 'preact/compat';\nimport { VNode } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, Input, Modal, InLineAlert } from '@adobe-commerce/elsie/components';\nimport { WarningFilled } from '@adobe-commerce/elsie/icons';\nimport '@/quote-management/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.css';\n\nexport interface ReferenceDocument {\n uid?: string;\n name: string;\n identifier?: string;\n url: string;\n}\n\nexport interface ReferenceDocumentFormModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n open: boolean;\n document?: ReferenceDocument;\n /**\n * Optional error message string. If provided, automatically creates an InLineAlert error banner.\n * If both errorMessage and errorBanner are provided, errorBanner takes precedence.\n */\n errorMessage?: string;\n /**\n * Optional custom error banner VNode. Provides full control over error banner rendering.\n * If both errorMessage and errorBanner are provided, errorBanner takes precedence.\n */\n errorBanner?: VNode;\n successBanner?: VNode;\n showCloseButton?: boolean;\n isSubmitting?: boolean;\n onSave: (document: ReferenceDocument) => void;\n onClose?: () => void;\n}\n\nexport const ReferenceDocumentFormModal: FunctionComponent<ReferenceDocumentFormModalProps> = ({\n className,\n open,\n document,\n errorMessage,\n errorBanner,\n successBanner,\n showCloseButton = true,\n isSubmitting = false,\n onSave,\n onClose,\n}) => {\n const [documentName, setDocumentName] = useState('');\n const [documentIdentifier, setDocumentIdentifier] = useState('');\n const [referenceUrl, setReferenceUrl] = useState('');\n const [errors, setErrors] = useState<{\n documentName?: string;\n referenceUrl?: string;\n }>({});\n\n const dictionary = useText({\n title: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.title',\n documentNameLabel: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentNameLabel',\n documentIdentifierLabel: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentIdentifierLabel',\n referenceUrlLabel: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.referenceUrlLabel',\n addButton: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.addButton',\n updateButton: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.updateButton',\n cancelButton: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.cancelButton',\n documentNameRequired: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.documentNameRequired',\n referenceUrlRequired: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.referenceUrlRequired',\n invalidUrl: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.invalidUrl',\n errorHeading: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.errorHeading',\n });\n\n // Create error banner from errorMessage if errorBanner is not provided\n const displayErrorBanner = errorBanner || (errorMessage ? (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.errorHeading}\n description={errorMessage}\n data-testid=\"reference-document-form-modal-error-banner-inline\"\n />\n ) : null);\n\n // Determine if we're in edit mode (document prop is provided)\n const isEditMode = !!document;\n\n // Reset form when modal opens or document changes\n useEffect(() => {\n if (open) {\n if (document) {\n setDocumentName(document.name || '');\n setDocumentIdentifier(document.identifier || '');\n setReferenceUrl(document.url || '');\n } else {\n setDocumentName('');\n setDocumentIdentifier('');\n setReferenceUrl('');\n }\n setErrors({});\n }\n }, [open, document]);\n\n const validateUrl = useCallback((url: string): boolean => {\n // istanbul ignore if - whitespace-only URL are caught before this function is called, but leaving this here for defensive programming.\n if (!url.trim()) {\n return false;\n }\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n }, []);\n\n const handleSave = useCallback(() => {\n const newErrors: { documentName?: string; referenceUrl?: string } = {};\n\n if (!documentName.trim()) {\n newErrors.documentName = dictionary.documentNameRequired;\n }\n\n if (!referenceUrl.trim()) {\n newErrors.referenceUrl = dictionary.referenceUrlRequired;\n } else if (!validateUrl(referenceUrl.trim())) {\n newErrors.referenceUrl = dictionary.invalidUrl;\n }\n\n if (Object.keys(newErrors).length > 0) {\n setErrors(newErrors);\n return;\n }\n\n onSave({\n uid: document?.uid,\n name: documentName.trim(),\n identifier: documentIdentifier.trim() || undefined,\n url: referenceUrl.trim(),\n });\n }, [documentName, documentIdentifier, referenceUrl, document, dictionary, validateUrl, onSave]);\n\n const handleClose = useCallback(() => {\n setDocumentName('');\n setDocumentIdentifier('');\n setReferenceUrl('');\n setErrors({});\n onClose?.();\n }, [onClose]);\n\n if (!open) {\n return null;\n }\n\n return (\n <Modal\n open={open}\n size=\"medium\"\n title={<>{dictionary.title}</>}\n onClose={handleClose}\n clickToDismiss={true}\n escapeToDismiss={true}\n showCloseButton={showCloseButton}\n className={classes(['quote-management-reference-document-form-modal', className])}\n data-testid=\"reference-document-form-modal\"\n >\n {displayErrorBanner && (\n <div\n className={classes(['quote-management-reference-document-form-modal__error-banner'])}\n data-testid=\"reference-document-form-modal-error-banner\"\n >\n {displayErrorBanner}\n </div>\n )}\n\n {successBanner && (\n <div\n className={classes(['quote-management-reference-document-form-modal__success-banner'])}\n data-testid=\"reference-document-form-modal-success-banner\"\n >\n {successBanner}\n </div>\n )}\n\n <div className={classes(['quote-management-reference-document-form-modal__content'])}>\n <div>\n <Input\n name=\"documentName\"\n type=\"text\"\n value={documentName}\n onInput={(e: any) => {\n setDocumentName(e.target.value);\n setErrors({ ...errors, documentName: undefined });\n }}\n floatingLabel={dictionary.documentNameLabel}\n required\n error={!!errors.documentName}\n disabled={isSubmitting}\n data-testid=\"reference-document-name-input\"\n />\n {errors.documentName && (\n <span\n className={classes(['quote-management-reference-document-form-modal__error-text'])}\n data-testid=\"reference-document-name-error\"\n >\n {errors.documentName}\n </span>\n )}\n </div>\n\n <div>\n <Input\n name=\"documentIdentifier\"\n type=\"text\"\n value={documentIdentifier}\n onInput={(e: any) => {\n setDocumentIdentifier(e.target.value);\n }}\n floatingLabel={dictionary.documentIdentifierLabel}\n disabled={isSubmitting}\n data-testid=\"reference-document-identifier-input\"\n />\n </div>\n\n <div>\n <Input\n name=\"referenceUrl\"\n type=\"url\"\n value={referenceUrl}\n onInput={(e: any) => {\n setReferenceUrl(e.target.value);\n setErrors({ ...errors, referenceUrl: undefined });\n }}\n floatingLabel={dictionary.referenceUrlLabel}\n required\n error={!!errors.referenceUrl}\n disabled={isSubmitting}\n data-testid=\"reference-document-url-input\"\n />\n {errors.referenceUrl && (\n <span\n className={classes(['quote-management-reference-document-form-modal__error-text'])}\n data-testid=\"reference-document-url-error\"\n >\n {errors.referenceUrl}\n </span>\n )}\n </div>\n </div>\n\n <div className={classes(['quote-management-reference-document-form-modal__actions'])}>\n <Button\n variant=\"secondary\"\n size=\"medium\"\n onClick={handleClose}\n disabled={isSubmitting}\n className={classes(['quote-management-reference-document-form-modal__cancel-button'])}\n data-testid=\"reference-document-form-cancel-button\"\n >\n {dictionary.cancelButton}\n </Button>\n <Button\n variant=\"primary\"\n size=\"medium\"\n onClick={handleSave}\n disabled={isSubmitting}\n className={classes(['quote-management-reference-document-form-modal__save-button'])}\n data-testid=\"reference-document-form-save-button\"\n >\n {isEditMode ? dictionary.updateButton : dictionary.addButton}\n </Button>\n </div>\n </Modal>\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 { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button } from '@adobe-commerce/elsie/components';\nimport '@/quote-management/components/ReferenceDocumentsList/ReferenceDocumentsList.css';\n\nexport interface ReferenceDocument {\n uid?: string;\n name: string;\n identifier?: string;\n url: string;\n}\n\nexport interface ReferenceDocumentsListProps extends HTMLAttributes<HTMLDivElement> {\n documents: ReferenceDocument[];\n isEditable?: boolean;\n onAdd?: () => void;\n onEdit?: (document: ReferenceDocument) => void;\n onRemove?: (document: ReferenceDocument) => void;\n}\n\nexport const ReferenceDocumentsList: FunctionComponent<ReferenceDocumentsListProps> = ({\n className,\n documents,\n isEditable = false,\n onAdd,\n onEdit,\n onRemove,\n ...props\n}) => {\n const dictionary = useText({\n add: 'NegotiableQuoteTemplate.Manage.referenceDocuments.add',\n edit: 'NegotiableQuoteTemplate.Manage.referenceDocuments.edit',\n remove: 'NegotiableQuoteTemplate.Manage.referenceDocuments.remove',\n noReferenceDocuments: 'NegotiableQuoteTemplate.Manage.referenceDocuments.noReferenceDocuments',\n });\n\n const formatDocumentDisplay = (doc: ReferenceDocument): string => {\n if (doc.identifier) {\n return `${doc.name}, ${doc.identifier}`;\n }\n return `${doc.name} ${doc.url}`;\n };\n\n const handleDocumentClick = (e: Event, url: string) => {\n e.preventDefault();\n window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <div\n className={classes(['quote-management-reference-documents-list', className])}\n data-testid=\"reference-documents-list\"\n {...props}\n >\n <div className=\"quote-management-reference-documents-list__content\">\n {documents.map((doc) => (\n <div\n key={doc.uid || doc.url}\n className=\"quote-management-reference-documents-list__document\"\n data-testid={`reference-document-${doc.uid || doc.url}`}\n >\n <a\n href={doc.url}\n onClick={(e) => handleDocumentClick(e, doc.url)}\n className=\"quote-management-reference-documents-list__document-link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n data-testid={`reference-document-link-${doc.uid || doc.url}`}\n >\n {formatDocumentDisplay(doc)}\n </a>\n {isEditable && (\n <div className=\"quote-management-reference-documents-list__document-actions\">\n <Button\n variant=\"tertiary\"\n onClick={() => onEdit?.(doc)}\n className=\"quote-management-reference-documents-list__edit-button\"\n data-testid={`reference-document-edit-${doc.uid || doc.url}`}\n >\n {dictionary.edit}\n </Button>\n <span className=\"quote-management-reference-documents-list__separator\">|</span>\n <Button\n variant=\"tertiary\"\n onClick={() => onRemove?.(doc)}\n className=\"quote-management-reference-documents-list__remove-button\"\n data-testid={`reference-document-remove-${doc.uid || doc.url}`}\n >\n {dictionary.remove}\n </Button>\n </div>\n )}\n </div>\n ))}\n {isEditable && (\n <Button\n variant=\"tertiary\"\n onClick={onAdd}\n className=\"quote-management-reference-documents-list__add-button\"\n data-testid=\"reference-documents-add-button\"\n >\n + {dictionary.add}\n </Button>\n )}\n {documents.length === 0 && !isEditable && (\n <div className=\"quote-management-reference-documents-list__empty\">\n {dictionary.noReferenceDocuments}\n </div>\n )}\n </div>\n </div>\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 { useMemo, useCallback } from 'preact/compat';\nimport { ReferenceDocument } from '@/quote-management/components';\nimport { ReferenceDocumentLinkInput } from '@/quote-management/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview';\n\nexport interface UseReferenceDocumentLinksParams {\n templateReferenceDocuments?: ReferenceDocument[];\n localReferenceDocuments: ReferenceDocument[];\n}\n\nexport interface UseReferenceDocumentLinksReturn {\n /**\n * Checks if a document exists in the template reference documents.\n * Matches by uid if both documents have it, otherwise matches by url.\n */\n isDocumentInTemplateData: (document: ReferenceDocument) => boolean;\n /**\n * Returns documents from localReferenceDocuments that are not in templateReferenceDocuments.\n */\n getNewDocuments: () => ReferenceDocument[];\n /**\n * Transforms all reference documents to API format.\n */\n getReferenceDocumentLinks: () => ReferenceDocumentLinkInput[];\n /**\n * Indicates if there are unsaved changes (documents in local state not in template data).\n */\n hasUnsavedChanges: boolean;\n}\n\n/**\n * Custom hook to manage reference document links logic.\n * Handles document matching, filtering new documents, transformation to API format,\n * and detection of unsaved changes.\n * Note: getReferenceDocumentLinks() returns all local reference documents, not just new ones.\n */\nexport const useReferenceDocumentLinks = (\n params: UseReferenceDocumentLinksParams\n): UseReferenceDocumentLinksReturn => {\n const { templateReferenceDocuments, localReferenceDocuments } = params;\n\n /**\n * Helper function to check if a document is part of the template data.\n * A document is considered part of template data if:\n * - Its uid exists in templateReferenceDocuments (when uid is available), OR\n * - Its url exists in templateReferenceDocuments (when uid is not available)\n */\n const isDocumentInTemplateData = useCallback(\n (document: ReferenceDocument): boolean => {\n if (!templateReferenceDocuments) {\n return false;\n }\n return templateReferenceDocuments.some((templateDoc) => {\n // If both documents have uids, match by uid\n if (document.uid && templateDoc.uid) {\n return templateDoc.uid === document.uid;\n }\n // Otherwise, match by URL\n return templateDoc.url === document.url;\n });\n },\n [templateReferenceDocuments]\n );\n\n /**\n * Returns documents from localReferenceDocuments that are not in templateReferenceDocuments.\n */\n const getNewDocuments = useCallback((): ReferenceDocument[] => {\n if (!templateReferenceDocuments) {\n // If no template documents exist, all local documents are new\n return localReferenceDocuments;\n }\n // Filter to only include documents not in template data\n return localReferenceDocuments.filter((doc) => {\n return !templateReferenceDocuments.some((templateDoc) => {\n // If both documents have uids, match by uid\n if (doc.uid && templateDoc.uid) {\n return templateDoc.uid === doc.uid;\n }\n // Otherwise, match by URL\n return templateDoc.url === doc.url;\n });\n });\n }, [templateReferenceDocuments, localReferenceDocuments]);\n\n /**\n * Transforms all reference documents to API format.\n */\n const getReferenceDocumentLinks = useCallback((): ReferenceDocumentLinkInput[] => {\n return localReferenceDocuments.map((doc) => ({\n uid: doc.uid,\n name: doc.name,\n identifier: doc.identifier,\n url: doc.url,\n }));\n }, [localReferenceDocuments]);\n\n /**\n * Checks if there are unsaved changes (new reference documents that haven't been saved to the template).\n * A document is considered unsaved if it exists in local state but not in templateReferenceDocuments.\n */\n const hasUnsavedChanges = useMemo(() => {\n if (!templateReferenceDocuments) {\n // If no template documents exist, any documents in local state are unsaved\n return localReferenceDocuments.length > 0;\n }\n // Check if any document in localReferenceDocuments is not in templateReferenceDocuments\n return localReferenceDocuments.some((doc) => {\n return !templateReferenceDocuments.some((templateDoc) => {\n // If both documents have uids, match by uid\n if (doc.uid && templateDoc.uid) {\n return templateDoc.uid === doc.uid;\n }\n // Otherwise, match by URL\n return templateDoc.url === doc.url;\n });\n });\n }, [templateReferenceDocuments, localReferenceDocuments]);\n\n return {\n isDocumentInTemplateData,\n getNewDocuments,\n getReferenceDocumentLinks,\n hasUnsavedChanges,\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 {\n HTMLAttributes,\n useCallback,\n useEffect,\n useMemo,\n useState,\n createPortal,\n useRef,\n} from 'preact/compat';\nimport {\n Container,\n Slot,\n SlotProps,\n} from '@adobe-commerce/elsie/lib';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\nimport { events } from '@adobe-commerce/event-bus';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Button,\n TextArea,\n InLineAlert,\n Icon,\n} from '@adobe-commerce/elsie/components';\nimport { NegotiableQuoteTemplateModel, NegotiableQuoteTemplateStatus } from '@/quote-management/data/models/negotiable-quote-template-model';\nimport {\n TabbedContent,\n ActionsBar,\n ConfirmationModal,\n ManageNegotiableQuoteTemplate as ManageNegotiableQuoteTemplateComponent,\n ManageNegotiableQuoteTemplateProps as ManageNegotiableQuoteTemplateComponentProps,\n ReferenceDocumentsList,\n ReferenceDocumentFormModal,\n ReferenceDocument,\n} from '@/quote-management/components';\nimport {\n ItemsQuotedTemplate,\n QuoteTemplateCommentsList,\n QuoteTemplateHistoryLog,\n} from '@/quote-management/containers';\nimport {\n WarningFilled,\n CheckWithCircle,\n} from '@adobe-commerce/elsie/icons';\nimport {\n sendQuoteTemplateForReview,\n deleteQuoteTemplate,\n cancelQuoteTemplate,\n generateQuoteFromTemplate,\n openQuoteTemplate,\n acceptQuoteTemplate,\n} from '@/quote-management/api';\nimport { useReferenceDocumentLinks } from '@/quote-management/hooks/useReferenceDocumentLinks';\n\nexport interface ManageNegotiableQuoteTemplateProps\n extends HTMLAttributes<HTMLDivElement> {\n onActionsButtonClick?: (action: string) => void;\n onSendForReview?: (params: {\n templateData?: NegotiableQuoteTemplateModel;\n comment?: string;\n }) => void;\n slots?: {\n TemplateName?: SlotProps<{\n templateName?: string;\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n TemplateId?: SlotProps<{\n templateId?: string;\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n Banner?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n Details?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n ActionBar?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n ReferenceDocuments?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n referenceDocuments?: ReferenceDocument[];\n isEditable?: boolean;\n onAddDocument?: () => void;\n onEditDocument?: (document: ReferenceDocument) => void;\n onRemoveDocument?: (document: ReferenceDocument) => void;\n referenceDocumentsTitle?: string;\n }>;\n ItemsTable?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n ItemsQuotedTab?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n CommentsTab?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n HistoryLogTab?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n CommentsTitle?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n Comments?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n HistoryLogTitle?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n HistoryLog?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n }>;\n Footer?: SlotProps<{\n templateData?: NegotiableQuoteTemplateModel;\n comment?: string;\n isSubmitting?: boolean;\n referenceDocuments?: ReferenceDocument[];\n hasUnsavedChanges?: boolean;\n }>;\n };\n}\n\nexport const ManageNegotiableQuoteTemplate: Container<ManageNegotiableQuoteTemplateProps> = ({\n slots,\n onActionsButtonClick,\n onSendForReview,\n ...props\n}) => {\n const [templateData, setTemplateData] = useState<NegotiableQuoteTemplateModel | undefined>(undefined);\n const [loading, setLoading] = useState<boolean>(true);\n const [comment, setComment] = useState<string>('');\n const [isSubmitting, setIsSubmitting] = useState<boolean>(false);\n const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState<boolean>(false);\n const [deleteError, setDeleteError] = useState<string | null>(null);\n const [deleteSuccess, setDeleteSuccess] = useState<boolean>(false);\n const [isCancelDialogOpen, setIsCancelDialogOpen] = useState<boolean>(false);\n const [cancelError, setCancelError] = useState<string | null>(null);\n const [cancelSuccess, setCancelSuccess] = useState<boolean>(false);\n const [referenceDocuments, setReferenceDocuments] = useState<ReferenceDocument[]>([]);\n const [isDocumentModalOpen, setIsDocumentModalOpen] = useState<boolean>(false);\n const [editingDocument, setEditingDocument] = useState<ReferenceDocument | undefined>(undefined);\n const [documentModalErrorMessage, setDocumentModalErrorMessage] = useState<string | null>(null);\n const [showGenerateQuoteModal, setShowGenerateQuoteModal] = useState<boolean>(false);\n const [isGeneratingQuote, setIsGeneratingQuote] = useState<boolean>(false);\n const [generateQuoteSuccessMessage, setGenerateQuoteSuccessMessage] = useState<string>('');\n const [generateQuoteErrorMessage, setGenerateQuoteErrorMessage] = useState<string>('');\n const [showAcceptModal, setShowAcceptModal] = useState<boolean>(false);\n const [isAccepting, setIsAccepting] = useState<boolean>(false);\n const [acceptSuccessMessage, setAcceptSuccessMessage] = useState<string>('');\n const [acceptErrorMessage, setAcceptErrorMessage] = useState<string>('');\n const hasAutoOpened = useRef<boolean>(false);\n\n // Use hook for reference document links logic\n const {\n getReferenceDocumentLinks,\n hasUnsavedChanges,\n } = useReferenceDocumentLinks({\n templateReferenceDocuments: templateData?.referenceDocuments,\n localReferenceDocuments: referenceDocuments,\n });\n\n const dictionary = useText({\n createdLabel: 'NegotiableQuoteTemplate.Manage.createdLabel',\n salesRepLabel: 'NegotiableQuoteTemplate.Manage.salesRepLabel',\n expiresLabel: 'NegotiableQuoteTemplate.Manage.expiresLabel',\n actionsLabel: 'NegotiableQuoteTemplate.Manage.actionsLabel',\n referenceDocumentsTitle: 'NegotiableQuoteTemplate.Manage.referenceDocuments.title',\n commentsTitle: 'NegotiableQuoteTemplate.Manage.comments.title',\n historyLogTitle: 'NegotiableQuoteTemplate.Manage.historyLog.title',\n itemsQuotedTab: 'NegotiableQuoteTemplate.Manage.tabs.itemsQuoted',\n commentsTab: 'NegotiableQuoteTemplate.Manage.tabs.comments',\n historyLogTab: 'NegotiableQuoteTemplate.Manage.tabs.historyLog',\n templateCommentsPlaceholder: 'NegotiableQuoteTemplate.Manage.templateComments.placeholder',\n sendForReview: 'NegotiableQuoteTemplate.Manage.actionButtons.sendForReview',\n delete: 'NegotiableQuoteTemplate.Manage.actionButtons.delete',\n cancel: 'NegotiableQuoteTemplate.Manage.actionButtons.cancel',\n confirmationModalDeleteTitle: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.title',\n confirmationModalDeleteMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.message',\n confirmationModalDeleteConfirm: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.confirm',\n confirmationModalDeleteErrorHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.errorHeading',\n confirmationModalDeleteErrorFallback: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.errorFallback',\n confirmationModalDeleteSuccessHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.successHeading',\n confirmationModalDeleteSuccessDescription: 'NegotiableQuoteTemplate.Manage.confirmationModal.delete.successDescription',\n confirmationModalCancelTitle: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.title',\n confirmationModalCancelMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.message',\n confirmationModalCancelConfirm: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.confirm',\n confirmationModalCancelErrorHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.errorHeading',\n confirmationModalCancelErrorFallback: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.errorFallback',\n confirmationModalCancelSuccessHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.successHeading',\n confirmationModalCancelSuccessDescription: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancelTemplate.successDescription',\n confirmationModalCancel: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancel',\n accept: 'NegotiableQuoteTemplate.Manage.actionButtons.accept',\n generateQuote: 'NegotiableQuoteTemplate.Manage.actionButtons.generateQuote',\n generateQuoteModalTitle: 'NegotiableQuoteTemplate.Manage.actionButtons.generateQuote',\n generateQuoteModalMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.message',\n generateQuoteModalCancel: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancel',\n generateQuoteModalConfirm: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirm',\n generateQuoteModalConfirmLoading: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirmLoading',\n generateQuoteModalSuccessHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.successHeading',\n generateQuoteSuccessMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.successDescription',\n generateQuoteModalErrorHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.errorHeading',\n generateQuoteErrorFallback: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.errorFallback',\n acceptModalTitle: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.title',\n acceptModalMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.message',\n acceptModalCancel: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancel',\n acceptModalConfirm: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.confirm',\n acceptModalConfirmLoading: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.confirmLoading',\n acceptModalSuccessHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.successHeading',\n acceptSuccessMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.successDescription',\n acceptModalErrorHeading: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.errorHeading',\n acceptErrorFallback: 'NegotiableQuoteTemplate.Manage.confirmationModal.accept.errorFallback',\n documentDuplicateUidError: 'NegotiableQuoteTemplate.Manage.referenceDocuments.form.duplicateUidError',\n });\n\n /* Event listeners */\n useEffect(() => {\n const quoteTemplateDataEvent = events.on('quote-management/quote-template-data', (data) => {\n if (data.quoteTemplate) {\n setTemplateData(data.quoteTemplate);\n setLoading(false);\n // Reset comment and submitting state after successful update\n setComment('');\n setIsSubmitting(false);\n // Update reference documents from template data\n setReferenceDocuments(data.quoteTemplate.referenceDocuments || []);\n }\n }, { eager: true });\n\n return () => quoteTemplateDataEvent?.off();\n }, []);\n\n // Initialize reference documents when template data changes\n useEffect(() => {\n if (templateData?.referenceDocuments) {\n setReferenceDocuments(templateData.referenceDocuments);\n }\n }, [templateData?.referenceDocuments]);\n\n // Auto-open template if status is \"Updated\"\n useEffect(() => {\n if (templateData && templateData.status === NegotiableQuoteTemplateStatus.UPDATED && !hasAutoOpened.current) {\n hasAutoOpened.current = true;\n const openTemplate = async () => {\n try {\n await openQuoteTemplate({ templateId: templateData.id });\n // The event listener will handle updating state\n } catch (error) {\n console.error('Failed to auto-open quote template:', error);\n // Silently fail - template data is still available for viewing\n }\n };\n openTemplate();\n }\n }, [templateData]);\n\n /**\n * Handlers\n */\n const handleDeleteCancel = useCallback(() => {\n setIsDeleteDialogOpen(false);\n setDeleteError(null);\n setDeleteSuccess(false);\n }, []);\n\n const handleDeleteConfirm = useCallback(async () => {\n /* istanbul ignore next */ // If there is no template data, the button should not be enabled or even rendered\n if (!templateData?.id) {\n return;\n }\n\n setDeleteError(null);\n setDeleteSuccess(false);\n\n try {\n await deleteQuoteTemplate({\n templateId: templateData.id,\n });\n setDeleteSuccess(true);\n // Close modal after a delay to show success message\n setTimeout(() => {\n setIsDeleteDialogOpen(false);\n setDeleteSuccess(false);\n }, 2000);\n } catch (error) {\n const errorMessage = (error as Error).message || dictionary.confirmationModalDeleteErrorFallback;\n setDeleteError(errorMessage);\n }\n }, [templateData, dictionary.confirmationModalDeleteErrorFallback]);\n\n const handleDismissError = useCallback(() => {\n setDeleteError(null);\n }, []);\n\n const handleDismissSuccess = useCallback(() => {\n setDeleteSuccess(false);\n }, []);\n\n const handleCancelCancel = useCallback(() => {\n setIsCancelDialogOpen(false);\n setCancelError(null);\n setCancelSuccess(false);\n }, []);\n\n const handleCancelConfirm = useCallback(async () => {\n /* istanbul ignore next */ // If there is no template data, the button should not be enabled or even rendered\n if (!templateData?.id) {\n return;\n }\n\n setCancelError(null);\n setCancelSuccess(false);\n\n try {\n await cancelQuoteTemplate({\n templateId: templateData.id,\n });\n setCancelSuccess(true);\n // Close modal after a delay to show success message\n setTimeout(() => {\n setIsCancelDialogOpen(false);\n setCancelSuccess(false);\n }, 2000);\n } catch (error) {\n const errorMessage = (error as Error).message || dictionary.confirmationModalCancelErrorFallback;\n setCancelError(errorMessage);\n }\n }, [templateData, dictionary.confirmationModalCancelErrorFallback]);\n\n const handleDismissCancelError = useCallback(() => {\n setCancelError(null);\n }, []);\n\n const handleDismissCancelSuccess = useCallback(() => {\n setCancelSuccess(false);\n }, []);\n\n const handleSendForReview = useCallback(async () => {\n // Get all reference document links\n const referenceDocumentLinks = getReferenceDocumentLinks();\n\n // If override prop is provided, use it instead of the API\n if (onSendForReview) {\n onSendForReview({\n templateData,\n comment: comment.trim() || undefined,\n });\n return;\n }\n // Otherwise, use the sendQuoteTemplateForReview API\n setIsSubmitting(true);\n\n try {\n await sendQuoteTemplateForReview({\n templateId: templateData!.id, // the button should be disabled if templateData is null\n comment: comment.trim() || undefined,\n referenceDocumentLinks: referenceDocumentLinks.length > 0 ? referenceDocumentLinks : undefined,\n });\n // The quote-template-data event will handle updating state\n } catch (error) {\n console.error('Failed to send quote template for review:', error);\n setIsSubmitting(false);\n // TODO: Show error notification to user\n }\n }, [templateData, onSendForReview, comment, getReferenceDocumentLinks]);\n\n const handleAddDocument = useCallback(() => {\n setEditingDocument(undefined);\n setDocumentModalErrorMessage(null);\n setIsDocumentModalOpen(true);\n }, []);\n\n const handleEditDocument = useCallback((document: ReferenceDocument) => {\n setEditingDocument(document);\n setDocumentModalErrorMessage(null);\n setIsDocumentModalOpen(true);\n }, []);\n\n const handleRemoveDocument = useCallback((document: ReferenceDocument) => {\n setReferenceDocuments((prev) => prev.filter((doc) => doc.uid !== document.uid || doc.url !== document.url));\n }, []);\n\n const handleSaveDocument = useCallback((document: ReferenceDocument) => {\n // Clear any previous error messages\n setDocumentModalErrorMessage(null);\n\n if (editingDocument) {\n // Update existing document\n setReferenceDocuments((prev) =>\n prev.map((doc) =>\n doc.identifier === editingDocument.identifier\n ? document\n : doc\n )\n );\n } else {\n // Add new document\n setReferenceDocuments((prev) => [...prev, document]);\n }\n setIsDocumentModalOpen(false);\n setEditingDocument(undefined);\n }, [editingDocument]);\n\n const handleDocumentModalClose = useCallback(() => {\n setIsDocumentModalOpen(false);\n setEditingDocument(undefined);\n setDocumentModalErrorMessage(null);\n }, []);\n\n // Generate quote handler\n const handleGenerateQuote = useCallback(async () => {\n setIsGeneratingQuote(true);\n setGenerateQuoteErrorMessage('');\n setGenerateQuoteSuccessMessage('');\n try {\n await generateQuoteFromTemplate({ templateId: templateData!.id });\n // Show success message\n setGenerateQuoteSuccessMessage(dictionary.generateQuoteSuccessMessage);\n } catch (error) {\n console.error('Failed to generate quote from template:', error);\n const errorMessage = error instanceof Error ? error.message : dictionary.generateQuoteErrorFallback;\n setGenerateQuoteErrorMessage(errorMessage);\n } finally {\n setIsGeneratingQuote(false);\n }\n }, [templateData, dictionary.generateQuoteSuccessMessage, dictionary.generateQuoteErrorFallback]);\n\n const handleGenerateQuoteModalCancel = useCallback(() => {\n setShowGenerateQuoteModal(false);\n setGenerateQuoteErrorMessage('');\n setGenerateQuoteSuccessMessage('');\n }, []);\n\n // Accept quote template handler\n const handleAcceptQuote = useCallback(async () => {\n setIsAccepting(true);\n setAcceptErrorMessage('');\n setAcceptSuccessMessage('');\n try {\n await acceptQuoteTemplate({ templateId: templateData!.id });\n // Show success message\n setAcceptSuccessMessage(dictionary.acceptSuccessMessage);\n } catch (error) {\n console.error('Failed to accept quote template:', error);\n const errorMessage = error instanceof Error ? error.message : dictionary.acceptErrorFallback;\n setAcceptErrorMessage(errorMessage);\n } finally {\n setIsAccepting(false);\n }\n }, [templateData, dictionary.acceptSuccessMessage, dictionary.acceptErrorFallback]);\n\n const handleAcceptModalCancel = useCallback(() => {\n setShowAcceptModal(false);\n setAcceptErrorMessage('');\n setAcceptSuccessMessage('');\n }, []);\n\n /**\n * VNodes for the ManageNegotiableQuoteTemplate component\n */\n\n // Template name\n const templateName = useMemo(() => {\n return (\n <Slot\n name=\"TemplateName\"\n slot={slots?.TemplateName}\n context={{ templateName: templateData?.name, templateData }}\n >\n <h1 data-testid=\"template-name\">\n {templateData?.name}\n </h1>\n </Slot>\n );\n }, [slots?.TemplateName, templateData]);\n\n // Template ID\n const templateId = useMemo(() => {\n return (\n <Slot\n name=\"TemplateId\"\n slot={slots?.TemplateId}\n context={{ templateId: templateData?.uid, templateData }}\n >\n <div data-testid=\"template-id\">Template #{templateData?.uid}</div>\n </Slot>\n );\n }, [slots?.TemplateId, templateData]);\n\n // Details\n const details = useMemo(() => {\n if (!templateData) {\n return;\n }\n\n // Format expiration date if it exists\n const expirationDate = templateData.expirationDate ? formattedDate(templateData.expirationDate, 'short') : undefined;\n\n return (\n <Slot name=\"Details\" slot={slots?.Details} context={{ templateData }}>\n <div className=\"quote-management-manage-negotiable-quote-template__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-title\"\n data-testid=\"created-label\"\n >\n {dictionary.createdLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-content\"\n data-testid=\"created-value\"\n >\n {formattedDate(templateData.createdAt, 'short')} (\n {templateData.buyer.firstname} {templateData.buyer.lastname})\n </span>\n </div>\n\n <div className=\"quote-management-manage-negotiable-quote-template__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-title\"\n data-testid=\"sales-rep-label\"\n >\n {dictionary.salesRepLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-content\"\n data-testid=\"sales-rep-value\"\n >\n {templateData.salesRepName}\n </span>\n </div>\n\n {expirationDate && (\n <div className=\"quote-management-manage-negotiable-quote-template__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-title\"\n data-testid=\"expires-label\"\n >\n {dictionary.expiresLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote-template__detail-content\"\n data-testid=\"expires-value\"\n >\n {expirationDate}\n </span>\n </div>\n )}\n </Slot>\n );\n }, [slots?.Details, dictionary, templateData]);\n\n\n // Action bar\n const buttons: { label: string; value: string; disabled?: boolean }[] =\n useMemo(() => {\n return [\n {\n label: dictionary.generateQuote,\n value: 'generateQuote',\n disabled: !templateData?.canGenerateQuoteFromTemplate,\n },\n ];\n }, [dictionary, templateData?.canGenerateQuoteFromTemplate]);\n\n const actionBar = useMemo(() => {\n const handleActionsButtonClick = (action: string) => {\n switch (action) {\n case 'generateQuote':\n setShowGenerateQuoteModal(true);\n setGenerateQuoteErrorMessage(''); // Clear modal errors\n setGenerateQuoteSuccessMessage(''); // Clear modal success messages\n onActionsButtonClick?.(action);\n break;\n }\n };\n\n return (\n <Slot\n name=\"ActionBar\"\n slot={slots?.ActionBar}\n context={{ templateData }}\n >\n <ActionsBar\n dropdownPlaceholder={dictionary.actionsLabel}\n dropdownOptions={[]}\n buttons={buttons.map((button) => (\n <Button\n key={button.value}\n variant=\"tertiary\"\n onClick={() => handleActionsButtonClick(button.value)}\n data-testid={`actions-bar-${button.value}-button`}\n data-action={button.value}\n disabled={button.disabled}\n >\n {button.label}\n </Button>\n ))}\n />\n </Slot>\n );\n }, [\n buttons,\n dictionary,\n slots?.ActionBar,\n templateData,\n onActionsButtonClick,\n ]);\n\n // Reference documents\n const isEditable = useMemo(() => {\n const status = templateData?.status as string;\n return status === 'Draft' || status === 'Open';\n }, [templateData?.status]);\n\n\n const referenceDocumentsNode = useMemo(() => {\n const shouldShowTitle = referenceDocuments.length > 0 || isEditable;\n const title = shouldShowTitle ? dictionary.referenceDocumentsTitle : undefined;\n\n return (\n <Slot\n name=\"ReferenceDocuments\"\n slot={slots?.ReferenceDocuments}\n context={{ templateData, referenceDocuments, isEditable, onAddDocument: handleAddDocument, onEditDocument: handleEditDocument, onRemoveDocument: handleRemoveDocument, referenceDocumentsTitle: dictionary.referenceDocumentsTitle }}\n >\n <div data-testid=\"reference-documents\">\n {shouldShowTitle && <h2>{title}</h2>}\n <ReferenceDocumentsList\n documents={referenceDocuments}\n isEditable={isEditable}\n onAdd={handleAddDocument}\n onEdit={handleEditDocument}\n onRemove={handleRemoveDocument}\n />\n </div>\n </Slot>\n );\n }, [slots?.ReferenceDocuments, dictionary, templateData, referenceDocuments, isEditable, handleAddDocument, handleEditDocument, handleRemoveDocument]);\n\n // Items table (using TabbedContent with ItemsQuoted)\n const itemsTable = useMemo(() => {\n return (\n <Slot\n name=\"ItemsTable\"\n slot={slots?.ItemsTable}\n context={{ templateData }}\n >\n <TabbedContent\n tabs={\n new Map([\n ['items-quoted', dictionary.itemsQuotedTab],\n ['comments', dictionary.commentsTab],\n ['history-log', dictionary.historyLogTab],\n ])\n }\n tabsContent={\n new Map([\n [\n 'items-quoted',\n <Slot\n key=\"items-quoted\"\n name=\"ItemsQuotedTab\"\n slot={slots?.ItemsQuotedTab}\n context={{ templateData }}\n >\n <ItemsQuotedTemplate templateData={templateData} />\n </Slot>,\n ],\n [\n 'comments',\n <Slot\n key=\"comments\"\n name=\"CommentsTab\"\n slot={slots?.CommentsTab}\n context={{ templateData }}\n >\n <QuoteTemplateCommentsList templateData={templateData} />\n </Slot>,\n ],\n [\n 'history-log',\n <Slot\n key=\"history-log\"\n name=\"HistoryLogTab\"\n slot={slots?.HistoryLogTab}\n context={{ templateData }}\n >\n <QuoteTemplateHistoryLog templateData={templateData} />\n </Slot>,\n ],\n ])\n }\n />\n </Slot>\n );\n }, [\n slots?.ItemsTable,\n slots?.ItemsQuotedTab,\n slots?.CommentsTab,\n slots?.HistoryLogTab,\n dictionary,\n templateData,\n ]);\n\n // Comments title\n const commentsTitle = useMemo(() => {\n return (\n <Slot\n name=\"CommentsTitle\"\n slot={slots?.CommentsTitle}\n context={{ templateData }}\n >\n <h2>{dictionary.commentsTitle}</h2>\n </Slot>\n );\n }, [slots?.CommentsTitle, dictionary, templateData]);\n\n // Comments\n const comments = useMemo(() => {\n return (\n <Slot\n name=\"Comments\"\n slot={slots?.Comments}\n context={{ templateData }}\n >\n <TextArea\n name=\"templateComments\"\n placeholder={dictionary.templateCommentsPlaceholder}\n rows={3}\n value={comment}\n onInput={(e) => {\n setComment((e.target as HTMLTextAreaElement).value);\n }}\n disabled={!templateData?.canSendForReview || isSubmitting}\n />\n </Slot>\n );\n }, [slots?.Comments, dictionary, templateData, comment, isSubmitting]);\n\n\n // Footer\n const footer = useMemo(() => {\n const showAcceptButton = templateData?.status === NegotiableQuoteTemplateStatus.OPEN && templateData?.canAccept;\n \n return (\n <Slot\n name=\"Footer\"\n slot={slots?.Footer}\n context={{ templateData, comment, isSubmitting, referenceDocuments, hasUnsavedChanges }}\n >\n {showAcceptButton && (\n <Button\n variant=\"primary\"\n onClick={() => {\n setShowAcceptModal(true);\n setAcceptErrorMessage(''); // Clear modal errors\n setAcceptSuccessMessage(''); // Clear modal success messages\n }}\n data-testid=\"accept-button\"\n disabled={isSubmitting || hasUnsavedChanges}\n >\n {dictionary.accept}\n </Button>\n )}\n\n {templateData?.canSendForReview && (\n <Button\n variant=\"primary\"\n onClick={handleSendForReview}\n data-testid=\"send-for-review-button\"\n disabled={isSubmitting}\n >\n {dictionary.sendForReview}\n </Button>\n )}\n {templateData?.canCancel && (\n <Button\n variant=\"tertiary\"\n onClick={() => setIsCancelDialogOpen(true)}\n data-testid=\"cancel-template-button\"\n disabled={isSubmitting}\n >\n {dictionary.cancel}\n </Button>\n )}\n {templateData?.canDelete && (\n <Button\n variant=\"tertiary\"\n onClick={() => setIsDeleteDialogOpen(true)}\n data-testid=\"delete-template-button\"\n disabled={isSubmitting}\n >\n {dictionary.delete}\n </Button>\n )}\n </Slot>\n );\n }, [\n slots?.Footer,\n dictionary,\n templateData,\n comment,\n isSubmitting,\n handleSendForReview,\n referenceDocuments,\n hasUnsavedChanges,\n ]);\n\n // Delete error banner\n const deleteErrorBanner = deleteError ? (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.confirmationModalDeleteErrorHeading}\n description={deleteError}\n onDismiss={handleDismissError}\n data-testid=\"confirmation-modal-error-banner\"\n />\n ) : null;\n\n // Delete success banner\n const deleteSuccessBanner = deleteSuccess ? (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.confirmationModalDeleteSuccessHeading}\n description={dictionary.confirmationModalDeleteSuccessDescription}\n onDismiss={handleDismissSuccess}\n data-testid=\"confirmation-modal-success-banner\"\n />\n ) : null;\n\n const deleteBanner = deleteSuccessBanner || deleteErrorBanner;\n\n // Cancel error banner\n const cancelErrorBanner = cancelError ? (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.confirmationModalCancelErrorHeading}\n description={cancelError}\n onDismiss={handleDismissCancelError}\n data-testid=\"confirmation-modal-cancel-error-banner\"\n />\n ) : null;\n\n // Cancel success banner\n const cancelSuccessBanner = cancelSuccess ? (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.confirmationModalCancelSuccessHeading}\n description={dictionary.confirmationModalCancelSuccessDescription}\n onDismiss={handleDismissCancelSuccess}\n data-testid=\"confirmation-modal-cancel-success-banner\"\n />\n ) : null;\n\n const cancelBanner = cancelSuccessBanner || cancelErrorBanner;\n\n const manageNegotiableQuoteTemplateProps: ManageNegotiableQuoteTemplateComponentProps = {\n ...props,\n loading,\n templateName,\n templateId,\n details,\n actionBar,\n referenceDocuments: referenceDocumentsNode,\n itemsTable,\n commentsTitle,\n comments,\n footer,\n };\n\n // Create banner for generate quote modal based on success/error state\n let generateQuoteModalBanner = null;\n if (generateQuoteSuccessMessage) {\n generateQuoteModalBanner = (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<Icon source=\"CheckWithCircle\" />}\n heading={dictionary.generateQuoteModalSuccessHeading}\n description={generateQuoteSuccessMessage}\n data-testid=\"generate-quote-success-banner\"\n />\n );\n } else if (generateQuoteErrorMessage) {\n generateQuoteModalBanner = (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<Icon source=\"WarningFilled\" />}\n heading={dictionary.generateQuoteModalErrorHeading}\n description={generateQuoteErrorMessage}\n data-testid=\"generate-quote-error-banner\"\n />\n );\n }\n\n // Create banner for accept modal based on success/error state\n let acceptModalBanner = null;\n if (acceptSuccessMessage) {\n acceptModalBanner = (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<Icon source=\"CheckWithCircle\" />}\n heading={dictionary.acceptModalSuccessHeading}\n description={acceptSuccessMessage}\n data-testid=\"accept-success-banner\"\n />\n );\n } else if (acceptErrorMessage) {\n acceptModalBanner = (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<Icon source=\"WarningFilled\" />}\n heading={dictionary.acceptModalErrorHeading}\n description={acceptErrorMessage}\n data-testid=\"accept-error-banner\"\n />\n );\n }\n\n return (\n <>\n <ManageNegotiableQuoteTemplateComponent {...manageNegotiableQuoteTemplateProps} />\n {isDeleteDialogOpen &&\n createPortal(\n <ConfirmationModal\n open={isDeleteDialogOpen}\n title={dictionary.confirmationModalDeleteTitle}\n message={dictionary.confirmationModalDeleteMessage}\n cancelLabel={dictionary.confirmationModalCancel}\n confirmLabel={dictionary.confirmationModalDeleteConfirm}\n onCancel={handleDeleteCancel}\n onConfirm={handleDeleteConfirm}\n showCloseButton={!deleteBanner}\n confirmationBanner={deleteBanner}\n />,\n document.body\n )}\n {isCancelDialogOpen &&\n createPortal(\n <ConfirmationModal\n open={isCancelDialogOpen}\n title={dictionary.confirmationModalCancelTitle}\n message={dictionary.confirmationModalCancelMessage}\n cancelLabel={dictionary.confirmationModalCancel}\n confirmLabel={dictionary.confirmationModalCancelConfirm}\n onCancel={handleCancelCancel}\n onConfirm={handleCancelConfirm}\n showCloseButton={!cancelBanner}\n confirmationBanner={cancelBanner}\n />,\n document.body\n )}\n {isDocumentModalOpen &&\n createPortal(\n <ReferenceDocumentFormModal\n open={isDocumentModalOpen}\n document={editingDocument}\n errorMessage={documentModalErrorMessage || undefined}\n onSave={handleSaveDocument}\n onClose={handleDocumentModalClose}\n isSubmitting={isSubmitting}\n />,\n document.body\n )}\n {showGenerateQuoteModal &&\n createPortal(\n <ConfirmationModal\n open={showGenerateQuoteModal}\n title={dictionary.generateQuoteModalTitle}\n message={dictionary.generateQuoteModalMessage}\n cancelLabel={dictionary.generateQuoteModalCancel}\n confirmLabel={\n isGeneratingQuote\n ? dictionary.generateQuoteModalConfirmLoading\n : dictionary.generateQuoteModalConfirm\n }\n onCancel={handleGenerateQuoteModalCancel}\n onConfirm={isGeneratingQuote ? undefined : handleGenerateQuote}\n showCloseButton={true}\n confirmationBanner={generateQuoteModalBanner}\n data-testid=\"generate-quote-confirmation-modal\"\n />,\n document.body\n )}\n {showAcceptModal &&\n createPortal(\n <ConfirmationModal\n open={showAcceptModal}\n title={dictionary.acceptModalTitle}\n message={dictionary.acceptModalMessage}\n cancelLabel={dictionary.acceptModalCancel}\n confirmLabel={\n isAccepting\n ? dictionary.acceptModalConfirmLoading\n : dictionary.acceptModalConfirm\n }\n onCancel={handleAcceptModalCancel}\n onConfirm={isAccepting ? undefined : handleAcceptQuote}\n showCloseButton={true}\n confirmationBanner={acceptModalBanner}\n data-testid=\"accept-confirmation-modal\"\n />,\n document.body\n )}\n </>\n );\n};\n"],"names":["ManageNegotiableQuoteTemplate","className","loading","templateName","templateId","banner","details","actionBar","referenceDocuments","itemsTable","commentsTitle","comments","footer","props","ManageNegotiableQuoteTemplateSkeleton","jsxs","classes","jsx","VComponent","Skeleton","SkeletonRow","ReferenceDocumentFormModal","open","document","errorMessage","errorBanner","successBanner","showCloseButton","isSubmitting","onSave","onClose","documentName","setDocumentName","useState","documentIdentifier","setDocumentIdentifier","referenceUrl","setReferenceUrl","errors","setErrors","dictionary","useText","displayErrorBanner","InLineAlert","WarningFilled","isEditMode","useEffect","validateUrl","useCallback","url","handleSave","newErrors","handleClose","Modal","Fragment","Input","e","Button","ReferenceDocumentsList","documents","isEditable","onAdd","onEdit","onRemove","formatDocumentDisplay","doc","handleDocumentClick","useReferenceDocumentLinks","params","templateReferenceDocuments","localReferenceDocuments","isDocumentInTemplateData","templateDoc","getNewDocuments","getReferenceDocumentLinks","hasUnsavedChanges","useMemo","slots","onActionsButtonClick","onSendForReview","templateData","setTemplateData","setLoading","comment","setComment","setIsSubmitting","isDeleteDialogOpen","setIsDeleteDialogOpen","deleteError","setDeleteError","deleteSuccess","setDeleteSuccess","isCancelDialogOpen","setIsCancelDialogOpen","cancelError","setCancelError","cancelSuccess","setCancelSuccess","setReferenceDocuments","isDocumentModalOpen","setIsDocumentModalOpen","editingDocument","setEditingDocument","documentModalErrorMessage","setDocumentModalErrorMessage","showGenerateQuoteModal","setShowGenerateQuoteModal","isGeneratingQuote","setIsGeneratingQuote","generateQuoteSuccessMessage","setGenerateQuoteSuccessMessage","generateQuoteErrorMessage","setGenerateQuoteErrorMessage","showAcceptModal","setShowAcceptModal","isAccepting","setIsAccepting","acceptSuccessMessage","setAcceptSuccessMessage","acceptErrorMessage","setAcceptErrorMessage","hasAutoOpened","useRef","quoteTemplateDataEvent","events","data","NegotiableQuoteTemplateStatus","openQuoteTemplate","error","handleDeleteCancel","handleDeleteConfirm","deleteQuoteTemplate","handleDismissError","handleDismissSuccess","handleCancelCancel","handleCancelConfirm","cancelQuoteTemplate","handleDismissCancelError","handleDismissCancelSuccess","handleSendForReview","referenceDocumentLinks","sendQuoteTemplateForReview","handleAddDocument","handleEditDocument","handleRemoveDocument","prev","handleSaveDocument","handleDocumentModalClose","handleGenerateQuote","generateQuoteFromTemplate","handleGenerateQuoteModalCancel","handleAcceptQuote","acceptQuoteTemplate","handleAcceptModalCancel","Slot","expirationDate","formattedDate","buttons","handleActionsButtonClick","action","ActionsBar","button","status","referenceDocumentsNode","shouldShowTitle","title","TabbedContent","ItemsQuotedTemplate","QuoteTemplateCommentsList","QuoteTemplateHistoryLog","TextArea","showAcceptButton","deleteErrorBanner","deleteBanner","CheckWithCircle","cancelErrorBanner","cancelBanner","manageNegotiableQuoteTemplateProps","generateQuoteModalBanner","Icon","acceptModalBanner","ManageNegotiableQuoteTemplateComponent","createPortal","ConfirmationModal"],"mappings":"+mDA8BO,MAAMA,GAAuF,CAAC,CACnG,U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aA,EAAW,yBACxB,aACEmE,GACInE,EAAW,iCACXA,EAAW,0BAEjB,SAAU8G,GACV,UAAW3C,GAAoB,OAAYyC,GAC3C,gBAAiB,GACjB,mBAAoB8B,GACpB,cAAY,mCAAA,CAAA,EAEd,SAAS,IAAA,EAEZjE,IACCqE,EACErK,EAACsK,EAAA,CACC,KAAMtE,GACN,MAAOzE,EAAW,iBAClB,QAASA,EAAW,mBACpB,YAAaA,EAAW,kBACxB,aACE2E,GACI3E,EAAW,0BACXA,EAAW,mBAEjB,SAAUiH,GACV,UAAWtC,GAAc,OAAYoC,GACrC,gBAAiB,GACjB,mBAAoB6B,GACpB,cAAY,2BAAA,CAAA,EAEd,SAAS,IAAA,CACX,EACJ,CAEJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OrderSummaryLineItem } from '../../components';
|
|
2
|
+
import { NegotiableQuoteModel } from '../../data/models';
|
|
3
|
+
import { Container } from '@dropins/tools/types/elsie/src/lib';
|
|
4
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
5
|
+
|
|
6
|
+
export interface OrderSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
showTotalSaved?: boolean;
|
|
8
|
+
updateLineItems?: (lineItems: Array<OrderSummaryLineItem>) => Array<OrderSummaryLineItem>;
|
|
9
|
+
}
|
|
10
|
+
export declare const OrderSummary: Container<OrderSummaryProps, NegotiableQuoteModel | null>;
|
|
11
|
+
//# sourceMappingURL=OrderSummary.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './OrderSummary';
|
|
10
|
+
export { OrderSummary as default } from './OrderSummary';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsxs as u,jsx as t,Fragment as _e}from"@dropins/tools/preact-jsx-runtime.js";import{VComponent as M,classes as Ee}from"@dropins/tools/lib.js";/* empty css */import{Accordion as Ce,AccordionSection as fe,Divider as we,Price as l,Icon as Me}from"@dropins/tools/components.js";import{O as s}from"../chunks/OrderSummaryLine.js";import*as H from"@dropins/tools/preact-compat.js";import{useState as Se,useEffect as Ze}from"@dropins/tools/preact-compat.js";import{S as ve}from"../chunks/ChevronDown.js";import{useText as Ne}from"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";/* empty css *//* empty css */import{s as He,Q as Z}from"../chunks/state.js";import{events as Ve}from"@dropins/tools/event-bus.js";const Le=m=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...m},H.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square",strokeLinejoin:"round"})),Ie=m=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...m},H.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M22 6.25H22.75C22.75 5.83579 22.4142 5.5 22 5.5V6.25ZM22 9.27L22.2514 9.97663C22.5503 9.87029 22.75 9.58731 22.75 9.27H22ZM20.26 12.92L19.5534 13.1714L19.5539 13.1728L20.26 12.92ZM22 14.66H22.75C22.75 14.3433 22.551 14.0607 22.2528 13.9539L22 14.66ZM22 17.68V18.43C22.4142 18.43 22.75 18.0942 22.75 17.68H22ZM2 17.68H1.25C1.25 18.0942 1.58579 18.43 2 18.43V17.68ZM2 14.66L1.74865 13.9534C1.44969 14.0597 1.25 14.3427 1.25 14.66H2ZM3.74 11.01L4.44663 10.7586L4.44611 10.7572L3.74 11.01ZM2 9.27H1.25C1.25 9.58675 1.44899 9.86934 1.7472 9.97611L2 9.27ZM2 6.25V5.5C1.58579 5.5 1.25 5.83579 1.25 6.25H2ZM21.25 6.25V9.27H22.75V6.25H21.25ZM21.7486 8.56337C19.8706 9.23141 18.8838 11.2889 19.5534 13.1714L20.9666 12.6686C20.5762 11.5711 21.1494 10.3686 22.2514 9.97663L21.7486 8.56337ZM19.5539 13.1728C19.9195 14.1941 20.7259 15.0005 21.7472 15.3661L22.2528 13.9539C21.6541 13.7395 21.1805 13.2659 20.9661 12.6672L19.5539 13.1728ZM21.25 14.66V17.68H22.75V14.66H21.25ZM22 16.93H2V18.43H22V16.93ZM2.75 17.68V14.66H1.25V17.68H2.75ZM2.25135 15.3666C4.12941 14.6986 5.11623 12.6411 4.44663 10.7586L3.03337 11.2614C3.42377 12.3589 2.85059 13.5614 1.74865 13.9534L2.25135 15.3666ZM4.44611 10.7572C4.08045 9.73588 3.27412 8.92955 2.2528 8.56389L1.7472 9.97611C2.34588 10.1905 2.81955 10.6641 3.03389 11.2628L4.44611 10.7572ZM2.75 9.27V6.25H1.25V9.27H2.75ZM2 7H22V5.5H2V7ZM7.31 6.74V18.17H8.81V6.74H7.31ZM17.0997 8.39967L11.0397 14.4597L12.1003 15.5203L18.1603 9.46033L17.0997 8.39967ZM12.57 9.67C12.57 9.87231 12.4159 10 12.27 10V11.5C13.2839 11.5 14.07 10.6606 14.07 9.67H12.57ZM12.27 10C12.1241 10 11.97 9.87231 11.97 9.67H10.47C10.47 10.6606 11.2561 11.5 12.27 11.5V10ZM11.97 9.67C11.97 9.46769 12.1241 9.34 12.27 9.34V7.84C11.2561 7.84 10.47 8.67938 10.47 9.67H11.97ZM12.27 9.34C12.4159 9.34 12.57 9.46769 12.57 9.67H14.07C14.07 8.67938 13.2839 7.84 12.27 7.84V9.34ZM17.22 14.32C17.22 14.5223 17.0659 14.65 16.92 14.65V16.15C17.9339 16.15 18.72 15.3106 18.72 14.32H17.22ZM16.92 14.65C16.7741 14.65 16.62 14.5223 16.62 14.32H15.12C15.12 15.3106 15.9061 16.15 16.92 16.15V14.65ZM16.62 14.32C16.62 14.1177 16.7741 13.99 16.92 13.99V12.49C15.9061 12.49 15.12 13.3294 15.12 14.32H16.62ZM16.92 13.99C17.0659 13.99 17.22 14.1177 17.22 14.32H18.72C18.72 13.3294 17.9339 12.49 16.92 12.49V13.99Z",fill:"currentColor"})),ke=({className:m,children:V,variant:T="primary",heading:y,subTotal:d,shipping:e,discounts:g,taxTotal:c,taxesApplied:r,total:n,totalSaved:b,updateLineItems:C=p=>p,...f})=>{const[p,x]=Se(!1),o=Ne({taxesBreakdownTitle:"NegotiableQuote.PriceSummary.taxes.breakdown",taxTotal:"NegotiableQuote.PriceSummary.taxes.total",taxTotalOnly:"NegotiableQuote.PriceSummary.taxes.totalOnly",showTaxBreakdown:"NegotiableQuote.PriceSummary.taxes.showBreakdown",hideTaxBreakdown:"NegotiableQuote.PriceSummary.taxes.hideBreakdown",subtotalLabel:"NegotiableQuote.PriceSummary.subTotal.label",subtotalWithTaxes:"NegotiableQuote.PriceSummary.subTotal.withTaxes",subtotalWithoutTaxes:"NegotiableQuote.PriceSummary.subTotal.withoutTaxes",shippingLabel:"NegotiableQuote.PriceSummary.shipping.label",shippingWithTaxes:"NegotiableQuote.PriceSummary.shipping.withTaxes",shippingWithoutTaxes:"NegotiableQuote.PriceSummary.shipping.withoutTaxes",totalLabel:"NegotiableQuote.PriceSummary.total.label",totalWithoutTax:"NegotiableQuote.PriceSummary.total.withoutTax",totalSaved:"NegotiableQuote.PriceSummary.total.saved"}),v=d&&u(s,{label:o.subtotalLabel,price:d.price,classSuffixes:["subTotal"],children:[d.taxIncluded&&t("div",{"data-testid":"sub-total-tax-caption",className:"quote-order-summary__caption",children:t("span",{children:o.subtotalWithTaxes})}),d.taxExcluded?t("div",{"data-testid":"sub-total-tax-caption-excluded",className:"quote-order-summary__caption",children:u("span",{children:[d.priceExcludingTax," ",o.subtotalWithoutTaxes]})}):void 0]},o.subtotalLabel),L=e&&u(s,{label:o.shippingLabel,price:e.price,classSuffixes:["shipping"],children:[e.taxIncluded&&t("div",{"data-testid":"shipping-tax-caption",className:"quote-order-summary__caption",children:t("span",{children:o.shippingWithTaxes})}),e.taxExcluded?t("div",{"data-testid":"shipping-tax-caption-excluded",className:"quote-order-summary__caption",children:u("span",{children:[e.priceExcludingTax," ",o.shippingWithoutTaxes]})}):void 0]},o.shippingLabel),S=g&&g.length>0&&t(_e,{children:g.map(a=>u(s,{label:a.label,price:a.price,classSuffixes:["discount"],children:[a.coupon&&t(M,{node:a.coupon,className:"quote-order-summary__coupon__code"}),a.caption&&t(M,{node:a.caption,className:"quote-order-summary__caption"})]},a.label))}),N=r&&r.length>0?t(Ce,{"data-testid":"tax-breakdown",className:"quote-order-summary__taxes",iconOpen:ve,iconClose:Le,children:u(fe,{ariaLabelTitle:o.taxesBreakdownTitle,title:o.taxesBreakdownTitle,secondaryText:!p&&c?t(M,{node:c.price,className:"quote-order-summary__price"}):void 0,renderContentWhenClosed:!1,onStateChange:x,children:[t("div",{className:"quote-order-summary__appliedTaxes",children:r.map(a=>t(s,{label:a.label,price:a.price,classSuffixes:["taxEntry"],labelClassSuffix:"muted"},a.label))}),c&&t(s,{label:o.taxTotal,price:c.price,classSuffixes:["taxTotal"],labelClassSuffix:"muted"})]})}):c&&t(s,{label:o.taxTotalOnly,price:c.price,classSuffixes:["taxTotal"],testId:"tax-total-only"}),_=[{key:"subTotalContent",sortOrder:100,content:v},{key:"shippingContent",sortOrder:200,content:L},{key:"discountsContent",sortOrder:600,content:S},{key:"taxContent",sortOrder:800,content:N},...n?[{key:"totalContent",sortOrder:900,content:t(s,{label:o.totalLabel,price:n.price,classSuffixes:["total","total--padded"],testId:"total-content",labelClassSuffix:"bold"})}]:[],...n!=null&&n.priceWithoutTax?[{key:"totalWithoutTaxContent",sortOrder:1e3,content:t(s,{label:o.totalWithoutTax,price:n.priceWithoutTax,classSuffixes:["totalWithoutTax"],testId:"total-without-tax",labelClassSuffix:"muted"})}]:[],...b?[{key:"totalSavedContent",sortOrder:1100,content:t(s,{label:o.totalSaved,price:b,classSuffixes:["saved"],testId:"total-saved",labelClassSuffix:"muted"})}]:[]],E=C(_).sort((a,h)=>a.sortOrder-h.sortOrder);return u("div",{...f,className:Ee(["quote-order-summary",[`quote-order-summary__${T}`,T],m]),children:[u("div",{className:"quote-order-summary__heading",children:[y&&t(M,{node:y,className:"quote-order-summary__heading-text"}),t(we,{variant:"primary",className:"quote-order-summary__divider-primary"})]}),t("div",{className:"quote-order-summary__content",children:E.map(a=>Array.isArray(a.content)?t(Ce,{className:a.className,actionIconPosition:"right",iconOpen:ve,iconClose:Le,children:t(fe,{defaultOpen:!1,title:a.title,renderContentWhenClosed:!1,children:a.content.map(h=>h.content)})},a.key):a.content)})]})},Re=({children:m,initialData:V=null,showTotalSaved:T,updateLineItems:y=e=>e,...d})=>{var o,v,L,S,N,_,E,a,h,I,k,O,P,Q,W,B,A,D,q,U,X,j,z,$,F,R,G,J,K,Y,ee,te,re,ae,oe,ie,ne,le,ce,se,ue,de,me,pe,xe,he,ge,be,Te,ye;const[e,g]=Se(V),c=e==null?void 0:e.isVirtual,{quoteDisplaySettings:r}=He.config,n=!!(r!=null&&r.zeroTax),b=(r==null?void 0:r.subtotal)===Z.TAX_INCLUDED,C=(r==null?void 0:r.subtotal)===Z.TAX_INCLUDED_AND_EXCLUDED,f=(r==null?void 0:r.shipping)===Z.TAX_INCLUDED,p=(r==null?void 0:r.shipping)===Z.TAX_INCLUDED_AND_EXCLUDED;Ze(()=>{const i=Ve.on("quote-management/quote-data",w=>{g(w.quote)},{eager:!0});return()=>{i==null||i.off()}},[]);const x=Ne({free:"NegotiableQuote.PriceSummary.total.free",orderSummary:"NegotiableQuote.PriceSummary.orderSummary",taxToBeDetermined:"NegotiableQuote.PriceSummary.taxToBeDetermined"});return Object.keys(e??{}).length?t(ke,{...d,"data-testid":"quote-order-summary",heading:t("div",{children:x.orderSummary}),updateLineItems:y,subTotal:{taxIncluded:b&&!n,taxExcluded:C,priceExcludingTax:t(l,{"data-testid":"subtotal",amount:(v=(o=e==null?void 0:e.prices)==null?void 0:o.subtotalExcludingTax)==null?void 0:v.value,currency:(S=(L=e==null?void 0:e.prices)==null?void 0:L.subtotalExcludingTax)==null?void 0:S.currency}),price:!n&&b||!n&&C?t(l,{"data-testid":"subtotal",amount:(_=(N=e==null?void 0:e.prices)==null?void 0:N.subtotalIncludingTax)==null?void 0:_.value,currency:(a=(E=e==null?void 0:e.prices)==null?void 0:E.subtotalIncludingTax)==null?void 0:a.currency}):t(l,{"data-testid":"subtotal",amount:(I=(h=e==null?void 0:e.prices)==null?void 0:h.subtotalExcludingTax)==null?void 0:I.value,currency:(O=(k=e==null?void 0:e.prices)==null?void 0:k.subtotalExcludingTax)==null?void 0:O.currency})},shipping:{taxIncluded:f&&!n,taxExcluded:p,priceExcludingTax:t(l,{"data-testid":"shipping",amount:(Q=(P=e==null?void 0:e.prices)==null?void 0:P.shippingExcludingTax)==null?void 0:Q.value,currency:(B=(W=e==null?void 0:e.prices)==null?void 0:W.shippingExcludingTax)==null?void 0:B.currency}),price:!n&&f||!n&&p?t(l,{"data-testid":"shipping",amount:(D=(A=e==null?void 0:e.prices)==null?void 0:A.shippingIncludingTax)==null?void 0:D.value,currency:(U=(q=e==null?void 0:e.prices)==null?void 0:q.shippingIncludingTax)==null?void 0:U.currency}):t(l,{"data-testid":"shipping",amount:(j=(X=e==null?void 0:e.prices)==null?void 0:X.shippingExcludingTax)==null?void 0:j.value,currency:($=(z=e==null?void 0:e.prices)==null?void 0:z.shippingExcludingTax)==null?void 0:$.currency})},discounts:(R=(F=e==null?void 0:e.prices)==null?void 0:F.appliedDiscounts)==null?void 0:R.map(i=>{var w;return{label:i.label,price:t(l,{"data-testid":"summary-discount-total",amount:-i.amount.value,currency:i.amount.currency,sale:!0}),coupon:i!=null&&i.coupon?u("span",{children:[t(Me,{source:Ie,size:"16"}),(w=i==null?void 0:i.coupon)==null?void 0:w.code]}):void 0}}),taxTotal:c&&!((J=(G=e==null?void 0:e.prices)==null?void 0:G.appliedTaxes)!=null&&J.length)?{price:t("span",{"data-testid":"tax-total-tbd",children:x.taxToBeDetermined})}:{price:t(l,{"data-testid":"tax-total-actual",amount:(Y=(K=e==null?void 0:e.prices)==null?void 0:K.totalTax)==null?void 0:Y.value,currency:(te=(ee=e==null?void 0:e.prices)==null?void 0:ee.totalTax)==null?void 0:te.currency})},taxesApplied:c?void 0:r!=null&&r.fullSummary?(ae=(re=e==null?void 0:e.prices)==null?void 0:re.appliedTaxes)==null?void 0:ae.map(i=>({label:i.label,price:t(l,{"data-testid":"applied-taxes",amount:i.amount.value,currency:i.amount.currency})})):void 0,total:{price:((ie=(oe=e==null?void 0:e.prices)==null?void 0:oe.grandTotal)==null?void 0:ie.value)===0?t("span",{"data-testid":"total-including-tax",children:x.free}):t(l,{"data-testid":"total-including-tax-actual",amount:(le=(ne=e==null?void 0:e.prices)==null?void 0:ne.grandTotal)==null?void 0:le.value,currency:(se=(ce=e==null?void 0:e.prices)==null?void 0:ce.grandTotal)==null?void 0:se.currency}),priceWithoutTax:r!=null&&r.grandTotal?((de=(ue=e==null?void 0:e.prices)==null?void 0:ue.grandTotalExcludingTax)==null?void 0:de.value)===0?t("span",{"data-testid":"total-excluding-tax",children:x.free}):t(l,{"data-testid":"total-excluding-tax",amount:(pe=(me=e==null?void 0:e.prices)==null?void 0:me.grandTotalExcludingTax)==null?void 0:pe.value,currency:(he=(xe=e==null?void 0:e.prices)==null?void 0:xe.grandTotalExcludingTax)==null?void 0:he.currency}):void 0},totalSaved:T?t(l,{amount:(be=(ge=e==null?void 0:e.prices)==null?void 0:ge.discount)==null?void 0:be.value,currency:(ye=(Te=e==null?void 0:e.prices)==null?void 0:Te.grandTotal)==null?void 0:ye.currency}):void 0}):null};export{Re as OrderSummary,Re as default};
|
|
4
|
+
//# sourceMappingURL=OrderSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderSummary.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/ChevronUp.svg","../../node_modules/@adobe-commerce/elsie/src/icons/Coupon.svg","/@dropins/storefront-quote-management/src/components/OrderSummary/OrderSummary.tsx","/@dropins/storefront-quote-management/src/containers/OrderSummary/OrderSummary.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgChevronUp = (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\", { d: \"M7.74512 14.132L12.0001 9.87701L16.2551 14.132\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"square\", strokeLinejoin: \"round\" }));\nexport default SvgChevronUp;\n","import * as React from \"react\";\nconst SvgCoupon = (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\", d: \"M22 6.25H22.75C22.75 5.83579 22.4142 5.5 22 5.5V6.25ZM22 9.27L22.2514 9.97663C22.5503 9.87029 22.75 9.58731 22.75 9.27H22ZM20.26 12.92L19.5534 13.1714L19.5539 13.1728L20.26 12.92ZM22 14.66H22.75C22.75 14.3433 22.551 14.0607 22.2528 13.9539L22 14.66ZM22 17.68V18.43C22.4142 18.43 22.75 18.0942 22.75 17.68H22ZM2 17.68H1.25C1.25 18.0942 1.58579 18.43 2 18.43V17.68ZM2 14.66L1.74865 13.9534C1.44969 14.0597 1.25 14.3427 1.25 14.66H2ZM3.74 11.01L4.44663 10.7586L4.44611 10.7572L3.74 11.01ZM2 9.27H1.25C1.25 9.58675 1.44899 9.86934 1.7472 9.97611L2 9.27ZM2 6.25V5.5C1.58579 5.5 1.25 5.83579 1.25 6.25H2ZM21.25 6.25V9.27H22.75V6.25H21.25ZM21.7486 8.56337C19.8706 9.23141 18.8838 11.2889 19.5534 13.1714L20.9666 12.6686C20.5762 11.5711 21.1494 10.3686 22.2514 9.97663L21.7486 8.56337ZM19.5539 13.1728C19.9195 14.1941 20.7259 15.0005 21.7472 15.3661L22.2528 13.9539C21.6541 13.7395 21.1805 13.2659 20.9661 12.6672L19.5539 13.1728ZM21.25 14.66V17.68H22.75V14.66H21.25ZM22 16.93H2V18.43H22V16.93ZM2.75 17.68V14.66H1.25V17.68H2.75ZM2.25135 15.3666C4.12941 14.6986 5.11623 12.6411 4.44663 10.7586L3.03337 11.2614C3.42377 12.3589 2.85059 13.5614 1.74865 13.9534L2.25135 15.3666ZM4.44611 10.7572C4.08045 9.73588 3.27412 8.92955 2.2528 8.56389L1.7472 9.97611C2.34588 10.1905 2.81955 10.6641 3.03389 11.2628L4.44611 10.7572ZM2.75 9.27V6.25H1.25V9.27H2.75ZM2 7H22V5.5H2V7ZM7.31 6.74V18.17H8.81V6.74H7.31ZM17.0997 8.39967L11.0397 14.4597L12.1003 15.5203L18.1603 9.46033L17.0997 8.39967ZM12.57 9.67C12.57 9.87231 12.4159 10 12.27 10V11.5C13.2839 11.5 14.07 10.6606 14.07 9.67H12.57ZM12.27 10C12.1241 10 11.97 9.87231 11.97 9.67H10.47C10.47 10.6606 11.2561 11.5 12.27 11.5V10ZM11.97 9.67C11.97 9.46769 12.1241 9.34 12.27 9.34V7.84C11.2561 7.84 10.47 8.67938 10.47 9.67H11.97ZM12.27 9.34C12.4159 9.34 12.57 9.46769 12.57 9.67H14.07C14.07 8.67938 13.2839 7.84 12.27 7.84V9.34ZM17.22 14.32C17.22 14.5223 17.0659 14.65 16.92 14.65V16.15C17.9339 16.15 18.72 15.3106 18.72 14.32H17.22ZM16.92 14.65C16.7741 14.65 16.62 14.5223 16.62 14.32H15.12C15.12 15.3106 15.9061 16.15 16.92 16.15V14.65ZM16.62 14.32C16.62 14.1177 16.7741 13.99 16.92 13.99V12.49C15.9061 12.49 15.12 13.3294 15.12 14.32H16.62ZM16.92 13.99C17.0659 13.99 17.22 14.1177 17.22 14.32H18.72C18.72 13.3294 17.9339 12.49 16.92 12.49V13.99Z\", fill: \"currentColor\" }));\nexport default SvgCoupon;\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/OrderSummary/OrderSummary.css';\nimport { OrderSummaryLine } from '@/quote-management/containers/OrderSummaryLine/OrderSummaryLine';\nimport {\n Accordion,\n AccordionSection,\n Divider,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { ChevronDown, ChevronUp } from '@adobe-commerce/elsie/icons';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useState } from 'preact/compat';\nimport { JSXInternal } from 'preact/src/jsx';\n\nexport interface OrderSummaryLineItem {\n key: string;\n title?: string;\n className?: string;\n sortOrder: number;\n content:\n | string\n | JSXInternal.Element\n | VNode<HTMLAttributes<HTMLDivElement>>\n | OrderSummaryLineItem[]\n | undefined;\n}\n\nexport interface OrderSummaryProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n heading?: VNode<HTMLAttributes<HTMLDivElement>>;\n subTotal?: {\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n priceExcludingTax?: VNode<HTMLAttributes<HTMLSpanElement>>;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n };\n shipping?: {\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n priceExcludingTax?: VNode<HTMLAttributes<HTMLSpanElement>>;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n };\n discounts?: {\n label: string;\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n caption?: VNode<HTMLAttributes<HTMLDivElement>>;\n coupon?: VNode<HTMLAttributes<HTMLSpanElement>>;\n }[];\n taxTotal?: {\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n };\n taxesApplied?: {\n label: string;\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n }[];\n total?: {\n price: VNode<HTMLAttributes<HTMLSpanElement>>;\n priceWithoutTax?: VNode<HTMLAttributes<HTMLSpanElement>>;\n };\n totalSaved?: VNode<HTMLAttributes<HTMLSpanElement>>;\n updateLineItems?: (\n lineItems: Array<OrderSummaryLineItem>\n ) => Array<OrderSummaryLineItem>;\n}\n\nexport const OrderSummary: FunctionComponent<OrderSummaryProps> = ({\n className,\n children,\n variant = 'primary',\n heading,\n subTotal,\n shipping,\n discounts,\n taxTotal,\n taxesApplied,\n total,\n totalSaved,\n updateLineItems = (lineItems) => lineItems,\n ...props\n}) => {\n const [showTaxBreakdown, setShowTaxBreakdown] = useState(false);\n\n const translations = useText({\n // Taxes\n taxesBreakdownTitle: 'NegotiableQuote.PriceSummary.taxes.breakdown',\n taxTotal: 'NegotiableQuote.PriceSummary.taxes.total',\n taxTotalOnly: 'NegotiableQuote.PriceSummary.taxes.totalOnly',\n showTaxBreakdown: 'NegotiableQuote.PriceSummary.taxes.showBreakdown',\n hideTaxBreakdown: 'NegotiableQuote.PriceSummary.taxes.hideBreakdown',\n\n // Subtotal\n subtotalLabel: 'NegotiableQuote.PriceSummary.subTotal.label',\n subtotalWithTaxes: 'NegotiableQuote.PriceSummary.subTotal.withTaxes',\n subtotalWithoutTaxes: 'NegotiableQuote.PriceSummary.subTotal.withoutTaxes',\n\n // Shipping\n shippingLabel: 'NegotiableQuote.PriceSummary.shipping.label',\n shippingWithTaxes: 'NegotiableQuote.PriceSummary.shipping.withTaxes',\n shippingWithoutTaxes: 'NegotiableQuote.PriceSummary.shipping.withoutTaxes',\n\n // Total\n totalLabel: 'NegotiableQuote.PriceSummary.total.label',\n totalWithoutTax: 'NegotiableQuote.PriceSummary.total.withoutTax',\n totalSaved: 'NegotiableQuote.PriceSummary.total.saved',\n });\n\n const subTotalContent = subTotal && (\n <OrderSummaryLine\n key={translations.subtotalLabel}\n label={translations.subtotalLabel}\n price={subTotal.price}\n classSuffixes={['subTotal']}\n >\n {subTotal.taxIncluded && (\n <div\n data-testid=\"sub-total-tax-caption\"\n className=\"quote-order-summary__caption\"\n >\n <span>{translations.subtotalWithTaxes}</span>\n </div>\n )}\n\n {subTotal.taxExcluded ? (\n <div\n data-testid=\"sub-total-tax-caption-excluded\"\n className=\"quote-order-summary__caption\"\n >\n <span>\n {subTotal.priceExcludingTax}\n \n {translations.subtotalWithoutTaxes}\n </span>\n </div>\n ) : undefined}\n </OrderSummaryLine>\n );\n\n const shippingContent = shipping && (\n <OrderSummaryLine\n key={translations.shippingLabel}\n label={translations.shippingLabel}\n price={shipping.price}\n classSuffixes={['shipping']}\n >\n {shipping.taxIncluded && (\n <div\n data-testid=\"shipping-tax-caption\"\n className=\"quote-order-summary__caption\"\n >\n <span>{translations.shippingWithTaxes}</span>\n </div>\n )}\n\n {shipping.taxExcluded ? (\n <div\n data-testid=\"shipping-tax-caption-excluded\"\n className=\"quote-order-summary__caption\"\n >\n <span>\n {shipping.priceExcludingTax}\n \n {translations.shippingWithoutTaxes}\n </span>\n </div>\n ) : undefined}\n </OrderSummaryLine>\n );\n\n const discountsContent = discounts && discounts.length > 0 && (\n <>\n {discounts.map((discount) => (\n <OrderSummaryLine\n key={discount.label}\n label={discount.label}\n price={discount.price}\n classSuffixes={['discount']}\n >\n {discount.coupon && (\n <VComponent\n node={discount.coupon}\n className=\"quote-order-summary__coupon__code\"\n />\n )}\n\n {discount.caption && (\n <VComponent\n node={discount.caption}\n className=\"quote-order-summary__caption\"\n />\n )}\n </OrderSummaryLine>\n ))}\n </>\n );\n\n const taxContent =\n taxesApplied && taxesApplied.length > 0 ? (\n /* Show breakdown if provided */\n <Accordion\n data-testid=\"tax-breakdown\"\n className=\"quote-order-summary__taxes\"\n iconOpen={ChevronDown}\n iconClose={ChevronUp}\n >\n <AccordionSection\n ariaLabelTitle={translations.taxesBreakdownTitle}\n title={translations.taxesBreakdownTitle}\n secondaryText={\n !showTaxBreakdown && taxTotal ? (\n <VComponent\n node={taxTotal.price}\n className=\"quote-order-summary__price\"\n />\n ) : undefined\n }\n renderContentWhenClosed={false}\n onStateChange={setShowTaxBreakdown}\n >\n <div className=\"quote-order-summary__appliedTaxes\">\n {taxesApplied.map((tax) => (\n <OrderSummaryLine\n key={tax.label}\n label={tax.label}\n price={tax.price}\n classSuffixes={['taxEntry']}\n labelClassSuffix=\"muted\"\n />\n ))}\n </div>\n\n {taxTotal && (\n <OrderSummaryLine\n label={translations.taxTotal}\n price={taxTotal.price}\n classSuffixes={['taxTotal']}\n labelClassSuffix=\"muted\"\n />\n )}\n </AccordionSection>\n </Accordion>\n ) : (\n taxTotal && (\n <OrderSummaryLine\n label={translations.taxTotalOnly}\n price={taxTotal.price}\n classSuffixes={['taxTotal']}\n testId=\"tax-total-only\"\n />\n )\n );\n\n const lineItems: Array<OrderSummaryLineItem> = [\n {\n key: 'subTotalContent',\n sortOrder: 100,\n content: subTotalContent,\n },\n {\n key: 'shippingContent',\n sortOrder: 200,\n content: shippingContent,\n },\n {\n key: 'discountsContent',\n sortOrder: 600,\n content: discountsContent,\n },\n {\n key: 'taxContent',\n sortOrder: 800,\n content: taxContent,\n },\n ...(total\n ? [\n {\n key: 'totalContent',\n sortOrder: 900,\n content: (\n <OrderSummaryLine\n label={translations.totalLabel}\n price={total.price}\n classSuffixes={['total', 'total--padded']}\n testId=\"total-content\"\n labelClassSuffix=\"bold\"\n />\n ),\n },\n ]\n : []),\n ...(total?.priceWithoutTax\n ? [\n {\n key: 'totalWithoutTaxContent',\n sortOrder: 1000,\n content: (\n <OrderSummaryLine\n label={translations.totalWithoutTax}\n price={total.priceWithoutTax}\n classSuffixes={['totalWithoutTax']}\n testId=\"total-without-tax\"\n labelClassSuffix=\"muted\"\n />\n ),\n },\n ]\n : []),\n ...(totalSaved\n ? [\n {\n key: 'totalSavedContent',\n sortOrder: 1100,\n content: (\n <OrderSummaryLine\n label={translations.totalSaved}\n price={totalSaved}\n classSuffixes={['saved']}\n testId=\"total-saved\"\n labelClassSuffix=\"muted\"\n />\n ),\n },\n ]\n : []),\n ];\n\n const updatedLineItems: Array<OrderSummaryLineItem> = updateLineItems(\n lineItems\n ).sort(\n (currentLine: OrderSummaryLineItem, nextLine: OrderSummaryLineItem) => {\n return currentLine.sortOrder - nextLine.sortOrder;\n }\n );\n\n return (\n <div\n {...props}\n className={classes([\n 'quote-order-summary',\n [`quote-order-summary__${variant}`, variant],\n className,\n ])}\n >\n <div className=\"quote-order-summary__heading\">\n {heading && (\n <VComponent\n node={heading}\n className=\"quote-order-summary__heading-text\"\n />\n )}\n\n <Divider\n variant=\"primary\"\n className=\"quote-order-summary__divider-primary\"\n />\n </div>\n\n <div className=\"quote-order-summary__content\">\n {updatedLineItems.map((line: OrderSummaryLineItem) => {\n if (Array.isArray(line.content)) {\n return (\n <Accordion\n key={line.key}\n className={line.className}\n actionIconPosition={'right'}\n iconOpen={ChevronDown}\n iconClose={ChevronUp}\n >\n <AccordionSection\n defaultOpen={false}\n title={line.title}\n renderContentWhenClosed={false}\n >\n {line.content.map((innerLine) => {\n return innerLine.content;\n })}\n </AccordionSection>\n </Accordion>\n );\n }\n return line.content;\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 {\n OrderSummary as OrderSummaryComponent,\n OrderSummaryLineItem,\n} from '@/quote-management/components';\nimport {\n NegotiableQuoteModel,\n QuoteDisplayAmount,\n} from '@/quote-management/data/models';\nimport { state } from '@/quote-management/lib/state';\nimport { Icon, Price } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Coupon } from '@adobe-commerce/elsie/icons';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { events } from '@adobe-commerce/event-bus';\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\n\nexport interface OrderSummaryProps extends HTMLAttributes<HTMLDivElement> {\n showTotalSaved?: boolean;\n updateLineItems?: (\n lineItems: Array<OrderSummaryLineItem>\n ) => Array<OrderSummaryLineItem>;\n}\n\nexport const OrderSummary: Container<\n OrderSummaryProps,\n NegotiableQuoteModel | null\n> = ({\n children,\n initialData = null,\n showTotalSaved,\n updateLineItems = (lineItems) => lineItems,\n ...props\n}) => {\n const [data, setData] = useState<NegotiableQuoteModel | null>(initialData);\n const isVirtual = data?.isVirtual;\n\n const { quoteDisplaySettings } = state.config;\n\n const isZeroTax = Boolean(quoteDisplaySettings?.zeroTax);\n\n const isTaxIncludedInSubtotal =\n quoteDisplaySettings?.subtotal === QuoteDisplayAmount.TAX_INCLUDED;\n const isTaxIncludedAndExcludedInSubtotal =\n quoteDisplaySettings?.subtotal ===\n QuoteDisplayAmount.TAX_INCLUDED_AND_EXCLUDED;\n\n const isTaxIncludedInShipping =\n quoteDisplaySettings?.shipping === QuoteDisplayAmount.TAX_INCLUDED;\n const isTaxIncludedAndExcludedInShipping =\n quoteDisplaySettings?.shipping ===\n QuoteDisplayAmount.TAX_INCLUDED_AND_EXCLUDED;\n\n useEffect(() => {\n const dataEvent = events.on(\n 'quote-management/quote-data',\n (payload) => {\n setData(payload.quote as NegotiableQuoteModel);\n },\n { eager: true }\n );\n\n return () => {\n dataEvent?.off();\n };\n }, []);\n\n const translations = useText({\n free: 'NegotiableQuote.PriceSummary.total.free',\n orderSummary: 'NegotiableQuote.PriceSummary.orderSummary',\n taxToBeDetermined: 'NegotiableQuote.PriceSummary.taxToBeDetermined',\n });\n\n if (!Object.keys(data ?? {}).length) {\n return null;\n }\n\n return (\n <OrderSummaryComponent\n {...props}\n data-testid=\"quote-order-summary\"\n heading={<div>{translations.orderSummary}</div>}\n updateLineItems={updateLineItems}\n subTotal={{\n taxIncluded: isTaxIncludedInSubtotal && !isZeroTax,\n taxExcluded: isTaxIncludedAndExcludedInSubtotal,\n priceExcludingTax: (\n <Price\n data-testid=\"subtotal\"\n amount={data?.prices?.subtotalExcludingTax?.value}\n currency={data?.prices?.subtotalExcludingTax?.currency}\n />\n ),\n price:\n (!isZeroTax && isTaxIncludedInSubtotal) ||\n (!isZeroTax && isTaxIncludedAndExcludedInSubtotal) ? (\n <Price\n data-testid=\"subtotal\"\n amount={data?.prices?.subtotalIncludingTax?.value}\n currency={data?.prices?.subtotalIncludingTax?.currency}\n />\n ) : (\n <Price\n data-testid=\"subtotal\"\n amount={data?.prices?.subtotalExcludingTax?.value}\n currency={data?.prices?.subtotalExcludingTax?.currency}\n />\n ),\n }}\n shipping={{\n taxIncluded: isTaxIncludedInShipping && !isZeroTax,\n taxExcluded: isTaxIncludedAndExcludedInShipping,\n priceExcludingTax: (\n <Price\n data-testid=\"shipping\"\n amount={data?.prices?.shippingExcludingTax?.value}\n currency={data?.prices?.shippingExcludingTax?.currency}\n />\n ),\n price:\n (!isZeroTax && isTaxIncludedInShipping) ||\n (!isZeroTax && isTaxIncludedAndExcludedInShipping) ? (\n <Price\n data-testid=\"shipping\"\n amount={data?.prices?.shippingIncludingTax?.value}\n currency={data?.prices?.shippingIncludingTax?.currency}\n />\n ) : (\n <Price\n data-testid=\"shipping\"\n amount={data?.prices?.shippingExcludingTax?.value}\n currency={data?.prices?.shippingExcludingTax?.currency}\n />\n ),\n }}\n discounts={data?.prices?.appliedDiscounts?.map((discount) => {\n return {\n label: discount.label,\n price: (\n <Price\n data-testid=\"summary-discount-total\"\n amount={-discount.amount.value}\n currency={discount.amount.currency}\n sale={true}\n />\n ),\n coupon: discount?.coupon ? (\n <span>\n <Icon source={Coupon} size=\"16\" />\n {discount?.coupon?.code}\n </span>\n ) : undefined,\n };\n })}\n taxTotal={\n isVirtual && !data?.prices?.appliedTaxes?.length\n ? {\n price: (\n <span data-testid=\"tax-total-tbd\">\n {translations.taxToBeDetermined}\n </span>\n ),\n }\n : {\n price: (\n <Price\n data-testid=\"tax-total-actual\"\n amount={data?.prices?.totalTax?.value}\n currency={data?.prices?.totalTax?.currency}\n />\n ),\n }\n }\n taxesApplied={\n isVirtual\n ? undefined\n : quoteDisplaySettings?.fullSummary\n ? data?.prices?.appliedTaxes?.map((tax: any) => ({\n label: tax.label,\n price: (\n <Price\n data-testid=\"applied-taxes\"\n amount={tax.amount.value}\n currency={tax.amount.currency}\n />\n ),\n }))\n : undefined\n }\n total={{\n price:\n data?.prices?.grandTotal?.value === 0 ? (\n <span data-testid=\"total-including-tax\">{translations.free}</span>\n ) : (\n <Price\n data-testid=\"total-including-tax-actual\"\n amount={data?.prices?.grandTotal?.value}\n currency={data?.prices?.grandTotal?.currency}\n />\n ),\n priceWithoutTax: quoteDisplaySettings?.grandTotal ? (\n data?.prices?.grandTotalExcludingTax?.value === 0 ? (\n <span data-testid=\"total-excluding-tax\">{translations.free}</span>\n ) : (\n <Price\n data-testid=\"total-excluding-tax\"\n amount={data?.prices?.grandTotalExcludingTax?.value}\n currency={data?.prices?.grandTotalExcludingTax?.currency}\n />\n )\n ) : undefined,\n }}\n totalSaved={\n showTotalSaved ? (\n <Price\n amount={data?.prices?.discount?.value}\n currency={data?.prices?.grandTotal?.currency}\n />\n ) : undefined\n }\n />\n );\n};\n"],"names":["SvgChevronUp","props","React","SvgCoupon","OrderSummary","className","children","variant","heading","subTotal","shipping","discounts","taxTotal","taxesApplied","total","totalSaved","updateLineItems","lineItems","showTaxBreakdown","setShowTaxBreakdown","useState","translations","useText","subTotalContent","jsxs","OrderSummaryLine","jsx","shippingContent","discountsContent","Fragment","discount","VComponent","taxContent","Accordion","ChevronDown","ChevronUp","AccordionSection","tax","updatedLineItems","currentLine","nextLine","classes","Divider","line","innerLine","initialData","showTotalSaved","data","setData","isVirtual","quoteDisplaySettings","state","isZeroTax","isTaxIncludedInSubtotal","QuoteDisplayAmount","isTaxIncludedAndExcludedInSubtotal","isTaxIncludedInShipping","isTaxIncludedAndExcludedInShipping","useEffect","dataEvent","events","payload","OrderSummaryComponent","Price","_b","_a","_d","_c","_f","_e","_h","_g","_j","_i","_l","_k","_n","_m","_p","_o","_r","_q","_t","_s","_v","_u","_x","_w","_z","_y","Icon","Coupon","_B","_A","_D","_C","_F","_E","_H","_G","_J","_I","_L","_K","_N","_M","_P","_O","_R","_Q","_T","_S","_V","_U","_X","_W"],"mappings":"i0BACA,MAAMA,GAAgBC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAK,EAAoBC,EAAM,cAAc,OAAQ,CAAE,EAAG,iDAAkD,OAAQ,eAAgB,YAAa,EAAG,cAAe,SAAU,eAAgB,OAAO,CAAE,CAAC,ECAjXC,GAAaF,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAK,EAAoBC,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,EAAG,quEAAsuE,KAAM,cAAc,CAAE,CAAC,ECyE3/EE,GAAqD,CAAC,CACjE,UAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,UACV,QAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,aAAAC,EACA,MAAAC,EACA,WAAAC,EACA,gBAAAC,EAAmBC,GAAcA,EACjC,GAAGhB,CACL,IAAM,CACJ,KAAM,CAACiB,EAAkBC,CAAmB,EAAIC,GAAS,EAAK,EAExDC,EAAeC,GAAQ,CAE3B,oBAAqB,+CACrB,SAAU,2CACV,aAAc,+CACd,iBAAkB,mDAClB,iBAAkB,mDAGlB,cAAe,8CACf,kBAAmB,kDACnB,qBAAsB,qDAGtB,cAAe,8CACf,kBAAmB,kDACnB,qBAAsB,qDAGtB,WAAY,2CACZ,gB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AAU,EAClC1E,EAAC,OAAA,CAAK,cAAY,sBAAuB,SAAAL,EAAa,IAAA,CAAK,EAE3DK,EAACqC,EAAA,CACC,cAAY,6BACZ,QAAQuC,IAAAC,GAAAxD,GAAA,YAAAA,EAAM,SAAN,YAAAwD,GAAc,aAAd,YAAAD,GAA0B,MAClC,UAAUE,IAAAC,GAAA1D,GAAA,YAAAA,EAAM,SAAN,YAAA0D,GAAc,aAAd,YAAAD,GAA0B,QAAA,CAAA,EAG1C,gBAAiBtD,GAAA,MAAAA,EAAsB,aACrCwD,IAAAC,GAAA5D,GAAA,YAAAA,EAAM,SAAN,YAAA4D,GAAc,yBAAd,YAAAD,GAAsC,SAAU,EAC9ChF,EAAC,OAAA,CAAK,cAAY,sBAAuB,SAAAL,EAAa,KAAK,EAE3DK,EAACqC,EAAA,CACC,cAAY,sBACZ,QAAQ6C,IAAAC,GAAA9D,GAAA,YAAAA,EAAM,SAAN,YAAA8D,GAAc,yBAAd,YAAAD,GAAsC,MAC9C,UAAUE,IAAAC,GAAAhE,GAAA,YAAAA,EAAM,SAAN,YAAAgE,GAAc,yBAAd,YAAAD,GAAsC,QAAA,CAAA,EAGlD,MAAA,EAEN,WACEhE,EACEpB,EAACqC,EAAA,CACC,QAAQiD,IAAAC,GAAAlE,GAAA,YAAAA,EAAM,SAAN,YAAAkE,GAAc,WAAd,YAAAD,GAAwB,MAChC,UAAUE,IAAAC,GAAApE,GAAA,YAAAA,EAAM,SAAN,YAAAoE,GAAc,aAAd,YAAAD,GAA0B,QAAA,CAAA,EAEpC,MAAA,CAAA,EAhJD,IAoJX","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
+
import { Container } from '@dropins/tools/types/elsie/src/lib';
|
|
3
|
+
import { VNode } from 'preact';
|
|
4
|
+
|
|
5
|
+
export interface OrderSummaryLineProps extends Omit<HTMLAttributes<HTMLDivElement>, 'label'> {
|
|
6
|
+
label: VNode | string;
|
|
7
|
+
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
8
|
+
classSuffixes?: Array<string>;
|
|
9
|
+
labelClassSuffix?: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
children?: any;
|
|
12
|
+
}
|
|
13
|
+
export declare const OrderSummaryLine: Container<OrderSummaryLineProps>;
|
|
14
|
+
//# sourceMappingURL=OrderSummaryLine.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './OrderSummaryLine';
|
|
10
|
+
export { OrderSummaryLine as default } from './OrderSummaryLine';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{O as s,O as u}from"../chunks/OrderSummaryLine.js";import"@dropins/tools/preact-jsx-runtime.js";import"@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 */export{s as OrderSummaryLine,u as default};
|
|
4
|
+
//# sourceMappingURL=OrderSummaryLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderSummaryLine.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
+
import { Container } from '@dropins/tools/types/elsie/src/lib';
|
|
3
|
+
import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
|
|
4
|
+
|
|
5
|
+
export interface QuoteCommentsListProps extends HTMLAttributes<HTMLUListElement> {
|
|
6
|
+
quoteData?: NegotiableQuoteModel;
|
|
7
|
+
}
|
|
8
|
+
export declare const QuoteCommentsList: Container<QuoteCommentsListProps>;
|
|
9
|
+
//# sourceMappingURL=QuoteCommentsList.d.ts.map
|