@dropins/storefront-quote-management 1.2.0 → 1.2.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/api/acceptQuoteTemplate/acceptQuoteTemplate.d.ts +1 -2
  3. package/api/acceptQuoteTemplate/graphql/acceptQuoteTemplate.d.ts +0 -1
  4. package/api/acceptQuoteTemplate/index.d.ts +0 -1
  5. package/api/addQuoteTemplateLineItemNote/addQuoteTemplateLineItemNote.d.ts +1 -2
  6. package/api/addQuoteTemplateLineItemNote/graphql/setQuoteTemplateLineItemNote.d.ts +0 -1
  7. package/api/addQuoteTemplateLineItemNote/index.d.ts +0 -1
  8. package/api/addQuoteTemplateShippingAddress/addQuoteTemplateShippingAddress.d.ts +1 -2
  9. package/api/addQuoteTemplateShippingAddress/graphql/setNegotiableQuoteTemplateShippingAddress.d.ts +0 -1
  10. package/api/addQuoteTemplateShippingAddress/index.d.ts +0 -1
  11. package/api/cancelQuoteTemplate/cancelQuoteTemplate.d.ts +1 -2
  12. package/api/cancelQuoteTemplate/graphql/cancelQuoteTemplate.d.ts +0 -1
  13. package/api/cancelQuoteTemplate/index.d.ts +0 -1
  14. package/api/closeNegotiableQuote/closeNegotiableQuote.d.ts +0 -1
  15. package/api/closeNegotiableQuote/graphql/CloseNegotiableQuoteMutation.d.ts +0 -1
  16. package/api/closeNegotiableQuote/index.d.ts +0 -1
  17. package/api/createQuoteTemplate/createQuoteTemplate.d.ts +8 -2
  18. package/api/createQuoteTemplate/graphql/createQuoteTemplate.d.ts +0 -1
  19. package/api/createQuoteTemplate/index.d.ts +0 -1
  20. package/api/deleteQuote/deleteQuote.d.ts +0 -1
  21. package/api/deleteQuote/graphql/DeleteQuoteMutation.d.ts +0 -1
  22. package/api/deleteQuote/index.d.ts +0 -1
  23. package/api/deleteQuoteTemplate/deleteQuoteTemplate.d.ts +0 -1
  24. package/api/deleteQuoteTemplate/graphql/deleteQuoteTemplate.d.ts +0 -1
  25. package/api/deleteQuoteTemplate/index.d.ts +0 -1
  26. package/api/duplicateNegotiableQuote/duplicateNegotiableQuote.d.ts +8 -2
  27. package/api/duplicateNegotiableQuote/graphql/duplicateNegotiableQuoteMutation.d.ts +0 -1
  28. package/api/duplicateNegotiableQuote/index.d.ts +0 -1
  29. package/api/fetch-graphql/fetch-graphql.d.ts +3 -4
  30. package/api/fetch-graphql/index.d.ts +0 -1
  31. package/api/generateQuoteFromTemplate/generateQuoteFromTemplate.d.ts +0 -1
  32. package/api/generateQuoteFromTemplate/graphql/generateNegotiableQuoteFromTemplate.d.ts +0 -1
  33. package/api/generateQuoteFromTemplate/index.d.ts +0 -1
  34. package/api/getQuoteData/getQuoteData.d.ts +1 -2
  35. package/api/getQuoteData/graphql/QuoteDataQuery.d.ts +0 -1
  36. package/api/getQuoteData/index.d.ts +0 -1
  37. package/api/getQuoteTemplateData/getQuoteTemplateData.d.ts +8 -2
  38. package/api/getQuoteTemplateData/graphql/getQuoteTemplateData.d.ts +0 -1
  39. package/api/getQuoteTemplateData/index.d.ts +0 -1
  40. package/api/getQuoteTemplates/getQuoteTemplates.d.ts +8 -2
  41. package/api/getQuoteTemplates/graphql/getQuoteTemplates.d.ts +0 -1
  42. package/api/getQuoteTemplates/index.d.ts +0 -1
  43. package/api/getStoreConfig/getStoreConfig.d.ts +8 -2
  44. package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +0 -1
  45. package/api/getStoreConfig/index.d.ts +0 -1
  46. package/api/graphql/NegotiableQuoteAddressFragment.d.ts +0 -1
  47. package/api/graphql/NegotiableQuoteFragment.d.ts +0 -1
  48. package/api/graphql/NegotiableQuoteListFragment.d.ts +0 -1
  49. package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +0 -1
  50. package/api/graphql/SearchResultPageInfoFragment.d.ts +0 -1
  51. package/api/graphql/ShippingMethodFragment.d.ts +0 -1
  52. package/api/graphql/SortFieldsFragment.d.ts +0 -1
  53. package/api/index.d.ts +0 -1
  54. package/api/initialize/index.d.ts +0 -1
  55. package/api/initialize/initialize.d.ts +10 -12
  56. package/api/negotiableQuotes/graphql/NegotiableQuotesQuery.d.ts +0 -1
  57. package/api/negotiableQuotes/index.d.ts +0 -1
  58. package/api/negotiableQuotes/negotiableQuotes.d.ts +8 -2
  59. package/api/openQuoteTemplate/graphql/openQuoteTemplate.d.ts +0 -1
  60. package/api/openQuoteTemplate/index.d.ts +0 -1
  61. package/api/openQuoteTemplate/openQuoteTemplate.d.ts +1 -2
  62. package/api/removeNegotiableQuoteItems/graphql/RemoveNegotiableQuoteItemsMutation.d.ts +0 -1
  63. package/api/removeNegotiableQuoteItems/index.d.ts +0 -1
  64. package/api/removeNegotiableQuoteItems/removeNegotiableQuoteItems.d.ts +8 -2
  65. package/api/removeQuoteTemplateItems/graphql/removeNegotiableQuoteTemplateItems.d.ts +0 -1
  66. package/api/removeQuoteTemplateItems/index.d.ts +0 -1
  67. package/api/removeQuoteTemplateItems/removeQuoteTemplateItems.d.ts +1 -2
  68. package/api/renameNegotiableQuote/graphql/RenameNegotiableQuoteMutation.d.ts +0 -1
  69. package/api/renameNegotiableQuote/index.d.ts +0 -1
  70. package/api/renameNegotiableQuote/renameNegotiableQuote.d.ts +8 -2
  71. package/api/requestNegotiableQuote/graphql/RequestNegotiableQuoteMutation.d.ts +0 -1
  72. package/api/requestNegotiableQuote/index.d.ts +0 -1
  73. package/api/requestNegotiableQuote/requestNegotiableQuote.d.ts +8 -2
  74. package/api/sendForReview/graphql/SendNegotiableQuoteForReviewMutation.d.ts +0 -1
  75. package/api/sendForReview/index.d.ts +0 -1
  76. package/api/sendForReview/sendForReview.d.ts +8 -2
  77. package/api/sendQuoteTemplateForReview/graphql/sendQuoteTemplateForReview.d.ts +0 -1
  78. package/api/sendQuoteTemplateForReview/index.d.ts +0 -1
  79. package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +1 -2
  80. package/api/setLineItemNote/graphql/SetLineItemNoteMutation.d.ts +0 -1
  81. package/api/setLineItemNote/index.d.ts +0 -1
  82. package/api/setLineItemNote/setLineItemNote.d.ts +8 -2
  83. package/api/setQuoteTemplateExpirationDate/graphql/setQuoteTemplateExpirationDate.d.ts +0 -1
  84. package/api/setQuoteTemplateExpirationDate/index.d.ts +0 -1
  85. package/api/setQuoteTemplateExpirationDate/setQuoteTemplateExpirationDate.d.ts +8 -2
  86. package/api/setShippingAddress/graphql/SetNegotiableQuoteShippingAddressMutation.d.ts +0 -1
  87. package/api/setShippingAddress/index.d.ts +0 -1
  88. package/api/setShippingAddress/setShippingAddress.d.ts +8 -2
  89. package/api/updateQuantities/graphql/UpdateNegotiableQuoteQuantitiesMutation.d.ts +0 -1
  90. package/api/updateQuantities/index.d.ts +0 -1
  91. package/api/updateQuantities/updateQuantities.d.ts +8 -2
  92. package/api/updateQuoteTemplateItemQuantities/graphql/updateNegotiableQuoteTemplateQuantities.d.ts +0 -1
  93. package/api/updateQuoteTemplateItemQuantities/index.d.ts +0 -1
  94. package/api/updateQuoteTemplateItemQuantities/updateQuoteTemplateItemQuantities.d.ts +1 -2
  95. package/api/uploadFile/graphql/FinishUploadMutation.d.ts +0 -1
  96. package/api/uploadFile/graphql/InitiateUploadMutation.d.ts +0 -1
  97. package/api/uploadFile/index.d.ts +0 -1
  98. package/api/uploadFile/uploadFile.d.ts +0 -1
  99. package/api.d.ts +1 -1
  100. package/api.js +1 -1
  101. package/api.js.map +1 -1
  102. package/chunks/ShippingAddressDisplay.js +1 -1
  103. package/chunks/components.js +1 -1
  104. package/components/ActionsBar/ActionsBar.d.ts +8 -2
  105. package/components/ActionsBar/index.d.ts +0 -1
  106. package/components/AttachedFilesList/AttachedFilesList.d.ts +8 -2
  107. package/components/AttachedFilesList/index.d.ts +0 -1
  108. package/components/ConfirmationModal/ConfirmationModal.d.ts +8 -2
  109. package/components/ConfirmationModal/index.d.ts +0 -1
  110. package/components/ExpirationDateModal/ExpirationDateModal.d.ts +8 -2
  111. package/components/ExpirationDateModal/index.d.ts +0 -1
  112. package/components/ItemsQuoted/ItemsQuoted.d.ts +8 -2
  113. package/components/ItemsQuoted/index.d.ts +0 -1
  114. package/components/LineItemNoteModal/LineItemNoteModal.d.ts +8 -2
  115. package/components/LineItemNoteModal/index.d.ts +0 -1
  116. package/components/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +8 -2
  117. package/components/ManageNegotiableQuote/__fixtures__/ManageNegotiableQuoteProps.d.ts +1 -3
  118. package/components/ManageNegotiableQuote/index.d.ts +0 -1
  119. package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +8 -2
  120. package/components/ManageNegotiableQuoteTemplate/__fixtures__/ManageNegotiableQuoteTemplateProps.d.ts +1 -3
  121. package/components/ManageNegotiableQuoteTemplate/index.d.ts +0 -1
  122. package/components/OrderSummary/OrderSummary.d.ts +8 -2
  123. package/components/OrderSummary/index.d.ts +0 -1
  124. package/components/OrderSummaryLine/OrderSummaryLine.d.ts +8 -2
  125. package/components/OrderSummaryLine/index.d.ts +0 -1
  126. package/components/ProductListTable/ProductListTable.d.ts +8 -2
  127. package/components/ProductListTable/index.d.ts +0 -1
  128. package/components/QuoteCommentsList/QuoteCommentsList.d.ts +8 -2
  129. package/components/QuoteCommentsList/index.d.ts +0 -1
  130. package/components/QuoteHistoryLog/QuoteHistoryLog.d.ts +8 -2
  131. package/components/QuoteHistoryLog/index.d.ts +0 -1
  132. package/components/QuotePricesSummary/QuotePricesSummary.d.ts +8 -2
  133. package/components/QuotePricesSummary/index.d.ts +0 -1
  134. package/components/QuoteSummaryList/QuoteSummaryList.d.ts +8 -2
  135. package/components/QuoteSummaryList/index.d.ts +0 -1
  136. package/components/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +8 -2
  137. package/components/QuoteTemplatesListTable/index.d.ts +0 -1
  138. package/components/QuotesListTable/QuotesListTable.d.ts +8 -2
  139. package/components/QuotesListTable/index.d.ts +0 -1
  140. package/components/ReferenceDocumentFormModal/ReferenceDocumentFormModal.d.ts +8 -2
  141. package/components/ReferenceDocumentFormModal/index.d.ts +0 -1
  142. package/components/ReferenceDocumentsList/ReferenceDocumentsList.d.ts +8 -2
  143. package/components/ReferenceDocumentsList/index.d.ts +0 -1
  144. package/components/RenameQuoteModal/RenameQuoteModal.d.ts +8 -2
  145. package/components/RenameQuoteModal/index.d.ts +0 -1
  146. package/components/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +8 -2
  147. package/components/RequestNegotiableQuoteForm/index.d.ts +0 -1
  148. package/components/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +8 -2
  149. package/components/ShippingAddressDisplay/index.d.ts +0 -1
  150. package/components/TabbedContent/TabbedContent.d.ts +8 -2
  151. package/components/TabbedContent/index.d.ts +0 -1
  152. package/components/index.d.ts +0 -1
  153. package/containers/ItemsQuoted/ItemsQuoted.d.ts +9 -3
  154. package/containers/ItemsQuoted/index.d.ts +0 -1
  155. package/containers/ItemsQuoted.d.ts +1 -3
  156. package/containers/ItemsQuoted.js +1 -1
  157. package/containers/ItemsQuoted.js.map +1 -1
  158. package/containers/ItemsQuotedTemplate/ItemsQuotedTemplate.d.ts +9 -3
  159. package/containers/ItemsQuotedTemplate/index.d.ts +0 -1
  160. package/containers/ItemsQuotedTemplate.d.ts +1 -3
  161. package/containers/ItemsQuotedTemplate.js +1 -1
  162. package/containers/ItemsQuotedTemplate.js.map +1 -1
  163. package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +9 -3
  164. package/containers/ManageNegotiableQuote/index.d.ts +0 -1
  165. package/containers/ManageNegotiableQuote.d.ts +1 -3
  166. package/containers/ManageNegotiableQuote.js +3 -1
  167. package/containers/ManageNegotiableQuote.js.map +1 -1
  168. package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +9 -3
  169. package/containers/ManageNegotiableQuoteTemplate/index.d.ts +0 -1
  170. package/containers/ManageNegotiableQuoteTemplate.d.ts +1 -3
  171. package/containers/ManageNegotiableQuoteTemplate.js +1 -3
  172. package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
  173. package/containers/OrderSummary/OrderSummary.d.ts +9 -3
  174. package/containers/OrderSummary/index.d.ts +0 -1
  175. package/containers/OrderSummary.d.ts +1 -3
  176. package/containers/OrderSummary.js +1 -1
  177. package/containers/OrderSummaryLine/OrderSummaryLine.d.ts +9 -3
  178. package/containers/OrderSummaryLine/index.d.ts +0 -1
  179. package/containers/OrderSummaryLine.d.ts +1 -3
  180. package/containers/OrderSummaryLine.js +1 -1
  181. package/containers/QuoteCommentsList/QuoteCommentsList.d.ts +9 -3
  182. package/containers/QuoteCommentsList/index.d.ts +0 -1
  183. package/containers/QuoteCommentsList.d.ts +1 -3
  184. package/containers/QuoteCommentsList.js +1 -1
  185. package/containers/QuoteCommentsList.js.map +1 -1
  186. package/containers/QuoteHistoryLog/QuoteHistoryLog.d.ts +9 -3
  187. package/containers/QuoteHistoryLog/index.d.ts +0 -1
  188. package/containers/QuoteHistoryLog.d.ts +1 -3
  189. package/containers/QuoteHistoryLog.js +1 -1
  190. package/containers/QuoteHistoryLog.js.map +1 -1
  191. package/containers/QuoteSummaryList/QuoteSummaryList.d.ts +10 -4
  192. package/containers/QuoteSummaryList/index.d.ts +0 -1
  193. package/containers/QuoteSummaryList.d.ts +1 -3
  194. package/containers/QuoteSummaryList.js +1 -1
  195. package/containers/QuoteSummaryList.js.map +1 -1
  196. package/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.d.ts +9 -3
  197. package/containers/QuoteTemplateCommentsList/index.d.ts +0 -1
  198. package/containers/QuoteTemplateCommentsList.d.ts +1 -3
  199. package/containers/QuoteTemplateCommentsList.js +1 -1
  200. package/containers/QuoteTemplateCommentsList.js.map +1 -1
  201. package/containers/QuoteTemplateHistoryLog/QuoteTemplateHistoryLog.d.ts +9 -3
  202. package/containers/QuoteTemplateHistoryLog/index.d.ts +0 -1
  203. package/containers/QuoteTemplateHistoryLog.d.ts +1 -3
  204. package/containers/QuoteTemplateHistoryLog.js +1 -1
  205. package/containers/QuoteTemplateHistoryLog.js.map +1 -1
  206. package/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +9 -3
  207. package/containers/QuoteTemplatesListTable/index.d.ts +0 -1
  208. package/containers/QuoteTemplatesListTable.d.ts +1 -3
  209. package/containers/QuoteTemplatesListTable.js +1 -1
  210. package/containers/QuotesListTable/QuotesListTable.d.ts +9 -3
  211. package/containers/QuotesListTable/index.d.ts +0 -1
  212. package/containers/QuotesListTable.d.ts +1 -3
  213. package/containers/QuotesListTable.js +1 -1
  214. package/containers/QuotesListTable.js.map +1 -1
  215. package/containers/RequestNegotiableQuoteForm/RequestNegotiableQuoteForm.d.ts +9 -3
  216. package/containers/RequestNegotiableQuoteForm/index.d.ts +0 -1
  217. package/containers/RequestNegotiableQuoteForm.d.ts +1 -3
  218. package/containers/RequestNegotiableQuoteForm.js +1 -1
  219. package/containers/ShippingAddressDisplay/ShippingAddressDisplay.d.ts +9 -3
  220. package/containers/ShippingAddressDisplay/index.d.ts +0 -1
  221. package/containers/ShippingAddressDisplay.d.ts +1 -1
  222. package/containers/index.d.ts +0 -1
  223. package/data/models/__fixtures__/negotiableQuoteModel.d.ts +8 -2
  224. package/data/models/__fixtures__/negotiableQuoteTemplateModel.d.ts +8 -2
  225. package/data/models/__fixtures__/negotiableQuoteTemplatesListModel.d.ts +8 -2
  226. package/data/models/__fixtures__/negotiableQuotesListModel.d.ts +8 -2
  227. package/data/models/__fixtures__/storeConfigModel.d.ts +8 -2
  228. package/data/models/index.d.ts +0 -1
  229. package/data/models/negotiable-quote-model.d.ts +1 -2
  230. package/data/models/negotiable-quote-template-model.d.ts +8 -2
  231. package/data/models/store-config-model.d.ts +0 -1
  232. package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +9 -4
  233. package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +0 -1
  234. package/data/transforms/__fixtures__/storeConfigData.d.ts +0 -1
  235. package/data/transforms/index.d.ts +0 -1
  236. package/data/transforms/transform-history.d.ts +8 -2
  237. package/data/transforms/transform-quote-items.d.ts +8 -2
  238. package/data/transforms/transform-quote-template.d.ts +8 -2
  239. package/data/transforms/transform-quote.d.ts +8 -2
  240. package/data/transforms/transform-store-config.d.ts +8 -2
  241. package/hooks/useExpirationDate.d.ts +0 -1
  242. package/hooks/useItemsQuotedTemplate.d.ts +8 -2
  243. package/hooks/useQuoteSummaryData.d.ts +9 -4
  244. package/hooks/useReferenceDocumentLinks.d.ts +8 -2
  245. package/hooks/useRemoveTemplateItems.d.ts +8 -2
  246. package/hooks/useRenameTemplate.d.ts +0 -1
  247. package/hooks/useUpdateTemplateQuantities.d.ts +8 -2
  248. package/lib/configurationTransformers.d.ts +0 -1
  249. package/lib/itemFormatters.d.ts +11 -7
  250. package/lib/priceCalculators.d.ts +14 -13
  251. package/lib/state.d.ts +8 -3
  252. package/package.json +1 -1
  253. package/render/Provider.d.ts +8 -2
  254. package/render/index.d.ts +0 -1
  255. package/render/render.d.ts +9 -4
  256. package/render.d.ts +1 -1
  257. package/types/state.types.d.ts +8 -2
  258. package/utils/dateUtils.d.ts +0 -1
  259. package/utils/fileUtils.d.ts +0 -1
  260. package/utils/mapAuthPermissions.d.ts +8 -2
  261. package/chunks/ItemsQuoted.js +0 -4
  262. package/chunks/ItemsQuoted.js.map +0 -1
  263. package/chunks/ItemsQuotedTemplate.js +0 -4
  264. package/chunks/ItemsQuotedTemplate.js.map +0 -1
  265. package/chunks/QuoteCommentsList.js +0 -4
  266. package/chunks/QuoteCommentsList.js.map +0 -1
  267. package/chunks/QuoteHistoryLog.js +0 -4
  268. package/chunks/QuoteHistoryLog.js.map +0 -1
  269. package/chunks/QuoteTemplateCommentsList.js +0 -4
  270. package/chunks/QuoteTemplateCommentsList.js.map +0 -1
  271. package/chunks/QuoteTemplateHistoryLog.js +0 -4
  272. package/chunks/QuoteTemplateHistoryLog.js.map +0 -1
  273. package/i18n/en_US.json.d.ts +0 -485
