@dropins/storefront-quote-management 1.2.0 → 1.2.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/api/acceptQuoteTemplate/acceptQuoteTemplate.d.ts +1 -2
- package/api/acceptQuoteTemplate/graphql/acceptQuoteTemplate.d.ts +0 -1
- package/api/acceptQuoteTemplate/index.d.ts +0 -1
- package/api/addQuoteTemplateLineItemNote/addQuoteTemplateLineItemNote.d.ts +1 -2
- package/api/addQuoteTemplateLineItemNote/graphql/setQuoteTemplateLineItemNote.d.ts +0 -1
- package/api/addQuoteTemplateLineItemNote/index.d.ts +0 -1
- package/api/addQuoteTemplateShippingAddress/addQuoteTemplateShippingAddress.d.ts +1 -2
- package/api/addQuoteTemplateShippingAddress/graphql/setNegotiableQuoteTemplateShippingAddress.d.ts +0 -1
- package/api/addQuoteTemplateShippingAddress/index.d.ts +0 -1
- package/api/cancelQuoteTemplate/cancelQuoteTemplate.d.ts +1 -2
- package/api/cancelQuoteTemplate/graphql/cancelQuoteTemplate.d.ts +0 -1
- package/api/cancelQuoteTemplate/index.d.ts +0 -1
- package/api/closeNegotiableQuote/closeNegotiableQuote.d.ts +0 -1
- package/api/closeNegotiableQuote/graphql/CloseNegotiableQuoteMutation.d.ts +0 -1
- package/api/closeNegotiableQuote/index.d.ts +0 -1
- package/api/createQuoteTemplate/createQuoteTemplate.d.ts +8 -2
- package/api/createQuoteTemplate/graphql/createQuoteTemplate.d.ts +0 -1
- package/api/createQuoteTemplate/index.d.ts +0 -1
- package/api/deleteQuote/deleteQuote.d.ts +0 -1
- package/api/deleteQuote/graphql/DeleteQuoteMutation.d.ts +0 -1
- package/api/deleteQuote/index.d.ts +0 -1
- package/api/deleteQuoteTemplate/deleteQuoteTemplate.d.ts +0 -1
- package/api/deleteQuoteTemplate/graphql/deleteQuoteTemplate.d.ts +0 -1
- package/api/deleteQuoteTemplate/index.d.ts +0 -1
- package/api/duplicateNegotiableQuote/duplicateNegotiableQuote.d.ts +8 -2
- package/api/duplicateNegotiableQuote/graphql/duplicateNegotiableQuoteMutation.d.ts +0 -1
- package/api/duplicateNegotiableQuote/index.d.ts +0 -1
- package/api/fetch-graphql/fetch-graphql.d.ts +3 -4
- package/api/fetch-graphql/index.d.ts +0 -1
- package/api/generateQuoteFromTemplate/generateQuoteFromTemplate.d.ts +0 -1
- package/api/generateQuoteFromTemplate/graphql/generateNegotiableQuoteFromTemplate.d.ts +0 -1
- package/api/generateQuoteFromTemplate/index.d.ts +0 -1
- package/api/getQuoteData/getQuoteData.d.ts +1 -2
- package/api/getQuoteData/graphql/QuoteDataQuery.d.ts +0 -1
- package/api/getQuoteData/index.d.ts +0 -1
- package/api/getQuoteTemplateData/getQuoteTemplateData.d.ts +8 -2
- package/api/getQuoteTemplateData/graphql/getQuoteTemplateData.d.ts +0 -1
- package/api/getQuoteTemplateData/index.d.ts +0 -1
- package/api/getQuoteTemplates/getQuoteTemplates.d.ts +8 -2
- package/api/getQuoteTemplates/graphql/getQuoteTemplates.d.ts +0 -1
- package/api/getQuoteTemplates/index.d.ts +0 -1
- package/api/getStoreConfig/getStoreConfig.d.ts +8 -2
- package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +0 -1
- package/api/getStoreConfig/index.d.ts +0 -1
- package/api/graphql/NegotiableQuoteAddressFragment.d.ts +0 -1
- package/api/graphql/NegotiableQuoteFragment.d.ts +0 -1
- package/api/graphql/NegotiableQuoteListFragment.d.ts +0 -1
- package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +0 -1
- package/api/graphql/SearchResultPageInfoFragment.d.ts +0 -1
- package/api/graphql/ShippingMethodFragment.d.ts +0 -1
- package/api/graphql/SortFieldsFragment.d.ts +0 -1
- package/api/index.d.ts +0 -1
- package/api/initialize/index.d.ts +0 -1
- package/api/initialize/initialize.d.ts +10 -12
- package/api/negotiableQuotes/graphql/NegotiableQuotesQuery.d.ts +0 -1
- package/api/negotiableQuotes/index.d.ts +0 -1
- package/api/negotiableQuotes/negotiableQuotes.d.ts +8 -2
- package/api/openQuoteTemplate/graphql/openQuoteTemplate.d.ts +0 -1
- package/api/openQuoteTemplate/index.d.ts +0 -1
- package/api/openQuoteTemplate/openQuoteTemplate.d.ts +1 -2
- package/api/removeNegotiableQuoteItems/graphql/RemoveNegotiableQuoteItemsMutation.d.ts +0 -1
- package/api/removeNegotiableQuoteItems/index.d.ts +0 -1
- package/api/removeNegotiableQuoteItems/removeNegotiableQuoteItems.d.ts +8 -2
- package/api/removeQuoteTemplateItems/graphql/removeNegotiableQuoteTemplateItems.d.ts +0 -1
- package/api/removeQuoteTemplateItems/index.d.ts +0 -1
- package/api/removeQuoteTemplateItems/removeQuoteTemplateItems.d.ts +1 -2
- package/api/renameNegotiableQuote/graphql/RenameNegotiableQuoteMutation.d.ts +0 -1
- package/api/renameNegotiableQuote/index.d.ts +0 -1
- package/api/renameNegotiableQuote/renameNegotiableQuote.d.ts +8 -2
- package/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.d.ts +0 -1
- package/api/requestNegotiableQuote/index.d.ts +0 -1
- package/api/requestNegotiableQuote/requestNegotiableQuote.d.ts +8 -2
- package/api/sendForReview/graphql/SendNegotiableQuoteForReviewMutation.d.ts +0 -1
- package/api/sendForReview/index.d.ts +0 -1
- package/api/sendForReview/sendForReview.d.ts +8 -2
- package/api/sendQuoteTemplateForReview/graphql/sendQuoteTemplateForReview.d.ts +0 -1
- package/api/sendQuoteTemplateForReview/index.d.ts +0 -1
- package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +1 -2
- package/api/setLineItemNote/graphql/SetLineItemNoteMutation.d.ts +0 -1
- package/api/setLineItemNote/index.d.ts +0 -1
- package/api/setLineItemNote/setLineItemNote.d.ts +8 -2
- package/api/setQuoteTemplateExpirationDate/graphql/setQuoteTemplateExpirationDate.d.ts +0 -1
- package/api/setQuoteTemplateExpirationDate/index.d.ts +0 -1
- package/api/setQuoteTemplateExpirationDate/setQuoteTemplateExpirationDate.d.ts +8 -2
- package/api/setShippingAddress/graphql/SetNegotiableQuoteShippingAddressMutation.d.ts +0 -1
- package/api/setShippingAddress/index.d.ts +0 -1
- package/api/setShippingAddress/setShippingAddress.d.ts +8 -2
- package/api/updateQuantities/graphql/UpdateNegotiableQuoteQuantitiesMutation.d.ts +0 -1
- package/api/updateQuantities/index.d.ts +0 -1
- package/api/updateQuantities/updateQuantities.d.ts +8 -2
- package/api/updateQuoteTemplateItemQuantities/graphql/updateNegotiableQuoteTemplateQuantities.d.ts +0 -1
- package/api/updateQuoteTemplateItemQuantities/index.d.ts +0 -1
- package/api/updateQuoteTemplateItemQuantities/updateQuoteTemplateItemQuantities.d.ts +1 -2
- package/api/uploadFile/graphql/FinishUploadMutation.d.ts +0 -1
- package/api/uploadFile/graphql/InitiateUploadMutation.d.ts +0 -1
- package/api/uploadFile/index.d.ts +0 -1
- package/api/uploadFile/uploadFile.d.ts +0 -1
- package/api.d.ts +1 -1
- package/api.js +1 -1
- package/api.js.map +1 -1
- package/chunks/ShippingAddressDisplay.js +1 -1
- package/chunks/components.js +1 -1
- package/components/ActionsBar/ActionsBar.d.ts +8 -2
- package/components/ActionsBar/index.d.ts +0 -1
- package/components/AttachedFilesList/AttachedFilesList.d.ts +8 -2
- package/components/AttachedFilesList/index.d.ts +0 -1
- package/components/ConfirmationModal/ConfirmationModal.d.ts +8 -2
- package/components/ConfirmationModal/index.d.ts +0 -1
- package/components/ExpirationDateModal/ExpirationDateModal.d.ts +8 -2
- package/components/ExpirationDateModal/index.d.ts +0 -1
- package/components/ItemsQuoted/ItemsQuoted.d.ts +8 -2
- package/components/ItemsQuoted/index.d.ts +0 -1
- package/components/LineItemNoteModal/LineItemNoteModal.d.ts +8 -2
- package/components/LineItemNoteModal/index.d.ts +0 -1
- package/components/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +8 -2
- package/components/ManageNegotiableQuote/__fixtures__/ManageNegotiableQuoteProps.d.ts +1 -3
- package/components/ManageNegotiableQuote/index.d.ts +0 -1
- package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +8 -2
- package/components/ManageNegotiableQuoteTemplate/__fixtures__/ManageNegotiableQuoteTemplateProps.d.ts +1 -3
- package/components/ManageNegotiableQuoteTemplate/index.d.ts +0 -1
- package/components/OrderSummary/OrderSummary.d.ts +8 -2
- package/components/OrderSummary/index.d.ts +0 -1
- package/components/OrderSummaryLine/OrderSummaryLine.d.ts +8 -2
- package/components/OrderSummaryLine/index.d.ts +0 -1
- package/components/ProductListTable/ProductListTable.d.ts +8 -2
- package/components/ProductListTable/index.d.ts +0 -1
- package/components/QuoteCommentsList/QuoteCommentsList.d.ts +8 -2
- package/components/QuoteCommentsList/index.d.ts +0 -1
- package/components/QuoteHistoryLog/QuoteHistoryLog.d.ts +8 -2
- package/components/QuoteHistoryLog/index.d.ts +0 -1
- package/components/QuotePricesSummary/QuotePricesSummary.d.ts +8 -2
- package/components/QuotePricesSummary/index.d.ts +0 -1
- package/components/QuoteSummaryList/QuoteSummaryList.d.ts +8 -2
- package/components/QuoteSummaryList/index.d.ts +0 -1
- package/components/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +8 -2
- package/components/QuoteTemplatesListTable/index.d.ts +0 -1
- package/components/QuotesListTable/QuotesListTable.d.ts +8 -2
- package/components/QuotesListTable/index.d.ts +0 -1
- package/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.d.ts +8 -2
- package/components/ReferenceDocumentFormModal/index.d.ts +0 -1
- package/components/ReferenceDocumentsList/ReferenceDocumentsList.d.ts +8 -2
- package/components/ReferenceDocumentsList/index.d.ts +0 -1
- package/components/RenameQuoteModal/RenameQuoteModal.d.ts +8 -2
- package/components/RenameQuoteModal/index.d.ts +0 -1
- package/components/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +8 -2
- package/components/RequestNegotiableQuoteForm/index.d.ts +0 -1
- package/components/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +8 -2
- package/components/ShippingAddressDisplay/index.d.ts +0 -1
- package/components/TabbedContent/TabbedContent.d.ts +8 -2
- package/components/TabbedContent/index.d.ts +0 -1
- package/components/index.d.ts +0 -1
- package/containers/ItemsQuoted/ItemsQuoted.d.ts +9 -3
- package/containers/ItemsQuoted/index.d.ts +0 -1
- package/containers/ItemsQuoted.d.ts +1 -3
- package/containers/ItemsQuoted.js +1 -1
- package/containers/ItemsQuoted.js.map +1 -1
- package/containers/ItemsQuotedTemplate/ItemsQuotedTemplate.d.ts +9 -3
- package/containers/ItemsQuotedTemplate/index.d.ts +0 -1
- package/containers/ItemsQuotedTemplate.d.ts +1 -3
- package/containers/ItemsQuotedTemplate.js +1 -1
- package/containers/ItemsQuotedTemplate.js.map +1 -1
- package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +9 -3
- package/containers/ManageNegotiableQuote/index.d.ts +0 -1
- package/containers/ManageNegotiableQuote.d.ts +1 -3
- package/containers/ManageNegotiableQuote.js +3 -1
- package/containers/ManageNegotiableQuote.js.map +1 -1
- package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +9 -3
- package/containers/ManageNegotiableQuoteTemplate/index.d.ts +0 -1
- package/containers/ManageNegotiableQuoteTemplate.d.ts +1 -3
- package/containers/ManageNegotiableQuoteTemplate.js +1 -3
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
- package/containers/OrderSummary/OrderSummary.d.ts +9 -3
- package/containers/OrderSummary/index.d.ts +0 -1
- package/containers/OrderSummary.d.ts +1 -3
- package/containers/OrderSummary.js +1 -1
- package/containers/OrderSummaryLine/OrderSummaryLine.d.ts +9 -3
- package/containers/OrderSummaryLine/index.d.ts +0 -1
- package/containers/OrderSummaryLine.d.ts +1 -3
- package/containers/OrderSummaryLine.js +1 -1
- package/containers/QuoteCommentsList/QuoteCommentsList.d.ts +9 -3
- package/containers/QuoteCommentsList/index.d.ts +0 -1
- package/containers/QuoteCommentsList.d.ts +1 -3
- package/containers/QuoteCommentsList.js +1 -1
- package/containers/QuoteCommentsList.js.map +1 -1
- package/containers/QuoteHistoryLog/QuoteHistoryLog.d.ts +9 -3
- package/containers/QuoteHistoryLog/index.d.ts +0 -1
- package/containers/QuoteHistoryLog.d.ts +1 -3
- package/containers/QuoteHistoryLog.js +1 -1
- package/containers/QuoteHistoryLog.js.map +1 -1
- package/containers/QuoteSummaryList/QuoteSummaryList.d.ts +10 -4
- package/containers/QuoteSummaryList/index.d.ts +0 -1
- package/containers/QuoteSummaryList.d.ts +1 -3
- package/containers/QuoteSummaryList.js +1 -1
- package/containers/QuoteSummaryList.js.map +1 -1
- package/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.d.ts +9 -3
- package/containers/QuoteTemplateCommentsList/index.d.ts +0 -1
- package/containers/QuoteTemplateCommentsList.d.ts +1 -3
- package/containers/QuoteTemplateCommentsList.js +1 -1
- package/containers/QuoteTemplateCommentsList.js.map +1 -1
- package/containers/QuoteTemplateHistoryLog/QuoteTemplateHistoryLog.d.ts +9 -3
- package/containers/QuoteTemplateHistoryLog/index.d.ts +0 -1
- package/containers/QuoteTemplateHistoryLog.d.ts +1 -3
- package/containers/QuoteTemplateHistoryLog.js +1 -1
- package/containers/QuoteTemplateHistoryLog.js.map +1 -1
- package/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +9 -3
- package/containers/QuoteTemplatesListTable/index.d.ts +0 -1
- package/containers/QuoteTemplatesListTable.d.ts +1 -3
- package/containers/QuoteTemplatesListTable.js +1 -1
- package/containers/QuotesListTable/QuotesListTable.d.ts +9 -3
- package/containers/QuotesListTable/index.d.ts +0 -1
- package/containers/QuotesListTable.d.ts +1 -3
- package/containers/QuotesListTable.js +1 -1
- package/containers/QuotesListTable.js.map +1 -1
- package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +9 -3
- package/containers/RequestNegotiableQuoteForm/index.d.ts +0 -1
- package/containers/RequestNegotiableQuoteForm.d.ts +1 -3
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +9 -3
- package/containers/ShippingAddressDisplay/index.d.ts +0 -1
- package/containers/ShippingAddressDisplay.d.ts +1 -1
- package/containers/index.d.ts +0 -1
- package/data/models/__fixtures__/negotiableQuoteModel.d.ts +8 -2
- package/data/models/__fixtures__/negotiableQuoteTemplateModel.d.ts +8 -2
- package/data/models/__fixtures__/negotiableQuoteTemplatesListModel.d.ts +8 -2
- package/data/models/__fixtures__/negotiableQuotesListModel.d.ts +8 -2
- package/data/models/__fixtures__/storeConfigModel.d.ts +8 -2
- package/data/models/index.d.ts +0 -1
- package/data/models/negotiable-quote-model.d.ts +1 -2
- package/data/models/negotiable-quote-template-model.d.ts +8 -2
- package/data/models/store-config-model.d.ts +0 -1
- package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +9 -4
- package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +0 -1
- package/data/transforms/__fixtures__/storeConfigData.d.ts +0 -1
- package/data/transforms/index.d.ts +0 -1
- package/data/transforms/transform-history.d.ts +8 -2
- package/data/transforms/transform-quote-items.d.ts +8 -2
- package/data/transforms/transform-quote-template.d.ts +8 -2
- package/data/transforms/transform-quote.d.ts +8 -2
- package/data/transforms/transform-store-config.d.ts +8 -2
- package/hooks/useExpirationDate.d.ts +0 -1
- package/hooks/useItemsQuotedTemplate.d.ts +8 -2
- package/hooks/useQuoteSummaryData.d.ts +9 -4
- package/hooks/useReferenceDocumentLinks.d.ts +8 -2
- package/hooks/useRemoveTemplateItems.d.ts +8 -2
- package/hooks/useRenameTemplate.d.ts +0 -1
- package/hooks/useUpdateTemplateQuantities.d.ts +8 -2
- package/lib/configurationTransformers.d.ts +0 -1
- package/lib/itemFormatters.d.ts +11 -7
- package/lib/priceCalculators.d.ts +14 -13
- package/lib/state.d.ts +8 -3
- package/package.json +1 -1
- package/render/Provider.d.ts +8 -2
- package/render/index.d.ts +0 -1
- package/render/render.d.ts +9 -4
- package/render.d.ts +1 -1
- package/types/state.types.d.ts +8 -2
- package/utils/dateUtils.d.ts +0 -1
- package/utils/fileUtils.d.ts +0 -1
- package/utils/mapAuthPermissions.d.ts +8 -2
- package/chunks/ItemsQuoted.js +0 -4
- package/chunks/ItemsQuoted.js.map +0 -1
- package/chunks/ItemsQuotedTemplate.js +0 -4
- package/chunks/ItemsQuotedTemplate.js.map +0 -1
- package/chunks/QuoteCommentsList.js +0 -4
- package/chunks/QuoteCommentsList.js.map +0 -1
- package/chunks/QuoteHistoryLog.js +0 -4
- package/chunks/QuoteHistoryLog.js.map +0 -1
- package/chunks/QuoteTemplateCommentsList.js +0 -4
- package/chunks/QuoteTemplateCommentsList.js.map +0 -1
- package/chunks/QuoteTemplateHistoryLog.js +0 -4
- package/chunks/QuoteTemplateHistoryLog.js.map +0 -1
- package/i18n/en_US.json.d.ts +0 -485
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuotesListTable.js","sources":["/@dropins/storefront-quote-management/src/containers/QuotesListTable/QuotesListTable.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport {\n Price,\n Button,\n IllustratedMessage,\n Picker,\n Pagination,\n type PickerOption,\n} from '@adobe-commerce/elsie/components';\nimport { events } from '@adobe-commerce/event-bus';\nimport {\n QuotesListTable as QuotesListTableComponent,\n QuoteRowData,\n} from '@/quote-management/components';\nimport { negotiableQuotes } from '@/quote-management/api';\nimport { getDefaultPageSizeOptions } from '@/quote-management/data/transforms';\nimport {\n NegotiableQuotesListModel,\n NegotiableQuoteListEntry,\n} from '@/quote-management/data/models';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuotesListTableProps extends HTMLAttributes<HTMLDivElement> {\n pageSize?: number;\n showItemRange?: boolean;\n showPageSizePicker?: boolean;\n showPagination?: boolean;\n onViewQuote?: (quoteId: string, quoteName: string, status: string) => void;\n onPageSizeChange?: (pageSize: number) => void;\n onPageChange?: (page: number) => void;\n slots?: {\n /** Slot for customizing the quote name cell content */\n QuoteName?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the created date cell content */\n Created?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the created by cell content */\n CreatedBy?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the status cell content */\n Status?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the last updated cell content */\n LastUpdated?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the quote template cell content */\n QuoteTemplate?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the quote total cell content */\n QuoteTotal?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the actions cell content */\n Actions?: SlotProps<{\n quote: NegotiableQuoteListEntry;\n onViewQuote?: (id: string, name: string, status: string) => void;\n }>;\n /** Slot for customizing the empty quotes message */\n EmptyQuotes?: SlotProps;\n /** Slot for customizing the item range display */\n ItemRange?: SlotProps<{\n startItem: number;\n endItem: number;\n totalCount: number;\n currentPage: number;\n pageSize: number;\n }>;\n /** Slot for customizing the page size picker */\n PageSizePicker?: SlotProps<{\n pageSize: number;\n pageSizeOptions: number[];\n onPageSizeChange?: (pageSize: number) => void;\n }>;\n /** Slot for customizing the pagination */\n Pagination?: SlotProps<{\n currentPage: number;\n totalPages: number;\n onChange?: (page: number) => void;\n }>;\n };\n}\n\nexport const QuotesListTable: Container<QuotesListTableProps> = ({\n pageSize,\n showItemRange = true,\n showPageSizePicker = true,\n showPagination = true,\n onViewQuote,\n onPageSizeChange,\n onPageChange,\n slots,\n ...props\n}) => {\n const [quotesData, setQuotesData] =\n useState<NegotiableQuotesListModel | null>(null);\n const [loading, setLoading] = useState(true);\n\n // Default to first page size option if no pageSize prop provided\n const defaultPageSize = getDefaultPageSizeOptions()[0];\n const [currentPageSize, setCurrentPageSize] = useState(\n pageSize || defaultPageSize\n );\n const [currentPage, setCurrentPage] = useState(1);\n\n // Fetch quotes data when authenticated\n useEffect(() => {\n const fetchQuotes = async () => {\n try {\n setLoading(true);\n const data = await negotiableQuotes({\n pageSize: currentPageSize,\n currentPage,\n });\n setQuotesData(data);\n } catch (error) {\n console.error('Failed to fetch quotes:', error);\n } finally {\n setLoading(false);\n }\n };\n\n // Listen for authentication events\n const unsubscribe = events.on(\n 'authenticated',\n (isAuthenticated) => {\n if (isAuthenticated) {\n fetchQuotes();\n } else {\n setQuotesData(null);\n setLoading(false);\n }\n },\n { eager: true }\n ); // eager: true means it fires immediately with current state\n\n return () => {\n unsubscribe?.off();\n };\n }, [currentPageSize, currentPage]);\n\n // Listen for quote renamed event to refresh the list\n useEffect(() => {\n const fetchQuotes = async () => {\n try {\n const data = await negotiableQuotes({\n pageSize: currentPageSize,\n currentPage,\n });\n setQuotesData(data);\n } catch (error) {\n console.error('Failed to fetch quotes:', error);\n }\n };\n\n const unsubscribe = events.on(\n 'quote-management/quote-renamed',\n () => {\n // Refetch quotes list to show the updated name\n fetchQuotes();\n },\n { eager: true }\n );\n\n return () => {\n unsubscribe?.off();\n };\n }, [currentPageSize, currentPage]);\n\n // Handle page size change\n const handlePageSizeChange = (newPageSize: number) => {\n setCurrentPageSize(newPageSize);\n setCurrentPage(1); // Reset to page 1 when page size changes\n onPageSizeChange?.(newPageSize); // Also call parent callback\n };\n\n // Handle page change\n const handlePageChange = (newPage: number) => {\n setCurrentPage(newPage);\n onPageChange?.(newPage); // Also call parent callback\n };\n\n // Handle page size picker selection\n const handlePageSizeSelect = (event: Event) => {\n const target = event.target as HTMLSelectElement;\n const value = target?.value;\n if (value) {\n handlePageSizeChange(Number(value));\n }\n };\n\n // Prepare transformed quote data for table component\n const prepareRowData = (\n quotes: NegotiableQuoteListEntry[],\n slots?: QuotesListTableProps['slots'],\n onViewQuote?: (quoteId: string, quoteName: string, status: string) => void\n ): QuoteRowData[] => {\n return quotes\n .filter((quote) => quote?.uid) // Filter out null quotes\n .map((quote) => {\n const createdByName = `${quote.buyer.firstname} ${quote.buyer.lastname}`;\n\n return {\n id: quote.uid,\n quoteName: (\n <Slot name=\"QuoteName\" slot={slots?.QuoteName} context={{ quote }}>\n <span>{quote.name}</span>\n </Slot>\n ),\n created: (\n <Slot name=\"Created\" slot={slots?.Created} context={{ quote }}>\n <span>\n {quote.createdAt\n ? formattedDate(quote.createdAt, 'short')\n : 'N/A'}\n </span>\n </Slot>\n ),\n createdBy: (\n <Slot name=\"CreatedBy\" slot={slots?.CreatedBy} context={{ quote }}>\n <span>{createdByName}</span>\n </Slot>\n ),\n status: (\n <Slot name=\"Status\" slot={slots?.Status} context={{ quote }}>\n <span>{quote.status}</span>\n </Slot>\n ),\n lastUpdated: (\n <Slot\n name=\"LastUpdated\"\n slot={slots?.LastUpdated}\n context={{ quote }}\n >\n <span>\n {quote.updatedAt\n ? formattedDate(quote.updatedAt, 'short')\n : 'N/A'}\n </span>\n </Slot>\n ),\n quoteTemplate: (\n <Slot\n name=\"QuoteTemplate\"\n slot={slots?.QuoteTemplate}\n context={{ quote }}\n >\n <span>{quote.templateName}</span>\n </Slot>\n ),\n quoteTotal: (\n <Slot\n name=\"QuoteTotal\"\n slot={slots?.QuoteTotal}\n context={{ quote }}\n >\n <Price\n amount={quote.prices?.grandTotal?.value}\n currency={quote.prices?.grandTotal?.currency}\n />\n </Slot>\n ),\n actions: (\n <Slot\n name=\"Actions\"\n slot={slots?.Actions}\n context={{ quote, onViewQuote }}\n >\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n onClick={() =>\n onViewQuote?.(quote.uid, quote.name, quote.status)\n }\n >\n View\n </Button>\n </Slot>\n ),\n };\n });\n };\n\n // Prepare data for rendering\n const rowData = quotesData?.items\n ? prepareRowData(quotesData.items, slots, onViewQuote)\n : [];\n\n const paginationInfo = quotesData?.paginationInfo;\n const shouldShowPagination = !!paginationInfo;\n\n // Empty state message\n const emptyStateMessage = (\n <Slot name=\"EmptyQuotes\" slot={slots?.EmptyQuotes} context={{ quotesData }}>\n <IllustratedMessage heading=\"No Quotes Found\" />\n </Slot>\n );\n\n // Item range message\n const itemRangeMessage = paginationInfo ? (\n <Slot name=\"ItemRange\" slot={slots?.ItemRange} context={paginationInfo}>\n <span>\n Items {paginationInfo.startItem} to {paginationInfo.endItem} of{' '}\n {paginationInfo.totalCount} total\n </span>\n </Slot>\n ) : undefined;\n\n // Prepare page size picker message for component\n const pageSizePickerMessage =\n paginationInfo && paginationInfo.pageSizeOptions ? (\n <Slot\n name=\"PageSizePicker\"\n slot={slots?.PageSizePicker}\n context={{\n pageSize: paginationInfo.pageSize,\n pageSizeOptions: paginationInfo.pageSizeOptions,\n onPageSizeChange: handlePageSizeChange,\n }}\n >\n <span>Show </span>\n <Picker\n variant=\"primary\"\n size=\"medium\"\n value={String(paginationInfo.pageSize)}\n options={paginationInfo.pageSizeOptions.map(\n (size): PickerOption => ({\n value: String(size),\n text: String(size),\n })\n )}\n handleSelect={handlePageSizeSelect}\n />\n <span> per page</span>\n </Slot>\n ) : undefined;\n\n // Prepare pagination message for component\n const paginationMessage = paginationInfo ? (\n <Slot\n name=\"Pagination\"\n slot={slots?.Pagination}\n context={{\n currentPage: paginationInfo.currentPage,\n totalPages: paginationInfo.totalPages,\n onChange: handlePageChange,\n }}\n >\n <Pagination\n currentPage={paginationInfo.currentPage}\n totalPages={paginationInfo.totalPages}\n onChange={handlePageChange}\n />\n </Slot>\n ) : undefined;\n\n return (\n <QuotesListTableComponent\n rowData={rowData}\n loading={loading}\n className={props.className as string}\n emptyStateMessage={emptyStateMessage}\n showItemRange={showItemRange && shouldShowPagination}\n itemRangeMessage={itemRangeMessage}\n showPageSizePicker={showPageSizePicker && shouldShowPagination}\n pageSizePickerMessage={pageSizePickerMessage}\n showPagination={showPagination && shouldShowPagination}\n paginationMessage={paginationMessage}\n />\n );\n};\n"],"names":["QuotesListTable","pageSize","showItemRange","showPageSizePicker","showPagination","onViewQuote","onPageSizeChange","onPageChange","slots","props","quotesData","setQuotesData","useState","loading","setLoading","defaultPageSize","getDefaultPageSizeOptions","currentPageSize","setCurrentPageSize","currentPage","setCurrentPage","useEffect","fetchQuotes","data","negotiableQuotes","error","unsubscribe","events","isAuthenticated","handlePageSizeChange","newPageSize","handlePageChange","newPage","handlePageSizeSelect","event","target","value","prepareRowData","quotes","quote","createdByName","jsx","Slot","formattedDate","Price","_b","_a","_d","_c","Button","rowData","paginationInfo","shouldShowPagination","emptyStateMessage","IllustratedMessage","itemRangeMessage","jsxs","pageSizePickerMessage","Picker","size","paginationMessage","Pagination","QuotesListTableComponent"],"mappings":"4lBAqFO,MAAMA,GAAmD,CAAC,CAC/D,SAAAC,EACA,cAAAC,EAAgB,GAChB,mBAAAC,EAAqB,GACrB,eAAAC,EAAiB,GACjB,YAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAACC,EAAYC,CAAa,EAC9BC,EAA2C,IAAI,EAC3C,CAACC,EAASC,CAAU,EAAIF,EAAS,EAAI,EAGrCG,EAAkBC,EAAA,EAA4B,CAAC,EAC/C,CAACC,EAAiBC,CAAkB,EAAIN,EAC5CX,GAAYc,CAAA,EAER,CAACI,EAAaC,CAAc,EAAIR,EAAS,CAAC,EAGhDS,EAAU,IAAM,CACd,MAAMC,EAAc,SAAY,CAC9B,GAAI,CACFR,EAAW,EAAI,EACf,MAAMS,EAAO,MAAMC,EAAiB,CAClC,SAAUP,EACV,YAAAE,CAAA,CACD,EACDR,EAAcY,CAAI,CACpB,OAASE,EAAO,CACd,QAAQ,MAAM,0BAA2BA,CAAK,CAChD,QAAA,CACEX,EAAW,EAAK,CAClB,CACF,EAGM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,CAAA,EAEhBQ,EAAC,QAAK,SAAA,WAAA,CAAS,CAAA,CAAA,CAAA,EAEf,OAGAmB,EAAoBT,EACxBV,EAACC,EAAA,CACC,KAAK,aACL,KAAMlC,GAAA,YAAAA,EAAO,WACb,QAAS,CACP,YAAa2C,EAAe,YAC5B,WAAYA,EAAe,WAC3B,SAAUpB,CAAA,EAGZ,SAAAU,EAACoB,EAAA,CACC,YAAaV,EAAe,YAC5B,WAAYA,EAAe,WAC3B,SAAUpB,CAAA,CAAA,CACZ,CAAA,EAEA,OAEJ,OACEU,EAACqB,EAAA,CACC,QAAAZ,EACA,QAAArC,EACA,UAAWJ,EAAM,UACjB,kBAAA4C,EACA,cAAenD,GAAiBkD,EAChC,iBAAAG,EACA,mBAAoBpD,GAAsBiD,EAC1C,sBAAAK,EACA,eAAgBrD,GAAkBgD,EAClC,kBAAAQ,CAAA,CAAA,CAGN"}
|
|
1
|
+
{"version":3,"file":"QuotesListTable.js","sources":["/@dropins/storefront-quote-management/src/containers/QuotesListTable/QuotesListTable.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport {\n Price,\n Button,\n IllustratedMessage,\n Picker,\n Pagination,\n type PickerOption,\n} from '@adobe-commerce/elsie/components';\nimport { events } from '@adobe-commerce/event-bus';\nimport {\n QuotesListTable as QuotesListTableComponent,\n QuoteRowData,\n} from '@/quote-management/components';\nimport { negotiableQuotes } from '@/quote-management/api';\nimport { getDefaultPageSizeOptions } from '@/quote-management/data/transforms';\nimport {\n NegotiableQuotesListModel,\n NegotiableQuoteListEntry,\n} from '@/quote-management/data/models';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuotesListTableProps extends HTMLAttributes<HTMLDivElement> {\n pageSize?: number;\n showItemRange?: boolean;\n showPageSizePicker?: boolean;\n showPagination?: boolean;\n onViewQuote?: (quoteId: string, quoteName: string, status: string) => void;\n onPageSizeChange?: (pageSize: number) => void;\n onPageChange?: (page: number) => void;\n slots?: {\n /** Slot for customizing the quote name cell content */\n QuoteName?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the created date cell content */\n Created?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the created by cell content */\n CreatedBy?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the status cell content */\n Status?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the last updated cell content */\n LastUpdated?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the quote template cell content */\n QuoteTemplate?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the quote total cell content */\n QuoteTotal?: SlotProps<{ quote: NegotiableQuoteListEntry }>;\n /** Slot for customizing the actions cell content */\n Actions?: SlotProps<{\n quote: NegotiableQuoteListEntry;\n onViewQuote?: (id: string, name: string, status: string) => void;\n }>;\n /** Slot for customizing the empty quotes message */\n EmptyQuotes?: SlotProps;\n /** Slot for customizing the item range display */\n ItemRange?: SlotProps<{\n startItem: number;\n endItem: number;\n totalCount: number;\n currentPage: number;\n pageSize: number;\n }>;\n /** Slot for customizing the page size picker */\n PageSizePicker?: SlotProps<{\n pageSize: number;\n pageSizeOptions: number[];\n onPageSizeChange?: (pageSize: number) => void;\n }>;\n /** Slot for customizing the pagination */\n Pagination?: SlotProps<{\n currentPage: number;\n totalPages: number;\n onChange?: (page: number) => void;\n }>;\n };\n}\n\nexport const QuotesListTable: Container<QuotesListTableProps> = ({\n pageSize,\n showItemRange = true,\n showPageSizePicker = true,\n showPagination = true,\n onViewQuote,\n onPageSizeChange,\n onPageChange,\n slots,\n ...props\n}) => {\n const [quotesData, setQuotesData] =\n useState<NegotiableQuotesListModel | null>(null);\n const [loading, setLoading] = useState(true);\n\n // Default to first page size option if no pageSize prop provided\n const defaultPageSize = getDefaultPageSizeOptions()[0];\n const [currentPageSize, setCurrentPageSize] = useState(\n pageSize || defaultPageSize\n );\n const [currentPage, setCurrentPage] = useState(1);\n\n // Fetch quotes data when authenticated\n useEffect(() => {\n const fetchQuotes = async () => {\n try {\n setLoading(true);\n const data = await negotiableQuotes({\n pageSize: currentPageSize,\n currentPage,\n });\n setQuotesData(data);\n } catch (error) {\n console.error('Failed to fetch quotes:', error);\n } finally {\n setLoading(false);\n }\n };\n\n // Listen for authentication events\n const unsubscribe = events.on(\n 'authenticated',\n (isAuthenticated) => {\n if (isAuthenticated) {\n fetchQuotes();\n } else {\n setQuotesData(null);\n setLoading(false);\n }\n },\n { eager: true }\n ); // eager: true means it fires immediately with current state\n\n return () => {\n unsubscribe?.off();\n };\n }, [currentPageSize, currentPage]);\n\n // Listen for quote renamed event to refresh the list\n useEffect(() => {\n const fetchQuotes = async () => {\n try {\n const data = await negotiableQuotes({\n pageSize: currentPageSize,\n currentPage,\n });\n setQuotesData(data);\n } catch (error) {\n console.error('Failed to fetch quotes:', error);\n }\n };\n\n const unsubscribe = events.on(\n 'quote-management/quote-renamed',\n () => {\n // Refetch quotes list to show the updated name\n fetchQuotes();\n },\n { eager: true }\n );\n\n return () => {\n unsubscribe?.off();\n };\n }, [currentPageSize, currentPage]);\n\n // Handle page size change\n const handlePageSizeChange = (newPageSize: number) => {\n setCurrentPageSize(newPageSize);\n setCurrentPage(1); // Reset to page 1 when page size changes\n onPageSizeChange?.(newPageSize); // Also call parent callback\n };\n\n // Handle page change\n const handlePageChange = (newPage: number) => {\n setCurrentPage(newPage);\n onPageChange?.(newPage); // Also call parent callback\n };\n\n // Handle page size picker selection\n const handlePageSizeSelect = (event: Event) => {\n const target = event.target as HTMLSelectElement;\n const value = target?.value;\n if (value) {\n handlePageSizeChange(Number(value));\n }\n };\n\n // Prepare transformed quote data for table component\n const prepareRowData = (\n quotes: NegotiableQuoteListEntry[],\n slots?: QuotesListTableProps['slots'],\n onViewQuote?: (quoteId: string, quoteName: string, status: string) => void\n ): QuoteRowData[] => {\n return quotes\n .filter((quote) => quote?.uid) // Filter out null quotes\n .map((quote) => {\n const createdByName = `${quote.buyer.firstname} ${quote.buyer.lastname}`;\n\n return {\n id: quote.uid,\n quoteName: (\n <Slot name=\"QuoteName\" slot={slots?.QuoteName} context={{ quote }}>\n <span>{quote.name}</span>\n </Slot>\n ),\n created: (\n <Slot name=\"Created\" slot={slots?.Created} context={{ quote }}>\n <span>\n {quote.createdAt\n ? formattedDate(quote.createdAt, 'short')\n : 'N/A'}\n </span>\n </Slot>\n ),\n createdBy: (\n <Slot name=\"CreatedBy\" slot={slots?.CreatedBy} context={{ quote }}>\n <span>{createdByName}</span>\n </Slot>\n ),\n status: (\n <Slot name=\"Status\" slot={slots?.Status} context={{ quote }}>\n <span>{quote.status}</span>\n </Slot>\n ),\n lastUpdated: (\n <Slot\n name=\"LastUpdated\"\n slot={slots?.LastUpdated}\n context={{ quote }}\n >\n <span>\n {quote.updatedAt\n ? formattedDate(quote.updatedAt, 'short')\n : 'N/A'}\n </span>\n </Slot>\n ),\n quoteTemplate: (\n <Slot\n name=\"QuoteTemplate\"\n slot={slots?.QuoteTemplate}\n context={{ quote }}\n >\n <span>{quote.templateName}</span>\n </Slot>\n ),\n quoteTotal: (\n <Slot\n name=\"QuoteTotal\"\n slot={slots?.QuoteTotal}\n context={{ quote }}\n >\n <Price\n amount={quote.prices?.grandTotal?.value}\n currency={quote.prices?.grandTotal?.currency}\n />\n </Slot>\n ),\n actions: (\n <Slot\n name=\"Actions\"\n slot={slots?.Actions}\n context={{ quote, onViewQuote }}\n >\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n onClick={() =>\n onViewQuote?.(quote.uid, quote.name, quote.status)\n }\n >\n View\n </Button>\n </Slot>\n ),\n };\n });\n };\n\n // Prepare data for rendering\n const rowData = quotesData?.items\n ? prepareRowData(quotesData.items, slots, onViewQuote)\n : [];\n\n const paginationInfo = quotesData?.paginationInfo;\n const shouldShowPagination = !!paginationInfo;\n\n // Empty state message\n const emptyStateMessage = (\n <Slot name=\"EmptyQuotes\" slot={slots?.EmptyQuotes} context={{ quotesData }}>\n <IllustratedMessage heading=\"No Quotes Found\" />\n </Slot>\n );\n\n // Item range message\n const itemRangeMessage = paginationInfo ? (\n <Slot name=\"ItemRange\" slot={slots?.ItemRange} context={paginationInfo}>\n <span>\n Items {paginationInfo.startItem} to {paginationInfo.endItem} of{' '}\n {paginationInfo.totalCount} total\n </span>\n </Slot>\n ) : undefined;\n\n // Prepare page size picker message for component\n const pageSizePickerMessage =\n paginationInfo && paginationInfo.pageSizeOptions ? (\n <Slot\n name=\"PageSizePicker\"\n slot={slots?.PageSizePicker}\n context={{\n pageSize: paginationInfo.pageSize,\n pageSizeOptions: paginationInfo.pageSizeOptions,\n onPageSizeChange: handlePageSizeChange,\n }}\n >\n <span>Show </span>\n <Picker\n variant=\"primary\"\n size=\"medium\"\n value={String(paginationInfo.pageSize)}\n options={paginationInfo.pageSizeOptions.map(\n (size): PickerOption => ({\n value: String(size),\n text: String(size),\n })\n )}\n handleSelect={handlePageSizeSelect}\n />\n <span> per page</span>\n </Slot>\n ) : undefined;\n\n // Prepare pagination message for component\n const paginationMessage = paginationInfo ? (\n <Slot\n name=\"Pagination\"\n slot={slots?.Pagination}\n context={{\n currentPage: paginationInfo.currentPage,\n totalPages: paginationInfo.totalPages,\n onChange: handlePageChange,\n }}\n >\n <Pagination\n currentPage={paginationInfo.currentPage}\n totalPages={paginationInfo.totalPages}\n onChange={handlePageChange}\n />\n </Slot>\n ) : undefined;\n\n return (\n <QuotesListTableComponent\n rowData={rowData}\n loading={loading}\n className={props.className as string}\n emptyStateMessage={emptyStateMessage}\n showItemRange={showItemRange && shouldShowPagination}\n itemRangeMessage={itemRangeMessage}\n showPageSizePicker={showPageSizePicker && shouldShowPagination}\n pageSizePickerMessage={pageSizePickerMessage}\n showPagination={showPagination && shouldShowPagination}\n paginationMessage={paginationMessage}\n />\n );\n};\n"],"names":["QuotesListTable","pageSize","showItemRange","showPageSizePicker","showPagination","onViewQuote","onPageSizeChange","onPageChange","slots","props","quotesData","setQuotesData","useState","loading","setLoading","defaultPageSize","getDefaultPageSizeOptions","currentPageSize","setCurrentPageSize","currentPage","setCurrentPage","useEffect","fetchQuotes","data","negotiableQuotes","error","unsubscribe","events","isAuthenticated","handlePageSizeChange","newPageSize","handlePageChange","newPage","handlePageSizeSelect","event","target","value","prepareRowData","quotes","quote","createdByName","jsx","Slot","formattedDate","Price","_b","_a","_d","_c","Button","rowData","paginationInfo","shouldShowPagination","emptyStateMessage","IllustratedMessage","itemRangeMessage","jsxs","pageSizePickerMessage","Picker","size","paginationMessage","Pagination","QuotesListTableComponent"],"mappings":"4lBAqFO,MAAMA,EAAmD,CAAC,CAC/D,SAAAC,EACA,cAAAC,EAAgB,GAChB,mBAAAC,EAAqB,GACrB,eAAAC,EAAiB,GACjB,YAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAACC,EAAYC,CAAa,EAC9BC,EAA2C,IAAI,EAC3C,CAACC,EAASC,CAAU,EAAIF,EAAS,EAAI,EAGrCG,EAAkBC,EAAA,EAA4B,CAAC,EAC/C,CAACC,EAAiBC,CAAkB,EAAIN,EAC5CX,GAAYc,CAAA,EAER,CAACI,EAAaC,CAAc,EAAIR,EAAS,CAAC,EAGhDS,EAAU,IAAM,CACd,MAAMC,EAAc,SAAY,CAC9B,GAAI,CACFR,EAAW,EAAI,EACf,MAAMS,EAAO,MAAMC,EAAiB,CAClC,SAAUP,EACV,YAAAE,CAAA,CACD,EACDR,EAAcY,CAAI,CACpB,OAASE,EAAO,CACd,QAAQ,MAAM,0BAA2BA,CAAK,CAChD,QAAA,CACEX,EAAW,EAAK,CAClB,CACF,EAGMY,EAAcC,EAAO,GACzB,gBACCC,GAA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A,WAAA,CAAS,CAAA,CAAA,CAAA,EAEf,OAGAmB,EAAoBT,EACxBV,EAACC,EAAA,CACC,KAAK,aACL,KAAMlC,GAAA,YAAAA,EAAO,WACb,QAAS,CACP,YAAa2C,EAAe,YAC5B,WAAYA,EAAe,WAC3B,SAAUpB,CAAA,EAGZ,SAAAU,EAACoB,EAAA,CACC,YAAaV,EAAe,YAC5B,WAAYA,EAAe,WAC3B,SAAUpB,CAAA,CAAA,CACZ,CAAA,EAEA,OAEJ,OACEU,EAACqB,EAAA,CACC,QAAAZ,EACA,QAAArC,EACA,UAAWJ,EAAM,UACjB,kBAAA4C,EACA,cAAenD,GAAiBkD,EAChC,iBAAAG,EACA,mBAAoBpD,GAAsBiD,EAC1C,sBAAAK,EACA,eAAgBrD,GAAkBgD,EAClC,kBAAAQ,CAAA,CAAA,CAGN"}
|
|
@@ -1,8 +1,15 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
-
import { Container, SlotProps } from '@dropins/tools/
|
|
10
|
+
import { Container, SlotProps } from '@dropins/tools/lib';
|
|
3
11
|
import { requestNegotiableQuote } from '../../api';
|
|
4
12
|
import { AttachedFile } from '../../components';
|
|
5
|
-
|
|
6
13
|
export type RequestNegotiableQuoteHandlers = {
|
|
7
14
|
onAttachFiles?: (files: File[]) => Promise<void>;
|
|
8
15
|
onRequestNegotiableQuote?: typeof requestNegotiableQuote;
|
|
@@ -65,4 +72,3 @@ export interface RequestNegotiableQuoteFormProps extends Omit<HTMLAttributes<HTM
|
|
|
65
72
|
};
|
|
66
73
|
}
|
|
67
74
|
export declare const RequestNegotiableQuoteForm: Container<RequestNegotiableQuoteFormProps>;
|
|
68
|
-
//# sourceMappingURL=RequestNegotiableQuoteForm.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{useState as b,useEffect as B,useCallback as P}from"@dropins/tools/preact-compat.js";import{Slot as h,getFormErrors as I,getFormValues as ie}from"@dropins/tools/lib.js";import{TextArea as se,Field as ue,Input as ce,InputFile as me,Button as O,InLineAlert as de}from"@dropins/tools/components.js";import{v as le,f as fe,a as he,
|
|
3
|
+
import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{useState as b,useEffect as B,useCallback as P}from"@dropins/tools/preact-compat.js";import{Slot as h,getFormErrors as I,getFormValues as ie}from"@dropins/tools/lib.js";import{TextArea as se,Field as ue,Input as ce,InputFile as me,Button as O,InLineAlert as de}from"@dropins/tools/components.js";import{v as le,f as fe,a as he,b as ge,A as qe,R as Ne,c as be,d as Fe}from"../chunks/components.js";import{events as V}from"@dropins/tools/event-bus.js";import{uploadFile as ve,requestNegotiableQuote as A}from"../api.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import{useText as pe}from"@dropins/tools/i18n.js";import"@dropins/tools/fetch-graphql.js";const Re=({cartId:S,slots:t,onRequestNegotiableQuote:W,onSaveNegotiableQuote:K,onAttachFiles:D,onSubmitErrors:F,onError:x,className:G,maxFiles:y,maxFileSize:C,acceptedFileTypes:v})=>{const[H,J]=b(void 0),[M,T]=b(void 0),[g,k]=b([]),[p,R]=b(void 0),[f,u]=b({}),[z,U]=b(void 0),[i,m]=b(!1),o=pe({title:"NegotiableQuote.Request.title",comment:"NegotiableQuote.Request.comment",commentError:"NegotiableQuote.Request.commentError",quoteName:"NegotiableQuote.Request.quoteName",quoteNameError:"NegotiableQuote.Request.quoteNameError",attachmentsError:"NegotiableQuote.Request.attachmentsError",maxFilesExceeded:"NegotiableQuote.Request.maxFilesExceeded",maxFileSizeExceeded:"NegotiableQuote.Request.maxFileSizeExceeded",invalidFileType:"NegotiableQuote.Request.invalidFileType",requestCta:"NegotiableQuote.Request.requestCta",saveDraftCta:"NegotiableQuote.Request.saveDraftCta",errorHeader:"NegotiableQuote.Request.error.header",unauthenticated:"NegotiableQuote.Request.error.unauthenticated",unauthorized:"NegotiableQuote.Request.error.unauthorized",missingCart:"NegotiableQuote.Request.error.missingCart",successHeader:"NegotiableQuote.Request.success.header",submitSuccess:"NegotiableQuote.Request.success.submitted",draftSuccess:"NegotiableQuote.Request.success.draftSaved"});B(()=>{const e=V.on("quote-management/permissions",r=>{R(void 0),r.requestQuote?m(!1):(R(o.unauthorized),m(!0))},{eager:!0});return()=>e==null?void 0:e.off()},[o.unauthorized]),B(()=>{const e=V.on("authenticated",r=>{R(void 0),r?m(!1):(R(o.unauthenticated),m(!0))},{eager:!0});return()=>e==null?void 0:e.off()},[o.unauthenticated]),B(()=>{S||(R(o.missingCart),m(!0))},[S,o.missingCart]),B(()=>{p&&(x==null||x({error:p,isFormDisabled:i,setIsFormDisabled:m}))},[p,x,i]);const j=P(async e=>{var s;if(!(e!=null&&e.length))return;if(y&&g.length+e.length>y){u(a=>({...a,attachments:o.maxFilesExceeded.replace("{maxFiles}",String(y))}));return}for(const a of e){if(C&&!le(a.size,C)){u(c=>({...c,attachments:o.maxFileSizeExceeded.replace("{maxSize}",fe(C))}));return}if(v&&!he(a.type,v)){u(c=>({...c,attachments:o.invalidFileType}));return}}if(u(a=>{const{attachments:c,...d}=a;return d}),D){(s=D(e))==null||s.catch(()=>{u(a=>({...a,attachments:o.attachmentsError}))});return}const r=e.map(a=>({key:`temp-${Date.now()}-${Math.random()}-${a.name}`,name:a.name,size:a.size,status:"uploading"}));k(a=>[...a,...r]);for(let a=0;a<e.length;a++){const c=e[a],d=r[a].key;try{const q=await ve(c);k(N=>N.map(l=>l.key===d?{...l,key:q.key,status:"success"}:l))}catch(q){u(N=>({...N,attachments:q.message})),k(N=>N.map(l=>l.key===d?{...l,status:"error",error:q.message}:l))}}},[D,o,y,C,v,g]),_=P(e=>{k(r=>r.filter(s=>s.key!==e))},[]),X=()=>{let e,r;if(z?(r={name:"SuccessBanner",slot:t==null?void 0:t.SuccessBanner,context:{message:z},"data-testid":"form-success-banner"},e={type:"success",variant:"primary",icon:n(be,{}),heading:o.successHeader,description:z,className:"request-negotiable-quote-form__success-banner"}):p&&(r={name:"ErrorBanner",slot:t==null?void 0:t.ErrorBanner,context:{message:p},"data-testid":"form-error-banner"},e={type:"error",variant:"primary",icon:n(Fe,{}),heading:o.errorHeader,description:p,className:"request-negotiable-quote-form__error-banner"}),r&&e)return n(h,{...r,children:n(de,{...e})})},$=e=>{u({});const r=e.target.closest("form"),s=I(r);Object.keys(s).length>0&&(u(s),F==null||F(s))},Y=e=>{var w;e.preventDefault(),m(!0);const r=e.target,a={...I(r),...f};if(Object.keys(a).length>0){F==null||F(a);return}const c=e.submitter,d=ie(r);J(d.comment),T(d.quoteName);const q=((w=c==null?void 0:c.dataset)==null?void 0:w.draft)==="true"||!1,N=g.filter(Q=>Q.status==="success").map(Q=>({key:Q.key})),l={cartId:S,quoteName:d.quoteName,comment:d.comment,attachments:N,isDraft:q};let E,L;q?(E=K??A,L=o.draftSuccess):(E=W??A,L=o.submitSuccess),E(l).then(()=>{U(L)}).catch(Q=>{R(Q.message)})},Z=n(h,{name:"Title",slot:t==null?void 0:t.Title,context:{text:o.title},children:n("span",{"data-testid":"form-title",children:o.title})}),ee=n(h,{name:"CommentField",slot:t==null?void 0:t.CommentField,context:{value:H,required:!0,errorMessage:f.comment,setFormErrors:u,isFormDisabled:i},children:n(se,{name:"comment",value:H,label:o.comment,required:!0,autoComplete:"off","data-testid":"form-comment-field",errorMessage:f.comment,disabled:i})}),te=n(h,{name:"QuoteNameField",slot:t==null?void 0:t.QuoteNameField,context:{value:M,required:!0,errorMessage:f.quoteName,setFormErrors:u,isFormDisabled:i},children:n(ue,{error:f.quoteName,disabled:i,children:n(ce,{value:M,name:"quoteName",floatingLabel:o.quoteName,required:!0,autoComplete:"off","data-testid":"form-quote-name-field"})})}),ae=n(h,{name:"AttachFileField",slot:t==null?void 0:t.AttachFileField,context:{onChange:j,formErrors:f,isFormDisabled:i,attachedFiles:g},children:n(me,{multiple:!0,onChange:e=>{const r=e.target,s=r==null?void 0:r.files,a=s?Array.from(s):[];a.length>0&&j(a)},icon:n(ge,{}),disabled:i,"data-testid":"form-attach-file-field",accept:v==null?void 0:v.join(",")})}),re=g.length>0?n(h,{name:"AttachedFilesList",slot:t==null?void 0:t.AttachedFilesList,context:{files:g,onRemove:_,disabled:i},children:n(qe,{files:g,onRemove:_,disabled:i})}):void 0,oe=n(h,{name:"RequestButton",slot:t==null?void 0:t.RequestButton,context:{requestNegotiableQuote:A,formErrors:f,isFormDisabled:i,setIsFormDisabled:m},children:n(O,{type:"submit","data-testid":"form-request-button",onClick:$,disabled:i,children:o.requestCta})}),ne=n(h,{name:"SaveDraftButton",slot:t==null?void 0:t.SaveDraftButton,context:{requestNegotiableQuote:A,formErrors:f,isFormDisabled:i,setIsFormDisabled:m},children:n(O,{type:"submit","data-draft":"true",variant:"secondary","data-testid":"form-save-draft-button",onClick:$,disabled:i,children:o.saveDraftCta})});return n(Ne,{title:Z,banner:X(),commentField:ee,quoteNameField:te,attachFile:ae,attachedFilesList:re,requestButton:oe,saveButton:ne,onSubmit:Y,className:G,disabled:i,"data-testid":"form-container"})};Re.displayName="RequestNegotiableQuoteForm";export{Re as RequestNegotiableQuoteForm,Re as default};
|
|
4
4
|
//# sourceMappingURL=RequestNegotiableQuoteForm.js.map
|
|
@@ -1,10 +1,16 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
-
import { Container } from '@dropins/tools/
|
|
10
|
+
import { Container } from '@dropins/tools/lib';
|
|
3
11
|
import { ShippingAddress } from '../../data/models/negotiable-quote-model';
|
|
4
|
-
|
|
5
12
|
export interface ShippingAddressDisplayProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {
|
|
6
13
|
shippingAddress?: ShippingAddress;
|
|
7
14
|
loading?: boolean;
|
|
8
15
|
}
|
|
9
16
|
export declare const ShippingAddressDisplay: Container<ShippingAddressDisplayProps>;
|
|
10
|
-
//# sourceMappingURL=ShippingAddressDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './ShippingAddressDisplay/index'
|
|
1
|
+
export * from './ShippingAddressDisplay/index';
|
package/containers/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { CartItemModel, NegotiableQuoteModel } from '../negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export declare const baseCartItem: CartItemModel;
|
|
4
11
|
export declare const configurableCartItem: CartItemModel;
|
|
5
12
|
export declare const bundleCartItem: CartItemModel;
|
|
6
13
|
export declare const downloadableCartItem: CartItemModel;
|
|
7
14
|
export declare const base: NegotiableQuoteModel;
|
|
8
|
-
//# sourceMappingURL=negotiableQuoteModel.d.ts.map
|
|
@@ -1,4 +1,10 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuoteTemplateModel } from '../negotiable-quote-template-model';
|
|
2
|
-
|
|
3
10
|
export declare const base: NegotiableQuoteTemplateModel;
|
|
4
|
-
//# sourceMappingURL=negotiableQuoteTemplateModel.d.ts.map
|
|
@@ -1,5 +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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuoteTemplatesListModel } from '../negotiable-quote-template-model';
|
|
2
|
-
|
|
3
10
|
export declare const quoteTemplatesListData: NegotiableQuoteTemplatesListModel;
|
|
4
11
|
export declare const emptyQuoteTemplatesListData: NegotiableQuoteTemplatesListModel;
|
|
5
|
-
//# sourceMappingURL=negotiableQuoteTemplatesListModel.d.ts.map
|
|
@@ -1,5 +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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuotesListModel } from '../negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export declare const quotesListData: NegotiableQuotesListModel;
|
|
4
11
|
export declare const emptyQuotesListData: NegotiableQuotesListModel;
|
|
5
|
-
//# sourceMappingURL=negotiableQuotesListModel.d.ts.map
|
|
@@ -1,5 +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
|
+
*******************************************************************/
|
|
1
9
|
import { StoreConfigModel } from '../store-config-model';
|
|
2
|
-
|
|
3
10
|
export declare const mockStoreConfigModel: StoreConfigModel;
|
|
4
11
|
export declare const mockStoreConfigModelWithDefaultValues: StoreConfigModel;
|
|
5
|
-
//# sourceMappingURL=storeConfigModel.d.ts.map
|
package/data/models/index.d.ts
CHANGED
|
@@ -267,7 +267,7 @@ export declare enum NegotiableQuoteHistoryEntryChangeType {
|
|
|
267
267
|
UPDATED_BY_SYSTEM = "UPDATED_BY_SYSTEM"
|
|
268
268
|
}
|
|
269
269
|
export declare enum NegotiableQuoteStatus {
|
|
270
|
-
NEW = "NEW",
|
|
270
|
+
NEW = "NEW",// Currently not returned by the API, but is used to indicate a new quote
|
|
271
271
|
SUBMITTED = "SUBMITTED",
|
|
272
272
|
PENDING = "PENDING",
|
|
273
273
|
UPDATED = "UPDATED",
|
|
@@ -288,4 +288,3 @@ export interface PaginationInfo {
|
|
|
288
288
|
pageSizeOptions?: number[];
|
|
289
289
|
}
|
|
290
290
|
export {};
|
|
291
|
-
//# sourceMappingURL=negotiable-quote-model.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { Currency, PaginationInfo, ShippingAddress, NegotiableQuoteHistoryEntry, CartItemModel } from './negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export interface NegotiableQuoteTemplateModel {
|
|
4
11
|
id: string;
|
|
5
12
|
uid: string;
|
|
@@ -109,4 +116,3 @@ export interface NegotiableQuoteTemplateListEntry {
|
|
|
109
116
|
};
|
|
110
117
|
canGenerateQuoteFromTemplate?: boolean;
|
|
111
118
|
}
|
|
112
|
-
//# sourceMappingURL=negotiable-quote-template-model.d.ts.map
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
*******************************************************************/
|
|
3
9
|
export declare const mockGraphQLResponse: {
|
|
4
10
|
data: {
|
|
5
11
|
requestNegotiableQuote: {
|
|
@@ -661,7 +667,7 @@ export declare const mockNegotiableQuotesResponse: {
|
|
|
661
667
|
name: string;
|
|
662
668
|
created_at: string;
|
|
663
669
|
updated_at: string;
|
|
664
|
-
status:
|
|
670
|
+
status: any;
|
|
665
671
|
buyer: {
|
|
666
672
|
firstname: string;
|
|
667
673
|
lastname: string;
|
|
@@ -740,4 +746,3 @@ export declare const mockNullNegotiableQuotesResponse: {
|
|
|
740
746
|
negotiableQuotes: null;
|
|
741
747
|
};
|
|
742
748
|
};
|
|
743
|
-
//# sourceMappingURL=negotiableQuoteData.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuoteHistoryEntry } from '../models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
/**
|
|
4
11
|
* Transforms a history entry from the API format to the model format
|
|
5
12
|
* @param historyEntry - Raw history entry from API
|
|
@@ -12,4 +19,3 @@ export declare function transformHistoryEntry(historyEntry: any): NegotiableQuot
|
|
|
12
19
|
* @returns Array of transformed history entries
|
|
13
20
|
*/
|
|
14
21
|
export declare function transformHistory(historyEntries: any[] | null | undefined): NegotiableQuoteHistoryEntry[] | undefined;
|
|
15
|
-
//# sourceMappingURL=transform-history.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { CartItemModel } from '../models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
/**
|
|
4
11
|
* Transforms a single quote item from the API format to the model format
|
|
5
12
|
* @param item - Raw quote item from API
|
|
@@ -12,4 +19,3 @@ export declare function transformQuoteItem(item: any): CartItemModel;
|
|
|
12
19
|
* @returns Array of transformed quote items
|
|
13
20
|
*/
|
|
14
21
|
export declare function transformQuoteItems(items: any[] | null | undefined): CartItemModel[];
|
|
15
|
-
//# sourceMappingURL=transform-quote-items.d.ts.map
|
|
@@ -1,5 +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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuoteTemplateModel, NegotiableQuoteTemplatesListModel } from '../models/negotiable-quote-template-model';
|
|
2
|
-
|
|
3
10
|
export declare function transformQuoteTemplate(templateData: any): NegotiableQuoteTemplateModel | null;
|
|
4
11
|
export declare function transformQuoteTemplatesList(templatesData: any): NegotiableQuoteTemplatesListModel | null;
|
|
5
|
-
//# sourceMappingURL=transform-quote-template.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { NegotiableQuoteModel, NegotiableQuotesListModel, PaginationInfo } from '../models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export declare function transformQuote(quoteData: any): NegotiableQuoteModel | null;
|
|
4
11
|
export declare function transformNegotiableQuotesList(quotesData: any): NegotiableQuotesListModel | null;
|
|
5
12
|
export declare function transformPaginationInfo(quotesData: NegotiableQuotesListModel | null): PaginationInfo | null;
|
|
@@ -12,4 +19,3 @@ export declare function transformShippingPrices(quote: any): {
|
|
|
12
19
|
shippingIncludingTax: any;
|
|
13
20
|
shippingExcludingTax: any;
|
|
14
21
|
};
|
|
15
|
-
//# sourceMappingURL=transform-quote.d.ts.map
|
|
@@ -1,4 +1,10 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { StoreConfigModel } from '../models';
|
|
2
|
-
|
|
3
10
|
export declare function transformStoreConfig(data: any): StoreConfigModel;
|
|
4
|
-
//# sourceMappingURL=transform-store-config.d.ts.map
|
|
@@ -61,4 +61,3 @@ export interface UseExpirationDateReturn {
|
|
|
61
61
|
* Saves the expiration date immediately when user clicks "Save" in the modal.
|
|
62
62
|
*/
|
|
63
63
|
export declare const useExpirationDate: (params?: UseExpirationDateParams) => UseExpirationDateReturn;
|
|
64
|
-
//# sourceMappingURL=useExpirationDate.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { CartItemModel } from '../data/models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export interface UseItemsQuotedTemplateReturn {
|
|
4
11
|
dropdownSelections: Record<string, string | undefined>;
|
|
5
12
|
handleItemDropdownChange: (item: CartItemModel, action: string) => void;
|
|
@@ -13,4 +20,3 @@ export interface UseItemsQuotedTemplateParams {
|
|
|
13
20
|
* Custom hook to manage dropdown selections and item actions for quote template items
|
|
14
21
|
*/
|
|
15
22
|
export declare const useItemsQuotedTemplate: (params: UseItemsQuotedTemplateParams) => UseItemsQuotedTemplateReturn;
|
|
16
|
-
//# sourceMappingURL=useItemsQuotedTemplate.d.ts.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
*******************************************************************/
|
|
3
9
|
/**
|
|
4
10
|
* Custom hook to manage quote summary data and loading state
|
|
5
11
|
*/
|
|
6
12
|
export declare const useQuoteSummaryData: () => {
|
|
7
|
-
quoteData:
|
|
13
|
+
quoteData: any;
|
|
8
14
|
loading: boolean;
|
|
9
15
|
};
|
|
10
|
-
//# sourceMappingURL=useQuoteSummaryData.d.ts.map
|
|
@@ -1,6 +1,13 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { ReferenceDocument } from '../components';
|
|
2
10
|
import { ReferenceDocumentLinkInput } from '../api/sendQuoteTemplateForReview/sendQuoteTemplateForReview';
|
|
3
|
-
|
|
4
11
|
export interface UseReferenceDocumentLinksParams {
|
|
5
12
|
templateReferenceDocuments?: ReferenceDocument[];
|
|
6
13
|
localReferenceDocuments: ReferenceDocument[];
|
|
@@ -31,4 +38,3 @@ export interface UseReferenceDocumentLinksReturn {
|
|
|
31
38
|
* Note: getReferenceDocumentLinks() returns all local reference documents, not just new ones.
|
|
32
39
|
*/
|
|
33
40
|
export declare const useReferenceDocumentLinks: (params: UseReferenceDocumentLinksParams) => UseReferenceDocumentLinksReturn;
|
|
34
|
-
//# sourceMappingURL=useReferenceDocumentLinks.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { CartItemModel } from '../data/models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export interface UseRemoveTemplateItemsReturn {
|
|
4
11
|
handleRemoveItems: (items: CartItemModel[]) => void;
|
|
5
12
|
handleConfirmRemove: () => Promise<void>;
|
|
@@ -22,4 +29,3 @@ export interface UseRemoveTemplateItemsParams {
|
|
|
22
29
|
* Custom hook to manage removing items from a quote template
|
|
23
30
|
*/
|
|
24
31
|
export declare const useRemoveTemplateItems: (params: UseRemoveTemplateItemsParams) => UseRemoveTemplateItemsReturn;
|
|
25
|
-
//# sourceMappingURL=useRemoveTemplateItems.d.ts.map
|
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
*******************************************************************/
|
|
1
9
|
import { CartItemModel } from '../data/models/negotiable-quote-model';
|
|
2
|
-
|
|
3
10
|
export interface UseUpdateTemplateQuantitiesReturn {
|
|
4
11
|
quantityChanges: Record<string, number>;
|
|
5
12
|
handleQuantityChange: (item: CartItemModel, newQuantity: number) => void;
|
|
@@ -24,4 +31,3 @@ export interface UseUpdateTemplateQuantitiesParams {
|
|
|
24
31
|
* Custom hook to manage updating quantities of items in a quote template
|
|
25
32
|
*/
|
|
26
33
|
export declare const useUpdateTemplateQuantities: (params: UseUpdateTemplateQuantitiesParams) => UseUpdateTemplateQuantitiesReturn;
|
|
27
|
-
//# sourceMappingURL=useUpdateTemplateQuantities.d.ts.map
|
package/lib/itemFormatters.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
import { ImageProps } from '@dropins/tools/components';
|
|
10
|
+
import { SlotProps } from '@dropins/tools/lib';
|
|
3
11
|
import { CartItemModel as NegotiableQuoteItemModel, StoreConfigModel } from '../data/models';
|
|
4
12
|
import { SwitchableAttributes } from '../containers/QuoteSummaryList/QuoteSummaryList';
|
|
5
|
-
|
|
6
13
|
export interface ItemFormatterOptions {
|
|
7
14
|
attributesToHide: SwitchableAttributes[];
|
|
8
15
|
routeProduct?: (item: NegotiableQuoteItemModel) => string;
|
|
@@ -37,11 +44,8 @@ export declare const getProductAttributes: (item: NegotiableQuoteItemModel, opti
|
|
|
37
44
|
/**
|
|
38
45
|
* Get configurations for an item (bundle, configurable, customizable options)
|
|
39
46
|
*/
|
|
40
|
-
export declare const getConfigurations: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) =>
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
} | undefined;
|
|
47
|
+
export declare const getConfigurations: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => any;
|
|
43
48
|
/**
|
|
44
49
|
* Get total excluding tax component for an item
|
|
45
50
|
*/
|
|
46
51
|
export declare const getTotalExcludingTax: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => import("preact").JSX.Element | undefined;
|
|
47
|
-
//# sourceMappingURL=itemFormatters.d.ts.map
|