@dropins/storefront-quote-management 0.0.1-alpha21 → 0.0.1-alpha23

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 (64) hide show
  1. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  2. package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +10 -0
  3. package/api/{getCustomerData → getStoreConfig}/index.d.ts +1 -1
  4. package/api/index.d.ts +1 -1
  5. package/api.js +29 -40
  6. package/api.js.map +1 -1
  7. package/chunks/ChevronDown.js +4 -0
  8. package/chunks/ChevronDown.js.map +1 -0
  9. package/chunks/NegotiableQuoteFragment.js +129 -0
  10. package/chunks/NegotiableQuoteFragment.js.map +1 -1
  11. package/chunks/QuoteHistoryLog.js +1 -1
  12. package/chunks/QuoteHistoryLog.js.map +1 -1
  13. package/chunks/dateUtils.js +4 -0
  14. package/chunks/dateUtils.js.map +1 -0
  15. package/chunks/fetch-graphql.js +1 -1
  16. package/chunks/fetch-graphql.js.map +1 -1
  17. package/chunks/getQuoteTemplates.js +1 -1
  18. package/chunks/negotiableQuotes.js +1 -1
  19. package/chunks/renameNegotiableQuote.js +1 -1
  20. package/chunks/state.js +1 -1
  21. package/chunks/state.js.map +1 -1
  22. package/chunks/updateQuantities.js +2 -2
  23. package/chunks/uploadFile.js +3 -3
  24. package/containers/ManageNegotiableQuote.js +1 -1
  25. package/containers/ManageNegotiableQuote.js.map +1 -1
  26. package/containers/OrderSummary.js +1 -1
  27. package/containers/OrderSummary.js.map +1 -1
  28. package/containers/QuoteHistoryLog.js +1 -1
  29. package/containers/QuoteSummaryList/QuoteSummaryList.d.ts +51 -0
  30. package/{data/transforms/__fixtures__/customerData.d.ts → containers/QuoteSummaryList/index.d.ts} +3 -2
  31. package/containers/QuoteSummaryList.d.ts +3 -0
  32. package/containers/QuoteSummaryList.js +4 -0
  33. package/containers/QuoteSummaryList.js.map +1 -0
  34. package/containers/QuoteTemplatesListTable.js +1 -1
  35. package/containers/QuoteTemplatesListTable.js.map +1 -1
  36. package/containers/RequestNegotiableQuoteForm.js +1 -1
  37. package/containers/index.d.ts +1 -0
  38. package/data/models/__fixtures__/negotiableQuoteModel.d.ts +1 -0
  39. package/data/models/__fixtures__/storeConfigModel.d.ts +5 -0
  40. package/data/models/index.d.ts +0 -1
  41. package/data/models/negotiable-quote-model.d.ts +33 -5
  42. package/data/models/store-config-model.d.ts +5 -2
  43. package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +216 -0
  44. package/data/transforms/__fixtures__/storeConfigData.d.ts +31 -0
  45. package/data/transforms/index.d.ts +1 -1
  46. package/data/transforms/transform-store-config.d.ts +4 -0
  47. package/hooks/useQuoteSummaryData.d.ts +10 -0
  48. package/i18n/en_US.json.d.ts +12 -0
  49. package/lib/configurationTransformers.d.ts +27 -0
  50. package/lib/itemFormatters.d.ts +47 -0
  51. package/lib/priceCalculators.d.ts +41 -0
  52. package/lib/state.d.ts +3 -0
  53. package/package.json +1 -1
  54. package/render.js +1 -1
  55. package/render.js.map +1 -1
  56. package/types/state.types.d.ts +6 -0
  57. package/utils/dateUtils.d.ts +6 -0
  58. package/utils/mapAuthPermissions.d.ts +39 -0
  59. package/api/getCustomerData/getCustomerData.d.ts +0 -10
  60. package/api/getCustomerData/graphql/CustomerQuery.d.ts +0 -2
  61. package/api/graphql/CustomerFragment.d.ts +0 -2
  62. package/data/models/__fixtures__/customerModel.d.ts +0 -4
  63. package/data/models/customer-model.d.ts +0 -18
  64. package/data/transforms/transform-customer.d.ts +0 -15