@@ -1,5 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
2
-
3
10
  export interface RequestNegotiableQuoteInput {
4
11
  cartId: string;
5
12
  quoteName: string;
@@ -10,4 +17,3 @@ export interface RequestNegotiableQuoteInput {
10
17
  }[];
11
18
  }
12
19
  export declare const requestNegotiableQuote: (input: RequestNegotiableQuoteInput) => Promise<NegotiableQuoteModel | null>;
13
- //# sourceMappingURL=requestNegotiableQuote.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const SEND_NEGOTIABLE_QUOTE_FOR_REVIEW_MUTATION: string;
10
- //# sourceMappingURL=SendNegotiableQuoteForReviewMutation.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './sendForReview';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
2
-
3
10
  export interface SendForReviewInput {
4
11
  quoteUid: string;
5
12
  comment?: string;
@@ -8,4 +15,3 @@ export interface SendForReviewInput {
8
15
  }[];
9
16
  }
10
17
  export declare const sendForReview: (input: SendForReviewInput) => Promise<NegotiableQuoteModel | null>;
11
- //# sourceMappingURL=sendForReview.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const SEND_QUOTE_TEMPLATE_FOR_REVIEW_MUTATION: string;
10
- //# sourceMappingURL=sendQuoteTemplateForReview.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './sendQuoteTemplateForReview';
10
- //# sourceMappingURL=index.d.ts.map
@@ -21,5 +21,4 @@ export interface SendQuoteTemplateForReviewParams {
21
21
  key: string;
22
22
  }[];
