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

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 (217) hide show
  1. package/README.md +124 -0
  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-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +6 -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-Ct24RV-2.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
  8. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +21 -13
  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-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +19 -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-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +16 -13
  15. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
  16. package/dist/PaymentIntegrationForm-D1oJA9mC.js +1 -0
  17. package/dist/PaymentIntegrationForm-DNkjhqMF.mjs +4 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D37gDtY7.mjs} +95 -199
  19. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js +1 -0
  20. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs} +5 -31
  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-DXJcL7x6.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +9 -6
  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-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +28 -22
  26. package/dist/adyen-B_QrYdaC.mjs +4 -0
  27. package/dist/adyen-Bwewy3HC.mjs +172 -0
  28. package/dist/adyen-R6aSZ0Yf.js +1 -0
  29. package/dist/adyen-mQEEOjgl.js +1 -0
  30. package/dist/adyen.css +1 -0
  31. package/dist/component-BOqPDAVk.js +1 -0
  32. package/dist/component-Djrf1L-Z.mjs +889 -0
  33. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  34. package/dist/components/BillingInformation/BillingInformation.es.js +8 -9
  35. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  36. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +14 -18
  37. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  38. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +10 -10
  39. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  40. package/dist/components/Invoice/Invoice.es.js +70 -2673
  41. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  42. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +10 -10
  43. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  44. package/dist/components/InvoicesList/InvoicesList.es.js +7 -8
  45. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  46. package/dist/components/PaymentHistory/PaymentHistory.es.js +10 -10
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  48. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +16 -38
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  50. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +17 -4826
  51. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  52. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +11 -11
  53. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  54. package/dist/components/WalletBalances/WalletBalances.es.js +9 -9
  55. package/dist/core/index.cjs.js +1 -1
  56. package/dist/core/index.d.ts +1 -0
  57. package/dist/core/index.es.js +1 -1
  58. package/dist/core/types.d.ts +6 -2
  59. package/dist/{customer-CJrpbGX4.mjs → customer-B31QzznT.mjs} +1 -1
  60. package/dist/{customer-CcQR-JIm.js → customer-hDxW1Dbp.js} +1 -1
  61. package/dist/en-US-CgPY97Vq.js +1 -0
  62. package/dist/en-US-N3CUCsVy.mjs +179 -0
  63. package/dist/index-CzL1ZcGi.mjs +85 -0
  64. package/dist/index-DIFK3mcJ.js +6 -0
  65. package/dist/index-DRdBmZ2-.js +1 -0
  66. package/dist/index-DyvRdSR7.mjs +9673 -0
  67. package/dist/index.cjs.js +1 -1
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.es.js +4 -1
  70. package/dist/{invoices-CNK1Ushv.mjs → invoices-DIYPN2j_.mjs} +2 -15
  71. package/dist/invoices-DzkA1jDc.js +1 -0
  72. package/dist/nl-NL-B8U9b85I.mjs +197 -0
  73. package/dist/nl-NL-qMRaTRrM.js +1 -0
  74. package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-67b3UlTZ.mjs} +2 -2
  75. package/dist/paymentMethods-C_sdTkSF.js +1 -0
  76. package/dist/{payments-CLt0SExf.js → payments-DkHhTHto.js} +1 -1
  77. package/dist/{payments-CE9U7aKK.mjs → payments-Dq6R37Fz.mjs} +1 -1
  78. package/dist/registry-BkViv4tv.js +1 -0
  79. package/dist/{registry-B99ZnfEn.mjs → registry-Df_26rJy.mjs} +6 -4
  80. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  81. package/dist/screens/Checkout/Checkout.es.js +632 -2538
  82. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  83. package/dist/screens/CustomerOverview/CustomerOverview.es.js +23 -17
  84. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  85. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  86. package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
  87. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  88. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +147 -99
  89. package/dist/solvimon-web.css +1 -1
  90. package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-ClGIr_aS.mjs} +2 -2
  91. package/dist/subscriptions-jelITJcX.js +1 -0
  92. package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
  93. package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-rw9kWeE0.js} +1 -1
  94. package/dist/{useCustomer--jycAz--.mjs → useCustomer-Ba9WRtuT.mjs} +2 -2
  95. package/dist/{useCustomer-PthyTFLl.js → useCustomer-CUcaeQn_.js} +1 -1
  96. package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +3 -8
  97. package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
  98. package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
  99. package/dist/useInvoiceData-D2jkdmlA.js +1 -0
  100. package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-CFzAxyae.mjs} +34 -267
  101. package/dist/useInvoicesList-CaBCGs4h.js +1 -0
  102. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
  103. package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
  104. package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
  105. package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
  106. package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
  107. package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-ryN_YohI.js} +1 -1
  108. package/dist/usePayments-Cw5PPEJa.mjs +36 -0
  109. package/dist/usePayments-DWXPGFvp.js +1 -0
  110. package/dist/usePortal-CxX4nrE4.js +1 -0
  111. package/dist/usePortal-cmE08vYs.mjs +12 -0
  112. package/dist/useService-Bb9r_sOQ.js +1 -0
  113. package/dist/useService-BsSEI8DZ.mjs +53 -0
  114. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  115. package/dist/useViewport-CKRY1CKR.js +1 -0
  116. package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
  117. package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
  118. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  119. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  120. package/dist/vendor-ui-5pJF5KBP.js +1 -0
  121. package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
  122. package/package.json +20 -12
  123. package/dist/Alert.vue.es-DMPvSykx.js +0 -1
  124. package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
  125. package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
  126. package/dist/Amount.vue.es-h8wulbBG.js +0 -1
  127. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
  128. package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
  129. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
  130. package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
  131. package/dist/Button.vue.es-BC4_TItq.js +0 -1
  132. package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
  133. package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
  134. package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
  135. package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
  136. package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
  137. package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
  138. package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
  139. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
  140. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
  141. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
  142. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  143. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  144. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
  145. package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
  146. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
  147. package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
  148. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
  149. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  150. package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
  151. package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
  152. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
  153. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
  154. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
  155. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
  156. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
  157. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
  158. package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
  159. package/dist/Section.vue.es-BuzTXRLP.js +0 -1
  160. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +0 -1
  161. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
  162. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
  163. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
  164. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
  165. package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
  166. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  167. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  168. package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
  169. package/dist/_flatRest.es-dFffnTpX.js +0 -1
  170. package/dist/adyen-51SvcyqV.mjs +0 -4
  171. package/dist/adyen-DZsyEXkw.js +0 -1
  172. package/dist/api.es-B4qAAJKr.js +0 -1
  173. package/dist/api.es-UkfpLiLL.mjs +0 -83
  174. package/dist/auto-DzZuCneB.mjs +0 -14387
  175. package/dist/auto-PpnAChnH.js +0 -6
  176. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  177. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  178. package/dist/cn.es-C7xoIs3C.js +0 -1
  179. package/dist/cn.es-tfxVlz02.mjs +0 -3191
  180. package/dist/component-ZRZIt3ZW.js +0 -1
  181. package/dist/component-dpA83LIN.mjs +0 -6569
  182. package/dist/countryData.es--zJAd6LA.mjs +0 -252
  183. package/dist/countryData.es-D3MFzU92.js +0 -1
  184. package/dist/customer.es-D42Md24r.js +0 -1
  185. package/dist/customer.es-LIW2YmLL.mjs +0 -30
  186. package/dist/formatting.es-9hM8aHSg.js +0 -1
  187. package/dist/formatting.es-D5H_ySFv.mjs +0 -68
  188. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  189. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  190. package/dist/index-2jo9BSPM.js +0 -1
  191. package/dist/index-BFZ0dPh9.mjs +0 -179
  192. package/dist/index-CI71bVGE.mjs +0 -2521
  193. package/dist/index-CWSXne1Q.js +0 -1
  194. package/dist/index-D3v7hAtc.mjs +0 -253
  195. package/dist/index-WLSPwi90.js +0 -1
  196. package/dist/index.es-BBJF2O2l.js +0 -1
  197. package/dist/index.es-LCAKs4tH.mjs +0 -438
  198. package/dist/invoices-3kVHsAXr.js +0 -1
  199. package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
  200. package/dist/isEmpty.es-Dycf-CD_.js +0 -1
  201. package/dist/paymentMethods-DZRf0WRl.js +0 -1
  202. package/dist/pick.es-BgDAfhAl.js +0 -1
  203. package/dist/pick.es-DdVOyp0Q.mjs +0 -45
  204. package/dist/registry-ClZ43bQn.js +0 -1
  205. package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
  206. package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
  207. package/dist/subscriptions-CS8HTxzC.js +0 -1
  208. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  209. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  210. package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
  211. package/dist/useInvoiceData-DvQO_nKz.js +0 -1
  212. package/dist/useInvoicesList-CHkwSNO9.js +0 -1
  213. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  214. package/dist/useService-B67YWAcN.js +0 -1
  215. package/dist/useService-DG_zedHV.mjs +0 -282
  216. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
  217. package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
