@dropins/storefront-quote-management 1.0.0-beta1 → 1.0.0-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +1 -1
- package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +7 -0
- package/api.js +8 -47
- package/api.js.map +1 -1
- package/chunks/AttachedFilesList.js +1 -1
- package/chunks/AttachedFilesList.js.map +1 -1
- package/chunks/ConfirmationModal.js +1 -1
- package/chunks/ConfirmationModal.js.map +1 -1
- package/chunks/ItemsQuoted.js +1 -1
- package/chunks/ItemsQuoted.js.map +1 -1
- package/chunks/ItemsQuotedTemplate.js +1 -1
- package/chunks/ItemsQuotedTemplate.js.map +1 -1
- package/chunks/LineItemNoteModal.js +4 -0
- package/chunks/LineItemNoteModal.js.map +1 -0
- package/chunks/NegotiableQuoteTemplateFragment.js +6 -0
- package/chunks/NegotiableQuoteTemplateFragment.js.map +1 -1
- package/chunks/OrderSummaryLine.js +1 -1
- package/chunks/OrderSummaryLine.js.map +1 -1
- package/chunks/TabbedContent.js +1 -1
- package/chunks/TabbedContent.js.map +1 -1
- package/chunks/WarningFilled.js +1 -1
- package/chunks/WarningFilled.js.map +1 -1
- package/chunks/addQuoteTemplateLineItemNote.js +23 -3
- package/chunks/addQuoteTemplateLineItemNote.js.map +1 -1
- package/chunks/openQuoteTemplate.js +28 -8
- package/chunks/openQuoteTemplate.js.map +1 -1
- package/chunks/transform-quote-template.js +1 -1
- package/chunks/transform-quote-template.js.map +1 -1
- package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +0 -1
- 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/index.d.ts +2 -0
- package/containers/ItemsQuoted.js +1 -1
- package/containers/ItemsQuotedTemplate/ItemsQuotedTemplate.d.ts +5 -1
- package/containers/ItemsQuotedTemplate.js +1 -1
- package/containers/ManageNegotiableQuote.js +1 -1
- package/containers/ManageNegotiableQuote.js.map +1 -1
- package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +9 -3
- package/containers/ManageNegotiableQuoteTemplate.js +1 -1
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
- package/containers/OrderSummary.js +1 -1
- package/containers/OrderSummary.js.map +1 -1
- package/containers/OrderSummaryLine.js +1 -1
- package/containers/QuoteSummaryList.js +1 -1
- package/containers/QuoteSummaryList.js.map +1 -1
- package/containers/QuoteTemplatesListTable.js +1 -1
- package/containers/QuoteTemplatesListTable.js.map +1 -1
- package/containers/QuotesListTable.js +1 -1
- package/containers/QuotesListTable.js.map +1 -1
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js.map +1 -1
- package/data/models/negotiable-quote-template-model.d.ts +1 -0
- package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +55 -0
- package/hooks/useItemsQuotedTemplate.d.ts +16 -0
- package/hooks/useReferenceDocumentLinks.d.ts +34 -0
- package/hooks/useRemoveTemplateItems.d.ts +25 -0
- package/hooks/useUpdateTemplateQuantities.d.ts +27 -0
- package/i18n/en_US.json.d.ts +60 -1
- package/package.json +1 -1
- package/render.js +3 -3
- package/render.js.map +1 -1
- package/chunks/CheckWithCircle.js +0 -4
- package/chunks/CheckWithCircle.js.map +0 -1
- package/chunks/LineItemNoteModal2.js +0 -4
- package/chunks/LineItemNoteModal2.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LineItemNoteModal2.js","sources":["/@dropins/storefront-quote-management/src/components/ItemsQuoted/ItemsQuoted.tsx","/@dropins/storefront-quote-management/src/components/ProductListTable/ProductListTable.tsx","/@dropins/storefront-quote-management/src/components/QuotePricesSummary/QuotePricesSummary.tsx","/@dropins/storefront-quote-management/src/components/LineItemNoteModal/LineItemNoteModal.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/ItemsQuoted/ItemsQuoted.css';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport interface ItemsQuotedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n loading?: boolean;\n table?: VNode;\n pricesSummary?: VNode;\n}\n\nexport const ItemsQuoted: FunctionComponent<ItemsQuotedProps> = ({\n className,\n loading,\n table,\n pricesSummary,\n ...props\n}) => {\n if (loading) {\n return <ItemsQuotedSkeleton />;\n }\n\n return (\n <div className={classes(['quote-management-items-quoted', className])} {...props}>\n {table && (\n <VComponent\n node={table}\n className={classes(['quote-management-items-quoted__table'])}\n data-testid=\"quote-management-items-quoted__table\"\n />\n )}\n {pricesSummary && (\n <VComponent\n node={pricesSummary}\n className={classes(['quote-management-items-quoted__prices-summary'])}\n data-testid=\"quote-management-items-quoted__prices-summary\"\n />\n )}\n </div>\n );\n};\n\nexport const ItemsQuotedSkeleton: FunctionComponent = () => {\n return (\n <Skeleton data-testid=\"items-quoted-skeleton\">\n <SkeletonRow variant=\"row\" fullWidth={true} size=\"medium\" lines={4} multilineGap='xsmall' />\n </Skeleton>\n );\n};","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, h } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useState, useEffect } from 'preact/hooks';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Table,\n Checkbox,\n Picker,\n Price,\n Button,\n Input,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { getUserTimezone } from '@/quote-management/utils/dateUtils';\n\nimport '@/quote-management/components/ProductListTable/ProductListTable.css';\n\nexport interface ProductListTableItem {\n uid: string;\n product: {\n name: string;\n sku: string;\n };\n prices: {\n originalItemPrice: {\n value: number;\n currency: string;\n };\n rowTotal: {\n value: number;\n currency: string;\n };\n };\n quantity: number;\n catalogDiscount?: {\n amountOff: number;\n percentOff: number;\n };\n configurableOptions?: Array<{\n optionLabel: string;\n valueLabel: string;\n }>;\n bundleOptions?: Array<{\n label: string;\n values: Array<{\n label: string;\n quantity: number;\n originalPrice: {\n value: number;\n currency: string;\n };\n }>;\n }>;\n noteFromBuyer?: Array<{\n createdAt: string;\n creatorId: number;\n creatorType: number;\n negotiableQuoteItemUid: string;\n note: string;\n noteUid: string;\n }>;\n}\n\nexport interface ProductListTableProps\n extends HTMLAttributes<HTMLDivElement | HTMLFormElement> {\n items: ProductListTableItem[];\n canEdit: boolean;\n readOnly?: boolean;\n showActions?: boolean;\n onItemCheckboxChange?: (\n item: ProductListTableItem,\n isSelected: boolean\n ) => void;\n onItemDropdownChange?: (item: ProductListTableItem, action: string) => void;\n onQuantityChange?: (item: ProductListTableItem, newQuantity: number) => void;\n onUpdate?: (e: SubmitEvent) => void;\n dropdownSelections?: Record<string, string | undefined>;\n}\n\nexport const ProductListTable: FunctionComponent<ProductListTableProps> = ({\n className,\n items,\n canEdit,\n readOnly = false,\n showActions,\n onItemCheckboxChange,\n onItemDropdownChange,\n onQuantityChange,\n onUpdate,\n dropdownSelections,\n ...props\n}) => {\n // Track original quantities to detect changes\n const [originalQuantities, setOriginalQuantities] = useState<\n Record<string, number>\n >({});\n const [currentQuantities, setCurrentQuantities] = useState<\n Record<string, number>\n >({});\n\n // Initialize quantities when items change\n useEffect(() => {\n const quantities: Record<string, number> = {};\n items.forEach((item) => {\n quantities[item.uid] = item.quantity;\n });\n setOriginalQuantities(quantities);\n setCurrentQuantities(quantities);\n }, [items]);\n\n // Check if any quantities have changed\n const hasQuantityChanges = Object.keys(currentQuantities).some(\n (uid) => currentQuantities[uid] !== originalQuantities[uid]\n );\n\n const dictionary = useText({\n updateButton: 'NegotiableQuote.Manage.productListTable.submitButton',\n productNameHeader:\n 'NegotiableQuote.Manage.productListTable.headers.productName',\n skuHeader: 'NegotiableQuote.Manage.productListTable.headers.sku',\n priceHeader: 'NegotiableQuote.Manage.productListTable.headers.price',\n quantityHeader: 'NegotiableQuote.Manage.productListTable.headers.quantity',\n discountHeader: 'NegotiableQuote.Manage.productListTable.headers.discount',\n subtotalHeader: 'NegotiableQuote.Manage.productListTable.headers.subtotal',\n actionsHeader: 'NegotiableQuote.Manage.productListTable.headers.actions',\n editNoteToSeller:\n 'NegotiableQuote.Manage.productListTable.actions.editNoteToSeller',\n remove: 'NegotiableQuote.Manage.productListTable.actions.remove',\n notesHeader: 'NegotiableQuote.Manage.productListTable.notes.header',\n leftANote: 'NegotiableQuote.Manage.productListTable.notes.leftANote',\n buyer: 'NegotiableQuote.Manage.productListTable.notes.buyer',\n });\n\n const columns = [\n {\n label: dictionary.productNameHeader,\n key: 'productName',\n },\n {\n label: dictionary.skuHeader,\n key: 'sku',\n },\n {\n label: dictionary.priceHeader,\n key: 'price',\n },\n {\n label: dictionary.quantityHeader,\n key: 'quantity',\n },\n {\n label: dictionary.discountHeader,\n key: 'discount',\n },\n {\n label: dictionary.subtotalHeader,\n key: 'subtotal',\n },\n ];\n\n // Add checkbox column when canEdit (for bulk operations)\n if (canEdit && !readOnly) {\n columns.unshift({\n label: '',\n key: 'checkbox',\n });\n }\n\n // Add actions column when showActions is explicitly true, or when canEdit is true and showActions is not explicitly false\n const shouldShowActions = showActions ?? canEdit;\n if (shouldShowActions && !readOnly) {\n columns.push({\n label: dictionary.actionsHeader,\n key: 'actions',\n });\n }\n\n const handleItemCheckboxChange = (\n event: Event,\n item: ProductListTableItem\n ) => {\n const isSelected = (event.target as HTMLInputElement).checked;\n onItemCheckboxChange?.(item, isSelected);\n };\n\n const handleItemDropdownChange = (\n event: Event,\n item: ProductListTableItem\n ) => {\n const action = (event.target as HTMLSelectElement).value;\n onItemDropdownChange?.(item, action);\n };\n\n const handleQuantityChange = (event: Event, item: ProductListTableItem) => {\n const newQuantity = parseInt((event.target as HTMLInputElement).value, 10);\n if (!isNaN(newQuantity) && newQuantity > 0) {\n setCurrentQuantities((prev) => ({\n ...prev,\n [item.uid]: newQuantity,\n }));\n onQuantityChange?.(item, newQuantity);\n }\n };\n\n const handleUpdate = (event: SubmitEvent) => {\n event.preventDefault();\n onUpdate?.(event);\n };\n\n const discountElement = (amountOff: number, percentOff: number) => {\n return amountOff > 0 ? (\n <div className=\"quote-management-product-list-table__discount-container\">\n <span className=\"quote-management-product-list-table__discount-percent\">\n {percentOff}%\n </span>\n <span className=\"quote-management-product-list-table__discount-price\">\n (<Price amount={amountOff} />)\n </span>\n </div>\n ) : undefined;\n };\n\n const getProductNameContent = (item: ProductListTableItem) => {\n const configurableOptions = item.configurableOptions?.map((option) => (\n <div\n key={option.optionLabel}\n className=\"quote-management-product-list-table__configurable-option\"\n >\n <span className=\"quote-management-product-list-table__configurable-option-label\">\n {option.optionLabel}:\n </span>\n <span className=\"quote-management-product-list-table__configurable-option-value\">\n {option.valueLabel}\n </span>\n </div>\n ));\n\n const bundleOptions = item.bundleOptions?.map((option) => (\n <div\n key={option.label}\n className=\"quote-management-product-list-table__bundle-option\"\n >\n <span className=\"quote-management-product-list-table__bundle-option-label\">\n {option.label}\n </span>\n <div className=\"quote-management-product-list-table__bundle-option-values\">\n {option.values.map((value) => (\n <span\n key={value.label}\n className=\"quote-management-product-list-table__bundle-option-value\"\n >\n <span className=\"quote-management-product-list-table__bundle-option-value-quantity\">\n {value.quantity} x\n </span>\n <span className=\"quote-management-product-list-table__bundle-option-value-label\">\n {value.label}\n </span>\n <Price\n className=\"quote-management-product-list-table__bundle-option-value-original-price\"\n amount={value.originalPrice.value}\n currency={value.originalPrice.currency}\n weight=\"normal\"\n />\n </span>\n ))}\n </div>\n </div>\n ));\n\n return (\n <div className=\"quote-management-product-list-table__product-name-container\">\n <span className=\"quote-management-product-list-table__product-name\">\n {item.product.name}\n </span>\n {configurableOptions}\n {bundleOptions}\n </div>\n );\n };\n\n const formatNoteTimestamp = (timestamp: string) => {\n const date = new Date(timestamp);\n return date.toLocaleString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit',\n hour12: true,\n timeZone: getUserTimezone(),\n });\n };\n\n const getNotesContent = (item: ProductListTableItem) => {\n // Check if notes exist and have valid data\n if (!item.noteFromBuyer || item.noteFromBuyer.length === 0) {\n return null;\n }\n\n // Filter out notes with null or empty note text\n const validNotes = item.noteFromBuyer.filter(\n (note) => note && note.note && note.note.trim() !== ''\n );\n\n if (validNotes.length === 0) {\n return null;\n }\n\n return (\n <div\n className=\"quote-management-product-list-table__notes-container\"\n data-testid={`item-notes-${item.product.sku}`}\n >\n <div className=\"quote-management-product-list-table__notes-header\">\n {dictionary.notesHeader}\n </div>\n <div className=\"quote-management-product-list-table__notes-list\">\n {validNotes.map((note, index) => (\n <div\n key={note.noteUid || index}\n className=\"quote-management-product-list-table__note-item\"\n >\n <div className=\"quote-management-product-list-table__note-content\">\n <strong className=\"quote-management-product-list-table__note-meta\">\n {/* TODO: When backend exposes creator_name for notes, replace (Buyer) with the actual name */}\n {formatNoteTimestamp(note.createdAt)} ({dictionary.buyer})\n </strong>{' '}\n {dictionary.leftANote}\n </div>\n <div className=\"quote-management-product-list-table__note-text\">\n {note.note}{' '}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n };\n\n const rowData = items.flatMap((item) => {\n const quantityElement = canEdit ? (\n <Input\n className=\"quote-management-product-list-table__quantity-input\"\n type=\"number\"\n min=\"1\"\n value={\n currentQuantities[item.uid]?.toString() || item.quantity.toString()\n }\n onChange={(e) => handleQuantityChange(e, item)}\n disabled={readOnly || !canEdit}\n data-testid={`quantity-input-${item.product.sku}`}\n />\n ) : (\n <span className=\"quote-management-product-list-table__quantity\">\n {item.quantity}\n </span>\n );\n\n const productRow = {\n checkbox: (\n <Checkbox\n className=\"quote-management-product-list-table__checkbox\"\n name=\"itemSelected\"\n data-testid={`item-checkbox-${item.product.sku}`}\n onChange={(e) => handleItemCheckboxChange(e, item)}\n value={item.product.sku}\n />\n ),\n productName: getProductNameContent(item),\n sku: (\n <span className=\"quote-management-product-list-table__sku\">\n {item.product.sku}\n </span>\n ),\n price: (\n <Price\n className=\"quote-management-product-list-table__price\"\n amount={item.prices.originalItemPrice.value}\n currency={item.prices.originalItemPrice.currency}\n />\n ),\n quantity: quantityElement,\n discount: item.catalogDiscount\n ? discountElement(\n item.catalogDiscount.amountOff,\n item.catalogDiscount.percentOff\n )\n : undefined,\n subtotal: (\n <Price\n className=\"quote-management-product-list-table__subtotal\"\n amount={item.prices.rowTotal.value}\n currency={item.prices.rowTotal.currency}\n />\n ),\n actions: (\n <Picker\n className=\"quote-management-product-list-table__actions\"\n data-testid={`item-dropdown-${item.product.sku}`}\n name={`item-dropdown-${item.product.sku}`}\n handleSelect={(e) => handleItemDropdownChange(e, item)}\n placeholder=\"Select\"\n value={dropdownSelections?.[item.uid] ?? ''}\n options={[\n { text: dictionary.editNoteToSeller, value: 'edit' },\n { text: dictionary.remove, value: 'remove' },\n ]}\n />\n ),\n };\n\n const notes = getNotesContent(item);\n\n // If there are notes, create a notes row\n if (notes) {\n const notesRow = {\n checkbox: '',\n productName: (\n <div className=\"quote-management-product-list-table__notes-row-wrapper\">\n {notes}\n </div>\n ),\n sku: '',\n price: '',\n quantity: '',\n discount: '',\n subtotal: '',\n actions: '',\n };\n return [productRow, notesRow];\n }\n\n return [productRow];\n });\n\n const table = (\n <Table\n columns={columns}\n rowData={rowData}\n data-testid=\"product-list-table\"\n mobileLayout=\"stacked\"\n />\n );\n\n // if can edit, the wrapper node should use the form element, else use the div element\n const wrapperNode = canEdit ? h('form', {}) : h('div', {});\n const wrapperProps = canEdit\n ? {\n onSubmit: handleUpdate,\n ...props,\n }\n : props;\n\n const submitButton = (\n <Button\n type=\"submit\"\n disabled={readOnly || !canEdit || !hasQuantityChanges}\n data-testid=\"product-list-table-submit-button\"\n >\n {dictionary.updateButton}\n </Button>\n );\n\n return (\n <VComponent\n node={wrapperNode}\n className={classes([\n 'quote-management-product-list-table-container',\n className,\n ])}\n data-testid=\"product-list-table-container\"\n {...wrapperProps}\n >\n {table}\n <div className=\"quote-management-product-list-table-container__submit-container\">\n {submitButton}\n </div>\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n \nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@/quote-management/components/QuotePricesSummary/QuotePricesSummary.css';\nimport { Accordion, AccordionSection } from '@adobe-commerce/elsie/components';\n\ninterface Entry {\n label: string;\n id: string;\n value: VNode;\n strong?: boolean;\n children?: Entry[];\n}\n\nexport interface QuotePricesSummaryProps extends HTMLAttributes<HTMLDivElement> {\n entries?: Entry[];\n}\n\nexport const QuotePricesSummary: FunctionComponent<QuotePricesSummaryProps> = ({\n className,\n entries,\n ...props\n}) => {\n const createEntry = (entry: Entry) => {\n const children = entry.children?.map(createEntry);\n return (\n <div key={entry.id} className=\"quote-management-quote-prices-summary__entry\" data-testid={`quote-prices-summary-entry-${entry.id}`}>\n {children ? <Accordion\n className=\"quote-management-quote-prices-summary__accordion\"\n data-testid={`quote-prices-summary-entry-accordion-${entry.id}`}\n >\n <AccordionSection className=\"quote-management-quote-prices-summary__accordion-section\" title={entry.label} ariaLabelTitle={entry.label} secondaryText={entry.value}>\n {children}\n </AccordionSection>\n </Accordion>\n :\n <>\n <span className={classes(['quote-management-quote-prices-summary__label', ['quote-management-quote-prices-summary__label--strong', entry.strong]])} data-testid={`quote-prices-summary-entry-label-${entry.id}`}>{entry.label}</span>\n <span className=\"quote-management-quote-prices-summary__value\" data-testid={`quote-prices-summary-entry-value-${entry.id}`}>{entry.value}</span>\n </>\n }\n </div>\n );\n };\n\n return (\n <div className={classes(['quote-management-quote-prices-summary', className])} data-testid=\"quote-prices-summary\" {...props}>\n {entries?.map(createEntry)}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport {\n HTMLAttributes,\n useCallback,\n useEffect,\n useState,\n} from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Button,\n TextArea,\n Input,\n Modal,\n Price,\n Table,\n} from '@adobe-commerce/elsie/components';\nimport { NegotiableQuoteCartItem } from '@/quote-management/data/models/negotiable-quote-model';\nimport '@/quote-management/components/LineItemNoteModal/LineItemNoteModal.css';\n\nexport interface LineItemNoteModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n open: boolean;\n item: NegotiableQuoteCartItem;\n onClose?: () => void;\n onConfirm: (note: string, quantity: number) => void;\n isSubmitting?: boolean;\n errorBanner?: VNode;\n successBanner?: VNode;\n showCloseButton?: boolean;\n readOnlyQuantity?: boolean;\n}\n\nexport const LineItemNoteModal: FunctionComponent<LineItemNoteModalProps> = ({\n className,\n open,\n item,\n onClose,\n onConfirm,\n isSubmitting = false,\n errorBanner,\n successBanner,\n showCloseButton = true,\n readOnlyQuantity = false,\n}) => {\n const [note, setNote] = useState('');\n const [quantity, setQuantity] = useState(item.quantity);\n const [errors, setErrors] = useState<{ note?: string; quantity?: string }>(\n {}\n );\n\n const dictionary = useText({\n title: 'NegotiableQuote.Manage.lineItemNote.title',\n productLabel: 'NegotiableQuote.Manage.lineItemNote.productLabel',\n skuLabel: 'NegotiableQuote.Manage.lineItemNote.skuLabel',\n priceLabel: 'NegotiableQuote.Manage.lineItemNote.priceLabel',\n stockLabel: 'NegotiableQuote.Manage.lineItemNote.stockLabel',\n quantityLabel: 'NegotiableQuote.Manage.lineItemNote.quantityLabel',\n discountLabel: 'NegotiableQuote.Manage.lineItemNote.discountLabel',\n subtotalLabel: 'NegotiableQuote.Manage.lineItemNote.subtotalLabel',\n noteLabel: 'NegotiableQuote.Manage.lineItemNote.noteLabel',\n notePlaceholder: 'NegotiableQuote.Manage.lineItemNote.notePlaceholder',\n noteHelper: 'NegotiableQuote.Manage.lineItemNote.noteHelper',\n confirmButton: 'NegotiableQuote.Manage.lineItemNote.confirmButton',\n cancelButton: 'NegotiableQuote.Manage.lineItemNote.cancelButton',\n noteError: 'NegotiableQuote.Manage.lineItemNote.noteError',\n quantityError: 'NegotiableQuote.Manage.lineItemNote.quantityError',\n });\n\n // Reset form when modal opens with new item\n useEffect(() => {\n if (open) {\n // Get the most recent valid note from buyer (if exists)\n const validNotes =\n item.noteFromBuyer?.filter((note) => note && note.note) || [];\n const existingNote = validNotes.length > 0 ? validNotes[0].note : '';\n setNote(existingNote || '');\n setQuantity(item.quantity);\n setErrors({});\n }\n }, [open, item.quantity, item.noteFromBuyer]);\n\n const handleConfirm = useCallback(() => {\n const newErrors: { note?: string; quantity?: string } = {};\n\n // Check if the note field is empty\n if (!note.trim()) {\n newErrors.note = dictionary.noteError;\n }\n\n // Only validate quantity if it's editable\n if (!readOnlyQuantity && quantity <= 0) {\n newErrors.quantity = dictionary.quantityError;\n }\n\n if (Object.keys(newErrors).length > 0) {\n setErrors(newErrors);\n return;\n }\n\n onConfirm(note.trim(), quantity);\n }, [note, quantity, onConfirm, dictionary, readOnlyQuantity]);\n\n const handleCancel = useCallback(() => {\n setNote('');\n setQuantity(item.quantity);\n setErrors({});\n onClose?.();\n }, [onClose, item.quantity]);\n\n if (!open) {\n return null;\n }\n\n // Calculate discount display\n const hasDiscount = item.discounts && item.discounts.length > 0;\n const discountDisplay = hasDiscount\n ? item.discounts.map((d) => d.label).join(', ')\n : '-';\n\n // Define table columns\n const columns = [\n {\n label: dictionary.productLabel,\n key: 'productName',\n },\n {\n label: dictionary.priceLabel,\n key: 'price',\n },\n {\n label: dictionary.stockLabel,\n key: 'stock',\n },\n {\n label: dictionary.quantityLabel,\n key: 'quantity',\n },\n {\n label: dictionary.discountLabel,\n key: 'discount',\n },\n {\n label: dictionary.subtotalLabel,\n key: 'subtotal',\n },\n ];\n\n // Define table row data\n const rowData = [\n {\n productName: (\n <div className=\"quote-management-line-item-note-modal__product-info\">\n <div className=\"quote-management-line-item-note-modal__product-name\">\n {item.product.name}\n </div>\n <div className=\"quote-management-line-item-note-modal__product-sku\">\n {dictionary.skuLabel}: {item.product.sku}\n </div>\n </div>\n ),\n price: (\n <Price\n amount={item.prices.originalItemPrice.value}\n currency={item.prices.originalItemPrice.currency}\n />\n ),\n stock: (\n <span className=\"quote-management-line-item-note-modal__stock\">\n {item.stockStatus}\n </span>\n ),\n quantity: readOnlyQuantity ? (\n <span className=\"quote-management-line-item-note-modal__quantity-readonly\">\n {item.quantity}\n </span>\n ) : (\n <Input\n name=\"quantity\"\n type=\"number\"\n min=\"1\"\n value={quantity.toString()}\n onInput={(e: any) => {\n const newQuantity = parseInt(e.target.value, 10) || 0;\n setQuantity(newQuantity);\n setErrors({ ...errors, quantity: undefined });\n }}\n disabled={isSubmitting}\n error={!!errors.quantity}\n required\n data-testid=\"line-item-note-quantity-input\"\n className=\"quote-management-line-item-note-modal__quantity-input\"\n />\n ),\n discount: (\n <span className=\"quote-management-line-item-note-modal__discount\">\n {discountDisplay}\n </span>\n ),\n subtotal: (\n <Price\n amount={item.prices.rowTotal.value}\n currency={item.prices.rowTotal.currency}\n />\n ),\n },\n ];\n\n return (\n <Modal\n open={open}\n size=\"medium\"\n title={<>{dictionary.title}</>}\n onClose={handleCancel}\n clickToDismiss={true}\n escapeToDismiss={true}\n showCloseButton={showCloseButton}\n className={classes(['quote-management-line-item-note-modal', className])}\n data-testid=\"line-item-note-modal\"\n >\n {errorBanner && (\n <div\n className=\"quote-management-line-item-note-modal__error-banner\"\n data-testid=\"line-item-note-modal-error-banner\"\n >\n {errorBanner}\n </div>\n )}\n\n {successBanner && (\n <div\n className=\"quote-management-line-item-note-modal__success-banner\"\n data-testid=\"line-item-note-modal-success-banner\"\n >\n {successBanner}\n </div>\n )}\n\n <div className=\"quote-management-line-item-note-modal__content\">\n {/* Product Details Table */}\n <div className=\"quote-management-line-item-note-modal__details\">\n <Table\n columns={columns}\n rowData={rowData}\n data-testid=\"line-item-note-table\"\n mobileLayout=\"stacked\"\n className=\"quote-management-line-item-note-modal__details-table\"\n />\n {errors.quantity && (\n <div className=\"quote-management-line-item-note-modal__table-error\">\n {errors.quantity}\n </div>\n )}\n </div>\n\n {/* Note TextArea */}\n <div className=\"quote-management-line-item-note-modal__form-field\">\n <TextArea\n name=\"note\"\n placeholder={dictionary.notePlaceholder}\n rows={4}\n value={note}\n onInput={(e: any) => {\n setNote(e.target.value);\n setErrors({ ...errors, note: undefined });\n }}\n label={dictionary.noteLabel}\n disabled={isSubmitting}\n data-testid=\"line-item-note-textarea\"\n />\n {!errors.note && (\n <span className=\"quote-management-line-item-note-modal__helper-text\">\n {dictionary.noteHelper}\n </span>\n )}\n {errors.note && (\n <span className=\"quote-management-line-item-note-modal__error-text\">\n {errors.note}\n </span>\n )}\n </div>\n </div>\n\n <div className=\"quote-management-line-item-note-modal__actions\">\n <Button\n variant=\"secondary\"\n size=\"medium\"\n onClick={handleCancel}\n disabled={isSubmitting}\n className=\"quote-management-line-item-note-modal__cancel-button\"\n data-testid=\"line-item-note-cancel-button\"\n >\n {dictionary.cancelButton}\n </Button>\n <Button\n variant=\"primary\"\n size=\"medium\"\n onClick={handleConfirm}\n disabled={isSubmitting}\n className=\"quote-management-line-item-note-modal__confirm-button\"\n data-testid=\"line-item-note-confirm-button\"\n >\n {dictionary.confirmButton}\n </Button>\n </div>\n </Modal>\n );\n};\n"],"names":["ItemsQuoted","className","loading","table","pricesSummary","props","ItemsQuotedSkeleton","jsxs","classes","jsx","VComponent","Skeleton","SkeletonRow","ProductListTable","items","canEdit","readOnly","showActions","onItemCheckboxChange","onItemDropdownChange","onQuantityChange","onUpdate","dropdownSelections","originalQuantities","setOriginalQuantities","useState","currentQuantities","setCurrentQuantities","useEffect","quantities","item","hasQuantityChanges","uid","dictionary","useText","columns","handleItemCheckboxChange","event","isSelected","handleItemDropdownChange","action","handleQuantityChange","newQuantity","prev","handleUpdate","discountElement","amountOff","percentOff","Price","getProductNameContent","configurableOptions","_a","option","bundleOptions","_b","value","formatNoteTimestamp","timestamp","getUserTimezone","getNotesContent","validNotes","note","index","rowData","quantityElement","Input","e","productRow","Checkbox","Picker","notes","Table","wrapperNode","h","wrapperProps","submitButton","Button","QuotePricesSummary","entries","createEntry","entry","children","Accordion","AccordionSection","Fragment","LineItemNoteModal","open","onClose","onConfirm","isSubmitting","errorBanner","successBanner","showCloseButton","readOnlyQuantity","setNote","quantity","setQuantity","errors","setErrors","existingNote","handleConfirm","useCallback","newErrors","handleCancel","discountDisplay","d","Modal","TextArea"],"mappings":"+qBAqBO,MAAMA,GAAmD,CAAC,CAC/D,UAAAC,EACA,QAAAC,EACA,MAAAC,EACA,cAAAC,EACA,GAAGC,CACL,IACMH,IACMI,GAAA,EAAoB,EAI5BC,EAAC,MAAA,CAAI,UAAWC,EAAQ,CAAC,gCAAiCP,CAAS,CAAC,EAAI,GAAGI,EACxE,SAAA,CAAAF,GACCM,EAACC,EAAA,CACC,KAAMP,EACN,UAAWK,EAAQ,CAAC,sCAAsC,CAAC,EAC3D,cAAY,sCAAA,CAAA,EAGfJ,GACCK,EAACC,EAAA,CACC,KA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