@dropins/storefront-quote-management 0.0.1-alpha3 → 0.0.1-alpha30
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 +3 -0
- package/api/sendForReview/graphql/SendNegotiableQuoteForReviewMutation.d.ts +10 -0
- package/api/sendForReview/index.d.ts +10 -0
- package/api/sendForReview/sendForReview.d.ts +11 -0
- package/api/sendQuoteTemplateForReview/graphql/sendQuoteTemplateForReview.d.ts +10 -0
- package/api/sendQuoteTemplateForReview/index.d.ts +10 -0
- package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +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/RenameQuoteModal.js +4 -0
- package/chunks/RenameQuoteModal.js.map +1 -0
- package/chunks/ShippingAddressDisplay.js +4 -0
- package/chunks/ShippingAddressDisplay.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 -53
- 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 +21 -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 +91 -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 +90 -0
- package/containers/ManageNegotiableQuoteTemplate/index.d.ts +11 -0
- package/containers/ManageNegotiableQuoteTemplate.d.ts +3 -0
- package/containers/ManageNegotiableQuoteTemplate.js +6 -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 -0
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js.map +1 -1
- package/containers/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +10 -0
- package/containers/ShippingAddressDisplay/index.d.ts +11 -0
- package/containers/ShippingAddressDisplay.d.ts +1 -0
- package/containers/ShippingAddressDisplay.js +4 -0
- package/containers/ShippingAddressDisplay.js.map +1 -0
- package/containers/index.d.ts +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 +266 -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/useRenameTemplate.d.ts +71 -0
- package/hooks/useUpdateTemplateQuantities.d.ts +27 -0
- package/i18n/en_US.json.d.ts +438 -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,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './ItemsQuoted';
|
|
10
|
+
export { ItemsQuoted as default } from './ItemsQuoted';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{I as n,I as q}from"../chunks/ItemsQuoted.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/components.js";/* empty css */import"../chunks/LineItemNoteModal.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import"../chunks/dateUtils.js";import"@dropins/tools/i18n.js";import"../chunks/ConfirmationModal.js";/* empty css *//* empty css */import"../chunks/state.js";import"../chunks/setLineItemNote.js";import"../chunks/transform-quote.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/NegotiableQuoteFragment.js";import"../chunks/WarningFilled.js";export{n as ItemsQuoted,q as default};
|
|
4
|
+
//# sourceMappingURL=ItemsQuoted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemsQuoted.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { ProductListTableItem } from '../../components';
|
|
5
|
+
|
|
6
|
+
export interface ItemsQuotedTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
8
|
+
slots?: {
|
|
9
|
+
ProductListTable?: SlotProps<{
|
|
10
|
+
items: NegotiableQuoteTemplateModel['items'];
|
|
11
|
+
canEdit: boolean;
|
|
12
|
+
dropdownSelections: Record<string, string | undefined>;
|
|
13
|
+
handleItemDropdownChange: (item: ProductListTableItem, action: string) => void;
|
|
14
|
+
handleQuantityChange: (item: ProductListTableItem, newQuantity: number) => void;
|
|
15
|
+
handleUpdate: (e: SubmitEvent) => void;
|
|
16
|
+
onItemDropdownChange?: (item: any, action: string) => void;
|
|
17
|
+
}>;
|
|
18
|
+
QuotePricesSummary?: SlotProps<{
|
|
19
|
+
items: NegotiableQuoteTemplateModel['items'];
|
|
20
|
+
prices: NegotiableQuoteTemplateModel['prices'];
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const ItemsQuotedTemplate: Container<ItemsQuotedTemplateProps>;
|
|
25
|
+
//# sourceMappingURL=ItemsQuotedTemplate.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 './ItemsQuotedTemplate';
|
|
10
|
+
export { ItemsQuotedTemplate as default } from './ItemsQuotedTemplate';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{I as n,I as q}from"../chunks/ItemsQuotedTemplate.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/components.js";/* empty css */import"../chunks/LineItemNoteModal.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import"../chunks/dateUtils.js";import"@dropins/tools/i18n.js";import"../chunks/ConfirmationModal.js";/* empty css *//* empty css */import"../chunks/state.js";import"../chunks/addQuoteTemplateLineItemNote.js";import"../chunks/transform-quote-template.js";import"../chunks/transform-quote.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/NegotiableQuoteTemplateFragment.js";import"../chunks/WarningFilled.js";export{n as ItemsQuotedTemplate,q as default};
|
|
4
|
+
//# sourceMappingURL=ItemsQuotedTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemsQuotedTemplate.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
+
import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
|
|
3
|
+
import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
|
|
4
|
+
import { AttachedFile } from '../../components';
|
|
5
|
+
|
|
6
|
+
export interface ManageNegotiableQuoteProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
onActionsDropdownChange?: (event: Event) => void;
|
|
8
|
+
onActionsButtonClick?: (action: string) => void;
|
|
9
|
+
onSendForReview?: (params: {
|
|
10
|
+
quoteData: NegotiableQuoteModel;
|
|
11
|
+
comment?: string;
|
|
12
|
+
attachments?: AttachedFile[];
|
|
13
|
+
}) => void;
|
|
14
|
+
maxFiles?: number;
|
|
15
|
+
maxFileSize?: number;
|
|
16
|
+
acceptedFileTypes?: string[];
|
|
17
|
+
onDuplicateQuote?: (params: {
|
|
18
|
+
quoteData: NegotiableQuoteModel;
|
|
19
|
+
newQuote: NegotiableQuoteModel;
|
|
20
|
+
}) => void;
|
|
21
|
+
onCreateTemplate?: (params: {
|
|
22
|
+
quoteData: NegotiableQuoteModel;
|
|
23
|
+
templateId: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
slots?: {
|
|
26
|
+
QuoteName?: SlotProps<{
|
|
27
|
+
quoteName?: string;
|
|
28
|
+
quoteData?: NegotiableQuoteModel;
|
|
29
|
+
}>;
|
|
30
|
+
QuoteStatus?: SlotProps<{
|
|
31
|
+
quoteStatus?: string;
|
|
32
|
+
quoteData?: NegotiableQuoteModel;
|
|
33
|
+
}>;
|
|
34
|
+
Banner?: SlotProps<{
|
|
35
|
+
quoteData?: NegotiableQuoteModel;
|
|
36
|
+
}>;
|
|
37
|
+
Details?: SlotProps<{
|
|
38
|
+
quoteData?: NegotiableQuoteModel;
|
|
39
|
+
}>;
|
|
40
|
+
ActionBar?: SlotProps<{
|
|
41
|
+
quoteData?: NegotiableQuoteModel;
|
|
42
|
+
actionsBarDropdownValue?: string;
|
|
43
|
+
}>;
|
|
44
|
+
QuoteContent?: SlotProps<{
|
|
45
|
+
quoteData?: NegotiableQuoteModel;
|
|
46
|
+
}>;
|
|
47
|
+
ItemsQuotedTab?: SlotProps<{
|
|
48
|
+
quoteData?: NegotiableQuoteModel;
|
|
49
|
+
}>;
|
|
50
|
+
CommentsTab?: SlotProps<{
|
|
51
|
+
quoteData?: NegotiableQuoteModel;
|
|
52
|
+
}>;
|
|
53
|
+
HistoryLogTab?: SlotProps<{
|
|
54
|
+
quoteData?: NegotiableQuoteModel;
|
|
55
|
+
}>;
|
|
56
|
+
ShippingInformationTitle?: SlotProps<{
|
|
57
|
+
quoteData?: NegotiableQuoteModel;
|
|
58
|
+
}>;
|
|
59
|
+
ShippingInformation?: SlotProps<{
|
|
60
|
+
quoteData?: NegotiableQuoteModel;
|
|
61
|
+
loading?: boolean;
|
|
62
|
+
setLoading?: (loading: boolean) => void;
|
|
63
|
+
}>;
|
|
64
|
+
QuoteCommentsTitle?: SlotProps<{
|
|
65
|
+
quoteData?: NegotiableQuoteModel;
|
|
66
|
+
}>;
|
|
67
|
+
QuoteComments?: SlotProps<{
|
|
68
|
+
quoteData?: NegotiableQuoteModel;
|
|
69
|
+
}>;
|
|
70
|
+
AttachFilesField?: SlotProps<{
|
|
71
|
+
onFileChange: (files: File[]) => void;
|
|
72
|
+
attachedFiles: AttachedFile[];
|
|
73
|
+
fileUploadError: string | undefined;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
}>;
|
|
76
|
+
AttachedFilesList?: SlotProps<{
|
|
77
|
+
files: AttachedFile[];
|
|
78
|
+
onRemove: (key: string) => void;
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
}>;
|
|
81
|
+
Footer?: SlotProps<{
|
|
82
|
+
quoteData?: NegotiableQuoteModel;
|
|
83
|
+
comment?: string;
|
|
84
|
+
isSubmitting?: boolean;
|
|
85
|
+
attachments?: AttachedFile[];
|
|
86
|
+
handleSendForReview: () => void;
|
|
87
|
+
}>;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export declare const ManageNegotiableQuote: Container<ManageNegotiableQuoteProps>;
|
|
91
|
+
//# sourceMappingURL=ManageNegotiableQuote.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './ManageNegotiableQuote';
|
|
10
|
+
export { ManageNegotiableQuote as default } from './ManageNegotiableQuote';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as n,jsxs as M,Fragment as Pa}from"@dropins/tools/preact-jsx-runtime.js";import{useState as l,useRef as _e,useEffect as h,useCallback as c,useMemo as u,createPortal as z}from"@dropins/tools/preact-compat.js";import{classes as d,VComponent as p,Slot as g}from"@dropins/tools/lib.js";import{f as oa}from"../chunks/dateUtils.js";/* empty css */import{Skeleton as Wa,SkeletonRow as O,InLineAlert as N,Button as ra,TextArea as Va,InputFile as $a}from"@dropins/tools/components.js";import{events as v}from"@dropins/tools/event-bus.js";import{S as ja,A as Ga,T as Ka,R as Xa}from"../chunks/RenameQuoteModal.js";import{v as Ja,f as Ya,a as Za,S as Aa,A as et}from"../chunks/AttachedFilesList.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import{C as X}from"../chunks/ConfirmationModal.js";/* empty css *//* empty css */import{S as at}from"../chunks/ShippingAddressDisplay.js";import{Q as tt}from"../chunks/QuoteHistoryLog3.js";import{g as nt,r as ot,c as rt,a as it,s as lt,d as ct,b as st}from"../chunks/duplicateNegotiableQuote.js";import"../chunks/state.js";import{u as mt}from"../chunks/uploadFile.js";import{I as dt}from"../chunks/ItemsQuoted.js";import{Q as ut}from"../chunks/QuoteCommentsList3.js";import{a as P,S as J}from"../chunks/WarningFilled.js";import{useText as gt}from"@dropins/tools/i18n.js";import"../chunks/QuoteHistoryLog.js";import"../chunks/transform-quote.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/NegotiableQuoteFragment.js";import"../chunks/transform-quote-template.js";import"../chunks/NegotiableQuoteTemplateFragment.js";import"../chunks/LineItemNoteModal.js";import"../chunks/setLineItemNote.js";import"../chunks/QuoteCommentsList.js";const ft=({className:D,loading:t,quoteName:s,quoteStatus:I,banner:T,details:C,actionBar:Q,quoteContent:w,shippingInformationTitle:x,shippingInformation:Y,quoteCommentsTitle:e,quoteComments:S,attachFilesField:y,attachedFilesList:R,footer:Z,...A})=>t?n(pt,{}):M("div",{...A,className:d(["quote-management-manage-negotiable-quote",D]),children:[M("div",{className:d(["quote-management-manage-negotiable-quote__header"]),children:[s&&n(p,{node:s,className:d(["quote-management-manage-negotiable-quote__quote-name"])}),I&&n(p,{node:I,className:d(["quote-management-manage-negotiable-quote__quote-status"])})]}),T&&n(p,{node:T,className:d(["quote-management-manage-negotiable-quote__banner"])}),C&&n(p,{node:C,className:d(["quote-management-manage-negotiable-quote__details"])}),Q&&n(p,{node:Q,className:d(["quote-management-manage-negotiable-quote__action-bar"])}),w&&n(p,{node:w,className:d(["quote-management-manage-negotiable-quote__quote-content"])}),M("div",{"data-testid":"quote-shipping-information-container",className:d(["quote-management-manage-negotiable-quote__shipping-information-container"]),children:[x&&n(p,{node:x,className:d(["quote-management-manage-negotiable-quote__shipping-information-title"])}),Y&&n(p,{node:Y,className:d(["quote-management-manage-negotiable-quote__shipping-information"])})]}),M("div",{"data-testid":"quote-comments-container",className:d(["quote-management-manage-negotiable-quote__quote-comments-container"]),children:[e&&n(p,{node:e,className:d(["quote-management-manage-negotiable-quote__quote-comments-title"])}),S&&n(p,{node:S,className:d(["quote-management-manage-negotiable-quote__quote-comments"])}),y&&n(p,{node:y,className:d(["quote-management-manage-negotiable-quote__attach-files-field"])}),R&&n(p,{node:R,className:d(["quote-management-manage-negotiable-quote__attached-files-list"])})]}),n(p,{node:Z,className:d(["quote-management-manage-negotiable-quote__footer"])})]}),pt=()=>M(Wa,{"data-testid":"manage-negotiable-quote-skeleton",children:[n(O,{variant:"heading",fullWidth:!0,size:"large"}),n(O,{variant:"row",fullWidth:!1,size:"small"}),n(O,{variant:"row",fullWidth:!1,size:"small"}),n(O,{variant:"row",fullWidth:!0}),n(O,{variant:"row",fullWidth:!0,size:"xlarge",lines:2}),n(O,{variant:"row",fullWidth:!1,size:"small"})]}),Yt=({onActionsDropdownChange:D,slots:t,onActionsButtonClick:s,onSendForReview:I,maxFiles:T,maxFileSize:C,acceptedFileTypes:Q,onDuplicateQuote:w,onCreateTemplate:x,...Y})=>{const[e,S]=l(void 0),[y,R]=l(!0),[Z,A]=l(!1),[Ee,W]=l(null),[ia,ee]=l(!1),[Fe,se]=l(!1),[De,_]=l(null),[la,L]=l(!1),[E,Ie]=l(""),[q,me]=l(!1),[we,de]=l(!1),[xe,ue]=l(!1),[Re,H]=l(""),[Le,V]=l(""),[He,ge]=l(!1),[Ue,ke]=l(!1),[Be,$]=l(""),[ze,ae]=l(""),[Oe,fe]=l(!1),[te,ne]=l(""),[pe,oe]=l(""),[Me,j]=l(""),[ca,U]=l(""),[be,re]=l(""),[b,G]=l([]),[ie,le]=l(void 0),[he,Pe]=l(new Set),We=_e(he),Ne=_e(null),[k,Qe]=l(""),ce=_e(k),[Ve,$e]=l(!1);h(()=>{We.current=he},[he]),h(()=>{ce.current=k},[k]);const o=gt({createdLabel:"NegotiableQuote.Manage.createdLabel",salesRepLabel:"NegotiableQuote.Manage.salesRepLabel",expiresLabel:"NegotiableQuote.Manage.expiresLabel",actionsLabel:"NegotiableQuote.Manage.actionsLabel",remove:"NegotiableQuote.Manage.actions.remove",close:"NegotiableQuote.Manage.actionButtons.close",delete:"NegotiableQuote.Manage.actionButtons.delete",print:"NegotiableQuote.Manage.actionButtons.print",createTemplate:"NegotiableQuote.Manage.actionButtons.createTemplate",createCopy:"NegotiableQuote.Manage.actionButtons.createCopy",shippingInformationTitle:"NegotiableQuote.Manage.shippingInformation.title",quoteCommentsTitle:"NegotiableQuote.Manage.quoteComments.title",quoteCommentsPlaceholder:"NegotiableQuote.Manage.quoteComments.placeholder",sendForReview:"NegotiableQuote.Manage.actionButtons.sendForReview",bannerTitle:"NegotiableQuote.Manage.bannerTitle",statusSubmitted:"NegotiableQuote.Manage.bannerStatusMessages.submitted",statusPending:"NegotiableQuote.Manage.bannerStatusMessages.pending",statusExpired:"NegotiableQuote.Manage.bannerStatusMessages.expired",errorFallback:"NegotiableQuote.Manage.confirmationModal.delete.errorFallback",closeSuccessMessage:"NegotiableQuote.Manage.confirmationModal.close.successDescription",closeModalTitle:"NegotiableQuote.Manage.actionButtons.close",closeModalMessage:"NegotiableQuote.Manage.confirmationModal.close.message",closeModalCancel:"NegotiableQuote.Manage.confirmationModal.cancel",closeModalConfirm:"NegotiableQuote.Manage.confirmationModal.close.confirm",closeModalConfirmLoading:"NegotiableQuote.Manage.confirmationModal.close.confirmLoading",closeModalSuccessHeading:"NegotiableQuote.Manage.confirmationModal.close.successHeading",createTemplateModalTitle:"NegotiableQuote.Manage.actionButtons.createTemplate",createTemplateModalMessage:"NegotiableQuote.Manage.confirmationModal.createTemplate.message",createTemplateModalCancel:"NegotiableQuote.Manage.confirmationModal.cancel",createTemplateModalConfirm:"NegotiableQuote.Manage.confirmationModal.createTemplate.confirm",createTemplateModalConfirmLoading:"NegotiableQuote.Manage.confirmationModal.createTemplate.confirmLoading",createTemplateModalSuccessHeading:"NegotiableQuote.Manage.confirmationModal.createTemplate.successHeading",createTemplateSuccessMessage:"NegotiableQuote.Manage.confirmationModal.createTemplate.successDescription",createTemplateModalErrorHeading:"NegotiableQuote.Manage.confirmationModal.createTemplate.errorHeading",createTemplateErrorFallback:"NegotiableQuote.Manage.confirmationModal.createTemplate.errorFallback",renameErrorHeading:"NegotiableQuote.Manage.rename.errorHeading",renameQuoteNameRequired:"NegotiableQuote.Manage.rename.quoteNameRequired",renameErrorDefault:"NegotiableQuote.Manage.rename.errorDefault",renameSuccessHeading:"NegotiableQuote.Manage.rename.successHeading",renameSuccessMessage:"NegotiableQuote.Manage.rename.successMessage",confirmationModalCancel:"NegotiableQuote.Manage.confirmationModal.cancel",confirmationModalDeleteTitle:"NegotiableQuote.Manage.confirmationModal.delete.title",confirmationModalDeleteMessage:"NegotiableQuote.Manage.confirmationModal.delete.message",confirmationModalDeleteConfirm:"NegotiableQuote.Manage.confirmationModal.delete.confirm",confirmationModalDeleteErrorHeading:"NegotiableQuote.Manage.confirmationModal.delete.errorHeading",confirmationModalDeleteErrorFallback:"NegotiableQuote.Manage.confirmationModal.delete.errorFallback",confirmationModalDeleteSuccessHeading:"NegotiableQuote.Manage.confirmationModal.delete.successHeading",confirmationModalDeleteSuccessDescription:"NegotiableQuote.Manage.confirmationModal.delete.successDescription",confirmationModalDuplicateTitle:"NegotiableQuote.Manage.confirmationModal.duplicate.title",confirmationModalDuplicateMessage:"NegotiableQuote.Manage.confirmationModal.duplicate.message",confirmationModalDuplicateConfirm:"NegotiableQuote.Manage.confirmationModal.duplicate.confirm",confirmationModalDuplicateErrorHeading:"NegotiableQuote.Manage.confirmationModal.duplicate.errorHeading",confirmationModalDuplicateErrorFallback:"NegotiableQuote.Manage.confirmationModal.duplicate.errorFallback",confirmationModalDuplicateSuccessHeading:"NegotiableQuote.Manage.confirmationModal.duplicate.successHeading",confirmationModalDuplicateSuccessDescription:"NegotiableQuote.Manage.confirmationModal.duplicate.successDescription",noItemsSelectedModalTitle:"NegotiableQuote.Manage.confirmationModal.noItemsSelected.title",noItemsSelectedModalMessage:"NegotiableQuote.Manage.confirmationModal.noItemsSelected.message",noItemsSelectedModalConfirm:"NegotiableQuote.Manage.confirmationModal.noItemsSelected.confirm",attachFiles:"NegotiableQuote.Manage.attachFiles",fileUploadError:"NegotiableQuote.Manage.fileUploadError",maxFilesExceeded:"NegotiableQuote.Manage.maxFilesExceeded",maxFileSizeExceeded:"NegotiableQuote.Manage.maxFileSizeExceeded",invalidFileType:"NegotiableQuote.Manage.invalidFileType"});h(()=>{const a=v.on("quote-management/quote-data",r=>{const{quote:i}=r;i&&(S(i),R(!1))},{eager:!0});return()=>a==null?void 0:a.off()},[]),h(()=>{const a=v.on("quote-management/shipping-address-set",r=>{const{quote:i}=r;i&&S(i)},{eager:!0});return()=>a==null?void 0:a.off()},[]),h(()=>{const a=v.on("quote-management/quote-sent-for-review",r=>{const{quote:i}=r;S(i),Ie(""),G([]),me(!1)},{eager:!0});return()=>a==null?void 0:a.off()},[]),h(()=>{const a=v.on("quote-management/quote-items-removed",r=>{const{quote:i,removedItemUids:m}=r;i&&S(i),m&&Pe(f=>{const B=new Set(f);return m.forEach(K=>B.delete(K)),B})},{eager:!0});return()=>a==null?void 0:a.off()},[]);const je=c((a,r)=>{Pe(i=>{const m=new Set(i);return r?m.add(a.uid):m.delete(a.uid),m})},[]),Ge=c(a=>{const r=a.target.value,i=We.current;if(r==="remove"){if(Qe(r),ce.current=r,i.size===0)$e(!0);else if(e&&Ne.current){const m=e.items.filter(f=>i.has(f.uid));Ne.current(m)}}D==null||D(a)},[D,e]),Ke=c(()=>{$e(!1),Qe(""),ce.current=""},[]);h(()=>{const a=v.on("quote-management/negotiable-quote-closed",async r=>{ue(!1),V(""),H(o.closeSuccessMessage),S(i=>{var m;return i!=null&&i.uid&&((m=r.closedQuoteUids)!=null&&m.includes(i.uid))&&nt(i.uid).then(f=>{S(f)}).catch(f=>{console.warn("Failed to refresh quote data after closure:",f)}),i}),setTimeout(()=>{de(!1),H("")},2e3)},{eager:!0});return()=>a==null?void 0:a.off()},[o.closeSuccessMessage]),h(()=>{const a=v.on("quote-management/negotiable-quote-close-error",r=>{console.log("Close error event received:",r),ue(!1),H("");const i=r.error.message||o.errorFallback;V(i)},{eager:!0});return()=>a==null?void 0:a.off()},[o.errorFallback]),h(()=>{const a=v.on("quote-management/quote-renamed",r=>{const{quote:i}=r;S(i),j(""),U(""),re(o.renameSuccessMessage),setTimeout(()=>{fe(!1),ne(""),oe(""),re("")},2e3)},{eager:!0});return()=>a==null?void 0:a.off()},[o.renameSuccessMessage]),h(()=>{const a=v.on("quote-management/quote-duplicated",r=>{const{quote:i}=r;e&&w&&w({quoteData:e,newQuote:i}),L(!0),_(null),setTimeout(()=>{se(!1),L(!1),_(null)},2e3)},{eager:!0});return()=>a==null?void 0:a.off()},[e,w]),h(()=>{const a=v.on("quote-management/quote-template-created",r=>{const{quoteTemplate:i}=r;e&&x&&x({quoteData:e,templateId:i.id}),setTimeout(()=>{ge(!1),$("")},2e3)},{eager:!0});return()=>a==null?void 0:a.off()},[e,x]);const Se=c(async a=>{if(T&&b.length+a.length>T){le(o.maxFilesExceeded.replace("{maxFiles}",String(T)));return}for(const i of a){if(C&&!Ja(i.size,C)){le(o.maxFileSizeExceeded.replace("{maxSize}",Ya(C)));return}if(Q&&!Za(i.type,Q)){le(o.invalidFileType);return}}le(void 0);const r=a.map(i=>({key:`temp-${Date.now()}-${Math.random()}-${i.name}`,name:i.name,size:i.size,status:"uploading"}));G(i=>[...i,...r]);for(let i=0;i<a.length;i++){const m=a[i],f=r[i].key;try{const B=await mt(m);G(K=>K.map(F=>F.key===f?{...F,key:B.key,status:"success"}:F))}catch(B){G(K=>K.map(F=>F.key===f?{...F,status:"error",error:B.message}:F))}}},[T,C,Q,b,o]),qe=c(a=>{G(r=>r.filter(i=>i.key!==a))},[]),Xe=c(()=>{ne((e==null?void 0:e.name)||""),oe(""),j(""),U(""),re(""),fe(!0)},[e]),sa=c(()=>{fe(!1),ne(""),oe(""),j(""),U(""),re("")},[]),ma=c(a=>{ne(a),a.trim()&&U("")},[]),Je=c(()=>{se(!0),_(null),L(!1)},[]),da=c(async()=>{if(!te.trim()){U(o.renameQuoteNameRequired);return}try{j(""),U(""),await ot({quoteUid:e.uid,quoteName:te,quoteComment:pe.trim()||void 0})}catch(a){j(a.message||o.renameErrorDefault)}},[e,te,pe,o.renameQuoteNameRequired,o.renameErrorDefault]),ua=u(()=>{const a=e&&(e.lockedForEditing===!0||e.lockedForEditing===void 0&&(e.status==="SUBMITTED"||e.status==="PENDING"||e.status==="ORDERED"||e.status==="CLOSED"));return n(g,{name:"QuoteName",slot:t==null?void 0:t.QuoteName,context:{quoteName:e==null?void 0:e.name,quoteData:e},children:M("div",{className:"quote-management-manage-negotiable-quote__quote-name-wrapper",children:[n("h1",{"data-testid":"quote-name",className:"quote-management-manage-negotiable-quote__quote-name-title",children:e==null?void 0:e.name}),n("button",{onClick:Xe,disabled:a,"data-testid":"rename-quote-button",className:"quote-management-manage-negotiable-quote__rename-button","aria-label":"Rename quote",children:n(ja,{})})]})})},[t==null?void 0:t.QuoteName,e,Xe]),ga=u(()=>n(g,{name:"QuoteStatus",slot:t==null?void 0:t.QuoteStatus,context:{quoteStatus:e==null?void 0:e.status,quoteData:e},children:n("div",{"data-testid":"quote-status",children:e==null?void 0:e.status})}),[t==null?void 0:t.QuoteStatus,e]),Ye=c(a=>{switch(a){case"SUBMITTED":return o.statusSubmitted;case"PENDING":return o.statusPending;case"EXPIRED":return o.statusExpired;default:return null}},[o])(e==null?void 0:e.status),Ze=Ye&&n(N,{type:"warning",variant:"secondary",icon:n(P,{}),heading:o.bannerTitle,description:Ye}),fa=Ze&&n(g,{name:"Banner","data-testid":"banner",slot:t==null?void 0:t.Banner,context:{quoteData:e},children:Ze}),pa=u(()=>{if(!e)return;const a=e.expirationDate?oa(e.expirationDate,"short"):void 0;return M(g,{name:"Details",slot:t==null?void 0:t.Details,context:{quoteData:e},children:[M("div",{className:"quote-management-manage-negotiable-quote__detail",children:[n("span",{className:"quote-management-manage-negotiable-quote__detail-title","data-testid":"created-label",children:o.createdLabel}),M("span",{className:"quote-management-manage-negotiable-quote__detail-content","data-testid":"created-value",children:[oa(e.createdAt,"short")," (",e.buyer.firstname," ",e.buyer.lastname,")"]})]}),M("div",{className:"quote-management-manage-negotiable-quote__detail",children:[n("span",{className:"quote-management-manage-negotiable-quote__detail-title","data-testid":"sales-rep-label",children:o.salesRepLabel}),n("span",{className:"quote-management-manage-negotiable-quote__detail-content","data-testid":"sales-rep-value",children:e.salesRepName})]}),M("div",{className:"quote-management-manage-negotiable-quote__detail",children:[n("span",{className:"quote-management-manage-negotiable-quote__detail-title","data-testid":"expires-label",children:o.expiresLabel}),n("span",{className:"quote-management-manage-negotiable-quote__detail-content","data-testid":"expires-value",children:a})]})]})},[t==null?void 0:t.Details,o,e]),Ae=u(()=>[{label:o.close,value:"close",disabled:!(e!=null&&e.canClose)},{label:o.delete,value:"delete",disabled:!(e!=null&&e.canDelete)},{label:o.print,value:"print"},{label:o.createTemplate,value:"createTemplate"},{label:o.createCopy,value:"createCopy"}],[o,e==null?void 0:e.canDelete,e==null?void 0:e.canClose]),Ma=u(()=>{const a=r=>{switch(r){case"close":de(!0),V(""),H(""),s==null||s(r);break;case"delete":A(!0),s==null||s(r);break;case"print":s==null||s(r);break;case"createTemplate":ge(!0),ae(""),$(""),s==null||s(r);break;case"createCopy":Je(),s==null||s(r);break}};return n(g,{name:"ActionBar",slot:t==null?void 0:t.ActionBar,context:{quoteData:e,actionsBarDropdownValue:k},children:n(Ga,{dropdownPlaceholder:o.actionsLabel,dropdownOptions:[{label:o.remove,value:"remove"}],dropdownValue:k,handleDropdownChange:Ge,buttons:Ae.map(r=>n(ra,{variant:"tertiary",onClick:()=>a(r.value),"data-testid":`actions-bar-${r.value}-button`,"data-action":r.value,disabled:r.disabled,children:r.label},r.value))})})},[Ae,o,t==null?void 0:t.ActionBar,e,Ge,s,Je,k]),ba=u(()=>n(g,{name:"QuoteContent",slot:t==null?void 0:t.QuoteContent,context:{quoteData:e},children:n(Ka,{tabs:new Map([["items-quoted","Items Quoted"],["comments","Comments"],["history-log","History Log"]]),tabsContent:new Map([["items-quoted",n(g,{name:"ItemsQuotedTab",slot:t==null?void 0:t.ItemsQuotedTab,context:{quoteData:e},children:n(dt,{quoteData:e,onItemCheckboxChange:je,onRemoveItemsRef:a=>{Ne.current=a},onRemoveModalStateChange:a=>{!a&&ce.current==="remove"&&Qe("")}})},"items-quoted")],["comments",n(g,{name:"CommentsTab",slot:t==null?void 0:t.CommentsTab,context:{quoteData:e},children:n(ut,{quoteData:e})},"comments")],["history-log",n(g,{name:"HistoryLogTab",slot:t==null?void 0:t.HistoryLogTab,context:{quoteData:e},children:n(tt,{quoteData:e})},"history-log")]])})}),[t==null?void 0:t.QuoteContent,t==null?void 0:t.HistoryLogTab,t==null?void 0:t.CommentsTab,t==null?void 0:t.ItemsQuotedTab,e,je]),ha=u(()=>n(g,{name:"ShippingInformationTitle",slot:t==null?void 0:t.ShippingInformationTitle,context:{quoteData:e},children:n("h2",{children:o.shippingInformationTitle})}),[t==null?void 0:t.ShippingInformationTitle,e,o]),Na=u(()=>{var a;return n(g,{name:"ShippingInformation",slot:t==null?void 0:t.ShippingInformation,context:{quoteData:e,loading:y,setLoading:R},children:n(at,{shippingAddress:(a=e==null?void 0:e.shippingAddresses)==null?void 0:a[0],loading:y,"data-testid":"manage-quote-shipping-address"})})},[t==null?void 0:t.ShippingInformation,e,y,R]),Qa=u(()=>n(g,{name:"QuoteCommentsTitle",slot:t==null?void 0:t.QuoteCommentsTitle,context:{quoteData:e},children:n("h2",{children:o.quoteCommentsTitle})}),[t==null?void 0:t.QuoteCommentsTitle,o,e]),Sa=u(()=>n(g,{name:"QuoteComments",slot:t==null?void 0:t.QuoteComments,context:{quoteData:e},children:n(Va,{name:"quoteComments",placeholder:o.quoteCommentsPlaceholder,rows:3,value:E,onInput:a=>{Ie(a.target.value)},disabled:!(e!=null&&e.canSendForReview)||q})}),[t==null?void 0:t.QuoteComments,o,e,E,q]),ea=u(()=>!(e!=null&&e.canSendForReview),[e]),qa=u(()=>{const a=q||ea;return n(g,{name:"AttachFilesField",slot:t==null?void 0:t.AttachFilesField,context:{onFileChange:Se,attachedFiles:b,fileUploadError:ie,disabled:a},children:M("div",{className:"quote-management-manage-negotiable-quote__attach-files",...a?{"data-disabled":!0}:{},"aria-disabled":a,children:[n($a,{multiple:!0,onChange:r=>{const i=r.target,m=i==null?void 0:i.files,f=m?Array.from(m):[];f.length>0&&Se(f)},icon:n(Aa,{}),disabled:a,"data-testid":"manage-quote-attach-files",accept:Q==null?void 0:Q.join(","),children:o.attachFiles}),ie&&n("div",{className:"quote-management-manage-negotiable-quote__file-error","data-testid":"file-upload-error",children:ie})]})})},[t==null?void 0:t.AttachFilesField,Se,q,ea,Q,ie,o,b]),va=u(()=>{if(b.length)return n(g,{name:"AttachedFilesList",slot:t==null?void 0:t.AttachedFilesList,context:{files:b,onRemove:qe,disabled:q},children:n(et,{files:b,onRemove:qe,disabled:q})})},[b,qe,q,t==null?void 0:t.AttachedFilesList]),Ta=c(async()=>{if(e!=null&&e.uid){ue(!0),V(""),H("");try{await rt({quoteUids:[e.uid]})}catch(a){console.error("Failed to close quote:",a)}}},[e]),Ca=c(()=>{de(!1),V(""),H("")},[]),ya=c(async()=>{if(e!=null&&e.uid){ke(!0),ae(""),$("");try{await it(e.uid),$(o.createTemplateSuccessMessage)}catch(a){console.error("Failed to create quote template:",a);const r=a instanceof Error?a.message:o.createTemplateErrorFallback;ae(r)}finally{ke(!1)}}},[e,o.createTemplateSuccessMessage,o.createTemplateErrorFallback]),_a=c(()=>{ge(!1),ae(""),$("")},[]),ve=c(async()=>{const a=b.filter(r=>r.status==="success");if(I){I({quoteData:e,comment:E.trim()||void 0,attachments:a.length?a:void 0});return}me(!0);try{await lt({quoteUid:e.uid,comment:E.trim()||void 0,attachments:a.length?a.map(r=>({key:r.key})):void 0})}catch(r){console.error("Failed to send quote for review:",r),me(!1)}},[e,I,E,b]),Ea=u(()=>n(g,{name:"Footer",slot:t==null?void 0:t.Footer,context:{quoteData:e,comment:E,isSubmitting:q,attachments:b,handleSendForReview:ve},children:n(ra,{variant:"primary",onClick:ve,"data-testid":"send-for-review-button",disabled:!(e!=null&&e.canSendForReview)||q,children:o.sendForReview})}),[t==null?void 0:t.Footer,o,e,E,q,b,ve]),Fa=u(()=>Me?n(N,{type:"error",variant:"primary",icon:n(P,{color:"var(--color-error)"}),heading:o.renameErrorHeading,description:Me}):void 0,[Me,o.renameErrorHeading]),Da=u(()=>be?n(N,{type:"success",variant:"primary",icon:n(J,{}),heading:o.renameSuccessHeading,description:be}):void 0,[be,o.renameSuccessHeading]),Te=c(a=>a.errors&&Array.isArray(a.errors)&&a.errors.length>0?a.errors[0].message||o.confirmationModalDeleteErrorFallback:(a==null?void 0:a.message)||o.confirmationModalDeleteErrorFallback,[o.confirmationModalDeleteErrorFallback]),Ia=c(()=>{A(!1),W(null),ee(!1)},[]),wa=c(async()=>{if(e!=null&&e.uid){W(null),ee(!1);try{const{operationResults:a}=await ct(e.uid),r=a.find(i=>i.__typename==="DeleteNegotiableQuoteOperationFailure");if(r){const i=Te(r);W(i);return}ee(!0)}catch(a){const r=Te(a);W(r)}}},[e,Te]),xa=c(()=>{W(null)},[]),Ra=c(()=>{ee(!1)},[]),aa=c(a=>(a==null?void 0:a.message)||o.confirmationModalDuplicateErrorFallback,[o.confirmationModalDuplicateErrorFallback]),La=c(()=>{se(!1),_(null),L(!1)},[]),Ha=c(async()=>{if(e!=null&&e.uid){_(null),L(!1);try{const r=(i=>{const m=i.slice(0,-8),f=crypto.randomUUID().slice(0,8);return m+f})(e.uid);await st({quoteUid:e.uid,duplicatedQuoteUid:r})}catch(a){const r=aa(a);_(r)}}},[e,aa]),Ua=c(()=>{_(null)},[]),ka=c(()=>{L(!1)},[]),Ba=Ee?n(N,{type:"error",variant:"primary",icon:n(P,{}),heading:o.confirmationModalDeleteErrorHeading,description:Ee,onDismiss:xa,"data-testid":"confirmation-modal-error-banner"}):null,ta=(ia?n(N,{type:"success",variant:"primary",icon:n(J,{}),heading:o.confirmationModalDeleteSuccessHeading,description:o.confirmationModalDeleteSuccessDescription,onDismiss:Ra,"data-testid":"confirmation-modal-success-banner"}):null)||Ba,za=De?n(N,{type:"error",variant:"primary",icon:n(P,{}),heading:o.confirmationModalDuplicateErrorHeading,description:De,onDismiss:Ua,"data-testid":"confirmation-modal-duplicate-error-banner"}):null,na=(la?n(N,{type:"success",variant:"primary",icon:n(J,{}),heading:o.confirmationModalDuplicateSuccessHeading,description:o.confirmationModalDuplicateSuccessDescription,onDismiss:ka,"data-testid":"confirmation-modal-duplicate-success-banner"}):null)||za,Oa={...Y,loading:y,quoteName:ua,quoteStatus:ga,banner:fa||void 0,details:pa,actionBar:Ma,quoteContent:ba,shippingInformationTitle:ha,shippingInformation:Na,quoteCommentsTitle:Qa,quoteComments:Sa,attachFilesField:qa,attachedFilesList:va,footer:Ea};let Ce=null;Re?Ce=n(N,{type:"success",variant:"primary",icon:n(J,{}),heading:o.closeModalSuccessHeading,description:Re,"data-testid":"close-quote-success-banner"}):Le&&(Ce=n(N,{type:"error",variant:"primary",icon:n(P,{}),heading:o.confirmationModalDeleteErrorHeading,description:Le,"data-testid":"close-quote-error-banner"}));let ye=null;return Be?ye=n(N,{type:"success",variant:"primary",icon:n(J,{}),heading:o.createTemplateModalSuccessHeading,description:Be,"data-testid":"create-template-success-banner"}):ze&&(ye=n(N,{type:"error",variant:"primary",icon:n(P,{}),heading:o.createTemplateModalErrorHeading,description:ze,"data-testid":"create-template-error-banner"})),M(Pa,{children:[n(ft,{...Oa}),Oe&&z(n(Xa,{open:Oe,quoteName:te,renameReason:pe,quoteNameError:ca,errorBanner:Fa,successBanner:Da,onQuoteNameChange:ma,onRenameReasonChange:oe,onSave:da,onClose:sa}),document.body),Z&&z(n(X,{open:Z,title:o.confirmationModalDeleteTitle,message:o.confirmationModalDeleteMessage,cancelLabel:o.confirmationModalCancel,confirmLabel:o.confirmationModalDeleteConfirm,onCancel:Ia,onConfirm:wa,showCloseButton:!ta,confirmationBanner:ta}),document.body),Fe&&z(n(X,{open:Fe,title:o.confirmationModalDuplicateTitle,message:o.confirmationModalDuplicateMessage,cancelLabel:o.confirmationModalCancel,confirmLabel:o.confirmationModalDuplicateConfirm,onCancel:La,onConfirm:Ha,showCloseButton:!na,confirmationBanner:na}),document.body),we&&z(n(X,{open:we,title:o.closeModalTitle,message:o.closeModalMessage,cancelLabel:o.closeModalCancel,confirmLabel:xe?o.closeModalConfirmLoading:o.closeModalConfirm,onCancel:Ca,onConfirm:xe?void 0:Ta,showCloseButton:!0,confirmationBanner:Ce,"data-testid":"close-quote-confirmation-modal"}),document.body),He&&z(n(X,{open:He,title:o.createTemplateModalTitle,message:o.createTemplateModalMessage,cancelLabel:o.createTemplateModalCancel,confirmLabel:Ue?o.createTemplateModalConfirmLoading:o.createTemplateModalConfirm,onCancel:_a,onConfirm:Ue?void 0:ya,showCloseButton:!0,confirmationBanner:ye,"data-testid":"create-template-confirmation-modal"}),document.body),Ve&&z(n(X,{open:Ve,title:o.noItemsSelectedModalTitle,message:o.noItemsSelectedModalMessage,confirmLabel:o.noItemsSelectedModalConfirm,onConfirm:Ke,onClose:Ke,showCloseButton:!0,"data-testid":"no-items-selected-modal"}),document.body)]})};export{Yt as ManageNegotiableQuote,Yt as default};
|
|
4
|
+
//# sourceMappingURL=ManageNegotiableQuote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageNegotiableQuote.js","sources":["/@dropins/storefront-quote-management/src/components/ManageNegotiableQuote/ManageNegotiableQuote.tsx","/@dropins/storefront-quote-management/src/containers/ManageNegotiableQuote/ManageNegotiableQuote.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@/quote-management/components/ManageNegotiableQuote/ManageNegotiableQuote.css';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport interface ManageNegotiableQuoteProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n loading?: boolean;\n quoteName: VNode;\n quoteStatus: VNode;\n banner?: VNode;\n details?: VNode;\n actionBar?: VNode;\n quoteContent: VNode;\n shippingInformationTitle: VNode;\n shippingInformation: VNode;\n quoteCommentsTitle: VNode;\n quoteComments: VNode;\n attachFilesField?: VNode;\n attachedFilesList?: VNode;\n footer: VNode;\n}\n\nexport const ManageNegotiableQuote: FunctionComponent<ManageNegotiableQuoteProps> = ({\n className,\n loading,\n quoteName,\n quoteStatus,\n banner,\n details,\n actionBar,\n quoteContent,\n shippingInformationTitle,\n shippingInformation,\n quoteCommentsTitle,\n quoteComments,\n attachFilesField,\n attachedFilesList,\n footer,\n ...props\n}) => {\n if (loading) {\n return <ManageNegotiableQuoteSkeleton />;\n }\n\n return (\n <div {...props} className={classes(['quote-management-manage-negotiable-quote', className])}>\n <div className={classes(['quote-management-manage-negotiable-quote__header'])}>\n {quoteName &&\n <VComponent\n node={quoteName}\n className={classes(['quote-management-manage-negotiable-quote__quote-name'])}\n />\n }\n {quoteStatus &&\n <VComponent\n node={quoteStatus}\n className={classes(['quote-management-manage-negotiable-quote__quote-status'])}\n />\n }\n </div>\n {banner &&\n <VComponent\n node={banner}\n className={classes(['quote-management-manage-negotiable-quote__banner'])}\n />\n }\n {details &&\n <VComponent\n node={details}\n className={classes(['quote-management-manage-negotiable-quote__details'])}\n />\n }\n {actionBar &&\n <VComponent\n node={actionBar}\n className={classes(['quote-management-manage-negotiable-quote__action-bar'])}\n />\n }\n {quoteContent &&\n <VComponent\n node={quoteContent}\n className={classes(['quote-management-manage-negotiable-quote__quote-content'])}\n />\n }\n <div data-testid=\"quote-shipping-information-container\" className={classes(['quote-management-manage-negotiable-quote__shipping-information-container'])}>\n {shippingInformationTitle &&\n <VComponent\n node={shippingInformationTitle}\n className={classes(['quote-management-manage-negotiable-quote__shipping-information-title'])}\n />\n }\n {shippingInformation &&\n <VComponent\n node={shippingInformation}\n className={classes(['quote-management-manage-negotiable-quote__shipping-information'])}\n />\n }\n </div>\n <div data-testid=\"quote-comments-container\" className={classes(['quote-management-manage-negotiable-quote__quote-comments-container'])}>\n {quoteCommentsTitle &&\n <VComponent\n node={quoteCommentsTitle}\n className={classes(['quote-management-manage-negotiable-quote__quote-comments-title'])}\n />\n }\n {quoteComments &&\n <VComponent\n node={quoteComments}\n className={classes(['quote-management-manage-negotiable-quote__quote-comments'])}\n />\n }\n {attachFilesField &&\n <VComponent\n node={attachFilesField}\n className={classes(['quote-management-manage-negotiable-quote__attach-files-field'])}\n />\n }\n {attachedFilesList &&\n <VComponent\n node={attachedFilesList}\n className={classes(['quote-management-manage-negotiable-quote__attached-files-list'])}\n />\n }\n </div>\n <VComponent\n node={footer}\n className={classes(['quote-management-manage-negotiable-quote__footer'])}\n />\n </div>\n );\n};\n\nexport const ManageNegotiableQuoteSkeleton: FunctionComponent = () => {\n return (\n <Skeleton data-testid=\"manage-negotiable-quote-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 {\n HTMLAttributes,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n createPortal,\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 {\n NegotiableQuoteModel,\n NegotiableQuoteCartItem,\n} from '@/quote-management/data/models/negotiable-quote-model';\nimport {\n ManageNegotiableQuote as ManageNegotiableQuoteComponent,\n ManageNegotiableQuoteProps as ManageNegotiableQuoteComponentProps,\n} from '@/quote-management/components/ManageNegotiableQuote';\nimport { events } from '@adobe-commerce/event-bus';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n ActionsBar,\n TabbedContent,\n ConfirmationModal,\n AttachedFilesList,\n AttachedFile,\n} from '@/quote-management/components';\nimport { ShippingAddressDisplay } from '@/quote-management/containers/ShippingAddressDisplay';\nimport { QuoteHistoryLog } from '@/quote-management/containers/QuoteHistoryLog';\nimport { ItemsQuoted, QuoteCommentsList } from '@/quote-management/containers';\nimport {\n Button,\n InLineAlert,\n TextArea,\n InputFile,\n} from '@adobe-commerce/elsie/components';\nimport {\n WarningFilled,\n Edit,\n CheckWithCircle,\n Add,\n} from '@adobe-commerce/elsie/icons';\nimport {\n deleteQuote,\n sendForReview,\n renameNegotiableQuote,\n closeNegotiableQuote,\n getQuoteData,\n uploadFile,\n duplicateQuote,\n createQuoteTemplate,\n} from '@/quote-management/api';\nimport {\n formatFileSize,\n validateFileType,\n validateFileSize,\n} from '@/quote-management/utils/fileUtils';\nimport { RenameQuoteModal } from '@/quote-management/components/RenameQuoteModal';\n\nexport interface ManageNegotiableQuoteProps\n extends HTMLAttributes<HTMLDivElement> {\n onActionsDropdownChange?: (event: Event) => void;\n onActionsButtonClick?: (action: string) => void;\n onSendForReview?: (params: {\n quoteData: NegotiableQuoteModel;\n comment?: string;\n attachments?: AttachedFile[];\n }) => void;\n maxFiles?: number;\n maxFileSize?: number;\n acceptedFileTypes?: string[];\n onDuplicateQuote?: (params: {\n quoteData: NegotiableQuoteModel;\n newQuote: NegotiableQuoteModel;\n }) => void;\n onCreateTemplate?: (params: {\n quoteData: NegotiableQuoteModel;\n templateId: string;\n }) => void;\n slots?: {\n QuoteName?: SlotProps<{\n quoteName?: string;\n quoteData?: NegotiableQuoteModel;\n }>;\n QuoteStatus?: SlotProps<{\n quoteStatus?: string;\n quoteData?: NegotiableQuoteModel;\n }>;\n Banner?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n Details?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n ActionBar?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n actionsBarDropdownValue?: string;\n }>;\n QuoteContent?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n ItemsQuotedTab?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n CommentsTab?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n HistoryLogTab?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n ShippingInformationTitle?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n ShippingInformation?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n loading?: boolean;\n setLoading?: (loading: boolean) => void;\n }>;\n QuoteCommentsTitle?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n QuoteComments?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n }>;\n AttachFilesField?: SlotProps<{\n onFileChange: (files: File[]) => void;\n attachedFiles: AttachedFile[];\n fileUploadError: string | undefined;\n disabled?: boolean;\n }>;\n AttachedFilesList?: SlotProps<{\n files: AttachedFile[];\n onRemove: (key: string) => void;\n disabled?: boolean;\n }>;\n Footer?: SlotProps<{\n quoteData?: NegotiableQuoteModel;\n comment?: string;\n isSubmitting?: boolean;\n attachments?: AttachedFile[];\n handleSendForReview: () => void;\n }>;\n };\n}\n\nexport const ManageNegotiableQuote: Container<ManageNegotiableQuoteProps> = ({\n onActionsDropdownChange,\n slots,\n onActionsButtonClick,\n onSendForReview,\n maxFiles,\n maxFileSize,\n acceptedFileTypes,\n onDuplicateQuote,\n onCreateTemplate,\n ...props\n}) => {\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(\n undefined\n );\n const [loading, setLoading] = useState<boolean>(true);\n const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState<boolean>(false);\n const [deleteError, setDeleteError] = useState<string | null>(null);\n const [deleteSuccess, setDeleteSuccess] = useState<boolean>(false);\n const [isDuplicateDialogOpen, setIsDuplicateDialogOpen] = useState<boolean>(false);\n const [duplicateError, setDuplicateError] = useState<string | null>(null);\n const [duplicateSuccess, setDuplicateSuccess] = useState<boolean>(false);\n const [comment, setComment] = useState<string>('');\n const [isSubmitting, setIsSubmitting] = useState<boolean>(false);\n const [showCloseModal, setShowCloseModal] = useState<boolean>(false);\n const [isClosing, setIsClosing] = useState<boolean>(false);\n const [modalSuccessMessage, setModalSuccessMessage] = useState<string>('');\n const [modalErrorMessage, setModalErrorMessage] = useState<string>('');\n const [showCreateTemplateModal, setShowCreateTemplateModal] = useState<boolean>(false);\n const [isCreatingTemplate, setIsCreatingTemplate] = useState<boolean>(false);\n const [createTemplateSuccessMessage, setCreateTemplateSuccessMessage] = useState<string>('');\n const [createTemplateErrorMessage, setCreateTemplateErrorMessage] = useState<string>('');\n const [isRenameModalOpen, setIsRenameModalOpen] = useState<boolean>(false);\n const [renameQuoteName, setRenameQuoteName] = useState<string>('');\n const [renameReason, setRenameReason] = useState<string>('');\n const [renameError, setRenameError] = useState<string>('');\n const [renameQuoteNameError, setRenameQuoteNameError] = useState<string>('');\n const [renameSuccess, setRenameSuccess] = useState<string>('');\n const [attachedFiles, setAttachedFiles] = useState<AttachedFile[]>([]);\n const [fileUploadError, setFileUploadError] = useState<string | undefined>(undefined);\n const [selectedItemUids, setSelectedItemUids] = useState<Set<string>>(\n new Set()\n );\n const selectedItemUidsRef = useRef<Set<string>>(selectedItemUids);\n const removeItemsHandlerRef = useRef<\n ((items: NegotiableQuoteCartItem[]) => void) | null\n >(null);\n const [actionsBarDropdownValue, setActionsBarDropdownValue] =\n useState<string>('');\n const actionsBarDropdownValueRef = useRef<string>(actionsBarDropdownValue);\n const [isNoItemsSelectedModalOpen, setIsNoItemsSelectedModalOpen] =\n useState<boolean>(false);\n\n // Keep refs in sync with state\n useEffect(() => {\n selectedItemUidsRef.current = selectedItemUids;\n }, [selectedItemUids]);\n\n useEffect(() => {\n actionsBarDropdownValueRef.current = actionsBarDropdownValue;\n }, [actionsBarDropdownValue]);\n\n const dictionary = useText({\n createdLabel: 'NegotiableQuote.Manage.createdLabel',\n salesRepLabel: 'NegotiableQuote.Manage.salesRepLabel',\n expiresLabel: 'NegotiableQuote.Manage.expiresLabel',\n actionsLabel: 'NegotiableQuote.Manage.actionsLabel',\n remove: 'NegotiableQuote.Manage.actions.remove',\n close: 'NegotiableQuote.Manage.actionButtons.close',\n delete: 'NegotiableQuote.Manage.actionButtons.delete',\n print: 'NegotiableQuote.Manage.actionButtons.print',\n createTemplate: 'NegotiableQuote.Manage.actionButtons.createTemplate',\n createCopy: 'NegotiableQuote.Manage.actionButtons.createCopy',\n shippingInformationTitle:\n 'NegotiableQuote.Manage.shippingInformation.title',\n quoteCommentsTitle: 'NegotiableQuote.Manage.quoteComments.title',\n quoteCommentsPlaceholder:\n 'NegotiableQuote.Manage.quoteComments.placeholder',\n sendForReview: 'NegotiableQuote.Manage.actionButtons.sendForReview',\n bannerTitle: 'NegotiableQuote.Manage.bannerTitle',\n statusSubmitted: 'NegotiableQuote.Manage.bannerStatusMessages.submitted',\n statusPending: 'NegotiableQuote.Manage.bannerStatusMessages.pending',\n statusExpired: 'NegotiableQuote.Manage.bannerStatusMessages.expired',\n errorFallback:\n 'NegotiableQuote.Manage.confirmationModal.delete.errorFallback',\n closeSuccessMessage:\n 'NegotiableQuote.Manage.confirmationModal.close.successDescription',\n closeModalTitle: 'NegotiableQuote.Manage.actionButtons.close',\n closeModalMessage: 'NegotiableQuote.Manage.confirmationModal.close.message',\n closeModalCancel: 'NegotiableQuote.Manage.confirmationModal.cancel',\n closeModalConfirm: 'NegotiableQuote.Manage.confirmationModal.close.confirm',\n closeModalConfirmLoading:\n 'NegotiableQuote.Manage.confirmationModal.close.confirmLoading',\n closeModalSuccessHeading:\n 'NegotiableQuote.Manage.confirmationModal.close.successHeading',\n createTemplateModalTitle: 'NegotiableQuote.Manage.actionButtons.createTemplate',\n createTemplateModalMessage: 'NegotiableQuote.Manage.confirmationModal.createTemplate.message',\n createTemplateModalCancel: 'NegotiableQuote.Manage.confirmationModal.cancel',\n createTemplateModalConfirm: 'NegotiableQuote.Manage.confirmationModal.createTemplate.confirm',\n createTemplateModalConfirmLoading:\n 'NegotiableQuote.Manage.confirmationModal.createTemplate.confirmLoading',\n createTemplateModalSuccessHeading:\n 'NegotiableQuote.Manage.confirmationModal.createTemplate.successHeading',\n createTemplateSuccessMessage:\n 'NegotiableQuote.Manage.confirmationModal.createTemplate.successDescription',\n createTemplateModalErrorHeading:\n 'NegotiableQuote.Manage.confirmationModal.createTemplate.errorHeading',\n createTemplateErrorFallback:\n 'NegotiableQuote.Manage.confirmationModal.createTemplate.errorFallback',\n renameErrorHeading: 'NegotiableQuote.Manage.rename.errorHeading',\n renameQuoteNameRequired: 'NegotiableQuote.Manage.rename.quoteNameRequired',\n renameErrorDefault: 'NegotiableQuote.Manage.rename.errorDefault',\n renameSuccessHeading: 'NegotiableQuote.Manage.rename.successHeading',\n renameSuccessMessage: 'NegotiableQuote.Manage.rename.successMessage',\n confirmationModalCancel: 'NegotiableQuote.Manage.confirmationModal.cancel',\n confirmationModalDeleteTitle: 'NegotiableQuote.Manage.confirmationModal.delete.title',\n confirmationModalDeleteMessage: 'NegotiableQuote.Manage.confirmationModal.delete.message',\n confirmationModalDeleteConfirm: 'NegotiableQuote.Manage.confirmationModal.delete.confirm',\n confirmationModalDeleteErrorHeading: 'NegotiableQuote.Manage.confirmationModal.delete.errorHeading',\n confirmationModalDeleteErrorFallback: 'NegotiableQuote.Manage.confirmationModal.delete.errorFallback',\n confirmationModalDeleteSuccessHeading: 'NegotiableQuote.Manage.confirmationModal.delete.successHeading',\n confirmationModalDeleteSuccessDescription: 'NegotiableQuote.Manage.confirmationModal.delete.successDescription',\n confirmationModalDuplicateTitle: 'NegotiableQuote.Manage.confirmationModal.duplicate.title',\n confirmationModalDuplicateMessage: 'NegotiableQuote.Manage.confirmationModal.duplicate.message',\n confirmationModalDuplicateConfirm: 'NegotiableQuote.Manage.confirmationModal.duplicate.confirm',\n confirmationModalDuplicateErrorHeading: 'NegotiableQuote.Manage.confirmationModal.duplicate.errorHeading',\n confirmationModalDuplicateErrorFallback: 'NegotiableQuote.Manage.confirmationModal.duplicate.errorFallback',\n confirmationModalDuplicateSuccessHeading: 'NegotiableQuote.Manage.confirmationModal.duplicate.successHeading',\n confirmationModalDuplicateSuccessDescription: 'NegotiableQuote.Manage.confirmationModal.duplicate.successDescription',\n noItemsSelectedModalTitle: 'NegotiableQuote.Manage.confirmationModal.noItemsSelected.title',\n noItemsSelectedModalMessage: 'NegotiableQuote.Manage.confirmationModal.noItemsSelected.message',\n noItemsSelectedModalConfirm: 'NegotiableQuote.Manage.confirmationModal.noItemsSelected.confirm',\n attachFiles: 'NegotiableQuote.Manage.attachFiles',\n fileUploadError: 'NegotiableQuote.Manage.fileUploadError',\n maxFilesExceeded: 'NegotiableQuote.Manage.maxFilesExceeded',\n maxFileSizeExceeded: 'NegotiableQuote.Manage.maxFileSizeExceeded',\n invalidFileType: 'NegotiableQuote.Manage.invalidFileType',\n });\n /* Event listeners */\n useEffect(() => {\n const quoteDataEvent = events.on(\n 'quote-management/quote-data',\n (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n if (quote) {\n setQuoteData(quote);\n setLoading(false);\n }\n },\n {\n eager: true,\n }\n );\n return () => quoteDataEvent?.off();\n }, []);\n\n // Listen for shipping address set event\n useEffect(() => {\n const shippingAddressSetEvent = events.on(\n 'quote-management/shipping-address-set',\n (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n if (quote) {\n setQuoteData(quote);\n }\n },\n {\n eager: true,\n }\n );\n return () => shippingAddressSetEvent?.off();\n }, []);\n\n // Listen for quote sent for review event\n useEffect(() => {\n const quoteSentForReviewEvent = events.on(\n 'quote-management/quote-sent-for-review',\n (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n setQuoteData(quote);\n setComment(''); // Reset comment after successful submission\n setAttachedFiles([]); // Clear attachments after successful submission\n setIsSubmitting(false);\n },\n {\n eager: true,\n }\n );\n return () => quoteSentForReviewEvent?.off();\n }, []);\n\n // Listen for quote items removed event\n useEffect(() => {\n const quoteItemsRemovedEvent = events.on(\n 'quote-management/quote-items-removed',\n (data: { quote: NegotiableQuoteModel; removedItemUids: string[] }) => {\n const { quote, removedItemUids } = data;\n /* istanbul ignore else */ // Always has quote in real usage; covered in integration tests\n if (quote) {\n setQuoteData(quote);\n }\n // Clear selected items that were removed\n /* istanbul ignore else */ // Always has removedItemUids in real usage; covered in integration tests\n if (removedItemUids) {\n setSelectedItemUids((prev) => {\n const next = new Set(prev);\n removedItemUids.forEach((uid) => next.delete(uid));\n return next;\n });\n }\n },\n {\n eager: true,\n }\n );\n return () => quoteItemsRemovedEvent?.off();\n }, []);\n\n /**\n * Handlers\n */\n const handleItemCheckboxChange = useCallback(\n (item: NegotiableQuoteCartItem, isSelected: boolean) => {\n setSelectedItemUids((prev) => {\n const next = new Set(prev);\n if (isSelected) {\n next.add(item.uid);\n } else {\n next.delete(item.uid);\n }\n return next;\n });\n },\n []\n );\n\n const handleActionsDropdownChange = useCallback(\n (event: Event) => {\n const action = (event.target as HTMLSelectElement).value;\n const currentSelectedUids = selectedItemUidsRef.current;\n /* istanbul ignore else */ if (action === 'remove') {\n setActionsBarDropdownValue(action);\n actionsBarDropdownValueRef.current = action; // Update ref immediately\n /* istanbul ignore next */ if (currentSelectedUids.size === 0) {\n // No items selected - show warning modal\n setIsNoItemsSelectedModalOpen(true);\n } else if (quoteData && removeItemsHandlerRef.current) {\n // Items selected - proceed with removal\n const itemsToRemove = quoteData.items.filter((item) =>\n currentSelectedUids.has(item.uid)\n );\n /* istanbul ignore next */ removeItemsHandlerRef.current(\n itemsToRemove\n );\n }\n }\n onActionsDropdownChange?.(event);\n },\n [onActionsDropdownChange, quoteData]\n );\n\n /* istanbul ignore next */ const handleCloseNoItemsSelectedModal =\n useCallback(() => {\n setIsNoItemsSelectedModalOpen(false);\n setActionsBarDropdownValue('');\n actionsBarDropdownValueRef.current = '';\n }, []);\n\n // Listen for quote closed event\n useEffect(() => {\n const quoteClosedEvent = events.on(\n 'quote-management/negotiable-quote-closed',\n async (data: { closedQuoteUids: string[] }) => {\n setIsClosing(false);\n setModalErrorMessage('');\n // Show success message in modal\n setModalSuccessMessage(dictionary.closeSuccessMessage);\n\n // Refresh quote data if the current quote was closed\n // Use a function to get the current quoteData to avoid stale closure\n setQuoteData((currentQuoteData) => {\n if (\n currentQuoteData?.uid &&\n data.closedQuoteUids?.includes(currentQuoteData.uid)\n ) {\n // Trigger async refresh\n getQuoteData(currentQuoteData.uid)\n .then((updatedQuoteData) => {\n setQuoteData(updatedQuoteData);\n })\n .catch((error) => {\n console.warn(\n 'Failed to refresh quote data after closure:',\n error\n );\n });\n }\n return currentQuoteData; // Return current data unchanged for this setter call\n });\n\n // Close modal and redirect after a delay to show success message\n setTimeout(() => {\n setShowCloseModal(false);\n setModalSuccessMessage('');\n }, 2000);\n },\n {\n eager: true,\n }\n );\n return () => quoteClosedEvent?.off();\n }, [dictionary.closeSuccessMessage]);\n\n // Listen for quote close error event\n useEffect(() => {\n const quoteCloseErrorEvent = events.on(\n 'quote-management/negotiable-quote-close-error',\n (data: { error: Error; attemptedQuoteUids: string[] }) => {\n console.log('Close error event received:', data);\n setIsClosing(false);\n setModalSuccessMessage('');\n const errorMsg = data.error.message || dictionary.errorFallback;\n setModalErrorMessage(errorMsg);\n },\n {\n eager: true,\n }\n );\n return () => quoteCloseErrorEvent?.off();\n }, [dictionary.errorFallback]);\n\n // Listen for quote renamed event\n useEffect(() => {\n const quoteRenamedEvent = events.on(\n 'quote-management/quote-renamed',\n (data: { quote: NegotiableQuoteModel }) => {\n const { quote } = data;\n setQuoteData(quote);\n setRenameError('');\n setRenameQuoteNameError('');\n setRenameSuccess(dictionary.renameSuccessMessage);\n\n // Wait 2 seconds before closing the modal\n setTimeout(() => {\n setIsRenameModalOpen(false);\n setRenameQuoteName('');\n setRenameReason('');\n setRenameSuccess('');\n }, 2000);\n },\n {\n eager: true,\n }\n );\n return () => quoteRenamedEvent?.off();\n }, [dictionary.renameSuccessMessage]);\n\n // Listen for quote duplicated event\n useEffect(() => {\n const quoteDuplicatedEvent = events.on(\n 'quote-management/quote-duplicated',\n (data: {\n quote: NegotiableQuoteModel;\n input: { quoteUid: string; duplicatedQuoteUid: string };\n }) => {\n const { quote: newQuote } = data;\n\n // Call parent callback if provided\n if (quoteData && onDuplicateQuote) {\n onDuplicateQuote({ quoteData, newQuote });\n }\n\n // Show success in modal\n setDuplicateSuccess(true);\n setDuplicateError(null);\n\n // Close modal after showing success message\n // Navigation is handled by the application layer listening to quote-duplicated event\n setTimeout(() => {\n setIsDuplicateDialogOpen(false);\n setDuplicateSuccess(false);\n setDuplicateError(null);\n }, 2000);\n },\n {\n eager: true,\n }\n );\n return () => quoteDuplicatedEvent?.off();\n }, [quoteData, onDuplicateQuote]);\n\n // Listen for quote template created event\n useEffect(() => {\n const quoteTemplateCreatedEvent = events.on(\n 'quote-management/quote-template-created',\n (data: {\n quoteTemplate: { id: string; uid?: string; name: string };\n input: { quoteUid: string };\n }) => {\n const { quoteTemplate } = data;\n\n // Call parent callback if provided\n if (quoteData && onCreateTemplate) {\n onCreateTemplate({ quoteData, templateId: quoteTemplate.id });\n }\n\n // Close modal after showing success message\n // Navigation is handled by the application layer listening to quote-template-created event\n setTimeout(() => {\n setShowCreateTemplateModal(false);\n setCreateTemplateSuccessMessage('');\n }, 2000);\n },\n {\n eager: true,\n }\n );\n return () => quoteTemplateCreatedEvent?.off();\n }, [quoteData, onCreateTemplate]);\n\n /**\n * File upload handlers\n */\n\n const handleAttachFiles = useCallback(async (files: File[]) => {\n // Check maxFiles limit\n if (maxFiles && attachedFiles.length + files.length > maxFiles) {\n setFileUploadError(dictionary.maxFilesExceeded.replace('{maxFiles}', String(maxFiles)));\n return;\n }\n\n // Validate file types and sizes before uploading\n for (const file of files) {\n if (maxFileSize && !validateFileSize(file.size, maxFileSize)) {\n setFileUploadError(\n dictionary.maxFileSizeExceeded.replace('{maxSize}', formatFileSize(maxFileSize))\n );\n return;\n }\n\n if (acceptedFileTypes && !validateFileType(file.type, acceptedFileTypes)) {\n setFileUploadError(dictionary.invalidFileType);\n return;\n }\n }\n\n setFileUploadError(undefined);\n\n // Add files with 'uploading' status\n const newFiles: AttachedFile[] = files.map(file => ({\n key: `temp-${Date.now()}-${Math.random()}-${file.name}`,\n name: file.name,\n size: file.size,\n status: 'uploading',\n }));\n\n setAttachedFiles(prev => [...prev, ...newFiles]);\n\n // Upload each file and update its status\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const tempKey = newFiles[i].key;\n\n try {\n const result = await uploadFile(file);\n setAttachedFiles(prev => prev.map(f =>\n f.key === tempKey\n ? { ...f, key: result.key, status: 'success' }\n : f\n ));\n } catch (error) {\n setAttachedFiles(prev => prev.map(f =>\n f.key === tempKey\n ? { ...f, status: 'error', error: (error as Error).message }\n : f\n ));\n }\n }\n }, [maxFiles, maxFileSize, acceptedFileTypes, attachedFiles, dictionary]);\n\n const handleRemoveFile = useCallback((key: string) => {\n setAttachedFiles(prev => prev.filter(f => f.key !== key));\n }, []);\n\n /**\n * VNodes for the ManageNegotiableQuote component\n */\n\n // Rename handlers\n const handleRenameClick = useCallback(() => {\n setRenameQuoteName(quoteData?.name || '');\n setRenameReason('');\n setRenameError('');\n setRenameQuoteNameError('');\n setRenameSuccess('');\n setIsRenameModalOpen(true);\n }, [quoteData]);\n\n const handleRenameClose = useCallback(() => {\n setIsRenameModalOpen(false);\n setRenameQuoteName('');\n setRenameReason('');\n setRenameError('');\n setRenameQuoteNameError('');\n setRenameSuccess('');\n }, []);\n\n const handleRenameQuoteNameChange = useCallback((value: string) => {\n setRenameQuoteName(value);\n if (value.trim()) {\n setRenameQuoteNameError('');\n }\n }, []);\n\n const handleDuplicateQuote = useCallback(() => {\n // Show confirmation modal\n setIsDuplicateDialogOpen(true);\n setDuplicateError(null);\n setDuplicateSuccess(false);\n }, []);\n\n const handleRenameSave = useCallback(async () => {\n // Validate quote name\n if (!renameQuoteName.trim()) {\n setRenameQuoteNameError(dictionary.renameQuoteNameRequired);\n return;\n }\n\n try {\n setRenameError('');\n setRenameQuoteNameError('');\n await renameNegotiableQuote({\n quoteUid: quoteData!.uid,\n quoteName: renameQuoteName,\n quoteComment: renameReason.trim() || undefined,\n });\n // The quote-renamed event will handle closing the modal and updating state\n } catch (error) {\n setRenameError((error as Error).message || dictionary.renameErrorDefault);\n }\n }, [\n quoteData,\n renameQuoteName,\n renameReason,\n dictionary.renameQuoteNameRequired,\n dictionary.renameErrorDefault,\n ]);\n\n // Quote name with rename icon\n const quoteName = useMemo(() => {\n // Priority 1: Check lockedForEditing if explicitly set\n // Priority 2: Fall back to status check\n const isLocked =\n quoteData &&\n // If lockedForEditing is explicitly set, use it\n (quoteData.lockedForEditing === true ||\n // Otherwise, lock based on status\n (quoteData.lockedForEditing === undefined &&\n (quoteData.status === 'SUBMITTED' ||\n quoteData.status === 'PENDING' ||\n quoteData.status === 'ORDERED' ||\n quoteData.status === 'CLOSED')));\n\n return (\n <Slot\n name=\"QuoteName\"\n slot={slots?.QuoteName}\n context={{ quoteName: quoteData?.name, quoteData }}\n >\n <div className=\"quote-management-manage-negotiable-quote__quote-name-wrapper\">\n <h1\n data-testid=\"quote-name\"\n className=\"quote-management-manage-negotiable-quote__quote-name-title\"\n >\n {quoteData?.name}\n </h1>\n <button\n onClick={handleRenameClick}\n disabled={isLocked}\n data-testid=\"rename-quote-button\"\n className=\"quote-management-manage-negotiable-quote__rename-button\"\n aria-label=\"Rename quote\"\n >\n <Edit />\n </button>\n </div>\n </Slot>\n );\n }, [slots?.QuoteName, quoteData, handleRenameClick]);\n\n // Quote status\n const quoteStatus = useMemo(() => {\n return (\n <Slot\n name=\"QuoteStatus\"\n slot={slots?.QuoteStatus}\n context={{ quoteStatus: quoteData?.status, quoteData }}\n >\n <div data-testid=\"quote-status\">{quoteData?.status}</div>\n </Slot>\n );\n }, [slots?.QuoteStatus, quoteData]);\n\n // Banner\n const getBannerStatusMessage = useCallback(\n (status: string | undefined) => {\n switch (status) {\n case 'SUBMITTED':\n return dictionary.statusSubmitted;\n case 'PENDING':\n return dictionary.statusPending;\n case 'EXPIRED':\n return dictionary.statusExpired;\n default:\n return null;\n }\n },\n [dictionary]\n );\n\n const bannerMessage = getBannerStatusMessage(quoteData?.status);\n\n const bannerContent = bannerMessage && (\n <InLineAlert\n type=\"warning\"\n variant=\"secondary\"\n icon={<WarningFilled />}\n heading={dictionary.bannerTitle}\n description={bannerMessage}\n />\n );\n\n const banner = bannerContent && (\n <Slot\n name=\"Banner\"\n data-testid=\"banner\"\n slot={slots?.Banner}\n context={{ quoteData }}\n >\n {bannerContent}\n </Slot>\n );\n\n // Details\n const details = useMemo(() => {\n if (!quoteData) {\n return;\n }\n\n // Some quotes, such as draft quotes, don't have a date formatted expiration date\n const expirationDate = quoteData.expirationDate ? formattedDate(quoteData.expirationDate, 'short') : undefined;\n\n return (\n <Slot name=\"Details\" slot={slots?.Details} context={{ quoteData }}>\n <div className=\"quote-management-manage-negotiable-quote__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote__detail-title\"\n data-testid=\"created-label\"\n >\n {dictionary.createdLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote__detail-content\"\n data-testid=\"created-value\"\n >\n {formattedDate(quoteData!.createdAt, 'short')} (\n {quoteData!.buyer.firstname} {quoteData!.buyer.lastname})\n </span>\n </div>\n <div className=\"quote-management-manage-negotiable-quote__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote__detail-title\"\n data-testid=\"sales-rep-label\"\n >\n {dictionary.salesRepLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote__detail-content\"\n data-testid=\"sales-rep-value\"\n >\n {quoteData!.salesRepName}\n </span>\n </div>\n <div className=\"quote-management-manage-negotiable-quote__detail\">\n <span\n className=\"quote-management-manage-negotiable-quote__detail-title\"\n data-testid=\"expires-label\"\n >\n {dictionary.expiresLabel}\n </span>\n <span\n className=\"quote-management-manage-negotiable-quote__detail-content\"\n data-testid=\"expires-value\"\n >\n {expirationDate}\n </span>\n </div>\n </Slot>\n );\n }, [slots?.Details, dictionary, quoteData]);\n\n // Action bar\n const buttons: { label: string; value: string; disabled?: boolean }[] =\n useMemo(() => {\n return [\n {\n label: dictionary.close,\n value: 'close',\n disabled: !quoteData?.canClose,\n },\n {\n label: dictionary.delete,\n value: 'delete',\n disabled: !quoteData?.canDelete,\n },\n {\n label: dictionary.print,\n value: 'print',\n },\n {\n label: dictionary.createTemplate,\n value: 'createTemplate',\n },\n {\n label: dictionary.createCopy,\n value: 'createCopy',\n },\n ];\n }, [dictionary, quoteData?.canDelete, quoteData?.canClose]);\n const actionBar = useMemo(() => {\n const handleActionsButtonClick = (action: string) => {\n switch (action) {\n case 'close':\n setShowCloseModal(true);\n setModalErrorMessage(''); // Clear modal errors\n setModalSuccessMessage(''); // Clear modal success messages\n onActionsButtonClick?.(action);\n break;\n case 'delete':\n setIsDeleteDialogOpen(true);\n onActionsButtonClick?.(action);\n break;\n case 'print':\n onActionsButtonClick?.(action);\n break;\n case 'createTemplate':\n setShowCreateTemplateModal(true);\n setCreateTemplateErrorMessage(''); // Clear modal errors\n setCreateTemplateSuccessMessage(''); // Clear modal success messages\n onActionsButtonClick?.(action);\n break;\n case 'createCopy':\n handleDuplicateQuote();\n onActionsButtonClick?.(action);\n break;\n }\n };\n return (\n <Slot\n name=\"ActionBar\"\n slot={slots?.ActionBar}\n context={{ quoteData, actionsBarDropdownValue }}\n >\n <ActionsBar\n dropdownPlaceholder={dictionary.actionsLabel}\n dropdownOptions={[\n {\n label: dictionary.remove,\n value: 'remove',\n },\n ]}\n dropdownValue={actionsBarDropdownValue}\n handleDropdownChange={handleActionsDropdownChange}\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 quoteData,\n handleActionsDropdownChange,\n onActionsButtonClick,\n handleDuplicateQuote,\n actionsBarDropdownValue,\n ]);\n\n // Quote content\n const quoteContent = useMemo(() => {\n return (\n <Slot\n name=\"QuoteContent\"\n slot={slots?.QuoteContent}\n context={{ quoteData }}\n >\n <TabbedContent\n tabs={\n new Map([\n ['items-quoted', 'Items Quoted'],\n ['comments', 'Comments'],\n ['history-log', 'History Log'],\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={{ quoteData }}\n >\n <ItemsQuoted\n quoteData={quoteData}\n onItemCheckboxChange={handleItemCheckboxChange}\n onRemoveItemsRef={(handler) => {\n removeItemsHandlerRef.current = handler;\n }}\n onRemoveModalStateChange={\n /* istanbul ignore next */ (isOpen) => {\n if (\n !isOpen &&\n actionsBarDropdownValueRef.current === 'remove'\n ) {\n setActionsBarDropdownValue('');\n }\n }\n }\n />\n </Slot>,\n ],\n [\n 'comments',\n <Slot\n key=\"comments\"\n name=\"CommentsTab\"\n slot={slots?.CommentsTab}\n context={{ quoteData }}\n >\n <QuoteCommentsList quoteData={quoteData} />\n </Slot>,\n ],\n [\n 'history-log',\n <Slot\n key=\"history-log\"\n name=\"HistoryLogTab\"\n slot={slots?.HistoryLogTab}\n context={{ quoteData }}\n >\n <QuoteHistoryLog quoteData={quoteData} />\n </Slot>,\n ],\n ])\n }\n />\n </Slot>\n );\n }, [\n slots?.QuoteContent,\n slots?.HistoryLogTab,\n slots?.CommentsTab,\n slots?.ItemsQuotedTab,\n quoteData,\n handleItemCheckboxChange,\n ]);\n\n // Shipping information title\n const shippingInformationTitle = useMemo(() => {\n return (\n <Slot\n name=\"ShippingInformationTitle\"\n slot={slots?.ShippingInformationTitle}\n context={{ quoteData }}\n >\n <h2>{dictionary.shippingInformationTitle}</h2>\n </Slot>\n );\n }, [slots?.ShippingInformationTitle, quoteData, dictionary]);\n\n // Shipping information\n const shippingInformation = useMemo(() => {\n return (\n <Slot\n name=\"ShippingInformation\"\n slot={slots?.ShippingInformation}\n context={{ quoteData, loading, setLoading }}\n >\n <ShippingAddressDisplay\n shippingAddress={quoteData?.shippingAddresses?.[0]}\n loading={loading}\n data-testid=\"manage-quote-shipping-address\"\n />\n </Slot>\n );\n }, [slots?.ShippingInformation, quoteData, loading, setLoading]);\n\n // Quote comments title\n const quoteCommentsTitle = useMemo(() => {\n return (\n <Slot\n name=\"QuoteCommentsTitle\"\n slot={slots?.QuoteCommentsTitle}\n context={{ quoteData }}\n >\n <h2>{dictionary.quoteCommentsTitle}</h2>\n </Slot>\n );\n }, [slots?.QuoteCommentsTitle, dictionary, quoteData]);\n\n // Quote comments\n const quoteComments = useMemo(() => {\n return (\n <Slot\n name=\"QuoteComments\"\n slot={slots?.QuoteComments}\n context={{ quoteData }}\n >\n <TextArea\n name=\"quoteComments\"\n placeholder={dictionary.quoteCommentsPlaceholder}\n rows={3}\n value={comment}\n onInput={(e) => {\n setComment((e.target as HTMLTextAreaElement).value);\n }}\n disabled={!quoteData?.canSendForReview || isSubmitting}\n />\n </Slot>\n );\n }, [slots?.QuoteComments, dictionary, quoteData, comment, isSubmitting]);\n\n // File upload should be disabled when quote cannot be sent for review\n // (which already includes the status and permission checks from the transformer)\n const isFileUploadDisabled = useMemo(() => {\n return !quoteData?.canSendForReview;\n }, [quoteData]);\n\n // File upload input\n const attachFilesField = useMemo(() => {\n // Check if button should be visually disabled\n const isDisabled = isSubmitting || isFileUploadDisabled;\n\n return (\n <Slot\n name=\"AttachFilesField\"\n slot={slots?.AttachFilesField}\n context={{ onFileChange: handleAttachFiles, attachedFiles, fileUploadError, disabled: isDisabled }}\n >\n <div \n className=\"quote-management-manage-negotiable-quote__attach-files\"\n {...(isDisabled ? { 'data-disabled': true } : {})}\n aria-disabled={isDisabled}\n >\n <InputFile\n multiple\n onChange={(e: Event) => {\n const target = e.target as HTMLInputElement;\n const fileList = target?.files;\n const files = fileList ? Array.from(fileList) : [];\n if (files.length > 0) {\n void handleAttachFiles(files);\n }\n }}\n icon={<Add />}\n disabled={isDisabled}\n data-testid=\"manage-quote-attach-files\"\n accept={acceptedFileTypes?.join(',')}\n >\n {dictionary.attachFiles}\n </InputFile>\n {fileUploadError && (\n <div\n className=\"quote-management-manage-negotiable-quote__file-error\"\n data-testid=\"file-upload-error\"\n >\n {fileUploadError}\n </div>\n )}\n </div>\n </Slot>\n );\n }, [\n slots?.AttachFilesField,\n handleAttachFiles,\n isSubmitting,\n isFileUploadDisabled,\n acceptedFileTypes,\n fileUploadError,\n dictionary,\n attachedFiles,\n ]);\n\n // Attached files list\n const attachedFilesList = useMemo(() => {\n if (!attachedFiles.length) return undefined;\n\n return (\n <Slot\n name=\"AttachedFilesList\"\n slot={slots?.AttachedFilesList}\n context={{ files: attachedFiles, onRemove: handleRemoveFile, disabled: isSubmitting }}\n >\n <AttachedFilesList\n files={attachedFiles}\n onRemove={handleRemoveFile}\n disabled={isSubmitting}\n />\n </Slot>\n );\n }, [attachedFiles, handleRemoveFile, isSubmitting, slots?.AttachedFilesList]);\n\n // Close quote handler - only called when quoteData exists\n const handleCloseQuote = useCallback(async () => {\n if (!quoteData?.uid) {\n return;\n }\n setIsClosing(true);\n setModalErrorMessage('');\n setModalSuccessMessage('');\n try {\n await closeNegotiableQuote({\n quoteUids: [quoteData!.uid],\n });\n } catch (error) {\n console.error('Failed to close quote:', error);\n }\n }, [quoteData]);\n\n const handleCloseModalCancel = useCallback(() => {\n setShowCloseModal(false);\n setModalErrorMessage('');\n setModalSuccessMessage('');\n }, []);\n\n // Create template handler\n const handleCreateTemplate = useCallback(async () => {\n if (!quoteData?.uid) {\n return;\n }\n setIsCreatingTemplate(true);\n setCreateTemplateErrorMessage('');\n setCreateTemplateSuccessMessage('');\n try {\n await createQuoteTemplate(quoteData.uid);\n // Show success message\n setCreateTemplateSuccessMessage(dictionary.createTemplateSuccessMessage);\n } catch (error) {\n console.error('Failed to create quote template:', error);\n const errorMessage =\n error instanceof Error ? error.message : dictionary.createTemplateErrorFallback;\n setCreateTemplateErrorMessage(errorMessage);\n } finally {\n setIsCreatingTemplate(false);\n }\n }, [quoteData, dictionary.createTemplateSuccessMessage, dictionary.createTemplateErrorFallback]);\n\n const handleCreateTemplateModalCancel = useCallback(() => {\n setShowCreateTemplateModal(false);\n setCreateTemplateErrorMessage('');\n setCreateTemplateSuccessMessage('');\n }, []);\n\n // Footer\n const handleSendForReview = useCallback(async () => {\n const successfulAttachments = attachedFiles.filter(f => f.status === 'success');\n\n // If override prop is provided, use it instead of the API\n if (onSendForReview) {\n onSendForReview({\n quoteData: quoteData!,\n comment: comment.trim() || undefined,\n attachments: successfulAttachments.length ?\n successfulAttachments :\n undefined,\n });\n return;\n }\n\n // Otherwise, use the sendForReview API\n setIsSubmitting(true);\n try {\n await sendForReview({\n quoteUid: quoteData!.uid,\n comment: comment.trim() || undefined,\n attachments: successfulAttachments.length\n ? successfulAttachments.map(f => ({ key: f.key }))\n : undefined,\n });\n // The quote-sent-for-review event will handle updating state\n } catch (error) {\n console.error('Failed to send quote for review:', error);\n setIsSubmitting(false);\n // TODO: Show error notification to user\n }\n }, [quoteData, onSendForReview, comment, attachedFiles]);\n\n const footer = useMemo(() => {\n return (\n <Slot\n name=\"Footer\"\n slot={slots?.Footer}\n context={{ quoteData, comment, isSubmitting, attachments: attachedFiles, handleSendForReview }}\n >\n <Button\n variant=\"primary\"\n onClick={handleSendForReview}\n data-testid=\"send-for-review-button\"\n disabled={!quoteData?.canSendForReview || isSubmitting}\n >\n {dictionary.sendForReview}\n </Button>\n </Slot>\n );\n }, [\n slots?.Footer,\n dictionary,\n quoteData,\n comment,\n isSubmitting,\n attachedFiles,\n handleSendForReview,\n ]);\n\n // Rename modal error banner\n const renameErrorBanner = useMemo(\n () =>\n renameError ? (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled color=\"var(--color-error)\" />}\n heading={dictionary.renameErrorHeading}\n description={renameError}\n />\n ) : undefined,\n [renameError, dictionary.renameErrorHeading]\n );\n\n // Rename modal success banner\n const renameSuccessBanner = useMemo(\n () =>\n renameSuccess ? (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.renameSuccessHeading}\n description={renameSuccess}\n />\n ) : undefined,\n [renameSuccess, dictionary.renameSuccessHeading]\n );\n\n // Delete quote functionality\n const getDeleteErrorMessage = useCallback(\n (error: any): string => {\n // If it's an operation failure with errors array, get the first error message\n if (\n error.errors &&\n Array.isArray(error.errors) &&\n error.errors.length > 0\n ) {\n return (\n error.errors[0].message ||\n dictionary.confirmationModalDeleteErrorFallback\n );\n }\n // Otherwise use the error message or fallback\n return error?.message || dictionary.confirmationModalDeleteErrorFallback;\n },\n [dictionary.confirmationModalDeleteErrorFallback]\n );\n\n const handleDeleteCancel = useCallback(() => {\n setIsDeleteDialogOpen(false);\n setDeleteError(null);\n setDeleteSuccess(false);\n }, []);\n\n const handleDeleteConfirm = useCallback(async () => {\n if (!quoteData?.uid) {\n return;\n }\n\n setDeleteError(null);\n setDeleteSuccess(false);\n\n try {\n const { operationResults } = await deleteQuote(quoteData.uid);\n\n const failure = operationResults.find(\n (res: any) => res.__typename === 'DeleteNegotiableQuoteOperationFailure'\n ) as any;\n if (failure) {\n const errorMessage = getDeleteErrorMessage(failure);\n setDeleteError(errorMessage);\n return;\n }\n\n setDeleteSuccess(true);\n } catch (error: any) {\n const errorMessage = getDeleteErrorMessage(error);\n setDeleteError(errorMessage);\n }\n }, [quoteData, getDeleteErrorMessage]);\n\n const handleDismissError = useCallback(() => {\n setDeleteError(null);\n }, []);\n\n const handleDismissSuccess = useCallback(() => {\n setDeleteSuccess(false);\n }, []);\n\n // Duplicate quote functionality\n const getDuplicateErrorMessage = useCallback((error: any): string => {\n return error?.message || dictionary.confirmationModalDuplicateErrorFallback;\n }, [dictionary.confirmationModalDuplicateErrorFallback]);\n\n const handleDuplicateCancel = useCallback(() => {\n setIsDuplicateDialogOpen(false);\n setDuplicateError(null);\n setDuplicateSuccess(false);\n }, []);\n\n const handleDuplicateConfirm = useCallback(async () => {\n if (!quoteData?.uid) {\n return;\n }\n\n setDuplicateError(null);\n setDuplicateSuccess(false);\n\n try {\n // Generate a unique duplicated quote UID by replacing the last 8 characters\n const generateUniqueUid = (originalUid: string): string => {\n const baseUid = originalUid.slice(0, -8); // Remove last 8 characters\n const randomSuffix = crypto.randomUUID().slice(0, 8);\n return baseUid + randomSuffix;\n };\n \n const duplicatedQuoteUid = generateUniqueUid(quoteData.uid);\n await duplicateQuote({ quoteUid: quoteData.uid, duplicatedQuoteUid });\n // Success handling is done in the event listener\n } catch (error: any) {\n const errorMessage = getDuplicateErrorMessage(error);\n setDuplicateError(errorMessage);\n }\n }, [quoteData, getDuplicateErrorMessage]);\n\n const handleDismissDuplicateError = useCallback(() => {\n setDuplicateError(null);\n }, []);\n\n const handleDismissDuplicateSuccess = useCallback(() => {\n setDuplicateSuccess(false);\n }, []);\n\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 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 const duplicateErrorBanner = duplicateError ? (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.confirmationModalDuplicateErrorHeading}\n description={duplicateError}\n onDismiss={handleDismissDuplicateError}\n data-testid=\"confirmation-modal-duplicate-error-banner\"\n />\n ) : null;\n\n const duplicateSuccessBanner = duplicateSuccess ? (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.confirmationModalDuplicateSuccessHeading}\n description={dictionary.confirmationModalDuplicateSuccessDescription}\n onDismiss={handleDismissDuplicateSuccess}\n data-testid=\"confirmation-modal-duplicate-success-banner\"\n />\n ) : null;\n\n const duplicateBanner = duplicateSuccessBanner || duplicateErrorBanner;\n\n const manageNegotiableQuoteProps: ManageNegotiableQuoteComponentProps = {\n ...props,\n loading,\n quoteName,\n quoteStatus,\n banner: banner || undefined,\n details,\n actionBar,\n quoteContent,\n shippingInformationTitle,\n shippingInformation,\n quoteCommentsTitle,\n quoteComments,\n attachFilesField,\n attachedFilesList,\n footer,\n };\n\n // Create banner for close modal based on success/error state\n let closeModalBanner = null;\n if (modalSuccessMessage) {\n closeModalBanner = (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.closeModalSuccessHeading}\n description={modalSuccessMessage}\n data-testid=\"close-quote-success-banner\"\n />\n );\n } else if (modalErrorMessage) {\n closeModalBanner = (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.confirmationModalDeleteErrorHeading}\n description={modalErrorMessage}\n data-testid=\"close-quote-error-banner\"\n />\n );\n }\n\n // Create banner for create template modal based on success/error state\n let createTemplateModalBanner = null;\n if (createTemplateSuccessMessage) {\n createTemplateModalBanner = (\n <InLineAlert\n type=\"success\"\n variant=\"primary\"\n icon={<CheckWithCircle />}\n heading={dictionary.createTemplateModalSuccessHeading}\n description={createTemplateSuccessMessage}\n data-testid=\"create-template-success-banner\"\n />\n );\n } else if (createTemplateErrorMessage) {\n createTemplateModalBanner = (\n <InLineAlert\n type=\"error\"\n variant=\"primary\"\n icon={<WarningFilled />}\n heading={dictionary.createTemplateModalErrorHeading}\n description={createTemplateErrorMessage}\n data-testid=\"create-template-error-banner\"\n />\n );\n }\n\n return (\n <>\n <ManageNegotiableQuoteComponent {...manageNegotiableQuoteProps} />\n {isRenameModalOpen &&\n createPortal(\n <RenameQuoteModal\n open={isRenameModalOpen}\n quoteName={renameQuoteName}\n renameReason={renameReason}\n quoteNameError={renameQuoteNameError}\n errorBanner={renameErrorBanner}\n successBanner={renameSuccessBanner}\n onQuoteNameChange={handleRenameQuoteNameChange}\n onRenameReasonChange={setRenameReason}\n onSave={handleRenameSave}\n onClose={handleRenameClose}\n />,\n document.body\n )}\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 {isDuplicateDialogOpen &&\n createPortal(\n <ConfirmationModal\n open={isDuplicateDialogOpen}\n title={dictionary.confirmationModalDuplicateTitle}\n message={dictionary.confirmationModalDuplicateMessage}\n cancelLabel={dictionary.confirmationModalCancel}\n confirmLabel={dictionary.confirmationModalDuplicateConfirm}\n onCancel={handleDuplicateCancel}\n onConfirm={handleDuplicateConfirm}\n showCloseButton={!duplicateBanner}\n confirmationBanner={duplicateBanner}\n />,\n document.body\n )}\n {showCloseModal &&\n createPortal(\n <ConfirmationModal\n open={showCloseModal}\n title={dictionary.closeModalTitle}\n message={dictionary.closeModalMessage}\n cancelLabel={dictionary.closeModalCancel}\n confirmLabel={\n isClosing\n ? dictionary.closeModalConfirmLoading\n : dictionary.closeModalConfirm\n }\n onCancel={handleCloseModalCancel}\n onConfirm={isClosing ? undefined : handleCloseQuote}\n showCloseButton={true}\n confirmationBanner={closeModalBanner}\n data-testid=\"close-quote-confirmation-modal\"\n />,\n document.body\n )}\n {showCreateTemplateModal &&\n createPortal(\n <ConfirmationModal\n open={showCreateTemplateModal}\n title={dictionary.createTemplateModalTitle}\n message={dictionary.createTemplateModalMessage}\n cancelLabel={dictionary.createTemplateModalCancel}\n confirmLabel={\n isCreatingTemplate\n ? dictionary.createTemplateModalConfirmLoading\n : dictionary.createTemplateModalConfirm\n }\n onCancel={handleCreateTemplateModalCancel}\n onConfirm={isCreatingTemplate ? undefined : handleCreateTemplate}\n showCloseButton={true}\n confirmationBanner={createTemplateModalBanner}\n data-testid=\"create-template-confirmation-modal\"\n />,\n document.body\n )}\n {isNoItemsSelectedModalOpen &&\n createPortal(\n <ConfirmationModal\n open={isNoItemsSelectedModalOpen}\n title={dictionary.noItemsSelectedModalTitle}\n message={dictionary.noItemsSelectedModalMessage}\n confirmLabel={dictionary.noItemsSelectedModalConfirm}\n onConfirm={handleCloseNoItemsSelectedModal}\n onClose={handleCloseNoItemsSelectedModal}\n showCloseButton={true}\n data-testid=\"no-items-selected-modal\"\n />,\n document.body\n )}\n </>\n );\n};\n"],"names":["ManageNegotiableQuote","className","loading","quoteName","quoteStatus","banner","details","actionBar","quoteContent","shippingInformationTitle","shippingInformation","quoteCommentsTitle","quoteComments","attachFilesField","attachedFilesList","footer","props","ManageNegotiableQuoteSkeleton","jsxs","classes","jsx","VComponent","Skeleton","SkeletonRow","onActionsDropdownChange","slots","onActionsButtonClick","onSendForReview","maxFiles","maxFileSize","acceptedFileTypes","onDuplicateQuote","onCreateTemplate","quoteData","setQuoteData","useState","setLoading","isDeleteDialogOpen","setIsDeleteDialogOpen","deleteError","setDeleteError","deleteSuccess","setDeleteSuccess","isDuplicateDialogOpen","setIsDuplicateDialogOpen","duplicateError","setDuplicateError","duplicateSuccess","setDuplicateSuccess","comment","setComment","isSubmitting","setIsSubmitting","showCloseModal","setShowCloseModal","isClosing","setIsClosing","modalSuccessMessage","setModalSuccessMessage","modalErrorMessage","setModalErrorMessage","showCreateTemplateModal","setShowCreateTemplateModal","isCreatingTemplate","setIsCreatingTemplate","createTemplateSuccessMessage","setCreateTemplateSuccessMessage","createTemplateErrorMessage","setCreateTemplateErrorMessage","isRenameModalOpen","setIsRenameModalOpen","renameQuoteName","setRenameQuoteName","renameReason","setRenameReason","renameError","setRenameError","renameQuoteNameError","setRenameQuoteNameError","renameSuccess","setRenameSuccess","attachedFiles","setAttachedFiles","fileUploadError","setFileUploadError","selectedItemUids","setSelectedItemUids","selectedItemUidsRef","useRef","removeItemsHandlerRef","actionsBarDropdownValue","setActionsBarDropdownValue","actionsBarDropdownValueRef","isNoItemsSelectedModalOpen","setIsNoItemsSelectedModalOpen","useEffect","dictionary","useText","quoteDataEvent","events","data","quote","shippingAddressSetEvent","quoteSentForReviewEvent","quoteItemsRemovedEvent","removedItemUids","prev","next","uid","handleItemCheckboxChange","useCallback","item","isSelected","handleActionsDropdownChange","event","action","currentSelectedUids","itemsToRemove","handleCloseNoItemsSelectedModal","quoteClosedEvent","currentQuoteData","_a","getQuoteData","updatedQuoteData","error","quoteCloseErrorEvent","errorMsg","quoteRenamedEvent","quoteDuplicatedEvent","newQuote","quoteTemplateCreatedEvent","quoteTemplate","handleAttachFiles","files","file","validateFileSize","formatFileSize","validateFileType","newFiles","tempKey","result","uploadFile","f","handleRemoveFile","key","handleRenameClick","handleRenameClose","handleRenameQuoteNameChange","value","handleDuplicateQuote","handleRenameSave","renameNegotiableQuote","useMemo","isLocked","Slot","Edit","bannerMessage","status","bannerContent","InLineAlert","WarningFilled","expirationDate","formattedDate","buttons","handleActionsButtonClick","ActionsBar","button","Button","TabbedContent","ItemsQuoted","handler","isOpen","QuoteCommentsList","QuoteHistoryLog","ShippingAddressDisplay","TextArea","e","isFileUploadDisabled","isDisabled","InputFile","target","fileList","Add","AttachedFilesList","handleCloseQuote","closeNegotiableQuote","handleCloseModalCancel","handleCreateTemplate","createQuoteTemplate","errorMessage","handleCreateTemplateModalCancel","handleSendForReview","successfulAttachments","sendForReview","renameErrorBanner","renameSuccessBanner","CheckWithCircle","getDeleteErrorMessage","handleDeleteCancel","handleDeleteConfirm","operationResults","deleteQuote","failure","res","handleDismissError","handleDismissSuccess","getDuplicateErrorMessage","handleDuplicateCancel","handleDuplicateConfirm","duplicatedQuoteUid","originalUid","baseUid","randomSuffix","duplicateQuote","handleDismissDuplicateError","handleDismissDuplicateSuccess","deleteErrorBanner","deleteBanner","duplicateErrorBanner","duplicateBanner","manageNegotiableQuoteProps","closeModalBanner","createTemplateModalBanner","Fragment","ManageNegotiableQuoteComponent","createPortal","RenameQuoteModal","ConfirmationModal"],"mappings":"gwDAgCO,MAAMA,GAAuE,CAAC,CACnF,UAAAC,EACA,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,OAAAC,EACA,QAAAC,EACA,UAAAC,EACA,aAAAC,EACA,yBAAAC,EACA,oBAAAC,EACA,mBAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,kBAAAC,EACA,OAAAC,EACA,GAAGC,CACL,IACMd,IACMe,GAAA,EAA8B,EAItCC,EAAC,MAAA,CAAK,GAAGF,EAAO,UAAWG,EAAQ,CAAC,2CAA4ClB,CAAS,CAAC,EACxF,SAAA,CAAAiB,EAAC,OAAI,UAAWC,EAAQ,CAAC,kDAAkD,CAAC,EACzE,SAAA,CAAAhB,GACCiB,EAACC,EAAA,CACC,KAAMlB,EACN,UAAWgB,EAAQ,CAAC,sDAAsD,CAAC,CAAA,CAAA,EAG9Ef,GACCgB,EAACC,EAAA,CACC,KAAMjB,EACN,UAAWe,EAAQ,CAAC,wDAAwD,CAAC,CAAA,CAAA,CAC/E,EAEJ,EACCd,GACCe,EAACC,EAAA,CACC,KAAMhB,EACN,UAAWc,EAAQ,CAAC,kDAAkD,CAAC,CAAA,CAAA,EAG1Eb,GACCc,EAACC,EAAA,CACC,KAAMf,EACN,UA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ACX,EACJ,CAEJ"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
import { ReferenceDocumentLinkInput } from '../../api';
|
|
6
|
+
|
|
7
|
+
export interface ManageNegotiableQuoteTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
onActionsButtonClick?: (action: string) => void;
|
|
9
|
+
onSendForReview?: (params: {
|
|
10
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
11
|
+
name?: string;
|
|
12
|
+
comment?: string;
|
|
13
|
+
referenceDocumentLinks?: ReferenceDocumentLinkInput[];
|
|
14
|
+
}) => void;
|
|
15
|
+
slots?: {
|
|
16
|
+
TemplateName?: SlotProps<{
|
|
17
|
+
templateName?: string;
|
|
18
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
19
|
+
templateDisplayName?: string;
|
|
20
|
+
isRenameDisabled?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
TemplateStatus?: SlotProps<{
|
|
23
|
+
templateStatus?: string;
|
|
24
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
25
|
+
}>;
|
|
26
|
+
Banner?: SlotProps<{
|
|
27
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
28
|
+
}>;
|
|
29
|
+
Details?: SlotProps<{
|
|
30
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
31
|
+
}>;
|
|
32
|
+
ActionBar?: SlotProps<{
|
|
33
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
34
|
+
}>;
|
|
35
|
+
ReferenceDocuments?: SlotProps<{
|
|
36
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
37
|
+
referenceDocuments?: ReferenceDocument[];
|
|
38
|
+
isEditable?: boolean;
|
|
39
|
+
onAddDocument?: () => void;
|
|
40
|
+
onEditDocument?: (document: ReferenceDocument) => void;
|
|
41
|
+
onRemoveDocument?: (document: ReferenceDocument) => void;
|
|
42
|
+
referenceDocumentsTitle?: string;
|
|
43
|
+
}>;
|
|
44
|
+
ItemsTable?: SlotProps<{
|
|
45
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
46
|
+
}>;
|
|
47
|
+
ItemsQuotedTab?: SlotProps<{
|
|
48
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
49
|
+
}>;
|
|
50
|
+
CommentsTab?: SlotProps<{
|
|
51
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
52
|
+
}>;
|
|
53
|
+
HistoryLogTab?: SlotProps<{
|
|
54
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
55
|
+
}>;
|
|
56
|
+
CommentsTitle?: SlotProps<{
|
|
57
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
58
|
+
}>;
|
|
59
|
+
Comments?: SlotProps<{
|
|
60
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
61
|
+
}>;
|
|
62
|
+
HistoryLogTitle?: SlotProps<{
|
|
63
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
64
|
+
}>;
|
|
65
|
+
HistoryLog?: SlotProps<{
|
|
66
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
67
|
+
}>;
|
|
68
|
+
Footer?: SlotProps<{
|
|
69
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
70
|
+
comment?: string;
|
|
71
|
+
isSubmitting?: boolean;
|
|
72
|
+
referenceDocuments?: ReferenceDocument[];
|
|
73
|
+
hasUnsavedChanges?: boolean;
|
|
74
|
+
handleSendForReview: () => void;
|
|
75
|
+
showAcceptButton?: boolean;
|
|
76
|
+
renameTemplateName?: string;
|
|
77
|
+
renameReason?: string;
|
|
78
|
+
}>;
|
|
79
|
+
ShippingInformationTitle?: SlotProps<{
|
|
80
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
81
|
+
}>;
|
|
82
|
+
ShippingInformation?: SlotProps<{
|
|
83
|
+
templateData?: NegotiableQuoteTemplateModel;
|
|
84
|
+
loading?: boolean;
|
|
85
|
+
setLoading?: (loading: boolean) => void;
|
|
86
|
+
}>;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export declare const ManageNegotiableQuoteTemplate: Container<ManageNegotiableQuoteTemplateProps>;
|
|
90
|
+
//# 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
|