@@ -1 +1 @@
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
+ 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,8 +1,8 @@
1
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";
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
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  __name: "BillingInformation.entry.view",
8
8
  props: {
@@ -10,7 +10,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10
10
  locale: { type: String },
11
11
  dateLocale: { type: String },
12
12
  messages: { type: Object },
13
- showTimezones: { type: Boolean },
14
13
  primaryColor: { type: String },
15
14
  secondaryColor: { type: String },
16
15
  isShadowRoot: { type: Boolean },
@@ -19,7 +18,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
19
18
  onLog: { type: Function },
20
19
  allowedPortalTypes: { type: Array },
21
20
  portalObject: { type: Object },
22
- customElementName: { type: String },
21
+ cssOverrides: { type: [String, Array] },
23
22
  branding: { type: Object },
24
23
  configuration: { type: Object }
25
24
  },
@@ -43,7 +42,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
42
  locale: { type: String },
44
43
  dateLocale: { type: String },
45
44
  messages: { type: Object },
46
- showTimezones: { type: Boolean },
47
45
  primaryColor: { type: String },
48
46
  secondaryColor: { type: String },
49
47
  isShadowRoot: { type: Boolean },
@@ -52,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
50
  onLog: { type: Function },
53
51
  allowedPortalTypes: { type: Array },
