@solvimon/solvimon-web 0.1.0-alpha.1 → 0.1.0-alpha.10

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 (196) hide show
  1. package/README.md +196 -44
  2. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  3. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +9 -6
  5. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
  6. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
  7. package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
  8. package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +29 -37
  9. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +20 -9
  11. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
  12. package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
  13. package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +19 -12
  15. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
  16. package/dist/PaymentIntegrationForm-D1ZaHCTm.js +1 -0
  17. package/dist/PaymentIntegrationForm-Dmmhqqn1.mjs +4 -0
  18. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CSPZRvMV.js +1 -0
  19. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Do2KIVKH.mjs +962 -0
  20. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +50 -0
  21. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
  22. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +24 -8
  23. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
  24. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +42 -36
  26. package/dist/adyen-51SvcyqV.mjs +4 -0
  27. package/dist/adyen-Bwewy3HC.mjs +172 -0
  28. package/dist/adyen-DZsyEXkw.js +1 -0
  29. package/dist/adyen-R6aSZ0Yf.js +1 -0
  30. package/dist/component-BOqPDAVk.js +1 -0
  31. package/dist/component-Djrf1L-Z.mjs +889 -0
  32. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
  33. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  34. package/dist/components/BillingInformation/BillingInformation.es.js +99 -5
  35. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
  36. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  37. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +582 -5
  38. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
  39. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  40. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +126 -5
  41. package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
  42. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  43. package/dist/components/Invoice/Invoice.es.js +538 -5
  44. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
  45. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  46. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +127 -5
  47. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
  48. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  49. package/dist/components/InvoicesList/InvoicesList.es.js +106 -5
  50. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
  51. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  52. package/dist/components/PaymentHistory/PaymentHistory.es.js +131 -5
  53. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
  54. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  55. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +217 -5
  56. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
  57. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  58. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +154 -5
  59. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
  60. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  61. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +132 -5
  62. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
  63. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
  64. package/dist/components/WalletBalances/WalletBalances.es.js +120 -0
  65. package/dist/core/configuration.d.ts +2 -1
  66. package/dist/core/index.cjs.js +1 -1
  67. package/dist/core/index.d.ts +1 -0
  68. package/dist/core/index.es.js +1 -1
  69. package/dist/core/registry.d.ts +1 -1
  70. package/dist/core/types.d.ts +10 -2
  71. package/dist/customer-B31QzznT.mjs +32 -0
  72. package/dist/customer-hDxW1Dbp.js +1 -0
  73. package/dist/en-US-CgPY97Vq.js +1 -0
  74. package/dist/en-US-N3CUCsVy.mjs +179 -0
  75. package/dist/index-DIFK3mcJ.js +6 -0
  76. package/dist/index-DyvRdSR7.mjs +9673 -0
  77. package/dist/index.cjs.js +1 -1
  78. package/dist/index.d.ts +3 -0
  79. package/dist/index.es.js +43 -34
  80. package/dist/{invoices-C31Wz1Bu.mjs → invoices-DIYPN2j_.mjs} +2 -1
  81. package/dist/invoices-DzkA1jDc.js +1 -0
  82. package/dist/nl-NL-B8U9b85I.mjs +197 -0
  83. package/dist/nl-NL-qMRaTRrM.js +1 -0
  84. package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-67b3UlTZ.mjs} +2 -1
  85. package/dist/paymentMethods-C_sdTkSF.js +1 -0
  86. package/dist/{payments-C3LPk9k9.js → payments-DkHhTHto.js} +1 -1
  87. package/dist/{payments-NtWI8KlU.mjs → payments-Dq6R37Fz.mjs} +1 -1
  88. package/dist/registry-BkViv4tv.js +1 -0
  89. package/dist/registry-Df_26rJy.mjs +144 -0
  90. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
  91. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  92. package/dist/screens/Checkout/Checkout.es.js +4935 -5
  93. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
  94. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  95. package/dist/screens/CustomerOverview/CustomerOverview.es.js +154 -5
  96. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  97. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  98. package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
  99. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
  100. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
  101. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1066 -0
  102. package/dist/solvimon-web.css +1 -1
  103. package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-ClGIr_aS.mjs} +2 -1
  104. package/dist/subscriptions-jelITJcX.js +1 -0
  105. package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
  106. package/dist/useActionDispatchProvider-rw9kWeE0.js +1 -0
  107. package/dist/useCustomer-Ba9WRtuT.mjs +25 -0
  108. package/dist/useCustomer-CUcaeQn_.js +1 -0
  109. package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +11 -10
  110. package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
  111. package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
  112. package/dist/useInvoiceData-D2jkdmlA.js +1 -0
  113. package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CFzAxyae.mjs} +34 -30
  114. package/dist/useInvoicesList-CaBCGs4h.js +1 -0
  115. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
  116. package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
  117. package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
  118. package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
  119. package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
  120. package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-ryN_YohI.js} +1 -1
  121. package/dist/usePayments-Cw5PPEJa.mjs +36 -0
  122. package/dist/usePayments-DWXPGFvp.js +1 -0
  123. package/dist/usePortal-CxX4nrE4.js +1 -0
  124. package/dist/usePortal-cmE08vYs.mjs +12 -0
  125. package/dist/useService-Bb9r_sOQ.js +1 -0
  126. package/dist/useService-BsSEI8DZ.mjs +53 -0
  127. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  128. package/dist/useViewport-CKRY1CKR.js +1 -0
  129. package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
  130. package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
  131. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  132. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  133. package/dist/vendor-ui-5pJF5KBP.js +1 -0
  134. package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
  135. package/package.json +47 -20
  136. package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
  137. package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
  138. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js +0 -1
  139. package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
  140. package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
  141. package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
  142. package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
  143. package/dist/ContentWithAsideLayout-CIVSoqFr.js +0 -1
  144. package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
  145. package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
  146. package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
  147. package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
  148. package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
  149. package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
  150. package/dist/InvoiceDetails.entry.ce-Cnpz8CLJ.mjs +0 -130
  151. package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
  152. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js +0 -1
  153. package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
  154. package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
  155. package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
  156. package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
  157. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js +0 -1
  158. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs +0 -6568
  159. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
  160. package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
  161. package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
  162. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
  163. package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
  164. package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
  165. package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
  166. package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
  167. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js +0 -1
  168. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  169. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  170. package/dist/auto-B_36W1Fc.js +0 -6
  171. package/dist/auto-BfMZdgp-.mjs +0 -14207
  172. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  173. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  174. package/dist/component-BkmcE85U.mjs +0 -58654
  175. package/dist/component-Df5eNqYX.js +0 -1
  176. package/dist/index-2jo9BSPM.js +0 -1
  177. package/dist/index-BFZ0dPh9.mjs +0 -179
  178. package/dist/index-CWSXne1Q.js +0 -1
  179. package/dist/index-D3v7hAtc.mjs +0 -253
  180. package/dist/invoices-8M_3ur_U.js +0 -1
  181. package/dist/paymentMethods-CzUqDlvc.js +0 -1
  182. package/dist/registry-By94DXE2.js +0 -1
  183. package/dist/registry-shRKDl3K.mjs +0 -127
  184. package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
  185. package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
  186. package/dist/subscriptions-CqK7t-fF.js +0 -1
  187. package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
  188. package/dist/useCustomer-BRY0tuBH.mjs +0 -45
  189. package/dist/useCustomer-Dp8sGHI0.js +0 -1
  190. package/dist/useCustomerPaymentMethodOptions-DYpMDnJR.js +0 -1
  191. package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
  192. package/dist/useInvoiceData-DImEH1ca.js +0 -1
  193. package/dist/useInvoicesList-BZQ9Y0qN.js +0 -1
  194. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  195. package/dist/useService-Dz13Nxbi.mjs +0 -272
  196. package/dist/useService-bNNi4GB8.js +0 -1