@@ -1,4 +1,4 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsxs as z,jsx as a}from"@dropins/tools/preact-jsx-runtime.js";import*as v from"@dropins/tools/preact-compat.js";import{useState as g,useEffect as y,useCallback as re}from"@dropins/tools/preact-compat.js";import{classes as c,VComponent as q,Slot as h,getFormErrors as I,getFormValues as oe}from"@dropins/tools/lib.js";import{TextArea as ne,Field as ie,Input as se,InputFile as ce,Button as M,InLineAlert as me}from"@dropins/tools/components.js";/* empty css */import{events as T}from"@dropins/tools/event-bus.js";import"../chunks/state.js";import{u as ue,r as B}from"../chunks/uploadFile.js";import{S as de,a as le}from"../chunks/WarningFilled.js";import{useText as fe}from"@dropins/tools/i18n.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/NegotiableQuoteFragment.js";const ge=u=>v.createElement("svg",{id:"Icon_Add_Base","data-name":"Icon \\u2013 Add \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...u},v.createElement("g",{id:"Large"},v.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),v.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},v.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_579","data-name":"Line 579",y2:12.7,transform:"translate(2.216 -4.087)",fill:"none",stroke:"currentColor"}),v.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_580","data-name":"Line 580",x2:12.7,transform:"translate(-4.079 2.263)",fill:"none",stroke:"currentColor"})))),qe=({className:u,title:e,banner:_,commentField:C,quoteNameField:N,attachFile:i,requestButton:d,saveButton:Q,onSubmit:R,...A})=>z("form",{...A,className:c(["request-negotiable-quote-form",u]),onSubmit:R,children:[_&&a(q,{node:_,className:c(["request-negotiable-quote-form__banner"])}),e&&a(q,{node:e,className:c(["request-negotiable-quote-form__title"])}),C&&a(q,{node:C,className:c(["request-negotiable-quote-form__comment-field"])}),N&&a(q,{node:N,className:c(["request-negotiable-quote-form__quote-name-field"])}),i&&a(q,{node:i,className:c(["request-negotiable-quote-form__attach-file-field"])}),z("div",{className:c(["request-negotiable-quote-form__actions"]),children:[d&&a(q,{node:d,className:c(["request-negotiable-quote-form__request-button"])}),Q&&a(q,{node:Q,className:c(["request-negotiable-quote-form__save-button"])})]})]}),Ae=({cartId:u,slots:e,onRequestNegotiableQuote:_,onSaveNegotiableQuote:C,onAttachFiles:N,onSubmitErrors:i,onError:d,className:Q})=>{const[R,A]=g(void 0),[S,V]=g(void 0),[K,O]=g([]),[b,p]=g(void 0),[m,l]=g({}),[E,W]=g(void 0),[n,f]=g(!1),o=fe({title:"NegotiableQuote.Request.title",comment:"NegotiableQuote.Request.comment",commentError:"NegotiableQuote.Request.commentError",quoteName:"NegotiableQuote.Request.quoteName",quoteNameError:"NegotiableQuote.Request.quoteNameError",attachmentsError:"NegotiableQuote.Request.attachmentsError",requestCta:"NegotiableQuote.Request.requestCta",saveDraftCta:"NegotiableQuote.Request.saveDraftCta",errorHeader:"NegotiableQuote.Request.error.header",unauthenticated:"NegotiableQuote.Request.error.unauthenticated",unauthorized:"NegotiableQuote.Request.error.unauthorized",missingCart:"NegotiableQuote.Request.error.missingCart",successHeader:"NegotiableQuote.Request.success.header",submitSuccess:"NegotiableQuote.Request.success.submitted",draftSuccess:"NegotiableQuote.Request.success.draftSaved"});y(()=>{const t=T.on("quote-management/permissions",r=>{p(void 0),r.requestQuote||(p(o.unauthorized),f(!0))},{eager:!0});return()=>t==null?void 0:t.off()},[o.unauthorized]),y(()=>{const t=T.on("authenticated",r=>{p(void 0),r||(p(o.unauthenticated),f(!0))},{eager:!0});return()=>t==null?void 0:t.off()},[o.unauthenticated]),y(()=>{u||(p(o.missingCart),f(!0))},[u,o.missingCart]),y(()=>{b&&(d==null||d({error:b,isFormDisabled:n,setIsFormDisabled:f}))},[b,d,n]);const L=re(async t=>{if(t!=null&&t.length){if(l(r=>({...r,attachments:""})),N){try{await N(t)}catch{l(r=>({...r,attachments:o.attachmentsError}))}return}try{const r=await Promise.all(t.map(ue));O(r.map(({key:s})=>({key:s})))}catch{l(r=>({...r,attachments:o.attachmentsError}))}}},[N,o]),$=()=>{let t,r;if(E?(r={name:"SuccessBanner",slot:e==null?void 0:e.SuccessBanner,context:{message:E},"data-testid":"form-success-banner"},t={type:"success",variant:"primary",icon:a(de,{}),heading:o.successHeader,description:E,className:"request-negotiable-quote-form__success-banner"}):b&&(r={name:"ErrorBanner",slot:e==null?void 0:e.ErrorBanner,context:{message:b},"data-testid":"form-error-banner"},t={type:"error",variant:"primary",icon:a(le,{}),heading:o.errorHeader,description:b,className:"request-negotiable-quote-form__error-banner"}),r&&t)return a(h,{...r,children:a(me,{...t})})},H=t=>{l({});const r=t.target.closest("form"),s=I(r);Object.keys(s).length>0&&(l(s),i==null||i(s))},G=t=>{var j;t.preventDefault(),f(!0);const r=t.target,F={...I(r),...m};if(Object.keys(F).length>0){i==null||i(F);return}const k=t.submitter,x=oe(r);A(x.comment),V(x.quoteName);const P=((j=k==null?void 0:k.dataset)==null?void 0:j.draft)==="true"||!1,te={cartId:u,quoteName:x.quoteName,comment:x.comment,attachments:K,isDraft:P};let D,w;P?(D=C??B,w=o.draftSuccess):(D=_??B,w=o.submitSuccess),D(te).then(()=>{W(w)}).catch(ae=>{p(ae.message)})},J=a(h,{name:"Title",slot:e==null?void 0:e.Title,context:{text:o.title},children:a("span",{"data-testid":"form-title",children:o.title})}),U=a(h,{name:"CommentField",slot:e==null?void 0:e.CommentField,context:{value:R,required:!0,errorMessage:m.comment,setFormErrors:l,isFormDisabled:n},children:a(ne,{name:"comment",value:R,label:o.comment,required:!0,autoComplete:"off","data-testid":"form-comment-field",errorMessage:m.comment,disabled:n})}),X=a(h,{name:"QuoteNameField",slot:e==null?void 0:e.QuoteNameField,context:{value:S,required:!0,errorMessage:m.quoteName,setFormErrors:l,isFormDisabled:n},children:a(ie,{error:m.quoteName,disabled:n,children:a(se,{value:S,name:"quoteName",floatingLabel:o.quoteName,required:!0,autoComplete:"off","data-testid":"form-quote-name-field"})})}),Y=a(h,{name:"AttachFileField",slot:e==null?void 0:e.AttachFileField,context:{onChange:L,formErrors:m,isFormDisabled:n},children:a(ce,{onChange:t=>{const r=t.target,s=r==null?void 0:r.files,F=s?Array.from(s):[];F.length>0&&L(F)},icon:a(ge,{}),disabled:n,"data-testid":"form-attach-file-field"})}),Z=a(h,{name:"RequestButton",slot:e==null?void 0:e.RequestButton,context:{requestNegotiableQuote:B,formErrors:m,isFormDisabled:n,setIsFormDisabled:f},children:a(M,{type:"submit","data-testid":"form-request-button",onClick:H,disabled:n,children:o.requestCta})}),ee=a(h,{name:"SaveDraftButton",slot:e==null?void 0:e.SaveDraftButton,context:{requestNegotiableQuote:B,formErrors:m,isFormDisabled:n,setIsFormDisabled:f},children:a(M,{type:"submit","data-draft":"true",variant:"secondary","data-testid":"form-save-draft-button",onClick:H,disabled:n,children:o.saveDraftCta})});return a(qe,{title:J,banner:$(),commentField:U,quoteNameField:X,attachFile:Y,requestButton:Z,saveButton:ee,onSubmit:G,className:Q,disabled:n,"data-testid":"form-container"})};export{Ae as RequestNegotiableQuoteForm,Ae as default};
3
+ import{jsxs as z,jsx as a}from"@dropins/tools/preact-jsx-runtime.js";import*as v from"@dropins/tools/preact-compat.js";import{useState as g,useEffect as y,useCallback as re}from"@dropins/tools/preact-compat.js";import{classes as c,VComponent as q,Slot as h,getFormErrors as I,getFormValues as oe}from"@dropins/tools/lib.js";import{TextArea as ne,Field as ie,Input as se,InputFile as ce,Button as M,InLineAlert as me}from"@dropins/tools/components.js";/* empty css */import{events as T}from"@dropins/tools/event-bus.js";import{u as ue,r as B}from"../chunks/uploadFile.js";import"../chunks/state.js";import{S as de,a as le}from"../chunks/WarningFilled.js";import{useText as fe}from"@dropins/tools/i18n.js";import"../chunks/NegotiableQuoteFragment.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const ge=u=>v.createElement("svg",{id:"Icon_Add_Base","data-name":"Icon \\u2013 Add \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...u},v.createElement("g",{id:"Large"},v.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),v.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},v.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_579","data-name":"Line 579",y2:12.7,transform:"translate(2.216 -4.087)",fill:"none",stroke:"currentColor"}),v.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_580","data-name":"Line 580",x2:12.7,transform:"translate(-4.079 2.263)",fill:"none",stroke:"currentColor"})))),qe=({className:u,title:e,banner:_,commentField:C,quoteNameField:N,attachFile:i,requestButton:d,saveButton:Q,onSubmit:R,...A})=>z("form",{...A,className:c(["request-negotiable-quote-form",u]),onSubmit:R,children:[_&&a(q,{node:_,className:c(["request-negotiable-quote-form__banner"])}),e&&a(q,{node:e,className:c(["request-negotiable-quote-form__title"])}),C&&a(q,{node:C,className:c(["request-negotiable-quote-form__comment-field"])}),N&&a(q,{node:N,className:c(["request-negotiable-quote-form__quote-name-field"])}),i&&a(q,{node:i,className:c(["request-negotiable-quote-form__attach-file-field"])}),z("div",{className:c(["request-negotiable-quote-form__actions"]),children:[d&&a(q,{node:d,className:c(["request-negotiable-quote-form__request-button"])}),Q&&a(q,{node:Q,className:c(["request-negotiable-quote-form__save-button"])})]})]}),Ae=({cartId:u,slots:e,onRequestNegotiableQuote:_,onSaveNegotiableQuote:C,onAttachFiles:N,onSubmitErrors:i,onError:d,className:Q})=>{const[R,A]=g(void 0),[S,V]=g(void 0),[K,O]=g([]),[b,p]=g(void 0),[m,l]=g({}),[E,W]=g(void 0),[n,f]=g(!1),o=fe({title:"NegotiableQuote.Request.title",comment:"NegotiableQuote.Request.comment",commentError:"NegotiableQuote.Request.commentError",quoteName:"NegotiableQuote.Request.quoteName",quoteNameError:"NegotiableQuote.Request.quoteNameError",attachmentsError:"NegotiableQuote.Request.attachmentsError",requestCta:"NegotiableQuote.Request.requestCta",saveDraftCta:"NegotiableQuote.Request.saveDraftCta",errorHeader:"NegotiableQuote.Request.error.header",unauthenticated:"NegotiableQuote.Request.error.unauthenticated",unauthorized:"NegotiableQuote.Request.error.unauthorized",missingCart:"NegotiableQuote.Request.error.missingCart",successHeader:"NegotiableQuote.Request.success.header",submitSuccess:"NegotiableQuote.Request.success.submitted",draftSuccess:"NegotiableQuote.Request.success.draftSaved"});y(()=>{const t=T.on("quote-management/permissions",r=>{p(void 0),r.requestQuote||(p(o.unauthorized),f(!0))},{eager:!0});return()=>t==null?void 0:t.off()},[o.unauthorized]),y(()=>{const t=T.on("authenticated",r=>{p(void 0),r||(p(o.unauthenticated),f(!0))},{eager:!0});return()=>t==null?void 0:t.off()},[o.unauthenticated]),y(()=>{u||(p(o.missingCart),f(!0))},[u,o.missingCart]),y(()=>{b&&(d==null||d({error:b,isFormDisabled:n,setIsFormDisabled:f}))},[b,d,n]);const L=re(async t=>{if(t!=null&&t.length){if(l(r=>({...r,attachments:""})),N){try{await N(t)}catch{l(r=>({...r,attachments:o.attachmentsError}))}return}try{const r=await Promise.all(t.map(ue));O(r.map(({key:s})=>({key:s})))}catch{l(r=>({...r,attachments:o.attachmentsError}))}}},[N,o]),$=()=>{let t,r;if(E?(r={name:"SuccessBanner",slot:e==null?void 0:e.SuccessBanner,context:{message:E},"data-testid":"form-success-banner"},t={type:"success",variant:"primary",icon:a(de,{}),heading:o.successHeader,description:E,className:"request-negotiable-quote-form__success-banner"}):b&&(r={name:"ErrorBanner",slot:e==null?void 0:e.ErrorBanner,context:{message:b},"data-testid":"form-error-banner"},t={type:"error",variant:"primary",icon:a(le,{}),heading:o.errorHeader,description:b,className:"request-negotiable-quote-form__error-banner"}),r&&t)return a(h,{...r,children:a(me,{...t})})},H=t=>{l({});const r=t.target.closest("form"),s=I(r);Object.keys(s).length>0&&(l(s),i==null||i(s))},G=t=>{var j;t.preventDefault(),f(!0);const r=t.target,F={...I(r),...m};if(Object.keys(F).length>0){i==null||i(F);return}const k=t.submitter,x=oe(r);A(x.comment),V(x.quoteName);const P=((j=k==null?void 0:k.dataset)==null?void 0:j.draft)==="true"||!1,te={cartId:u,quoteName:x.quoteName,comment:x.comment,attachments:K,isDraft:P};let D,w;P?(D=C??B,w=o.draftSuccess):(D=_??B,w=o.submitSuccess),D(te).then(()=>{W(w)}).catch(ae=>{p(ae.message)})},J=a(h,{name:"Title",slot:e==null?void 0:e.Title,context:{text:o.title},children:a("span",{"data-testid":"form-title",children:o.title})}),U=a(h,{name:"CommentField",slot:e==null?void 0:e.CommentField,context:{value:R,required:!0,errorMessage:m.comment,setFormErrors:l,isFormDisabled:n},children:a(ne,{name:"comment",value:R,label:o.comment,required:!0,autoComplete:"off","data-testid":"form-comment-field",errorMessage:m.comment,disabled:n})}),X=a(h,{name:"QuoteNameField",slot:e==null?void 0:e.QuoteNameField,context:{value:S,required:!0,errorMessage:m.quoteName,setFormErrors:l,isFormDisabled:n},children:a(ie,{error:m.quoteName,disabled:n,children:a(se,{value:S,name:"quoteName",floatingLabel:o.quoteName,required:!0,autoComplete:"off","data-testid":"form-quote-name-field"})})}),Y=a(h,{name:"AttachFileField",slot:e==null?void 0:e.AttachFileField,context:{onChange:L,formErrors:m,isFormDisabled:n},children:a(ce,{onChange:t=>{const r=t.target,s=r==null?void 0:r.files,F=s?Array.from(s):[];F.length>0&&L(F)},icon:a(ge,{}),disabled:n,"data-testid":"form-attach-file-field"})}),Z=a(h,{name:"RequestButton",slot:e==null?void 0:e.RequestButton,context:{requestNegotiableQuote:B,formErrors:m,isFormDisabled:n,setIsFormDisabled:f},children:a(M,{type:"submit","data-testid":"form-request-button",onClick:H,disabled:n,children:o.requestCta})}),ee=a(h,{name:"SaveDraftButton",slot:e==null?void 0:e.SaveDraftButton,context:{requestNegotiableQuote:B,formErrors:m,isFormDisabled:n,setIsFormDisabled:f},children:a(M,{type:"submit","data-draft":"true",variant:"secondary","data-testid":"form-save-draft-button",onClick:H,disabled:n,children:o.saveDraftCta})});return a(qe,{title:J,banner:$(),commentField:U,quoteNameField:X,attachFile:Y,requestButton:Z,saveButton:ee,onSubmit:G,className:Q,disabled:n,"data-testid":"form-container"})};export{Ae as RequestNegotiableQuoteForm,Ae as default};
4
4
  //# sourceMappingURL=RequestNegotiableQuoteForm.js.map