54
52
  portalObject: { type: Object },
55
- customElementName: { type: String },
53
+ cssOverrides: { type: [String, Array] },
56
54
  branding: { type: Object },
57
55
  configuration: { type: Object }
58
56
  },
@@ -70,6 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
68
  "experimental-features": __props.experimentalFeatures,
71
69
  "log-level": __props.logLevel,
72
70
  "on-log": __props.onLog,
71
+ "css-overrides": __props.cssOverrides,
73
72
  onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
74
73
  }, {
75
74
  default: withCtx(() => [
@@ -84,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
83
  }, 16)
85
84
  ]),
86
85
  _: 1
87
- }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
86
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
88
87
  };
89
88
  }
90
89
  });
@@ -1 +1 @@
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
+ 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,_)};
@@ -1,31 +1,27 @@
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 { _ 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";
7
- import { c as cloneDeep } from "../../cloneDeep-sm9cY-u2.mjs";
8
- import { b as getApiError } from "../../api.es-UkfpLiLL.mjs";
9
- import { u as useCustomer } from "../../useCustomer--jycAz--.mjs";
2
+ import { H as useValidation, J as objectDiff, K as isOrganization, L as isIndividual, u as useIntl, _ as _sfc_main$4, M as _sfc_main$5, N as _sfc_main$6, O as _sfc_main$7, B as _sfc_main$8, e as _sfc_main$9, Q as getApiError } from "../../vendor-ui-C0K3osvz.mjs";
3
+ import { e as email, r as required } from "../../index-CzL1ZcGi.mjs";
4
+ import { u as useCustomer } from "../../useCustomer-Ba9WRtuT.mjs";
5
+ import { _ as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
10
6
  const useForm = ({
11
7
  initialState,
12
8
  validationRules,
13
9
  nullifyEmptyValues = false,
14
10
  mode = "shallow"
15
11
  }) => {
16
- const initialFormState = shallowRef(cloneDeep(initialState));
17
- const form = shallowRef(cloneDeep(initialState));
12
+ const initialFormState = shallowRef(structuredClone(initialState));
13
+ const form = shallowRef(structuredClone(initialState));
18
14
  const validation = useValidation(validationRules ?? {}, form);
19
15
  const changes = computed(
20
16
  () => objectDiff({ from: initialFormState.value, to: form.value, mode, nullifyEmptyValues })
21
17
  );
22
18
  const hasChanges = computed(() => Object.entries(changes.value).length > 0);
23
19
  const updateInitialState = (state) => {
24
- form.value = cloneDeep(state);
25
- initialFormState.value = cloneDeep(state);
20
+ form.value = structuredClone(state);
21
+ initialFormState.value = structuredClone(state);
26
22
  };
27
23
  const reset = () => {
28
- form.value = cloneDeep(initialState);
24
+ form.value = structuredClone(initialState);
29
25
  validation.value.$reset();
30
26
  };
31
27
  return {
@@ -475,6 +471,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
475
471
  setup(__props) {
476
472
  return (_ctx, _cache) => {
477
473
  return openBlock(), createBlock(_sfc_main$3, {
474
+ class: "sv-billing-form sv-root sv-component",
478
475
  customer: __props.customer,
479
476
  "update-customer": __props.updateCustomer,
480
477
  "is-loading": __props.isLoading,
@@ -490,7 +487,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
490
487
  locale: { type: String },
491
488
  dateLocale: { type: String },
492
489
  messages: { type: Object },
493
- showTimezones: { type: Boolean },
494
490
  primaryColor: { type: String },
495
491
  secondaryColor: { type: String },
496
492
  isShadowRoot: { type: Boolean },
@@ -499,7 +495,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
499
495
  onLog: { type: Function },
500
496
  allowedPortalTypes: { type: Array },
501
497
  portalObject: { type: Object },
502
- customElementName: { type: String },
498
+ cssOverrides: { type: [String, Array] },
503
499
  branding: { type: Object }
504
500
  },
505
501
  setup(__props) {
@@ -526,7 +522,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
526
522
  locale: { type: String },
527
523
  dateLocale: { type: String },
528
524
  messages: { type: Object },
529
- showTimezones: { type: Boolean },
530
525
  primaryColor: { type: String },
531
526
  secondaryColor: { type: String },
532
527
  isShadowRoot: { type: Boolean },
@@ -535,7 +530,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
535
530
  onLog: { type: Function },
536
531
  allowedPortalTypes: { type: Array },
537
532
  portalObject: { type: Object },
538
- customElementName: { type: String },
533
+ cssOverrides: { type: [String, Array] },
539
534
  branding: { type: Object }
540
535
  },
541
536
  emits: ["error"],
@@ -553,6 +548,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
553
548
  "experimental-features": __props.experimentalFeatures,
554
549
  "log-level": __props.logLevel,
555
550
  "on-log": __props.onLog,
551
+ "css-overrides": __props.cssOverrides,
556
552
  onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
557
553
  }, {
558
554
  default: withCtx(() => [
@@ -570,7 +566,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
570
566
  }, 16)
571
567
  ]),
572
568
  _: 1
573
- }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
569
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
574
570
  };
575
571
  }
576
572
  });