@@ -1,3 +1,3 @@
1
- export declare const SolvimonBillingInformation: import('vue').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 o=require("../../BillingInformation.entry.ce-DkrfEvK_.js");require("../../component-Df5eNqYX.js"),exports.COMPONENT_NAME=o.COMPONENT_NAME,exports.SolvimonBillingInformation=o.SolvimonBillingInformation,exports.defineSolvimonBillingInformation=o.defineSolvimonBillingInformation;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js"),o=require("../../useCustomer-CUcaeQn_.js"),r=require("../../useLoadInitialData-DjwRHcAH.js"),n=require("../../component-BOqPDAVk.js"),i=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const n=t.portalObject.customer_id,i=o.useCustomer({customerId:n}),{isLoading:l}=r.useLoadInitialData(i.get.execute());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(i),isLoading:e.unref(l)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:o=>(r,l)=>{var a,p,c,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(a=o.branding)?void 0:a.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=o.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({customer:o,isLoading:r})=>[e.createVNode(t._sfc_main,{"is-loading":r,customer:o.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","css-overrides"])}}),a=n.defineCustomElement(l),s=n.getComponentName("billing-information");exports.COMPONENT_NAME=s,exports.SolvimonBillingInformation=a,exports.defineSolvimonBillingInformation=()=>{customElements.get(s)||customElements.define(s,a)};
@@ -1,7 +1,101 @@
1
- import { C, S, d } from "../../BillingInformation.entry.ce-1xVdsWlL.mjs";
2
- import "../../component-BkmcE85U.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-CX8vlY2Z.mjs";
3
+ import { u as useCustomer } from "../../useCustomer-Ba9WRtuT.mjs";
4
+ import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
5
+ import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
6
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
+ __name: "BillingInformation.entry.view",
8
+ props: {
9
+ environment: { type: String },
10
+ locale: { type: String },
11
+ dateLocale: { type: String },
12
+ messages: { type: Object },
13
+ primaryColor: { type: String },
14
+ secondaryColor: { type: String },
15
+ isShadowRoot: { type: Boolean },
16
+ experimentalFeatures: { type: Array },
17
+ logLevel: { type: String },
18
+ onLog: { type: Function },
19
+ allowedPortalTypes: { type: Array },
20
+ portalObject: { type: Object },
21
+ cssOverrides: { type: [String, Array] },
22
+ branding: { type: Object },
23
+ configuration: { type: Object }
24
+ },
25
+ setup(__props) {
26
+ const props = __props;
27
+ const customerId = props.portalObject.customer_id;
28
+ const customer = useCustomer({ customerId });
29
+ const { isLoading } = useLoadInitialData(customer.get.execute());
30
+ return (_ctx, _cache) => {
31
+ return renderSlot(_ctx.$slots, "default", {
32
+ customer: unref(customer),
33
+ isLoading: unref(isLoading)
34
+ });
35
+ };
36
+ }
37
+ });
38
+ const _sfc_main = /* @__PURE__ */ defineComponent({
39
+ __name: "BillingInformation.entry",
40
+ props: {
41
+ environment: { type: String },
42
+ locale: { type: String },
43
+ dateLocale: { type: String },
44
+ messages: { type: Object },
45
+ primaryColor: { type: String },
46
+ secondaryColor: { type: String },
47
+ isShadowRoot: { type: Boolean },
48
+ experimentalFeatures: { type: Array },
49
+ logLevel: { type: String },
50
+ onLog: { type: Function },
51
+ allowedPortalTypes: { type: Array },
52
+ portalObject: { type: Object },
53
+ cssOverrides: { type: [String, Array] },
54
+ branding: { type: Object },
55
+ configuration: { type: Object }
56
+ },
57
+ setup(__props) {
58
+ return (_ctx, _cache) => {
59
+ var _a, _b, _c, _d;
60
+ return openBlock(), createBlock(unref(_sfc_main$2), {
61
+ "custom-element-name": unref(COMPONENT_NAME),
62
+ environment: __props.environment,
63
+ locale: __props.locale,
64
+ "portal-object": __props.portalObject,
65
+ "allowed-portal-types": ["CUSTOMER"],
66
+ "primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
67
+ "secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
68
+ "experimental-features": __props.experimentalFeatures,
69
+ "log-level": __props.logLevel,
70
+ "on-log": __props.onLog,
71
+ "css-overrides": __props.cssOverrides,
72
+ onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
73
+ }, {
74
+ default: withCtx(() => [
75
+ createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$props)), {
76
+ default: withCtx(({ customer, isLoading }) => [
77
+ createVNode(_sfc_main$3, {
78
+ "is-loading": isLoading,
79
+ customer: customer.customer.value
80
+ }, null, 8, ["is-loading", "customer"])
81
+ ]),
82
+ _: 1
83
+ }, 16)
84
+ ]),
85
+ _: 1
86
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
87
+ };
88
+ }
89
+ });
90
+ const SolvimonBillingInformation = defineCustomElement(_sfc_main);
91
+ const COMPONENT_NAME = getComponentName("billing-information");
92
+ const defineSolvimonBillingInformation = () => {
93
+ if (!customElements.get(COMPONENT_NAME)) {
94
+ customElements.define(COMPONENT_NAME, SolvimonBillingInformation);
95
+ }
96
+ };
3
97
  export {
4
- C as COMPONENT_NAME,
5
- S as SolvimonBillingInformation,
6
- d as defineSolvimonBillingInformation
98
+ COMPONENT_NAME,
99
+ SolvimonBillingInformation,
100
+ defineSolvimonBillingInformation
7
101
  };
