@dropins/storefront-quote-management 0.0.1-alpha3 → 0.0.1-alpha30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/api/acceptQuoteTemplate/acceptQuoteTemplate.d.ts +13 -0
  2. package/api/{getCustomerData/getCustomerData.d.ts → acceptQuoteTemplate/graphql/acceptQuoteTemplate.d.ts} +2 -2
  3. package/{data/transforms/__fixtures__/customerData.d.ts → api/acceptQuoteTemplate/index.d.ts} +2 -2
  4. package/api/addQuoteTemplateLineItemNote/addQuoteTemplateLineItemNote.d.ts +15 -0
  5. package/api/addQuoteTemplateLineItemNote/graphql/setQuoteTemplateLineItemNote.d.ts +10 -0
  6. package/api/addQuoteTemplateLineItemNote/index.d.ts +10 -0
  7. package/api/addQuoteTemplateShippingAddress/addQuoteTemplateShippingAddress.d.ts +37 -0
  8. package/api/addQuoteTemplateShippingAddress/graphql/setNegotiableQuoteTemplateShippingAddress.d.ts +10 -0
  9. package/api/addQuoteTemplateShippingAddress/index.d.ts +10 -0
  10. package/api/cancelQuoteTemplate/cancelQuoteTemplate.d.ts +14 -0
  11. package/api/cancelQuoteTemplate/graphql/cancelQuoteTemplate.d.ts +10 -0
  12. package/api/cancelQuoteTemplate/index.d.ts +10 -0
  13. package/api/closeNegotiableQuote/closeNegotiableQuote.d.ts +31 -0
  14. package/api/closeNegotiableQuote/graphql/CloseNegotiableQuoteMutation.d.ts +2 -0
  15. package/api/closeNegotiableQuote/index.d.ts +10 -0
  16. package/api/createQuoteTemplate/createQuoteTemplate.d.ts +4 -0
  17. package/api/createQuoteTemplate/graphql/createQuoteTemplate.d.ts +10 -0
  18. package/api/createQuoteTemplate/index.d.ts +10 -0
  19. package/api/deleteQuote/deleteQuote.d.ts +28 -0
  20. package/api/deleteQuote/graphql/DeleteQuoteMutation.d.ts +10 -0
  21. package/api/{getCustomerData → deleteQuote}/index.d.ts +1 -1
  22. package/{data/models/customer-model.d.ts → api/deleteQuoteTemplate/deleteQuoteTemplate.d.ts} +6 -8
  23. package/api/deleteQuoteTemplate/graphql/deleteQuoteTemplate.d.ts +10 -0
  24. package/api/deleteQuoteTemplate/index.d.ts +10 -0
  25. package/api/duplicateNegotiableQuote/duplicateNegotiableQuote.d.ts +8 -0
  26. package/api/duplicateNegotiableQuote/graphql/duplicateNegotiableQuoteMutation.d.ts +10 -0
  27. package/api/duplicateNegotiableQuote/index.d.ts +10 -0
  28. package/api/generateQuoteFromTemplate/generateQuoteFromTemplate.d.ts +15 -0
  29. package/api/generateQuoteFromTemplate/graphql/generateNegotiableQuoteFromTemplate.d.ts +10 -0
  30. package/api/generateQuoteFromTemplate/index.d.ts +10 -0
  31. package/api/getQuoteData/getQuoteData.d.ts +10 -0
  32. package/api/getQuoteData/graphql/QuoteDataQuery.d.ts +2 -0
  33. package/api/getQuoteData/index.d.ts +10 -0
  34. package/api/getQuoteTemplateData/getQuoteTemplateData.d.ts +4 -0
  35. package/api/getQuoteTemplateData/graphql/getQuoteTemplateData.d.ts +10 -0
  36. package/api/getQuoteTemplateData/index.d.ts +10 -0
  37. package/api/getQuoteTemplates/getQuoteTemplates.d.ts +34 -0
  38. package/api/getQuoteTemplates/graphql/getQuoteTemplates.d.ts +10 -0
  39. package/api/getQuoteTemplates/index.d.ts +10 -0
  40. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  41. package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +10 -0
  42. package/api/getStoreConfig/index.d.ts +10 -0
  43. package/api/graphql/NegotiableQuoteAddressFragment.d.ts +10 -0
  44. package/api/graphql/NegotiableQuoteFragment.d.ts +5 -13
  45. package/api/graphql/NegotiableQuoteListFragment.d.ts +10 -0
  46. package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +10 -0
  47. package/api/graphql/SearchResultPageInfoFragment.d.ts +10 -0
  48. package/api/graphql/ShippingMethodFragment.d.ts +10 -0
  49. package/api/graphql/SortFieldsFragment.d.ts +10 -0
  50. package/api/index.d.ts +34 -1
  51. package/api/initialize/initialize.d.ts +2 -0
  52. package/api/negotiableQuotes/graphql/NegotiableQuotesQuery.d.ts +10 -0
  53. package/api/negotiableQuotes/index.d.ts +10 -0
  54. package/api/negotiableQuotes/negotiableQuotes.d.ts +39 -0
  55. package/api/openQuoteTemplate/graphql/openQuoteTemplate.d.ts +10 -0
  56. package/api/openQuoteTemplate/index.d.ts +10 -0
  57. package/api/openQuoteTemplate/openQuoteTemplate.d.ts +13 -0
  58. package/api/removeNegotiableQuoteItems/graphql/RemoveNegotiableQuoteItemsMutation.d.ts +10 -0
  59. package/api/removeNegotiableQuoteItems/index.d.ts +10 -0
  60. package/api/removeNegotiableQuoteItems/removeNegotiableQuoteItems.d.ts +8 -0
  61. package/api/removeQuoteTemplateItems/graphql/removeNegotiableQuoteTemplateItems.d.ts +10 -0
  62. package/api/removeQuoteTemplateItems/index.d.ts +10 -0
  63. package/api/removeQuoteTemplateItems/removeQuoteTemplateItems.d.ts +14 -0
  64. package/api/renameNegotiableQuote/graphql/RenameNegotiableQuoteMutation.d.ts +10 -0
  65. package/api/renameNegotiableQuote/index.d.ts +10 -0
  66. package/api/renameNegotiableQuote/renameNegotiableQuote.d.ts +9 -0
  67. package/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.d.ts +4 -12
  68. package/api/requestNegotiableQuote/requestNegotiableQuote.d.ts +3 -0
  69. package/api/sendForReview/graphql/SendNegotiableQuoteForReviewMutation.d.ts +10 -0
  70. package/api/sendForReview/index.d.ts +10 -0
  71. package/api/sendForReview/sendForReview.d.ts +11 -0
  72. package/api/sendQuoteTemplateForReview/graphql/sendQuoteTemplateForReview.d.ts +10 -0
  73. package/api/sendQuoteTemplateForReview/index.d.ts +10 -0
  74. package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +22 -0
  75. package/api/setLineItemNote/graphql/SetLineItemNoteMutation.d.ts +10 -0
  76. package/api/setLineItemNote/index.d.ts +10 -0
  77. package/api/setLineItemNote/setLineItemNote.d.ts +10 -0
  78. package/api/setShippingAddress/graphql/SetNegotiableQuoteShippingAddressMutation.d.ts +10 -0
  79. package/api/setShippingAddress/index.d.ts +2 -0
  80. package/api/setShippingAddress/setShippingAddress.d.ts +110 -0
  81. package/api/updateQuantities/graphql/UpdateNegotiableQuoteQuantitiesMutation.d.ts +10 -0
  82. package/api/updateQuantities/index.d.ts +10 -0
  83. package/api/updateQuantities/updateQuantities.d.ts +36 -0
  84. package/api/updateQuoteTemplateItemQuantities/graphql/updateNegotiableQuoteTemplateQuantities.d.ts +10 -0
  85. package/api/updateQuoteTemplateItemQuantities/index.d.ts +10 -0
  86. package/api/updateQuoteTemplateItemQuantities/updateQuoteTemplateItemQuantities.d.ts +20 -0
  87. package/api/uploadFile/graphql/FinishUploadMutation.d.ts +10 -0
  88. package/api/uploadFile/graphql/InitiateUploadMutation.d.ts +10 -0
  89. package/api/uploadFile/index.d.ts +10 -0
  90. package/api/uploadFile/uploadFile.d.ts +12 -0
  91. package/api.js +56 -22
  92. package/api.js.map +1 -1
  93. package/chunks/AttachedFilesList.js +4 -0
  94. package/chunks/AttachedFilesList.js.map +1 -0
  95. package/chunks/ChevronDown.js +4 -0
  96. package/chunks/ChevronDown.js.map +1 -0
  97. package/chunks/ConfirmationModal.js +4 -0
  98. package/chunks/ConfirmationModal.js.map +1 -0
  99. package/chunks/ItemsQuoted.js +4 -0
  100. package/chunks/ItemsQuoted.js.map +1 -0
  101. package/chunks/ItemsQuotedTemplate.js +4 -0
  102. package/chunks/ItemsQuotedTemplate.js.map +1 -0
  103. package/chunks/LineItemNoteModal.js +4 -0
  104. package/chunks/LineItemNoteModal.js.map +1 -0
  105. package/chunks/NegotiableQuoteFragment.js +391 -0
  106. package/chunks/NegotiableQuoteFragment.js.map +1 -0
  107. package/chunks/NegotiableQuoteTemplateFragment.js +196 -0
  108. package/chunks/NegotiableQuoteTemplateFragment.js.map +1 -0
  109. package/chunks/OrderSummaryLine.js +4 -0
  110. package/chunks/OrderSummaryLine.js.map +1 -0
  111. package/chunks/QuoteCommentsList.js +4 -0
  112. package/chunks/QuoteCommentsList.js.map +1 -0
  113. package/chunks/QuoteCommentsList3.js +4 -0
  114. package/chunks/QuoteCommentsList3.js.map +1 -0
  115. package/chunks/QuoteHistoryLog.js +4 -0
  116. package/chunks/QuoteHistoryLog.js.map +1 -0
  117. package/chunks/QuoteHistoryLog3.js +4 -0
  118. package/chunks/QuoteHistoryLog3.js.map +1 -0
  119. package/chunks/QuoteTemplateCommentsList.js +4 -0
  120. package/chunks/QuoteTemplateCommentsList.js.map +1 -0
  121. package/chunks/QuoteTemplateHistoryLog.js +4 -0
  122. package/chunks/QuoteTemplateHistoryLog.js.map +1 -0
  123. package/chunks/RenameQuoteModal.js +4 -0
  124. package/chunks/RenameQuoteModal.js.map +1 -0
  125. package/chunks/ShippingAddressDisplay.js +4 -0
  126. package/chunks/ShippingAddressDisplay.js.map +1 -0
  127. package/chunks/WarningFilled.js +4 -0
  128. package/chunks/WarningFilled.js.map +1 -0
  129. package/chunks/addQuoteTemplateLineItemNote.js +33 -0
  130. package/chunks/addQuoteTemplateLineItemNote.js.map +1 -0
  131. package/chunks/dateUtils.js +4 -0
  132. package/chunks/dateUtils.js.map +1 -0
  133. package/chunks/duplicateNegotiableQuote.js +121 -0
  134. package/chunks/duplicateNegotiableQuote.js.map +1 -0
  135. package/chunks/generateQuoteFromTemplate.js +12 -0
  136. package/chunks/generateQuoteFromTemplate.js.map +1 -0
  137. package/chunks/getQuoteTemplates.js +50 -0
  138. package/chunks/getQuoteTemplates.js.map +1 -0
  139. package/chunks/negotiableQuotes.js +77 -0
  140. package/chunks/negotiableQuotes.js.map +1 -0
  141. package/chunks/openQuoteTemplate.js +51 -0
  142. package/chunks/openQuoteTemplate.js.map +1 -0
  143. package/chunks/requestNegotiableQuote.js +6 -53
  144. package/chunks/requestNegotiableQuote.js.map +1 -1
  145. package/chunks/setLineItemNote.js +47 -0
  146. package/chunks/setLineItemNote.js.map +1 -0
  147. package/chunks/state.js +4 -0
  148. package/chunks/state.js.map +1 -0
  149. package/chunks/transform-quote-template.js +4 -0
  150. package/chunks/transform-quote-template.js.map +1 -0
  151. package/chunks/transform-quote.js +4 -0
  152. package/chunks/transform-quote.js.map +1 -0
  153. package/chunks/uploadFile.js +20 -0
  154. package/chunks/uploadFile.js.map +1 -0
  155. package/components/ActionsBar/ActionsBar.d.ts +15 -0
  156. package/components/ActionsBar/index.d.ts +11 -0
  157. package/components/AttachedFilesList/AttachedFilesList.d.ts +16 -0
  158. package/components/AttachedFilesList/index.d.ts +11 -0
  159. package/components/ConfirmationModal/ConfirmationModal.d.ts +17 -0
  160. package/components/ConfirmationModal/index.d.ts +11 -0
  161. package/components/ItemsQuoted/ItemsQuoted.d.ts +11 -0
  162. package/components/ItemsQuoted/index.d.ts +11 -0
  163. package/components/LineItemNoteModal/LineItemNoteModal.d.ts +17 -0
  164. package/components/LineItemNoteModal/index.d.ts +11 -0
  165. package/components/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +22 -0
  166. package/components/ManageNegotiableQuote/__fixtures__/ManageNegotiableQuoteProps.d.ts +4 -0
  167. package/components/ManageNegotiableQuote/index.d.ts +11 -0
  168. package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +21 -0
  169. package/components/ManageNegotiableQuoteTemplate/__fixtures__/ManageNegotiableQuoteTemplateProps.d.ts +4 -0
  170. package/components/ManageNegotiableQuoteTemplate/index.d.ts +11 -0
  171. package/components/OrderSummary/OrderSummary.d.ts +48 -0
  172. package/components/OrderSummary/index.d.ts +11 -0
  173. package/components/OrderSummaryLine/OrderSummaryLine.d.ts +13 -0
  174. package/components/OrderSummaryLine/index.d.ts +11 -0
  175. package/components/ProductListTable/ProductListTable.d.ts +61 -0
  176. package/components/ProductListTable/index.d.ts +11 -0
  177. package/components/QuoteCommentsList/QuoteCommentsList.d.ts +17 -0
  178. package/components/QuoteCommentsList/index.d.ts +11 -0
  179. package/components/QuoteHistoryLog/QuoteHistoryLog.d.ts +77 -0
  180. package/components/QuoteHistoryLog/index.d.ts +11 -0
  181. package/components/QuotePricesSummary/QuotePricesSummary.d.ts +16 -0
  182. package/components/QuotePricesSummary/index.d.ts +11 -0
  183. package/components/QuoteSummaryList/QuoteSummaryList.d.ts +13 -0
  184. package/components/QuoteSummaryList/index.d.ts +11 -0
  185. package/components/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +29 -0
  186. package/components/QuoteTemplatesListTable/index.d.ts +10 -0
  187. package/components/QuotesListTable/QuotesListTable.d.ts +29 -0
  188. package/components/QuotesListTable/index.d.ts +11 -0
  189. package/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.d.ts +30 -0
  190. package/components/ReferenceDocumentFormModal/index.d.ts +11 -0
  191. package/components/ReferenceDocumentsList/ReferenceDocumentsList.d.ts +18 -0
  192. package/components/ReferenceDocumentsList/index.d.ts +11 -0
  193. package/components/RenameQuoteModal/RenameQuoteModal.d.ts +18 -0
  194. package/components/RenameQuoteModal/index.d.ts +11 -0
  195. package/components/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +1 -0
  196. package/components/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +12 -0
  197. package/components/ShippingAddressDisplay/index.d.ts +11 -0
  198. package/components/TabbedContent/TabbedContent.d.ts +10 -0
  199. package/components/TabbedContent/index.d.ts +11 -0
  200. package/components/index.d.ts +30 -0
  201. package/containers/ItemsQuoted/ItemsQuoted.d.ts +30 -0
  202. package/containers/ItemsQuoted/index.d.ts +11 -0
  203. package/containers/ItemsQuoted.d.ts +3 -0
  204. package/containers/ItemsQuoted.js +4 -0
  205. package/containers/ItemsQuoted.js.map +1 -0
  206. package/containers/ItemsQuotedTemplate/ItemsQuotedTemplate.d.ts +25 -0
  207. package/containers/ItemsQuotedTemplate/index.d.ts +11 -0
  208. package/containers/ItemsQuotedTemplate.d.ts +3 -0
  209. package/containers/ItemsQuotedTemplate.js +4 -0
  210. package/containers/ItemsQuotedTemplate.js.map +1 -0
  211. package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +91 -0
  212. package/containers/ManageNegotiableQuote/index.d.ts +11 -0
  213. package/containers/ManageNegotiableQuote.d.ts +3 -0
  214. package/containers/ManageNegotiableQuote.js +4 -0
  215. package/containers/ManageNegotiableQuote.js.map +1 -0
  216. package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +90 -0
  217. package/containers/ManageNegotiableQuoteTemplate/index.d.ts +11 -0
  218. package/containers/ManageNegotiableQuoteTemplate.d.ts +3 -0
  219. package/containers/ManageNegotiableQuoteTemplate.js +6 -0
  220. package/containers/ManageNegotiableQuoteTemplate.js.map +1 -0
  221. package/containers/OrderSummary/OrderSummary.d.ts +11 -0
  222. package/containers/OrderSummary/index.d.ts +11 -0
  223. package/containers/OrderSummary.d.ts +3 -0
  224. package/containers/OrderSummary.js +4 -0
  225. package/containers/OrderSummary.js.map +1 -0
  226. package/containers/OrderSummaryLine/OrderSummaryLine.d.ts +14 -0
  227. package/containers/OrderSummaryLine/index.d.ts +11 -0
  228. package/containers/OrderSummaryLine.d.ts +3 -0
  229. package/containers/OrderSummaryLine.js +4 -0
  230. package/containers/OrderSummaryLine.js.map +1 -0
  231. package/containers/QuoteCommentsList/QuoteCommentsList.d.ts +9 -0
  232. package/containers/QuoteCommentsList/index.d.ts +11 -0
  233. package/containers/QuoteCommentsList.d.ts +3 -0
  234. package/containers/QuoteCommentsList.js +4 -0
  235. package/containers/QuoteCommentsList.js.map +1 -0
  236. package/containers/QuoteHistoryLog/QuoteHistoryLog.d.ts +9 -0
  237. package/containers/QuoteHistoryLog/index.d.ts +11 -0
  238. package/containers/QuoteHistoryLog.d.ts +3 -0
  239. package/containers/QuoteHistoryLog.js +4 -0
  240. package/containers/QuoteHistoryLog.js.map +1 -0
  241. package/containers/QuoteSummaryList/QuoteSummaryList.d.ts +51 -0
  242. package/containers/QuoteSummaryList/index.d.ts +11 -0
  243. package/containers/QuoteSummaryList.d.ts +3 -0
  244. package/containers/QuoteSummaryList.js +4 -0
  245. package/containers/QuoteSummaryList.js.map +1 -0
  246. package/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.d.ts +9 -0
  247. package/containers/QuoteTemplateCommentsList/index.d.ts +11 -0
  248. package/containers/QuoteTemplateCommentsList.d.ts +3 -0
  249. package/containers/QuoteTemplateCommentsList.js +4 -0
  250. package/containers/QuoteTemplateCommentsList.js.map +1 -0
  251. package/containers/QuoteTemplateHistoryLog/QuoteTemplateHistoryLog.d.ts +9 -0
  252. package/containers/QuoteTemplateHistoryLog/index.d.ts +11 -0
  253. package/containers/QuoteTemplateHistoryLog.d.ts +3 -0
  254. package/containers/QuoteTemplateHistoryLog.js +4 -0
  255. package/containers/QuoteTemplateHistoryLog.js.map +1 -0
  256. package/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +74 -0
  257. package/containers/QuoteTemplatesListTable/index.d.ts +11 -0
  258. package/containers/QuoteTemplatesListTable.d.ts +3 -0
  259. package/containers/QuoteTemplatesListTable.js +4 -0
  260. package/containers/QuoteTemplatesListTable.js.map +1 -0
  261. package/containers/QuotesListTable/QuotesListTable.d.ts +72 -0
  262. package/containers/QuotesListTable/index.d.ts +11 -0
  263. package/containers/QuotesListTable.d.ts +3 -0
  264. package/containers/QuotesListTable.js +4 -0
  265. package/containers/QuotesListTable.js.map +1 -0
  266. package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +10 -0
  267. package/containers/RequestNegotiableQuoteForm.js +1 -1
  268. package/containers/RequestNegotiableQuoteForm.js.map +1 -1
  269. package/containers/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +10 -0
  270. package/containers/ShippingAddressDisplay/index.d.ts +11 -0
  271. package/containers/ShippingAddressDisplay.d.ts +1 -0
  272. package/containers/ShippingAddressDisplay.js +4 -0
  273. package/containers/ShippingAddressDisplay.js.map +1 -0
  274. package/containers/index.d.ts +22 -0
  275. package/data/models/__fixtures__/negotiableQuoteModel.d.ts +8 -0
  276. package/data/models/__fixtures__/negotiableQuoteTemplateModel.d.ts +4 -0
  277. package/data/models/__fixtures__/negotiableQuoteTemplatesListModel.d.ts +5 -0
  278. package/data/models/__fixtures__/negotiableQuotesListModel.d.ts +5 -0
  279. package/data/models/__fixtures__/storeConfigModel.d.ts +5 -0
  280. package/data/models/index.d.ts +11 -1
  281. package/data/models/negotiable-quote-model.d.ts +266 -27
  282. package/data/models/negotiable-quote-template-model.d.ts +148 -0
  283. package/data/models/store-config-model.d.ts +27 -0
  284. package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +665 -2
  285. package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +1665 -0
  286. package/data/transforms/__fixtures__/storeConfigData.d.ts +31 -0
  287. package/data/transforms/index.d.ts +6 -13
  288. package/data/transforms/transform-quote-template.d.ts +5 -0
  289. package/data/transforms/transform-quote.d.ts +13 -2
  290. package/data/transforms/transform-store-config.d.ts +4 -0
  291. package/hooks/useItemsQuotedTemplate.d.ts +16 -0
  292. package/hooks/useQuoteSummaryData.d.ts +10 -0
  293. package/hooks/useReferenceDocumentLinks.d.ts +34 -0
  294. package/hooks/useRemoveTemplateItems.d.ts +25 -0
  295. package/hooks/useRenameTemplate.d.ts +71 -0
  296. package/hooks/useUpdateTemplateQuantities.d.ts +27 -0
  297. package/i18n/en_US.json.d.ts +438 -1
  298. package/lib/configurationTransformers.d.ts +27 -0
  299. package/lib/itemFormatters.d.ts +47 -0
  300. package/lib/priceCalculators.d.ts +41 -0
  301. package/lib/state.d.ts +6 -0
  302. package/package.json +1 -1
  303. package/render.js +6 -2
  304. package/render.js.map +1 -1
  305. package/types/state.types.d.ts +13 -0
  306. package/utils/dateUtils.d.ts +26 -0
  307. package/utils/fileUtils.d.ts +46 -0
  308. package/utils/mapAuthPermissions.d.ts +39 -0
  309. package/api/getCustomerData/graphql/CustomerQuery.d.ts +0 -2
  310. package/api/graphql/CustomerFragment.d.ts +0 -2
  311. package/data/models/__fixtures__/customerModel.d.ts +0 -4
  312. package/data/transforms/transform-customer.d.ts +0 -15
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{Q as f,Q as u}from"../chunks/QuoteCommentsList3.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"../chunks/QuoteCommentsList.js";import"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/i18n.js";import"@dropins/tools/event-bus.js";import"../chunks/dateUtils.js";export{f as QuoteCommentsList,u as default};
4
+ //# sourceMappingURL=QuoteCommentsList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteCommentsList.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
4
+
5
+ export interface QuoteHistoryLogProps extends HTMLAttributes<HTMLDivElement> {
6
+ quoteData?: NegotiableQuoteModel;
7
+ }
8
+ export declare const QuoteHistoryLog: Container<QuoteHistoryLogProps>;
9
+ //# sourceMappingURL=QuoteHistoryLog.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuoteHistoryLog';
10
+ export { QuoteHistoryLog as default } from './QuoteHistoryLog';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './QuoteHistoryLog/index'
2
+ import _default from './QuoteHistoryLog/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{Q as f,Q as u}from"../chunks/QuoteHistoryLog3.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/event-bus.js";import"../chunks/QuoteHistoryLog.js";import"@dropins/tools/lib.js";import"../chunks/dateUtils.js";/* empty css */import"@dropins/tools/i18n.js";export{f as QuoteHistoryLog,u as default};
4
+ //# sourceMappingURL=QuoteHistoryLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteHistoryLog.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { ImageProps } from '@dropins/tools/types/elsie/src/components';
3
+ import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
4
+ import { NegotiableQuoteCartItem as NegotiableQuoteItemModel } from '../../data/models';
5
+
6
+ export interface QuoteSummaryListProps extends HTMLAttributes<HTMLDivElement> {
7
+ hideHeading?: boolean;
8
+ hideFooter?: boolean;
9
+ routeProduct?: (item: NegotiableQuoteItemModel) => string;
10
+ showMaxItems?: boolean;
11
+ attributesToHide?: SwitchableAttributes[];
12
+ slots?: {
13
+ Heading?: SlotProps<{
14
+ count: number;
15
+ quoteId: string;
16
+ }>;
17
+ Footer?: SlotProps<{
18
+ item: NegotiableQuoteItemModel;
19
+ }>;
20
+ Thumbnail?: SlotProps<{
21
+ item: NegotiableQuoteItemModel;
22
+ defaultImageProps: ImageProps;
23
+ }>;
24
+ ProductAttributes?: SlotProps<{
25
+ item: NegotiableQuoteItemModel;
26
+ }>;
27
+ QuoteSummaryFooter?: SlotProps<{
28
+ displayMaxItems: boolean;
29
+ }>;
30
+ QuoteItem?: SlotProps;
31
+ ItemTitle?: SlotProps<{
32
+ item: NegotiableQuoteItemModel;
33
+ }>;
34
+ ItemPrice?: SlotProps<{
35
+ item: NegotiableQuoteItemModel;
36
+ }>;
37
+ ItemTotal?: SlotProps<{
38
+ item: NegotiableQuoteItemModel;
39
+ }>;
40
+ ItemSku?: SlotProps<{
41
+ item: NegotiableQuoteItemModel;
42
+ }>;
43
+ };
44
+ accordion?: boolean;
45
+ variant?: 'primary' | 'secondary';
46
+ showDiscount?: boolean;
47
+ showSavings?: boolean;
48
+ }
49
+ export type SwitchableAttributes = 'name' | 'image' | 'configurations' | 'warning' | 'alert' | 'sku' | 'price' | 'quantity' | 'total' | 'totalDiscount' | 'totalExcludingTax';
50
+ export declare const QuoteSummaryList: Container<QuoteSummaryListProps>;
51
+ //# sourceMappingURL=QuoteSummaryList.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuoteSummaryList';
10
+ export { QuoteSummaryList as default } from './QuoteSummaryList';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './QuoteSummaryList/index'
2
+ import _default from './QuoteSummaryList/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{jsx as i,jsxs as _,Fragment as C}from"@dropins/tools/preact-jsx-runtime.js";import*as Q from"@dropins/tools/preact-compat.js";import{useState as N,useEffect as oe,useCallback as ce}from"@dropins/tools/preact-compat.js";import{Divider as j,Skeleton as ue,SkeletonRow as le,Price as q,Image as se,Button as de,CartList as me,Accordion as ge,AccordionSection as ye,CartItem as he}from"@dropins/tools/components.js";import{classes as v,VComponent as A,Slot as s}from"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";/* empty css *//* empty css */import{Q as b,s as fe}from"../chunks/state.js";import{events as pe}from"@dropins/tools/event-bus.js";import{S as ve}from"../chunks/ChevronDown.js";import{useText as _e}from"@dropins/tools/i18n.js";const be=e=>Q.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},Q.createElement("g",{id:"Large"},Q.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),Q.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},Q.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),F=({className:e,children:n,heading:t,footer:a,products:o,outOfStockMessage:r,loading:l=!0,variant:d="primary",...m})=>i("div",{...m,className:v(["quote-management-quote-summary-list",e,`quote-management-quote-summary-list__background--${d}`]),children:l?i(xe,{}):_(C,{children:[(t||r)&&_("div",{"data-testid":"quote-summary-list-heading-wrapper",className:v(["quote-management-quote-summary-list__heading",["quote-management-quote-summary-list__heading--full-width",!o]]),children:[t&&_(C,{children:[i(A,{node:t,className:"quote-management-quote-summary-list__heading-text"}),i(j,{variant:"primary",className:v(["quote-management-quote-summary-list__heading-divider"])})]}),r&&i(A,{node:r,className:"quote-management-quote-summary-list__out-of-stock-message"})]}),i("div",{className:v(["quote-management-quote-summary-list__content"]),children:o}),a&&_(C,{children:[i(j,{variant:"primary",className:v(["quote-management-quote-summary-list__footer-divider"])}),i(A,{node:a,className:"quote-management-quote-summary-list__footer-text"})]})]})}),xe=()=>i(ue,{"data-testid":"quote-summary-list-skeleton",className:"quote-management-quote-summary-list__skeleton",rowGap:"medium",children:i(le,{variant:"row",size:"xlarge",fullWidth:!0,lines:3,multilineGap:"small"})}),Ie=()=>{const[e,n]=N(void 0),[t,a]=N(!0);return oe(()=>{const o=pe.on("quote-management/quote-data",r=>{const{quote:l}=r;l&&(n(l),a(!1))},{eager:!0});return()=>o==null?void 0:o.off()},[]),{quoteData:e,loading:t}},B=(e,n)=>{var t;return((t=n.quoteDisplaySettings)==null?void 0:t.price)===b.TAX_INCLUDED?e.discounted?{amount:e.prices.regularPrice.value,currency:e.prices.regularPrice.currency,style:{font:"inherit"},"data-testid":"including-tax-item-price"}:{amount:e.prices.priceIncludingTax.value,currency:e.prices.priceIncludingTax.currency,style:{font:"inherit"},"data-testid":"including-tax-item-price"}:{amount:e.prices.regularPrice.value,currency:e.prices.regularPrice.currency,style:{font:"inherit"},"data-testid":"regular-item-price"}},z=e=>{var n,t;return{amount:(n=e.savingsAmount)==null?void 0:n.value,currency:(t=e.savingsAmount)==null?void 0:t.currency,style:{font:"inherit"},"data-testid":"item-savings-amount"}},G=(e,n)=>{var o,r,l,d,m,x,I,E,c,f,p,P;const t={"aria-label":n.dictionary.regularPrice},a=e.discounted?{}:null;return((o=n.quoteDisplaySettings)==null?void 0:o.price)===b.TAX_INCLUDED||((r=n.quoteDisplaySettings)==null?void 0:r.price)===b.TAX_INCLUDED_AND_EXCLUDED?(t.amount=(l=e.prices.rowTotalIncludingTax)==null?void 0:l.value,t.currency=(d=e.prices.rowTotalIncludingTax)==null?void 0:d.currency,t.variant=e.discounted?"strikethrough":"default",t["data-testid"]="including-tax-item-total",a&&(t.amount=(m=e.prices.originalRowTotal)==null?void 0:m.value,t.currency=(x=e.prices.originalRowTotal)==null?void 0:x.currency,a.amount=(I=e.prices.rowTotalIncludingTax)==null?void 0:I.value,a.currency=(E=e.prices.rowTotalIncludingTax)==null?void 0:E.currency,a.sale=!0,a["aria-label"]=n.dictionary.discountedPrice,a["data-testid"]="discount-total")):(t.amount=(c=e.prices.originalRowTotal)==null?void 0:c.value,t.currency=(f=e.prices.originalRowTotal)==null?void 0:f.currency,t.variant=e.discounted?"strikethrough":"default",t["data-testid"]="regular-item-total",a&&(a.amount=(p=e.discountedTotal)==null?void 0:p.value,a.currency=(P=e.discountedTotal)==null?void 0:P.currency,a.sale=!0,a["aria-label"]=n.dictionary.discountedPrice,a["data-testid"]="discount-total")),{totalProps:t,discountProps:a}},Te=e=>{const n=e==null?void 0:e.map(a=>({label:a.label,value:a.values.map(o=>o.label).join(", ")})),t={};return n==null||n.forEach(a=>{t[a.label]=a.value}),Object.keys(t).length>0?t:null},Se=e=>{const n=e==null?void 0:e.map(a=>({label:a.optionLabel,value:a.valueLabel})),t={};return n==null||n.forEach(a=>{t[a.label]=a.value}),Object.keys(t).length>0?t:null},Qe=e=>{const n=e==null?void 0:e.map(a=>({label:a.label,type:a.type,values:a.values.map(o=>({label:o.label,value:o.value}))})),t={};return n==null||n.forEach(a=>{var o;switch(a.type){case"field":case"area":case"date_time":t[a.label]=a.values[0].value;break;case"radio":case"drop_down":t[a.label]=a.values[0].label;break;case"multiple":case"checkbox":t[a.label]=a.values.reduce((r,l)=>r?`${r}, ${l.label}`:l.label,"");break;case"file":{const r=new DOMParser,l=a.values[0].value,m=((o=r.parseFromString(l,"text/html").querySelector("a"))==null?void 0:o.textContent)||"";t[a.label]=m;break}}}),t},qe=4,V=(e,n,t)=>{var r;if(t.attributesToHide.includes("image"))return;const a={loading:n<qe?"eager":"lazy",src:e.image.src,alt:e.image.alt,width:"300",height:"300",params:{width:300}},o=i(se,{"data-testid":"quote-summary-list-item-image",...a});return i(s,{name:"Thumbnail",slot:(r=t.slots)==null?void 0:r.Thumbnail,context:{item:e,defaultImageProps:a},children:t.routeProduct?i("a",{href:t.routeProduct(e),children:o}):o})},W=(e,n)=>{if(!n.attributesToHide.includes("name"))return i("span",{"data-testid":"quote-summary-list-item-title",children:n.routeProduct?i("a",{href:n.routeProduct(e),children:e.product.name}):e.product.name})},Y=e=>i("span",{"data-testid":"quote-summary-list-item-sku",children:e.product.sku}),H=(e,n)=>{var t;return i(s,{name:"ProductAttributes",slot:(t=n.slots)==null?void 0:t.ProductAttributes,context:{item:e}})},J=(e,n)=>{if(n.attributesToHide.includes("configurations"))return;const t={...Te(e.bundleOptions),...Se(e.configurableOptions),...Qe(e.customizableOptions),...e.links&&e.links.count?e.links.count>1?{[n.dictionary.files.replace("{count}",e.links.count.toString())]:e.links.result}:{[n.dictionary.file.replace("{count}",e.links.count.toString())]:e.links.result}:null};if(Object.keys(t).length!==0)return t},K=(e,n)=>{var t;return((t=n.quoteDisplaySettings)==null?void 0:t.price)===b.TAX_INCLUDED_AND_EXCLUDED?i(q,{amount:e.prices.rowTotal.value,currency:e.prices.rowTotal.currency,"data-testid":"excluding-tax-total","aria-label":n.dictionary.regularPrice}):void 0},Xe=({hideHeading:e,hideFooter:n,routeProduct:t,showMaxItems:a=!0,attributesToHide:o=[],slots:r,accordion:l=!1,variant:d="primary",showDiscount:m,showSavings:x,...I})=>{const{quoteData:c,loading:f}=Ie(),[p,P]=N(a),{quoteDisplaySettings:g,quoteSummaryMaxItems:Z}=fe.config,w=Z||5,y=_e({discountedPrice:"NegotiableQuote.QuoteSummaryList.discountedPrice",discountPercentage:"NegotiableQuote.QuoteSummaryList.discountPercentage",editQuote:"NegotiableQuote.QuoteSummaryList.editQuote",file:"NegotiableQuote.QuoteSummaryList.file",files:"NegotiableQuote.QuoteSummaryList.files",heading:"NegotiableQuote.QuoteSummaryList.heading",listOfQuoteItems:"NegotiableQuote.QuoteSummaryList.listOfQuoteItems",regularPrice:"NegotiableQuote.QuoteSummaryList.regularPrice",savingsAmount:"NegotiableQuote.QuoteSummaryList.savingsAmount",viewMore:"NegotiableQuote.QuoteSummaryList.viewMore"}),ee=ce(()=>{P(h=>!h)},[]),T={attributesToHide:o,routeProduct:t,slots:r,dictionary:y,quoteDisplaySettings:g},L={dictionary:y,quoteDisplaySettings:g},O=h=>i(s,{name:"Footer",slot:r==null?void 0:r.Footer,context:{item:h}}),te=h=>c!=null&&c.totalQuantity?c.items.filter(h).map((u,X)=>{const{totalProps:ne,discountProps:$}=G(u,L),ie=i(he,{loading:f,"data-testid":`quote-summary-list-item-entry-${u.uid}`,image:V(u,X,T),title:i(s,{name:"ItemTitle",slot:r==null?void 0:r.ItemTitle,context:{item:u},children:W(u,T)}),sku:o.includes("sku")?void 0:i(s,{name:"ItemSku",slot:r==null?void 0:r.ItemSku,context:{item:u},children:Y(u)}),price:o.includes("price")?void 0:i(s,{name:"ItemPrice",slot:r==null?void 0:r.ItemPrice,context:{item:u},slotTag:"span",children:i(q,{...B(u,L)})}),quantity:o.includes("quantity")?void 0:u.quantity,total:_(C,{children:[o.includes("total")?void 0:i(s,{name:"ItemTotal",slot:r==null?void 0:r.ItemTotal,context:{item:u},children:i(q,{...ne})}),o.includes("totalDiscount")?void 0:$&&i(s,{name:"ItemTotal",slot:r==null?void 0:r.ItemTotal,context:{item:u},children:i(q,{...$})})]}),attributes:H(u,T),configurations:J(u,T),totalExcludingTax:o.includes("totalExcludingTax")?void 0:K(u,T),taxIncluded:(g==null?void 0:g.price)===b.TAX_INCLUDED,taxExcluded:!o.includes("totalExcludingTax")&&(g==null?void 0:g.price)===b.TAX_INCLUDED_AND_EXCLUDED,discount:m&&u.discounted&&u.discountPercentage!==void 0?i("div",{"data-testid":"item-discount-percentage",children:y.discountPercentage.replace("{discount}",u.discountPercentage.toString())}):void 0,savings:x&&u.discounted&&u.savingsAmount!==void 0?_("div",{children:[i("span",{children:i(q,{...z(u)})})," ",y.savingsAmount]}):void 0,footer:O(u)},u.uid);return i(s,{name:"CartItem",slot:r==null?void 0:r.QuoteItem,context:{item:u,index:X,loading:f,attributesToHide:o,quoteDisplaySettings:g,showDiscount:m,showSavings:x,dictionary:y,getImage:V,getTitle:W,getSku:Y,getPriceProps:B,getTotalPriceProps:G,getProductAttributes:H,getConfigurations:J,getTotalExcludingTax:K,getFooter:O,getSavingsAmount:z},children:ie},u.uid)}):null,M=i(s,{name:"Heading",slot:r==null?void 0:r.Heading,context:{count:(c==null?void 0:c.totalQuantity)??0,quoteId:c==null?void 0:c.uid},children:i("div",{"data-testid":"default-quote-summary-list-heading",children:y.heading.replace("({count})",c!=null&&c.totalQuantity?`(${c==null?void 0:c.totalQuantity.toString()})`:"")})}),D=M.props.children.props.children,k=te(h=>!h.outOfStock&&!h.insufficientQuantity),S=(c==null?void 0:c.items.length)||0,ae=p?Math.min(S,w):S,re=S>ae,R=c!=null&&c.totalQuantity&&k?i(s,{name:"Footer",slot:r==null?void 0:r.QuoteSummaryFooter,context:{displayMaxItems:p},"data-testid":"quote-summary-list-footer-slot",className:"quote-management-quote-summary-list-footer",children:re?i(de,{className:"quote-management-quote-summary-list-footer__action",onClick:ee,"data-testid":"view-more-items-button",variant:"tertiary",children:y.viewMore}):null}):null,U=c!=null&&c.totalQuantity?i(me,{"data-testid":"quote-summary-list",children:k==null?void 0:k.slice(0,p?Math.min(S,w):S)}):null;return l?i(ge,{"data-testid":"quote-summary-list-accordion",className:v(["quote-management-quote-summary-list-accordion",`quote-management-quote-summary-list__background--${d}`]),iconOpen:be,iconClose:ve,children:i(ye,{title:D,ariaLabelTitle:D,"data-testid":"quote-summary-list-accordion__section",open:!0,renderContentWhenClosed:!0,children:i(F,{...I,"aria-expanded":!0,"aria-label":y.listOfQuoteItems,className:"quote-management-quote-summary-list-accordion__list",footer:n?void 0:R,products:U,outOfStockMessage:void 0,loading:f,variant:d})})}):i(F,{...I,heading:e?void 0:M,footer:n?void 0:R,products:U,outOfStockMessage:void 0,loading:f,variant:d})};export{Xe as QuoteSummaryList,Xe as default};
4
+ //# sourceMappingURL=QuoteSummaryList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteSummaryList.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/ChevronRight.svg","/@dropins/storefront-quote-management/src/components/QuoteSummaryList/QuoteSummaryList.tsx","/@dropins/storefront-quote-management/src/hooks/useQuoteSummaryData.ts","/@dropins/storefront-quote-management/src/lib/priceCalculators.ts","/@dropins/storefront-quote-management/src/lib/configurationTransformers.ts","/@dropins/storefront-quote-management/src/lib/itemFormatters.tsx","/@dropins/storefront-quote-management/src/containers/QuoteSummaryList/QuoteSummaryList.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgChevronRight = (props) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"Icon_Chevron_right_Base\", \"data-name\": \"Icon \\\\u2013 Chevron right \\\\u2013 Base\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Large\" }, /* @__PURE__ */ React.createElement(\"rect\", { id: \"Placement_area\", \"data-name\": \"Placement area\", width: 24, height: 24, fill: \"#fff\", opacity: 0 }), /* @__PURE__ */ React.createElement(\"g\", { id: \"Chevron_right_icon\", \"data-name\": \"Chevron right icon\" }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", id: \"chevron\", d: \"M199.75,367.5l4.255,-4.255-4.255,-4.255\", transform: \"translate(-189.25 -351.0)\", fill: \"none\", stroke: \"currentColor\" }))));\nexport default SvgChevronRight;\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, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Divider,\n Skeleton,\n SkeletonRow,\n} from '@adobe-commerce/elsie/components';\nimport '@/quote-management/components/QuoteSummaryList/QuoteSummaryList.css';\n\nexport interface QuoteSummaryListProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n heading?: VNode | null;\n footer?: VNode | null;\n products?: VNode | null;\n outOfStockMessage?: VNode | null;\n loading?: boolean;\n variant?: 'primary' | 'secondary';\n}\n\nexport const QuoteSummaryList: FunctionComponent<QuoteSummaryListProps> = ({\n className,\n children,\n heading,\n footer,\n products,\n outOfStockMessage,\n loading = true,\n variant = 'primary',\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes([\n 'quote-management-quote-summary-list',\n className,\n `quote-management-quote-summary-list__background--${variant}`,\n ])}\n >\n {loading ? (\n <QuoteSummaryListSkeleton />\n ) : (\n <>\n {(heading || outOfStockMessage) && (\n <div\n data-testid=\"quote-summary-list-heading-wrapper\"\n className={classes([\n 'quote-management-quote-summary-list__heading',\n [\n 'quote-management-quote-summary-list__heading--full-width',\n !products,\n ],\n ])}\n >\n {heading && (\n <>\n <VComponent\n node={heading}\n className=\"quote-management-quote-summary-list__heading-text\"\n />\n <Divider\n variant=\"primary\"\n className={classes([\n 'quote-management-quote-summary-list__heading-divider',\n ])}\n />\n </>\n )}\n\n {outOfStockMessage && (\n <VComponent\n node={outOfStockMessage}\n className=\"quote-management-quote-summary-list__out-of-stock-message\"\n />\n )}\n </div>\n )}\n <div\n className={classes([\n 'quote-management-quote-summary-list__content',\n ])}\n >\n {products}\n </div>\n\n {footer && (\n <>\n <Divider\n variant=\"primary\"\n className={classes([\n 'quote-management-quote-summary-list__footer-divider',\n ])}\n />\n <VComponent\n node={footer}\n className=\"quote-management-quote-summary-list__footer-text\"\n />\n </>\n )}\n </>\n )}\n </div>\n );\n};\n\nconst QuoteSummaryListSkeleton: FunctionComponent = () => {\n return (\n <Skeleton\n data-testid=\"quote-summary-list-skeleton\"\n className=\"quote-management-quote-summary-list__skeleton\"\n rowGap=\"medium\"\n >\n <SkeletonRow\n variant=\"row\"\n size=\"xlarge\"\n fullWidth={true}\n lines={3}\n multilineGap=\"small\"\n />\n </Skeleton>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { useEffect, useState } from 'preact/compat';\nimport { events } from '@adobe-commerce/event-bus';\nimport { NegotiableQuoteModel } from '@/quote-management/data/models';\n\n/**\n * Custom hook to manage quote summary data and loading state\n */\nexport const useQuoteSummaryData = () => {\n const [quoteData, setQuoteData] = useState<NegotiableQuoteModel | undefined>(\n undefined\n );\n const [loading, setLoading] = useState<boolean>(true);\n\n useEffect(() => {\n const quoteDataEvent = events.on(\n 'quote-management/quote-data',\n (payload: { quote: NegotiableQuoteModel }) => {\n const { quote } = payload;\n if (quote) {\n setQuoteData(quote);\n setLoading(false);\n }\n },\n {\n eager: true,\n }\n );\n return () => quoteDataEvent?.off();\n }, []);\n\n return {\n quoteData,\n loading,\n };\n};\n\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { PriceProps } from '@adobe-commerce/elsie/components';\nimport {\n NegotiableQuoteCartItem as NegotiableQuoteItemModel,\n QuoteDisplayAmount,\n StoreConfigModel,\n} from '@/quote-management/data/models';\n\nexport interface PriceCalculatorOptions {\n dictionary: Record<string, string>;\n quoteDisplaySettings?: StoreConfigModel['quoteDisplaySettings'];\n}\n\n/**\n * Get price props for an item\n */\nexport const getPriceProps = (\n item: NegotiableQuoteItemModel,\n options: PriceCalculatorOptions\n) => {\n return options.quoteDisplaySettings?.price === QuoteDisplayAmount.TAX_INCLUDED\n ? item.discounted\n ? {\n amount: item.prices.regularPrice.value,\n currency: item.prices.regularPrice.currency,\n style: { font: 'inherit' },\n 'data-testid': 'including-tax-item-price',\n }\n : {\n amount: item.prices.priceIncludingTax.value,\n currency: item.prices.priceIncludingTax.currency,\n style: { font: 'inherit' },\n 'data-testid': 'including-tax-item-price',\n }\n : {\n amount: item.prices.regularPrice.value,\n currency: item.prices.regularPrice.currency,\n style: { font: 'inherit' },\n 'data-testid': 'regular-item-price',\n };\n};\n\n/**\n * Get savings amount props for an item\n */\nexport const getSavingsAmount = (item: NegotiableQuoteItemModel) => {\n return {\n amount: item.savingsAmount?.value,\n currency: item.savingsAmount?.currency,\n style: { font: 'inherit' },\n 'data-testid': 'item-savings-amount',\n };\n};\n\n/**\n * Calculate total price props and discount props for an item\n */\nexport const getTotalPriceProps = (\n item: NegotiableQuoteItemModel,\n options: PriceCalculatorOptions\n) => {\n const totalProps: PriceProps & { 'data-testid'?: string } = {\n 'aria-label': options.dictionary.regularPrice,\n };\n const discountProps: (PriceProps & { 'data-testid'?: string }) | null =\n item.discounted ? {} : null;\n\n if (\n options.quoteDisplaySettings?.price === QuoteDisplayAmount.TAX_INCLUDED ||\n options.quoteDisplaySettings?.price ===\n QuoteDisplayAmount.TAX_INCLUDED_AND_EXCLUDED\n ) {\n totalProps['amount'] = item.prices.rowTotalIncludingTax?.value;\n totalProps['currency'] = item.prices.rowTotalIncludingTax?.currency;\n totalProps['variant'] = item.discounted ? 'strikethrough' : 'default';\n totalProps['data-testid'] = 'including-tax-item-total';\n\n if (discountProps) {\n totalProps['amount'] = item.prices.originalRowTotal?.value;\n totalProps['currency'] = item.prices.originalRowTotal?.currency;\n\n discountProps['amount'] = item.prices.rowTotalIncludingTax?.value;\n discountProps['currency'] = item.prices.rowTotalIncludingTax?.currency;\n discountProps['sale'] = true;\n discountProps['aria-label'] = options.dictionary.discountedPrice;\n discountProps['data-testid'] = 'discount-total';\n }\n } else {\n totalProps['amount'] = item.prices.originalRowTotal?.value;\n totalProps['currency'] = item.prices.originalRowTotal?.currency;\n totalProps['variant'] = item.discounted ? 'strikethrough' : 'default';\n totalProps['data-testid'] = 'regular-item-total';\n\n if (discountProps) {\n discountProps['amount'] = item.discountedTotal?.value;\n discountProps['currency'] = item.discountedTotal?.currency;\n discountProps['sale'] = true;\n discountProps['aria-label'] = options.dictionary.discountedPrice;\n discountProps['data-testid'] = 'discount-total';\n }\n }\n\n return {\n totalProps,\n discountProps,\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\n/**\n * Helper function to transform bundle options data to be ready for a CartItem SDK component\n */\nexport const transformBundleOptions = (data: any) => {\n const bundle = data?.map((option: any) => ({\n label: option.label,\n value: option.values.map((value: any) => value.label).join(', '),\n }));\n\n const bundleOptions: { [key: string]: any } = {};\n\n bundle?.forEach((option: any) => {\n bundleOptions[option.label] = option.value;\n });\n\n return Object.keys(bundleOptions).length > 0 ? bundleOptions : null;\n};\n\n/**\n * Helper function to transform configurable options data to be ready for a CartItem SDK component\n */\nexport const transformConfigurableOptions = (data: any) => {\n const configurable = data?.map((option: any) => ({\n label: option.optionLabel,\n value: option.valueLabel,\n }));\n\n const configurableOptions: { [key: string]: any } = {};\n\n configurable?.forEach((option: any) => {\n configurableOptions[option.label] = option.value;\n });\n\n return Object.keys(configurableOptions).length > 0\n ? configurableOptions\n : null;\n};\n\n/**\n * Helper function to transform customizable options data to be ready for a CartItem SDK component\n */\nexport const transformCustomizableOptions = (data: any) => {\n const transformedOptions = data?.map((option: any) => ({\n label: option.label,\n type: option.type,\n values: option.values.map((value: any) => ({\n label: value.label,\n value: value.value,\n })),\n }));\n\n const result: { [key: string]: any } = {};\n\n transformedOptions?.forEach((option: any) => {\n switch (option.type) {\n case 'field':\n case 'area':\n case 'date_time':\n result[option.label] = option.values[0].value;\n break;\n case 'radio':\n case 'drop_down':\n result[option.label] = option.values[0].label;\n break;\n case 'multiple':\n case 'checkbox':\n result[option.label] = (option.values as Array<any>).reduce(\n (previous, current) => {\n if (previous) return `${previous}, ${current.label}`;\n return current.label;\n },\n ''\n );\n break;\n case 'file': {\n const parser = new DOMParser();\n const fileAnchorElementHtml = option.values[0].value;\n const doc = parser.parseFromString(fileAnchorElementHtml, 'text/html');\n const anchorText = doc.querySelector('a')?.textContent || '';\n result[option.label] = anchorText;\n break;\n }\n }\n });\n\n return result;\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 { Image, ImageProps, Price } from '@adobe-commerce/elsie/components';\nimport { Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport {\n NegotiableQuoteCartItem as NegotiableQuoteItemModel,\n QuoteDisplayAmount,\n StoreConfigModel,\n} from '@/quote-management/data/models';\nimport { SwitchableAttributes } from '@/quote-management/containers/QuoteSummaryList/QuoteSummaryList';\nimport {\n transformBundleOptions,\n transformConfigurableOptions,\n transformCustomizableOptions,\n} from './configurationTransformers';\n\nconst EAGER_LOAD_THRESHOLD = 4;\n\nexport interface ItemFormatterOptions {\n attributesToHide: SwitchableAttributes[];\n routeProduct?: (item: NegotiableQuoteItemModel) => string;\n slots?: {\n Thumbnail?: SlotProps<{\n item: NegotiableQuoteItemModel;\n defaultImageProps: ImageProps;\n }>;\n ProductAttributes?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n };\n dictionary: Record<string, string>;\n quoteDisplaySettings?: StoreConfigModel['quoteDisplaySettings'];\n}\n\n/**\n * Get image component for an item\n */\nexport const getImage = (\n item: NegotiableQuoteItemModel,\n index: number,\n options: ItemFormatterOptions\n) => {\n if (options.attributesToHide.includes('image')) {\n return undefined;\n }\n\n const defaultImageProps: ImageProps = {\n loading: index < EAGER_LOAD_THRESHOLD ? 'eager' : 'lazy',\n src: item.image.src,\n alt: item.image.alt,\n width: '300',\n height: '300',\n params: { width: 300 },\n };\n\n const imageComponent = (\n <Image\n data-testid=\"quote-summary-list-item-image\"\n {...defaultImageProps}\n />\n );\n return (\n <Slot\n name=\"Thumbnail\"\n slot={options.slots?.Thumbnail}\n context={{ item, defaultImageProps }}\n >\n {options.routeProduct ? (\n <a href={options.routeProduct(item)}>{imageComponent}</a>\n ) : (\n imageComponent\n )}\n </Slot>\n );\n};\n\n/**\n * Get title component for an item\n */\nexport const getTitle = (\n item: NegotiableQuoteItemModel,\n options: ItemFormatterOptions\n) => {\n if (options.attributesToHide.includes('name')) {\n return undefined;\n }\n\n return (\n <span data-testid=\"quote-summary-list-item-title\">\n {options.routeProduct ? (\n <a href={options.routeProduct(item)}>{item.product.name}</a>\n ) : (\n item.product.name\n )}\n </span>\n );\n};\n\n/**\n * Get SKU component for an item\n */\nexport const getSku = (item: NegotiableQuoteItemModel) => {\n return (\n <span data-testid=\"quote-summary-list-item-sku\">{item.product.sku}</span>\n );\n};\n\n/**\n * Get product attributes slot for an item\n */\nexport const getProductAttributes = (\n item: NegotiableQuoteItemModel,\n options: ItemFormatterOptions\n) => {\n return (\n <Slot\n name=\"ProductAttributes\"\n slot={options.slots?.ProductAttributes}\n context={{ item }}\n />\n );\n};\n\n/**\n * Get configurations for an item (bundle, configurable, customizable options)\n */\nexport const getConfigurations = (\n item: NegotiableQuoteItemModel,\n options: ItemFormatterOptions\n) => {\n if (options.attributesToHide.includes('configurations')) {\n return undefined;\n }\n\n const configuration = {\n ...transformBundleOptions(item.bundleOptions),\n ...transformConfigurableOptions(item.configurableOptions),\n ...transformCustomizableOptions(item.customizableOptions),\n ...(item.links && item.links.count\n ? item.links.count > 1\n ? {\n [options.dictionary.files.replace(\n '{count}',\n item.links.count.toString()\n )]: item.links.result,\n }\n : {\n [options.dictionary.file.replace(\n '{count}',\n item.links.count.toString()\n )]: item.links.result,\n }\n : null),\n };\n\n if (Object.keys(configuration).length === 0) {\n return undefined;\n }\n\n return configuration;\n};\n\n/**\n * Get total excluding tax component for an item\n */\nexport const getTotalExcludingTax = (\n item: NegotiableQuoteItemModel,\n options: ItemFormatterOptions\n) => {\n return options.quoteDisplaySettings?.price ===\n QuoteDisplayAmount.TAX_INCLUDED_AND_EXCLUDED ? (\n <Price\n amount={item.prices.rowTotal.value}\n currency={item.prices.rowTotal.currency}\n data-testid=\"excluding-tax-total\"\n aria-label={options.dictionary.regularPrice}\n />\n ) : undefined;\n};\n\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { HTMLAttributes, useCallback, useState } from 'preact/compat';\n\nimport {\n Accordion,\n AccordionSection,\n Button,\n CartItem,\n CartList,\n ImageProps,\n Price,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { ChevronDown, ChevronRight } from '@adobe-commerce/elsie/icons';\nimport { Container, Slot, SlotProps, classes } from '@adobe-commerce/elsie/lib';\n\nimport { QuoteSummaryList as QuoteSummaryListComponent } from '@/quote-management/components';\nimport {\n NegotiableQuoteCartItem as NegotiableQuoteItemModel,\n QuoteDisplayAmount,\n} from '@/quote-management/data/models';\nimport { state } from '@/quote-management/lib/state';\nimport { useQuoteSummaryData } from '@/quote-management/hooks/useQuoteSummaryData';\nimport {\n getPriceProps,\n getSavingsAmount,\n getTotalPriceProps,\n} from '@/quote-management/lib/priceCalculators';\nimport {\n getImage,\n getTitle,\n getSku,\n getProductAttributes,\n getConfigurations,\n getTotalExcludingTax,\n} from '@/quote-management/lib/itemFormatters';\n\nexport interface QuoteSummaryListProps extends HTMLAttributes<HTMLDivElement> {\n hideHeading?: boolean;\n hideFooter?: boolean;\n routeProduct?: (item: NegotiableQuoteItemModel) => string;\n showMaxItems?: boolean;\n attributesToHide?: SwitchableAttributes[];\n slots?: {\n Heading?: SlotProps<{ count: number; quoteId: string }>;\n Footer?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n Thumbnail?: SlotProps<{\n item: NegotiableQuoteItemModel;\n defaultImageProps: ImageProps;\n }>;\n ProductAttributes?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n QuoteSummaryFooter?: SlotProps<{\n displayMaxItems: boolean;\n }>;\n QuoteItem?: SlotProps;\n ItemTitle?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n ItemPrice?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n ItemTotal?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n ItemSku?: SlotProps<{ item: NegotiableQuoteItemModel }>;\n };\n accordion?: boolean;\n variant?: 'primary' | 'secondary';\n showDiscount?: boolean;\n showSavings?: boolean;\n}\n\n// Attributes that can be hidden or shown\nexport type SwitchableAttributes =\n | 'name'\n | 'image'\n | 'configurations'\n | 'warning'\n | 'alert'\n | 'sku'\n | 'price'\n | 'quantity'\n | 'total'\n | 'totalDiscount'\n | 'totalExcludingTax';\n\nexport const QuoteSummaryList: Container<QuoteSummaryListProps> = ({\n hideHeading,\n hideFooter,\n routeProduct,\n showMaxItems = true,\n attributesToHide = [],\n slots,\n accordion = false,\n variant = 'primary',\n showDiscount,\n showSavings,\n ...props\n}) => {\n const CART_SUMMARY_MAX_ITEMS = 5;\n\n const { quoteData, loading } = useQuoteSummaryData();\n const [displayMaxItems, setDisplayMaxItems] = useState<boolean>(showMaxItems);\n\n const { quoteDisplaySettings, quoteSummaryMaxItems } = state.config;\n const maxItems = quoteSummaryMaxItems || CART_SUMMARY_MAX_ITEMS;\n\n const dictionary = useText({\n discountedPrice: 'NegotiableQuote.QuoteSummaryList.discountedPrice',\n discountPercentage: 'NegotiableQuote.QuoteSummaryList.discountPercentage',\n editQuote: 'NegotiableQuote.QuoteSummaryList.editQuote',\n file: 'NegotiableQuote.QuoteSummaryList.file',\n files: 'NegotiableQuote.QuoteSummaryList.files',\n heading: 'NegotiableQuote.QuoteSummaryList.heading',\n listOfQuoteItems: 'NegotiableQuote.QuoteSummaryList.listOfQuoteItems',\n regularPrice: 'NegotiableQuote.QuoteSummaryList.regularPrice',\n savingsAmount: 'NegotiableQuote.QuoteSummaryList.savingsAmount',\n viewMore: 'NegotiableQuote.QuoteSummaryList.viewMore',\n });\n\n // Display max items\n const handleMaxItemsView = useCallback(() => {\n setDisplayMaxItems((prev) => !prev);\n }, []);\n\n // Options for item formatters\n const formatterOptions = {\n attributesToHide,\n routeProduct,\n slots,\n dictionary,\n quoteDisplaySettings,\n };\n\n // Options for price calculators\n const calculatorOptions = {\n dictionary,\n quoteDisplaySettings,\n };\n\n const getFooter = (item: NegotiableQuoteItemModel) => {\n return <Slot name=\"Footer\" slot={slots?.Footer} context={{ item }} />;\n };\n\n // Re-usable function to get a filtered list of cart items\n const getCartItemEntries = (\n filterCallback: (item: NegotiableQuoteItemModel) => boolean\n ) => {\n return quoteData?.totalQuantity\n ? quoteData.items.filter(filterCallback).map((item, index) => {\n const { totalProps, discountProps } = getTotalPriceProps(\n item,\n calculatorOptions\n );\n\n const defaultCartItem = (\n <CartItem\n loading={loading}\n key={item.uid}\n data-testid={`quote-summary-list-item-entry-${item.uid}`}\n image={getImage(item, index, formatterOptions)}\n title={\n <Slot\n name=\"ItemTitle\"\n slot={slots?.ItemTitle}\n context={{ item }}\n >\n {getTitle(item, formatterOptions)}\n </Slot>\n }\n sku={\n attributesToHide.includes('sku') ? undefined : (\n <Slot name=\"ItemSku\" slot={slots?.ItemSku} context={{ item }}>\n {getSku(item)}\n </Slot>\n )\n }\n price={\n attributesToHide.includes('price') ? undefined : (\n <Slot\n name=\"ItemPrice\"\n slot={slots?.ItemPrice}\n context={{ item }}\n slotTag=\"span\"\n >\n <Price {...getPriceProps(item, calculatorOptions)} />\n </Slot>\n )\n }\n quantity={\n attributesToHide.includes('quantity')\n ? undefined\n : item.quantity\n }\n total={\n <>\n {attributesToHide.includes('total') ? undefined : (\n <Slot\n name=\"ItemTotal\"\n slot={slots?.ItemTotal}\n context={{ item }}\n >\n <Price {...totalProps} />\n </Slot>\n )}\n {attributesToHide.includes('totalDiscount')\n ? undefined\n : discountProps && (\n <Slot\n name=\"ItemTotal\"\n slot={slots?.ItemTotal}\n context={{ item }}\n >\n <Price {...discountProps} />\n </Slot>\n )}\n </>\n }\n attributes={getProductAttributes(item, formatterOptions)}\n configurations={getConfigurations(item, formatterOptions)}\n totalExcludingTax={\n attributesToHide.includes('totalExcludingTax')\n ? undefined\n : getTotalExcludingTax(item, formatterOptions)\n }\n taxIncluded={\n quoteDisplaySettings?.price === QuoteDisplayAmount.TAX_INCLUDED\n }\n taxExcluded={\n !attributesToHide.includes('totalExcludingTax') &&\n quoteDisplaySettings?.price ===\n QuoteDisplayAmount.TAX_INCLUDED_AND_EXCLUDED\n }\n discount={\n showDiscount &&\n item.discounted &&\n item.discountPercentage !== undefined ? (\n <div data-testid=\"item-discount-percentage\">\n {dictionary.discountPercentage.replace(\n '{discount}',\n item.discountPercentage.toString()\n )}\n </div>\n ) : undefined\n }\n savings={\n showSavings &&\n item.discounted &&\n item.savingsAmount !== undefined ? (\n <div>\n <span>\n <Price {...getSavingsAmount(item)} />\n </span>\n &nbsp;\n {dictionary.savingsAmount}\n </div>\n ) : undefined\n }\n footer={getFooter(item)}\n />\n );\n\n return (\n <Slot\n key={item.uid}\n name=\"CartItem\"\n slot={slots?.QuoteItem}\n context={{\n item,\n index,\n loading,\n attributesToHide,\n quoteDisplaySettings,\n showDiscount,\n showSavings,\n dictionary,\n getImage,\n getTitle,\n getSku,\n getPriceProps,\n getTotalPriceProps,\n getProductAttributes,\n getConfigurations,\n getTotalExcludingTax,\n getFooter,\n getSavingsAmount,\n }}\n >\n {defaultCartItem}\n </Slot>\n );\n })\n : null;\n };\n\n const heading = (\n <Slot\n name=\"Heading\"\n slot={slots?.Heading}\n context={{\n count: quoteData?.totalQuantity ?? 0,\n quoteId: quoteData?.uid!,\n }}\n >\n <div data-testid=\"default-quote-summary-list-heading\">\n {dictionary.heading.replace(\n '({count})',\n quoteData?.totalQuantity\n ? `(${quoteData?.totalQuantity.toString()})`\n : ''\n )}\n </div>\n </Slot>\n );\n\n // Heading Section text for screen reader\n const headingSection = heading.props.children.props.children;\n\n // Main Product Entries\n const mainProductEntries = getCartItemEntries(\n (item) => !item.outOfStock && !item.insufficientQuantity\n );\n\n const totalLineItems = quoteData?.items.length || 0;\n const numOfVisibleItems = displayMaxItems\n ? Math.min(totalLineItems, maxItems)\n : totalLineItems;\n\n const hasHiddenItems = totalLineItems > numOfVisibleItems;\n\n const footerActions =\n quoteData?.totalQuantity && mainProductEntries ? (\n <Slot\n name=\"Footer\"\n slot={slots?.QuoteSummaryFooter}\n context={{ displayMaxItems }}\n data-testid=\"quote-summary-list-footer-slot\"\n className=\"quote-management-quote-summary-list-footer\"\n >\n {hasHiddenItems ? (\n <Button\n className=\"quote-management-quote-summary-list-footer__action\"\n onClick={handleMaxItemsView}\n data-testid=\"view-more-items-button\"\n variant=\"tertiary\"\n >\n {dictionary.viewMore}\n </Button>\n ) : null}\n </Slot>\n ) : null;\n\n const productEntries = quoteData?.totalQuantity ? (\n <CartList data-testid=\"quote-summary-list\">\n {mainProductEntries?.slice(\n 0,\n displayMaxItems ? Math.min(totalLineItems, maxItems) : totalLineItems\n )}\n </CartList>\n ) : null;\n\n return accordion ? (\n <Accordion\n data-testid=\"quote-summary-list-accordion\"\n className={classes([\n `quote-management-quote-summary-list-accordion`,\n `quote-management-quote-summary-list__background--${variant}`,\n ])}\n iconOpen={ChevronRight}\n iconClose={ChevronDown}\n >\n <AccordionSection\n title={headingSection}\n ariaLabelTitle={headingSection}\n data-testid=\"quote-summary-list-accordion__section\"\n open={true}\n renderContentWhenClosed={true}\n >\n <QuoteSummaryListComponent\n {...props}\n aria-expanded={true}\n aria-label={dictionary.listOfQuoteItems}\n className={`quote-management-quote-summary-list-accordion__list`}\n footer={hideFooter ? undefined : footerActions}\n products={productEntries}\n outOfStockMessage={undefined}\n loading={loading}\n variant={variant}\n />\n </AccordionSection>\n </Accordion>\n ) : (\n <QuoteSummaryListComponent\n {...props}\n heading={hideHeading ? undefined : heading}\n footer={hideFooter ? undefined : footerActions}\n products={productEntries}\n outOfStockMessage={undefined}\n loading={loading}\n variant={variant}\n />\n );\n};\n"],"names":["SvgChevronRight","props","React","QuoteSummaryList","className","children","heading","footer","products","outOfStockMessage","loading","variant","jsx","classes","QuoteSummaryListSkeleton","jsxs","Fragment","VComponent","Divider","Skeleton","SkeletonRow","useQuoteSummaryData","quoteData","setQuoteData","useState","setLoading","useEffect","quoteDataEvent","events","payload","quote","getPriceProps","item","options","_a","QuoteDisplayAmount","getSavingsAmount","_b","getTotalPriceProps","totalProps","discountProps","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","transformBundleOptions","data","bundle","option","value","bundleOptions","transformConfigurableOptions","configurable","configurableOptions","transformCustomizableOptions","transformedOptions","result","previous","current","parser","fileAnchorElementHtml","anchorText","EAGER_LOAD_THRESHOLD","getImage","index","defaultImageProps","imageComponent","Image","Slot","getTitle","getSku","getProductAttributes","getConfigurations","configuration","getTotalExcludingTax","Price","hideHeading","hideFooter","routeProduct","showMaxItems","attributesToHide","slots","accordion","showDiscount","showSavings","displayMaxItems","setDisplayMaxItems","quoteDisplaySettings","quoteSummaryMaxItems","state","maxItems","dictionary","useText","handleMaxItemsView","useCallback","prev","formatterOptions","calculatorOptions","getFooter","getCartItemEntries","filterCallback","defaultCartItem","CartItem","headingSection","mainProductEntries","totalLineItems","numOfVisibleItems","hasHiddenItems","footerActions","Button","productEntries","CartList","Accordion","ChevronRight","ChevronDown","AccordionSection","QuoteSummaryListComponent"],"mappings":"o3BACA,MAAMA,GAAmBC,GAA0BC,EAAM,cAAc,MAAO,CAAE,GAAI,0BAA2B,YAAa,0CAA2C,MAAO,6BAA8B,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,GAAGD,CAAK,EAAoBC,EAAM,cAAc,IAAK,CAAE,GAAI,OAAO,EAAoBA,EAAM,cAAc,OAAQ,CAAE,GAAI,iBAAkB,YAAa,iBAAkB,MAAO,GAAI,OAAQ,GAAI,KAAM,OAAQ,QAAS,CAAC,CAAE,EAAmBA,EAAM,cAAc,IAAK,CAAE,GAAI,qBAAsB,YAAa,sBAAwCA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,GAAI,UAAW,EAAG,0CAA2C,UAAW,4BAA6B,KAAM,OAAQ,OAAQ,cAAc,CAAE,CAAC,CAAC,CAAC,EC4BnxBC,EAA6D,CAAC,CACzE,UAAAC,EACA,SAAAC,EACA,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,UACV,GAAGV,CACL,IAEIW,EAAC,MAAA,CACE,GAAGX,EACJ,UAAWY,EAAQ,CACjB,sCACAT,EACA,oDAAoDO,CAAO,EAAA,CAC5D,EAEA,SAAAD,EACCE,EAACE,GAAA,CAAA,CAAyB,EAE1BC,EAAAC,EAAA,CACI,SAA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G,GAAA,CACC,cAAY,+BACZ,UAAWzG,EAAQ,CACjB,gDACA,oDAAoDF,CAAO,EAAA,CAC5D,EACD,SAAU4G,GACV,UAAWC,GAEX,SAAA5G,EAAC6G,GAAA,CACC,MAAOZ,EACP,eAAgBA,EAChB,cAAY,wCACZ,KAAM,GACN,wBAAyB,GAEzB,SAAAjG,EAAC8G,EAAA,CACE,GAAGzH,EACJ,gBAAe,GACf,aAAYgG,EAAW,iBACvB,UAAW,sDACX,OAAQd,EAAa,OAAY+B,EACjC,SAAUE,EACV,kBAAmB,OACnB,QAAA1G,EACA,QAAAC,CAAA,CAAA,CACF,CAAA,CACF,CAAA,EAGFC,EAAC8G,EAAA,CACE,GAAGzH,EACJ,QAASiF,EAAc,OAAY5E,EACnC,OAAQ6E,EAAa,OAAY+B,EACjC,SAAUE,EACV,kBAAmB,OACnB,QAAA1G,EACA,QAAAC,CAAA,CAAA,CAGN","x_google_ignoreList":[0]}
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteTemplateModel } from '../../data/models/negotiable-quote-template-model';
4
+
5
+ export interface QuoteTemplateCommentsListProps extends HTMLAttributes<HTMLUListElement> {
6
+ templateData?: NegotiableQuoteTemplateModel;
7
+ }
8
+ export declare const QuoteTemplateCommentsList: Container<QuoteTemplateCommentsListProps>;
9
+ //# sourceMappingURL=QuoteTemplateCommentsList.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuoteTemplateCommentsList';
10
+ export { QuoteTemplateCommentsList as default } from './QuoteTemplateCommentsList';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './QuoteTemplateCommentsList/index'
2
+ import _default from './QuoteTemplateCommentsList/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{Q as f,Q as l}from"../chunks/QuoteTemplateCommentsList.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"../chunks/QuoteCommentsList.js";import"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/i18n.js";import"@dropins/tools/event-bus.js";import"../chunks/dateUtils.js";export{f as QuoteTemplateCommentsList,l as default};
4
+ //# sourceMappingURL=QuoteTemplateCommentsList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteTemplateCommentsList.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteTemplateModel } from '../../data/models/negotiable-quote-template-model';
4
+
5
+ export interface QuoteTemplateHistoryLogProps extends HTMLAttributes<HTMLDivElement> {
6
+ templateData?: NegotiableQuoteTemplateModel;
7
+ }
8
+ export declare const QuoteTemplateHistoryLog: Container<QuoteTemplateHistoryLogProps>;
9
+ //# sourceMappingURL=QuoteTemplateHistoryLog.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuoteTemplateHistoryLog';
10
+ export { QuoteTemplateHistoryLog as default } from './QuoteTemplateHistoryLog';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './QuoteTemplateHistoryLog/index'
2
+ import _default from './QuoteTemplateHistoryLog/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{Q as f,Q as l}from"../chunks/QuoteTemplateHistoryLog.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/event-bus.js";import"../chunks/QuoteHistoryLog.js";import"@dropins/tools/lib.js";import"../chunks/dateUtils.js";/* empty css */import"@dropins/tools/i18n.js";export{f as QuoteTemplateHistoryLog,l as default};
4
+ //# sourceMappingURL=QuoteTemplateHistoryLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteTemplateHistoryLog.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,74 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteTemplateListEntry } from '../../data/models';
4
+
5
+ export interface QuoteTemplatesListTableProps extends HTMLAttributes<HTMLDivElement> {
6
+ pageSize?: number;
7
+ showItemRange?: boolean;
8
+ showPageSizePicker?: boolean;
9
+ showPagination?: boolean;
10
+ onViewQuoteTemplate?: (templateId: string, templateName: string, status: string) => void;
11
+ onGenerateQuoteFromTemplate?: (templateId: string, templateName: string, quoteId: string) => void;
12
+ onPageSizeChange?: (pageSize: number) => void;
13
+ onPageChange?: (page: number) => void;
14
+ slots?: {
15
+ /** Slot for customizing the template name cell content */
16
+ Name?: SlotProps<{
17
+ template: NegotiableQuoteTemplateListEntry;
18
+ }>;
19
+ /** Slot for customizing the state cell content */
20
+ State?: SlotProps<{
21
+ template: NegotiableQuoteTemplateListEntry;
22
+ }>;
23
+ /** Slot for customizing the status cell content */
24
+ Status?: SlotProps<{
25
+ template: NegotiableQuoteTemplateListEntry;
26
+ }>;
27
+ /** Slot for customizing the valid until cell content */
28
+ ValidUntil?: SlotProps<{
29
+ template: NegotiableQuoteTemplateListEntry;
30
+ }>;
31
+ /** Slot for customizing the min quote total cell content */
32
+ MinQuoteTotal?: SlotProps<{
33
+ template: NegotiableQuoteTemplateListEntry;
34
+ }>;
35
+ /** Slot for customizing the orders placed cell content */
36
+ OrdersPlaced?: SlotProps<{
37
+ template: NegotiableQuoteTemplateListEntry;
38
+ }>;
39
+ /** Slot for customizing the last ordered cell content */
40
+ LastOrdered?: SlotProps<{
41
+ template: NegotiableQuoteTemplateListEntry;
42
+ }>;
43
+ /** Slot for customizing the actions cell content */
44
+ Actions?: SlotProps<{
45
+ template: NegotiableQuoteTemplateListEntry;
46
+ onViewQuoteTemplate?: (id: string, name: string, status: string) => void;
47
+ onGenerateQuoteFromTemplate?: (id: string, name: string) => void;
48
+ }>;
49
+ /** Slot for customizing the empty templates message */
50
+ EmptyTemplates?: SlotProps;
51
+ /** Slot for customizing the item range display */
52
+ ItemRange?: SlotProps<{
53
+ startItem: number;
54
+ endItem: number;
55
+ totalCount: number;
56
+ currentPage: number;
57
+ pageSize: number;
58
+ }>;
59
+ /** Slot for customizing the page size picker */
60
+ PageSizePicker?: SlotProps<{
61
+ pageSize: number;
62
+ pageSizeOptions: number[];
63
+ onPageSizeChange?: (pageSize: number) => void;
64
+ }>;
65
+ /** Slot for customizing the pagination */
66
+ Pagination?: SlotProps<{
67
+ currentPage: number;
68
+ totalPages: number;
69
+ onChange?: (page: number) => void;
70
+ }>;
71
+ };
72
+ }
73
+ export declare const QuoteTemplatesListTable: Container<QuoteTemplatesListTableProps>;
74
+ //# sourceMappingURL=QuoteTemplatesListTable.d.ts.map
@@ -0,0 +1,11 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export * from './QuoteTemplatesListTable';
10
+ export { QuoteTemplatesListTable as default } from './QuoteTemplatesListTable';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './QuoteTemplatesListTable/index'
2
+ import _default from './QuoteTemplatesListTable/index'
3
+ export default _default
@@ -0,0 +1,4 @@
1
+ /*! Copyright 2025 Adobe
2
+ All Rights Reserved. */
3
+ import{jsxs as h,jsx as t,Fragment as V}from"@dropins/tools/preact-jsx-runtime.js";import{useState as u,useEffect as ee,createPortal as te}from"@dropins/tools/preact-compat.js";import{classes as ae,Slot as c}from"@dropins/tools/lib.js";import{Table as ne,IllustratedMessage as oe,Picker as ie,Pagination as re,Button as G,Price as le}from"@dropins/tools/components.js";import{events as ce}from"@dropins/tools/event-bus.js";/* empty css */import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";import{f as R}from"../chunks/dateUtils.js";import{useText as A}from"@dropins/tools/i18n.js";import{C as de}from"../chunks/ConfirmationModal.js";/* empty css *//* empty css */import{g as E}from"../chunks/transform-quote.js";import"../chunks/state.js";import{g as ue}from"../chunks/getQuoteTemplates.js";import{g as se}from"../chunks/generateQuoteFromTemplate.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-quote-template.js";const me=({rowData:T=[],loading:b=!1,className:y,emptyStateMessage:S,showItemRange:N=!0,itemRangeMessage:s,showPageSizePicker:f=!0,pageSizePickerMessage:m,showPagination:r=!0,paginationMessage:M,...d})=>{const o=A({name:"QuoteManagement.QuoteTemplatesListTable.name",state:"QuoteManagement.QuoteTemplatesListTable.state",status:"QuoteManagement.QuoteTemplatesListTable.status",validUntil:"QuoteManagement.QuoteTemplatesListTable.validUntil",minQuoteTotal:"QuoteManagement.QuoteTemplatesListTable.minQuoteTotal",ordersPlaced:"QuoteManagement.QuoteTemplatesListTable.ordersPlaced",lastOrdered:"QuoteManagement.QuoteTemplatesListTable.lastOrdered",actions:"QuoteManagement.QuoteTemplatesListTable.actions"}),P=[{key:"name",label:o.name},{key:"state",label:o.state},{key:"status",label:o.status},{key:"validUntil",label:o.validUntil},{key:"minQuoteTotal",label:o.minQuoteTotal},{key:"ordersPlaced",label:o.ordersPlaced},{key:"lastOrdered",label:o.lastOrdered},{key:"actions",label:o.actions}],L=!b&&T.length===0&&S,g=N&&s,Q=f&&m,p=r&&M,v=g||Q||p;return h("div",{...d,className:ae(["quote-management-quote-templates-list-table",y]),children:[t(ne,{columns:P,rowData:T,loading:b,mobileLayout:"none",className:"quote-management-quote-templates-list-table__table"}),L&&t("div",{className:"quote-templates-list-table__empty-state",children:S}),v&&h("div",{className:"quote-templates-list-table__footer",children:[t("div",{className:"quote-templates-list-table__item-range",children:g&&s}),t("div",{className:"quote-templates-list-table__pagination",children:p&&M}),t("div",{className:"quote-templates-list-table__page-size-picker",children:Q&&m})]})]})},Ce=({pageSize:T,showItemRange:b=!0,showPageSizePicker:y=!0,showPagination:S=!0,onViewQuoteTemplate:N,onGenerateQuoteFromTemplate:s,onPageSizeChange:f,onPageChange:m,slots:r,...M})=>{const d=A({view:"QuoteManagement.QuoteTemplatesListTable.view",generateQuote:"NegotiableQuoteTemplate.Manage.actionButtons.generateQuote",generateQuoteModalMessage:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.message",generateQuoteModalCancel:"NegotiableQuoteTemplate.Manage.confirmationModal.cancel",generateQuoteModalConfirm:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirm",generateQuoteModalConfirmLoading:"NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirmLoading"}),[o,P]=u(null),[L,g]=u(!0),[Q,p]=u(!1),[v,k]=u(!1),[q,x]=u(null),B=E()[0],[O,F]=u(T||B),[C,_]=u(1);ee(()=>{const n=async()=>{try{g(!0);const l=await ue({pageSize:O,currentPage:C});P(l)}catch(l){console.error("Failed to fetch quote templates:",l)}finally{g(!1)}},e=ce.on("authenticated",l=>{l?n():(P(null),g(!1))},{eager:!0});return()=>{e==null||e.off()}},[O,C]);const I=n=>{F(n),_(1),f==null||f(n)},w=n=>{_(n),m==null||m(n)},j=n=>{const e=n.target,l=e==null?void 0:e.value;l&&I(Number(l))},D=(n,e)=>{x({id:n,name:e}),p(!0)},$=async n=>{k(!0);try{const e=await se({templateId:n.id});s==null||s(n.id,n.name,e.quoteId),p(!1),x(null)}catch(e){console.error("Failed to generate quote from template:",e)}finally{k(!1)}},H=()=>{p(!1),x(null)},J=(n,e,l)=>n.filter(a=>a==null?void 0:a.uid).map(a=>{var U;return{id:a.id,name:t(c,{name:"Name",slot:e==null?void 0:e.Name,context:{template:a},children:t("span",{children:a.name})}),state:t(c,{name:"State",slot:e==null?void 0:e.State,context:{template:a},children:t("span",{style:{textTransform:"capitalize"},children:((U=a.state)==null?void 0:U.replace(/_/g," "))||"-"})}),status:t(c,{name:"Status",slot:e==null?void 0:e.Status,context:{template:a},children:t("span",{children:a.status})}),validUntil:t(c,{name:"ValidUntil",slot:e==null?void 0:e.ValidUntil,context:{template:a},children:t("span",{children:R(a.expirationDate,"short")})}),minQuoteTotal:t(c,{name:"MinQuoteTotal",slot:e==null?void 0:e.MinQuoteTotal,context:{template:a},children:t(le,{amount:a.prices.minNegotiatedGrandTotal.value,currency:a.prices.minNegotiatedGrandTotal.currency})}),ordersPlaced:t(c,{name:"OrdersPlaced",slot:e==null?void 0:e.OrdersPlaced,context:{template:a},children:t("span",{children:a.ordersPlaced})}),lastOrdered:t(c,{name:"LastOrdered",slot:e==null?void 0:e.LastOrdered,context:{template:a},children:t("span",{children:R(a.lastOrderedAt,"short")})}),actions:h(c,{name:"Actions",slot:e==null?void 0:e.Actions,context:{template:a,onViewQuoteTemplate:l},className:"quote-management-quote-templates-list-table__actions-cell",children:[t(G,{variant:"tertiary",size:"medium",onClick:()=>l==null?void 0:l(a.id,a.name,a.status),children:d.view}),a.canGenerateQuoteFromTemplate&&t(G,{variant:"primary",size:"medium",onClick:()=>D(a.id,a.name),"data-testid":`generate-quote-button-${a.id}`,children:d.generateQuote})]})}}),K=o!=null&&o.items?J(o.items,r,N):[],i=o!=null&&o.paginationInfo?{...o.paginationInfo,pageSizeOptions:E()}:void 0,z=!!i,W=t(c,{name:"EmptyTemplates",slot:r==null?void 0:r.EmptyTemplates,context:{templatesData:o},children:t(oe,{heading:"No Quote Templates Found"})}),X=i?t(c,{name:"ItemRange",slot:r==null?void 0:r.ItemRange,context:i,children:h("span",{children:["Items ",i.startItem," to ",i.endItem," of"," ",i.totalCount," total"]})}):void 0,Y=i&&i.pageSizeOptions?h(c,{name:"PageSizePicker",slot:r==null?void 0:r.PageSizePicker,context:{pageSize:i.pageSize,pageSizeOptions:i.pageSizeOptions,onPageSizeChange:I},children:[t("span",{children:"Show "}),t(ie,{variant:"primary",size:"medium",value:String(i.pageSize),options:i.pageSizeOptions.map(n=>({value:String(n),text:String(n)})),handleSelect:j}),t("span",{children:" per page"})]}):void 0,Z=i?t(c,{name:"Pagination",slot:r==null?void 0:r.Pagination,context:{currentPage:i.currentPage,totalPages:i.totalPages,onChange:w},children:t(re,{currentPage:i.currentPage,totalPages:i.totalPages,onChange:w})}):void 0;return h(V,{children:[t(me,{rowData:K,loading:L,className:M.className,emptyStateMessage:W,showItemRange:b&&z,itemRangeMessage:X,showPageSizePicker:y&&z,pageSizePickerMessage:Y,showPagination:S&&z,paginationMessage:Z}),Q&&te(t(de,{open:Q,title:d.generateQuote,message:d.generateQuoteModalMessage,cancelLabel:d.generateQuoteModalCancel,confirmLabel:v?d.generateQuoteModalConfirmLoading:d.generateQuoteModalConfirm,onCancel:H,onConfirm:v||!q?void 0:()=>$(q),showCloseButton:!0,"data-testid":"generate-quote-confirmation-modal"}),document.body)]})};export{Ce as QuoteTemplatesListTable,Ce as default};
4
+ //# sourceMappingURL=QuoteTemplatesListTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuoteTemplatesListTable.js","sources":["/@dropins/storefront-quote-management/src/components/QuoteTemplatesListTable/QuoteTemplatesListTable.tsx","/@dropins/storefront-quote-management/src/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.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 } from '@adobe-commerce/elsie/lib';\nimport { Table } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@/quote-management/components/QuoteTemplatesListTable/QuoteTemplatesListTable.css';\n\ntype Column = {\n key: string;\n label: string;\n};\n\nexport interface QuoteTemplatesListTableProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'loading' | 'children'> {\n rowData: QuoteTemplateRowData[];\n loading?: boolean;\n className?: string;\n emptyStateMessage?: VNode;\n showItemRange?: boolean;\n itemRangeMessage?: VNode;\n showPageSizePicker?: boolean;\n pageSizePickerMessage?: VNode;\n showPagination?: boolean;\n paginationMessage?: VNode;\n}\n\nexport type QuoteTemplateRowData = {\n id: string;\n name: VNode;\n state: VNode;\n status: VNode;\n validUntil: VNode;\n minQuoteTotal: VNode;\n ordersPlaced: VNode;\n lastOrdered: VNode;\n actions: VNode;\n [key: string]: VNode | string | number | undefined;\n};\n\nexport const QuoteTemplatesListTable: FunctionComponent<\n QuoteTemplatesListTableProps\n> = ({\n rowData = [],\n loading = false,\n className,\n emptyStateMessage,\n showItemRange = true,\n itemRangeMessage,\n showPageSizePicker = true,\n pageSizePickerMessage,\n showPagination = true,\n paginationMessage,\n ...props\n}) => {\n const dictionary = useText({\n name: 'QuoteManagement.QuoteTemplatesListTable.name',\n state: 'QuoteManagement.QuoteTemplatesListTable.state',\n status: 'QuoteManagement.QuoteTemplatesListTable.status',\n validUntil: 'QuoteManagement.QuoteTemplatesListTable.validUntil',\n minQuoteTotal: 'QuoteManagement.QuoteTemplatesListTable.minQuoteTotal',\n ordersPlaced: 'QuoteManagement.QuoteTemplatesListTable.ordersPlaced',\n lastOrdered: 'QuoteManagement.QuoteTemplatesListTable.lastOrdered',\n actions: 'QuoteManagement.QuoteTemplatesListTable.actions',\n });\n\n const columns: Column[] = [\n { key: 'name', label: dictionary.name },\n { key: 'state', label: dictionary.state },\n { key: 'status', label: dictionary.status },\n { key: 'validUntil', label: dictionary.validUntil },\n { key: 'minQuoteTotal', label: dictionary.minQuoteTotal },\n { key: 'ordersPlaced', label: dictionary.ordersPlaced },\n { key: 'lastOrdered', label: dictionary.lastOrdered },\n { key: 'actions', label: dictionary.actions },\n ];\n\n // Check if we should show empty state\n const shouldShowEmptyState =\n !loading && rowData.length === 0 && emptyStateMessage;\n\n // Show item range if requested and message is provided\n const shouldShowItemRange = showItemRange && itemRangeMessage;\n\n // Show page size picker if requested and message is provided\n const shouldShowPageSizePicker = showPageSizePicker && pageSizePickerMessage;\n\n // Show pagination if requested and message is provided\n const shouldShowPagination = showPagination && paginationMessage;\n\n // Show footer if any pagination element should be shown\n const shouldShowFooter =\n shouldShowItemRange || shouldShowPageSizePicker || shouldShowPagination;\n\n return (\n <div\n {...props}\n className={classes([\n 'quote-management-quote-templates-list-table',\n className,\n ])}\n >\n <Table\n columns={columns}\n rowData={rowData}\n loading={loading}\n mobileLayout=\"none\"\n className=\"quote-management-quote-templates-list-table__table\"\n />\n {shouldShowEmptyState && (\n <div className=\"quote-templates-list-table__empty-state\">\n {emptyStateMessage}\n </div>\n )}\n {shouldShowFooter && (\n <div className=\"quote-templates-list-table__footer\">\n <div className=\"quote-templates-list-table__item-range\">\n {shouldShowItemRange && itemRangeMessage}\n </div>\n <div className=\"quote-templates-list-table__pagination\">\n {shouldShowPagination && paginationMessage}\n </div>\n <div className=\"quote-templates-list-table__page-size-picker\">\n {shouldShowPageSizePicker && pageSizePickerMessage}\n </div>\n </div>\n )}\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 { HTMLAttributes, useEffect, useState, createPortal } from 'preact/compat';\nimport { useText } from '@adobe-commerce/elsie/i18n';\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 QuoteTemplatesListTable as QuoteTemplatesListTableComponent,\n QuoteTemplateRowData,\n ConfirmationModal,\n} from '@/quote-management/components';\nimport { getQuoteTemplates, generateQuoteFromTemplate } from '@/quote-management/api';\nimport { getDefaultPageSizeOptions } from '@/quote-management/data/transforms';\nimport {\n NegotiableQuoteTemplatesListModel,\n NegotiableQuoteTemplateListEntry,\n} from '@/quote-management/data/models';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuoteTemplatesListTableProps\n extends HTMLAttributes<HTMLDivElement> {\n pageSize?: number;\n showItemRange?: boolean;\n showPageSizePicker?: boolean;\n showPagination?: boolean;\n onViewQuoteTemplate?: (templateId: string, templateName: string, status: string) => void;\n onGenerateQuoteFromTemplate?: (templateId: string, templateName: string, quoteId: string) => void;\n onPageSizeChange?: (pageSize: number) => void;\n onPageChange?: (page: number) => void;\n slots?: {\n /** Slot for customizing the template name cell content */\n Name?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the state cell content */\n State?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the status cell content */\n Status?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the valid until cell content */\n ValidUntil?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the min quote total cell content */\n MinQuoteTotal?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the orders placed cell content */\n OrdersPlaced?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the last ordered cell content */\n LastOrdered?: SlotProps<{ template: NegotiableQuoteTemplateListEntry }>;\n /** Slot for customizing the actions cell content */\n Actions?: SlotProps<{\n template: NegotiableQuoteTemplateListEntry;\n onViewQuoteTemplate?: (id: string, name: string, status: string) => void;\n onGenerateQuoteFromTemplate?: (id: string, name: string) => void;\n }>;\n /** Slot for customizing the empty templates message */\n EmptyTemplates?: 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 QuoteTemplatesListTable: Container<\n QuoteTemplatesListTableProps\n> = ({\n pageSize,\n showItemRange = true,\n showPageSizePicker = true,\n showPagination = true,\n onViewQuoteTemplate,\n onGenerateQuoteFromTemplate,\n onPageSizeChange,\n onPageChange,\n slots,\n ...props\n}) => {\n const dictionary = useText({\n view: 'QuoteManagement.QuoteTemplatesListTable.view',\n generateQuote: 'NegotiableQuoteTemplate.Manage.actionButtons.generateQuote',\n generateQuoteModalMessage: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.message',\n generateQuoteModalCancel: 'NegotiableQuoteTemplate.Manage.confirmationModal.cancel',\n generateQuoteModalConfirm: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirm',\n generateQuoteModalConfirmLoading: 'NegotiableQuoteTemplate.Manage.confirmationModal.generateQuote.confirmLoading',\n });\n\n const [templatesData, setTemplatesData] =\n useState<NegotiableQuoteTemplatesListModel | null>(null);\n const [loading, setLoading] = useState(true);\n const [showGenerateQuoteModal, setShowGenerateQuoteModal] = useState<boolean>(false);\n const [isGeneratingQuote, setIsGeneratingQuote] = useState<boolean>(false);\n const [selectedTemplate, setSelectedTemplate] = useState<{ id: string; name: string } | null>(null);\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 quote templates data when authenticated\n useEffect(() => {\n const fetchTemplates = async () => {\n try {\n setLoading(true);\n const data = await getQuoteTemplates({\n pageSize: currentPageSize,\n currentPage,\n });\n setTemplatesData(data);\n } catch (error) {\n console.error('Failed to fetch quote templates:', 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 fetchTemplates();\n } else {\n setTemplatesData(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 // 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 // Handle generate quote button click\n const handleGenerateQuoteClick = (templateId: string, templateName: string) => {\n setSelectedTemplate({ id: templateId, name: templateName });\n setShowGenerateQuoteModal(true);\n };\n\n // Handle generate quote confirmation\n const handleGenerateQuote = async (template: { id: string; name: string }) => { \n setIsGeneratingQuote(true);\n \n try {\n const result = await generateQuoteFromTemplate({ templateId: template.id });\n \n // Call the callback AFTER successful generation\n onGenerateQuoteFromTemplate?.(template.id, template.name, result.quoteId);\n \n // Close modal on success\n setShowGenerateQuoteModal(false);\n setSelectedTemplate(null);\n } catch (error) {\n console.error('Failed to generate quote from template:', error);\n // Keep modal open on error so user can try again or cancel\n } finally {\n setIsGeneratingQuote(false);\n }\n };\n\n // Handle generate quote modal cancel\n const handleGenerateQuoteModalCancel = () => {\n setShowGenerateQuoteModal(false);\n setSelectedTemplate(null);\n };\n\n // Prepare transformed quote template data for table component\n const prepareRowData = (\n templates: NegotiableQuoteTemplateListEntry[],\n slots?: QuoteTemplatesListTableProps['slots'],\n onViewQuoteTemplate?: (templateId: string, templateName: string, status: string) => void\n ): QuoteTemplateRowData[] => {\n return templates\n .filter((template) => template?.uid) // Filter out null templates\n .map((template) => {\n return {\n id: template.id,\n name: (\n <Slot name=\"Name\" slot={slots?.Name} context={{ template }}>\n <span>{template.name}</span>\n </Slot>\n ),\n state: (\n <Slot name=\"State\" slot={slots?.State} context={{ template }}>\n <span style={{ textTransform: 'capitalize' }}>\n {template.state?.replace(/_/g, ' ') || '-'}\n </span>\n </Slot>\n ),\n status: (\n <Slot name=\"Status\" slot={slots?.Status} context={{ template }}>\n <span>{template.status}</span>\n </Slot>\n ),\n validUntil: (\n <Slot\n name=\"ValidUntil\"\n slot={slots?.ValidUntil}\n context={{ template }}\n >\n <span>{formattedDate(template.expirationDate, 'short')}</span>\n </Slot>\n ),\n minQuoteTotal: (\n <Slot\n name=\"MinQuoteTotal\"\n slot={slots?.MinQuoteTotal}\n context={{ template }}\n >\n <Price\n amount={template.prices.minNegotiatedGrandTotal.value}\n currency={template.prices.minNegotiatedGrandTotal.currency}\n />\n </Slot>\n ),\n ordersPlaced: (\n <Slot\n name=\"OrdersPlaced\"\n slot={slots?.OrdersPlaced}\n context={{ template }}\n >\n <span>{template.ordersPlaced}</span>\n </Slot>\n ),\n lastOrdered: (\n <Slot\n name=\"LastOrdered\"\n slot={slots?.LastOrdered}\n context={{ template }}\n >\n <span>{formattedDate(template.lastOrderedAt, 'short')}</span>\n </Slot>\n ),\n actions: (\n <Slot\n name=\"Actions\"\n slot={slots?.Actions}\n context={{ template, onViewQuoteTemplate }}\n className=\"quote-management-quote-templates-list-table__actions-cell\"\n >\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n onClick={() => onViewQuoteTemplate?.(template.id, template.name, template.status)}\n >\n {dictionary.view}\n </Button>\n {template.canGenerateQuoteFromTemplate && (\n <Button\n variant=\"primary\"\n size=\"medium\"\n onClick={() => handleGenerateQuoteClick(template.id, template.name)}\n data-testid={`generate-quote-button-${template.id}`}\n >\n {dictionary.generateQuote}\n </Button>\n )}\n </Slot>\n ),\n };\n });\n };\n\n // Prepare data for rendering\n const rowData = templatesData?.items\n ? prepareRowData(templatesData.items, slots, onViewQuoteTemplate)\n : [];\n\n // Use pagination info directly from API response, merging in pageSizeOptions if needed\n const paginationInfo = templatesData?.paginationInfo\n ? {\n ...templatesData.paginationInfo,\n pageSizeOptions: getDefaultPageSizeOptions(),\n }\n : undefined;\n\n const shouldShowPagination = !!paginationInfo;\n\n // Empty state message\n const emptyStateMessage = (\n <Slot\n name=\"EmptyTemplates\"\n slot={slots?.EmptyTemplates}\n context={{ templatesData }}\n >\n <IllustratedMessage heading=\"No Quote Templates 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 <>\n <QuoteTemplatesListTableComponent\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 {showGenerateQuoteModal &&\n createPortal(\n <ConfirmationModal\n open={showGenerateQuoteModal}\n title={dictionary.generateQuote}\n message={dictionary.generateQuoteModalMessage}\n cancelLabel={dictionary.generateQuoteModalCancel}\n confirmLabel={\n isGeneratingQuote\n ? dictionary.generateQuoteModalConfirmLoading\n : dictionary.generateQuoteModalConfirm\n }\n onCancel={handleGenerateQuoteModalCancel}\n onConfirm={isGeneratingQuote || !selectedTemplate ? undefined : () => handleGenerateQuote(selectedTemplate)}\n showCloseButton={true}\n data-testid=\"generate-quote-confirmation-modal\"\n />,\n document.body\n )}\n </>\n );\n};\n"],"names":["QuoteTemplatesListTable","rowData","loading","className","emptyStateMessage","showItemRange","itemRangeMessage","showPageSizePicker","pageSizePickerMessage","showPagination","paginationMessage","props","dictionary","useText","columns","shouldShowEmptyState","shouldShowItemRange","shouldShowPageSizePicker","shouldShowPagination","shouldShowFooter","jsxs","classes","jsx","Table","pageSize","onViewQuoteTemplate","onGenerateQuoteFromTemplate","onPageSizeChange","onPageChange","slots","templatesData","setTemplatesData","useState","setLoading","showGenerateQuoteModal","setShowGenerateQuoteModal","isGeneratingQuote","setIsGeneratingQuote","selectedTemplate","setSelectedTemplate","defaultPageSize","getDefaultPageSizeOptions","currentPageSize","setCurrentPageSize","currentPage","setCurrentPage","useEffect","fetchTemplates","data","getQuoteTemplates","error","unsubscribe","events","isAuthenticated","handlePageSizeChange","newPageSize","handlePageChange","newPage","handlePageSizeSelect","event","target","value","handleGenerateQuoteClick","templateId","templateName","handleGenerateQuote","template","result","generateQuoteFromTemplate","handleGenerateQuoteModalCancel","prepareRowData","templates","Slot","_a","formattedDate","Price","Button","paginationInfo","IllustratedMessage","Picker","size","Pagination","Fragment","QuoteTemplatesListTableComponent","createPortal","ConfirmationModal"],"mappings":"2gCAgDO,MAAMA,GAET,CAAC,CACH,QAAAC,EAAU,CAAA,EACV,QAAAC,EAAU,GACV,UAAAC,EACA,kBAAAC,EACA,cAAAC,EAAgB,GAChB,iBAAAC,EACA,mBAAAC,EAAqB,GACrB,sBAAAC,EACA,eAAAC,EAAiB,GACjB,kBAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,KAAM,+CACN,MAAO,gDACP,OAAQ,iDACR,WAAY,qDACZ,cAAe,wDACf,aAAc,uDACd,YAAa,sDACb,QAAS,iDAAA,CACV,EAEKC,EAAoB,CACxB,CAAE,IAAK,OAAQ,MAAOF,EAAW,IAAA,EACjC,CAAE,IAAK,QAAS,MAAOA,EAAW,KAAA,EAClC,CAAE,IAAK,SAAU,MAAOA,EAAW,MAAA,EACnC,CAAE,IAAK,aAAc,MAAOA,EAAW,UAAA,EACvC,CAAE,IAAK,gBAAiB,MAAOA,EAAW,aAAA,EAC1C,CAAE,IAAK,eAAgB,MAAOA,EAAW,YAAA,EACzC,CAAE,IAAK,cAAe,MAAOA,EAAW,WAAA,EACxC,CAAE,IAAK,UAAW,MAAOA,EAAW,OAAA,CAAQ,EAIxCG,EACJ,CAACb,GAAWD,EAAQ,SAAW,GAAKG,EAGhCY,EAAsBX,GAAiBC,EAGvCW,EAA2BV,GAAsBC,EAGjDU,EAAuBT,GAAkBC,EAGzCS,EACJH,GAAuBC,GAA4BC,EAErD,OACEE,EAAC,MAAA,CAC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GAAA,CACC,KAAMnD,EACN,MAAOtB,EAAW,cAClB,QAASA,EAAW,0BACpB,YAAaA,EAAW,yBACxB,aACEwB,EACIxB,EAAW,iCACXA,EAAW,0BAEjB,SAAUyD,EACV,UAAWjC,GAAqB,CAACE,EAAmB,OAAY,IAAM2B,EAAoB3B,CAAgB,EAC1G,gBAAiB,GACjB,cAAY,mCAAA,CAAA,EAEd,SAAS,IAAA,CACX,EACJ,CAEJ"}
@@ -0,0 +1,72 @@
1
+ import { HTMLAttributes } from 'preact/compat';
2
+ import { Container, SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteListEntry } from '../../data/models';
4
+
5
+ export interface QuotesListTableProps extends HTMLAttributes<HTMLDivElement> {
6
+ pageSize?: number;
7
+ showItemRange?: boolean;
8
+ showPageSizePicker?: boolean;
9
+ showPagination?: boolean;
10
+ onViewQuote?: (quoteId: string, quoteName: string, status: string) => void;
11
+ onPageSizeChange?: (pageSize: number) => void;
12
+ onPageChange?: (page: number) => void;
13
+ slots?: {
14
+ /** Slot for customizing the quote name cell content */
15
+ QuoteName?: SlotProps<{
16
+ quote: NegotiableQuoteListEntry;
17
+ }>;
18
+ /** Slot for customizing the created date cell content */
19
+ Created?: SlotProps<{
20
+ quote: NegotiableQuoteListEntry;
21
+ }>;
22
+ /** Slot for customizing the created by cell content */
23
+ CreatedBy?: SlotProps<{
24
+ quote: NegotiableQuoteListEntry;
25
+ }>;
26
+ /** Slot for customizing the status cell content */
27
+ Status?: SlotProps<{
28
+ quote: NegotiableQuoteListEntry;
29
+ }>;
30
+ /** Slot for customizing the last updated cell content */
31
+ LastUpdated?: SlotProps<{
32
+ quote: NegotiableQuoteListEntry;
33
+ }>;
34
+ /** Slot for customizing the quote template cell content */
35
+ QuoteTemplate?: SlotProps<{
36
+ quote: NegotiableQuoteListEntry;
37
+ }>;
38
+ /** Slot for customizing the quote total cell content */
39
+ QuoteTotal?: SlotProps<{
40
+ quote: NegotiableQuoteListEntry;
41
+ }>;
42
+ /** Slot for customizing the actions cell content */
43
+ Actions?: SlotProps<{
44
+ quote: NegotiableQuoteListEntry;
45
+ onViewQuote?: (id: string, name: string, status: string) => void;
46
+ }>;
47
+ /** Slot for customizing the empty quotes message */
48
+ EmptyQuotes?: SlotProps;
49
+ /** Slot for customizing the item range display */
50
+ ItemRange?: SlotProps<{
51
+ startItem: number;
52
+ endItem: number;
53
+ totalCount: number;
54
+ currentPage: number;
55
+ pageSize: number;
56
+ }>;
57
+ /** Slot for customizing the page size picker */
58
+ PageSizePicker?: SlotProps<{
59
+ pageSize: number;
60
+ pageSizeOptions: number[];
61
+ onPageSizeChange?: (pageSize: number) => void;
62
+ }>;
63
+ /** Slot for customizing the pagination */
64
+ Pagination?: SlotProps<{
65
+ currentPage: number;
66
+ totalPages: number;
67
+ onChange?: (page: number) => void;
68
+ }>;
69
+ };
70
+ }
71
+ export declare const QuotesListTable: Container<QuotesListTableProps>;
72
+ //# sourceMappingURL=QuotesListTable.d.ts.map