@@ -1 +1 @@
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
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js"),t=require("../../component-BOqPDAVk.js"),r=require("../../useLoadInitialData-DjwRHcAH.js"),n=require("../../usePaymentMethods-ryN_YohI.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},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},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,p=n.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:c}=r.useLoadInitialData(p.fetchInitial());return(r,n)=>{var a,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._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==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=o.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{paymentMethods:e.unref(p).items.value,isLoading:e.unref(c)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},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},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var i,p,c,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(i=r.branding)?void 0:i.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=r.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,"css-overrides":r.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,"payment-methods":t,"is-loading":n},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","css-overrides"])}}),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-DZJ0xukI.mjs";
3
- import { b as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
4
- import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
5
- import { u as usePaymentMethods } from "../../usePaymentMethods-BX2RnHZN.mjs";
2
+ import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs";
3
+ import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
+ import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
5
+ import { u as usePaymentMethods } from "../../usePaymentMethods-CRWbH48K.mjs";
6
6
  const DEFAULT_MAX_ITEMS = 3;
7
7
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8
8
  __name: "CustomerPaymentMethods.entry.view",
@@ -12,7 +12,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
12
12
  locale: { type: String },
13
13
  dateLocale: { type: String },
14
14
  messages: { type: Object },
15
- showTimezones: { type: Boolean },
16
15
  primaryColor: { type: String },
17
16
  secondaryColor: { type: String },
18
17
  isShadowRoot: { type: Boolean },
@@ -20,7 +19,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
20
19
  logLevel: { type: String },
21
20
  onLog: { type: Function },
22
21
  allowedPortalTypes: { type: Array },
23
- customElementName: { type: String },
22
+ cssOverrides: { type: [String, Array] },
24
23
  branding: { type: Object },
25
24
  configuration: { type: Object }
26
25
  },
@@ -46,6 +45,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
46
45
  "experimental-features": __props.experimentalFeatures,
47
46
  "log-level": __props.logLevel,
48
47
  "on-log": __props.onLog,
48
+ "css-overrides": __props.cssOverrides,
49
49
  onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
50
50
  }, {
51
51
  default: withCtx(() => [
@@ -55,7 +55,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
55
55
  })
56
56
  ]),
57
57
  _: 3
58
- }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
58
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
59
59
  };
60
60
  }
61
61
  });
@@ -67,7 +67,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  locale: { type: String },
68
68
  dateLocale: { type: String },
69
69
  messages: { type: Object },
70
- showTimezones: { type: Boolean },
71
70
  primaryColor: { type: String },
72
71
  secondaryColor: { type: String },
73
72
  isShadowRoot: { type: Boolean },
@@ -75,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
74
  logLevel: { type: String },
76
75
  onLog: { type: Function },
77
76
  allowedPortalTypes: { type: Array },
78
- customElementName: { type: String },
77
+ cssOverrides: { type: [String, Array] },
79
78
  branding: { type: Object },
80
79
  configuration: { type: Object }
81
80
  },
@@ -93,6 +92,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
92
  "experimental-features": __props.experimentalFeatures,
94
93
  "log-level": __props.logLevel,
95
94
  "on-log": __props.onLog,
95
+ "css-overrides": __props.cssOverrides,
96
96
  onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
97
97
  }, {
98
98
  default: withCtx(() => [
@@ -108,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
108
  }, 16)
109
109
  ]),
110
110
  _: 1
111
- }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
111
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
112
112
  };
113
113
  }
114
114
  });