@solvimon/solvimon-web 0.1.0-alpha.6 → 0.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/Alert.vue.es-DMPvSykx.js +1 -0
  2. package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
  3. package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
  4. package/dist/Amount.vue.es-h8wulbBG.js +1 -0
  5. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
  6. package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
  7. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +6 -4
  9. package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
  10. package/dist/Button.vue.es-BC4_TItq.js +1 -0
  11. package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
  12. package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
  13. package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
  14. package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
  15. package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
  16. package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
  17. package/dist/{ContentWithAsideLayout-D_T137tN.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
  18. package/dist/{ContentWithAsideLayout-BZJPhvLh.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
  19. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
  20. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
  21. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +14 -11
  23. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  24. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  25. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
  26. package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
  27. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
  28. package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
  29. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
  30. package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
  31. package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
  32. package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
  33. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
  34. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BWXmZmGZ.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
  35. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
  36. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BSn_Zy0Y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs} +9 -5
  37. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
  38. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
  39. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
  40. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
  41. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-X7-dfeZP.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs} +6 -5
  42. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
  43. package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
  44. package/dist/Section.vue.es-BuzTXRLP.js +1 -0
  45. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-AxYjVFUM.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +23 -20
  46. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
  47. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
  48. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
  49. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
  50. package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
  51. package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
  52. package/dist/_flatRest.es-dFffnTpX.js +1 -0
  53. package/dist/adyen-51SvcyqV.mjs +4 -0
  54. package/dist/adyen-DZsyEXkw.js +1 -0
  55. package/dist/api.es-B4qAAJKr.js +1 -0
  56. package/dist/api.es-UkfpLiLL.mjs +83 -0
  57. package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
  58. package/dist/cn.es-C7xoIs3C.js +1 -0
  59. package/dist/cn.es-tfxVlz02.mjs +3191 -0
  60. package/dist/component-ZRZIt3ZW.js +1 -0
  61. package/dist/component-dpA83LIN.mjs +6569 -0
  62. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
  63. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  64. package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
  65. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
  66. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  67. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
  68. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
  69. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  70. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
  71. package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
  72. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  73. package/dist/components/Invoice/Invoice.es.js +2612 -28
  74. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
  75. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  76. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  77. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
  78. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  79. package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
  80. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
  81. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  82. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  83. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
  84. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  85. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +10 -8
  86. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
  87. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  88. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4820 -7
  89. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
  90. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  91. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
  92. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
  93. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  94. package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
  95. package/dist/core/index.cjs.js +1 -1
  96. package/dist/core/index.es.js +1 -1
  97. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  98. package/dist/countryData.es-D3MFzU92.js +1 -0
  99. package/dist/customer-CJrpbGX4.mjs +32 -0
  100. package/dist/customer-CcQR-JIm.js +1 -0
  101. package/dist/customer.es-D42Md24r.js +1 -0
  102. package/dist/customer.es-LIW2YmLL.mjs +30 -0
  103. package/dist/formatting.es-9hM8aHSg.js +1 -0
  104. package/dist/formatting.es-D5H_ySFv.mjs +68 -0
  105. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  106. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  107. package/dist/index-CI71bVGE.mjs +2521 -0
  108. package/dist/index-WLSPwi90.js +1 -0
  109. package/dist/index.cjs.js +1 -1
  110. package/dist/index.es-BBJF2O2l.js +1 -0
  111. package/dist/index.es-LCAKs4tH.mjs +438 -0
  112. package/dist/index.es.js +1 -1
  113. package/dist/invoices-3kVHsAXr.js +1 -0
  114. package/dist/{invoices-C7BHqB0g.mjs → invoices-CNK1Ushv.mjs} +15 -1
  115. package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
  116. package/dist/isEmpty.es-Dycf-CD_.js +1 -0
  117. package/dist/{paymentMethods-BA7Kt8ti.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
  118. package/dist/paymentMethods-DZRf0WRl.js +1 -0
  119. package/dist/{payments-NTHUh5je.mjs → payments-CE9U7aKK.mjs} +1 -1
  120. package/dist/{payments-B8W0W6wZ.js → payments-CLt0SExf.js} +1 -1
  121. package/dist/pick.es-BgDAfhAl.js +1 -0
  122. package/dist/pick.es-DdVOyp0Q.mjs +45 -0
  123. package/dist/{registry-DgRnFEVF.mjs → registry-B99ZnfEn.mjs} +1 -2
  124. package/dist/registry-ClZ43bQn.js +1 -0
  125. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
  126. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  127. package/dist/screens/Checkout/Checkout.es.js +1862 -162
  128. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
  129. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  130. package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
  131. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
  132. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  133. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
  134. package/dist/solvimon-web.css +1 -1
  135. package/dist/subscriptions-CS8HTxzC.js +1 -0
  136. package/dist/{subscriptions-BEoXaAHw.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
  137. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  138. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  139. package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
  140. package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
  141. package/dist/useCustomer--jycAz--.mjs +25 -0
  142. package/dist/useCustomer-PthyTFLl.js +1 -0
  143. package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
  144. package/dist/{useIncrementalLoading-Bgs0mqyb.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
  145. package/dist/{useInvoiceData-B6P2VShe.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
  146. package/dist/{useInvoiceData-CS7hLTea.js → useInvoiceData-DvQO_nKz.js} +1 -1
  147. package/dist/useInvoicesList-CHkwSNO9.js +1 -0
  148. package/dist/{useInvoicesList-23Ra-23Z.mjs → useInvoicesList-DFhF_gp7.mjs} +260 -23
  149. package/dist/{usePaymentMethods-BK4unvj2.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
  150. package/dist/{usePaymentMethods-B8Nft16c.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
  151. package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
  152. package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
  153. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
  154. package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
  155. package/package.json +14 -8
  156. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js +0 -1
  157. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js +0 -1
  158. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DNWspHtC.js +0 -1
  159. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Cx4c8E4i.js +0 -1
  160. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js +0 -1
  161. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-WRXecMCj.mjs +0 -6568
  162. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js +0 -1
  163. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D9_G7CyE.js +0 -1
  164. package/dist/component-DI3AxwdD.mjs +0 -58733
  165. package/dist/component-yWF07boR.js +0 -1
  166. package/dist/index-CzL1ZcGi.mjs +0 -85
  167. package/dist/index-DRdBmZ2-.js +0 -1
  168. package/dist/invoices-CjBHfDXp.js +0 -1
  169. package/dist/paymentMethods-A-5SBmy1.js +0 -1
  170. package/dist/registry-SwmYGFn7.js +0 -1
  171. package/dist/subscriptions-DSi93KpN.js +0 -1
  172. package/dist/useCustomer-DkrBNt5f.mjs +0 -45
  173. package/dist/useCustomer-fK-w7ifj.js +0 -1
  174. package/dist/useIncrementalLoading-BK6N8sYW.js +0 -1
  175. package/dist/useInvoicesList-CIFGVsDj.js +0 -1
  176. package/dist/useWalletBalanceItems-DreHuOra.mjs +0 -105
  177. package/dist/useWalletBalanceItems-NlFk6jPD.js +0 -1
  178. /package/dist/{sprite-DZD704h3-CCc3Mz1x.js → sprite.svg.es-CCc3Mz1x.js} +0 -0
  179. /package/dist/{sprite-DZD704h3-DZD704h3.mjs → sprite.svg.es-DZD704h3.mjs} +0 -0
@@ -1,3 +1,3 @@
1
- export declare const SolvimonBillingInformation: import('@vue/runtime-dom').VueElementConstructor<unknown>;
1
+ export declare const SolvimonBillingInformation: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
2
2
  export declare const COMPONENT_NAME: string;
3
3
  export declare const defineSolvimonBillingInformation: () => void;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js"),t=require("../../useCustomer-fK-w7ifj.js"),n=require("../../component-yWF07boR.js"),r=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){const n=o.portalObject.customer_id,r=t.useCustomer({customerId:n});return(o,t)=>e.renderSlot(o.$slots,"default",{customer:e.unref(r)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(l,i)=>{var p,s,m,c;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(a),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(p=t.branding)?void 0:p.colors)?void 0:s.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:i[0]||(i[0]=e=>l.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(l.$props)),{default:e.withCtx(({customer:t})=>[t.customer.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"is-loading":t.get.isPending.value,customer:t.customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=n.defineCustomElement(l),a=n.getComponentName("billing-information");exports.COMPONENT_NAME=a,exports.SolvimonBillingInformation=i,exports.defineSolvimonBillingInformation=()=>{customElements.get(a)||customElements.define(a,i)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js"),t=require("../../useCustomer-PthyTFLl.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),r=require("../../component-ZRZIt3ZW.js"),l=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){const r=o.portalObject.customer_id,l=t.useCustomer({customerId:r}),{isLoading:i}=n.useLoadInitialData(l.get.execute());return(o,t)=>e.renderSlot(o.$slots,"default",{customer:e.unref(l),isLoading:e.unref(i)})}}),i=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(n,i)=>{var a,p,m,c;return e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(a=t.branding)?void 0:a.colors)?void 0:p.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:i[0]||(i[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,isLoading:n})=>[e.createVNode(o._sfc_main,{"is-loading":n,customer:t.customer.value},null,8,["is-loading","customer"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),a=r.defineCustomElement(i),s=r.getComponentName("billing-information");exports.COMPONENT_NAME=s,exports.SolvimonBillingInformation=a,exports.defineSolvimonBillingInformation=()=>{customElements.get(s)||customElements.define(s,a)};
@@ -1,7 +1,8 @@
1
- import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs";
3
- import { u as useCustomer } from "../../useCustomer-DkrBNt5f.mjs";
4
- import { o as _sfc_main$2, p as defineCustomElement, n as getComponentName } from "../../component-DI3AxwdD.mjs";
1
+ import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
+ import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs";
3
+ import { u as useCustomer } from "../../useCustomer--jycAz--.mjs";
4
+ import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
5
+ import { b as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
5
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6
7
  __name: "BillingInformation.entry.view",
7
8
  props: {
@@ -26,8 +27,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
26
27
  const props = __props;
27
28
  const customerId = props.portalObject.customer_id;
28
29
  const customer = useCustomer({ customerId });
30
+ const { isLoading } = useLoadInitialData(customer.get.execute());
29
31
  return (_ctx, _cache) => {
30
- return renderSlot(_ctx.$slots, "default", { customer: unref(customer) });
32
+ return renderSlot(_ctx.$slots, "default", {
33
+ customer: unref(customer),
34
+ isLoading: unref(isLoading)
35
+ });
31
36
  };
32
37
  }
33
38
  });
@@ -69,12 +74,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
74
  }, {
70
75
  default: withCtx(() => [
71
76
  createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$props)), {
72
- default: withCtx(({ customer }) => [
73
- customer.customer.value ? (openBlock(), createBlock(_sfc_main$3, {
74
- key: 0,
75
- "is-loading": customer.get.isPending.value,
77
+ default: withCtx(({ customer, isLoading }) => [
78
+ createVNode(_sfc_main$3, {
79
+ "is-loading": isLoading,
76
80
  customer: customer.customer.value
77
- }, null, 8, ["is-loading", "customer"])) : createCommentVNode("", true)
81
+ }, null, 8, ["is-loading", "customer"])
78
82
  ]),
79
83
  _: 1
80
84
  }, 16)
@@ -1,3 +1,3 @@
1
- export declare const SolvimonBillingInformationForm: import('@vue/runtime-dom').VueElementConstructor<unknown>;
1
+ export declare const SolvimonBillingInformationForm: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
2
2
  export declare const COMPONENT_NAME: string;
3
3
  export declare const defineSolvimonBillingInformationForm: () => void;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-yWF07boR.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../cloneDeep-DranHQkY.js"),r=require("../../useCustomer-fK-w7ifj.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:r={},onSubmit:n}){const{form:s,validation:u,changes:c,hasChanges:m,updateInitialState:p,initialState:f}=(({initialState:a,validationRules:r,nullifyEmptyValues:l=!1,mode:n="shallow"})=>{const i=e.shallowRef(o.cloneDeep(a)),d=e.shallowRef(o.cloneDeep(a)),s=t.useValidation(r??{},d),u=e.computed(()=>t.objectDiff({from:i.value,to:d.value,mode:n,nullifyEmptyValues:l})),c=e.computed(()=>Object.entries(u.value).length>0);return{form:d,validation:s,changes:u,hasChanges:c,reset:()=>{d.value=o.cloneDeep(a),s.value.$reset()},updateInitialState:e=>{d.value=o.cloneDeep(e),i.value=o.cloneDeep(e)},initialState:i}})({initialState:{...l,...r},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:s,isOrganization:t.isOrganization,validation:u,changes:c,hasChanges:m,updateInitialState:e=>{p(i(e))},submit:(e,t=s.value)=>n({customerId:e,payload:d(t)}),initialState:f}}const i=e=>{var a,o,r,l;if(t.isIndividual(e)){const t=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==t?void 0:t.country)??"",addressLine1:(null==t?void 0:t.line1)??"",addressLine2:(null==t?void 0:t.line2)??"",postalCode:(null==t?void 0:t.postal_code)??"",city:(null==t?void 0:t.city)??"",state:(null==t?void 0:t.state)??"",firstName:(null==(a=e.individual.name)?void 0:a.first_name)??"",lastName:(null==(o=e.individual.name)?void 0:o.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(l=null==(r=e.organization.tax_ids)?void 0:r[0])?void 0:l.id)??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),_=e.computed(()=>"ORGANIZATION"===i.value.type),v=e.computed(()=>!y.value),b=e.computed({get:()=>_.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,N,k,C,E,S,I,L,T,x,B;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).value.email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$1$),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),v.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$20),{key:0,modelValue:b.value,"onUpdate:modelValue":n[2]||(n[2]=e=>b.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",u,[e.createVNode(e.unref(t._sfc_main$2),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).companyVatNumber,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).companyVatNumber=t),name:"vat_number",label:e.unref(r)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(N=a.apiError)?void 0:N.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).companyLegalName,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).companyLegalName=t),required:"",name:"legal_name",label:e.unref(r)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(k=a.apiError)?void 0:k.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).firstName,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).firstName=t),name:"first_name",label:e.unref(r)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(C=a.apiError)?void 0:C.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(E=a.apiError)?void 0:E.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(S=a.apiError)?void 0:S.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).addressLine2,"onUpdate:modelValue":n[8]||(n[8]=t=>e.unref(i).addressLine2=t),name:"address_line_2",placeholder:e.unref(r)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(I=a.apiError)?void 0:I.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",f,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).postalCode,"onUpdate:modelValue":n[9]||(n[9]=t=>e.unref(i).postalCode=t),name:"postal_code",placeholder:e.unref(r)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(L=a.apiError)?void 0:L.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).city,"onUpdate:modelValue":n[10]||(n[10]=t=>e.unref(i).city=t),name:"city",placeholder:e.unref(r)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(T=a.apiError)?void 0:T.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.state},null,8,["modelValue","placeholder","error"])])]),(null==(B=a.apiError)?void 0:B._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$2H),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},setup(a){const o=a.portalObject.customer_id,{customer:l,get:n,update:i}=r.useCustomer({customerId:o});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),_=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},emits:["error"],setup:a=>(o,r)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(b),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=a.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=a.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),v=t.defineCustomElement(_),b=t.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=v,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,v)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../Button.vue.es-BC4_TItq.js"),a=require("../../index-WLSPwi90.js"),o=require("../../ErrorNotification.vue.es-FpRyg0De.js"),r=require("../../component-ZRZIt3ZW.js"),l=require("../../typeGuards.es-C4nR5FkL.js"),n=require("../../cloneDeep-Hs8Pp07F.js"),i=require("../../api.es-B4qAAJKr.js"),d=require("../../useCustomer-PthyTFLl.js"),s={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function u({initialState:t={},onSubmit:o}){const{form:r,validation:i,changes:d,hasChanges:u,updateInitialState:p,initialState:f}=(({initialState:t,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const i=e.shallowRef(n.cloneDeep(t)),d=e.shallowRef(n.cloneDeep(t)),s=a.useValidation(o??{},d),u=e.computed(()=>a.objectDiff({from:i.value,to:d.value,mode:l,nullifyEmptyValues:r})),c=e.computed(()=>Object.entries(u.value).length>0);return{form:d,validation:s,changes:u,hasChanges:c,reset:()=>{d.value=n.cloneDeep(t),s.value.$reset()},updateInitialState:e=>{d.value=n.cloneDeep(e),i.value=n.cloneDeep(e)},initialState:i}})({initialState:{...s,...t},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:r,isOrganization:l.isOrganization,validation:i,changes:d,hasChanges:u,updateInitialState:e=>{p(c(e))},submit:(e,t=r.value)=>o({customerId:e,payload:m(t)}),initialState:f}}const c=e=>{var t,a,o,r;if(l.isIndividual(e)){const o=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==o?void 0:o.country)??"",addressLine1:(null==o?void 0:o.line1)??"",addressLine2:(null==o?void 0:o.line2)??"",postalCode:(null==o?void 0:o.postal_code)??"",city:(null==o?void 0:o.city)??"",state:(null==o?void 0:o.state)??"",firstName:(null==(t=e.individual.name)?void 0:t.first_name)??"",lastName:(null==(a=e.individual.name)?void 0:a.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(r=null==(o=e.organization.tax_ids)?void 0:o[0])?void 0:r.id)??""}},m=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},p={class:"grid grid-cols-1 gap-4"},f={class:"flex grow flex-col"},h={class:"mt-6 flex items-center justify-between gap-4"},g={class:"flex flex-col gap-2"},y={key:0,class:"grid grid-cols-2 gap-2"},_={class:"grid grid-cols-3 gap-2"},v=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(l){const n=l,{$t:i}=r.useIntl(),{validation:d,form:s,updateInitialState:c,submit:m,hasChanges:v}=u({onSubmit:({customerId:e,payload:t})=>n.updateCustomer({customerId:e,payload:t})}),b=e.ref(!1),V=e.computed(()=>"ORGANIZATION"===s.value.type),N=e.computed(()=>!b.value),k=e.computed({get:()=>V.value,set:e=>s.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),C=async()=>{var e;await d.value.$validate();!d.value.$invalid&&(null==(e=n.customer)?void 0:e.id)&&await m(n.customer.id)};return e.watch(()=>n.customer,e=>{e&&!b.value&&(c(e),b.value=!0)},{immediate:!0}),(n,u)=>{var c,m,b,E,S,I,L,T,x,B,M,O,A;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(C,["prevent"])},[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",p,[e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).email,"onUpdate:modelValue":u[0]||(u[0]=t=>e.unref(s).email=t),required:"",type:"email",label:e.unref(i)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(c=e.unref(d).email)?void 0:c.$errors)||(null==(m=l.apiError)?void 0:m.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(a._sfc_main$1),{"single-model-value":e.unref(s).country,"onUpdate:singleModelValue":u[1]||(u[1]=t=>e.unref(s).country=t),label:e.unref(i)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(b=l.apiError)?void 0:b.country},null,8,["single-model-value","label","error"]),N.value?(e.openBlock(),e.createBlock(e.unref(a._sfc_main$2),{key:0,modelValue:k.value,"onUpdate:modelValue":u[2]||(u[2]=e=>k.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",f,[e.createVNode(e.unref(r._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).companyVatNumber,"onUpdate:modelValue":u[3]||(u[3]=t=>e.unref(s).companyVatNumber=t),name:"vat_number",label:e.unref(i)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(E=l.apiError)?void 0:E.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).companyLegalName,"onUpdate:modelValue":u[4]||(u[4]=t=>e.unref(s).companyLegalName=t),required:"",name:"legal_name",label:e.unref(i)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(S=l.apiError)?void 0:S.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",h,[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",g,[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).firstName,"onUpdate:modelValue":u[5]||(u[5]=t=>e.unref(s).firstName=t),name:"first_name",label:e.unref(i)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(I=l.apiError)?void 0:I.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).lastName,"onUpdate:modelValue":u[6]||(u[6]=t=>e.unref(s).lastName=t),name:"last_name",label:e.unref(i)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(L=l.apiError)?void 0:L.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).addressLine1,"onUpdate:modelValue":u[7]||(u[7]=t=>e.unref(s).addressLine1=t),name:"address_line_1",label:e.unref(i)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(i)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(T=l.apiError)?void 0:T.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).addressLine2,"onUpdate:modelValue":u[8]||(u[8]=t=>e.unref(s).addressLine2=t),name:"address_line_2",placeholder:e.unref(i)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(x=l.apiError)?void 0:x.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",_,[e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).postalCode,"onUpdate:modelValue":u[9]||(u[9]=t=>e.unref(s).postalCode=t),name:"postal_code",placeholder:e.unref(i)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(B=l.apiError)?void 0:B.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).city,"onUpdate:modelValue":u[10]||(u[10]=t=>e.unref(s).city=t),name:"city",placeholder:e.unref(i)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(M=l.apiError)?void 0:M.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(a._sfc_main),{modelValue:e.unref(s).state,"onUpdate:modelValue":u[11]||(u[11]=t=>e.unref(s).state=t),name:"state",placeholder:e.unref(i)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(O=l.apiError)?void 0:O.state},null,8,["modelValue","placeholder","error"])])]),(null==(A=l.apiError)?void 0:A._generic)?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,class:"mt-4",title:l.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main),{type:"submit",color:"primary",disabled:!e.unref(v),loading:l.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),b=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(v,{customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),V=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},setup(t){const a=t.portalObject.customer_id,{customer:o,get:r,update:l}=d.useCustomer({customerId:a});return e.onMounted(async()=>{await r.execute()}),(t,a)=>e.renderSlot(t.$slots,"default",{customer:e.unref(o),isLoading:e.unref(r).isPending.value||e.unref(l).isPending.value,updateCustomer:e.unref(l),apiError:e.unref(i.getApiError)(e.unref(l).error)})}}),N=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{"custom-element-name":e.unref(C),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=t.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=t.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(V,e.normalizeProps(e.guardReactiveProps(a.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(b,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),k=r.defineCustomElement(N),C=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=C,exports.SolvimonBillingInformationForm=k,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(C)||customElements.define(C,k)};
@@ -1,8 +1,12 @@
1
1
  import { shallowRef, computed, defineComponent, ref, watch, openBlock, createElementBlock, withModifiers, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, createBlock, createCommentVNode, Fragment, onMounted, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
- import { F as useValidation, G as objectDiff, H as isOrganization, I as isIndividual, b as useIntl, _ as _sfc_main$2$1, J as _sfc_main$2a, K as _sfc_main$1$, L as _sfc_main$20, C as _sfc_main$16, l as _sfc_main$2H, M as getApiError, o as _sfc_main$4, p as defineCustomElement, n as getComponentName } from "../../component-DI3AxwdD.mjs";
3
- import { e as email, r as required } from "../../index-CzL1ZcGi.mjs";
2
+ import { _ as _sfc_main$9 } from "../../Button.vue.es-6sBk5tBL.mjs";
3
+ import { u as useValidation, o as objectDiff, e as email, r as required, _ as _sfc_main$5, a as _sfc_main$6, b as _sfc_main$7 } from "../../index-CI71bVGE.mjs";
4
+ import { _ as _sfc_main$8 } from "../../ErrorNotification.vue.es-Bgw0MIl8.mjs";
5
+ import { a as useIntl, _ as _sfc_main$4, b as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
6
+ import { a as isOrganization, i as isIndividual } from "../../typeGuards.es-fwUoeMCe.mjs";
4
7
  import { c as cloneDeep } from "../../cloneDeep-sm9cY-u2.mjs";
5
- import { u as useCustomer } from "../../useCustomer-DkrBNt5f.mjs";
8
+ import { b as getApiError } from "../../api.es-UkfpLiLL.mjs";
9
+ import { u as useCustomer } from "../../useCustomer--jycAz--.mjs";
6
10
  const useForm = ({
7
11
  initialState,
8
12
  validationRules,
@@ -209,7 +213,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
209
213
  return openBlock(), createElementBlock("form", {
210
214
  onSubmit: withModifiers(handleSubmit, ["prevent"])
211
215
  }, [
212
- createVNode(unref(_sfc_main$2$1), {
216
+ createVNode(unref(_sfc_main$4), {
213
217
  variant: "heading-3",
214
218
  tag: "h2"
215
219
  }, {
@@ -223,7 +227,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
223
227
  _: 1
224
228
  }),
225
229
  createElementVNode("div", _hoisted_1, [
226
- createVNode(unref(_sfc_main$2a), {
230
+ createVNode(unref(_sfc_main$5), {
227
231
  modelValue: unref(form).email,
228
232
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(form).email = $event),
229
233
  required: "",
@@ -238,9 +242,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
238
242
  id: "checkout.email_address.placeholder",
239
243
  description: "The email address of the customer in the checkout form"
240
244
  }),
241
- error: ((_a = unref(validation).value.email) == null ? void 0 : _a.$errors) || ((_b = __props.apiError) == null ? void 0 : _b.email)
245
+ error: ((_a = unref(validation).email) == null ? void 0 : _a.$errors) || ((_b = __props.apiError) == null ? void 0 : _b.email)
242
246
  }, null, 8, ["modelValue", "label", "placeholder", "error"]),
243
- createVNode(unref(_sfc_main$1$), {
247
+ createVNode(unref(_sfc_main$6), {
244
248
  "single-model-value": unref(form).country,
245
249
  "onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => unref(form).country = $event),
246
250
  label: unref($t)({
@@ -250,7 +254,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
250
254
  }),
251
255
  error: (_c = __props.apiError) == null ? void 0 : _c.country
252
256
  }, null, 8, ["single-model-value", "label", "error"]),
253
- showCompanyPurchaseToggle.value ? (openBlock(), createBlock(unref(_sfc_main$20), {
257
+ showCompanyPurchaseToggle.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
254
258
  key: 0,
255
259
  modelValue: companyPurchaseModel.value,
256
260
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => companyPurchaseModel.value = $event),
@@ -258,7 +262,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
258
262
  }, {
259
263
  "inline-label": withCtx(() => [
260
264
  createElementVNode("div", _hoisted_2, [
261
- createVNode(unref(_sfc_main$2$1), { tag: "span" }, {
265
+ createVNode(unref(_sfc_main$4), { tag: "span" }, {
262
266
  default: withCtx(() => [
263
267
  createTextVNode(toDisplayString(unref($t)({
264
268
  defaultMessage: "Company purchase",
@@ -268,7 +272,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
268
272
  ]),
269
273
  _: 1
270
274
  }),
271
- createVNode(unref(_sfc_main$2$1), {
275
+ createVNode(unref(_sfc_main$4), {
272
276
  tag: "span",
273
277
  variant: "body-xs",
274
278
  shade: "lighter"
@@ -287,7 +291,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
287
291
  _: 1
288
292
  }, 8, ["modelValue"])) : createCommentVNode("", true),
289
293
  isCompanyPurchase.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
290
- createVNode(unref(_sfc_main$2a), {
294
+ createVNode(unref(_sfc_main$5), {
291
295
  modelValue: unref(form).companyVatNumber,
292
296
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(form).companyVatNumber = $event),
293
297
  name: "vat_number",
@@ -303,7 +307,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
303
307
  }),
304
308
  error: (_d = __props.apiError) == null ? void 0 : _d.vat_number
305
309
  }, null, 8, ["modelValue", "label", "placeholder", "error"]),
306
- createVNode(unref(_sfc_main$2a), {
310
+ createVNode(unref(_sfc_main$5), {
307
311
  modelValue: unref(form).companyLegalName,
308
312
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(form).companyLegalName = $event),
309
313
  required: "",
@@ -323,7 +327,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
323
327
  ], 64)) : createCommentVNode("", true)
324
328
  ]),
325
329
  createElementVNode("div", _hoisted_3, [
326
- createVNode(unref(_sfc_main$2$1), {
330
+ createVNode(unref(_sfc_main$4), {
327
331
  variant: "heading-3",
328
332
  tag: "h2"
329
333
  }, {
@@ -339,7 +343,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
339
343
  ]),
340
344
  createElementVNode("div", _hoisted_4, [
341
345
  !isCompanyPurchase.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
342
- createVNode(unref(_sfc_main$2a), {
346
+ createVNode(unref(_sfc_main$5), {
343
347
  modelValue: unref(form).firstName,
344
348
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(form).firstName = $event),
345
349
  name: "first_name",
@@ -355,7 +359,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
355
359
  }),
356
360
  error: (_f = __props.apiError) == null ? void 0 : _f.first_name
357
361
  }, null, 8, ["modelValue", "label", "placeholder", "error"]),
358
- createVNode(unref(_sfc_main$2a), {
362
+ createVNode(unref(_sfc_main$5), {
359
363
  modelValue: unref(form).lastName,
360
364
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(form).lastName = $event),
361
365
  name: "last_name",
@@ -372,7 +376,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
372
376
  error: (_g = __props.apiError) == null ? void 0 : _g.last_name
373
377
  }, null, 8, ["modelValue", "label", "placeholder", "error"])
374
378
  ])) : createCommentVNode("", true),
375
- createVNode(unref(_sfc_main$2a), {
379
+ createVNode(unref(_sfc_main$5), {
376
380
  modelValue: unref(form).addressLine1,
377
381
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(form).addressLine1 = $event),
378
382
  name: "address_line_1",
@@ -388,7 +392,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
388
392
  }),
389
393
  error: (_h = __props.apiError) == null ? void 0 : _h.address_line_1
390
394
  }, null, 8, ["modelValue", "label", "placeholder", "error"]),
391
- createVNode(unref(_sfc_main$2a), {
395
+ createVNode(unref(_sfc_main$5), {
392
396
  modelValue: unref(form).addressLine2,
393
397
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(form).addressLine2 = $event),
394
398
  name: "address_line_2",
@@ -400,7 +404,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
400
404
  error: (_i = __props.apiError) == null ? void 0 : _i.address_line_2
401
405
  }, null, 8, ["modelValue", "placeholder", "error"]),
402
406
  createElementVNode("div", _hoisted_6, [
403
- createVNode(unref(_sfc_main$2a), {
407
+ createVNode(unref(_sfc_main$5), {
404
408
  modelValue: unref(form).postalCode,
405
409
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(form).postalCode = $event),
406
410
  name: "postal_code",
@@ -411,7 +415,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
411
415
  }),
412
416
  error: (_j = __props.apiError) == null ? void 0 : _j.postal_code
413
417
  }, null, 8, ["modelValue", "placeholder", "error"]),
414
- createVNode(unref(_sfc_main$2a), {
418
+ createVNode(unref(_sfc_main$5), {
415
419
  modelValue: unref(form).city,
416
420
  "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(form).city = $event),
417
421
  name: "city",
@@ -422,7 +426,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
422
426
  }),
423
427
  error: (_k = __props.apiError) == null ? void 0 : _k.city
424
428
  }, null, 8, ["modelValue", "placeholder", "error"]),
425
- createVNode(unref(_sfc_main$2a), {
429
+ createVNode(unref(_sfc_main$5), {
426
430
  modelValue: unref(form).state,
427
431
  "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(form).state = $event),
428
432
  name: "state",
@@ -435,12 +439,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
435
439
  }, null, 8, ["modelValue", "placeholder", "error"])
436
440
  ])
437
441
  ]),
438
- ((_m = __props.apiError) == null ? void 0 : _m._generic) ? (openBlock(), createBlock(unref(_sfc_main$16), {
442
+ ((_m = __props.apiError) == null ? void 0 : _m._generic) ? (openBlock(), createBlock(unref(_sfc_main$8), {
439
443
  key: 0,
440
444
  class: "mt-4",
441
445
  title: __props.apiError._generic
442
446
  }, null, 8, ["title"])) : createCommentVNode("", true),
443
- createVNode(unref(_sfc_main$2H), {
447
+ createVNode(unref(_sfc_main$9), {
444
448
  type: "submit",
445
449
  color: "primary",
446
450
  disabled: !unref(hasChanges),
@@ -538,7 +542,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
538
542
  setup(__props) {
539
543
  return (_ctx, _cache) => {
540
544
  var _a, _b, _c, _d;
541
- return openBlock(), createBlock(unref(_sfc_main$4), {
545
+ return openBlock(), createBlock(unref(_sfc_main$a), {
542
546
  "custom-element-name": unref(COMPONENT_NAME),
543
547
  environment: __props.environment,
544
548
  locale: __props.locale,
@@ -1,3 +1,3 @@
1
- export declare const SolvimonCustomerPaymentMethods: import('@vue/runtime-dom').VueElementConstructor<unknown>;
1
+ export declare const SolvimonCustomerPaymentMethods: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
2
2
  export declare const COMPONENT_NAME: string;
3
3
  export declare const defineSolvimonCustomerPaymentMethods: () => void;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js"),t=require("../../component-yWF07boR.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),r=require("../../usePaymentMethods-BK4unvj2.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,m=r.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:p}=n.useLoadInitialData(m.fetchInitial());return(n,r)=>{var a,l,i,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(c=null==(i=o.branding)?void 0:i.colors)?void 0:c.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:r[0]||(r[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{paymentMethods:e.unref(m).items.value,isLoading:e.unref(p)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:n=>(r,l)=>{var i,m,p,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(m=null==(i=n.branding)?void 0:i.colors)?void 0:m.primary,"secondary-color":null==(c=null==(p=n.branding)?void 0:p.colors)?void 0:c.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:r})=>[e.createVNode(o._sfc_main,{configuration:n.configuration,"payment-methods":t,"is-loading":r},null,8,["configuration","payment-methods","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=t.defineCustomElement(l),s=t.getComponentName("customer-payment-methods");exports.COMPONENT_NAME=s,exports.SolvimonCustomerPaymentMethods=i,exports.defineSolvimonCustomerPaymentMethods=()=>{customElements.get(s)||customElements.define(s,i)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js"),t=require("../../component-ZRZIt3ZW.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),r=require("../../usePaymentMethods-BRQ7-dUr.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,m=r.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:p}=n.useLoadInitialData(m.fetchInitial());return(n,r)=>{var a,l,i,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(c=null==(i=o.branding)?void 0:i.colors)?void 0:c.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:r[0]||(r[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{paymentMethods:e.unref(m).items.value,isLoading:e.unref(p)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:n=>(r,l)=>{var i,m,p,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(m=null==(i=n.branding)?void 0:i.colors)?void 0:m.primary,"secondary-color":null==(c=null==(p=n.branding)?void 0:p.colors)?void 0:c.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:r})=>[e.createVNode(o._sfc_main,{configuration:n.configuration,"payment-methods":t,"is-loading":r},null,8,["configuration","payment-methods","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=t.defineCustomElement(l),s=t.getComponentName("customer-payment-methods");exports.COMPONENT_NAME=s,exports.SolvimonCustomerPaymentMethods=i,exports.defineSolvimonCustomerPaymentMethods=()=>{customElements.get(s)||customElements.define(s,i)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs";
3
- import { o as _sfc_main$2, p as defineCustomElement, n as getComponentName } from "../../component-DI3AxwdD.mjs";
2
+ import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs";
3
+ import { b as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
4
4
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
5
- import { u as usePaymentMethods } from "../../usePaymentMethods-B8Nft16c.mjs";
5
+ import { u as usePaymentMethods } from "../../usePaymentMethods-BX2RnHZN.mjs";
6
6
  const DEFAULT_MAX_ITEMS = 3;
7
7
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8
8
  __name: "CustomerPaymentMethods.entry.view",
@@ -1,3 +1,3 @@
1
- export declare const SolvimonInvoice: import('@vue/runtime-dom').VueElementConstructor<unknown>;
1
+ export declare const SolvimonInvoice: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
2
2
  export declare const COMPONENT_NAME: string;
3
3
  export declare const defineSolvimonInvoice: () => void;