@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.
- package/README.md +196 -44
- package/dist/ApiStatus-CyNDp_op.mjs +9 -0
- package/dist/ApiStatus-oqvUEWJx.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +9 -6
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
- package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
- package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
- package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +29 -37
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +20 -9
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
- package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
- package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +19 -12
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
- package/dist/PaymentIntegrationForm-D1ZaHCTm.js +1 -0
- package/dist/PaymentIntegrationForm-Dmmhqqn1.mjs +4 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CSPZRvMV.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Do2KIVKH.mjs +962 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +50 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
- 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
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +42 -36
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-Bwewy3HC.mjs +172 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/adyen-R6aSZ0Yf.js +1 -0
- package/dist/component-BOqPDAVk.js +1 -0
- package/dist/component-Djrf1L-Z.mjs +889 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +99 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +582 -5
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +126 -5
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +538 -5
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +127 -5
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +106 -5
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +131 -5
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +217 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +154 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +132 -5
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
- package/dist/components/WalletBalances/WalletBalances.es.js +120 -0
- package/dist/core/configuration.d.ts +2 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.es.js +1 -1
- package/dist/core/registry.d.ts +1 -1
- package/dist/core/types.d.ts +10 -2
- package/dist/customer-B31QzznT.mjs +32 -0
- package/dist/customer-hDxW1Dbp.js +1 -0
- package/dist/en-US-CgPY97Vq.js +1 -0
- package/dist/en-US-N3CUCsVy.mjs +179 -0
- package/dist/index-DIFK3mcJ.js +6 -0
- package/dist/index-DyvRdSR7.mjs +9673 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +43 -34
- package/dist/{invoices-C31Wz1Bu.mjs → invoices-DIYPN2j_.mjs} +2 -1
- package/dist/invoices-DzkA1jDc.js +1 -0
- package/dist/nl-NL-B8U9b85I.mjs +197 -0
- package/dist/nl-NL-qMRaTRrM.js +1 -0
- package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-67b3UlTZ.mjs} +2 -1
- package/dist/paymentMethods-C_sdTkSF.js +1 -0
- package/dist/{payments-C3LPk9k9.js → payments-DkHhTHto.js} +1 -1
- package/dist/{payments-NtWI8KlU.mjs → payments-Dq6R37Fz.mjs} +1 -1
- package/dist/registry-BkViv4tv.js +1 -0
- package/dist/registry-Df_26rJy.mjs +144 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +4935 -5
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +154 -5
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
- package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1066 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-ClGIr_aS.mjs} +2 -1
- package/dist/subscriptions-jelITJcX.js +1 -0
- package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
- package/dist/useActionDispatchProvider-rw9kWeE0.js +1 -0
- package/dist/useCustomer-Ba9WRtuT.mjs +25 -0
- package/dist/useCustomer-CUcaeQn_.js +1 -0
- package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +11 -10
- package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
- package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
- package/dist/useInvoiceData-D2jkdmlA.js +1 -0
- package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CFzAxyae.mjs} +34 -30
- package/dist/useInvoicesList-CaBCGs4h.js +1 -0
- package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
- package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
- package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
- package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
- package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
- package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-ryN_YohI.js} +1 -1
- package/dist/usePayments-Cw5PPEJa.mjs +36 -0
- package/dist/usePayments-DWXPGFvp.js +1 -0
- package/dist/usePortal-CxX4nrE4.js +1 -0
- package/dist/usePortal-cmE08vYs.mjs +12 -0
- package/dist/useService-Bb9r_sOQ.js +1 -0
- package/dist/useService-BsSEI8DZ.mjs +53 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
- package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
- package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
- package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
- package/dist/vendor-ui-5pJF5KBP.js +1 -0
- package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
- package/package.json +47 -20
- package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
- package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js +0 -1
- package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
- package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
- package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
- package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
- package/dist/ContentWithAsideLayout-CIVSoqFr.js +0 -1
- package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
- package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
- package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
- package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
- package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
- package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
- package/dist/InvoiceDetails.entry.ce-Cnpz8CLJ.mjs +0 -130
- package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js +0 -1
- package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
- package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
- package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
- package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs +0 -6568
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
- package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
- package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
- package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
- package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/auto-B_36W1Fc.js +0 -6
- package/dist/auto-BfMZdgp-.mjs +0 -14207
- package/dist/cloneDeep-Hs8Pp07F.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/component-BkmcE85U.mjs +0 -58654
- package/dist/component-Df5eNqYX.js +0 -1
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/invoices-8M_3ur_U.js +0 -1
- package/dist/paymentMethods-CzUqDlvc.js +0 -1
- package/dist/registry-By94DXE2.js +0 -1
- package/dist/registry-shRKDl3K.mjs +0 -127
- package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
- package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
- package/dist/subscriptions-CqK7t-fF.js +0 -1
- package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
- package/dist/useCustomer-BRY0tuBH.mjs +0 -45
- package/dist/useCustomer-Dp8sGHI0.js +0 -1
- package/dist/useCustomerPaymentMethodOptions-DYpMDnJR.js +0 -1
- package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
- package/dist/useInvoiceData-DImEH1ca.js +0 -1
- package/dist/useInvoicesList-BZQ9Y0qN.js +0 -1
- package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
- package/dist/useService-Dz13Nxbi.mjs +0 -272
- package/dist/useService-bNNi4GB8.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvimon/solvimon-web",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.10",
|
|
4
4
|
"description": "Solvimon's Front-end SDK provides you with the building blocks to create a billing self serve experience",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -9,31 +9,39 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"analyze": "vite-bundle-visualizer",
|
|
12
|
-
"prebuild": "npm run build:css && npm run type-check
|
|
12
|
+
"prebuild": "npm run build:css && npm run type-check",
|
|
13
13
|
"build": "vite build",
|
|
14
14
|
"build:css": "tailwindcss -i ./src/assets/index.css -o ./.sdk/tailwind.css",
|
|
15
15
|
"dev": "npm run watch",
|
|
16
|
+
"playground:dev": "npm --prefix playground run dev",
|
|
17
|
+
"playground:install": "npm --prefix playground install",
|
|
16
18
|
"lint": "eslint . --fix",
|
|
17
19
|
"lint:ci": "eslint . --ignore-pattern .eslintignore",
|
|
18
20
|
"test:unit": "vitest",
|
|
21
|
+
"test:coverage": "vitest --run --coverage",
|
|
19
22
|
"type-check:declarations": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --composite false",
|
|
20
23
|
"type-check": "vue-tsc --noEmit -p tsconfig.json --composite false",
|
|
21
|
-
"
|
|
24
|
+
"prewatch": "npm run build:css",
|
|
25
|
+
"watch": "run-p watch:js watch:css",
|
|
26
|
+
"watch:js": "vite build --watch",
|
|
22
27
|
"watch:css": "npm run build:css -- --watch",
|
|
23
28
|
"translations:extract": "formatjs extract 'src/**/*.{ts,vue}*' --ignore='**/*.d.ts' --out-file 'src/translations/source.json' --flatten --additional-function-names '$t'",
|
|
24
|
-
"translations:compile": "formatjs compile 'src/translations/source.json' --out-file 'src/translations/en-US.json'",
|
|
25
|
-
"translations:check": "
|
|
26
|
-
"
|
|
29
|
+
"translations:compile": "formatjs compile 'src/translations/source.json' --out-file 'src/translations/locales/en-US.json'",
|
|
30
|
+
"translations:check": "node ./scripts/check-translations.mjs",
|
|
31
|
+
"logs:list": "node ./scripts/list-log-codes.mjs",
|
|
32
|
+
"test:e2e:run-app": "node scripts/start-test-app.mjs",
|
|
27
33
|
"test:e2e": "playwright test",
|
|
28
34
|
"test:e2e:ui": "playwright test --ui",
|
|
29
35
|
"test:e2e:ci": "playwright test",
|
|
30
|
-
"test:ssl:generate": "
|
|
36
|
+
"test:ssl:generate": "node scripts/generate-ssl-cert.mjs",
|
|
31
37
|
"version:bump": "node scripts/bump-version.mjs",
|
|
32
38
|
"version:patch": "npm version patch --no-git-tag-version",
|
|
33
39
|
"version:minor": "npm version minor --no-git-tag-version",
|
|
34
40
|
"version:major": "npm version major --no-git-tag-version",
|
|
41
|
+
"changelog:check": "node scripts/check-changelog.mjs",
|
|
35
42
|
"publish:guard": "node scripts/publish-guard.mjs",
|
|
36
|
-
"prepublishOnly": "npm run publish:guard && npm run build"
|
|
43
|
+
"prepublishOnly": "npm run publish:guard && npm run changelog:check && npm run build",
|
|
44
|
+
"prepare": "husky"
|
|
37
45
|
},
|
|
38
46
|
"files": [
|
|
39
47
|
"dist"
|
|
@@ -65,6 +73,16 @@
|
|
|
65
73
|
"import": "./dist/screens/CustomerOverview/CustomerOverview.es.js",
|
|
66
74
|
"require": "./dist/screens/CustomerOverview/CustomerOverview.cjs.js"
|
|
67
75
|
},
|
|
76
|
+
"./screens/upgrade-subscription": {
|
|
77
|
+
"types": "./dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts",
|
|
78
|
+
"import": "./dist/screens/UpgradeSubscription/UpgradeSubscription.es.js",
|
|
79
|
+
"require": "./dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js"
|
|
80
|
+
},
|
|
81
|
+
"./screens/pay-invoice": {
|
|
82
|
+
"types": "./dist/screens/PayInvoice/PayInvoice.ce.d.ts",
|
|
83
|
+
"import": "./dist/screens/PayInvoice/PayInvoice.es.js",
|
|
84
|
+
"require": "./dist/screens/PayInvoice/PayInvoice.cjs.js"
|
|
85
|
+
},
|
|
68
86
|
"./components/subscriptions-list": {
|
|
69
87
|
"types": "./dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts",
|
|
70
88
|
"import": "./dist/components/SubscriptionsList/SubscriptionsList.es.js",
|
|
@@ -75,6 +93,11 @@
|
|
|
75
93
|
"import": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js",
|
|
76
94
|
"require": "./dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"
|
|
77
95
|
},
|
|
96
|
+
"./components/wallet-balances": {
|
|
97
|
+
"types": "./dist/components/WalletBalances/WalletBalances.ce.d.ts",
|
|
98
|
+
"import": "./dist/components/WalletBalances/WalletBalances.es.js",
|
|
99
|
+
"require": "./dist/components/WalletBalances/WalletBalances.cjs.js"
|
|
100
|
+
},
|
|
78
101
|
"./components/billing-information": {
|
|
79
102
|
"types": "./dist/components/BillingInformation/BillingInformation.ce.d.ts",
|
|
80
103
|
"import": "./dist/components/BillingInformation/BillingInformation.es.js",
|
|
@@ -116,30 +139,28 @@
|
|
|
116
139
|
"require": "./dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js"
|
|
117
140
|
}
|
|
118
141
|
},
|
|
142
|
+
"sideEffects": false,
|
|
143
|
+
"peerDependencies": {
|
|
144
|
+
"vue": ">=3.5.0"
|
|
145
|
+
},
|
|
119
146
|
"dependencies": {
|
|
120
147
|
"@adyen/adyen-web": "^6.14.0",
|
|
121
|
-
"
|
|
122
|
-
"@stripe/stripe-js": "^2.4.0",
|
|
123
|
-
"@vueuse/core": "^9.13.0",
|
|
124
|
-
"@vueuse/shared": "^10.7.2",
|
|
125
|
-
"jwt-decode": "^4.0.0",
|
|
126
|
-
"lodash-es": "^4.18.0",
|
|
127
|
-
"vite-plugin-string": "^1.2.3",
|
|
128
|
-
"vue": "^3.5.13"
|
|
148
|
+
"jwt-decode": "^4.0.0"
|
|
129
149
|
},
|
|
130
150
|
"devDependencies": {
|
|
151
|
+
"@commitlint/cli": "^20.5.3",
|
|
152
|
+
"@commitlint/config-conventional": "^20.5.3",
|
|
131
153
|
"@formatjs/cli": "^6.6.1",
|
|
132
154
|
"@playwright/test": "^1.57.0",
|
|
133
155
|
"@rushstack/eslint-patch": "^1.2.0",
|
|
134
|
-
"@solvimon/eslint-config": "^1.2.0",
|
|
135
|
-
"@solvimon/tailwind-config": "^1.0.0",
|
|
136
156
|
"@solvimon/solvimon-types": "^1.0.0",
|
|
137
|
-
"@solvimon/solvimon-ui": "^1.
|
|
157
|
+
"@solvimon/solvimon-ui": "^1.1.6",
|
|
138
158
|
"@tsconfig/node22": "^22.0.0",
|
|
139
159
|
"@types/jsdom": "^21.1.7",
|
|
140
160
|
"@types/node": "^22.10.2",
|
|
141
161
|
"@typescript-eslint/parser": "^8.46.2",
|
|
142
162
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
163
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
143
164
|
"@vitest/eslint-plugin": "1.1.20",
|
|
144
165
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
145
166
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
@@ -150,19 +171,25 @@
|
|
|
150
171
|
"autoprefixer": "^10.4.20",
|
|
151
172
|
"eslint": "^9.37.0",
|
|
152
173
|
"eslint-import-resolver-typescript": "^3.6.0",
|
|
174
|
+
"eslint-plugin-formatjs": "^6.4.7",
|
|
153
175
|
"eslint-plugin-import-x": "^4.16.1",
|
|
154
176
|
"eslint-plugin-no-relative-import-paths": "^1.5.2",
|
|
155
177
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
156
178
|
"eslint-plugin-vue": "^9.33.0",
|
|
157
179
|
"glob": "^11.0.1",
|
|
180
|
+
"husky": "^9.1.7",
|
|
158
181
|
"jsdom": "^26.0.0",
|
|
159
182
|
"npm-run-all2": "^7.0.2",
|
|
160
|
-
"postcss": "^8.5.
|
|
183
|
+
"postcss": "^8.5.10",
|
|
184
|
+
"prettier": "^3.8.3",
|
|
185
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
161
186
|
"tailwindcss": "^3.4.17",
|
|
187
|
+
"terser": "^5.46.2",
|
|
162
188
|
"tsx": "^4.19.3",
|
|
163
189
|
"typescript": "~5.6.3",
|
|
164
190
|
"vite": "^6.4.2",
|
|
165
191
|
"vite-plugin-dts": "^4.5.3",
|
|
192
|
+
"vite-plugin-string": "^1.2.3",
|
|
166
193
|
"vite-plugin-vue-devtools": "^7.7.2",
|
|
167
194
|
"vitest": "^3.1.1",
|
|
168
195
|
"vitest-localstorage-mock": "^0.1.2",
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$3 } from "./BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs";
|
|
3
|
-
import { u as useCustomer } from "./useCustomer-BRY0tuBH.mjs";
|
|
4
|
-
import { o as _sfc_main$2, p as defineCustomElement, n as getComponentName } from "./component-BkmcE85U.mjs";
|
|
5
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "BillingInformation.entry.view",
|
|
7
|
-
props: {
|
|
8
|
-
environment: { type: String },
|
|
9
|
-
locale: { type: String },
|
|
10
|
-
dateLocale: { type: String },
|
|
11
|
-
messages: { type: Object },
|
|
12
|
-
showTimezones: { type: Boolean },
|
|
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
|
-
customElementName: { type: String },
|
|
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
|
-
return (_ctx, _cache) => {
|
|
30
|
-
return renderSlot(_ctx.$slots, "default", { customer: unref(customer) });
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
|
-
__name: "BillingInformation.entry",
|
|
36
|
-
props: {
|
|
37
|
-
environment: { type: String },
|
|
38
|
-
locale: { type: String },
|
|
39
|
-
dateLocale: { type: String },
|
|
40
|
-
messages: { type: Object },
|
|
41
|
-
showTimezones: { type: Boolean },
|
|
42
|
-
primaryColor: { type: String },
|
|
43
|
-
secondaryColor: { type: String },
|
|
44
|
-
isShadowRoot: { type: Boolean },
|
|
45
|
-
experimentalFeatures: { type: Array },
|
|
46
|
-
logLevel: { type: String },
|
|
47
|
-
onLog: { type: Function },
|
|
48
|
-
allowedPortalTypes: { type: Array },
|
|
49
|
-
portalObject: { type: Object },
|
|
50
|
-
customElementName: { type: String },
|
|
51
|
-
branding: { type: Object },
|
|
52
|
-
configuration: { type: Object }
|
|
53
|
-
},
|
|
54
|
-
setup(__props) {
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
var _a, _b, _c, _d;
|
|
57
|
-
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
58
|
-
"custom-element-name": unref(COMPONENT_NAME),
|
|
59
|
-
environment: __props.environment,
|
|
60
|
-
locale: __props.locale,
|
|
61
|
-
"portal-object": __props.portalObject,
|
|
62
|
-
"allowed-portal-types": ["CUSTOMER"],
|
|
63
|
-
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
64
|
-
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
65
|
-
"experimental-features": __props.experimentalFeatures,
|
|
66
|
-
"log-level": __props.logLevel,
|
|
67
|
-
"on-log": __props.onLog,
|
|
68
|
-
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
69
|
-
}, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$props)), {
|
|
72
|
-
default: withCtx(({ customer }) => [
|
|
73
|
-
customer.customer.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
74
|
-
key: 0,
|
|
75
|
-
"is-loading": customer.get.isPending.value,
|
|
76
|
-
customer: customer.customer.value
|
|
77
|
-
}, null, 8, ["is-loading", "customer"])) : createCommentVNode("", true)
|
|
78
|
-
]),
|
|
79
|
-
_: 1
|
|
80
|
-
}, 16)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const SolvimonBillingInformation = defineCustomElement(_sfc_main);
|
|
88
|
-
const COMPONENT_NAME = getComponentName("billing-information");
|
|
89
|
-
const defineSolvimonBillingInformation = () => {
|
|
90
|
-
if (!customElements.get(COMPONENT_NAME)) {
|
|
91
|
-
customElements.define(COMPONENT_NAME, SolvimonBillingInformation);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
export {
|
|
95
|
-
COMPONENT_NAME as C,
|
|
96
|
-
SolvimonBillingInformation as S,
|
|
97
|
-
_sfc_main as _,
|
|
98
|
-
defineSolvimonBillingInformation as d
|
|
99
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),o=require("./BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js"),t=require("./useCustomer-Dp8sGHI0.js"),n=require("./component-Df5eNqYX.js"),r=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){const n=o.portalObject.customer_id,r=t.useCustomer({customerId:n});return(o,t)=>e.renderSlot(o.$slots,"default",{customer:e.unref(r)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(l,i)=>{var p,s,m,c;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(a),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(p=t.branding)?void 0:p.colors)?void 0:s.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:i[0]||(i[0]=e=>l.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(l.$props)),{default:e.withCtx(({customer:t})=>[t.customer.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"is-loading":t.get.isPending.value,customer:t.customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=n.defineCustomElement(l),a=n.getComponentName("billing-information");exports.COMPONENT_NAME=a,exports.SolvimonBillingInformation=i,exports._sfc_main=l,exports.defineSolvimonBillingInformation=()=>{customElements.get(a)||customElements.define(a,i)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-Df5eNqYX.js"),i=require("./useActionDispatchProvider-DsIljrhi.js"),o=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(o){const{$t:n}=t.useIntl(),{dispatchAction:r}=i.useActionDispatchProvider();return(i,a)=>o.isLoading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$14),{key:0,variant:"section",class:"min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$z),{key:1,customer:o.customer,"fallback-to-reference":!1},e.createSlots({_:2},[o.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",onClick:a[0]||(a[0]=t=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-Df5eNqYX.js"),a=require("./index-DRdBmZ2-.js"),o=require("./cloneDeep-Hs8Pp07F.js"),r=require("./useCustomer-Dp8sGHI0.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:r={},onSubmit:n}){const{form:s,validation:u,changes:c,hasChanges:m,updateInitialState:p,initialState:f}=(({initialState:a,validationRules:r={},nullifyEmptyValues:l=!1,mode:n="shallow"})=>{const i=e.ref(o.cloneDeep(a)),d=e.ref(o.cloneDeep(a)),s=t.useValidation(r,d),u=e.computed(()=>t.objectDiff({from:i.value,to:d.value,mode:n,nullifyEmptyValues:l})),c=e.computed(()=>Object.entries(u.value).length>0);return{form:d,validation:s,changes:u,hasChanges:c,reset:()=>{d.value=o.cloneDeep(a),s.value.$reset()},updateInitialState:e=>{d.value=o.cloneDeep(e),i.value=o.cloneDeep(e)},initialState:i}})({initialState:{...l,...r},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:s,isOrganization:t.isOrganization,validation:u,changes:c,hasChanges:m,updateInitialState:e=>{p(i(e))},submit:(e,t=s.value)=>n({customerId:e,payload:d(t)}),initialState:f}}const i=e=>{var a,o;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 r=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==r?void 0:r.country)??"",addressLine1:(null==r?void 0:r.line1)??"",addressLine2:(null==r?void 0:r.line2)??"",postalCode:(null==r?void 0:r.postal_code)??"",city:(null==r?void 0:r.city)??"",state:(null==r?void 0:r.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:e.organization.tax_id??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_id:e.companyVatNumber??"",registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),_=e.computed(()=>"ORGANIZATION"===i.value.type),v=e.computed(()=>!y.value),b=e.computed({get:()=>_.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,N,k,C,E,S,I,L,x,T,B;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$1$),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),v.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$20),{key:0,modelValue:b.value,"onUpdate:modelValue":n[2]||(n[2]=e=>b.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",u,[e.createVNode(e.unref(t._sfc_main$2),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).companyVatNumber,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).companyVatNumber=t),name:"vat_number",label:e.unref(r)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(N=a.apiError)?void 0:N.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).companyLegalName,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).companyLegalName=t),required:"",name:"legal_name",label:e.unref(r)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(k=a.apiError)?void 0:k.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).firstName,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).firstName=t),name:"first_name",label:e.unref(r)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(C=a.apiError)?void 0:C.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(E=a.apiError)?void 0:E.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(S=a.apiError)?void 0:S.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).addressLine2,"onUpdate:modelValue":n[8]||(n[8]=t=>e.unref(i).addressLine2=t),name:"address_line_2",placeholder:e.unref(r)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(I=a.apiError)?void 0:I.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",f,[e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).postalCode,"onUpdate:modelValue":n[9]||(n[9]=t=>e.unref(i).postalCode=t),name:"postal_code",placeholder:e.unref(r)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(L=a.apiError)?void 0:L.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).city,"onUpdate:modelValue":n[10]||(n[10]=t=>e.unref(i).city=t),name:"city",placeholder:e.unref(r)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(T=a.apiError)?void 0:T.state},null,8,["modelValue","placeholder","error"])])]),(null==(B=a.apiError)?void 0:B._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$2H),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},setup(a){const o=a.portalObject.customer_id,{customer:l,get:n,update:i}=r.useCustomer({customerId:o});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),_=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},emits:["error"],setup:a=>(o,r)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(b),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=a.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=a.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),v=t.defineCustomElement(_),b=t.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=v,exports._sfc_main=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,v)};
|