23
23
  }
24
- export declare const sendQuoteTemplateForReview: (params: SendQuoteTemplateForReviewParams) => Promise<import('../../data/models/negotiable-quote-template-model').NegotiableQuoteTemplateModel>;
25
- //# sourceMappingURL=sendQuoteTemplateForReview.d.ts.map
24
+ export declare const sendQuoteTemplateForReview: (params: SendQuoteTemplateForReviewParams) => Promise<any>;
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const SET_LINE_ITEM_NOTE_MUTATION: string;
10
- //# sourceMappingURL=SetLineItemNoteMutation.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './setLineItemNote';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
2
-
3
10
  export interface SetLineItemNoteInput {
4
11
  quoteUid: string;
5
12
  itemUid: string;
@@ -7,4 +14,3 @@ export interface SetLineItemNoteInput {
7
14
  quantity?: number;
8
15
  }
9
16
  export declare const setLineItemNote: (input: SetLineItemNoteInput) => Promise<NegotiableQuoteModel | null>;
10
- //# sourceMappingURL=setLineItemNote.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const SET_QUOTE_TEMPLATE_EXPIRATION_DATE_MUTATION: string;
10
- //# sourceMappingURL=setQuoteTemplateExpirationDate.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './setQuoteTemplateExpirationDate';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,14 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteTemplateModel } from '../../data/models/negotiable-quote-template-model';
2
-
3
10
  export interface SetQuoteTemplateExpirationDateParams {
4
11
  templateId: string;
5
12
  expirationDate: string;
6
13
  }
7
14
  export declare const setQuoteTemplateExpirationDate: (params: SetQuoteTemplateExpirationDateParams) => Promise<NegotiableQuoteTemplateModel | null>;
8
- //# sourceMappingURL=setQuoteTemplateExpirationDate.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const SET_NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_MUTATION: string;
10
- //# sourceMappingURL=SetNegotiableQuoteShippingAddressMutation.d.ts.map
@@ -1,2 +1 @@
1
1
  export * from './setShippingAddress';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
2
-
3
10
  export interface AddressInput {
4
11
  /** City name */
5
12
  city: string;
@@ -107,4 +114,3 @@ export interface SetShippingAddressInput {
107
114
  * ```
108
115
  */
109
116
  export declare const setShippingAddress: (input: SetShippingAddressInput) => Promise<NegotiableQuoteModel | null>;
110
- //# sourceMappingURL=setShippingAddress.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const UPDATE_NEGOTIABLE_QUOTE_QUANTITIES_MUTATION: string;
10
- //# sourceMappingURL=UpdateNegotiableQuoteQuantitiesMutation.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './updateQuantities';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
1
9
  import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
2
-
3
10
  export interface QuantityItem {
4
11
  /** The unique ID of the quote item */
5
12
  quoteItemUid: string;
@@ -33,4 +40,3 @@ export interface UpdateQuantitiesInput {
33
40
  * ```
34
41
  */
35
42
  export declare const updateQuantities: (input: UpdateQuantitiesInput) => Promise<NegotiableQuoteModel | null>;
36
- //# sourceMappingURL=updateQuantities.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION: string;
10
- //# sourceMappingURL=updateNegotiableQuoteTemplateQuantities.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './updateQuoteTemplateItemQuantities';
10
- //# sourceMappingURL=index.d.ts.map
@@ -16,5 +16,4 @@ export interface UpdateQuoteTemplateItemQuantitiesParams {
16
16
  templateId: string;
17
17
  items: NegotiableQuoteTemplateItemQuantityInput[];
18
18
  }
19
- export declare const updateQuoteTemplateItemQuantities: (params: UpdateQuoteTemplateItemQuantitiesParams) => Promise<import('../../data/models/negotiable-quote-template-model').NegotiableQuoteTemplateModel>;
20
- //# sourceMappingURL=updateQuoteTemplateItemQuantities.d.ts.map
19
+ export declare const updateQuoteTemplateItemQuantities: (params: UpdateQuoteTemplateItemQuantitiesParams) => Promise<any>;
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const FINISH_UPLOAD_MUTATION = "\n mutation FINISH_UPLOAD_MUTATION($input: finishUploadInput!) {\n finishUpload(input: $input) {\n success\n key\n message\n }\n }\n";
10
- //# sourceMappingURL=FinishUploadMutation.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare const INITIATE_UPLOAD_MUTATION = "\n mutation INITIATE_UPLOAD_MUTATION($input: initiateUploadInput!) {\n initiateUpload(input: $input) {\n upload_url\n key\n expires_at\n }\n }\n";
10
- //# sourceMappingURL=InitiateUploadMutation.d.ts.map
@@ -7,4 +7,3 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export * from './uploadFile';
10
- //# sourceMappingURL=index.d.ts.map
@@ -9,4 +9,3 @@
9
9
  export declare const uploadFile: (file: File) => Promise<{
10
10
  key: string;
11
11
  }>;
12
- //# sourceMappingURL=uploadFile.d.ts.map
package/api.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './api/index'
1
+ export * from './api/index';
package/api.js CHANGED
@@ -413,7 +413,7 @@ import{events as _}from"@dropins/tools/event-bus.js";import{FetchGraphQL as F}fr
413
413
  }
414
414
  }
415
415
  ${I}
416
- `;function B(e){if(!e)return A;const a=t=>[y.TAX_EXCLUDED,y.TAX_INCLUDED,y.TAX_INCLUDED_AND_EXCLUDED].includes(t)?t:y.TAX_EXCLUDED;return{quoteSummaryDisplayTotal:e.cart_summary_display_quantity,quoteSummaryMaxItems:e.max_items_in_order_summary,quoteDisplaySettings:{zeroTax:e.shopping_cart_display_zero_tax,subtotal:a(e.shopping_cart_display_subtotal),price:a(e.shopping_cart_display_price),shipping:a(e.shopping_cart_display_shipping),fullSummary:e.shopping_cart_display_full_summary,grandTotal:e.shopping_cart_display_grand_total},useConfigurableParentThumbnail:e.configurable_thumbnail_source==="parent",quoteMinimumAmount:e.quote_minimum_amount??null,quoteMinimumAmountMessage:e.quote_minimum_amount_message??null}}function j(e){var a,t,r,o,n,c,d;return{uid:e.uid,createdAt:e.created_at,author:{firstname:e.author.firstname,lastname:e.author.lastname},changeType:e.change_type,changes:{commentAdded:((a=e.changes)==null?void 0:a.comment_added)&&{comment:e.changes.comment_added.comment},customChanges:((t=e.changes)==null?void 0:t.custom_changes)&&{new_value:e.changes.custom_changes.new_value,old_value:e.changes.custom_changes.old_value,title:e.changes.custom_changes.title},expiration:((r=e.changes)==null?void 0:r.expiration)&&{newExpiration:e.changes.expiration.new_expiration,oldExpiration:e.changes.expiration.old_expiration},productsRemoved:((o=e.changes)==null?void 0:o.products_removed)&&{productsRemovedFromCatalog:e.changes.products_removed.products_removed_from_catalog||[],productsRemovedFromQuote:e.changes.products_removed.products_removed_from_quote||[]},statuses:((n=e.changes)==null?void 0:n.statuses)&&{changes:((c=e.changes.statuses.changes)==null?void 0:c.map(u=>({newStatus:u==null?void 0:u.new_status,oldStatus:u==null?void 0:u.old_status})))||[]},total:((d=e.changes)==null?void 0:d.total)&&e.changes.total.new_price&&e.changes.total.old_price&&{newPrice:{value:e.changes.total.new_price.value,currency:e.changes.total.new_price.currency},oldPrice:{value:e.changes.total.old_price.value,currency:e.changes.total.old_price.currency}}}}}function q(e){if(e)return e.map(j)}function D(e,a){return e!=null&&e.length&&[...e].sort((r,o)=>o.quantity-r.quantity).find(r=>a>=r.quantity)||null}function X(e){var t,r,o,n;const a=l.config;return{src:a!=null&&a.useConfigurableParentThumbnail?e.product.thumbnail.url:((r=(t=e.configured_variant)==null?void 0:t.thumbnail)==null?void 0:r.url)||e.product.thumbnail.url,alt:a!=null&&a.useConfigurableParentThumbnail?e.product.thumbnail.label:((n=(o=e.configured_variant)==null?void 0:o.thumbnail)==null?void 0:n.label)||e.product.thumbnail.label}}function V(e){var a;return((a=e.links)==null?void 0:a.length)>0?{count:e.links.length,result:e.links.map(t=>t.title).join(", ")}:null}function H(e){var c,d,u,i;const a=e.quantity,t=e.__typename==="ConfigurableCartItem",r=t?(c=e.configured_variant)==null?void 0:c.price_tiers:e.product.price_tiers,o=t?(d=e.configured_variant)==null?void 0:d.price_range:e.product.price_range,n=D(r,a);return n?n.discount.amount_off>0:(((i=(u=o==null?void 0:o.maximum_price)==null?void 0:u.discount)==null?void 0:i.amount_off)??0)>0}function W(e){var o,n,c,d,u,i,s,m;const a=e.quantity,t=D(e.product.price_tiers,a);if(t)return Math.round(t.discount.percent_off);let r;if(e.__typename==="ConfigurableCartItem")r=(d=(c=(n=(o=e==null?void 0:e.configured_variant)==null?void 0:o.price_range)==null?void 0:n.maximum_price)==null?void 0:c.discount)==null?void 0:d.percent_off;else{if(e.__typename==="BundleCartItem")return;r=(m=(s=(i=(u=e==null?void 0:e.product)==null?void 0:u.price_range)==null?void 0:i.maximum_price)==null?void 0:s.discount)==null?void 0:m.percent_off}if(r!==0)return Math.round(r)}function Y(e){var a,t,r,o;return e.__typename==="ConfigurableCartItem"?{value:(t=(a=e.configured_variant)==null?void 0:a.price_range)==null?void 0:t.maximum_price.regular_price.value,currency:(o=(r=e.configured_variant)==null?void 0:r.price_range)==null?void 0:o.maximum_price.regular_price.currency}:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency}}function K(e){var r,o,n,c,d,u;let a,t;if(a=((o=(r=e==null?void 0:e.prices)==null?void 0:r.original_row_total)==null?void 0:o.value)-((c=(n=e==null?void 0:e.prices)==null?void 0:n.row_total)==null?void 0:c.value),t=(u=(d=e==null?void 0:e.prices)==null?void 0:d.row_total)==null?void 0:u.currency,a!==0)return{value:a,currency:t}}function J(e){var a,t,r,o,n,c,d,u;return{itemType:e.__typename,uid:e.uid,product:{uid:e.product.uid,sku:e.product.sku,name:e.product.name,priceRange:{maximumPrice:{regularPrice:{value:e.product.price_range.maximum_price.regular_price.value,currency:e.product.price_range.maximum_price.regular_price.currency}}}},image:X(e),links:V(e),discounted:H(e),discountedTotal:{value:e.prices.row_total.value,currency:e.prices.row_total.currency},catalogDiscount:{amountOff:e.prices.catalog_discount.amount_off,percentOff:e.prices.catalog_discount.percent_off},rowCatalogDiscount:{amountOff:e.prices.row_catalog_discount.amount_off,percentOff:e.prices.row_catalog_discount.percent_off},discounts:((t=(a=e.prices)==null?void 0:a.discounts)==null?void 0:t.map(i=>({label:i.label,value:i.value,amount:{value:i.amount.value,currency:i.amount.currency}})))??[],discountPercentage:W(e),insufficientQuantity:(e.__typename==="ConfigurableCartItem"?((r=e.configured_variant)==null?void 0:r.stock_status)??e.product.stock_status:e.product.stock_status)==="IN_STOCK"&&!e.is_available,outOfStock:e.product.stock_status==="OUT_OF_STOCK",stockStatus:e.product.stock_status,quantity:e.quantity,prices:{regularPrice:Y(e),priceIncludingTax:{value:e.prices.price_including_tax.value,currency:e.prices.price_including_tax.currency},originalItemPrice:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency},originalRowTotal:{value:e.prices.original_row_total.value,currency:e.prices.original_row_total.currency},rowTotal:{value:e.prices.row_total.value,currency:e.prices.row_total.currency},rowTotalIncludingTax:{value:e.prices.row_total_including_tax.value,currency:e.prices.row_total_including_tax.currency}},savingsAmount:K(e),noteFromBuyer:(o=e.note_from_buyer)==null?void 0:o.map(i=>({createdAt:i.created_at,creatorId:i.creator_id,creatorType:i.creator_type,negotiableQuoteItemUid:i.negotiable_quote_item_uid,note:i.note,noteUid:i.note_uid})),noteFromSeller:(n=e.note_from_seller)==null?void 0:n.map(i=>({createdAt:i.created_at,creatorId:i.creator_id,creatorType:i.creator_type,negotiableQuoteItemUid:i.negotiable_quote_item_uid,note:i.note,noteUid:i.note_uid})),configurableOptions:(c=e.configurable_options)==null?void 0:c.map(i=>({optionLabel:i.option_label,valueLabel:i.value_label})),bundleOptions:(d=e.bundle_options)==null?void 0:d.map(i=>({label:i.label,values:i.values.map(s=>({label:s.label,quantity:s.quantity,originalPrice:{value:s.original_price.value,currency:s.original_price.currency},price:{value:s.priceV2.value,currency:s.priceV2.currency}}))})),customizableOptions:(u=e.customizable_options)==null?void 0:u.map(i=>({type:i.type,label:i.label,values:i.values.map(s=>({label:s.label,value:s.value}))}))}}function O(e){return e?e.map(J):[]}const Q=["DRAFT","UPDATED","DECLINED","EXPIRED","NEW","OPEN"];function Z(e){if(!e.items)return 0;const a=l.config;return(a==null?void 0:a.quoteSummaryDisplayTotal)===0?e.items.length:(a==null?void 0:a.quoteSummaryDisplayTotal)===1?e.total_quantity:e.items.length}function ee(e){return e.every(a=>!a.outOfStock&&!a.insufficientQuantity)}function te(e){var o,n,c,d,u,i;const a=P(e),t=!!((o=e.template_name)!=null&&o.trim()),r=O(e.items);return{uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,expirationDate:e.expiration_date,status:a?N.NEW:e.status,isVirtual:!!e.is_virtual,salesRepName:e.sales_rep_name,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},email:e.email,templateName:e.template_name,totalQuantity:Z(e),comments:(n=e.comments)==null?void 0:n.map(s=>{const m={uid:s.uid,createdAt:s.created_at,author:{firstname:s.author.firstname,lastname:s.author.lastname},text:s.text};return Array.isArray(s.attachments)&&s.attachments.length>0&&(m.attachments=s.attachments.map(E=>({name:E.name,url:E.url}))),m}),prices:e.prices&&{appliedDiscounts:(c=e.prices.discounts)==null?void 0:c.map(s=>({amount:{value:s.amount.value,currency:s.amount.currency},label:s.label,coupon:s.coupon})),appliedTaxes:(d=e.prices.applied_taxes)==null?void 0:d.map(s=>({amount:{value:s.amount.value,currency:s.amount.currency},label:s.label})),discount:e.prices.discounts&&e.prices.grand_total&&U(e.prices.discounts,e.prices.grand_total.currency),grandTotal:e.prices.grand_total&&{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency},grandTotalExcludingTax:e.prices.grand_total_excluding_tax&&{value:e.prices.grand_total_excluding_tax.value,currency:e.prices.grand_total_excluding_tax.currency},subtotalExcludingTax:e.prices.subtotal_excluding_tax&&{value:e.prices.subtotal_excluding_tax.value,currency:e.prices.subtotal_excluding_tax.currency},subtotalIncludingTax:e.prices.subtotal_including_tax&&{value:e.prices.subtotal_including_tax.value,currency:e.prices.subtotal_including_tax.currency},subtotalWithDiscountExcludingTax:e.prices.subtotal_with_discount_excluding_tax&&{value:e.prices.subtotal_with_discount_excluding_tax.value,currency:e.prices.subtotal_with_discount_excluding_tax.currency},...oe(e),totalTax:e.prices.applied_taxes&&e.prices.grand_total&&U(e.prices.applied_taxes,e.prices.grand_total.currency)},history:q(e.history),items:r,shippingAddresses:(u=e.shipping_addresses)==null?void 0:u.map(s=>{const m={uid:s.uid,firstname:s.firstname,lastname:s.lastname,company:s.company,street:s.street,city:s.city,postcode:s.postcode,country:{code:s.country.code,label:s.country.label},telephone:s.telephone};return s.region&&(m.region={code:s.region.code,label:s.region.label,regionId:s.region.region_id}),m}),canCheckout:["UPDATED","DECLINED"].includes(e.status)&&l.permissions.checkoutQuote&&((i=e.shipping_addresses)==null?void 0:i.length)>0&&ee(r),canSendForReview:!t&&(a||Q.includes(e.status))&&l.permissions.editQuote,canUpdateQuote:!t&&(a||Q.includes(e.status))&&l.permissions.editQuote,canDelete:!t&&!["PENDING","SUBMITTED","ORDERED"].includes(e.status)&&l.permissions.deleteQuote,canClose:e.status?!t&&!["DRAFT","CLOSED","ORDERED","OPEN"].includes(e.status):!1,readOnly:t||!a&&["ORDERED","SUBMITTED","CLOSED","PENDING"].includes(e.status)||!l.permissions.editQuote}}function h(e){return e?te(e):null}function P(e){return e.status==="SUBMITTED"&&!(e.history??[]).some(a=>{var t,r;return a.change_type==="UPDATED"&&(((r=(t=a.changes)==null?void 0:t.statuses)==null?void 0:r.changes)??[]).length>0})}function re(e){const a=P(e);return{uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,status:a?N.NEW:e.status,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},templateName:e.template_name,prices:{grandTotal:{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency}}}}function ae(e){var r;if(!e)return null;const a={items:((r=e.items)==null?void 0:r.filter(o=>o==null?void 0:o.uid).map(re))||[],pageInfo:{currentPage:e.page_info.current_page,pageSize:e.page_info.page_size,totalPages:e.page_info.total_pages},totalCount:e.total_count,sortFields:e.sort_fields?{default:e.sort_fields.default,options:e.sort_fields.options}:void 0},t=x(a);return{...a,paginationInfo:t||void 0}}function x(e){if(!(e!=null&&e.pageInfo)||!e.totalCount)return null;const{currentPage:a,pageSize:t,totalPages:r}=e.pageInfo,{totalCount:o}=e,n=o>0?(a-1)*t+1:0,c=Math.min(a*t,o);return{currentPage:a,totalCount:o,pageSize:t,startItem:n,endItem:c,totalPages:r,pageSizeOptions:[20,30,50,100,200]}}const rt=()=>[20,30,50,100,200];function U(e,a){return e!=null&&e.length?e.reduce((t,r)=>({value:t.value+r.amount.value,currency:r.amount.currency}),{value:0,currency:a}):{value:0,currency:a}}function oe(e){var r;if(!e||!((r=e.shipping_addresses)!=null&&r.length))return{};const t=e.shipping_addresses[0].selected_shipping_method;return t?{shippingIncludingTax:t.price_incl_tax&&{value:t.price_incl_tax.value,currency:t.price_incl_tax.currency},shippingExcludingTax:t.price_excl_tax&&{value:t.price_excl_tax.value,currency:t.price_excl_tax.currency}}:{}}function f(e){var a,t,r,o;return e?{id:e.template_id,uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,expirationDate:e.expiration_date,status:e.status,salesRepName:e.sales_rep_name,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},comments:(a=e.comments)==null?void 0:a.map(n=>{var c;return{uid:n.uid,createdAt:n.created_at,author:{firstname:n.author.firstname,lastname:n.author.lastname},text:n.text,attachments:(c=n.attachments)==null?void 0:c.map(d=>({name:d.name,url:d.url}))}}),prices:e.prices&&{subtotalExcludingTax:e.prices.subtotal_excluding_tax&&{value:e.prices.subtotal_excluding_tax.value,currency:e.prices.subtotal_excluding_tax.currency},subtotalIncludingTax:e.prices.subtotal_including_tax&&{value:e.prices.subtotal_including_tax.value,currency:e.prices.subtotal_including_tax.currency},subtotalWithDiscountExcludingTax:e.prices.subtotal_with_discount_excluding_tax&&{value:e.prices.subtotal_with_discount_excluding_tax.value,currency:e.prices.subtotal_with_discount_excluding_tax.currency},appliedTaxes:(t=e.prices.applied_taxes)==null?void 0:t.map(n=>({amount:{value:n.amount.value,currency:n.amount.currency},label:n.label})),grandTotal:e.prices.grand_total&&{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency}},history:q(e.history),items:O(e.items),shippingAddresses:(r=e.shipping_addresses)==null?void 0:r.map(n=>({uid:n.uid,firstname:n.firstname,lastname:n.lastname,company:n.company,street:n.street,city:n.city,postcode:n.postcode,country:{code:n.country.code,label:n.country.label},telephone:n.telephone,region:n.region?{code:n.region.code,label:n.region.label,regionId:n.region.region_id}:void 0})),referenceDocuments:(o=e.reference_document_links)==null?void 0:o.map(n=>({uid:n.link_id,name:n.document_name,identifier:n.document_identifier,url:n.reference_document_url})),canAccept:[g.SUBMITTED,g.PENDING,g.OPEN].includes(e.status),canDelete:e.status===g.DRAFT,canReopen:[g.DECLINED,g.CANCELED,g.EXPIRED].includes(e.status),canCancel:[g.SUBMITTED,g.PENDING,g.OPEN,g.ACTIVE,g.EDITED].includes(e.status),canSendForReview:[g.OPEN,g.DRAFT,g.NEW,g.EDITED].includes(e.status),canGenerateQuoteFromTemplate:[g.ACTIVE].includes(e.status),canEditTemplateItems:[g.SUBMITTED,g.DRAFT,g.OPEN,g.EDITED].includes(e.status)}:null}function ne(e){var r;if(!e)return null;const a={items:((r=e.items)==null?void 0:r.map(o=>{var n,c,d;return{id:o.template_id,uid:o.uid,name:o.name,createdAt:o.created_at,updatedAt:o.updated_at,status:o.status,state:o.state,prices:{grandTotal:(n=o.prices)!=null&&n.grand_total?{value:o.prices.grand_total.value,currency:o.prices.grand_total.currency}:{value:0,currency:"USD"},minNegotiatedGrandTotal:{value:o.min_negotiated_grand_total,currency:((d=(c=o.prices)==null?void 0:c.grand_total)==null?void 0:d.currency)||"USD"}},lastSharedAt:o.last_shared_at,lastOrderedAt:o.last_ordered_at,expirationDate:o.expiration_date,ordersPlaced:o.orders_placed,canGenerateQuoteFromTemplate:[g.ACTIVE].includes(o.status)}}))||[],pageInfo:{currentPage:e.page_info.current_page,pageSize:e.page_info.page_size,totalPages:e.page_info.total_pages},totalCount:e.total_count,sortFields:e.sort_fields?{default:e.sort_fields.default,options:e.sort_fields.options}:void 0},t=x(a);return{...a,paginationInfo:t||void 0}}const at=async e=>{const{cartId:a,quoteName:t,comment:r,attachments:o,isDraft:n}=e;if(!a)throw new Error("Cart ID is required");if(!t)throw new Error("Quote name is required");if(!r)throw new Error("Comment is required");return p(k,{variables:{cartId:a,quoteName:t,comment:o!=null&&o.length?{comment:r,attachments:o}:{comment:r},isDraft:n}}).then(c=>{var i,s;const{errors:d}=c;if(d){const m=d.map(E=>E.message).join("; ");throw new Error(`Failed to request negotiable quote: ${m}`)}const u=h((s=(i=c.data)==null?void 0:i.requestNegotiableQuote)==null?void 0:s.quote);if(!u)throw new Error("Failed to transform quote data: Invalid response structure");return _.emit("quote-management/negotiable-quote-requested",{quote:u,input:{cartId:a,quoteName:t,comment:r,attachments:o,isDraft:n}}),u})},ie=`
416
+ `;function B(e){if(!e)return A;const a=t=>[y.TAX_EXCLUDED,y.TAX_INCLUDED,y.TAX_INCLUDED_AND_EXCLUDED].includes(t)?t:y.TAX_EXCLUDED;return{quoteSummaryDisplayTotal:e.cart_summary_display_quantity,quoteSummaryMaxItems:e.max_items_in_order_summary,quoteDisplaySettings:{zeroTax:e.shopping_cart_display_zero_tax,subtotal:a(e.shopping_cart_display_subtotal),price:a(e.shopping_cart_display_price),shipping:a(e.shopping_cart_display_shipping),fullSummary:e.shopping_cart_display_full_summary,grandTotal:e.shopping_cart_display_grand_total},useConfigurableParentThumbnail:e.configurable_thumbnail_source==="parent",quoteMinimumAmount:e.quote_minimum_amount??null,quoteMinimumAmountMessage:e.quote_minimum_amount_message??null}}function j(e){var a,t,r,o,n,c,d;return{uid:e.uid,createdAt:e.created_at,author:{firstname:e.author.firstname,lastname:e.author.lastname},changeType:e.change_type,changes:{commentAdded:((a=e.changes)==null?void 0:a.comment_added)&&{comment:e.changes.comment_added.comment},customChanges:((t=e.changes)==null?void 0:t.custom_changes)&&{new_value:e.changes.custom_changes.new_value,old_value:e.changes.custom_changes.old_value,title:e.changes.custom_changes.title},expiration:((r=e.changes)==null?void 0:r.expiration)&&{newExpiration:e.changes.expiration.new_expiration,oldExpiration:e.changes.expiration.old_expiration},productsRemoved:((o=e.changes)==null?void 0:o.products_removed)&&{productsRemovedFromCatalog:e.changes.products_removed.products_removed_from_catalog||[],productsRemovedFromQuote:e.changes.products_removed.products_removed_from_quote||[]},statuses:((n=e.changes)==null?void 0:n.statuses)&&{changes:((c=e.changes.statuses.changes)==null?void 0:c.map(u=>({newStatus:u==null?void 0:u.new_status,oldStatus:u==null?void 0:u.old_status})))||[]},total:((d=e.changes)==null?void 0:d.total)&&e.changes.total.new_price&&e.changes.total.old_price&&{newPrice:{value:e.changes.total.new_price.value,currency:e.changes.total.new_price.currency},oldPrice:{value:e.changes.total.old_price.value,currency:e.changes.total.old_price.currency}}}}}function q(e){if(e)return e.map(j)}function D(e,a){return e!=null&&e.length&&[...e].sort((r,o)=>o.quantity-r.quantity).find(r=>a>=r.quantity)||null}function X(e){var t,r,o,n;const a=l.config;return{src:a!=null&&a.useConfigurableParentThumbnail?e.product.thumbnail.url:((r=(t=e.configured_variant)==null?void 0:t.thumbnail)==null?void 0:r.url)||e.product.thumbnail.url,alt:a!=null&&a.useConfigurableParentThumbnail?e.product.thumbnail.label:((n=(o=e.configured_variant)==null?void 0:o.thumbnail)==null?void 0:n.label)||e.product.thumbnail.label}}function V(e){var a;return((a=e.links)==null?void 0:a.length)>0?{count:e.links.length,result:e.links.map(t=>t.title).join(", ")}:null}function H(e){var c,d,u,i;const a=e.quantity,t=e.__typename==="ConfigurableCartItem",r=t?(c=e.configured_variant)==null?void 0:c.price_tiers:e.product.price_tiers,o=t?(d=e.configured_variant)==null?void 0:d.price_range:e.product.price_range,n=D(r,a);return n?n.discount.amount_off>0:(((i=(u=o==null?void 0:o.maximum_price)==null?void 0:u.discount)==null?void 0:i.amount_off)??0)>0}function W(e){var o,n,c,d,u,i,s,m;const a=e.quantity,t=D(e.product.price_tiers,a);if(t)return Math.round(t.discount.percent_off);let r;if(e.__typename==="ConfigurableCartItem")r=(d=(c=(n=(o=e==null?void 0:e.configured_variant)==null?void 0:o.price_range)==null?void 0:n.maximum_price)==null?void 0:c.discount)==null?void 0:d.percent_off;else{if(e.__typename==="BundleCartItem")return;r=(m=(s=(i=(u=e==null?void 0:e.product)==null?void 0:u.price_range)==null?void 0:i.maximum_price)==null?void 0:s.discount)==null?void 0:m.percent_off}if(r!==0)return Math.round(r)}function Y(e){var a,t,r,o;return e.__typename==="ConfigurableCartItem"?{value:(t=(a=e.configured_variant)==null?void 0:a.price_range)==null?void 0:t.maximum_price.regular_price.value,currency:(o=(r=e.configured_variant)==null?void 0:r.price_range)==null?void 0:o.maximum_price.regular_price.currency}:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency}}function K(e){var r,o,n,c,d,u;const a=((o=(r=e==null?void 0:e.prices)==null?void 0:r.original_row_total)==null?void 0:o.value)-((c=(n=e==null?void 0:e.prices)==null?void 0:n.row_total)==null?void 0:c.value),t=(u=(d=e==null?void 0:e.prices)==null?void 0:d.row_total)==null?void 0:u.currency;if(a!==0)return{value:a,currency:t}}function J(e){var a,t,r,o,n,c,d,u;return{itemType:e.__typename,uid:e.uid,product:{uid:e.product.uid,sku:e.product.sku,name:e.product.name,priceRange:{maximumPrice:{regularPrice:{value:e.product.price_range.maximum_price.regular_price.value,currency:e.product.price_range.maximum_price.regular_price.currency}}}},image:X(e),links:V(e),discounted:H(e),discountedTotal:{value:e.prices.row_total.value,currency:e.prices.row_total.currency},catalogDiscount:{amountOff:e.prices.catalog_discount.amount_off,percentOff:e.prices.catalog_discount.percent_off},rowCatalogDiscount:{amountOff:e.prices.row_catalog_discount.amount_off,percentOff:e.prices.row_catalog_discount.percent_off},discounts:((t=(a=e.prices)==null?void 0:a.discounts)==null?void 0:t.map(i=>({label:i.label,value:i.value,amount:{value:i.amount.value,currency:i.amount.currency}})))??[],discountPercentage:W(e),insufficientQuantity:(e.__typename==="ConfigurableCartItem"?((r=e.configured_variant)==null?void 0:r.stock_status)??e.product.stock_status:e.product.stock_status)==="IN_STOCK"&&!e.is_available,outOfStock:e.product.stock_status==="OUT_OF_STOCK",stockStatus:e.product.stock_status,quantity:e.quantity,prices:{regularPrice:Y(e),priceIncludingTax:{value:e.prices.price_including_tax.value,currency:e.prices.price_including_tax.currency},originalItemPrice:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency},originalRowTotal:{value:e.prices.original_row_total.value,currency:e.prices.original_row_total.currency},rowTotal:{value:e.prices.row_total.value,currency:e.prices.row_total.currency},rowTotalIncludingTax:{value:e.prices.row_total_including_tax.value,currency:e.prices.row_total_including_tax.currency}},savingsAmount:K(e),noteFromBuyer:(o=e.note_from_buyer)==null?void 0:o.map(i=>({createdAt:i.created_at,creatorId:i.creator_id,creatorType:i.creator_type,negotiableQuoteItemUid:i.negotiable_quote_item_uid,note:i.note,noteUid:i.note_uid})),noteFromSeller:(n=e.note_from_seller)==null?void 0:n.map(i=>({createdAt:i.created_at,creatorId:i.creator_id,creatorType:i.creator_type,negotiableQuoteItemUid:i.negotiable_quote_item_uid,note:i.note,noteUid:i.note_uid})),configurableOptions:(c=e.configurable_options)==null?void 0:c.map(i=>({optionLabel:i.option_label,valueLabel:i.value_label})),bundleOptions:(d=e.bundle_options)==null?void 0:d.map(i=>({label:i.label,values:i.values.map(s=>({label:s.label,quantity:s.quantity,originalPrice:{value:s.original_price.value,currency:s.original_price.currency},price:{value:s.priceV2.value,currency:s.priceV2.currency}}))})),customizableOptions:(u=e.customizable_options)==null?void 0:u.map(i=>({type:i.type,label:i.label,values:i.values.map(s=>({label:s.label,value:s.value}))}))}}function O(e){return e?e.map(J):[]}const Q=["DRAFT","UPDATED","DECLINED","EXPIRED","NEW","OPEN"];function Z(e){if(!e.items)return 0;const a=l.config;return(a==null?void 0:a.quoteSummaryDisplayTotal)===0?e.items.length:(a==null?void 0:a.quoteSummaryDisplayTotal)===1?e.total_quantity:e.items.length}function ee(e){return e.every(a=>!a.outOfStock&&!a.insufficientQuantity)}function te(e){var o,n,c,d,u,i;const a=P(e),t=!!((o=e.template_name)!=null&&o.trim()),r=O(e.items);return{uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,expirationDate:e.expiration_date,status:a?N.NEW:e.status,isVirtual:!!e.is_virtual,salesRepName:e.sales_rep_name,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},email:e.email,templateName:e.template_name,totalQuantity:Z(e),comments:(n=e.comments)==null?void 0:n.map(s=>{const m={uid:s.uid,createdAt:s.created_at,author:{firstname:s.author.firstname,lastname:s.author.lastname},text:s.text};return Array.isArray(s.attachments)&&s.attachments.length>0&&(m.attachments=s.attachments.map(E=>({name:E.name,url:E.url}))),m}),prices:e.prices&&{appliedDiscounts:(c=e.prices.discounts)==null?void 0:c.map(s=>({amount:{value:s.amount.value,currency:s.amount.currency},label:s.label,coupon:s.coupon})),appliedTaxes:(d=e.prices.applied_taxes)==null?void 0:d.map(s=>({amount:{value:s.amount.value,currency:s.amount.currency},label:s.label})),discount:e.prices.discounts&&e.prices.grand_total&&U(e.prices.discounts,e.prices.grand_total.currency),grandTotal:e.prices.grand_total&&{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency},grandTotalExcludingTax:e.prices.grand_total_excluding_tax&&{value:e.prices.grand_total_excluding_tax.value,currency:e.prices.grand_total_excluding_tax.currency},subtotalExcludingTax:e.prices.subtotal_excluding_tax&&{value:e.prices.subtotal_excluding_tax.value,currency:e.prices.subtotal_excluding_tax.currency},subtotalIncludingTax:e.prices.subtotal_including_tax&&{value:e.prices.subtotal_including_tax.value,currency:e.prices.subtotal_including_tax.currency},subtotalWithDiscountExcludingTax:e.prices.subtotal_with_discount_excluding_tax&&{value:e.prices.subtotal_with_discount_excluding_tax.value,currency:e.prices.subtotal_with_discount_excluding_tax.currency},...oe(e),totalTax:e.prices.applied_taxes&&e.prices.grand_total&&U(e.prices.applied_taxes,e.prices.grand_total.currency)},history:q(e.history),items:r,shippingAddresses:(u=e.shipping_addresses)==null?void 0:u.map(s=>{const m={uid:s.uid,firstname:s.firstname,lastname:s.lastname,company:s.company,street:s.street,city:s.city,postcode:s.postcode,country:{code:s.country.code,label:s.country.label},telephone:s.telephone};return s.region&&(m.region={code:s.region.code,label:s.region.label,regionId:s.region.region_id}),m}),canCheckout:["UPDATED","DECLINED"].includes(e.status)&&l.permissions.checkoutQuote&&((i=e.shipping_addresses)==null?void 0:i.length)>0&&ee(r),canSendForReview:!t&&(a||Q.includes(e.status))&&l.permissions.editQuote,canUpdateQuote:!t&&(a||Q.includes(e.status))&&l.permissions.editQuote,canDelete:!t&&!["PENDING","SUBMITTED","ORDERED"].includes(e.status)&&l.permissions.deleteQuote,canClose:e.status?!t&&!["DRAFT","CLOSED","ORDERED","OPEN"].includes(e.status):!1,readOnly:t||!a&&["ORDERED","SUBMITTED","CLOSED","PENDING"].includes(e.status)||!l.permissions.editQuote}}function h(e){return e?te(e):null}function P(e){return e.status==="SUBMITTED"&&!(e.history??[]).some(a=>{var t,r;return a.change_type==="UPDATED"&&(((r=(t=a.changes)==null?void 0:t.statuses)==null?void 0:r.changes)??[]).length>0})}function re(e){const a=P(e);return{uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,status:a?N.NEW:e.status,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},templateName:e.template_name,prices:{grandTotal:{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency}}}}function ae(e){var r;if(!e)return null;const a={items:((r=e.items)==null?void 0:r.filter(o=>o==null?void 0:o.uid).map(re))||[],pageInfo:{currentPage:e.page_info.current_page,pageSize:e.page_info.page_size,totalPages:e.page_info.total_pages},totalCount:e.total_count,sortFields:e.sort_fields?{default:e.sort_fields.default,options:e.sort_fields.options}:void 0},t=x(a);return{...a,paginationInfo:t||void 0}}function x(e){if(!(e!=null&&e.pageInfo)||!e.totalCount)return null;const{currentPage:a,pageSize:t,totalPages:r}=e.pageInfo,{totalCount:o}=e,n=o>0?(a-1)*t+1:0,c=Math.min(a*t,o);return{currentPage:a,totalCount:o,pageSize:t,startItem:n,endItem:c,totalPages:r,pageSizeOptions:[20,30,50,100,200]}}const rt=()=>[20,30,50,100,200];function U(e,a){return e!=null&&e.length?e.reduce((t,r)=>({value:t.value+r.amount.value,currency:r.amount.currency}),{value:0,currency:a}):{value:0,currency:a}}function oe(e){var r;if(!e||!((r=e.shipping_addresses)!=null&&r.length))return{};const t=e.shipping_addresses[0].selected_shipping_method;return t?{shippingIncludingTax:t.price_incl_tax&&{value:t.price_incl_tax.value,currency:t.price_incl_tax.currency},shippingExcludingTax:t.price_excl_tax&&{value:t.price_excl_tax.value,currency:t.price_excl_tax.currency}}:{}}function f(e){var a,t,r,o;return e?{id:e.template_id,uid:e.uid,name:e.name,createdAt:e.created_at,updatedAt:e.updated_at,expirationDate:e.expiration_date,status:e.status,salesRepName:e.sales_rep_name,buyer:{firstname:e.buyer.firstname,lastname:e.buyer.lastname},comments:(a=e.comments)==null?void 0:a.map(n=>{var c;return{uid:n.uid,createdAt:n.created_at,author:{firstname:n.author.firstname,lastname:n.author.lastname},text:n.text,attachments:(c=n.attachments)==null?void 0:c.map(d=>({name:d.name,url:d.url}))}}),prices:e.prices&&{subtotalExcludingTax:e.prices.subtotal_excluding_tax&&{value:e.prices.subtotal_excluding_tax.value,currency:e.prices.subtotal_excluding_tax.currency},subtotalIncludingTax:e.prices.subtotal_including_tax&&{value:e.prices.subtotal_including_tax.value,currency:e.prices.subtotal_including_tax.currency},subtotalWithDiscountExcludingTax:e.prices.subtotal_with_discount_excluding_tax&&{value:e.prices.subtotal_with_discount_excluding_tax.value,currency:e.prices.subtotal_with_discount_excluding_tax.currency},appliedTaxes:(t=e.prices.applied_taxes)==null?void 0:t.map(n=>({amount:{value:n.amount.value,currency:n.amount.currency},label:n.label})),grandTotal:e.prices.grand_total&&{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency}},history:q(e.history),items:O(e.items),shippingAddresses:(r=e.shipping_addresses)==null?void 0:r.map(n=>({uid:n.uid,firstname:n.firstname,lastname:n.lastname,company:n.company,street:n.street,city:n.city,postcode:n.postcode,country:{code:n.country.code,label:n.country.label},telephone:n.telephone,region:n.region?{code:n.region.code,label:n.region.label,regionId:n.region.region_id}:void 0})),referenceDocuments:(o=e.reference_document_links)==null?void 0:o.map(n=>({uid:n.link_id,name:n.document_name,identifier:n.document_identifier,url:n.reference_document_url})),canAccept:[g.SUBMITTED,g.PENDING,g.OPEN].includes(e.status),canDelete:e.status===g.DRAFT,canReopen:[g.DECLINED,g.CANCELED,g.EXPIRED].includes(e.status),canCancel:[g.SUBMITTED,g.PENDING,g.OPEN,g.ACTIVE,g.EDITED].includes(e.status),canSendForReview:[g.OPEN,g.DRAFT,g.NEW,g.EDITED].includes(e.status),canGenerateQuoteFromTemplate:[g.ACTIVE].includes(e.status),canEditTemplateItems:[g.SUBMITTED,g.DRAFT,g.OPEN,g.EDITED].includes(e.status)}:null}function ne(e){var r;if(!e)return null;const a={items:((r=e.items)==null?void 0:r.map(o=>{var n,c,d;return{id:o.template_id,uid:o.uid,name:o.name,createdAt:o.created_at,updatedAt:o.updated_at,status:o.status,state:o.state,prices:{grandTotal:(n=o.prices)!=null&&n.grand_total?{value:o.prices.grand_total.value,currency:o.prices.grand_total.currency}:{value:0,currency:"USD"},minNegotiatedGrandTotal:{value:o.min_negotiated_grand_total,currency:((d=(c=o.prices)==null?void 0:c.grand_total)==null?void 0:d.currency)||"USD"}},lastSharedAt:o.last_shared_at,lastOrderedAt:o.last_ordered_at,expirationDate:o.expiration_date,ordersPlaced:o.orders_placed,canGenerateQuoteFromTemplate:[g.ACTIVE].includes(o.status)}}))||[],pageInfo:{currentPage:e.page_info.current_page,pageSize:e.page_info.page_size,totalPages:e.page_info.total_pages},totalCount:e.total_count,sortFields:e.sort_fields?{default:e.sort_fields.default,options:e.sort_fields.options}:void 0},t=x(a);return{...a,paginationInfo:t||void 0}}const at=async e=>{const{cartId:a,quoteName:t,comment:r,attachments:o,isDraft:n}=e;if(!a)throw new Error("Cart ID is required");if(!t)throw new Error("Quote name is required");if(!r)throw new Error("Comment is required");return p(k,{variables:{cartId:a,quoteName:t,comment:o!=null&&o.length?{comment:r,attachments:o}:{comment:r},isDraft:n}}).then(c=>{var i,s;const{errors:d}=c;if(d){const m=d.map(E=>E.message).join("; ");throw new Error(`Failed to request negotiable quote: ${m}`)}const u=h((s=(i=c.data)==null?void 0:i.requestNegotiableQuote)==null?void 0:s.quote);if(!u)throw new Error("Failed to transform quote data: Invalid response structure");return _.emit("quote-management/negotiable-quote-requested",{quote:u,input:{cartId:a,quoteName:t,comment:r,attachments:o,isDraft:n}}),u})},ie=`
417
417
  query QUOTE_DATA_QUERY(
418
418
  $quoteId: ID!
419
419
  ) {