@@ -1,3 +1,3 @@
1
- export declare const SolvimonBillingInformationForm: import('vue').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 o=require("../../BillingInformationForm.entry.ce-MPMirEsk.js");require("../../component-Df5eNqYX.js"),exports.COMPONENT_NAME=o.COMPONENT_NAME,exports.SolvimonBillingInformationForm=o.SolvimonBillingInformationForm,exports.defineSolvimonBillingInformationForm=o.defineSolvimonBillingInformationForm;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-5pJF5KBP.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../useCustomer-CUcaeQn_.js"),r=require("../../component-BOqPDAVk.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:o={},onSubmit:r}){const{form:n,validation:s,changes:u,hasChanges:c,updateInitialState:m,initialState:p}=(({initialState:a,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const n=e.shallowRef(structuredClone(a)),i=e.shallowRef(structuredClone(a)),d=t.useValidation(o??{},i),s=e.computed(()=>t.objectDiff({from:n.value,to:i.value,mode:l,nullifyEmptyValues:r})),u=e.computed(()=>Object.entries(s.value).length>0);return{form:i,validation:d,changes:s,hasChanges:u,reset:()=>{i.value=structuredClone(a),d.value.$reset()},updateInitialState:e=>{i.value=structuredClone(e),n.value=structuredClone(e)},initialState:n}})({initialState:{...l,...o},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:n,isOrganization:t.isOrganization,validation:s,changes:u,hasChanges:c,updateInitialState:e=>{m(i(e))},submit:(e,t=n.value)=>r({customerId:e,payload:d(t)}),initialState:p}}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),v=e.computed(()=>"ORGANIZATION"===i.value.type),_=e.computed(()=>!y.value),b=e.computed({get:()=>v.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,S,E,I,L,T,x,O;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main),{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$20),{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).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$21),{"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"]),_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$22),{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),{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),{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),v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$20),{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$20),{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),{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,[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$20),{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$20),{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==(S=a.apiError)?void 0:S.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$20),{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==(E=a.apiError)?void 0:E.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{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$20),{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$20),{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$20),{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==(O=a.apiError)?void 0:O._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$15),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{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,{class:"sv-billing-form sv-root sv-component",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},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(a){const r=a.portalObject.customer_id,{customer:l,get:n,update:i}=o.useCustomer({customerId:r});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)})}}),v=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(b),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,"css-overrides":t.cssOverrides,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(a.$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","css-overrides"])}}),_=r.defineCustomElement(v),b=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,_)};