@@ -13,6 +13,7 @@ export * from './OrderSummary';
13
13
  export * from './OrderSummaryLine';
14
14
  export * from './QuoteCommentsList';
15
15
  export * from './QuoteHistoryLog';
16
+ export * from './QuoteSummaryList';
16
17
  export * from './QuotesListTable';
17
18
  export * from './ShippingAddressDisplay';
18
19
  export * from './QuoteTemplatesListTable';
@@ -3,5 +3,6 @@ import { NegotiableQuoteCartItem, NegotiableQuoteModel } from '../negotiable-quo
3
3
  export declare const baseCartItem: NegotiableQuoteCartItem;
4
4
  export declare const configurableCartItem: NegotiableQuoteCartItem;
5
5
  export declare const bundleCartItem: NegotiableQuoteCartItem;
6
+ export declare const downloadableCartItem: NegotiableQuoteCartItem;
6
7
  export declare const base: NegotiableQuoteModel;
7
8
  //# sourceMappingURL=negotiableQuoteModel.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { StoreConfigModel } from '../store-config-model';
2
+
3
+ export declare const mockStoreConfigModel: StoreConfigModel;
4
+ export declare const mockStoreConfigModelWithDefaultValues: StoreConfigModel;
5
+ //# sourceMappingURL=storeConfigModel.d.ts.map
@@ -6,7 +6,6 @@
6
6
  * file in accordance with the terms of the Adobe license agreement
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
- export * from './customer-model';
10
9
  export * from './negotiable-quote-model';
