@dropins/storefront-quote-management 1.0.0-beta8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/sendQuoteTemplateForReview/sendQuoteTemplateForReview.d.ts +3 -0
- package/api.js +1 -1
- package/chunks/AttachedFilesList.js +1 -1
- package/chunks/CheckWithCircle.js +1 -1
- package/chunks/ChevronDown.js +1 -1
- package/chunks/ConfirmationModal.js +1 -1
- package/chunks/ItemsQuoted.js +1 -1
- package/chunks/ItemsQuotedTemplate.js +1 -1
- package/chunks/LineItemNoteModal.js +1 -1
- package/chunks/NegotiableQuoteFragment.js +2 -1
- package/chunks/NegotiableQuoteFragment.js.map +1 -1
- package/chunks/NegotiableQuoteTemplateFragment.js +1 -1
- package/chunks/OrderSummaryLine.js +1 -1
- package/chunks/QuoteCommentsList.js +1 -1
- package/chunks/QuoteCommentsList3.js +1 -1
- package/chunks/QuoteHistoryLog.js +1 -1
- package/chunks/QuoteHistoryLog3.js +1 -1
- package/chunks/QuoteTemplateCommentsList.js +2 -2
- package/chunks/QuoteTemplateCommentsList.js.map +1 -1
- package/chunks/QuoteTemplateHistoryLog.js +1 -1
- package/chunks/RenameQuoteModal.js +1 -1
- package/chunks/ShippingAddressDisplay.js +1 -1
- package/chunks/WarningFilled.js +1 -1
- package/chunks/addQuoteTemplateLineItemNote.js +1 -1
- package/chunks/dateUtils.js +1 -1
- package/chunks/duplicateNegotiableQuote.js +1 -1
- package/chunks/generateQuoteFromTemplate.js +1 -1
- package/chunks/getQuoteTemplates.js +1 -1
- package/chunks/negotiableQuotes.js +1 -1
- package/chunks/openQuoteTemplate.js +13 -12
- package/chunks/openQuoteTemplate.js.map +1 -1
- package/chunks/requestNegotiableQuote.js +1 -1
- package/chunks/setLineItemNote.js +1 -1
- package/chunks/state.js +1 -1
- package/chunks/transform-quote-template.js +1 -1
- package/chunks/transform-quote.js +2 -2
- package/chunks/transform-quote.js.map +1 -1
- package/chunks/uploadFile.js +1 -1
- package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +2 -0
- package/containers/ItemsQuoted.js +1 -1
- package/containers/ItemsQuotedTemplate.js +1 -1
- package/containers/ManageNegotiableQuote.js +1 -1
- package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +19 -1
- package/containers/ManageNegotiableQuoteTemplate.js +3 -3
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
- package/containers/OrderSummary.js +1 -1
- package/containers/OrderSummaryLine.js +1 -1
- package/containers/QuoteCommentsList.js +1 -1
- package/containers/QuoteHistoryLog.js +1 -1
- package/containers/QuoteSummaryList.js +1 -1
- package/containers/QuoteTemplateCommentsList.js +1 -1
- package/containers/QuoteTemplateHistoryLog.js +1 -1
- package/containers/QuoteTemplatesListTable.js +1 -1
- package/containers/QuotesListTable.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/ShippingAddressDisplay.js +1 -1
- package/data/models/negotiable-quote-model.d.ts +1 -0
- package/data/transforms/__fixtures__/negotiableQuoteData.d.ts +3 -0
- package/package.json +1 -1
- package/render.js +2 -2
|
@@ -17,6 +17,9 @@ export interface SendQuoteTemplateForReviewParams {
|
|
|
17
17
|
name?: string;
|
|
18
18
|
comment?: string;
|
|
19
19
|
referenceDocumentLinks?: ReferenceDocumentLinkInput[];
|
|
20
|
+
attachments?: {
|
|
21
|
+
key: string;
|
|
22
|
+
}[];
|
|
20
23
|
}
|
|
21
24
|
export declare const sendQuoteTemplateForReview: (params: SendQuoteTemplateForReviewParams) => Promise<import('../../data/models/negotiable-quote-template-model').NegotiableQuoteTemplateModel>;
|
|
22
25
|
//# sourceMappingURL=sendQuoteTemplateForReview.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{r as J}from"./chunks/requestNegotiableQuote.js";import{g as I}from"./chunks/duplicateNegotiableQuote.js";import{c as V,a as W,d as Z,b as ee,r as te,s as se}from"./chunks/duplicateNegotiableQuote.js";import{F as re,N as ae,S as ie,n as ne}from"./chunks/negotiableQuotes.js";import{events as a}from"@dropins/tools/event-bus.js";import{s as r,D as f,a as h,Q as n}from"./chunks/state.js";import{f as d,t as q}from"./chunks/transform-quote.js";import{i as ue,r as me,s as pe,e as le,h as ge}from"./chunks/transform-quote.js";import{N as D}from"./chunks/NegotiableQuoteFragment.js";import{u as _e}from"./chunks/uploadFile.js";import{a as T}from"./chunks/transform-quote-template.js";import{N as Q}from"./chunks/NegotiableQuoteTemplateFragment.js";import{Q as he,a as Te,S as Qe,g as Ae}from"./chunks/getQuoteTemplates.js";import{a as Ie,c as qe,d as De,o as Ne,s as ye}from"./chunks/openQuoteTemplate.js";import{a as Se,r as we,u as Fe}from"./chunks/addQuoteTemplateLineItemNote.js";import{g as ve}from"./chunks/generateQuoteFromTemplate.js";import{r as Me,s as Oe,u as xe}from"./chunks/setLineItemNote.js";import{Initializer as N}from"@dropins/tools/lib.js";import"@dropins/tools/fetch-graphql.js";function y(e){if(!e||typeof e!="object")return{requestQuote:!1,editQuote:!1,deleteQuote:!1,checkoutQuote:!1,viewQuoteTemplates:!1,manageQuoteTemplates:!1,generateQuoteFromTemplate:!1};if(e.all===!0)return{requestQuote:!0,editQuote:!0,deleteQuote:!0,checkoutQuote:!0,viewQuoteTemplates:!0,manageQuoteTemplates:!0,generateQuoteFromTemplate:!0};const s=e["Magento_NegotiableQuote::all"]===!0,t=e["Magento_NegotiableQuoteTemplate::all"]===!0,o=s||e["Magento_NegotiableQuote::manage"]===!0;return{requestQuote:o,editQuote:o,deleteQuote:o,checkoutQuote:s||e["Magento_NegotiableQuote::checkout"]===!0,viewQuoteTemplates:t||e["Magento_NegotiableQuoteTemplate::view_template"]===!0,manageQuoteTemplates:t||e["Magento_NegotiableQuoteTemplate::manage"]===!0,generateQuoteFromTemplate:t||e["Magento_NegotiableQuoteTemplate::generate_quote"]===!0}}function m(e){if(r.quoteDataLoaded)return;const s=p.config.getConfig(),{quoteId:t,quoteTemplateId:o}=s;!e.editQuote||!t&&!o||(r.quoteDataLoaded=!0,t&&I(t).then(i=>{r.quoteDataInitialized||a.emit("quote-management/quote-data/initialized",{quote:i,permissions:e}),r.quoteDataInitialized=!0}).catch(i=>{r.quoteDataLoaded=!1,a.emit("quote-management/quote-data/error",{error:i})}),o&&L(o).catch(i=>{r.quoteDataLoaded=!1,a.emit("quote-management/quote-template-data/error",{error:i})}))}const p=new N({init:async e=>{const s={};p.config.setConfig({...s,...e}),await w().then(t=>{r.config=t}).catch(t=>{console.error("Failed to fetch store config: ",t),r.config=h}),r.initialized=!0,a.emit("quote-management/initialized",{config:r.config})},listeners:()=>[a.on("authenticated",async e=>{r.authenticated=!!e,e||(r.permissions=f,r.quoteDataLoaded=!1,a.emit("quote-management/permissions",f))},{eager:!0}),a.on("auth/permissions",async e=>{const s=y(e);r.permissions=s,r.quoteDataLoaded=!1,a.emit("quote-management/permissions",r.permissions)},{eager:!0}),a.on("quote-management/permissions",async e=>{r.initialized&&m(e)},{eager:!0}),a.on("quote-management/initialized",async()=>{m(r.permissions)},{eager:!0}),a.on("checkout/updated",async e=>{r.initialized&&(e==null?void 0:e.type)==="quote"&&(r.quoteDataLoaded=!1,m(r.permissions))},{eager:!0})]}),B=p.config;function b(e){if(!e)return h;const s=t=>[n.TAX_EXCLUDED,n.TAX_INCLUDED,n.TAX_INCLUDED_AND_EXCLUDED].includes(t)?t:n.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:s(e.shopping_cart_display_subtotal),price:s(e.shopping_cart_display_price),shipping:s(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}}const S=`
|
|
4
4
|
query STORE_CONFIG_QUERY {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import*as i from"@dropins/tools/preact-compat.js";import{jsx as s,jsxs as o}from"@dropins/tools/preact-jsx-runtime.js";import{Button as u}from"@dropins/tools/components.js";import{S as h}from"./CheckWithCircle.js";import{S as g}from"./WarningFilled.js";import{useText as f}from"@dropins/tools/i18n.js";const M=t=>i.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",...t},i.createElement("g",{id:"Large"},i.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),i.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},i.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"}),i.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"})))),v=t=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.3599 5.64001L5.62988 18.37",stroke:"currentColor"}),i.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.3599 18.37L5.62988 5.64001",stroke:"currentColor"})),_=t=>{if(t===0)return"0 Bytes";const a=1024,l=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(a)),e=Math.min(r,l.length-1),n=t/Math.pow(a,e);return`${Math.round(n*100)/100} ${l[e]}`},S=(t,a)=>!a||a.length===0?!0:a.includes(t),B=(t,a)=>a==null?!0:t<=a,b=({files:t,onRemove:a,disabled:l=!1})=>{const r=f({removeFile:"NegotiableQuote.Manage.removeFile",uploading:"NegotiableQuote.Manage.uploading",uploadSuccess:"NegotiableQuote.Manage.uploadSuccess",uploadError:"NegotiableQuote.Manage.uploadError"});return!t||t.length===0?null:s("div",{className:"attached-files-list","data-testid":"attached-files-list",children:t.map(e=>{const n=e.status==="uploading",c=e.status==="error",d=e.status==="success",m=!l&&!n;return o("div",{className:`attached-files-list__item attached-files-list__item--${e.status}`,"data-testid":`attached-file-${e.key}`,children:[o("div",{className:"attached-files-list__item-main",children:[o("div",{className:"attached-files-list__item-icon",children:[n&&s("div",{className:"attached-files-list__spinner","data-testid":"file-uploading-spinner","aria-label":r.uploading}),d&&s(h,{"data-testid":"file-success-icon","aria-label":r.uploadSuccess,className:"attached-files-list__success-icon"}),c&&s(g,{"data-testid":"file-error-icon","aria-label":r.uploadError,color:"var(--color-error)",className:"attached-files-list__error-icon"})]}),o("div",{className:"attached-files-list__item-info",children:[s("div",{className:"attached-files-list__item-name","data-testid":"file-name",children:e.name}),o("div",{className:"attached-files-list__item-size","data-testid":"file-size",children:[_(e.size),n&&` - ${r.uploading}`]})]}),s(u,{variant:"tertiary",onClick:()=>a(e.key),disabled:!m,type:"button","aria-label":`${r.removeFile}: ${e.name}`,"data-testid":`remove-file-${e.key}`,className:"attached-files-list__remove-button",children:s(v,{})})]}),c&&e.error&&s("div",{className:"attached-files-list__item-error","data-testid":"file-error-message",children:e.error})]},e.key)})})};export{b as A,M as S,S as a,_ as f,B as v};
|
|
4
4
|
//# sourceMappingURL=AttachedFilesList.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import*as e from"@dropins/tools/preact-compat.js";const r=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"}));export{r as S};
|
|
4
4
|
//# sourceMappingURL=CheckWithCircle.js.map
|
package/chunks/ChevronDown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import*as e from"@dropins/tools/preact-compat.js";const o=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square",strokeLinejoin:"round"}));export{o as S};
|
|
4
4
|
//# sourceMappingURL=ChevronDown.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as i,jsxs as r}from"@dropins/tools/preact-jsx-runtime.js";import{Modal as v,Button as c}from"@dropins/tools/components.js";/* empty css */import{useText as N}from"@dropins/tools/i18n.js";const y=({open:d=!1,title:o,message:n,cancelLabel:s,confirmLabel:e,onCancel:a,onConfirm:l,onClose:f,showCloseButton:_,confirmationBanner:t,...h})=>{const m=N({cancel:"ConfirmationModal.cancel",confirm:"ConfirmationModal.confirm"});if(!d)return null;const{className:p,...u}=h;return i(v,{...u,size:"medium",onClose:f||a,clickToDismiss:!0,escapeToDismiss:!0,showCloseButton:_,"data-testid":"confirmation-modal",className:p,children:r("div",{className:"confirmation-modal__content",children:[t&&i("div",{className:"confirmation-modal__banner","data-testid":"confirmation-modal-banner",children:t}),o&&i("div",{className:"confirmation-modal__title","data-testid":"confirmation-modal-title",children:o}),n&&i("div",{className:"confirmation-modal__message","data-testid":"confirmation-modal-message",children:n}),r("div",{className:"confirmation-modal__actions","data-testid":"confirmation-modal-actions",children:[a&&i(c,{variant:"secondary",onClick:a,"data-testid":"confirmation-modal-cancel",children:s??m.cancel}),i(c,{variant:"primary",onClick:l,"data-testid":"confirmation-modal-confirm",children:e??m.confirm})]})]})})};export{y as C};
|
|
4
4
|
//# sourceMappingURL=ConfirmationModal.js.map
|
package/chunks/ItemsQuoted.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as n,jsxs as ye,Fragment as be}from"@dropins/tools/preact-jsx-runtime.js";import{useState as i,useEffect as T,useCallback as H}from"@dropins/tools/preact-compat.js";import{Slot as K}from"@dropins/tools/lib.js";import{events as P}from"@dropins/tools/event-bus.js";import{Price as V,InLineAlert as y}from"@dropins/tools/components.js";/* empty css */import{I as X,Q as Qe,P as ve,L as Ne}from"./LineItemNoteModal.js";import{C as Z}from"./ConfirmationModal.js";/* empty css *//* empty css */import"./state.js";import{u as R,s as Te,r as Ie}from"./setLineItemNote.js";import{S as ee}from"./CheckWithCircle.js";import{S as D}from"./WarningFilled.js";import{useText as he}from"@dropins/tools/i18n.js";const qe=3e3,_e=({quoteData:te,onItemCheckboxChange:I,onItemDropdownChange:g,onRemoveItemsRef:b,onRemoveModalStateChange:m,slots:p,...ae})=>{const[s,h]=i(te),[F,q]=i({}),[u,j]=i(null),[se,Q]=i(!1),[oe,A]=i(!1),[k,B]=i(""),[v,l]=i({type:null,message:""}),[ne,x]=i(!1),[f,S]=i([]),[re,C]=i(!1),[N,d]=i({type:null,message:""}),[_,c]=i({}),[ie,U]=i(!1),o=he({subtotal:"NegotiableQuote.Manage.quotePricesSummary.subtotal.excludingTax",grandTotal:"NegotiableQuote.Manage.quotePricesSummary.grandTotal.includingTax",appliedTaxes:"NegotiableQuote.Manage.quotePricesSummary.appliedTaxes",modalTitle:"NegotiableQuote.Manage.updateQuantitiesModal.title",modalDescription:"NegotiableQuote.Manage.updateQuantitiesModal.description",modalCancelButton:"NegotiableQuote.Manage.updateQuantitiesModal.cancelButton",modalUpdateButton:"NegotiableQuote.Manage.updateQuantitiesModal.updateButton",successHeading:"NegotiableQuote.Manage.updateQuantitiesModal.successHeading",successMessage:"NegotiableQuote.Manage.updateQuantitiesModal.successMessage",errorHeading:"NegotiableQuote.Manage.updateQuantitiesModal.errorHeading",errorMessage:"NegotiableQuote.Manage.updateQuantitiesModal.errorMessage",removeModalTitle:"NegotiableQuote.Manage.removeItemsModal.title",removeModalDescription:"NegotiableQuote.Manage.removeItemsModal.description",removeModalCancelButton:"NegotiableQuote.Manage.removeItemsModal.cancelButton",removeModalConfirmButton:"NegotiableQuote.Manage.removeItemsModal.confirmButton",removeModalConfirmButtonRemoving:"NegotiableQuote.Manage.removeItemsModal.confirmButtonRemoving",removeSuccessHeading:"NegotiableQuote.Manage.removeItemsModal.successHeading",removeSuccessMessage:"NegotiableQuote.Manage.removeItemsModal.successMessage",removeErrorHeading:"NegotiableQuote.Manage.removeItemsModal.errorHeading",removeErrorMessage:"NegotiableQuote.Manage.removeItemsModal.errorMessage"});T(()=>{const t=P.on("quote-management/quote-data",e=>{h(e.quote),q({}),l({type:null,message:""}),c({})},{eager:!0});return()=>t==null?void 0:t.off()},[]),T(()=>{const t=P.on("quote-management/quantities-updated",e=>{h(e.quote),q({}),l({type:"success",message:o.successMessage}),setTimeout(()=>{Q(!1),l({type:null,message:""})},3e3)});return()=>t==null?void 0:t.off()},[o.successMessage]),T(()=>{const t=P.on("quote-management/quote-items-removed",e=>{h(e.quote),S([]),C(!1),d({type:"success",message:o.removeSuccessMessage}),setTimeout(()=>{x(!1),d({type:null,message:""}),m==null||m(!1)},qe)});return()=>t==null?void 0:t.off()},[o.removeSuccessMessage,m]);const O=H(t=>{!t||t.length===0||(S(t),d({type:null,message:""}),x(!0))},[]);T(()=>{b==null||b(O)},[O,b]);const W=()=>{d({type:null,message:""})},w=(t,e)=>{const a=t;if(e==="edit"){j(a),A(!0),c(r=>({...r,[a.uid]:""}));return}if(e==="remove"){c(r=>({...r,[a.uid]:e})),O([a]),g==null||g(a,e),c(r=>({...r,[a.uid]:""}));return}e&&(g==null||g(a,e)),c(r=>{if(!(a.uid in r))return r;const M={...r};return delete M[a.uid],M})},ue=async()=>{if(!s||f.length===0)return;const t=f.map(e=>e.uid);C(!0),d({type:null,message:""});try{await Ie({quoteUid:s.uid,quoteItemUids:t})}catch(e){const a=e instanceof Error?e.message:o.removeErrorMessage;if(d({type:"error",message:a}),f.length===1){const r=f[0];c(M=>{if(!(r.uid in M))return M;const J={...M};return delete J[r.uid],J})}C(!1)}},le=()=>{if(x(!1),d({type:null,message:""}),m==null||m(!1),f.length===1){const t=f[0];c(e=>{if(!(t.uid in e))return e;const a={...e};return delete a[t.uid],a})}S([])},E=H(()=>{u&&c(t=>{const e={...t};return delete e[u.uid],e}),A(!1),j(null),U(!1),B("")},[u]),ce=H(async(t,e)=>{if(!(!u||!s)){U(!0);try{e!==u.quantity&&await R({quoteUid:s.uid,items:[{quoteItemUid:u.uid,quantity:e}]}),await Te({quoteUid:s.uid,itemUid:u.uid,note:t,quantity:e}),E()}catch(a){console.error("Failed to set line item note:",a);const r=a instanceof Error?a.message:"Unable to update the item. Please try again.";B(r),U(!1)}}},[u,s,E]);if(!s)return n(X,{loading:!0});const Y=!!s.canUpdateQuote,$=(t,e)=>{q(a=>({...a,[t.uid]:e}))},z=t=>{t.preventDefault(),l({type:null,message:""}),Q(!0)},me=async()=>{if(!s)return;if(Object.keys(F).length===0){Q(!1);return}l({type:null,message:""});const t=Object.entries(F).map(([e,a])=>({quoteItemUid:e,quantity:a}));try{await R({quoteUid:s.uid,items:t})}catch(e){const a=e instanceof Error?e.message:o.errorMessage;l({type:"error",message:a}),console.error("Failed to update quantities:",e)}},de=()=>{Q(!1),l({type:null,message:""})},G=()=>{l({type:null,message:""})},L=[];s.prices.subtotalExcludingTax&&L.push({label:o.subtotal,id:"subtotal",value:n(V,{amount:s.prices.subtotalExcludingTax.value,currency:s.prices.subtotalExcludingTax.currency,weight:"normal"})}),s.prices.grandTotal&&L.push({label:o.grandTotal,id:"total",value:n(V,{amount:s.prices.grandTotal.value,currency:s.prices.grandTotal.currency}),strong:!0});const ge=v.type==="success"?n(y,{type:"success",variant:"primary",icon:n(ee,{}),heading:o.successHeading,description:v.message,onDismiss:G,"data-testid":"update-quantities-success-banner"}):v.type==="error"?n(y,{type:"error",variant:"primary",icon:n(D,{}),heading:o.errorHeading,description:v.message,onDismiss:G,"data-testid":"update-quantities-error-banner"}):null,pe=I?(t,e)=>{I(t,e)}:void 0,fe=N.type==="success"?n(y,{type:"success",variant:"primary",icon:n(ee,{}),heading:o.removeSuccessHeading,description:N.message,onDismiss:W,"data-testid":"remove-items-success-banner"}):N.type==="error"?n(y,{type:"error",variant:"primary",icon:n(D,{}),heading:o.removeErrorHeading,description:N.message,onDismiss:W,"data-testid":"remove-items-error-banner"}):null,Me=k?n(y,{type:"error",variant:"primary",icon:n(D,{}),heading:o.errorHeading,description:k,onDismiss:()=>B(""),"data-testid":"line-item-note-error-banner"}):null;return ye(be,{children:[n(X,{"data-testid":"items-quoted-container",...ae,loading:!1,table:n(K,{name:"ProductListTable",slot:p==null?void 0:p.ProductListTable,context:{items:s.items,canEdit:Y,readOnly:s.readOnly,onItemCheckboxChange:I,onItemDropdownChange:w,onQuantityChange:$,onUpdate:z,dropdownSelections:_},children:n(ve,{items:s.items,canEdit:Y,onItemCheckboxChange:pe,readOnly:s.readOnly,onItemDropdownChange:w,onQuantityChange:$,onUpdate:z,dropdownSelections:_})}),pricesSummary:n(K,{name:"QuotePricesSummary",slot:p==null?void 0:p.QuotePricesSummary,context:{items:s.items,prices:s.prices},children:n(Qe,{entries:L})})}),n(Z,{open:se,title:o.modalTitle,message:o.modalDescription,cancelLabel:o.modalCancelButton,confirmLabel:o.modalUpdateButton,onCancel:de,onConfirm:me,confirmationBanner:ge,"data-testid":"update-quantities-modal"}),n(Z,{open:ne,title:o.removeModalTitle,message:o.removeModalDescription,cancelLabel:o.removeModalCancelButton,confirmLabel:re?o.removeModalConfirmButtonRemoving:o.removeModalConfirmButton,onCancel:le,onConfirm:ue,confirmationBanner:fe,"data-testid":"remove-items-modal"}),u&&n(Ne,{open:oe,item:u,onClose:E,onConfirm:ce,isSubmitting:ie,errorBanner:Me||void 0})]})};export{_e as I};
|
|
4
4
|
//# sourceMappingURL=ItemsQuoted.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as o,jsxs as ne,Fragment as se}from"@dropins/tools/preact-jsx-runtime.js";import{useState as l,useEffect as O,useCallback as p}from"@dropins/tools/preact-compat.js";import{Slot as W}from"@dropins/tools/lib.js";import{events as H}from"@dropins/tools/event-bus.js";import{InLineAlert as B,Price as Y}from"@dropins/tools/components.js";/* empty css */import{I as $,Q as re,P as ie,L as le}from"./LineItemNoteModal.js";import{C as me}from"./ConfirmationModal.js";/* empty css *//* empty css */import"./state.js";import{r as de,u as ue,a as ce}from"./addQuoteTemplateLineItemNote.js";import{S as z}from"./CheckWithCircle.js";import{S as U}from"./WarningFilled.js";import{useText as pe}from"@dropins/tools/i18n.js";const ge=3e3,Me=b=>{const{templateId:r,onRemoveModalStateChange:a,removeSuccessMessage:e,removeErrorMessage:T}=b,[i,g]=l(!1),[M,s]=l([]),[u,m]=l(!1),[S,n]=l({type:null,message:""});O(()=>{const d=H.on("quote-management/quote-template-data",()=>{s([]),m(!1),n({type:"success",message:e}),setTimeout(()=>{g(!1),n({type:null,message:""}),a==null||a(!1)},ge)});return()=>d==null?void 0:d.off()},[e,a]);const N=p(d=>{!d||d.length===0||(s(d),n({type:null,message:""}),g(!0))},[]),Q=p(async()=>{if(!r||M.length===0)return;const d=M.map(I=>I.uid).filter(Boolean);if(d.length!==0){m(!0),n({type:null,message:""});try{await de({templateId:r,itemUids:d})}catch(I){const c=I instanceof Error?I.message:T;n({type:"error",message:c}),m(!1)}}},[r,M,T]),t=p(()=>{g(!1),n({type:null,message:""}),a==null||a(!1),s([])},[a]);return{handleRemoveItems:N,handleConfirmRemove:Q,handleCancelRemove:t,isRemoveModalOpen:i,itemsToRemove:M,isRemoving:u,removeNotificationState:S}},fe=b=>{const{handleRemoveItems:r}=b,[a,e]=l({}),T=p(()=>{},[]),i=p((g,M)=>{const s=g;if(M==="remove"){e(u=>({...u,[s.uid||""]:M})),r([s]),e(u=>({...u,[s.uid||""]:""}));return}e(u=>{if(!s.uid||!(s.uid in u))return u;const m={...u};return delete m[s.uid],m})},[r]);return{dropdownSelections:a,handleItemDropdownChange:i,handleDismissRemoveBanner:T}},ve=3e3,Te=b=>{const{templateId:r,onUpdateModalStateChange:a,updateSuccessMessage:e,updateErrorMessage:T}=b,[i,g]=l({}),[M,s]=l(!1),[u,m]=l(!1),[S,n]=l({type:null,message:""});O(()=>{const c=H.on("quote-management/quote-template-data",()=>{g({}),m(!1),n({type:"success",message:e}),setTimeout(()=>{s(!1),n({type:null,message:""}),a==null||a(!1)},ve)});return()=>c==null?void 0:c.off()},[e,a]);const N=p((c,y)=>{const h=c;if(!h.uid)return;const C=h.uid;g(R=>({...R,[C]:y}))},[]),Q=p(c=>{c.preventDefault(),n({type:null,message:""}),s(!0)},[]),t=p(async()=>{if(!r||Object.keys(i).length===0){s(!1);return}m(!0),n({type:null,message:""});const c=Object.entries(i).map(([y,h])=>({itemId:y,quantity:h}));try{await ue({templateId:r,items:c})}catch(y){const h=y instanceof Error?y.message:T;n({type:"error",message:h}),m(!1)}},[r,i,T]),d=p(()=>{s(!1),n({type:null,message:""}),a==null||a(!1),g({})},[a]),I=p(()=>{n({type:null,message:""})},[]);return{quantityChanges:i,handleQuantityChange:N,handleUpdate:Q,handleConfirmUpdate:t,handleCancelUpdate:d,handleDismissBanner:I,isUpdateModalOpen:M,isUpdating:u,updateNotificationState:S}},Oe=({templateData:b,slots:r,...a})=>{const[e,T]=l(b),[i,g]=l(null),[M,s]=l(!1),[u,m]=l(!1),[S,n]=l(""),[N,Q]=l({}),t=pe({subtotal:"NegotiableQuoteTemplate.Manage.quotePricesSummary.subtotal.excludingTax",grandTotal:"NegotiableQuoteTemplate.Manage.quotePricesSummary.grandTotal.includingTax",appliedTaxes:"NegotiableQuoteTemplate.Manage.quotePricesSummary.appliedTaxes",removeModalTitle:"NegotiableQuoteTemplate.Manage.removeItemsModal.title",removeModalDescription:"NegotiableQuoteTemplate.Manage.removeItemsModal.description",removeModalCancelButton:"NegotiableQuoteTemplate.Manage.removeItemsModal.cancelButton",removeModalConfirmButton:"NegotiableQuoteTemplate.Manage.removeItemsModal.confirmButton",removeModalConfirmButtonRemoving:"NegotiableQuoteTemplate.Manage.removeItemsModal.confirmButtonRemoving",removeSuccessHeading:"NegotiableQuoteTemplate.Manage.removeItemsModal.successHeading",removeSuccessMessage:"NegotiableQuoteTemplate.Manage.removeItemsModal.successMessage",removeErrorHeading:"NegotiableQuoteTemplate.Manage.removeItemsModal.errorHeading",removeErrorMessage:"NegotiableQuoteTemplate.Manage.removeItemsModal.errorMessage",updateModalTitle:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.title",updateModalDescription:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.description",updateModalCancelButton:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.cancelButton",updateModalUpdateButton:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.updateButton",updateSuccessHeading:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.successHeading",updateSuccessMessage:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.successMessage",updateErrorHeading:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.errorHeading",updateErrorMessage:"NegotiableQuoteTemplate.Manage.updateQuantitiesModal.errorMessage",errorHeading:"NegotiableQuoteTemplate.Manage.lineItemNoteModal.errorHeading"}),{handleRemoveItems:d,handleConfirmRemove:I,handleCancelRemove:c,isRemoveModalOpen:y,isRemoving:h,removeNotificationState:C}=Me({templateId:e==null?void 0:e.id,removeSuccessMessage:t.removeSuccessMessage,removeErrorMessage:t.removeErrorMessage}),{dropdownSelections:R,handleItemDropdownChange:P,handleDismissRemoveBanner:q}=fe({handleRemoveItems:d}),{handleQuantityChange:L,handleUpdate:A,handleConfirmUpdate:G,handleCancelUpdate:J,handleDismissBanner:F,isUpdateModalOpen:K,updateNotificationState:E}=Te({templateId:e==null?void 0:e.id,updateSuccessMessage:t.updateSuccessMessage,updateErrorMessage:t.updateErrorMessage});O(()=>{const v=H.on("quote-management/quote-template-data",f=>{T(f.quoteTemplate),Q({})},{eager:!0});return()=>v==null?void 0:v.off()},[]);const _=p((v,f)=>{const D=v;if(f==="edit"){g(D),s(!0),Q(oe=>({...oe,[D.uid]:""}));return}P(v,f)},[P]),k={...R,...N},w=p(()=>{i&&Q(v=>{const f={...v};return delete f[i.uid],f}),s(!1),g(null),m(!1),n("")},[i]),V=p(async v=>{if(!(!i||!e)){m(!0),n("");try{await ce({templateId:e.id,itemId:i.uid,note:v}),w()}catch(f){console.error("Failed to set template line item note:",f);const D=f instanceof Error?f.message:"Unable to update the item. Please try again.";n(D),m(!1)}}},[i,e,w]),X=C.type==="success"?o(B,{type:"success",variant:"primary",icon:o(z,{}),heading:t.removeSuccessHeading,description:C.message,onDismiss:q,"data-testid":"remove-items-success-banner"}):C.type==="error"?o(B,{type:"error",variant:"primary",icon:o(U,{}),heading:t.removeErrorHeading,description:C.message,onDismiss:q,"data-testid":"remove-items-error-banner"}):null,Z=E.type==="success"?o(B,{type:"success",variant:"primary",icon:o(z,{}),heading:t.updateSuccessHeading,description:E.message,onDismiss:F,"data-testid":"update-quantities-success-banner"}):E.type==="error"?o(B,{type:"error",variant:"primary",icon:o(U,{}),heading:t.updateErrorHeading,description:E.message,onDismiss:F,"data-testid":"update-quantities-error-banner"}):null;if(!e)return o($,{loading:!0});const ee=y?{open:!0,title:t.removeModalTitle,message:t.removeModalDescription,cancelLabel:t.removeModalCancelButton,confirmLabel:h?t.removeModalConfirmButtonRemoving:t.removeModalConfirmButton,onCancel:c,onConfirm:I,confirmationBanner:X}:null,te=K?{open:!0,title:t.updateModalTitle,message:t.updateModalDescription,cancelLabel:t.updateModalCancelButton,confirmLabel:t.updateModalUpdateButton,onCancel:J,onConfirm:G,confirmationBanner:Z}:null,j=ee||te,x=[];e.prices.subtotalExcludingTax&&x.push({label:t.subtotal,id:"subtotal",value:o(Y,{amount:e.prices.subtotalExcludingTax.value,currency:e.prices.subtotalExcludingTax.currency,weight:"normal"})}),e.prices.grandTotal&&x.push({label:t.grandTotal,id:"total",value:o(Y,{amount:e.prices.grandTotal.value,currency:e.prices.grandTotal.currency}),strong:!0});const ae=S?o(B,{type:"error",variant:"primary",icon:o(U,{}),heading:t.errorHeading,description:S,onDismiss:()=>n(""),"data-testid":"line-item-note-error-banner"}):null;return ne(se,{children:[o($,{"data-testid":"items-quoted-template-container",...a,loading:!1,table:o(W,{name:"ProductListTable",slot:r==null?void 0:r.ProductListTable,context:{items:e.items,canEdit:e.canSendForReview,dropdownSelections:k,handleItemDropdownChange:_,handleQuantityChange:L,handleUpdate:A},children:o(ie,{items:e.items,canEdit:e.canSendForReview,showActions:e.canEditTemplateItems,onItemDropdownChange:_,onQuantityChange:L,onUpdate:A,dropdownSelections:k})}),pricesSummary:o(W,{name:"QuotePricesSummary",slot:r==null?void 0:r.QuotePricesSummary,context:{items:e.items,prices:e.prices},children:o(re,{entries:x})})}),j&&o(me,{...j}),i&&o(le,{open:M,item:i,onClose:w,onConfirm:V,isSubmitting:u,readOnlyQuantity:!0,errorBanner:ae||void 0})]})};export{Oe as I};
|
|
4
4
|
//# sourceMappingURL=ItemsQuotedTemplate.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as t,jsxs as n,Fragment as F}from"@dropins/tools/preact-jsx-runtime.js";import{classes as f,VComponent as D}from"@dropins/tools/lib.js";/* empty css */import{Skeleton as te,SkeletonRow as ae,Input as V,InLineAlert as oe,Picker as ne,Price as T,Checkbox as le,Button as E,Table as Z,Accordion as ie,AccordionSection as se,Modal as re,TextArea as ue}from"@dropins/tools/components.js";import{h as R}from"@dropins/tools/preact.js";import{useState as W,useEffect as ce}from"@dropins/tools/preact-hooks.js";import{g as de}from"./dateUtils.js";import{S as me}from"./WarningFilled.js";import{useText as J}from"@dropins/tools/i18n.js";import{useState as A,useEffect as be,useCallback as G}from"@dropins/tools/preact-compat.js";const Qe=({className:q,loading:d,table:o,pricesSummary:u,...i})=>d?t(pe,{}):n("div",{className:f(["quote-management-items-quoted",q]),...i,children:[o&&t(D,{node:o,className:f(["quote-management-items-quoted__table"]),"data-testid":"quote-management-items-quoted__table"}),u&&t(D,{node:u,className:f(["quote-management-items-quoted__prices-summary"]),"data-testid":"quote-management-items-quoted__prices-summary"})]}),pe=()=>t(te,{"data-testid":"items-quoted-skeleton",children:t(ae,{variant:"row",fullWidth:!0,size:"medium",lines:4,multilineGap:"xsmall"})}),Me=({className:q,items:d,canEdit:o,readOnly:u=!1,showActions:i,onItemCheckboxChange:b,onItemDropdownChange:g,onQuantityChange:k,onUpdate:S,dropdownSelections:_,...h})=>{const[I,L]=W({}),[y,p]=W({});ce(()=>{const e={};d.forEach(s=>{e[s.uid]=s.quantity}),L(e),p(e)},[d]);const v=Object.keys(y).some(e=>y[e]!==I[e]),a=J({updateButton:"NegotiableQuote.Manage.productListTable.submitButton",productNameHeader:"NegotiableQuote.Manage.productListTable.headers.productName",skuHeader:"NegotiableQuote.Manage.productListTable.headers.sku",priceHeader:"NegotiableQuote.Manage.productListTable.headers.price",quantityHeader:"NegotiableQuote.Manage.productListTable.headers.quantity",discountHeader:"NegotiableQuote.Manage.productListTable.headers.discount",subtotalHeader:"NegotiableQuote.Manage.productListTable.headers.subtotal",actionsHeader:"NegotiableQuote.Manage.productListTable.headers.actions",editNoteToSeller:"NegotiableQuote.Manage.productListTable.actions.editNoteToSeller",remove:"NegotiableQuote.Manage.productListTable.actions.remove",notesHeader:"NegotiableQuote.Manage.productListTable.notes.header",leftANote:"NegotiableQuote.Manage.productListTable.notes.leftANote",buyer:"NegotiableQuote.Manage.productListTable.notes.buyer",seller:"NegotiableQuote.Manage.productListTable.notes.seller",outOfStock:"NegotiableQuote.Manage.productListTable.outOfStock",outOfStockMessage:"NegotiableQuote.Manage.productListTable.outOfStockMessage"}),w=[{label:a.productNameHeader,key:"productName"},{label:a.skuHeader,key:"sku"},{label:a.priceHeader,key:"price"},{label:a.quantityHeader,key:"quantity"},{label:a.discountHeader,key:"discount"},{label:a.subtotalHeader,key:"subtotal"}];o&&!u&&w.unshift({label:"",key:"checkbox"}),(i??o)&&!u&&w.push({label:a.actionsHeader,key:"actions"});const j=(e,s)=>{const r=e.target.checked;b==null||b(s,r)},P=(e,s)=>{const r=e.target.value;g==null||g(s,r)},B=(e,s)=>{const r=parseInt(e.target.value,10);!isNaN(r)&&r>0&&(p(N=>({...N,[s.uid]:r})),k==null||k(s,r))},O=e=>{e.preventDefault(),S==null||S(e)},c=(e,s)=>e>0?n("div",{className:"quote-management-product-list-table__discount-container",children:[n("span",{className:"quote-management-product-list-table__discount-percent",children:[s,"%"]}),n("span",{className:"quote-management-product-list-table__discount-price",children:["(",t(T,{amount:e}),")"]})]}):void 0,Q=e=>{var N,M;const s=(N=e.configurableOptions)==null?void 0:N.map(m=>n("div",{className:"quote-management-product-list-table__configurable-option",children:[n("span",{className:"quote-management-product-list-table__configurable-option-label",children:[m.optionLabel,":"]}),t("span",{className:"quote-management-product-list-table__configurable-option-value",children:m.valueLabel})]},m.optionLabel)),r=(M=e.bundleOptions)==null?void 0:M.map(m=>n("div",{className:"quote-management-product-list-table__bundle-option",children:[t("span",{className:"quote-management-product-list-table__bundle-option-label",children:m.label}),t("div",{className:"quote-management-product-list-table__bundle-option-values",children:m.values.map(l=>n("span",{className:"quote-management-product-list-table__bundle-option-value",children:[n("span",{className:"quote-management-product-list-table__bundle-option-value-quantity",children:[l.quantity," x"]}),t("span",{className:"quote-management-product-list-table__bundle-option-value-label",children:l.label}),t(T,{className:"quote-management-product-list-table__bundle-option-value-original-price",amount:l.originalPrice.value,currency:l.originalPrice.currency,weight:"normal"})]},l.label))})]},m.label));return n("div",{className:"quote-management-product-list-table__product-name-container",children:[t("span",{className:"quote-management-product-list-table__product-name",children:e.product.name}),s,r]})},$=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0,timeZone:de()}),H=e=>{var M,m;const s=((M=e.noteFromBuyer)==null?void 0:M.filter(l=>l&&l.note&&l.note.trim()!==""))||[],r=((m=e.noteFromSeller)==null?void 0:m.filter(l=>l&&l.note&&l.note.trim()!==""))||[],N=[...s,...r];return N.length===0?null:n("div",{className:"quote-management-product-list-table__notes-container","data-testid":`item-notes-${e.product.sku}`,children:[t("div",{className:"quote-management-product-list-table__notes-header",children:a.notesHeader}),t("div",{className:"quote-management-product-list-table__notes-list",children:N.map((l,ee)=>n("div",{className:"quote-management-product-list-table__note-item",children:[n("div",{className:"quote-management-product-list-table__note-content",children:[n("strong",{className:"quote-management-product-list-table__note-meta",children:[$(l.createdAt)," (",s.includes(l)?a.buyer:a.seller,")"]})," ",a.leftANote]}),n("div",{className:"quote-management-product-list-table__note-text",children:[l.note," "]})]},l.noteUid||ee))})]})},z=new Set,K=d.flatMap((e,s)=>{var m;const r=H(e);(r||e.outOfStock)&&z.add(s);const N=o?t(V,{className:"quote-management-product-list-table__quantity-input",type:"number",min:"1",value:((m=y[e.uid])==null?void 0:m.toString())||e.quantity.toString(),onChange:l=>B(l,e),disabled:u||!o,"data-testid":`quantity-input-${e.product.sku}`}):t("span",{className:"quote-management-product-list-table__quantity",children:e.quantity});return[{checkbox:t(le,{className:"quote-management-product-list-table__checkbox",name:"itemSelected","data-testid":`item-checkbox-${e.product.sku}`,onChange:l=>j(l,e),value:e.product.sku}),productName:Q(e),sku:t("span",{className:"quote-management-product-list-table__sku",children:e.product.sku}),price:t(T,{className:"quote-management-product-list-table__price",amount:e.prices.originalItemPrice.value,currency:e.prices.originalItemPrice.currency}),quantity:N,discount:e.catalogDiscount?c(e.catalogDiscount.amountOff,e.catalogDiscount.percentOff):void 0,subtotal:t(T,{className:"quote-management-product-list-table__subtotal",amount:e.prices.rowTotal.value,currency:e.prices.rowTotal.currency}),actions:t(ne,{className:"quote-management-product-list-table__actions","data-testid":`item-dropdown-${e.product.sku}`,name:`item-dropdown-${e.product.sku}`,handleSelect:l=>P(l,e),placeholder:"Select",value:(_==null?void 0:_[e.uid])??"",options:[{text:a.editNoteToSeller,value:"edit"},{text:a.remove,value:"remove"}]}),_rowDetails:n(F,{children:[e.outOfStock&&t("div",{className:"quote-management-product-list-table__out-of-stock-message",children:t(oe,{type:"warning",variant:"primary",icon:t(me,{}),heading:a.outOfStock,description:a.outOfStockMessage})}),r&&t("div",{className:"quote-management-product-list-table__notes-row-wrapper",children:r})]})}]}),U=t(Z,{columns:w,rowData:K,"data-testid":"product-list-table",mobileLayout:"stacked",expandedRows:z}),X=o?R("form",{}):R("div",{}),Y=o?{onSubmit:O,...h}:h,C=t(E,{type:"submit",disabled:u||!o||!v,"data-testid":"product-list-table-submit-button",children:a.updateButton});return n(D,{node:X,className:f(["quote-management-product-list-table-container",q]),"data-testid":"product-list-table-container",...Y,children:[U,t("div",{className:"quote-management-product-list-table-container__submit-container",children:C})]})},Te=({className:q,entries:d,...o})=>{const u=i=>{var g;const b=(g=i.children)==null?void 0:g.map(u);return t("div",{className:"quote-management-quote-prices-summary__entry","data-testid":`quote-prices-summary-entry-${i.id}`,children:b?t(ie,{className:"quote-management-quote-prices-summary__accordion","data-testid":`quote-prices-summary-entry-accordion-${i.id}`,children:t(se,{className:"quote-management-quote-prices-summary__accordion-section",title:i.label,ariaLabelTitle:i.label,secondaryText:i.value,children:b})}):n(F,{children:[t("span",{className:f(["quote-management-quote-prices-summary__label",["quote-management-quote-prices-summary__label--strong",i.strong]]),"data-testid":`quote-prices-summary-entry-label-${i.id}`,children:i.label}),t("span",{className:"quote-management-quote-prices-summary__value","data-testid":`quote-prices-summary-entry-value-${i.id}`,children:i.value})]})},i.id)};return t("div",{className:f(["quote-management-quote-prices-summary",q]),"data-testid":"quote-prices-summary",...o,children:d==null?void 0:d.map(u)})},Se=({className:q,open:d,item:o,onClose:u,onConfirm:i,isSubmitting:b=!1,errorBanner:g,successBanner:k,showCloseButton:S=!0,readOnlyQuantity:_=!1})=>{const[h,I]=A(""),[L,y]=A(o.quantity),[p,v]=A({}),a=J({title:"NegotiableQuote.Manage.lineItemNote.title",productLabel:"NegotiableQuote.Manage.lineItemNote.productLabel",skuLabel:"NegotiableQuote.Manage.lineItemNote.skuLabel",priceLabel:"NegotiableQuote.Manage.lineItemNote.priceLabel",stockLabel:"NegotiableQuote.Manage.lineItemNote.stockLabel",quantityLabel:"NegotiableQuote.Manage.lineItemNote.quantityLabel",discountLabel:"NegotiableQuote.Manage.lineItemNote.discountLabel",subtotalLabel:"NegotiableQuote.Manage.lineItemNote.subtotalLabel",noteLabel:"NegotiableQuote.Manage.lineItemNote.noteLabel",notePlaceholder:"NegotiableQuote.Manage.lineItemNote.notePlaceholder",noteHelper:"NegotiableQuote.Manage.lineItemNote.noteHelper",confirmButton:"NegotiableQuote.Manage.lineItemNote.confirmButton",cancelButton:"NegotiableQuote.Manage.lineItemNote.cancelButton",noteError:"NegotiableQuote.Manage.lineItemNote.noteError",quantityError:"NegotiableQuote.Manage.lineItemNote.quantityError"});be(()=>{var c;if(d){const Q=((c=o.noteFromBuyer)==null?void 0:c.filter(H=>H&&H.note))||[],$=Q.length>0?Q[0].note:"";I($||""),y(o.quantity),v({})}},[d,o.quantity,o.noteFromBuyer]);const w=G(()=>{const c={};if(h.trim()||(c.note=a.noteError),!_&&L<=0&&(c.quantity=a.quantityError),Object.keys(c).length>0){v(c);return}i(h.trim(),L)},[h,L,i,a,_]),x=G(()=>{I(""),y(o.quantity),v({}),u==null||u()},[u,o.quantity]);if(!d)return null;const P=o.discounts&&o.discounts.length>0?o.discounts.map(c=>c.label).join(", "):"-",B=[{label:a.productLabel,key:"productName"},{label:a.priceLabel,key:"price"},{label:a.stockLabel,key:"stock"},{label:a.quantityLabel,key:"quantity"},{label:a.discountLabel,key:"discount"},{label:a.subtotalLabel,key:"subtotal"}],O=[{productName:n("div",{className:"quote-management-line-item-note-modal__product-info",children:[t("div",{className:"quote-management-line-item-note-modal__product-name",children:o.product.name}),n("div",{className:"quote-management-line-item-note-modal__product-sku",children:[a.skuLabel,": ",o.product.sku]})]}),price:t(T,{amount:o.prices.originalItemPrice.value,currency:o.prices.originalItemPrice.currency}),stock:t("span",{className:"quote-management-line-item-note-modal__stock",children:o.stockStatus}),quantity:_?t("span",{className:"quote-management-line-item-note-modal__quantity-readonly",children:o.quantity}):t(V,{name:"quantity",type:"number",min:"1",value:L.toString(),onInput:c=>{const Q=parseInt(c.target.value,10)||0;y(Q),v({...p,quantity:void 0})},disabled:b,error:!!p.quantity,required:!0,"data-testid":"line-item-note-quantity-input",className:"quote-management-line-item-note-modal__quantity-input"}),discount:t("span",{className:"quote-management-line-item-note-modal__discount",children:P}),subtotal:t(T,{amount:o.prices.rowTotal.value,currency:o.prices.rowTotal.currency})}];return n(re,{open:d,size:"medium",title:t(F,{children:a.title}),onClose:x,clickToDismiss:!0,escapeToDismiss:!0,showCloseButton:S,className:f(["quote-management-line-item-note-modal",q]),"data-testid":"line-item-note-modal",children:[g&&t("div",{className:"quote-management-line-item-note-modal__error-banner","data-testid":"line-item-note-modal-error-banner",children:g}),k&&t("div",{className:"quote-management-line-item-note-modal__success-banner","data-testid":"line-item-note-modal-success-banner",children:k}),n("div",{className:"quote-management-line-item-note-modal__content",children:[n("div",{className:"quote-management-line-item-note-modal__details",children:[t(Z,{columns:B,rowData:O,"data-testid":"line-item-note-table",mobileLayout:"stacked",className:"quote-management-line-item-note-modal__details-table"}),p.quantity&&t("div",{className:"quote-management-line-item-note-modal__table-error",children:p.quantity})]}),n("div",{className:"quote-management-line-item-note-modal__form-field",children:[t(ue,{name:"note",placeholder:a.notePlaceholder,rows:4,value:h,onInput:c=>{I(c.target.value),v({...p,note:void 0})},label:a.noteLabel,disabled:b,"data-testid":"line-item-note-textarea"}),!p.note&&t("span",{className:"quote-management-line-item-note-modal__helper-text",children:a.noteHelper}),p.note&&t("span",{className:"quote-management-line-item-note-modal__error-text",children:p.note})]})]}),n("div",{className:"quote-management-line-item-note-modal__actions",children:[t(E,{variant:"secondary",size:"medium",onClick:x,disabled:b,className:"quote-management-line-item-note-modal__cancel-button","data-testid":"line-item-note-cancel-button",children:a.cancelButton}),t(E,{variant:"primary",size:"medium",onClick:w,disabled:b,className:"quote-management-line-item-note-modal__confirm-button","data-testid":"line-item-note-confirm-button",children:a.confirmButton})]})]})};export{Qe as I,Se as L,Me as P,Te as Q};
|
|
4
4
|
//# sourceMappingURL=LineItemNoteModal.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
const e=`
|
|
4
4
|
fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {
|
|
@@ -59,6 +59,7 @@ const e=`
|
|
|
59
59
|
firstname
|
|
60
60
|
lastname
|
|
61
61
|
}
|
|
62
|
+
email
|
|
62
63
|
comments {
|
|
63
64
|
uid
|
|
64
65
|
created_at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NegotiableQuoteFragment.js","sources":["/@dropins/storefront-quote-management/src/api/graphql/ShippingMethodFragment.ts","/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteAddressFragment.ts","/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteFragment.ts"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nexport const SELECTED_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n`;\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { SELECTED_SHIPPING_METHOD_FRAGMENT } from './ShippingMethodFragment';\n\nexport const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT on NegotiableQuoteShippingAddress {\n uid\n firstname\n lastname\n company\n street\n city\n region {\n code\n label\n region_id\n }\n postcode\n country {\n code\n label\n }\n telephone\n\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n }\n\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT } from './NegotiableQuoteAddressFragment';\n\nexport const NEGOTIABLE_QUOTE_FRAGMENT = /* GraphQL */ `\n fragment NegotiableQuoteFragment on NegotiableQuote {\n uid\n name\n created_at\n is_virtual\n status\n sales_rep_name\n expiration_date\n updated_at\n buyer {\n firstname\n lastname\n }\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n attachments {\n name\n url\n }\n }\n template_id\n template_name\n total_quantity\n items {\n __typename\n uid\n product {\n name\n sku\n uid\n stock_status\n quantity\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n prices {\n price {\n currency\n value\n }\n price_including_tax {\n value\n currency\n }\n original_item_price {\n currency\n value\n }\n original_row_total {\n currency\n value\n }\n row_total {\n currency\n value\n }\n row_total_including_tax {\n value\n currency\n }\n catalog_discount {\n amount_off\n percent_off\n }\n discounts {\n label\n value\n amount {\n currency\n value\n }\n }\n }\n quantity\n is_available\n note_from_buyer {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n ... on SimpleCartItem {\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\n }\n configured_variant {\n uid\n sku\n stock_status\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on BundleCartItem {\n bundle_options {\n label\n values {\n label\n quantity\n original_price {\n currency\n value\n }\n priceV2 {\n currency\n value\n }\n }\n }\n }\n ... on DownloadableCartItem {\n links {\n sort_order\n title\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n }\n history {\n uid\n created_at\n author {\n firstname\n lastname\n }\n change_type\n changes {\n comment_added {\n comment\n }\n custom_changes {\n new_value\n old_value\n title\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n total {\n new_price {\n currency\n value\n }\n old_price {\n currency\n value\n }\n }\n products_removed {\n products_removed_from_catalog\n products_removed_from_quote {\n uid\n name\n sku\n quantity\n }\n }\n }\n }\n prices {\n subtotal_with_discount_excluding_tax {\n currency\n value\n }\n subtotal_including_tax {\n currency\n value\n }\n subtotal_excluding_tax {\n currency\n value\n }\n grand_total {\n currency\n value\n }\n grand_total_excluding_tax {\n currency\n value\n }\n applied_taxes {\n label\n amount {\n value\n currency\n }\n }\n discounts {\n amount {\n value\n currency\n }\n label\n coupon {\n code\n }\n applied_to\n }\n }\n\n shipping_addresses {\n ...NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT\n }\n }\n\n ${NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT}\n`;\n"],"names":["SELECTED_SHIPPING_METHOD_FRAGMENT","NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT","NEGOTIABLE_QUOTE_FRAGMENT"],"mappings":"AASO,MAAMA,EAAkD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECElDC,EAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAyBpED,CAAiC;AAAA,ECzBxBE,EAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqVnDD,CAA0C;"}
|
|
1
|
+
{"version":3,"file":"NegotiableQuoteFragment.js","sources":["/@dropins/storefront-quote-management/src/api/graphql/ShippingMethodFragment.ts","/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteAddressFragment.ts","/@dropins/storefront-quote-management/src/api/graphql/NegotiableQuoteFragment.ts"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nexport const SELECTED_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n`;\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { SELECTED_SHIPPING_METHOD_FRAGMENT } from './ShippingMethodFragment';\n\nexport const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT on NegotiableQuoteShippingAddress {\n uid\n firstname\n lastname\n company\n street\n city\n region {\n code\n label\n region_id\n }\n postcode\n country {\n code\n label\n }\n telephone\n\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n }\n\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT } from './NegotiableQuoteAddressFragment';\n\nexport const NEGOTIABLE_QUOTE_FRAGMENT = /* GraphQL */ `\n fragment NegotiableQuoteFragment on NegotiableQuote {\n uid\n name\n created_at\n is_virtual\n status\n sales_rep_name\n expiration_date\n updated_at\n buyer {\n firstname\n lastname\n }\n email\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n attachments {\n name\n url\n }\n }\n template_id\n template_name\n total_quantity\n items {\n __typename\n uid\n product {\n name\n sku\n uid\n stock_status\n quantity\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n prices {\n price {\n currency\n value\n }\n price_including_tax {\n value\n currency\n }\n original_item_price {\n currency\n value\n }\n original_row_total {\n currency\n value\n }\n row_total {\n currency\n value\n }\n row_total_including_tax {\n value\n currency\n }\n catalog_discount {\n amount_off\n percent_off\n }\n discounts {\n label\n value\n amount {\n currency\n value\n }\n }\n }\n quantity\n is_available\n note_from_buyer {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n negotiable_quote_item_uid\n note\n note_uid\n __typename\n }\n ... on SimpleCartItem {\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\n }\n configured_variant {\n uid\n sku\n stock_status\n thumbnail {\n label\n url\n }\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n price_tiers {\n quantity\n final_price {\n value\n }\n discount {\n amount_off\n percent_off\n }\n }\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n ... on BundleCartItem {\n bundle_options {\n label\n values {\n label\n quantity\n original_price {\n currency\n value\n }\n priceV2 {\n currency\n value\n }\n }\n }\n }\n ... on DownloadableCartItem {\n links {\n sort_order\n title\n }\n customizable_options {\n type\n label\n values {\n label\n value\n }\n }\n }\n }\n history {\n uid\n created_at\n author {\n firstname\n lastname\n }\n change_type\n changes {\n comment_added {\n comment\n }\n custom_changes {\n new_value\n old_value\n title\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n total {\n new_price {\n currency\n value\n }\n old_price {\n currency\n value\n }\n }\n products_removed {\n products_removed_from_catalog\n products_removed_from_quote {\n uid\n name\n sku\n quantity\n }\n }\n }\n }\n prices {\n subtotal_with_discount_excluding_tax {\n currency\n value\n }\n subtotal_including_tax {\n currency\n value\n }\n subtotal_excluding_tax {\n currency\n value\n }\n grand_total {\n currency\n value\n }\n grand_total_excluding_tax {\n currency\n value\n }\n applied_taxes {\n label\n amount {\n value\n currency\n }\n }\n discounts {\n amount {\n value\n currency\n }\n label\n coupon {\n code\n }\n applied_to\n }\n }\n\n shipping_addresses {\n ...NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT\n }\n }\n\n ${NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT}\n`;\n"],"names":["SELECTED_SHIPPING_METHOD_FRAGMENT","NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT","NEGOTIABLE_QUOTE_FRAGMENT"],"mappings":"AASO,MAAMA,EAAkD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECElDC,EAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAyBpED,CAAiC;AAAA,ECzBxBE,EAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsVnDD,CAA0C;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as p,jsxs as u}from"@dropins/tools/preact-jsx-runtime.js";import{classes as n,VComponent as _}from"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/components.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import"@dropins/tools/preact-hooks.js";/* empty css *//* empty css */const V=({label:o,price:e,classSuffixes:t=[],labelClassSuffix:r,testId:m,children:s,...a})=>p(y,{...a,label:o,price:e,classSuffixes:t,labelClassSuffix:r,testId:m,children:s}),y=({label:o,price:e,classSuffixes:t=[],labelClassSuffix:r,testId:m,children:s,...a})=>{const i="quote-order-summary__label",c="quote-order-summary__price";return u("div",{...a,...m?{"data-testid":m}:{},className:n(["quote-order-summary__entry",...t.map(d=>`quote-order-summary__${d}`)]),children:[p("span",{className:n([i,...r?[`${i}--${r}`]:[]]),children:o}),p(_,{node:e,className:n([c,...r?[`${c}--${r}`]:[]])}),s]})};export{V as O};
|
|
4
4
|
//# sourceMappingURL=OrderSummaryLine.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as e,jsxs as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as d,VComponent as n}from"@dropins/tools/lib.js";/* empty css */import{useText as c}from"@dropins/tools/i18n.js";const _=({className:o,comments:a,...u})=>{const m=c({emptyState:"NegotiableQuote.Manage.quoteComments.emptyState",by:"NegotiableQuote.Manage.quoteComments.by",attachments:"NegotiableQuote.Manage.quoteComments.attachments"});return!a||a.length===0?e("ul",{...u,className:d(["quote-management-quote-comments-list","quote-management-quote-comments-list--empty",o]),"data-testid":"quote-comments-list",children:e("li",{className:"quote-management-quote-comments-list__empty-state","data-testid":"quote-comments-empty-state",children:m.emptyState})}):e("ul",{...u,className:d(["quote-management-quote-comments-list",o]),"data-testid":"quote-comments-list",children:a.map(t=>s("li",{className:"quote-management-quote-comments-list__item","data-testid":`quote-comment-${t.uid}`,children:[s("div",{className:"quote-management-quote-comments-list__header",children:[e(n,{className:"quote-management-quote-comments-list__date",node:t.createdAt,"data-testid":`quote-comment-date-${t.uid}`}),e("span",{className:"quote-management-quote-comments-list__by",children:m.by}),e(n,{className:"quote-management-quote-comments-list__author",node:t.author,"data-testid":`quote-comment-author-${t.uid}`})]}),e(n,{className:"quote-management-quote-comments-list__text",node:t.text,"data-testid":`quote-comment-text-${t.uid}`}),t.attachments&&t.attachments.length>0&&s("div",{className:"quote-management-quote-comments-list__attachments","data-testid":`quote-comment-attachments-${t.uid}`,children:[e("span",{className:"quote-management-quote-comments-list__attachments-label",children:m.attachments}),t.attachments.map((i,l)=>e("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"quote-management-quote-comments-list__attachment-link","data-testid":`quote-comment-attachment-${t.uid}-${l}`,children:i.name},`${t.uid}-attachment-${l}`))]})]},t.uid))})};export{_ as Q};
|
|
4
4
|
//# sourceMappingURL=QuoteCommentsList.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as o,jsxs as i}from"@dropins/tools/preact-jsx-runtime.js";import{useState as f,useEffect as d}from"@dropins/tools/preact-compat.js";import{Q as c}from"./QuoteCommentsList.js";import{events as p}from"@dropins/tools/event-bus.js";import{f as h}from"./dateUtils.js";const C=({quoteData:a,...s})=>{var r;const[e,n]=f(a);if(d(()=>{const t=p.on("quote-management/quote-data",u=>{n(u.quote)},{eager:!0});return()=>t==null?void 0:t.off()},[]),!e)return null;const m=(r=e==null?void 0:e.comments)==null?void 0:r.map(t=>({uid:t.uid,createdAt:o("span",{children:h(t.createdAt,"long")}),author:i("span",{children:[t.author.firstname," ",t.author.lastname]}),text:o("p",{children:t.text}),attachments:t.attachments}));return o(c,{"data-testid":"quote-comments-list-container",...s,comments:m||[]})};export{C as Q};
|
|
4
4
|
//# sourceMappingURL=QuoteCommentsList3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsxs as d,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as R}from"@dropins/tools/lib.js";import{f as c}from"./dateUtils.js";/* empty css */import{useText as $}from"@dropins/tools/i18n.js";const H=({className:g,children:q,history:x,items:y,buyer:n,salesRepName:D,...F})=>{const t=$({quoteCreated:"historyLog.changeTypes.created",quoteUpdated:"historyLog.changeTypes.updated",statusChanged:"historyLog.changeTypes.statusChanged",commentAdded:"historyLog.changeTypes.commentAdded",expirationChanged:"historyLog.changeTypes.expirationChanged",buyerNoteAdded:"historyLog.noteTypes.buyerNoteAdded",sellerNoteAdded:"historyLog.noteTypes.sellerNoteAdded",buyerLabel:"historyLog.authorLabels.buyer",sellerLabel:"historyLog.authorLabels.seller",commentDetail:"historyLog.changeDetails.comment",statusChangedFromTo:"historyLog.changeDetails.statusChangedFromTo",statusSetTo:"historyLog.changeDetails.statusSetTo",expirationChangedFromTo:"historyLog.changeDetails.expirationChangedFromTo",expirationSetTo:"historyLog.changeDetails.expirationSetTo",totalChangedFromTo:"historyLog.changeDetails.totalChangedFromTo",customChange:"historyLog.changeDetails.customChange",productsRemovedFromCatalog:"historyLog.changeDetails.productsRemovedFromCatalog",productsRemovedFromQuote:"historyLog.changeDetails.productsRemovedFromQuote",noDetailsAvailable:"historyLog.changeDetails.noDetailsAvailable",emptyState:"historyLog.emptyState",never:"dateUtils.never"}),w=e=>{switch(e){case"CREATED":return t.quoteCreated;case"UPDATED":return t.quoteUpdated;case"STATUS_CHANGED":return t.statusChanged;case"COMMENT_ADDED":return t.commentAdded;case"EXPIRATION_CHANGED":return t.expirationChanged;default:return e.replace(/_/g," ").toLowerCase().replace(/\b\w/g,o=>o.toUpperCase())}},E=e=>{var a,m,p,u,i,v,T,C,L,N,_,f;const o=[];if((a=e==null?void 0:e.commentAdded)!=null&&a.comment&&o.push(t.commentDetail.replace("{comment}",e.commentAdded.comment)),(m=e==null?void 0:e.statuses)!=null&&m.changes&&e.statuses.changes.forEach(r=>{r.oldStatus&&r.newStatus?o.push(t.statusChangedFromTo.replace("{oldStatus}",r.oldStatus).replace("{newStatus}",r.newStatus)):r.newStatus&&o.push(t.statusSetTo.replace("{newStatus}",r.newStatus))}),(p=e==null?void 0:e.expiration)!=null&&p.newExpiration&&((u=e==null?void 0:e.expiration)!=null&&u.oldExpiration)){const r=c(e.expiration.newExpiration),l=c(e.expiration.oldExpiration);o.push(t.expirationChangedFromTo.replace("{oldExpiration}",l).replace("{newExpiration}",r))}else if((i=e==null?void 0:e.expiration)!=null&&i.newExpiration){const r=c(e.expiration.newExpiration);o.push(t.expirationSetTo.replace("{newExpiration}",r))}if((v=e==null?void 0:e.total)!=null&&v.newPrice&&((T=e==null?void 0:e.total)!=null&&T.oldPrice)){const r=`${e.total.newPrice.currency} ${e.total.newPrice.value}`,l=`${e.total.oldPrice.currency} ${e.total.oldPrice.value}`;o.push(t.totalChangedFromTo.replace("{oldTotal}",l).replace("{newTotal}",r))}if((C=e==null?void 0:e.customChanges)!=null&&C.title&&((L=e==null?void 0:e.customChanges)!=null&&L.old_value)&&((N=e==null?void 0:e.customChanges)!=null&&N.new_value)&&o.push(t.customChange.replace("{title}",e.customChanges.title).replace("{oldValue}",e.customChanges.old_value).replace("{newValue}",e.customChanges.new_value)),(_=e==null?void 0:e.productsRemoved)!=null&&_.productsRemovedFromCatalog&&e.productsRemoved.productsRemovedFromCatalog.length>0&&o.push(t.productsRemovedFromCatalog.replace("{products}",e.productsRemoved.productsRemovedFromCatalog.join(", "))),(f=e==null?void 0:e.productsRemoved)!=null&&f.productsRemovedFromQuote&&e.productsRemoved.productsRemovedFromQuote.length>0){const r=e.productsRemoved.productsRemovedFromQuote.map(l=>l.name||l.sku||l.uid).join(", ");o.push(t.productsRemovedFromQuote.replace("{products}",r))}return o.length>0?o:[t.noDetailsAvailable]},S=(()=>{const e=[],o=(a,m,p,u)=>{a&&Array.isArray(a)&&a.forEach(i=>{i&&i.note&&i.note.trim()&&e.push({...i,type:m,productName:u.product.name,productSku:u.product.sku,authorName:p})})};return y&&y.forEach(a=>{o(a.noteFromBuyer,"buyer",`${n.firstname} ${n.lastname} ${t.buyerLabel}`,a),o(a.noteFromSeller,"seller",`${D} ${t.sellerLabel}`,a)}),e})(),A=(x||[]).map(e=>({...e,entryType:"history"})),b=S.map(e=>({...e,entryType:"note"})),h=[...A,...b];return d("div",{...F,className:R(["quote-management-quote-history-log",g]),children:[h.length>0?s("div",{className:"quote-management-quote-history-log__entries",children:h.map((e,o)=>d("div",{className:"quote-management-quote-history-log__entry",children:[d("div",{className:"quote-management-quote-history-log__entry-header",children:[d("div",{className:"quote-management-quote-history-log__entry-meta",children:[s("span",{className:"quote-management-quote-history-log__entry-date",children:c(e.createdAt,"long")}),s("span",{className:"quote-management-quote-history-log__entry-author",children:e.entryType==="history"?`by ${e.author.firstname} ${e.author.lastname} ${e.author.firstname===n.firstname&&e.author.lastname===n.lastname?t.buyerLabel:t.sellerLabel}`:`by ${e.authorName}`})]}),s("div",{className:"quote-management-quote-history-log__entry-type",children:e.entryType==="history"?w(e.changeType):e.type==="buyer"?t.buyerNoteAdded:t.sellerNoteAdded})]}),s("div",{className:"quote-management-quote-history-log__entry-changes",children:e.entryType==="history"?E(e.changes).map((a,m)=>s("div",{className:"quote-management-quote-history-log__entry-change",children:a},m)):d("div",{className:"quote-management-quote-history-log__entry-change",children:[d("div",{children:[e.productName,"(",e.productSku,")"]}),d("div",{children:['"',e.note,'"']})]})})]},e.entryType==="history"?e.uid:`${e.noteUid}-${o}`))}):s("div",{className:"quote-management-quote-history-log__empty",children:t.emptyState}),q]})};export{H as Q};
|
|
4
4
|
//# sourceMappingURL=QuoteHistoryLog.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{useState as m,useEffect as i}from"@dropins/tools/preact-compat.js";import{events as n}from"@dropins/tools/event-bus.js";import{Q as f}from"./QuoteHistoryLog.js";const Q=({quoteData:r,...s})=>{const[e,a]=m(r);return i(()=>{const t=n.on("quote-management/quote-data",u=>{a(u.quote)},{eager:!0});return()=>t==null?void 0:t.off()},[]),e?o("div",{...s,children:o(f,{history:e.history,items:e.items,buyer:e.buyer,salesRepName:e.salesRepName})}):null};export{Q};
|
|
4
4
|
//# sourceMappingURL=QuoteHistoryLog3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as
|
|
3
|
+
import{jsx as a,jsxs as i}from"@dropins/tools/preact-jsx-runtime.js";import{useState as f,useEffect as p}from"@dropins/tools/preact-compat.js";import{Q as d}from"./QuoteCommentsList.js";import{events as l}from"@dropins/tools/event-bus.js";import{f as c}from"./dateUtils.js";const C=({templateData:r,...s})=>{var o;const[e,m]=f(r);if(p(()=>{const t=l.on("quote-management/quote-template-data",u=>{m(u.quoteTemplate)},{eager:!0});return()=>t==null?void 0:t.off()},[]),!e)return null;const n=(o=e==null?void 0:e.comments)==null?void 0:o.map(t=>({uid:t.uid,createdAt:a("span",{children:c(t.createdAt,"long")}),author:i("span",{children:[t.author.firstname," ",t.author.lastname]}),text:a("p",{children:t.text}),attachments:t.attachments}));return a(d,{"data-testid":"quote-template-comments-list-container",...s,comments:n||[]})};export{C as Q};
|
|
4
4
|
//# sourceMappingURL=QuoteTemplateCommentsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteTemplateCommentsList.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { QuoteCommentsList as QuoteCommentsListComponent } from '@/quote-management/components/QuoteCommentsList';\nimport { NegotiableQuoteTemplateModel } from '@/quote-management/data/models/negotiable-quote-template-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuoteTemplateCommentsListProps extends HTMLAttributes<HTMLUListElement> {\n templateData?: NegotiableQuoteTemplateModel;\n}\n\nexport const QuoteTemplateCommentsList: Container<QuoteTemplateCommentsListProps> = ({\n templateData: initialData,\n ...props\n}) => {\n const [templateData, setTemplateData] = useState<NegotiableQuoteTemplateModel | undefined>(initialData);\n\n useEffect(() => {\n const templateDataEvent = events.on('quote-management/quote-template-data', (data: { quoteTemplate: NegotiableQuoteTemplateModel }) => {\n setTemplateData(data.quoteTemplate);\n }, { eager: true });\n return () => templateDataEvent?.off();\n }, []);\n\n if (!templateData) {\n return null;\n }\n\n // Format comments data\n const formattedComments = templateData?.comments?.map((comment) => ({\n uid: comment.uid,\n createdAt: <span>{formattedDate(comment.createdAt, 'long')}</span>,\n author: (\n <span>\n {comment.author.firstname} {comment.author.lastname}\n </span>\n ),\n text: <p>{comment.text}</p>,\n }));\n\n return (\n <QuoteCommentsListComponent\n data-testid=\"quote-template-comments-list-container\"\n {...props}\n comments={formattedComments || []}\n />\n );\n};\n"],"names":["QuoteTemplateCommentsList","initialData","props","templateData","setTemplateData","useState","useEffect","templateDataEvent","events","data","formattedComments","_a","comment","jsx","QuoteCommentsListComponent"],"mappings":"kRAoBO,MAAMA,EAAuE,CAAC,CACnF,aAAcC,EACd,GAAGC,CACL,IAAM,OACJ,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAmDJ,CAAW,EAStG,GAPAK,EAAU,IAAM,CACd,MAAMC,EAAoBC,EAAO,GAAG,uCAAyCC,GAA0D,CACrIL,EAAgBK,EAAK,aAAa,CACpC,EAAG,CAAE,MAAO,GAAM,EAClB,MAAO,IAAMF,GAAA,YAAAA,EAAmB,KAClC,EAAG,CAAA,CAAE,EAED,CAACJ,EACH,OAAO,KAIT,MAAMO,GAAoBC,EAAAR,GAAA,YAAAA,EAAc,WAAd,YAAAQ,EAAwB,IAAKC,IAAa,CAClE,IAAKA,EAAQ,IACb,UAAWC,EAAC,OAAA,CAAM,WAAcD,EAAQ,UAAW,MAAM,EAAE,EAC3D,SACG,OAAA,CACE,SAAA,CAAAA,EAAQ,OAAO,UAAU,IAAEA,EAAQ,OAAO,QAAA,EAC7C,EAEF,KAAMC,EAAC,IAAA,CAAG,SAAAD,EAAQ,
|
|
1
|
+
{"version":3,"file":"QuoteTemplateCommentsList.js","sources":["/@dropins/storefront-quote-management/src/containers/QuoteTemplateCommentsList/QuoteTemplateCommentsList.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { QuoteCommentsList as QuoteCommentsListComponent } from '@/quote-management/components/QuoteCommentsList';\nimport { NegotiableQuoteTemplateModel } from '@/quote-management/data/models/negotiable-quote-template-model';\nimport { events } from '@adobe-commerce/event-bus';\nimport { formattedDate } from '@/quote-management/utils/dateUtils';\n\nexport interface QuoteTemplateCommentsListProps extends HTMLAttributes<HTMLUListElement> {\n templateData?: NegotiableQuoteTemplateModel;\n}\n\nexport const QuoteTemplateCommentsList: Container<QuoteTemplateCommentsListProps> = ({\n templateData: initialData,\n ...props\n}) => {\n const [templateData, setTemplateData] = useState<NegotiableQuoteTemplateModel | undefined>(initialData);\n\n useEffect(() => {\n const templateDataEvent = events.on('quote-management/quote-template-data', (data: { quoteTemplate: NegotiableQuoteTemplateModel }) => {\n setTemplateData(data.quoteTemplate);\n }, { eager: true });\n return () => templateDataEvent?.off();\n }, []);\n\n if (!templateData) {\n return null;\n }\n\n // Format comments data\n const formattedComments = templateData?.comments?.map((comment) => ({\n uid: comment.uid,\n createdAt: <span>{formattedDate(comment.createdAt, 'long')}</span>,\n author: (\n <span>\n {comment.author.firstname} {comment.author.lastname}\n </span>\n ),\n text: <p>{comment.text}</p>,\n attachments: comment.attachments,\n }));\n\n return (\n <QuoteCommentsListComponent\n data-testid=\"quote-template-comments-list-container\"\n {...props}\n comments={formattedComments || []}\n />\n );\n};\n"],"names":["QuoteTemplateCommentsList","initialData","props","templateData","setTemplateData","useState","useEffect","templateDataEvent","events","data","formattedComments","_a","comment","jsx","QuoteCommentsListComponent"],"mappings":"kRAoBO,MAAMA,EAAuE,CAAC,CACnF,aAAcC,EACd,GAAGC,CACL,IAAM,OACJ,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAmDJ,CAAW,EAStG,GAPAK,EAAU,IAAM,CACd,MAAMC,EAAoBC,EAAO,GAAG,uCAAyCC,GAA0D,CACrIL,EAAgBK,EAAK,aAAa,CACpC,EAAG,CAAE,MAAO,GAAM,EAClB,MAAO,IAAMF,GAAA,YAAAA,EAAmB,KAClC,EAAG,CAAA,CAAE,EAED,CAACJ,EACH,OAAO,KAIT,MAAMO,GAAoBC,EAAAR,GAAA,YAAAA,EAAc,WAAd,YAAAQ,EAAwB,IAAKC,IAAa,CAClE,IAAKA,EAAQ,IACb,UAAWC,EAAC,OAAA,CAAM,WAAcD,EAAQ,UAAW,MAAM,EAAE,EAC3D,SACG,OAAA,CACE,SAAA,CAAAA,EAAQ,OAAO,UAAU,IAAEA,EAAQ,OAAO,QAAA,EAC7C,EAEF,KAAMC,EAAC,IAAA,CAAG,SAAAD,EAAQ,KAAK,EACvB,YAAaA,EAAQ,WAAA,IAGvB,OACEC,EAACC,EAAA,CACC,cAAY,yCACX,GAAGZ,EACJ,SAAUQ,GAAqB,CAAA,CAAC,CAAA,CAGtC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{useState as u,useEffect as i}from"@dropins/tools/preact-compat.js";import{events as p}from"@dropins/tools/event-bus.js";import{Q as n}from"./QuoteHistoryLog.js";const g=({templateData:r,...a})=>{const[e,s]=u(r);return i(()=>{const t=p.on("quote-management/quote-template-data",m=>{s(m.quoteTemplate)},{eager:!0});return()=>t==null?void 0:t.off()},[]),e?o("div",{...a,children:o(n,{history:e.history,items:e.items,buyer:e.buyer,salesRepName:e.salesRepName})}):null};export{g as Q};
|
|
4
4
|
//# sourceMappingURL=QuoteTemplateHistoryLog.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import*as v from"@dropins/tools/preact-compat.js";import{useState as p,useMemo as f}from"@dropins/tools/preact-compat.js";import{jsx as e,jsxs as d,Fragment as k}from"@dropins/tools/preact-jsx-runtime.js";import{classes as a,VComponent as N}from"@dropins/tools/lib.js";/* empty css */import{Picker as x,Modal as L,Input as T,TextArea as M,Button as _}from"@dropins/tools/components.js";import{useText as y}from"@dropins/tools/i18n.js";const S=i=>v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-edit-2",...i},v.createElement("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})),j=({className:i,dropdownPlaceholder:m,dropdownOptions:n,dropdownValue:c,handleDropdownChange:s,buttons:t,...l})=>{const b=n&&n.length>0,u=t&&t.length>0,o=(n==null?void 0:n.map(r=>({text:r.label,value:r.value})))||[];return o.unshift({text:m||"",value:""}),e("div",{className:"quote-management-actions-bar__container","data-testid":"actions-bar-container",children:d("div",{className:a(["quote-management-actions-bar",i]),"data-testid":"actions-bar",...l,children:[b&&e(x,{name:"dropdown",id:"dropdown",handleSelect:s,className:"quote-management-actions-bar__dropdown","data-testid":"dropdown",options:o,value:c||""},`actions-bar-picker-${c||"empty"}`),u&&e("div",{className:"quote-management-actions-bar__buttons","data-testid":"buttons-container",children:t==null?void 0:t.map((r,q)=>e(N,{node:r,className:a(["quote-management-actions-bar__button"])},q))})]})})},D=({className:i,tabs:m,tabsContent:n,defaultActiveTab:c,...s})=>{const[t,l]=p(c||Array.from(m.keys())[0]),b=o=>{l(o)},u=f(()=>n.get(t),[t,n]);return d("div",{...s,className:a(["quote-management-tabbed-content",i]),children:[m&&e("div",{"data-testid":"tabbed-content-tabs",className:a(["quote-management-tabbed-content__tabs"]),children:Array.from(m.entries()).map(([o,r])=>e("button",{className:a(["quote-management-tabbed-content__tab",["quote-management-tabbed-content__tab--active",o===t]]),onClick:()=>b(o),children:r},o))}),u&&e("div",{className:a(["quote-management-tabbed-content__active-tab-content"]),children:e(N,{node:u})})]})},I=({className:i,open:m,quoteName:n,renameReason:c,quoteNameError:s,errorBanner:t,successBanner:l,showCloseButton:b=!0,onQuoteNameChange:u,onRenameReasonChange:o,onSave:r,onClose:q})=>{const g=y({title:"NegotiableQuote.Manage.rename.title",quoteNameLabel:"NegotiableQuote.Manage.rename.quoteNameLabel",reasonLabel:"NegotiableQuote.Manage.rename.reasonLabel",renameButton:"NegotiableQuote.Manage.rename.renameButton",cancelButton:"NegotiableQuote.Manage.rename.cancelButton"});return m?d(L,{open:m,size:"medium",title:e(k,{children:g.title}),onClose:q,clickToDismiss:!0,escapeToDismiss:!0,showCloseButton:b,className:a(["quote-management-rename-quote-modal",i]),"data-testid":"rename-quote-modal",children:[t&&e("div",{className:a(["quote-management-rename-quote-modal__error-banner"]),"data-testid":"rename-quote-modal-error-banner",children:t}),l&&e("div",{className:a(["quote-management-rename-quote-modal__success-banner"]),"data-testid":"rename-quote-modal-success-banner",children:l}),d("div",{className:a(["quote-management-rename-quote-modal__content"]),children:[d("div",{children:[e(T,{name:"quoteName",type:"text",value:n,onInput:h=>u(h.target.value),floatingLabel:g.quoteNameLabel,required:!0,error:!!s}),s&&e("span",{className:a(["quote-management-rename-quote-modal__error-text"]),children:s})]}),e(M,{name:"quoteComment",value:c,onInput:h=>o(h.target.value),label:g.reasonLabel,rows:3})]}),d("div",{className:a(["quote-management-rename-quote-modal__actions"]),children:[e(_,{variant:"secondary",size:"medium",onClick:q,className:a(["quote-management-rename-quote-modal__cancel-button"]),children:g.cancelButton}),e(_,{variant:"primary",size:"medium",onClick:r,className:a(["quote-management-rename-quote-modal__save-button"]),children:g.renameButton})]})]}):null};export{j as A,I as R,S,D as T};
|
|
4
4
|
//# sourceMappingURL=RenameQuoteModal.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{jsx as a,jsxs as c}from"@dropins/tools/preact-jsx-runtime.js";import{useState as y,useEffect as l}from"@dropins/tools/preact-compat.js";import{classes as u}from"@dropins/tools/lib.js";import{InLineAlert as f,Skeleton as h,SkeletonRow as q}from"@dropins/tools/components.js";import{S as _}from"./WarningFilled.js";import{useText as v}from"@dropins/tools/i18n.js";import{events as g}from"@dropins/tools/event-bus.js";const N=({className:i,shippingAddress:e,loading:m,noAddressMessage:p,...r})=>{const s=v({noAddressHeading:"NegotiableQuote.Manage.shippingAddress.noAddressHeading",noAddressDescription:"NegotiableQuote.Manage.shippingAddress.noAddressDescription"});return m?a(S,{}):e?c("div",{className:u(["quote-management-shipping-address-display",i]),"data-testid":"shipping-address-display",...r,children:[a("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-name",children:c("span",{className:"quote-management-shipping-address-display__name",children:[e.firstname," ",e.lastname]})}),e.company&&a("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-company",children:e.company}),e.street.map((o,t)=>a("div",{className:"quote-management-shipping-address-display__field","data-testid":`address-street-${t}`,children:o},t)),c("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-city-region",children:[e.city,e.region&&`, ${e.region.label}`," ",e.postcode]}),a("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-country",children:e.country.label}),a("div",{className:"quote-management-shipping-address-display__field","data-testid":"address-telephone",children:e.telephone})]}):a("div",{className:u(["quote-management-shipping-address-display","quote-management-shipping-address-display--empty",i]),"data-testid":"shipping-address-display-empty",...r,children:a(f,{type:"warning",variant:"primary","data-testid":"shipping-address-display-empty-alert",icon:a(_,{}),heading:s.noAddressHeading,description:p||s.noAddressDescription})})},S=()=>a(h,{"data-testid":"shipping-address-display-skeleton",children:a(q,{variant:"row",fullWidth:!0,size:"small",lines:5,multilineGap:"xsmall"})}),$=({shippingAddress:i,loading:e,...m})=>{const[p,r]=y(i);return l(()=>{i!==void 0&&r(i)},[i]),l(()=>{const s=g.on("quote-management/quote-data",o=>{var d,n;const t=(n=(d=o.quote)==null?void 0:d.shippingAddresses)==null?void 0:n[0];r(t)},{eager:!0});return()=>s==null?void 0:s.off()},[]),l(()=>{const s=g.on("quote-management/shipping-address-set",o=>{var d,n;const t=(n=(d=o.quote)==null?void 0:d.shippingAddresses)==null?void 0:n[0];r(t)},{eager:!0});return()=>s==null?void 0:s.off()},[]),l(()=>{const s=g.on("quote-management/quote-template-data",o=>{var d,n;const t=(n=(d=o.quoteTemplate)==null?void 0:d.shippingAddresses)==null?void 0:n[0];r(t)},{eager:!0});return()=>s==null?void 0:s.off()},[]),a(N,{shippingAddress:p,loading:e,...m})};export{$ as S};
|
|
4
4
|
//# sourceMappingURL=ShippingAddressDisplay.js.map
|
package/chunks/WarningFilled.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import*as e from"@dropins/tools/preact-compat.js";const l=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"}));export{l as S};
|
|
4
4
|
//# sourceMappingURL=WarningFilled.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{events as n}from"@dropins/tools/event-bus.js";import{a as u}from"./transform-quote-template.js";import{s as r}from"./state.js";import{N as T}from"./NegotiableQuoteTemplateFragment.js";import{f as p}from"./transform-quote.js";const s=`
|
|
4
4
|
mutation UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION(
|
package/chunks/dateUtils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{getGlobalLocale as n}from"@dropins/tools/lib.js";function a(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return console.warn("Failed to detect user timezone, falling back to UTC:",e),"UTC"}}function o(e){const t=new Date(e);return!isNaN(t.getTime())}function c(e,t="short"){if(!o(e))return"–";const r=n()||"en-US";return t==="short"?new Date(e).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"}):new Date(e).toLocaleDateString(r,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0})}export{c as f,a as g};
|
|
4
4
|
//# sourceMappingURL=dateUtils.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{events as p}from"@dropins/tools/event-bus.js";import{f as E,t as q}from"./transform-quote.js";import{N as g}from"./NegotiableQuoteFragment.js";import{s as _}from"./state.js";import{a as Q}from"./transform-quote-template.js";import{N as U}from"./NegotiableQuoteTemplateFragment.js";const N=`
|
|
4
4
|
query QUOTE_DATA_QUERY(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{events as i}from"@dropins/tools/event-bus.js";import{s as n}from"./state.js";import{f as m}from"./transform-quote.js";const u=`
|
|
4
4
|
mutation GENERATE_NEGOTIABLE_QUOTE_FROM_TEMPLATE_MUTATION(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
3
|
import{events as s}from"@dropins/tools/event-bus.js";import{t as n}from"./transform-quote-template.js";import{s as o}from"./state.js";import{f as i}from"./transform-quote.js";const l=`
|
|
4
4
|
query QUOTE_TEMPLATES_QUERY(
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
/*! Copyright
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{events as
|
|
3
|
+
import{events as l}from"@dropins/tools/event-bus.js";import{a as p}from"./transform-quote-template.js";import{s as r}from"./state.js";import{N as u}from"./NegotiableQuoteTemplateFragment.js";import{f as d}from"./transform-quote.js";const s=`
|
|
4
4
|
mutation SEND_QUOTE_TEMPLATE_FOR_REVIEW_MUTATION(
|
|
5
5
|
$templateId: ID!
|
|
6
6
|
$comment: String
|
|
7
7
|
$name: String
|
|
8
8
|
$referenceDocumentLinks: [NegotiableQuoteTemplateReferenceDocumentLinkInput]
|
|
9
|
+
$attachments: [NegotiableQuoteCommentAttachmentInput]
|
|
9
10
|
) {
|
|
10
|
-
submitNegotiableQuoteTemplateForReview(input: { template_id: $templateId, name: $name, comment: $comment, reference_document_links: $referenceDocumentLinks }) {
|
|
11
|
+
submitNegotiableQuoteTemplateForReview(input: { template_id: $templateId, name: $name, comment: $comment, reference_document_links: $referenceDocumentLinks, attachments: $attachments }) {
|
|
11
12
|
...NegotiableQuoteTemplateFragment
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
${
|
|
15
|
-
`,
|
|
15
|
+
${u}
|
|
16
|
+
`,q=async t=>{var o,e,a;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const n=(o=t.referenceDocumentLinks)==null?void 0:o.map(m=>({link_id:m.uid,document_name:m.name,document_identifier:m.identifier,reference_document_url:m.url})),i=(e=t.attachments)!=null&&e.length?t.attachments.map(m=>({key:m.key})):void 0,c=await d(s,{variables:{templateId:t.templateId,name:t.name,comment:t.comment||void 0,referenceDocumentLinks:n,attachments:i}});if(!((a=c==null?void 0:c.data)!=null&&a.submitNegotiableQuoteTemplateForReview))throw new Error("No quote template data received");const T=p(c.data.submitNegotiableQuoteTemplateForReview);if(!T)throw new Error("Failed to transform quote template data");return l.emit("quote-management/quote-template-data",{quoteTemplate:T,permissions:r.permissions}),T}catch(n){return Promise.reject(n)}},E=`
|
|
16
17
|
mutation ACCEPT_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
17
18
|
acceptNegotiableQuoteTemplate(input: { template_id: $templateId }) {
|
|
18
19
|
...NegotiableQuoteTemplateFragment
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
${
|
|
23
|
-
`,
|
|
23
|
+
${u}
|
|
24
|
+
`,b=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await d(E,{variables:{templateId:t.templateId}});if(!((o=e==null?void 0:e.data)!=null&&o.acceptNegotiableQuoteTemplate))throw new Error("No quote template data received");const a=p(e.data.acceptNegotiableQuoteTemplate);if(!a)throw new Error("Failed to transform quote template data");return l.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},I=`
|
|
24
25
|
mutation CANCEL_QUOTE_TEMPLATE_MUTATION(
|
|
25
26
|
$templateId: ID!
|
|
26
27
|
$comment: String
|
|
@@ -34,18 +35,18 @@ import{events as i}from"@dropins/tools/event-bus.js";import{a as p}from"./transf
|
|
|
34
35
|
...NegotiableQuoteTemplateFragment
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
${
|
|
38
|
-
`,
|
|
38
|
+
${u}
|
|
39
|
+
`,A=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await d(I,{variables:{templateId:t.templateId,comment:t.comment}});if(!((o=e==null?void 0:e.data)!=null&&o.cancelNegotiableQuoteTemplate))throw new Error("No quote template data received");const a=p(e.data.cancelNegotiableQuoteTemplate);if(!a)throw new Error("Failed to transform quote template data");return l.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},_=`
|
|
39
40
|
mutation DELETE_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
40
41
|
deleteNegotiableQuoteTemplate(input: { template_id: $templateId })
|
|
41
42
|
}
|
|
42
|
-
`,
|
|
43
|
+
`,O=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await d(_,{variables:{templateId:t.templateId}});if(e!=null&&e.errors&&e.errors.length>0){const n=e.errors.map(i=>i==null?void 0:i.message).filter(Boolean).join("; ");throw new Error(n||"Failed to delete quote template")}if(!((o=e==null?void 0:e.data)==null?void 0:o.deleteNegotiableQuoteTemplate))throw new Error("Failed to delete quote template");return l.emit("quote-management/quote-template-deleted",{templateId:t.templateId}),{templateId:t.templateId}}catch(e){return Promise.reject(e)}},w=`
|
|
43
44
|
mutation OPEN_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
44
45
|
openNegotiableQuoteTemplate(input: { template_id: $templateId }) {
|
|
45
46
|
...NegotiableQuoteTemplateFragment
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
${
|
|
50
|
-
`,
|
|
50
|
+
${u}
|
|
51
|
+
`,U=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await d(w,{variables:{templateId:t.templateId}});if(!((o=e==null?void 0:e.data)!=null&&o.openNegotiableQuoteTemplate))throw new Error("No quote template data received");const a=p(e.data.openNegotiableQuoteTemplate);if(!a)throw new Error("Failed to transform quote template data");return l.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}};export{b as a,A as c,O as d,U as o,q as s};
|
|
51
52
|
//# sourceMappingURL=openQuoteTemplate.js.map
|