11
10
  export * from './negotiable-quote-template-model';
12
11
  export * from './store-config-model';
@@ -42,6 +42,7 @@ export interface NegotiableQuoteModel {
42
42
  lastname: string;
43
43
  };
44
44
  templateName?: string;
45
+ totalQuantity: number;
45
46
  comments?: {
46
47
  uid: string;
47
48
  createdAt: string;
@@ -91,7 +92,16 @@ export interface BundleOption {
91
92
  price: Currency;
92
93
  }[];
93
94
  }
95
+ export interface CustomizableOption {
96
+ type: string;
97
+ label: string;
98
+ values: {
99
+ label: string;
100
+ value: string;
101
+ }[];
102
+ }
94
103
  export interface NegotiableQuoteCartItem {
104
+ itemType: string;
95
105
  uid: string;
96
106
  product: {
97
107
  uid: string;
@@ -101,12 +111,14 @@ export interface NegotiableQuoteCartItem {
101
111
  templateName?: string;
102
112
  priceRange: {
103
113
  maximumPrice: {
104
- regularPrice: {
105
- value: number;
106
- };
114
+ regularPrice: Currency;
107
115
  };
108
116
  };
109
117
  };
118
+ image: ItemImage;
119
+ links?: ItemLinks;
120
+ discounted: boolean;
121
+ discountedTotal: Currency;
110
122
  catalogDiscount: {
111
123
  amountOff: number;
112
124
  percentOff: number;
@@ -116,19 +128,34 @@ export interface NegotiableQuoteCartItem {
116
128
  value: string;
117
129
  amount: Currency;
118
130
  }[];
131
+ discountPercentage?: number;
132
+ insufficientQuantity?: boolean;
133
+ outOfStock?: boolean;
119
134
  stockStatus: string;
120
135
  quantity: number;
121
136
  prices: {
137
+ regularPrice: Currency;
138
+ priceIncludingTax: Currency;
122
139
  originalItemPrice: Currency;
140
+ originalRowTotal: Currency;
123
141
  rowTotal: Currency;
142
+ rowTotalIncludingTax: Currency;
124
143
  };
144
+ savingsAmount?: Currency;
125
145
  configurableOptions?: ConfigurableOption[];
126
- optionLabel: string;
127
- valueLabel: string;
128
146
  bundleOptions?: BundleOption[];
147
+ customizableOptions?: CustomizableOption[];
129
148
  noteFromBuyer?: ItemNote[];
130
149
  noteFromSeller?: ItemNote[];
131
150
  }
151
+ interface ItemImage {
152
+ src: string;
153
+ alt: string;
154
+ }
155
+ interface ItemLinks {
156
+ count: number;
157
+ result: string;
158
+ }
132
159
  export interface ItemNote {
133
160
  createdAt: string;
134
161
  creatorId: number;
@@ -254,4 +281,5 @@ export interface PaginationInfo {
254
281
  totalPages: number;
255
282
  pageSizeOptions?: number[];
256
283
  }
284
+ export {};
257
285
  //# sourceMappingURL=negotiable-quote-model.d.ts.map
@@ -7,11 +7,13 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
  export declare enum QuoteDisplayAmount {
10
- TAX_INCLUDED = 1,
11
- TAX_EXCLUDED = 2,
10
+ TAX_EXCLUDED = 1,
11
+ TAX_INCLUDED = 2,
12
12
  TAX_INCLUDED_AND_EXCLUDED = 3
13
13
  }
14
14
  export interface StoreConfigModel {
15
+ quoteSummaryDisplayTotal: number;
16
+ quoteSummaryMaxItems: number;
15
17
  quoteDisplaySettings: {
16
18
  zeroTax: boolean;
17
19
  subtotal: QuoteDisplayAmount;
@@ -20,5 +22,6 @@ export interface StoreConfigModel {
20
22
  fullSummary: boolean;
21
23
  grandTotal: boolean;
22
24
  };
25
+ useConfigurableParentThumbnail: boolean;
23
26
  }
24
27
  //# sourceMappingURL=store-config-model.d.ts.map
@@ -34,6 +34,10 @@ export declare const mockGraphQLResponse: {
34
34
  };
35
35
  };
36
36
  };
37
+ thumbnail: {
38
+ url: string;
39
+ label: string;
40
+ };
37
41
  };
38
42
  quantity: number;
39
43
  note_from_buyer: {
@@ -119,6 +123,7 @@ export declare const mockQuoteData: {
119
123
  template_id: null;
120
124
  template_name: null;
121
125
  items: ({
126
+ __typename: string;
122
127
  uid: string;
123
128
  product: {
124
129
  name: string;
@@ -126,19 +131,43 @@ export declare const mockQuoteData: {
126
131
  uid: string;
127
132
  stock_status: string;
128
133
  quantity: null;
134
+ thumbnail: {
135
+ url: string;
136
+ label: string;
137
+ };
129
138
  price_range: {
130
139
  maximum_price: {
131
140
  regular_price: {
141
+ currency: string;
132
142
  value: number;
133
143
  };
144
+ discount: {
145
+ amount_off: number;
146
+ percent_off: number;
147
+ };
134
148
  };
135
149
  };
150
+ price_tiers: {
151
+ quantity: number;
152
+ final_price: {
153
+ currency: string;
154
+ value: number;
155
+ };
156
+ discount: {
157
+ amount_off: number;
158
+ percent_off: number;
159
+ };
160
+ }[];
136
161
  };
137
162
  prices: {
138
163
  price: {
139
164
  currency: string;
140
165
  value: number;
141
166
  };
167
+ price_including_tax: {
168
+ currency: string;
169
+ value: number;
170
+ };
142
171
  original_item_price: {
143
172
  currency: string;
144
173
  value: number;
@@ -151,6 +180,10 @@ export declare const mockQuoteData: {
151
180
  currency: string;
152
181
  value: number;
153
182
  };
183
+ row_total_including_tax: {
184
+ currency: string;
185
+ value: number;
186
+ };
154
187
  catalog_discount: {
155
188
  amount_off: number;
156
189
  percent_off: number;
@@ -181,9 +214,20 @@ export declare const mockQuoteData: {
181
214
  note: string;
182
215
  note_uid: string;
183
216
  }[];
217
+ customizable_options: {
218
+ type: string;
219
+ label: string;
220
+ values: {
221
+ label: string;
222
+ value: string;
223
+ }[];
224
+ }[];
184
225
  configurable_options?: undefined;
226
+ configured_variant?: undefined;
185
227
  bundle_options?: undefined;
228
+ links?: undefined;
186
229
  } | {
230
+ __typename: string;
187
231
  uid: string;
188
232
  product: {
189
233
  name: string;
@@ -191,19 +235,30 @@ export declare const mockQuoteData: {
191
235
  uid: string;
192
236
  stock_status: string;
193
237
  quantity: null;
238
+ thumbnail: {
239
+ url: string;
240
+ label: string;
241
+ };
194
242
  price_range: {
195
243
  maximum_price: {
196
244
  regular_price: {
245
+ currency: string;
197
246
  value: number;
198
247
  };
248
+ discount?: undefined;
199
249
  };
200
250
  };
251
+ price_tiers?: undefined;
201
252
  };
202
253
  prices: {
203
254
  price: {
204
255
  currency: string;
205
256
  value: number;
206
257
  };
258
+ price_including_tax: {
259
+ currency: string;
260
+ value: number;
261
+ };
207
262
  original_item_price: {
208
263
  currency: string;
209
264
  value: number;
@@ -216,6 +271,10 @@ export declare const mockQuoteData: {
216
271
  currency: string;
217
272
  value: number;
218
273
  };
274
+ row_total_including_tax: {
275
+ currency: string;
276
+ value: number;
277
+ };
219
278
  catalog_discount: {
220
279
  amount_off: number;
221
280
  percent_off: number;
@@ -236,8 +295,47 @@ export declare const mockQuoteData: {
236
295
  note_uid: string;
237
296
  }[];
238
297
  note_from_seller: never[];
298
+ configured_variant: {
299
+ thumbnail: {
300
+ label: string;
301
+ url: string;
302
+ };
303
+ price_range: {
304
+ maximum_price: {
305
+ regular_price: {
306
+ currency: string;
307
+ value: number;
308
+ };
309
+ discount: {
310
+ amount_off: number;
311
+ percent_off: number;
312
+ };
313
+ };
314
+ };
315
+ price_tiers: {
316
+ quantity: number;
317
+ final_price: {
318
+ currency: string;
319
+ value: number;
320
+ };
321
+ discount: {
322
+ amount_off: number;
323
+ percent_off: number;
324
+ };
325
+ }[];
326
+ };
327
+ customizable_options: {
328
+ type: string;
329
+ label: string;
330
+ values: {
331
+ label: string;
332
+ value: string;
333
+ }[];
334
+ }[];
239
335
  bundle_options?: undefined;
336
+ links?: undefined;
240
337
  } | {
338
+ __typename: string;
241
339
  uid: string;
242
340
  product: {
243
341
  name: string;
@@ -245,19 +343,33 @@ export declare const mockQuoteData: {
245
343
  uid: string;
246
344
  stock_status: string;
247
345
  quantity: null;
346
+ thumbnail: {
347
+ url: string;
348
+ label: string;
349
+ };
248
350
  price_range: {
249
351
  maximum_price: {
250
352
  regular_price: {
353
+ currency: string;
251
354
  value: number;
252
355
  };
356
+ discount: {
357
+ amount_off: number;
358
+ percent_off: number;
359
+ };
253
360
  };
254
361
  };
362
+ price_tiers?: undefined;
255
363
  };
256
364
  prices: {
257
365
  price: {
258
366
  currency: string;
259
367
  value: number;
260
368
  };
369
+ price_including_tax: {
370
+ currency: string;
371
+ value: number;
372
+ };
261
373
  original_item_price: {
262
374
  currency: string;
263
375
  value: number;
@@ -270,6 +382,10 @@ export declare const mockQuoteData: {
270
382
  currency: string;
271
383
  value: number;
272
384
  };
385
+ row_total_including_tax: {
386
+ currency: string;
387
+ value: number;
388
+ };
273
389
  catalog_discount: {
274
390
  amount_off: number;
275
391
  percent_off: number;
@@ -315,7 +431,103 @@ export declare const mockQuoteData: {
315
431
  note: string;
316
432
  note_uid: string;
317
433
  }[];
434
+ customizable_options?: undefined;
435
+ configurable_options?: undefined;
436
+ configured_variant?: undefined;
437
+ links?: undefined;
438
+ } | {
439
+ __typename: string;
440
+ uid: string;
441
+ product: {
442
+ name: string;
443
+ sku: string;
444
+ uid: string;
445
+ stock_status: string;
446
+ quantity: null;
447
+ thumbnail: {
448
+ url: string;
449
+ label: string;
450
+ };
451
+ price_range: {
452
+ maximum_price: {
453
+ regular_price: {
454
+ currency: string;
455
+ value: number;
456
+ };
457
+ discount: {
458
+ amount_off: number;
459
+ percent_off: number;
460
+ };
461
+ };
462
+ };
463
+ price_tiers: {
464
+ quantity: number;
465
+ final_price: {
466
+ currency: string;
467
+ value: number;
468
+ };
469
+ discount: {
470
+ amount_off: number;
471
+ percent_off: number;
472
+ };
473
+ }[];
474
+ };
475
+ prices: {
476
+ price: {
477
+ currency: string;
478
+ value: number;
479
+ };
480
+ price_including_tax: {
481
+ currency: string;
482
+ value: number;
483
+ };
484
+ original_item_price: {
485
+ currency: string;
486
+ value: number;
487
+ };
488
+ original_row_total: {
489
+ currency: string;
490
+ value: number;
491
+ };
492
+ row_total: {
493
+ currency: string;
494
+ value: number;
495
+ };
496
+ row_total_including_tax: {
497
+ currency: string;
498
+ value: number;
499
+ };
500
+ catalog_discount: {
501
+ amount_off: number;
502
+ percent_off: number;
503
+ };
504
+ discounts: {
505
+ label: string;
506
+ value: number;
507
+ amount: {
508
+ currency: string;
509
+ value: number;
510
+ };
511
+ }[];
512
+ };
513
+ quantity: number;
514
+ links: {
515
+ sort_order: number;
516
+ title: string;
517
+ }[];
518
+ customizable_options: {
519
+ type: string;
520
+ label: string;
521
+ values: {
522
+ label: string;
523
+ value: string;
524
+ }[];
525
+ }[];
526
+ note_from_buyer?: undefined;
527
+ note_from_seller?: undefined;
318
528
  configurable_options?: undefined;
529
+ configured_variant?: undefined;
530
+ bundle_options?: undefined;
319
531
  })[];
320
532
  history: {
321
533
  uid: string;
@@ -446,6 +658,10 @@ export declare const mockNegotiableQuotesResponse: {
446
658
  };
447
659
  };
448
660
  };
661
+ thumbnail: {
662
+ url: string;
663
+ label: string;
664
+ };
449
665
  };
450
666
  quantity: number;
451
667
  note_from_buyer: {
@@ -0,0 +1,31 @@
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 declare const mockStoreConfigGraphQLResponse: {
10
+ cart_summary_display_quantity: number;
11
+ max_items_in_order_summary: number;
12
+ shopping_cart_display_zero_tax: boolean;
13
+ shopping_cart_display_subtotal: number;
14
+ shopping_cart_display_price: number;
15
+ shopping_cart_display_shipping: number;
16
+ shopping_cart_display_full_summary: boolean;
17
+ shopping_cart_display_grand_total: boolean;
18
+ configurable_thumbnail_source: string;
19
+ };
20
+ export declare const mockStoreConfigGraphQLResponseWithWrongValues: {
21
+ shopping_cart_display_subtotal: number;
22
+ shopping_cart_display_price: null;
23
+ shopping_cart_display_shipping: number;
24
+ cart_summary_display_quantity: number;
25
+ max_items_in_order_summary: number;
26
+ shopping_cart_display_zero_tax: boolean;
27
+ shopping_cart_display_full_summary: boolean;
28
+ shopping_cart_display_grand_total: boolean;
29
+ configurable_thumbnail_source: string;
30
+ };
31
+ //# sourceMappingURL=storeConfigData.d.ts.map
@@ -6,7 +6,7 @@
6
6
  * file in accordance with the terms of the Adobe license agreement
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
- export * from './transform-customer';
9
+ export * from './transform-store-config';
10
10
  export * from './transform-quote';
11
11
  export * from './transform-quote-template';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { StoreConfigModel } from '../models';
2
+
3
+ export declare function transformStoreConfig(data: any): StoreConfigModel;
4
+ //# sourceMappingURL=transform-store-config.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { NegotiableQuoteModel } from '../data/models';
2
+
3
+ /**
4
+ * Custom hook to manage quote summary data and loading state
5
+ */
6
+ export declare const useQuoteSummaryData: () => {
7
+ quoteData: NegotiableQuoteModel | undefined;
8
+ loading: boolean;
9
+ };
10
+ //# sourceMappingURL=useQuoteSummaryData.d.ts.map
@@ -174,6 +174,18 @@ declare const _default: {
174
174
  "withoutTax": "Total excluding taxes",
175
175
  "saved": "Total saved"
176
176
  }
177
+ },
178
+ "QuoteSummaryList": {
179
+ "discountedPrice": "Discounted Price",
180
+ "discountPercentage": "{discount}% off",
181
+ "editQuote": "Edit",
182
+ "file": "{count} file",
183
+ "files": "{count} files",
184
+ "heading": "Negotiable Quote ({count})",
185
+ "listOfQuoteItems": "List of Quote Items",
186
+ "regularPrice": "Regular Price",
187
+ "savingsAmount": "Savings",
188
+ "viewMore": "View more"
177
189
  }
178
190
  },
179
191
  "historyLog": {
@@ -0,0 +1,27 @@
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
+ /**
10
+ * Helper function to transform bundle options data to be ready for a CartItem SDK component
11
+ */
12
+ export declare const transformBundleOptions: (data: any) => {
13
+ [key: string]: any;
14
+ } | null;
15
+ /**
16
+ * Helper function to transform configurable options data to be ready for a CartItem SDK component
17
+ */
18
+ export declare const transformConfigurableOptions: (data: any) => {
19
+ [key: string]: any;
20
+ } | null;
21
+ /**
22
+ * Helper function to transform customizable options data to be ready for a CartItem SDK component
23
+ */
24
+ export declare const transformCustomizableOptions: (data: any) => {
25
+ [key: string]: any;
26
+ };
27
+ //# sourceMappingURL=configurationTransformers.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { ImageProps } from '@dropins/tools/types/elsie/src/components';
2
+ import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
3
+ import { NegotiableQuoteCartItem as NegotiableQuoteItemModel, StoreConfigModel } from '../data/models';
4
+ import { SwitchableAttributes } from '../containers/QuoteSummaryList/QuoteSummaryList';
5
+
6
+ export interface ItemFormatterOptions {
7
+ attributesToHide: SwitchableAttributes[];
8
+ routeProduct?: (item: NegotiableQuoteItemModel) => string;
9
+ slots?: {
10
+ Thumbnail?: SlotProps<{
11
+ item: NegotiableQuoteItemModel;
12
+ defaultImageProps: ImageProps;
13
+ }>;
14
+ ProductAttributes?: SlotProps<{
15
+ item: NegotiableQuoteItemModel;
16
+ }>;
17
+ };
18
+ dictionary: Record<string, string>;
19
+ quoteDisplaySettings?: StoreConfigModel['quoteDisplaySettings'];
20
+ }
21
+ /**
22
+ * Get image component for an item
23
+ */
24
+ export declare const getImage: (item: NegotiableQuoteItemModel, index: number, options: ItemFormatterOptions) => import("preact").JSX.Element | undefined;
25
+ /**
26
+ * Get title component for an item
27
+ */
28
+ export declare const getTitle: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => import("preact").JSX.Element | undefined;
29
+ /**
30
+ * Get SKU component for an item
31
+ */
32
+ export declare const getSku: (item: NegotiableQuoteItemModel) => import("preact").JSX.Element;
33
+ /**
34
+ * Get product attributes slot for an item
35
+ */
36
+ export declare const getProductAttributes: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => import("preact").JSX.Element;
37
+ /**
38
+ * Get configurations for an item (bundle, configurable, customizable options)
39
+ */
40
+ export declare const getConfigurations: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => {
41
+ [x: string]: any;
42
+ } | undefined;
43
+ /**
44
+ * Get total excluding tax component for an item
45
+ */
46
+ export declare const getTotalExcludingTax: (item: NegotiableQuoteItemModel, options: ItemFormatterOptions) => import("preact").JSX.Element | undefined;
47
+ //# sourceMappingURL=itemFormatters.d.ts.map