@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.8
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/dist/ApiStatus-CyNDp_op.mjs +9 -0
- package/dist/ApiStatus-oqvUEWJx.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs} +2 -4
- package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-BTdixy3L.mjs} +2 -11
- package/dist/ContentWithAsideLayout-oAYVrLvL.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs} +2 -5
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs} +1 -2
- package/dist/PaymentHistoryBlock-DHM-3fh-.js +1 -0
- package/dist/PaymentHistoryBlock-YzJ6bxKr.mjs +4 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs} +1 -5
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +1 -0
- package/dist/PaymentIntegrationForm-Cl5ua8v8.js +1 -0
- package/dist/PaymentIntegrationForm-ID4QnvA3.mjs +4 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs} +32 -189
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js +1 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs} +5 -31
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs} +4 -7
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +1 -0
- package/dist/adyenLoader-CEH4A2b2.js +1 -0
- package/dist/adyenLoader-gsbzSjYV.mjs +177 -0
- package/dist/component-C2Gc-wsE.js +1 -0
- package/dist/component-CM9g6tbD.mjs +804 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +3 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +9 -17
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -7
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +42 -2659
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -7
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -6
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -7
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -33
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +8 -4824
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -8
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +3 -7
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/{customer-CcQR-JIm.js → customer-C_Hz_npf.js} +1 -1
- package/dist/{customer-CJrpbGX4.mjs → customer-TIi7iZFw.mjs} +1 -1
- package/dist/en-US-CBoPxQwX.mjs +199 -0
- package/dist/en-US-DJq-9dD8.js +1 -0
- package/dist/index-CzL1ZcGi.mjs +85 -0
- package/dist/index-DRdBmZ2-.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4 -1
- package/dist/{invoices-CNK1Ushv.mjs → invoices-BuVOuTOm.mjs} +2 -15
- package/dist/invoices-DbvwXAsm.js +1 -0
- package/dist/nl-NL-BB7KbK-h.mjs +181 -0
- package/dist/nl-NL-CtU1Lg2F.js +1 -0
- package/dist/paymentMethods-B4AYGf0K.js +1 -0
- package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-Di32oJ39.mjs} +2 -2
- package/dist/{payments-CE9U7aKK.mjs → payments-C5fD1PXB.mjs} +1 -1
- package/dist/{payments-CLt0SExf.js → payments-DeutKq9x.js} +1 -1
- package/dist/{registry-B99ZnfEn.mjs → registry-BLwMl1bK.mjs} +6 -4
- package/dist/registry-CMSmkLcy.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +420 -2388
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -14
- 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 +456 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +79 -61
- package/dist/solvimon-web.css +1 -1
- package/dist/source-DKDKBlUm.mjs +179 -0
- package/dist/source-dkMNFWDc.js +1 -0
- package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-mOgjjzUi.mjs} +2 -2
- package/dist/subscriptions-wdMADcQZ.js +1 -0
- package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-B4gszz0Q.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-DfS2P0bd.js} +1 -1
- package/dist/{useCustomer-PthyTFLl.js → useCustomer-DanZzn-l.js} +1 -1
- package/dist/{useCustomer--jycAz--.mjs → useCustomer-cbhDyWJL.mjs} +2 -2
- package/dist/useIncrementalLoading-DFe5Yh8M.js +1 -0
- package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-RRicokf1.mjs} +3 -8
- package/dist/useInvoiceData-CxxHa5R2.js +1 -0
- package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-fS6G_244.mjs} +6 -12
- package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-BQQxcPdz.mjs} +23 -260
- package/dist/useInvoicesList-CtJqmblZ.js +1 -0
- package/dist/usePaymentMethodOptions-2MloZ9bY.mjs +26 -0
- package/dist/usePaymentMethodOptions-D01YWW3G.js +1 -0
- package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-Cm9WdSW0.js} +1 -1
- package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-DZvfWSlx.mjs} +2 -2
- package/dist/usePayments-B13S_yai.js +1 -0
- package/dist/usePayments-D4uGKBsV.mjs +36 -0
- package/dist/usePortal-DJDJNLbo.mjs +12 -0
- package/dist/usePortal-DWJEVkTj.js +1 -0
- package/dist/useService-9fCKPTmu.js +1 -0
- package/dist/useService-BuWWE5ND.mjs +68 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWalletBalanceItems-B53Gkjro.mjs +106 -0
- package/dist/useWalletBalanceItems-BMaVT4TW.js +1 -0
- package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
- package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
- package/dist/vendor-ui-BwxuPDg8.mjs +28598 -0
- package/dist/vendor-ui-Ce_Yp7xA.js +1 -0
- package/package.json +17 -10
- package/dist/Alert.vue.es-DMPvSykx.js +0 -1
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
- package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
- package/dist/Amount.vue.es-h8wulbBG.js +0 -1
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
- package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
- package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
- package/dist/Button.vue.es-BC4_TItq.js +0 -1
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
- package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
- package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
- package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
- package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
- package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
- package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
- package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
- package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
- package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
- package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
- package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
- package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
- package/dist/Section.vue.es-BuzTXRLP.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
- package/dist/_flatRest.es-dFffnTpX.js +0 -1
- package/dist/api.es-B4qAAJKr.js +0 -1
- package/dist/api.es-UkfpLiLL.mjs +0 -83
- package/dist/cloneDeep-Hs8Pp07F.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/cn.es-C7xoIs3C.js +0 -1
- package/dist/cn.es-tfxVlz02.mjs +0 -3191
- package/dist/component-ZRZIt3ZW.js +0 -1
- package/dist/component-dpA83LIN.mjs +0 -6569
- package/dist/countryData.es--zJAd6LA.mjs +0 -252
- package/dist/countryData.es-D3MFzU92.js +0 -1
- package/dist/customer.es-D42Md24r.js +0 -1
- package/dist/customer.es-LIW2YmLL.mjs +0 -30
- package/dist/formatting.es-9hM8aHSg.js +0 -1
- package/dist/formatting.es-D5H_ySFv.mjs +0 -68
- package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CI71bVGE.mjs +0 -2521
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/index-WLSPwi90.js +0 -1
- package/dist/index.es-BBJF2O2l.js +0 -1
- package/dist/index.es-LCAKs4tH.mjs +0 -438
- package/dist/invoices-3kVHsAXr.js +0 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
- package/dist/isEmpty.es-Dycf-CD_.js +0 -1
- package/dist/paymentMethods-DZRf0WRl.js +0 -1
- package/dist/pick.es-BgDAfhAl.js +0 -1
- package/dist/pick.es-DdVOyp0Q.mjs +0 -45
- package/dist/registry-ClZ43bQn.js +0 -1
- package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
- package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
- package/dist/subscriptions-CS8HTxzC.js +0 -1
- package/dist/typeGuards.es-C4nR5FkL.js +0 -1
- package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
- package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
- package/dist/useInvoiceData-DvQO_nKz.js +0 -1
- package/dist/useInvoicesList-CHkwSNO9.js +0 -1
- package/dist/useService-B67YWAcN.js +0 -1
- package/dist/useService-DG_zedHV.mjs +0 -282
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
- package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
|
@@ -1,2039 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as _sfc_main$
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { c as
|
|
11
|
-
import {
|
|
12
|
-
import { c as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { _ as _sfc_main$Q } from "../../Section.vue.es-3-H1pUTB.mjs";
|
|
20
|
-
import { g as getCountryNameByCode } from "../../getCountryNameByCode.es-ymC9R46j.mjs";
|
|
21
|
-
import { _ as _sfc_main$K } from "../../Alert.vue.es-DsJ1ckRU.mjs";
|
|
22
|
-
import { c as createCustomerService } from "../../customer-CJrpbGX4.mjs";
|
|
23
|
-
import { _ as _sfc_main$D, T as TooltipContent, a as _sfc_main$E } from "../../TooltipParagraph.vue.es-DVJLF9Kv.mjs";
|
|
24
|
-
import { _ as _sfc_main$B, b as _export_sfc, u as useFloating, a as autoUpdate, o as offset, f as flip } from "../../Chip.vue.es-DcW2CjUA.mjs";
|
|
25
|
-
import { g as getComposedString, _ as _sfc_main$V } from "../../Avatar.vue.es-Ba8ZGfm4.mjs";
|
|
26
|
-
import { _ as _sfc_main$F } from "../../Amount.vue.es-C6JE5rL8.mjs";
|
|
27
|
-
import { i as isEmpty$1 } from "../../isEmpty.es-Bp1SbWFu.mjs";
|
|
28
|
-
import { _ as _sfc_main$H } from "../../Divider.vue.es-wKkIVBgb.mjs";
|
|
29
|
-
import { a as useVModel, d as useEventListener, c as useElementSize } from "../../index.es-LCAKs4tH.mjs";
|
|
30
|
-
import { u as uniqueId$1, _ as _sfc_main$J, i as isEqual, a as _sfc_main$O } from "../../IconButton.vue.es-DNCwwH_j.mjs";
|
|
31
|
-
import { a as useBreakpoints, b as breakpointsTailwind } from "../../index-D3v7hAtc.mjs";
|
|
32
|
-
import { _ as _sfc_main$X } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
33
|
-
import { _ as _sfc_main$Y } from "../../DividerText.vue.es-B7oa5Xpn.mjs";
|
|
34
|
-
import { c as createPaymentsService } from "../../payments-CE9U7aKK.mjs";
|
|
35
|
-
import { _ as _sfc_main$L } from "../../FormMessage.vue.es-DFQXxiSC.mjs";
|
|
36
|
-
const EU_COUNTRIES = {
|
|
37
|
-
AT: "Austria",
|
|
38
|
-
BE: "Belgium",
|
|
39
|
-
BG: "Bulgaria",
|
|
40
|
-
CY: "Cyprus",
|
|
41
|
-
CZ: "Czech Republic",
|
|
42
|
-
DE: "Germany",
|
|
43
|
-
DK: "Denmark",
|
|
44
|
-
EE: "Estonia",
|
|
45
|
-
ES: "Spain",
|
|
46
|
-
FI: "Finland",
|
|
47
|
-
FR: "France",
|
|
48
|
-
GR: "Greece",
|
|
49
|
-
HR: "Croatia",
|
|
50
|
-
HU: "Hungary",
|
|
51
|
-
IE: "Ireland",
|
|
52
|
-
IT: "Italy",
|
|
53
|
-
LT: "Lithuania",
|
|
54
|
-
LU: "Luxembourg",
|
|
55
|
-
LV: "Latvia",
|
|
56
|
-
MT: "Malta",
|
|
57
|
-
NL: "Netherlands",
|
|
58
|
-
PL: "Poland",
|
|
59
|
-
PT: "Portugal",
|
|
60
|
-
RO: "Romania",
|
|
61
|
-
SE: "Sweden",
|
|
62
|
-
SI: "Slovenia",
|
|
63
|
-
SK: "Slovakia"
|
|
64
|
-
};
|
|
65
|
-
function isEUCountry(countryCode) {
|
|
66
|
-
return Object.keys(EU_COUNTRIES).includes(countryCode);
|
|
67
|
-
}
|
|
68
|
-
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
69
|
-
__name: "DeltaChip",
|
|
70
|
-
props: {
|
|
71
|
-
oldValue: {},
|
|
72
|
-
newValue: {},
|
|
73
|
-
color: { default: "dark" },
|
|
74
|
-
content: {},
|
|
75
|
-
dark: { type: Boolean },
|
|
76
|
-
removable: { type: Boolean },
|
|
77
|
-
size: {},
|
|
78
|
-
variant: {},
|
|
79
|
-
textClass: {},
|
|
80
|
-
tag: {},
|
|
81
|
-
hasChipBefore: { type: Boolean },
|
|
82
|
-
hasChipAfter: { type: Boolean }
|
|
83
|
-
},
|
|
84
|
-
setup(__props) {
|
|
85
|
-
const chipProps = createPropsRestProxy(__props, ["oldValue", "newValue", "color"]);
|
|
86
|
-
const delta = computed(() => {
|
|
87
|
-
const calculatedDelta = __props.newValue - __props.oldValue;
|
|
88
|
-
return `${calculatedDelta >= 0 ? "+" : ""}${calculatedDelta}`;
|
|
89
|
-
});
|
|
90
|
-
return (_ctx, _cache) => {
|
|
91
|
-
return openBlock(), createBlock(unref(_sfc_main$B), mergeProps(chipProps, {
|
|
92
|
-
color: __props.color,
|
|
93
|
-
class: "pointer-events-none select-none"
|
|
94
|
-
}), {
|
|
95
|
-
default: withCtx(() => [
|
|
96
|
-
createTextVNode(toDisplayString(delta.value), 1)
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}, 16, ["color"]);
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
104
|
-
__name: "invoicePreviewRow",
|
|
105
|
-
props: {
|
|
106
|
-
weight: { default: "normal" },
|
|
107
|
-
variant: { default: "body-xs" },
|
|
108
|
-
noSpacing: { type: Boolean, default: false }
|
|
109
|
-
},
|
|
110
|
-
setup(__props) {
|
|
111
|
-
return (_ctx, _cache) => {
|
|
112
|
-
return openBlock(), createElementBlock("div", {
|
|
113
|
-
class: normalizeClass(["flex flex-row gap-2", { "py-1.5": !__props.noSpacing }])
|
|
114
|
-
}, [
|
|
115
|
-
createVNode(_sfc_main$C, {
|
|
116
|
-
tag: "span",
|
|
117
|
-
variant: __props.variant,
|
|
118
|
-
class: "grow",
|
|
119
|
-
weight: __props.weight
|
|
120
|
-
}, {
|
|
121
|
-
default: withCtx(() => [
|
|
122
|
-
renderSlot(_ctx.$slots, "label")
|
|
123
|
-
]),
|
|
124
|
-
_: 3
|
|
125
|
-
}, 8, ["variant", "weight"]),
|
|
126
|
-
createVNode(_sfc_main$C, {
|
|
127
|
-
tag: "span",
|
|
128
|
-
variant: __props.variant,
|
|
129
|
-
weight: __props.weight
|
|
130
|
-
}, {
|
|
131
|
-
default: withCtx(() => [
|
|
132
|
-
renderSlot(_ctx.$slots, "value")
|
|
133
|
-
]),
|
|
134
|
-
_: 3
|
|
135
|
-
}, 8, ["variant", "weight"])
|
|
136
|
-
], 2);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
141
|
-
__name: "Skeleton",
|
|
142
|
-
props: {
|
|
143
|
-
widthClass: { default: "w-10" },
|
|
144
|
-
heightClass: { default: "h-3" },
|
|
145
|
-
shade: { default: "default" }
|
|
146
|
-
},
|
|
147
|
-
setup(__props) {
|
|
148
|
-
return (_ctx, _cache) => {
|
|
149
|
-
return openBlock(), createElementBlock("div", {
|
|
150
|
-
class: normalizeClass(["rounded", [
|
|
151
|
-
__props.widthClass,
|
|
152
|
-
__props.heightClass,
|
|
153
|
-
{
|
|
154
|
-
"bg-gray-50/50": __props.shade === "default",
|
|
155
|
-
"bg-gray-100/50": __props.shade === "dark",
|
|
156
|
-
"bg-gray-200/50": __props.shade === "darker",
|
|
157
|
-
"bg-gray-400/50": __props.shade === "darkest"
|
|
158
|
-
}
|
|
159
|
-
]])
|
|
160
|
-
}, null, 2);
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
165
|
-
__name: "InvoicePreviewNoTaxesSkeleton",
|
|
166
|
-
props: {
|
|
167
|
-
widthClass: { default: "w-12" },
|
|
168
|
-
heightClass: { default: "h-5" }
|
|
169
|
-
},
|
|
170
|
-
setup(__props) {
|
|
171
|
-
const { $t } = useIntl();
|
|
172
|
-
return (_ctx, _cache) => {
|
|
173
|
-
return openBlock(), createBlock(_sfc_main$D, { "is-dark-mode": "" }, {
|
|
174
|
-
tooltip: withCtx(() => [
|
|
175
|
-
createVNode(TooltipContent, null, {
|
|
176
|
-
default: withCtx(() => [
|
|
177
|
-
createVNode(_sfc_main$E, null, {
|
|
178
|
-
default: withCtx(() => [
|
|
179
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
180
|
-
defaultMessage: "Will be determined by billing information",
|
|
181
|
-
description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
|
|
182
|
-
id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
|
|
183
|
-
})), 1)
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
})
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
]),
|
|
191
|
-
default: withCtx(() => [
|
|
192
|
-
createVNode(_sfc_main$y, {
|
|
193
|
-
"width-class": __props.widthClass,
|
|
194
|
-
"height-class": __props.heightClass,
|
|
195
|
-
shade: "darker"
|
|
196
|
-
}, null, 8, ["width-class", "height-class"])
|
|
197
|
-
]),
|
|
198
|
-
_: 1
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
204
|
-
__name: "InvoicePreviewGroups",
|
|
205
|
-
props: {
|
|
206
|
-
invoice: {},
|
|
207
|
-
wrapperComponent: {}
|
|
208
|
-
},
|
|
209
|
-
setup(__props) {
|
|
210
|
-
const getInvoiceGroupsByType = (invoicePeriod) => {
|
|
211
|
-
return invoicePeriod.groups.reduce(
|
|
212
|
-
(acc, invoiceGroup) => {
|
|
213
|
-
if (!(invoiceGroup.type in acc)) {
|
|
214
|
-
return { ...acc, [invoiceGroup.type]: [invoiceGroup] };
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
...acc,
|
|
218
|
-
[invoiceGroup.type]: [...acc[invoiceGroup.type], invoiceGroup]
|
|
219
|
-
};
|
|
220
|
-
},
|
|
221
|
-
{}
|
|
222
|
-
);
|
|
223
|
-
};
|
|
224
|
-
const getPricingName = (group) => {
|
|
225
|
-
var _a, _b, _c;
|
|
226
|
-
if (((_a = group.pricing) == null ? void 0 : _a.name) && !isEmpty$1((_b = group.pricing) == null ? void 0 : _b.name)) {
|
|
227
|
-
return group.pricing.name;
|
|
228
|
-
}
|
|
229
|
-
return getComposedString(((_c = group.products) == null ? void 0 : _c.map((item) => item.name)) ?? []);
|
|
230
|
-
};
|
|
231
|
-
return (_ctx, _cache) => {
|
|
232
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoice.periods, (invoicePeriod, invoicePeriodIndex) => {
|
|
233
|
-
return openBlock(), createElementBlock(Fragment, { key: invoicePeriodIndex }, [
|
|
234
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(getInvoiceGroupsByType(invoicePeriod)), ([groupType, groups]) => {
|
|
235
|
-
return openBlock(), createElementBlock(Fragment, { key: groupType }, [
|
|
236
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(groups, (group, groupIndex) => {
|
|
237
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.wrapperComponent ?? "div"), { key: groupIndex }, {
|
|
238
|
-
default: withCtx(() => [
|
|
239
|
-
createVNode(_sfc_main$z, {
|
|
240
|
-
"no-spacing": __props.wrapperComponent !== void 0
|
|
241
|
-
}, {
|
|
242
|
-
label: withCtx(() => [
|
|
243
|
-
createTextVNode(toDisplayString(getPricingName(group)), 1)
|
|
244
|
-
]),
|
|
245
|
-
value: withCtx(() => [
|
|
246
|
-
createVNode(_sfc_main$F, {
|
|
247
|
-
value: group.amount_excluding_tax
|
|
248
|
-
}, null, 8, ["value"])
|
|
249
|
-
]),
|
|
250
|
-
_: 2
|
|
251
|
-
}, 1032, ["no-spacing"])
|
|
252
|
-
]),
|
|
253
|
-
_: 2
|
|
254
|
-
}, 1024);
|
|
255
|
-
}), 128))
|
|
256
|
-
], 64);
|
|
257
|
-
}), 128))
|
|
258
|
-
], 64);
|
|
259
|
-
}), 128);
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
const _hoisted_1$s = { class: "flex flex-col" };
|
|
264
|
-
const _hoisted_2$h = { key: 0 };
|
|
265
|
-
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
266
|
-
__name: "InvoicePreview",
|
|
267
|
-
props: {
|
|
268
|
-
invoice: {},
|
|
269
|
-
trialInvoice: {},
|
|
270
|
-
isCustomerFacing: { type: Boolean, default: false },
|
|
271
|
-
variant: { default: "default" },
|
|
272
|
-
isPaid: { type: Boolean, default: false },
|
|
273
|
-
collapsible: { default: void 0 },
|
|
274
|
-
isPreviewWithoutTaxes: { type: Boolean }
|
|
275
|
-
},
|
|
276
|
-
setup(__props) {
|
|
277
|
-
const props = __props;
|
|
278
|
-
const { $t } = useIntl();
|
|
279
|
-
const collapsed = ref(props.collapsible !== void 0 ? props.collapsible !== "expanded" : false);
|
|
280
|
-
const isCollapsible = computed(() => props.collapsible !== void 0);
|
|
281
|
-
const hasTrialPeriod = computed(() => !!props.trialInvoice);
|
|
282
|
-
const dueTodayAmount = computed(
|
|
283
|
-
() => props.trialInvoice ? props.trialInvoice.tax_summary.total_amount : props.invoice.tax_summary.total_amount
|
|
284
|
-
);
|
|
285
|
-
const handleToggle = () => {
|
|
286
|
-
if (isCollapsible.value) {
|
|
287
|
-
collapsed.value = !collapsed.value;
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
return (_ctx, _cache) => {
|
|
291
|
-
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
292
|
-
createVNode(_sfc_main$G, null, {
|
|
293
|
-
default: withCtx(() => [
|
|
294
|
-
!collapsed.value ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
|
|
295
|
-
hasTrialPeriod.value ? (openBlock(), createBlock(_sfc_main$C, {
|
|
296
|
-
key: 0,
|
|
297
|
-
variant: "caps-heading"
|
|
298
|
-
}, {
|
|
299
|
-
default: withCtx(() => [
|
|
300
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
301
|
-
id: "invoice_preview.after_trial_heading",
|
|
302
|
-
defaultMessage: "After trial",
|
|
303
|
-
description: "After trial heading for the invoice preview"
|
|
304
|
-
})), 1)
|
|
305
|
-
]),
|
|
306
|
-
_: 1
|
|
307
|
-
})) : createCommentVNode("", true),
|
|
308
|
-
__props.variant !== "without-products" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
309
|
-
createVNode(_sfc_main$w, { invoice: __props.invoice }, null, 8, ["invoice"]),
|
|
310
|
-
createVNode(_sfc_main$H, { spacing: "xxs" })
|
|
311
|
-
], 64)) : createCommentVNode("", true),
|
|
312
|
-
createVNode(_sfc_main$z, null, {
|
|
313
|
-
label: withCtx(() => [
|
|
314
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
315
|
-
id: "invoice_preview.total_excluding_taxes_heading",
|
|
316
|
-
defaultMessage: "Total excluding taxes",
|
|
317
|
-
description: "Total excluding taxes heading for the invoice preview"
|
|
318
|
-
})), 1)
|
|
319
|
-
]),
|
|
320
|
-
value: withCtx(() => [
|
|
321
|
-
createVNode(_sfc_main$F, {
|
|
322
|
-
value: __props.invoice.tax_summary.base_amount
|
|
323
|
-
}, null, 8, ["value"])
|
|
324
|
-
]),
|
|
325
|
-
_: 1
|
|
326
|
-
}),
|
|
327
|
-
createVNode(_sfc_main$z, null, {
|
|
328
|
-
label: withCtx(() => [
|
|
329
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
330
|
-
id: "invoice_preview.taxes_heading",
|
|
331
|
-
defaultMessage: "Taxes",
|
|
332
|
-
description: "Taxes heading for the invoice preview"
|
|
333
|
-
})), 1)
|
|
334
|
-
]),
|
|
335
|
-
value: withCtx(() => [
|
|
336
|
-
__props.isPreviewWithoutTaxes ? (openBlock(), createBlock(_sfc_main$x, {
|
|
337
|
-
key: 0,
|
|
338
|
-
"width-class": "w-10",
|
|
339
|
-
"height-class": "h-4"
|
|
340
|
-
})) : (openBlock(), createBlock(_sfc_main$F, {
|
|
341
|
-
key: 1,
|
|
342
|
-
value: __props.invoice.tax_summary.tax_amount
|
|
343
|
-
}, null, 8, ["value"]))
|
|
344
|
-
]),
|
|
345
|
-
_: 1
|
|
346
|
-
}),
|
|
347
|
-
hasTrialPeriod.value ? (openBlock(), createBlock(_sfc_main$z, { key: 2 }, {
|
|
348
|
-
label: withCtx(() => [
|
|
349
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
350
|
-
id: "invoice_preview.total_including_taxes_heading",
|
|
351
|
-
defaultMessage: "Total including taxes",
|
|
352
|
-
description: "Total including taxes heading for the invoice preview"
|
|
353
|
-
})), 1)
|
|
354
|
-
]),
|
|
355
|
-
value: withCtx(() => [
|
|
356
|
-
__props.isPreviewWithoutTaxes ? (openBlock(), createBlock(_sfc_main$x, {
|
|
357
|
-
key: 0,
|
|
358
|
-
"width-class": "w-10",
|
|
359
|
-
"height-class": "h-4"
|
|
360
|
-
})) : (openBlock(), createBlock(_sfc_main$F, {
|
|
361
|
-
key: 1,
|
|
362
|
-
value: __props.invoice.tax_summary.total_amount
|
|
363
|
-
}, null, 8, ["value"]))
|
|
364
|
-
]),
|
|
365
|
-
_: 1
|
|
366
|
-
})) : createCommentVNode("", true),
|
|
367
|
-
createVNode(_sfc_main$H, { spacing: "xxs" })
|
|
368
|
-
])) : createCommentVNode("", true)
|
|
369
|
-
]),
|
|
370
|
-
_: 1
|
|
371
|
-
}),
|
|
372
|
-
(openBlock(), createBlock(resolveDynamicComponent(isCollapsible.value ? "button" : "div"), {
|
|
373
|
-
class: normalizeClass({ "hover:cursor-pointer text-left": isCollapsible.value }),
|
|
374
|
-
onClick: handleToggle
|
|
375
|
-
}, {
|
|
376
|
-
default: withCtx(() => [
|
|
377
|
-
createVNode(_sfc_main$z, {
|
|
378
|
-
weight: "semibold",
|
|
379
|
-
variant: "body-sm"
|
|
380
|
-
}, {
|
|
381
|
-
label: withCtx(() => [
|
|
382
|
-
createTextVNode(toDisplayString(__props.isPaid ? unref($t)({
|
|
383
|
-
id: "invoice_preview.total_paid_heading",
|
|
384
|
-
defaultMessage: "Total paid",
|
|
385
|
-
description: "Total paid heading for the invoice preview"
|
|
386
|
-
}) : unref($t)({
|
|
387
|
-
id: "invoice_preview.total_due_today_heading",
|
|
388
|
-
defaultMessage: "Total due today",
|
|
389
|
-
description: "Total due today heading for the invoice preview"
|
|
390
|
-
})) + " ", 1),
|
|
391
|
-
isCollapsible.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
392
|
-
key: 0,
|
|
393
|
-
size: "xs",
|
|
394
|
-
icon: "keyboard_arrow_down",
|
|
395
|
-
class: normalizeClass(["transition ease-in-out text-gray-400", { "rotate-0": collapsed.value, "rotate-180": !collapsed.value }])
|
|
396
|
-
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
397
|
-
]),
|
|
398
|
-
value: withCtx(() => [
|
|
399
|
-
__props.isPreviewWithoutTaxes && (!hasTrialPeriod.value || hasTrialPeriod.value && dueTodayAmount.value.quantity !== "0.00") ? (openBlock(), createBlock(_sfc_main$x, { key: 0 })) : (openBlock(), createBlock(_sfc_main$F, {
|
|
400
|
-
key: 1,
|
|
401
|
-
value: dueTodayAmount.value
|
|
402
|
-
}, null, 8, ["value"]))
|
|
403
|
-
]),
|
|
404
|
-
_: 1
|
|
405
|
-
})
|
|
406
|
-
]),
|
|
407
|
-
_: 1
|
|
408
|
-
}, 8, ["class"]))
|
|
409
|
-
]);
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
const _hoisted_1$r = ["disabled"];
|
|
414
|
-
const _hoisted_2$g = ["aria-label"];
|
|
415
|
-
const _hoisted_3$9 = ["id", "disabled", "value", "aria-checked", "aria-describedby"];
|
|
416
|
-
const _hoisted_4$7 = ["tabindex", "data-testid", "for", "aria-label", "onKeydown"];
|
|
417
|
-
const _hoisted_5$5 = { class: "text-xs" };
|
|
418
|
-
const _hoisted_6$4 = {
|
|
419
|
-
key: 1,
|
|
420
|
-
class: "mt-2 text-sm text-gray-500"
|
|
421
|
-
};
|
|
422
|
-
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
423
|
-
__name: "RadioGroupExtended",
|
|
424
|
-
props: {
|
|
425
|
-
options: {},
|
|
426
|
-
direction: { default: "row" },
|
|
427
|
-
showRadio: { type: Boolean, default: true },
|
|
428
|
-
disabled: { type: Boolean },
|
|
429
|
-
label: {},
|
|
430
|
-
modelValue: { type: [String, Boolean] },
|
|
431
|
-
name: {},
|
|
432
|
-
required: { type: Boolean },
|
|
433
|
-
rootClass: {},
|
|
434
|
-
error: {},
|
|
435
|
-
variant: {}
|
|
436
|
-
},
|
|
437
|
-
emits: ["update:modelValue"],
|
|
438
|
-
setup(__props, { emit: __emit }) {
|
|
439
|
-
const props = __props;
|
|
440
|
-
const emit = __emit;
|
|
441
|
-
const model = useVModel(props, "modelValue", emit);
|
|
442
|
-
const idPrefix = uniqueId$1(props.name ? `radio_${props.name}_` : "radio_");
|
|
443
|
-
const handleKeyDown = (event, optionValue) => {
|
|
444
|
-
if (props.disabled) {
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
448
|
-
event.preventDefault();
|
|
449
|
-
event.stopPropagation();
|
|
450
|
-
model.value = optionValue;
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
return (_ctx, _cache) => {
|
|
454
|
-
return openBlock(), createElementBlock("fieldset", {
|
|
455
|
-
class: normalizeClass(__props.rootClass),
|
|
456
|
-
disabled: __props.disabled
|
|
457
|
-
}, [
|
|
458
|
-
__props.label ? (openBlock(), createBlock(unref(_sfc_main$J), {
|
|
459
|
-
key: 0,
|
|
460
|
-
tag: "legend",
|
|
461
|
-
required: __props.required
|
|
462
|
-
}, {
|
|
463
|
-
default: withCtx(() => [
|
|
464
|
-
createTextVNode(toDisplayString(__props.label), 1)
|
|
465
|
-
]),
|
|
466
|
-
_: 1
|
|
467
|
-
}, 8, ["required"])) : createCommentVNode("", true),
|
|
468
|
-
createElementVNode("div", {
|
|
469
|
-
role: "group",
|
|
470
|
-
"aria-label": __props.label,
|
|
471
|
-
class: normalizeClass([[__props.direction === "column" ? "flex-col" : "flex-row"], "rounded flex gap-1"])
|
|
472
|
-
}, [
|
|
473
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
474
|
-
return openBlock(), createElementBlock("div", {
|
|
475
|
-
key: option.value.toString(),
|
|
476
|
-
class: "flex-1"
|
|
477
|
-
}, [
|
|
478
|
-
withDirectives(createElementVNode("input", mergeProps({ ref_for: true }, _ctx.$attrs, {
|
|
479
|
-
id: `${unref(idPrefix)}${option.value}`,
|
|
480
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
|
|
481
|
-
disabled: __props.disabled,
|
|
482
|
-
value: option.value,
|
|
483
|
-
type: "radio",
|
|
484
|
-
"aria-checked": unref(model) === option.value,
|
|
485
|
-
"aria-describedby": option.warning ? `${unref(idPrefix)}${option.value}-warning` : void 0,
|
|
486
|
-
tabindex: "-1",
|
|
487
|
-
class: "sr-only"
|
|
488
|
-
}), null, 16, _hoisted_3$9), [
|
|
489
|
-
[vModelRadio, unref(model)]
|
|
490
|
-
]),
|
|
491
|
-
createElementVNode("label", {
|
|
492
|
-
tabindex: __props.disabled ? void 0 : 0,
|
|
493
|
-
"data-testid": `radio-group-item-${option.value}`,
|
|
494
|
-
for: `${unref(idPrefix)}${option.value}`,
|
|
495
|
-
"aria-label": option.label + (option.description ? `: ${option.description}` : ""),
|
|
496
|
-
class: normalizeClass(["relative label px-4 py-3 h-full flex gap-3 border bg-gray-50/50 border-gray-100 rounded outline-none hover:bg-primary-50/50 focus-visible:bg-primary-50 focus-visible:border-primary-600 focus-visible:ring-1 focus-visible:ring-primary-600 focus:bg-primary-50", {
|
|
497
|
-
"cursor-pointer": !__props.disabled,
|
|
498
|
-
"cursor-not-allowed": __props.disabled,
|
|
499
|
-
"bg-white border border-primary-600 ring-1 ring-primary-600": unref(model) === option.value && !__props.disabled,
|
|
500
|
-
"opacity-60": __props.disabled
|
|
501
|
-
}]),
|
|
502
|
-
onKeydown: ($event) => handleKeyDown($event, option.value)
|
|
503
|
-
}, [
|
|
504
|
-
__props.showRadio ? (openBlock(), createElementBlock("div", {
|
|
505
|
-
key: 0,
|
|
506
|
-
class: normalizeClass(["material-symbols-outlined leading-4 h-4 w-4 min-w-4 inline-block mt-px rounded-full", {
|
|
507
|
-
"border-4 border-primary-800": unref(model) === option.value,
|
|
508
|
-
"border border-gray-300": unref(model) !== option.value
|
|
509
|
-
}])
|
|
510
|
-
}, null, 2)) : createCommentVNode("", true),
|
|
511
|
-
createElementVNode("div", {
|
|
512
|
-
class: normalizeClass(["flex flex-col", { "opacity-50": __props.disabled }])
|
|
513
|
-
}, [
|
|
514
|
-
createVNode(unref(_sfc_main$C), {
|
|
515
|
-
tag: "div",
|
|
516
|
-
weight: "semibold",
|
|
517
|
-
"no-spacing": "",
|
|
518
|
-
variant: "body-sm",
|
|
519
|
-
class: "flex justify-between align-center"
|
|
520
|
-
}, {
|
|
521
|
-
default: withCtx(() => [
|
|
522
|
-
createTextVNode(toDisplayString(option.label), 1)
|
|
523
|
-
]),
|
|
524
|
-
_: 2
|
|
525
|
-
}, 1024),
|
|
526
|
-
option.description ? (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
527
|
-
key: 0,
|
|
528
|
-
tag: "div",
|
|
529
|
-
variant: "body-xs",
|
|
530
|
-
"no-spacing": "",
|
|
531
|
-
shade: "lighter"
|
|
532
|
-
}, {
|
|
533
|
-
default: withCtx(() => [
|
|
534
|
-
createTextVNode(toDisplayString(option.description), 1)
|
|
535
|
-
]),
|
|
536
|
-
_: 2
|
|
537
|
-
}, 1024)) : createCommentVNode("", true),
|
|
538
|
-
!option.description ? renderSlot(_ctx.$slots, "description", {
|
|
539
|
-
key: 1,
|
|
540
|
-
optionValue: option.value
|
|
541
|
-
}) : createCommentVNode("", true)
|
|
542
|
-
], 2)
|
|
543
|
-
], 42, _hoisted_4$7),
|
|
544
|
-
option.warning ? (openBlock(), createBlock(unref(_sfc_main$K), {
|
|
545
|
-
key: 0,
|
|
546
|
-
id: `${unref(idPrefix)}${option.value}-warning`,
|
|
547
|
-
class: "mt-1",
|
|
548
|
-
type: unref(model) === option.value ? "danger" : "dark",
|
|
549
|
-
role: "alert"
|
|
550
|
-
}, {
|
|
551
|
-
default: withCtx(() => [
|
|
552
|
-
createElementVNode("span", _hoisted_5$5, toDisplayString(option.warning), 1)
|
|
553
|
-
]),
|
|
554
|
-
_: 2
|
|
555
|
-
}, 1032, ["id", "type"])) : createCommentVNode("", true)
|
|
556
|
-
]);
|
|
557
|
-
}), 128))
|
|
558
|
-
], 10, _hoisted_2$g),
|
|
559
|
-
__props.error || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
|
|
560
|
-
__props.error ? (openBlock(), createBlock(unref(_sfc_main$L), {
|
|
561
|
-
key: 0,
|
|
562
|
-
message: __props.error
|
|
563
|
-
}, null, 8, ["message"])) : _ctx.$slots.helper ? renderSlot(_ctx.$slots, "helper", { key: 1 }) : createCommentVNode("", true)
|
|
564
|
-
])) : createCommentVNode("", true)
|
|
565
|
-
], 10, _hoisted_1$r);
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
});
|
|
569
|
-
const getOptionName = (value) => {
|
|
570
|
-
return `checkbox-item-${value}`;
|
|
571
|
-
};
|
|
572
|
-
const DONE_BUTTON_TEST_ID = "select-search-done-button";
|
|
573
|
-
const _sfc_main$t = {};
|
|
574
|
-
const _hoisted_1$q = { class: "flex items-center pt-1" };
|
|
575
|
-
const _hoisted_2$f = { class: "px-1.5 text-gray-500 text-xs font-semibold" };
|
|
576
|
-
function _sfc_render(_ctx, _cache) {
|
|
577
|
-
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
578
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "border-t w-2" }, null, -1)),
|
|
579
|
-
createElementVNode("span", _hoisted_2$f, [
|
|
580
|
-
renderSlot(_ctx.$slots, "default")
|
|
581
|
-
]),
|
|
582
|
-
_cache[1] || (_cache[1] = createElementVNode("div", { class: "border-t grow" }, null, -1))
|
|
583
|
-
]);
|
|
584
|
-
}
|
|
585
|
-
const SelectExtendedOptionsDivider = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render]]);
|
|
586
|
-
const _hoisted_1$p = ["aria-selected", "aria-disabled", "data-testid"];
|
|
587
|
-
const _hoisted_2$e = ["id", "value", "checked", "disabled"];
|
|
588
|
-
const _hoisted_3$8 = ["for"];
|
|
589
|
-
const _hoisted_4$6 = { class: "flex items-center gap-1" };
|
|
590
|
-
const _hoisted_5$4 = { class: "flex flex-grow flex-col" };
|
|
591
|
-
const _hoisted_6$3 = { class: "flex flex-grow gap-2" };
|
|
592
|
-
const _hoisted_7$3 = { class: "flex flex-grow flex-col" };
|
|
593
|
-
const _hoisted_8$2 = { class: "flex flex-grow items-start justify-between gap-2" };
|
|
594
|
-
const _hoisted_9 = { class: "flex items-center gap-2" };
|
|
595
|
-
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
596
|
-
__name: "SelectExtendedOption",
|
|
597
|
-
props: {
|
|
598
|
-
multiple: { type: Boolean },
|
|
599
|
-
inputValue: {},
|
|
600
|
-
condensed: { type: Boolean },
|
|
601
|
-
label: {},
|
|
602
|
-
checked: { type: Boolean },
|
|
603
|
-
disabled: { type: Boolean },
|
|
604
|
-
subLabel: {},
|
|
605
|
-
labelPrefixComponent: {},
|
|
606
|
-
labelSuffixComponent: {},
|
|
607
|
-
labelInlineComponent: {},
|
|
608
|
-
value: {},
|
|
609
|
-
labelSrOnly: { type: Boolean }
|
|
610
|
-
},
|
|
611
|
-
emits: ["value-changed"],
|
|
612
|
-
setup(__props, { emit: __emit }) {
|
|
613
|
-
const emit = __emit;
|
|
614
|
-
const props = __props;
|
|
615
|
-
const handleChange = (event) => {
|
|
616
|
-
const target = event.target;
|
|
617
|
-
emit("value-changed", {
|
|
618
|
-
value: target.value,
|
|
619
|
-
checked: target.checked
|
|
620
|
-
});
|
|
621
|
-
};
|
|
622
|
-
const handleClick = () => {
|
|
623
|
-
if (props.multiple || props.disabled) return;
|
|
624
|
-
emit("value-changed", { value: props.value });
|
|
625
|
-
};
|
|
626
|
-
const name = computed(() => getOptionName(props.value));
|
|
627
|
-
const escapedUserInput = computed(() => escapeUserInput(props.inputValue ?? ""));
|
|
628
|
-
return (_ctx, _cache) => {
|
|
629
|
-
return openBlock(), createElementBlock("li", {
|
|
630
|
-
role: "option",
|
|
631
|
-
"aria-selected": __props.checked,
|
|
632
|
-
"aria-disabled": __props.disabled,
|
|
633
|
-
class: normalizeClass([{ "hover:bg-gray-50": !__props.disabled }, "flex relative"]),
|
|
634
|
-
"data-testid": name.value,
|
|
635
|
-
tabindex: "0",
|
|
636
|
-
onClick: handleClick,
|
|
637
|
-
onKeydown: withKeys(handleClick, ["enter"])
|
|
638
|
-
}, [
|
|
639
|
-
__props.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
640
|
-
createElementVNode("input", mergeProps(_ctx.$attrs, {
|
|
641
|
-
id: name.value,
|
|
642
|
-
ref: "inputRef",
|
|
643
|
-
value: __props.value,
|
|
644
|
-
checked: __props.checked,
|
|
645
|
-
disabled: __props.disabled,
|
|
646
|
-
type: "checkbox",
|
|
647
|
-
class: ["absolute top-[50%] -translate-y-2 left-3.5 w-4 h-4 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 focus:ring-2", __props.disabled ? "text-gray-400 placeholder-gray-500" : "text-primary-600"],
|
|
648
|
-
tabindex: "-1",
|
|
649
|
-
onChange: handleChange
|
|
650
|
-
}), null, 16, _hoisted_2$e),
|
|
651
|
-
createElementVNode("label", {
|
|
652
|
-
for: name.value,
|
|
653
|
-
class: normalizeClass([__props.disabled ? `text-gray-400` : "text-gray-900 rounded", "w-full px-4 py-3 pl-10 text-sm font-medium"])
|
|
654
|
-
}, [
|
|
655
|
-
createElementVNode("div", _hoisted_4$6, [
|
|
656
|
-
__props.labelPrefixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelPrefixComponent.component), { key: 0 })) : createCommentVNode("", true),
|
|
657
|
-
createElementVNode("div", _hoisted_5$4, [
|
|
658
|
-
createElementVNode("div", _hoisted_6$3, [
|
|
659
|
-
createVNode(_sfc_main$M, {
|
|
660
|
-
text: __props.label,
|
|
661
|
-
search: escapedUserInput.value,
|
|
662
|
-
class: normalizeClass(["font-semibold", { "sr-only": __props.labelSrOnly }])
|
|
663
|
-
}, null, 8, ["text", "search", "class"]),
|
|
664
|
-
__props.labelInlineComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
|
|
665
|
-
__props.subLabel && __props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
|
|
666
|
-
key: 1,
|
|
667
|
-
class: "text-xs text-slate-500",
|
|
668
|
-
text: __props.subLabel,
|
|
669
|
-
search: escapedUserInput.value
|
|
670
|
-
}, null, 8, ["text", "search"])) : createCommentVNode("", true)
|
|
671
|
-
]),
|
|
672
|
-
__props.subLabel && !__props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
|
|
673
|
-
key: 0,
|
|
674
|
-
class: "text-xs text-slate-500",
|
|
675
|
-
text: __props.subLabel,
|
|
676
|
-
search: escapedUserInput.value
|
|
677
|
-
}, null, 8, ["text", "search"])) : createCommentVNode("", true)
|
|
678
|
-
]),
|
|
679
|
-
__props.labelSuffixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, __props.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true)
|
|
680
|
-
])
|
|
681
|
-
], 10, _hoisted_3$8)
|
|
682
|
-
], 64)) : (openBlock(), createElementBlock("div", {
|
|
683
|
-
key: 1,
|
|
684
|
-
class: normalizeClass(["w-full px-4 text-sm font-medium flex items-start gap-3", [
|
|
685
|
-
__props.condensed ? "p-2" : "py-3",
|
|
686
|
-
__props.disabled ?? "cursor-not-allowed",
|
|
687
|
-
!__props.disabled && "cursor-pointer"
|
|
688
|
-
]])
|
|
689
|
-
}, [
|
|
690
|
-
__props.labelPrefixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelPrefixComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelPrefixComponent.props)), null, 16)) : createCommentVNode("", true),
|
|
691
|
-
createElementVNode("div", _hoisted_7$3, [
|
|
692
|
-
createElementVNode("div", _hoisted_8$2, [
|
|
693
|
-
createVNode(_sfc_main$M, {
|
|
694
|
-
text: __props.label,
|
|
695
|
-
search: escapedUserInput.value,
|
|
696
|
-
class: normalizeClass(["font-semibold", { "text-gray-400": __props.disabled }])
|
|
697
|
-
}, null, 8, ["text", "search", "class"]),
|
|
698
|
-
createElementVNode("div", _hoisted_9, [
|
|
699
|
-
__props.labelInlineComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, __props.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
|
|
700
|
-
__props.labelSuffixComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, __props.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true)
|
|
701
|
-
])
|
|
702
|
-
]),
|
|
703
|
-
__props.subLabel && __props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
|
|
704
|
-
key: 0,
|
|
705
|
-
class: "text-xs text-slate-500",
|
|
706
|
-
text: __props.subLabel,
|
|
707
|
-
search: escapedUserInput.value
|
|
708
|
-
}, null, 8, ["text", "search"])) : createCommentVNode("", true),
|
|
709
|
-
__props.subLabel && !__props.condensed ? (openBlock(), createBlock(_sfc_main$M, {
|
|
710
|
-
key: 1,
|
|
711
|
-
class: "text-xs text-slate-500",
|
|
712
|
-
text: __props.subLabel,
|
|
713
|
-
search: escapedUserInput.value
|
|
714
|
-
}, null, 8, ["text", "search"])) : createCommentVNode("", true)
|
|
715
|
-
])
|
|
716
|
-
], 2))
|
|
717
|
-
], 42, _hoisted_1$p);
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
const _hoisted_1$o = { class: "flex flex-col rounded-bl rounded-br" };
|
|
722
|
-
const _hoisted_2$d = { key: 0 };
|
|
723
|
-
const _hoisted_3$7 = {
|
|
724
|
-
key: 2,
|
|
725
|
-
class: "border-t border-gray-200"
|
|
726
|
-
};
|
|
727
|
-
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
728
|
-
__name: "SelectExtendedOptions",
|
|
729
|
-
props: {
|
|
730
|
-
model: {},
|
|
731
|
-
multiple: { type: Boolean },
|
|
732
|
-
condensed: { type: Boolean },
|
|
733
|
-
hasLargeDropdown: { type: Boolean },
|
|
734
|
-
inputValue: {},
|
|
735
|
-
addOnly: { type: Boolean },
|
|
736
|
-
options: {}
|
|
737
|
-
},
|
|
738
|
-
emits: ["value-changed"],
|
|
739
|
-
setup(__props, { emit: __emit }) {
|
|
740
|
-
const props = __props;
|
|
741
|
-
const emit = __emit;
|
|
742
|
-
const handleChange = (payload) => emit("value-changed", payload);
|
|
743
|
-
const groups = computed(
|
|
744
|
-
() => sortedUniqBy(props.options, "group").reduce((acc, option) => option.value === "" ? acc : { ...acc, [option.value]: option.group }, {})
|
|
745
|
-
);
|
|
746
|
-
const hasNoResults = computed(() => props.options.length === 0);
|
|
747
|
-
return (_ctx, _cache) => {
|
|
748
|
-
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
749
|
-
hasNoResults.value ? (openBlock(), createBlock(_sfc_main$C, {
|
|
750
|
-
key: 0,
|
|
751
|
-
tag: "div",
|
|
752
|
-
"no-spacing": "",
|
|
753
|
-
variant: "body-sm",
|
|
754
|
-
shade: "lighter",
|
|
755
|
-
class: "px-5 py-5"
|
|
756
|
-
}, {
|
|
757
|
-
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
758
|
-
createTextVNode("No results", -1)
|
|
759
|
-
])]),
|
|
760
|
-
_: 1
|
|
761
|
-
})) : (openBlock(), createElementBlock("ul", {
|
|
762
|
-
key: 1,
|
|
763
|
-
class: normalizeClass(["list-none overflow-y-auto text-gray-700", [__props.hasLargeDropdown ? "max-h-76" : "max-h-48"]])
|
|
764
|
-
}, [
|
|
765
|
-
__props.addOnly ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
|
|
766
|
-
createVNode(_sfc_main$C, {
|
|
767
|
-
tag: "p",
|
|
768
|
-
"no-spacing": "",
|
|
769
|
-
variant: "body-sm",
|
|
770
|
-
shade: "lighter",
|
|
771
|
-
class: "px-3 py-2 mt-1"
|
|
772
|
-
}, {
|
|
773
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
774
|
-
createTextVNode(toDisplayString("You can only select currently unselected options."), -1)
|
|
775
|
-
])]),
|
|
776
|
-
_: 1
|
|
777
|
-
})
|
|
778
|
-
])) : createCommentVNode("", true),
|
|
779
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, ({
|
|
780
|
-
label,
|
|
781
|
-
subLabel,
|
|
782
|
-
value,
|
|
783
|
-
checked,
|
|
784
|
-
disabled,
|
|
785
|
-
labelInlineComponent,
|
|
786
|
-
labelSuffixComponent,
|
|
787
|
-
labelSrOnly,
|
|
788
|
-
labelPrefixComponent,
|
|
789
|
-
hidden
|
|
790
|
-
}) => {
|
|
791
|
-
return openBlock(), createElementBlock(Fragment, { key: value }, [
|
|
792
|
-
groups.value[value] ? (openBlock(), createBlock(SelectExtendedOptionsDivider, { key: 0 }, {
|
|
793
|
-
default: withCtx(() => [
|
|
794
|
-
createTextVNode(toDisplayString(groups.value[value]), 1)
|
|
795
|
-
]),
|
|
796
|
-
_: 2
|
|
797
|
-
}, 1024)) : createCommentVNode("", true),
|
|
798
|
-
!hidden ? (openBlock(), createBlock(_sfc_main$s, {
|
|
799
|
-
key: 1,
|
|
800
|
-
label,
|
|
801
|
-
"sub-label": subLabel,
|
|
802
|
-
value,
|
|
803
|
-
checked,
|
|
804
|
-
disabled,
|
|
805
|
-
multiple: __props.multiple,
|
|
806
|
-
condensed: __props.condensed,
|
|
807
|
-
"label-suffix-component": labelSuffixComponent,
|
|
808
|
-
"label-prefix-component": labelPrefixComponent,
|
|
809
|
-
"label-inline-component": labelInlineComponent,
|
|
810
|
-
"label-sr-only": labelSrOnly,
|
|
811
|
-
"input-value": __props.inputValue,
|
|
812
|
-
onValueChanged: handleChange
|
|
813
|
-
}, null, 8, ["label", "sub-label", "value", "checked", "disabled", "multiple", "condensed", "label-suffix-component", "label-prefix-component", "label-inline-component", "label-sr-only", "input-value"])) : createCommentVNode("", true)
|
|
814
|
-
], 64);
|
|
815
|
-
}), 128))
|
|
816
|
-
], 2)),
|
|
817
|
-
_ctx.$slots["list-footer-content"] ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
818
|
-
renderSlot(_ctx.$slots, "list-footer-content")
|
|
819
|
-
])) : createCommentVNode("", true)
|
|
820
|
-
]);
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
const _hoisted_1$n = ["aria-expanded", "aria-controls"];
|
|
825
|
-
const _hoisted_2$c = { class: "flex gap-2 items-center" };
|
|
826
|
-
const _hoisted_3$6 = { key: 1 };
|
|
827
|
-
const _hoisted_4$5 = { class: "flex items-center gap-2" };
|
|
828
|
-
const _hoisted_5$3 = {
|
|
829
|
-
key: 0,
|
|
830
|
-
class: "flex flex-wrap gap-2 mt-2"
|
|
831
|
-
};
|
|
832
|
-
const _hoisted_6$2 = ["innerHTML"];
|
|
833
|
-
const _hoisted_7$2 = ["id"];
|
|
834
|
-
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
835
|
-
__name: "SelectExtended",
|
|
836
|
-
props: {
|
|
837
|
-
addOnly: { type: Boolean, default: false },
|
|
838
|
-
disabled: { type: Boolean },
|
|
839
|
-
label: {},
|
|
840
|
-
labelScreenReaderOnly: { type: Boolean },
|
|
841
|
-
inputModel: {},
|
|
842
|
-
singleModelValue: {},
|
|
843
|
-
multiModelValue: {},
|
|
844
|
-
options: { default: () => [] },
|
|
845
|
-
optionsOrder: { default: () => ["asc", "asc"] },
|
|
846
|
-
optionsOrderProperties: { default: () => ["group", "label"] },
|
|
847
|
-
required: { type: Boolean, default: false },
|
|
848
|
-
rootClass: {},
|
|
849
|
-
size: { default: "md" },
|
|
850
|
-
withChips: { type: Boolean, default: false },
|
|
851
|
-
chipColor: {},
|
|
852
|
-
error: {},
|
|
853
|
-
hasReset: { type: Boolean },
|
|
854
|
-
name: {},
|
|
855
|
-
hasLargeDropdown: { type: Boolean, default: false },
|
|
856
|
-
showSuffixInClosedInput: { type: Boolean },
|
|
857
|
-
showSuffixLabelInInput: { type: Boolean },
|
|
858
|
-
showSubLabelInInput: { type: Boolean, default: false },
|
|
859
|
-
condensed: { type: Boolean },
|
|
860
|
-
form: {},
|
|
861
|
-
isInputReadOnly: { type: Boolean, default: true },
|
|
862
|
-
textContent: { default: () => ({
|
|
863
|
-
placeholderSingleOpen: "Search",
|
|
864
|
-
placeholderSingleEmpty: "Select an option",
|
|
865
|
-
placeholderMultipleOpen: "Search",
|
|
866
|
-
placeholderMultipleEmpty: "Select one or more options",
|
|
867
|
-
buttonAddLabel: "Add",
|
|
868
|
-
buttonClearLabel: "Reset",
|
|
869
|
-
buttonDoneLabel: "Done"
|
|
870
|
-
}) }
|
|
871
|
-
},
|
|
872
|
-
emits: ["update:inputModel", "update:singleModelValue", "update:multiModelValue", "blur", "change", "focus", "add-option"],
|
|
873
|
-
setup(__props, { emit: __emit }) {
|
|
874
|
-
var _a;
|
|
875
|
-
const props = __props;
|
|
876
|
-
const emit = __emit;
|
|
877
|
-
const instanceProps = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode.props;
|
|
878
|
-
const inputModel = useVModel(props, "inputModel", emit);
|
|
879
|
-
const singleModel = useVModel(props, "singleModelValue", emit);
|
|
880
|
-
const multiModel = useVModel(props, "multiModelValue", emit);
|
|
881
|
-
const initialValues = computed(() => {
|
|
882
|
-
if (allowsMultipleValues.value) {
|
|
883
|
-
return multiModel.value ?? [];
|
|
884
|
-
}
|
|
885
|
-
return singleModel.value ? [singleModel.value] : [];
|
|
886
|
-
});
|
|
887
|
-
const unappliedMultiModel = ref(props.multiModelValue ?? []);
|
|
888
|
-
const allowsMultipleValues = computed(() => Array.isArray(props.multiModelValue));
|
|
889
|
-
const derivedModel = computed({
|
|
890
|
-
get: () => {
|
|
891
|
-
if (allowsMultipleValues.value) {
|
|
892
|
-
return unappliedMultiModel.value ?? [];
|
|
893
|
-
}
|
|
894
|
-
if (typeof singleModel.value === "string") {
|
|
895
|
-
return [singleModel.value];
|
|
896
|
-
}
|
|
897
|
-
return [];
|
|
898
|
-
},
|
|
899
|
-
set(value) {
|
|
900
|
-
if (allowsMultipleValues.value) {
|
|
901
|
-
unappliedMultiModel.value = value;
|
|
902
|
-
} else {
|
|
903
|
-
singleModel.value = (value == null ? void 0 : value[0]) ?? "";
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
});
|
|
907
|
-
const isOpen = ref(false);
|
|
908
|
-
const isMounted = useIsMounted();
|
|
909
|
-
const optionsRef = ref();
|
|
910
|
-
const wrapperRef = ref();
|
|
911
|
-
const teleportTarget = inject(SEARCH_SELECT_TELEPORT_TARGET);
|
|
912
|
-
const getSelectedItems = (selectedValue) => props.options.filter((option) => selectedValue.some((value) => option.value === value));
|
|
913
|
-
const selectedItems = computed(() => getSelectedItems(derivedModel.value));
|
|
914
|
-
const firstSelectedItem = computed(() => selectedItems.value[0]);
|
|
915
|
-
const firstSelectedOption = computed(() => selectedOptions.value[0]);
|
|
916
|
-
const hasPrefixComponent = computed(
|
|
917
|
-
() => {
|
|
918
|
-
var _a2;
|
|
919
|
-
return !isOpen.value && !allowsMultipleValues.value && ((_a2 = firstSelectedItem.value) == null ? void 0 : _a2.labelPrefixComponent);
|
|
920
|
-
}
|
|
921
|
-
);
|
|
922
|
-
const hasAddOptionListener = !!(instanceProps == null ? void 0 : instanceProps["onAddOption"]);
|
|
923
|
-
const handleAddOption = () => {
|
|
924
|
-
emit("add-option");
|
|
925
|
-
handleClose();
|
|
926
|
-
};
|
|
927
|
-
const placeholder = computed(() => {
|
|
928
|
-
var _a2, _b, _c, _d;
|
|
929
|
-
if (!allowsMultipleValues.value) {
|
|
930
|
-
if (firstSelectedItem.value) {
|
|
931
|
-
return (_a2 = firstSelectedItem.value) == null ? void 0 : _a2.label;
|
|
932
|
-
} else if (selectedItems.value.length === 0) {
|
|
933
|
-
return props.textContent.placeholderSingleEmpty;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
if (allowsMultipleValues.value) {
|
|
937
|
-
if (selectedItems.value.length === 1) {
|
|
938
|
-
return (_b = firstSelectedItem.value) == null ? void 0 : _b.label;
|
|
939
|
-
}
|
|
940
|
-
if (selectedItems.value.length >= 2) {
|
|
941
|
-
return `${(_c = firstSelectedItem.value) == null ? void 0 : _c.label} +${selectedItems.value.length - 1}`;
|
|
942
|
-
}
|
|
943
|
-
if (selectedItems.value.length === 0) {
|
|
944
|
-
return props.textContent.placeholderMultipleEmpty;
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
return (_d = firstSelectedOption.value) == null ? void 0 : _d.label;
|
|
948
|
-
});
|
|
949
|
-
const handleClose = () => {
|
|
950
|
-
if (allowsMultipleValues.value) ;
|
|
951
|
-
isOpen.value = false;
|
|
952
|
-
};
|
|
953
|
-
const handleChange = ({
|
|
954
|
-
value,
|
|
955
|
-
checked
|
|
956
|
-
}) => {
|
|
957
|
-
let updatedValue;
|
|
958
|
-
if (allowsMultipleValues.value) {
|
|
959
|
-
updatedValue = checked ? [...derivedModel.value, value] : derivedModel.value.filter((selectedValue) => selectedValue !== value);
|
|
960
|
-
} else {
|
|
961
|
-
updatedValue = [value];
|
|
962
|
-
isOpen.value = false;
|
|
963
|
-
}
|
|
964
|
-
derivedModel.value = updatedValue;
|
|
965
|
-
emit("change");
|
|
966
|
-
};
|
|
967
|
-
const canReset = computed(() => {
|
|
968
|
-
if (props.addOnly && !isEqual(unappliedMultiModel.value, props.multiModelValue)) {
|
|
969
|
-
return true;
|
|
970
|
-
}
|
|
971
|
-
if (!props.addOnly && derivedModel.value.length > 0 && !props.disabled && !(derivedModel.value.length === 1 && derivedModel.value[0] === "")) {
|
|
972
|
-
return true;
|
|
973
|
-
}
|
|
974
|
-
return false;
|
|
975
|
-
});
|
|
976
|
-
const handleReset = () => {
|
|
977
|
-
if (props.addOnly) {
|
|
978
|
-
unappliedMultiModel.value = initialValues.value;
|
|
979
|
-
inputModel.value = "";
|
|
980
|
-
handleClose();
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
derivedModel.value = [];
|
|
984
|
-
unappliedMultiModel.value = [];
|
|
985
|
-
if (inputModel.value) {
|
|
986
|
-
inputModel.value = "";
|
|
987
|
-
}
|
|
988
|
-
handleClose();
|
|
989
|
-
};
|
|
990
|
-
const getFocusableElements = () => {
|
|
991
|
-
if (!optionsRef.value) return [];
|
|
992
|
-
return Array.from(
|
|
993
|
-
optionsRef.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')
|
|
994
|
-
);
|
|
995
|
-
};
|
|
996
|
-
const getDeepActiveElement = () => {
|
|
997
|
-
var _a2;
|
|
998
|
-
let active = document.activeElement;
|
|
999
|
-
while ((_a2 = active == null ? void 0 : active.shadowRoot) == null ? void 0 : _a2.activeElement) {
|
|
1000
|
-
active = active.shadowRoot.activeElement;
|
|
1001
|
-
}
|
|
1002
|
-
return active;
|
|
1003
|
-
};
|
|
1004
|
-
const getInputElement = () => {
|
|
1005
|
-
if (!wrapperRef.value) return null;
|
|
1006
|
-
let input = wrapperRef.value.querySelector("input");
|
|
1007
|
-
if (input) return input;
|
|
1008
|
-
const shadowRoots = wrapperRef.value.querySelectorAll("*");
|
|
1009
|
-
for (const el of shadowRoots) {
|
|
1010
|
-
if (el.shadowRoot) {
|
|
1011
|
-
input = el.shadowRoot.querySelector("input");
|
|
1012
|
-
if (input) return input;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
return null;
|
|
1016
|
-
};
|
|
1017
|
-
const handleWrapperKeyDown = (event) => {
|
|
1018
|
-
var _a2, _b;
|
|
1019
|
-
if (!isOpen.value) return;
|
|
1020
|
-
const focusableElements = getFocusableElements();
|
|
1021
|
-
const input = getInputElement();
|
|
1022
|
-
const activeElement = getDeepActiveElement();
|
|
1023
|
-
const isInputFocused = activeElement === input;
|
|
1024
|
-
if (!isInputFocused) return;
|
|
1025
|
-
switch (event.key) {
|
|
1026
|
-
case "ArrowDown":
|
|
1027
|
-
if (focusableElements.length > 0) {
|
|
1028
|
-
event.preventDefault();
|
|
1029
|
-
(_a2 = focusableElements[0]) == null ? void 0 : _a2.focus();
|
|
1030
|
-
}
|
|
1031
|
-
break;
|
|
1032
|
-
case "Tab":
|
|
1033
|
-
if (!event.shiftKey && focusableElements.length > 0) {
|
|
1034
|
-
event.preventDefault();
|
|
1035
|
-
(_b = focusableElements[0]) == null ? void 0 : _b.focus();
|
|
1036
|
-
}
|
|
1037
|
-
break;
|
|
1038
|
-
case "Escape":
|
|
1039
|
-
event.preventDefault();
|
|
1040
|
-
handleClose();
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
const handleOptionsKeyDown = (event) => {
|
|
1045
|
-
var _a2, _b, _c, _d;
|
|
1046
|
-
const focusableElements = getFocusableElements();
|
|
1047
|
-
const activeElement = getDeepActiveElement();
|
|
1048
|
-
const currentIndex = focusableElements.indexOf(activeElement);
|
|
1049
|
-
const input = getInputElement();
|
|
1050
|
-
switch (event.key) {
|
|
1051
|
-
case "ArrowDown":
|
|
1052
|
-
if (currentIndex < focusableElements.length - 1) {
|
|
1053
|
-
event.preventDefault();
|
|
1054
|
-
(_a2 = focusableElements[currentIndex + 1]) == null ? void 0 : _a2.focus();
|
|
1055
|
-
}
|
|
1056
|
-
break;
|
|
1057
|
-
case "ArrowUp":
|
|
1058
|
-
event.preventDefault();
|
|
1059
|
-
if (currentIndex <= 0) {
|
|
1060
|
-
input == null ? void 0 : input.focus();
|
|
1061
|
-
} else {
|
|
1062
|
-
(_b = focusableElements[currentIndex - 1]) == null ? void 0 : _b.focus();
|
|
1063
|
-
}
|
|
1064
|
-
break;
|
|
1065
|
-
case "Tab":
|
|
1066
|
-
if (event.shiftKey) {
|
|
1067
|
-
if (currentIndex <= 0) {
|
|
1068
|
-
event.preventDefault();
|
|
1069
|
-
input == null ? void 0 : input.focus();
|
|
1070
|
-
} else {
|
|
1071
|
-
event.preventDefault();
|
|
1072
|
-
(_c = focusableElements[currentIndex - 1]) == null ? void 0 : _c.focus();
|
|
1073
|
-
}
|
|
1074
|
-
} else {
|
|
1075
|
-
if (currentIndex >= focusableElements.length - 1) {
|
|
1076
|
-
event.preventDefault();
|
|
1077
|
-
handleClose();
|
|
1078
|
-
input == null ? void 0 : input.focus();
|
|
1079
|
-
} else {
|
|
1080
|
-
event.preventDefault();
|
|
1081
|
-
(_d = focusableElements[currentIndex + 1]) == null ? void 0 : _d.focus();
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
break;
|
|
1085
|
-
case "Escape":
|
|
1086
|
-
event.preventDefault();
|
|
1087
|
-
handleClose();
|
|
1088
|
-
nextTick(() => {
|
|
1089
|
-
input == null ? void 0 : input.focus();
|
|
1090
|
-
});
|
|
1091
|
-
break;
|
|
1092
|
-
}
|
|
1093
|
-
};
|
|
1094
|
-
const handleClickOutside = (event) => {
|
|
1095
|
-
const path = event.composedPath();
|
|
1096
|
-
if (optionsRef.value && path.includes(optionsRef.value) || wrapperRef.value && path.includes(wrapperRef.value)) {
|
|
1097
|
-
return;
|
|
1098
|
-
}
|
|
1099
|
-
if (isOpen.value) {
|
|
1100
|
-
handleClose();
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
useEventListener("mousedown", handleClickOutside);
|
|
1104
|
-
const { floatingStyles } = useFloating(wrapperRef, optionsRef, {
|
|
1105
|
-
whileElementsMounted: autoUpdate,
|
|
1106
|
-
placement: "bottom",
|
|
1107
|
-
middleware: [
|
|
1108
|
-
offset(4),
|
|
1109
|
-
flip({
|
|
1110
|
-
mainAxis: true
|
|
1111
|
-
})
|
|
1112
|
-
]
|
|
1113
|
-
});
|
|
1114
|
-
const optionsId = uniqueId$1(`search-select-options-`);
|
|
1115
|
-
const { width } = useElementSize(wrapperRef);
|
|
1116
|
-
const focusInput = () => {
|
|
1117
|
-
const input = getInputElement();
|
|
1118
|
-
if (input) {
|
|
1119
|
-
input.focus();
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
const processedOptions = computed(() => {
|
|
1123
|
-
return props.options.map((item) => {
|
|
1124
|
-
return {
|
|
1125
|
-
...item,
|
|
1126
|
-
checked: selectedItems.value.some((selectedItem) => selectedItem.value === item.value),
|
|
1127
|
-
disabled: props.disabled || !props.disabled && props.addOnly && !!initialValues.value.includes(item.value)
|
|
1128
|
-
};
|
|
1129
|
-
});
|
|
1130
|
-
});
|
|
1131
|
-
const selectedOptions = computed(
|
|
1132
|
-
() => processedOptions.value.filter((option) => {
|
|
1133
|
-
var _a2;
|
|
1134
|
-
return (_a2 = derivedModel.value) == null ? void 0 : _a2.includes(option.value);
|
|
1135
|
-
})
|
|
1136
|
-
);
|
|
1137
|
-
return (_ctx, _cache) => {
|
|
1138
|
-
var _a2;
|
|
1139
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1140
|
-
createElementVNode("div", {
|
|
1141
|
-
ref_key: "wrapperRef",
|
|
1142
|
-
ref: wrapperRef,
|
|
1143
|
-
class: normalizeClass(["relative flex items-end", {
|
|
1144
|
-
rootClass: __props.rootClass,
|
|
1145
|
-
"z-30": isOpen.value,
|
|
1146
|
-
"cursor-text": !__props.disabled
|
|
1147
|
-
}]),
|
|
1148
|
-
role: "combobox",
|
|
1149
|
-
"aria-expanded": isOpen.value,
|
|
1150
|
-
"aria-haspopup": true,
|
|
1151
|
-
"aria-controls": unref(optionsId),
|
|
1152
|
-
onKeydown: handleWrapperKeyDown,
|
|
1153
|
-
onClick: focusInput
|
|
1154
|
-
}, [
|
|
1155
|
-
createVNode(unref(_sfc_main$N), {
|
|
1156
|
-
modelValue: unref(inputModel),
|
|
1157
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(inputModel) ? inputModel.value = $event : null),
|
|
1158
|
-
readonly: __props.isInputReadOnly,
|
|
1159
|
-
required: __props.required,
|
|
1160
|
-
label: __props.label,
|
|
1161
|
-
name: __props.name,
|
|
1162
|
-
form: __props.form,
|
|
1163
|
-
"label-screen-reader-only": __props.labelScreenReaderOnly,
|
|
1164
|
-
placeholder: placeholder.value,
|
|
1165
|
-
class: normalizeClass(["grow !outline-none", {
|
|
1166
|
-
"placeholder:text-gray-900": !isOpen.value && (!allowsMultipleValues.value && unref(singleModel) || allowsMultipleValues.value && !unref(isEmpty$1)(__props.multiModelValue)),
|
|
1167
|
-
"cursor-default": __props.isInputReadOnly
|
|
1168
|
-
}]),
|
|
1169
|
-
"wrapper-class": {
|
|
1170
|
-
"border-transparent border-b-gray-200 focus-within:border-b relative z-10": isOpen.value
|
|
1171
|
-
},
|
|
1172
|
-
"suffix-class": "border-l-0 pl-0",
|
|
1173
|
-
disabled: __props.disabled,
|
|
1174
|
-
size: __props.size,
|
|
1175
|
-
error: __props.error,
|
|
1176
|
-
"prefix-has-border": false,
|
|
1177
|
-
"aria-autocomplete": "list",
|
|
1178
|
-
onFocus: _cache[1] || (_cache[1] = () => isOpen.value = true),
|
|
1179
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("blur"))
|
|
1180
|
-
}, createSlots({
|
|
1181
|
-
"label-suffix": withCtx(() => [
|
|
1182
|
-
renderSlot(_ctx.$slots, "label-suffix")
|
|
1183
|
-
]),
|
|
1184
|
-
suffix: withCtx(() => {
|
|
1185
|
-
var _a3, _b;
|
|
1186
|
-
return [
|
|
1187
|
-
createElementVNode("div", _hoisted_4$5, [
|
|
1188
|
-
!isOpen.value && !allowsMultipleValues.value && ((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.labelInlineComponent) && (!__props.showSuffixInClosedInput || __props.showSuffixLabelInInput) ? (openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelInlineComponent.component), normalizeProps(mergeProps({ key: 0 }, firstSelectedItem.value.labelInlineComponent.props)), null, 16)) : createCommentVNode("", true),
|
|
1189
|
-
!isOpen.value && !allowsMultipleValues.value && ((_b = firstSelectedItem.value) == null ? void 0 : _b.labelSuffixComponent) && __props.showSuffixInClosedInput ? (openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelSuffixComponent.component), normalizeProps(mergeProps({ key: 1 }, firstSelectedItem.value.labelSuffixComponent.props)), null, 16)) : createCommentVNode("", true),
|
|
1190
|
-
!!unref(inputModel) || canReset.value && __props.hasReset ? (openBlock(), createBlock(_sfc_main$O, {
|
|
1191
|
-
key: 2,
|
|
1192
|
-
icon: "close",
|
|
1193
|
-
size: "xs",
|
|
1194
|
-
variant: "ghost",
|
|
1195
|
-
color: "gray",
|
|
1196
|
-
type: "button",
|
|
1197
|
-
onClick: handleReset
|
|
1198
|
-
})) : createCommentVNode("", true),
|
|
1199
|
-
createVNode(_sfc_main$I, {
|
|
1200
|
-
icon: "keyboard_arrow_down",
|
|
1201
|
-
size: "xs",
|
|
1202
|
-
class: normalizeClass(["transition-transform", { "rotate-180": isOpen.value }])
|
|
1203
|
-
}, null, 8, ["class"])
|
|
1204
|
-
])
|
|
1205
|
-
];
|
|
1206
|
-
}),
|
|
1207
|
-
_: 2
|
|
1208
|
-
}, [
|
|
1209
|
-
__props.showSubLabelInInput && ((_a2 = firstSelectedItem.value) == null ? void 0 : _a2.subLabel) ? {
|
|
1210
|
-
name: "input",
|
|
1211
|
-
fn: withCtx(() => [
|
|
1212
|
-
createElementVNode("div", {
|
|
1213
|
-
class: normalizeClass(["pointer-events-none absolute inset-0 bg-white", { "px-4 py-3": __props.size === "xl" }])
|
|
1214
|
-
}, [
|
|
1215
|
-
createVNode(_sfc_main$C, {
|
|
1216
|
-
tag: "span",
|
|
1217
|
-
class: "block",
|
|
1218
|
-
variant: "body-sm",
|
|
1219
|
-
weight: "semibold"
|
|
1220
|
-
}, {
|
|
1221
|
-
default: withCtx(() => {
|
|
1222
|
-
var _a3;
|
|
1223
|
-
return [
|
|
1224
|
-
createTextVNode(toDisplayString((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.label), 1)
|
|
1225
|
-
];
|
|
1226
|
-
}),
|
|
1227
|
-
_: 1
|
|
1228
|
-
}),
|
|
1229
|
-
createVNode(_sfc_main$C, {
|
|
1230
|
-
tag: "span",
|
|
1231
|
-
class: "block",
|
|
1232
|
-
variant: "body-xs",
|
|
1233
|
-
shade: "lighter"
|
|
1234
|
-
}, {
|
|
1235
|
-
default: withCtx(() => {
|
|
1236
|
-
var _a3;
|
|
1237
|
-
return [
|
|
1238
|
-
createTextVNode(toDisplayString((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.subLabel), 1)
|
|
1239
|
-
];
|
|
1240
|
-
}),
|
|
1241
|
-
_: 1
|
|
1242
|
-
})
|
|
1243
|
-
], 2)
|
|
1244
|
-
]),
|
|
1245
|
-
key: "0"
|
|
1246
|
-
} : void 0,
|
|
1247
|
-
_ctx.$slots.tooltip ? {
|
|
1248
|
-
name: "tooltip",
|
|
1249
|
-
fn: withCtx(() => [
|
|
1250
|
-
renderSlot(_ctx.$slots, "tooltip")
|
|
1251
|
-
]),
|
|
1252
|
-
key: "1"
|
|
1253
|
-
} : void 0,
|
|
1254
|
-
hasPrefixComponent.value || _ctx.$slots.prefix ? {
|
|
1255
|
-
name: "prefix",
|
|
1256
|
-
fn: withCtx(() => {
|
|
1257
|
-
var _a3;
|
|
1258
|
-
return [
|
|
1259
|
-
createElementVNode("div", _hoisted_2$c, [
|
|
1260
|
-
_ctx.$slots.prefix ? renderSlot(_ctx.$slots, "prefix", { key: 0 }) : hasPrefixComponent.value && ((_a3 = firstSelectedItem.value) == null ? void 0 : _a3.labelPrefixComponent) ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
1261
|
-
(openBlock(), createBlock(resolveDynamicComponent(firstSelectedItem.value.labelPrefixComponent.component), normalizeProps(guardReactiveProps(firstSelectedItem.value.labelPrefixComponent.props)), null, 16))
|
|
1262
|
-
])) : createCommentVNode("", true)
|
|
1263
|
-
])
|
|
1264
|
-
];
|
|
1265
|
-
}),
|
|
1266
|
-
key: "2"
|
|
1267
|
-
} : void 0,
|
|
1268
|
-
_ctx.$slots.helper ? {
|
|
1269
|
-
name: "helper",
|
|
1270
|
-
fn: withCtx(() => [
|
|
1271
|
-
renderSlot(_ctx.$slots, "helper")
|
|
1272
|
-
]),
|
|
1273
|
-
key: "3"
|
|
1274
|
-
} : void 0
|
|
1275
|
-
]), 1032, ["modelValue", "readonly", "required", "label", "name", "form", "label-screen-reader-only", "placeholder", "wrapper-class", "class", "disabled", "size", "error"])
|
|
1276
|
-
], 42, _hoisted_1$n),
|
|
1277
|
-
__props.withChips ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
1278
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(selectedOptions.value, ({ value, label, disabled }) => {
|
|
1279
|
-
return openBlock(), createBlock(_sfc_main$B, {
|
|
1280
|
-
key: value,
|
|
1281
|
-
removable: !disabled,
|
|
1282
|
-
color: disabled ? "dark" : __props.chipColor,
|
|
1283
|
-
onRemoved: ($event) => handleChange({ value, checked: false })
|
|
1284
|
-
}, {
|
|
1285
|
-
default: withCtx(() => [
|
|
1286
|
-
createElementVNode("span", { innerHTML: label }, null, 8, _hoisted_6$2)
|
|
1287
|
-
]),
|
|
1288
|
-
_: 2
|
|
1289
|
-
}, 1032, ["removable", "color", "onRemoved"]);
|
|
1290
|
-
}), 128))
|
|
1291
|
-
])) : createCommentVNode("", true),
|
|
1292
|
-
unref(isMounted) && unref(teleportTarget) ? (openBlock(), createBlock(Teleport, {
|
|
1293
|
-
key: 1,
|
|
1294
|
-
to: unref(teleportTarget)
|
|
1295
|
-
}, [
|
|
1296
|
-
isOpen.value && !__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
1297
|
-
key: 0,
|
|
1298
|
-
id: unref(optionsId),
|
|
1299
|
-
ref_key: "optionsRef",
|
|
1300
|
-
ref: optionsRef,
|
|
1301
|
-
role: "listbox",
|
|
1302
|
-
style: normalizeStyle(unref(floatingStyles)),
|
|
1303
|
-
class: "drop-shadow-md bg-white rounded z-70",
|
|
1304
|
-
onMouseenter: _cache[3] || (_cache[3] = ($event) => isOpen.value = true),
|
|
1305
|
-
onKeydown: handleOptionsKeyDown
|
|
1306
|
-
}, [
|
|
1307
|
-
createElementVNode("div", {
|
|
1308
|
-
class: "rounded pt-0",
|
|
1309
|
-
style: normalizeStyle({ width: `${unref(width)}px` })
|
|
1310
|
-
}, [
|
|
1311
|
-
createVNode(_sfc_main$r, {
|
|
1312
|
-
options: processedOptions.value,
|
|
1313
|
-
multiple: allowsMultipleValues.value,
|
|
1314
|
-
model: derivedModel.value,
|
|
1315
|
-
"add-only": __props.addOnly,
|
|
1316
|
-
"allows-multiple-values": !!allowsMultipleValues.value,
|
|
1317
|
-
condensed: __props.condensed,
|
|
1318
|
-
"has-large-dropdown": __props.hasLargeDropdown,
|
|
1319
|
-
"input-value": unref(inputModel),
|
|
1320
|
-
onValueChanged: handleChange
|
|
1321
|
-
}, {
|
|
1322
|
-
"list-footer-content": withCtx(() => [
|
|
1323
|
-
hasAddOptionListener ? (openBlock(), createBlock(_sfc_main$P, {
|
|
1324
|
-
key: 0,
|
|
1325
|
-
variant: "ghost",
|
|
1326
|
-
class: "w-full",
|
|
1327
|
-
type: "button",
|
|
1328
|
-
"icon-prefix": "add",
|
|
1329
|
-
onClick: handleAddOption
|
|
1330
|
-
}, {
|
|
1331
|
-
default: withCtx(() => [
|
|
1332
|
-
createTextVNode(toDisplayString(__props.textContent.buttonAddLabel), 1)
|
|
1333
|
-
]),
|
|
1334
|
-
_: 1
|
|
1335
|
-
})) : createCommentVNode("", true),
|
|
1336
|
-
allowsMultipleValues.value ? (openBlock(), createElementBlock("div", {
|
|
1337
|
-
key: 1,
|
|
1338
|
-
class: normalizeClass(["flex justify-between items-center", { "py-2": !_ctx.$slots["list-footer-content"] }])
|
|
1339
|
-
}, [
|
|
1340
|
-
canReset.value ? (openBlock(), createBlock(_sfc_main$P, {
|
|
1341
|
-
key: 0,
|
|
1342
|
-
type: "button",
|
|
1343
|
-
color: "gray",
|
|
1344
|
-
variant: "ghost",
|
|
1345
|
-
size: "sm",
|
|
1346
|
-
class: "ml-2",
|
|
1347
|
-
onClick: handleReset
|
|
1348
|
-
}, {
|
|
1349
|
-
default: withCtx(() => [
|
|
1350
|
-
createTextVNode(toDisplayString(__props.textContent.buttonClearLabel), 1)
|
|
1351
|
-
]),
|
|
1352
|
-
_: 1
|
|
1353
|
-
})) : createCommentVNode("", true),
|
|
1354
|
-
createElementVNode("div", null, [
|
|
1355
|
-
renderSlot(_ctx.$slots, "list-footer-content")
|
|
1356
|
-
]),
|
|
1357
|
-
createVNode(_sfc_main$P, {
|
|
1358
|
-
type: "button",
|
|
1359
|
-
size: "sm",
|
|
1360
|
-
class: "mr-2",
|
|
1361
|
-
"data-testid": unref(DONE_BUTTON_TEST_ID),
|
|
1362
|
-
onClick: handleClose
|
|
1363
|
-
}, {
|
|
1364
|
-
default: withCtx(() => [
|
|
1365
|
-
createTextVNode(toDisplayString(__props.textContent.buttonDoneLabel), 1)
|
|
1366
|
-
]),
|
|
1367
|
-
_: 1
|
|
1368
|
-
}, 8, ["data-testid"])
|
|
1369
|
-
], 2)) : renderSlot(_ctx.$slots, "list-footer-content", { key: 2 })
|
|
1370
|
-
]),
|
|
1371
|
-
_: 3
|
|
1372
|
-
}, 8, ["options", "multiple", "model", "add-only", "allows-multiple-values", "condensed", "has-large-dropdown", "input-value"])
|
|
1373
|
-
], 4)
|
|
1374
|
-
], 44, _hoisted_7$2)) : createCommentVNode("", true)
|
|
1375
|
-
], 8, ["to"])) : createCommentVNode("", true)
|
|
1376
|
-
], 64);
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
});
|
|
1380
|
-
const _hoisted_1$m = { class: "flex items-center gap-1.5 text-gray-800" };
|
|
1381
|
-
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1382
|
-
__name: "StepInput",
|
|
1383
|
-
props: /* @__PURE__ */ mergeModels({
|
|
1384
|
-
step: { default: 1 },
|
|
1385
|
-
min: { default: 0 },
|
|
1386
|
-
max: {},
|
|
1387
|
-
initialValue: { default: 1 },
|
|
1388
|
-
unitName: {},
|
|
1389
|
-
showDelta: { type: Boolean, default: false },
|
|
1390
|
-
size: { default: "md" },
|
|
1391
|
-
name: {},
|
|
1392
|
-
required: { type: Boolean },
|
|
1393
|
-
label: {},
|
|
1394
|
-
error: {},
|
|
1395
|
-
disabled: { type: Boolean, default: false }
|
|
1396
|
-
}, {
|
|
1397
|
-
"modelValue": { required: true },
|
|
1398
|
-
"modelModifiers": {}
|
|
1399
|
-
}),
|
|
1400
|
-
emits: ["update:modelValue"],
|
|
1401
|
-
setup(__props) {
|
|
1402
|
-
const props = __props;
|
|
1403
|
-
const model = useModel(__props, "modelValue");
|
|
1404
|
-
const contentEditableRef = ref(null);
|
|
1405
|
-
const computedUnitName = computed(() => {
|
|
1406
|
-
if (!props.unitName) return void 0;
|
|
1407
|
-
return props.unitName[model.value === 1 ? "singular" : "plural"];
|
|
1408
|
-
});
|
|
1409
|
-
const handleAdd = () => {
|
|
1410
|
-
if (props.max && model.value + props.step > props.max) {
|
|
1411
|
-
return;
|
|
1412
|
-
}
|
|
1413
|
-
model.value += props.step;
|
|
1414
|
-
};
|
|
1415
|
-
const handleSubstract = () => {
|
|
1416
|
-
if (model.value - props.step < props.min) {
|
|
1417
|
-
return;
|
|
1418
|
-
}
|
|
1419
|
-
model.value -= props.step;
|
|
1420
|
-
};
|
|
1421
|
-
function setContentAndMoveCaretToEnd(content) {
|
|
1422
|
-
var _a;
|
|
1423
|
-
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
1424
|
-
if (!el) return;
|
|
1425
|
-
const value = parseInt(`${content}`);
|
|
1426
|
-
model.value = value;
|
|
1427
|
-
el.innerText = `${value}`;
|
|
1428
|
-
el.focus();
|
|
1429
|
-
const range = document.createRange();
|
|
1430
|
-
range.selectNodeContents(el);
|
|
1431
|
-
range.collapse(false);
|
|
1432
|
-
const selection = window.getSelection();
|
|
1433
|
-
selection == null ? void 0 : selection.removeAllRanges();
|
|
1434
|
-
selection == null ? void 0 : selection.addRange(range);
|
|
1435
|
-
}
|
|
1436
|
-
const handleInputUpdate = (event) => {
|
|
1437
|
-
const target = event.target;
|
|
1438
|
-
if (target instanceof HTMLElement) {
|
|
1439
|
-
setContentAndMoveCaretToEnd(target.innerText);
|
|
1440
|
-
}
|
|
1441
|
-
};
|
|
1442
|
-
const isIncreaseButtonEnabled = computed(() => {
|
|
1443
|
-
if (props.disabled) {
|
|
1444
|
-
return false;
|
|
1445
|
-
}
|
|
1446
|
-
if (props.max) {
|
|
1447
|
-
return model.value + props.step < props.max;
|
|
1448
|
-
}
|
|
1449
|
-
return true;
|
|
1450
|
-
});
|
|
1451
|
-
const isDecreaseButtonEnabled = computed(() => {
|
|
1452
|
-
return props.disabled ? false : model.value - props.step >= props.min;
|
|
1453
|
-
});
|
|
1454
|
-
function handleFocusContentEditable() {
|
|
1455
|
-
var _a;
|
|
1456
|
-
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
1457
|
-
if (!el) return;
|
|
1458
|
-
el.focus();
|
|
1459
|
-
const range = document.createRange();
|
|
1460
|
-
range.selectNodeContents(el);
|
|
1461
|
-
const selection = window.getSelection();
|
|
1462
|
-
selection == null ? void 0 : selection.removeAllRanges();
|
|
1463
|
-
selection == null ? void 0 : selection.addRange(range);
|
|
1464
|
-
}
|
|
1465
|
-
onMounted(() => {
|
|
1466
|
-
var _a;
|
|
1467
|
-
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
1468
|
-
if (!el) return;
|
|
1469
|
-
el.innerText = `${model.value}`;
|
|
1470
|
-
});
|
|
1471
|
-
watch(
|
|
1472
|
-
() => model.value,
|
|
1473
|
-
(value) => {
|
|
1474
|
-
setContentAndMoveCaretToEnd(value);
|
|
1475
|
-
}
|
|
1476
|
-
);
|
|
1477
|
-
return (_ctx, _cache) => {
|
|
1478
|
-
return openBlock(), createBlock(_sfc_main$N, {
|
|
1479
|
-
modelValue: model.value,
|
|
1480
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1481
|
-
type: "number",
|
|
1482
|
-
class: "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none text-transparent",
|
|
1483
|
-
"prefix-class": {
|
|
1484
|
-
"!px-0 w-5": __props.size === "sm",
|
|
1485
|
-
"!px-0 w-6": __props.size === "md",
|
|
1486
|
-
"!px-0 w-7": __props.size === "lg"
|
|
1487
|
-
},
|
|
1488
|
-
"suffix-class": {
|
|
1489
|
-
"!px-0 w-5": __props.size === "sm",
|
|
1490
|
-
"!px-0 w-6": __props.size === "md",
|
|
1491
|
-
"!px-0 w-7": __props.size === "lg"
|
|
1492
|
-
},
|
|
1493
|
-
size: __props.size,
|
|
1494
|
-
label: __props.label,
|
|
1495
|
-
disabled: __props.disabled,
|
|
1496
|
-
name: __props.name,
|
|
1497
|
-
required: __props.required
|
|
1498
|
-
}, createSlots({
|
|
1499
|
-
prefix: withCtx(() => [
|
|
1500
|
-
createElementVNode("div", {
|
|
1501
|
-
class: "absolute inset-0 flex items-center justify-center",
|
|
1502
|
-
onMousedown: handleFocusContentEditable
|
|
1503
|
-
}, [
|
|
1504
|
-
createElementVNode("div", _hoisted_1$m, [
|
|
1505
|
-
createVNode(_sfc_main$C, {
|
|
1506
|
-
ref_key: "contentEditableRef",
|
|
1507
|
-
ref: contentEditableRef,
|
|
1508
|
-
tag: "span",
|
|
1509
|
-
variant: __props.size === "sm" ? "body" : "body-lg",
|
|
1510
|
-
contenteditable: !__props.disabled,
|
|
1511
|
-
class: normalizeClass(["outline-none", { "pointer-events-none select-none": __props.disabled }]),
|
|
1512
|
-
weight: "semibold",
|
|
1513
|
-
onInput: handleInputUpdate
|
|
1514
|
-
}, null, 8, ["variant", "contenteditable", "class"]),
|
|
1515
|
-
computedUnitName.value ? (openBlock(), createBlock(_sfc_main$C, {
|
|
1516
|
-
key: 0,
|
|
1517
|
-
tag: "span",
|
|
1518
|
-
shade: "lighter",
|
|
1519
|
-
class: "pointer-events-none select-none"
|
|
1520
|
-
}, {
|
|
1521
|
-
default: withCtx(() => [
|
|
1522
|
-
createTextVNode(toDisplayString(" ") + toDisplayString(computedUnitName.value), 1)
|
|
1523
|
-
]),
|
|
1524
|
-
_: 1
|
|
1525
|
-
})) : createCommentVNode("", true),
|
|
1526
|
-
__props.showDelta ? (openBlock(), createBlock(_sfc_main$A, {
|
|
1527
|
-
key: 1,
|
|
1528
|
-
"old-value": props.initialValue,
|
|
1529
|
-
"new-value": model.value,
|
|
1530
|
-
class: "ml-0.5 pointer-events-none select-none"
|
|
1531
|
-
}, null, 8, ["old-value", "new-value"])) : createCommentVNode("", true)
|
|
1532
|
-
])
|
|
1533
|
-
], 32),
|
|
1534
|
-
createVNode(_sfc_main$O, {
|
|
1535
|
-
disabled: !isDecreaseButtonEnabled.value,
|
|
1536
|
-
type: "button",
|
|
1537
|
-
color: "gray",
|
|
1538
|
-
variant: "ghost",
|
|
1539
|
-
size: "sm",
|
|
1540
|
-
class: normalizeClass(["select-none rounded-tr-none rounded-br-none !h-full", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
|
|
1541
|
-
icon: "remove",
|
|
1542
|
-
onMousedown: handleSubstract
|
|
1543
|
-
}, null, 8, ["disabled", "class"])
|
|
1544
|
-
]),
|
|
1545
|
-
suffix: withCtx(() => [
|
|
1546
|
-
createVNode(_sfc_main$O, {
|
|
1547
|
-
disabled: !isIncreaseButtonEnabled.value,
|
|
1548
|
-
type: "button",
|
|
1549
|
-
color: "gray",
|
|
1550
|
-
variant: "ghost",
|
|
1551
|
-
size: "sm",
|
|
1552
|
-
class: normalizeClass(["select-none rounded-tl-none rounded-bl-none !h-full", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
|
|
1553
|
-
icon: "add",
|
|
1554
|
-
onMousedown: handleAdd
|
|
1555
|
-
}, null, 8, ["disabled", "class"])
|
|
1556
|
-
]),
|
|
1557
|
-
_: 2
|
|
1558
|
-
}, [
|
|
1559
|
-
_ctx.$slots.helper ? {
|
|
1560
|
-
name: "helper",
|
|
1561
|
-
fn: withCtx(() => [
|
|
1562
|
-
renderSlot(_ctx.$slots, "helper")
|
|
1563
|
-
]),
|
|
1564
|
-
key: "0"
|
|
1565
|
-
} : void 0
|
|
1566
|
-
]), 1032, ["modelValue", "prefix-class", "suffix-class", "size", "label", "disabled", "name", "required"]);
|
|
1567
|
-
};
|
|
1568
|
-
}
|
|
1569
|
-
});
|
|
1570
|
-
function isValidCountryCode(code) {
|
|
1571
|
-
return !!countryData.find((item) => item.key === code);
|
|
1572
|
-
}
|
|
1573
|
-
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
|
|
1574
|
-
symbolProto ? symbolProto.toString : void 0;
|
|
1575
|
-
function baseToString(value) {
|
|
1576
|
-
{
|
|
1577
|
-
return value;
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
function toString(value) {
|
|
1581
|
-
return baseToString(value);
|
|
1582
|
-
}
|
|
1583
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
1584
|
-
var objectProto = Object.prototype;
|
|
1585
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1586
|
-
function isEmpty(value) {
|
|
1587
|
-
if (value == null) {
|
|
1588
|
-
return true;
|
|
1589
|
-
}
|
|
1590
|
-
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
1591
|
-
return !value.length;
|
|
1592
|
-
}
|
|
1593
|
-
var tag = getTag(value);
|
|
1594
|
-
if (tag == mapTag || tag == setTag) {
|
|
1595
|
-
return !value.size;
|
|
1596
|
-
}
|
|
1597
|
-
if (isPrototype(value)) {
|
|
1598
|
-
return !baseKeys(value).length;
|
|
1599
|
-
}
|
|
1600
|
-
for (var key in value) {
|
|
1601
|
-
if (hasOwnProperty.call(value, key)) {
|
|
1602
|
-
return false;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
return true;
|
|
1606
|
-
}
|
|
1607
|
-
var idCounter = 0;
|
|
1608
|
-
function uniqueId(prefix) {
|
|
1609
|
-
var id = ++idCounter;
|
|
1610
|
-
return toString(prefix) + id;
|
|
1611
|
-
}
|
|
1612
|
-
function ownKeys(object, enumerableOnly) {
|
|
1613
|
-
var keys = Object.keys(object);
|
|
1614
|
-
if (Object.getOwnPropertySymbols) {
|
|
1615
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1616
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
1617
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1618
|
-
})), keys.push.apply(keys, symbols);
|
|
1619
|
-
}
|
|
1620
|
-
return keys;
|
|
1621
|
-
}
|
|
1622
|
-
function _objectSpread2(target) {
|
|
1623
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1624
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
1625
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
1626
|
-
_defineProperty(target, key, source[key]);
|
|
1627
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
1628
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
return target;
|
|
1632
|
-
}
|
|
1633
|
-
function _defineProperty(obj, key, value) {
|
|
1634
|
-
if (key in obj) {
|
|
1635
|
-
Object.defineProperty(obj, key, {
|
|
1636
|
-
value,
|
|
1637
|
-
enumerable: true,
|
|
1638
|
-
configurable: true,
|
|
1639
|
-
writable: true
|
|
1640
|
-
});
|
|
1641
|
-
} else {
|
|
1642
|
-
obj[key] = value;
|
|
1643
|
-
}
|
|
1644
|
-
return obj;
|
|
1645
|
-
}
|
|
1646
|
-
function isFunction(val) {
|
|
1647
|
-
return typeof val === "function";
|
|
1648
|
-
}
|
|
1649
|
-
function isObject(o) {
|
|
1650
|
-
return o !== null && typeof o === "object" && !Array.isArray(o);
|
|
1651
|
-
}
|
|
1652
|
-
function normalizeValidatorObject(validator) {
|
|
1653
|
-
return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {
|
|
1654
|
-
$validator: validator
|
|
1655
|
-
};
|
|
1656
|
-
}
|
|
1657
|
-
function unwrapValidatorResponse(result) {
|
|
1658
|
-
if (typeof result === "object") return result.$valid;
|
|
1659
|
-
return result;
|
|
1660
|
-
}
|
|
1661
|
-
function unwrapNormalizedValidator(validator) {
|
|
1662
|
-
return validator.$validator || validator;
|
|
1663
|
-
}
|
|
1664
|
-
function withParams($params, $validator) {
|
|
1665
|
-
if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof $params}`);
|
|
1666
|
-
if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
|
|
1667
|
-
const validatorObj = normalizeValidatorObject($validator);
|
|
1668
|
-
validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);
|
|
1669
|
-
return validatorObj;
|
|
1670
|
-
}
|
|
1671
|
-
function withMessage($message, $validator) {
|
|
1672
|
-
if (!isFunction($message) && typeof unref($message) !== "string") throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof $message}`);
|
|
1673
|
-
if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);
|
|
1674
|
-
const validatorObj = normalizeValidatorObject($validator);
|
|
1675
|
-
validatorObj.$message = $message;
|
|
1676
|
-
return validatorObj;
|
|
1677
|
-
}
|
|
1678
|
-
function withAsync($validator) {
|
|
1679
|
-
let $watchTargets = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1680
|
-
const validatorObj = normalizeValidatorObject($validator);
|
|
1681
|
-
return _objectSpread2(_objectSpread2({}, validatorObj), {}, {
|
|
1682
|
-
$async: true,
|
|
1683
|
-
$watchTargets
|
|
1684
|
-
});
|
|
1685
|
-
}
|
|
1686
|
-
function forEach(validators) {
|
|
1687
|
-
return {
|
|
1688
|
-
$validator(collection) {
|
|
1689
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1690
|
-
others[_key - 1] = arguments[_key];
|
|
1691
|
-
}
|
|
1692
|
-
return unref(collection).reduce((previous, collectionItem, index) => {
|
|
1693
|
-
const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {
|
|
1694
|
-
let [property, $model] = _ref;
|
|
1695
|
-
const innerValidators = validators[property] || {};
|
|
1696
|
-
const propertyResult = Object.entries(innerValidators).reduce((all2, _ref2) => {
|
|
1697
|
-
let [validatorName, currentValidator] = _ref2;
|
|
1698
|
-
const validatorFunction = unwrapNormalizedValidator(currentValidator);
|
|
1699
|
-
const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);
|
|
1700
|
-
const $valid = unwrapValidatorResponse($response);
|
|
1701
|
-
all2.$data[validatorName] = $response;
|
|
1702
|
-
all2.$data.$invalid = !$valid || !!all2.$data.$invalid;
|
|
1703
|
-
all2.$data.$error = all2.$data.$invalid;
|
|
1704
|
-
if (!$valid) {
|
|
1705
|
-
let $message = currentValidator.$message || "";
|
|
1706
|
-
const $params = currentValidator.$params || {};
|
|
1707
|
-
if (typeof $message === "function") {
|
|
1708
|
-
$message = $message({
|
|
1709
|
-
$pending: false,
|
|
1710
|
-
$invalid: !$valid,
|
|
1711
|
-
$params,
|
|
1712
|
-
$model,
|
|
1713
|
-
$response
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
all2.$errors.push({
|
|
1717
|
-
$property: property,
|
|
1718
|
-
$message,
|
|
1719
|
-
$params,
|
|
1720
|
-
$response,
|
|
1721
|
-
$model,
|
|
1722
|
-
$pending: false,
|
|
1723
|
-
$validator: validatorName
|
|
1724
|
-
});
|
|
1725
|
-
}
|
|
1726
|
-
return {
|
|
1727
|
-
$valid: all2.$valid && $valid,
|
|
1728
|
-
$data: all2.$data,
|
|
1729
|
-
$errors: all2.$errors
|
|
1730
|
-
};
|
|
1731
|
-
}, {
|
|
1732
|
-
$valid: true,
|
|
1733
|
-
$data: {},
|
|
1734
|
-
$errors: []
|
|
1735
|
-
});
|
|
1736
|
-
all.$data[property] = propertyResult.$data;
|
|
1737
|
-
all.$errors[property] = propertyResult.$errors;
|
|
1738
|
-
return {
|
|
1739
|
-
$valid: all.$valid && propertyResult.$valid,
|
|
1740
|
-
$data: all.$data,
|
|
1741
|
-
$errors: all.$errors
|
|
1742
|
-
};
|
|
1743
|
-
}, {
|
|
1744
|
-
$valid: true,
|
|
1745
|
-
$data: {},
|
|
1746
|
-
$errors: {}
|
|
1747
|
-
});
|
|
1748
|
-
return {
|
|
1749
|
-
$valid: previous.$valid && collectionEntryResult.$valid,
|
|
1750
|
-
$data: previous.$data.concat(collectionEntryResult.$data),
|
|
1751
|
-
$errors: previous.$errors.concat(collectionEntryResult.$errors)
|
|
1752
|
-
};
|
|
1753
|
-
}, {
|
|
1754
|
-
$valid: true,
|
|
1755
|
-
$data: [],
|
|
1756
|
-
$errors: []
|
|
1757
|
-
});
|
|
1758
|
-
},
|
|
1759
|
-
$message: (_ref3) => {
|
|
1760
|
-
let {
|
|
1761
|
-
$response
|
|
1762
|
-
} = _ref3;
|
|
1763
|
-
return $response ? $response.$errors.map((context) => {
|
|
1764
|
-
return Object.values(context).map((errors) => errors.map((error) => error.$message)).reduce((a, b) => a.concat(b), []);
|
|
1765
|
-
}) : [];
|
|
1766
|
-
}
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
const req = (value) => {
|
|
1770
|
-
value = unref(value);
|
|
1771
|
-
if (Array.isArray(value)) return !!value.length;
|
|
1772
|
-
if (value === void 0 || value === null) {
|
|
1773
|
-
return false;
|
|
1774
|
-
}
|
|
1775
|
-
if (value === false) {
|
|
1776
|
-
return true;
|
|
1777
|
-
}
|
|
1778
|
-
if (value instanceof Date) {
|
|
1779
|
-
return !isNaN(value.getTime());
|
|
1780
|
-
}
|
|
1781
|
-
if (typeof value === "object") {
|
|
1782
|
-
for (let _ in value) return true;
|
|
1783
|
-
return false;
|
|
1784
|
-
}
|
|
1785
|
-
return !!String(value).length;
|
|
1786
|
-
};
|
|
1787
|
-
const len = (value) => {
|
|
1788
|
-
value = unref(value);
|
|
1789
|
-
if (Array.isArray(value)) return value.length;
|
|
1790
|
-
if (typeof value === "object") {
|
|
1791
|
-
return Object.keys(value).length;
|
|
1792
|
-
}
|
|
1793
|
-
return String(value).length;
|
|
1794
|
-
};
|
|
1795
|
-
function regex() {
|
|
1796
|
-
for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1797
|
-
expr[_key] = arguments[_key];
|
|
1798
|
-
}
|
|
1799
|
-
return (value) => {
|
|
1800
|
-
value = unref(value);
|
|
1801
|
-
return !req(value) || expr.every((reg) => {
|
|
1802
|
-
reg.lastIndex = 0;
|
|
1803
|
-
return reg.test(value);
|
|
1804
|
-
});
|
|
1805
|
-
};
|
|
1806
|
-
}
|
|
1807
|
-
var common = /* @__PURE__ */ Object.freeze({
|
|
1808
|
-
__proto__: null,
|
|
1809
|
-
forEach,
|
|
1810
|
-
len,
|
|
1811
|
-
normalizeValidatorObject,
|
|
1812
|
-
regex,
|
|
1813
|
-
req,
|
|
1814
|
-
unwrap: unref,
|
|
1815
|
-
unwrapNormalizedValidator,
|
|
1816
|
-
unwrapValidatorResponse,
|
|
1817
|
-
withAsync,
|
|
1818
|
-
withMessage,
|
|
1819
|
-
withParams
|
|
1820
|
-
});
|
|
1821
|
-
regex(/^[a-zA-Z]*$/);
|
|
1822
|
-
regex(/^[a-zA-Z0-9]*$/);
|
|
1823
|
-
regex(/^\d*(\.\d+)?$/);
|
|
1824
|
-
const emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
|
|
1825
|
-
regex(emailRegex);
|
|
1826
|
-
const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
|
1827
|
-
regex(urlRegex);
|
|
1828
|
-
regex(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
1829
|
-
regex(/^[-]?\d*(\.\d+)?$/);
|
|
1830
|
-
const taxIdMap = {
|
|
1831
|
-
AT: {
|
|
1832
|
-
regex: /^ATU\d{8}$/,
|
|
1833
|
-
prefix: "AT",
|
|
1834
|
-
example: "ATU12345678"
|
|
1835
|
-
},
|
|
1836
|
-
BE: {
|
|
1837
|
-
regex: /^BE0?\d{9}$/,
|
|
1838
|
-
prefix: "BE",
|
|
1839
|
-
example: "BE0123456789"
|
|
1840
|
-
},
|
|
1841
|
-
BG: {
|
|
1842
|
-
regex: /^BG\d{9,10}$/,
|
|
1843
|
-
prefix: "BG",
|
|
1844
|
-
example: "BG123456789"
|
|
1845
|
-
},
|
|
1846
|
-
HR: {
|
|
1847
|
-
regex: /^HR\d{11}$/,
|
|
1848
|
-
prefix: "HR",
|
|
1849
|
-
example: "HR12345678901"
|
|
1850
|
-
},
|
|
1851
|
-
CY: {
|
|
1852
|
-
regex: /^CY\d{8}[A-Z]$/,
|
|
1853
|
-
prefix: "CY",
|
|
1854
|
-
example: "CY12345678X"
|
|
1855
|
-
},
|
|
1856
|
-
CZ: {
|
|
1857
|
-
regex: /^CZ\d{8,10}$/,
|
|
1858
|
-
prefix: "CZ",
|
|
1859
|
-
example: "CZ12345678"
|
|
1860
|
-
},
|
|
1861
|
-
DE: {
|
|
1862
|
-
regex: /^DE\d{9}$/,
|
|
1863
|
-
prefix: "DE",
|
|
1864
|
-
example: "DE123456789"
|
|
1865
|
-
},
|
|
1866
|
-
DK: {
|
|
1867
|
-
regex: /^DK\d{8}$/,
|
|
1868
|
-
prefix: "DK",
|
|
1869
|
-
example: "DK12345678"
|
|
1870
|
-
},
|
|
1871
|
-
EE: {
|
|
1872
|
-
regex: /^EE\d{9}$/,
|
|
1873
|
-
prefix: "EE",
|
|
1874
|
-
example: "EE123456789"
|
|
1875
|
-
},
|
|
1876
|
-
GR: {
|
|
1877
|
-
regex: /^(EL|GR)\d{9}$/,
|
|
1878
|
-
prefix: "GR",
|
|
1879
|
-
example: "GR123456789"
|
|
1880
|
-
},
|
|
1881
|
-
ES: {
|
|
1882
|
-
regex: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
|
|
1883
|
-
prefix: "ES",
|
|
1884
|
-
example: "ESX1234567X"
|
|
1885
|
-
},
|
|
1886
|
-
FI: {
|
|
1887
|
-
regex: /^FI\d{8}$/,
|
|
1888
|
-
prefix: "FI",
|
|
1889
|
-
example: "FI12345678"
|
|
1890
|
-
},
|
|
1891
|
-
FR: {
|
|
1892
|
-
regex: /^FR[0-9A-Z]{2}\d{9}$/,
|
|
1893
|
-
prefix: "FR",
|
|
1894
|
-
example: "FRXX123456789"
|
|
1895
|
-
},
|
|
1896
|
-
HU: {
|
|
1897
|
-
regex: /^HU\d{8}$/,
|
|
1898
|
-
prefix: "HU",
|
|
1899
|
-
example: "HU12345678"
|
|
1900
|
-
},
|
|
1901
|
-
IE: {
|
|
1902
|
-
regex: /^IE[0-9A-Z]{8,9}$/,
|
|
1903
|
-
prefix: "IE",
|
|
1904
|
-
example: "IE1234567A"
|
|
1905
|
-
},
|
|
1906
|
-
IS: {
|
|
1907
|
-
regex: /^IS\d{5}$/,
|
|
1908
|
-
prefix: "IS",
|
|
1909
|
-
example: "IS12345"
|
|
1910
|
-
},
|
|
1911
|
-
IT: {
|
|
1912
|
-
regex: /^IT\d{11}$/,
|
|
1913
|
-
prefix: "IT",
|
|
1914
|
-
example: "IT12345678901"
|
|
1915
|
-
},
|
|
1916
|
-
LT: {
|
|
1917
|
-
regex: /^LT(\d{9}|\d{12})$/,
|
|
1918
|
-
prefix: "LT",
|
|
1919
|
-
example: "LT123456789 or LT123456789012"
|
|
1920
|
-
},
|
|
1921
|
-
LU: {
|
|
1922
|
-
regex: /^LU\d{8}$/,
|
|
1923
|
-
prefix: "LU",
|
|
1924
|
-
example: "LU12345678"
|
|
1925
|
-
},
|
|
1926
|
-
LV: {
|
|
1927
|
-
regex: /^LV\d{11}$/,
|
|
1928
|
-
prefix: "LV",
|
|
1929
|
-
example: "LV12345678901"
|
|
1930
|
-
},
|
|
1931
|
-
ME: {
|
|
1932
|
-
regex: /^ME\d{9}$/,
|
|
1933
|
-
prefix: "ME",
|
|
1934
|
-
example: "ME123456789"
|
|
1935
|
-
},
|
|
1936
|
-
MT: {
|
|
1937
|
-
regex: /^MT\d{8}$/,
|
|
1938
|
-
prefix: "MT",
|
|
1939
|
-
example: "MT12345678"
|
|
1940
|
-
},
|
|
1941
|
-
NL: {
|
|
1942
|
-
regex: /^NL\d{9}B\d{2}$/,
|
|
1943
|
-
prefix: "NL",
|
|
1944
|
-
example: "NL123456789B01"
|
|
1945
|
-
},
|
|
1946
|
-
PL: {
|
|
1947
|
-
regex: /^PL\d{10}$/,
|
|
1948
|
-
prefix: "PL",
|
|
1949
|
-
example: "PL1234567890"
|
|
1950
|
-
},
|
|
1951
|
-
PT: {
|
|
1952
|
-
regex: /^PT\d{9}$/,
|
|
1953
|
-
prefix: "PT",
|
|
1954
|
-
example: "PT123456789"
|
|
1955
|
-
},
|
|
1956
|
-
RO: {
|
|
1957
|
-
regex: /^RO\d{2,10}$/,
|
|
1958
|
-
prefix: "RO",
|
|
1959
|
-
example: "RO1234567890"
|
|
1960
|
-
},
|
|
1961
|
-
RU: {
|
|
1962
|
-
regex: /^RU(\d{9}|\d{10}|\d{12})$/,
|
|
1963
|
-
prefix: "RU",
|
|
1964
|
-
example: "RU123456789 or RU1234567890 or RU123456789012"
|
|
1965
|
-
},
|
|
1966
|
-
SE: {
|
|
1967
|
-
regex: /^SE\d{10}01$/,
|
|
1968
|
-
prefix: "SE",
|
|
1969
|
-
example: "SE123456789001"
|
|
1970
|
-
},
|
|
1971
|
-
SI: {
|
|
1972
|
-
regex: /^SI\d{8}$/,
|
|
1973
|
-
prefix: "SI",
|
|
1974
|
-
example: "SI12345678"
|
|
1975
|
-
},
|
|
1976
|
-
SK: {
|
|
1977
|
-
regex: /^SK\d{10}$/,
|
|
1978
|
-
prefix: "SK",
|
|
1979
|
-
example: "SK1234567890"
|
|
1980
|
-
},
|
|
1981
|
-
CH: {
|
|
1982
|
-
regex: /^CHE\d{9}(MWST|TVA|IVA)?$/,
|
|
1983
|
-
prefix: "CHE",
|
|
1984
|
-
example: "CHE123456789MWST"
|
|
1985
|
-
},
|
|
1986
|
-
NO: {
|
|
1987
|
-
regex: /^NO\d{9}MVA$/,
|
|
1988
|
-
prefix: "NO",
|
|
1989
|
-
example: "NO123456789MVA"
|
|
1990
|
-
},
|
|
1991
|
-
GB: {
|
|
1992
|
-
regex: /^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,
|
|
1993
|
-
prefix: "GB",
|
|
1994
|
-
example: "GB123456789"
|
|
1995
|
-
},
|
|
1996
|
-
XI: {
|
|
1997
|
-
regex: /^XI(\d{9}|\d{12})$/,
|
|
1998
|
-
prefix: "XI",
|
|
1999
|
-
example: "XI123456789"
|
|
2000
|
-
}
|
|
2001
|
-
};
|
|
2002
|
-
const taxIdValidator = (value) => {
|
|
2003
|
-
if (!value || typeof value !== "string" || value.trim() === "") {
|
|
2004
|
-
return true;
|
|
2005
|
-
}
|
|
2006
|
-
return Object.values(taxIdMap).some((entry) => entry.regex.test(value));
|
|
2007
|
-
};
|
|
2008
|
-
const getTaxIdMessage = ({ $model }) => {
|
|
2009
|
-
if (!$model || typeof $model !== "string" || $model.trim() === "") {
|
|
2010
|
-
return "";
|
|
2011
|
-
}
|
|
2012
|
-
const intl = inject(I18N_INJECTION_KEY, null);
|
|
2013
|
-
if (!intl) {
|
|
2014
|
-
return "Invalid tax ID";
|
|
2015
|
-
}
|
|
2016
|
-
const { formatMessage } = intl;
|
|
2017
|
-
const matchingEntry = Object.values(taxIdMap).find(
|
|
2018
|
-
(entry) => $model.toUpperCase().startsWith(entry.prefix.toUpperCase())
|
|
2019
|
-
);
|
|
2020
|
-
if (matchingEntry) {
|
|
2021
|
-
return formatMessage(
|
|
2022
|
-
{
|
|
2023
|
-
defaultMessage: "Invalid tax ID format. Example: {example}",
|
|
2024
|
-
id: "form_validation.tax_id.invalid_format",
|
|
2025
|
-
description: "Error message when tax ID format is invalid but prefix matches"
|
|
2026
|
-
},
|
|
2027
|
-
{ example: matchingEntry.example }
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
return formatMessage({
|
|
2031
|
-
defaultMessage: "Invalid tax ID",
|
|
2032
|
-
id: "taxId.invalid",
|
|
2033
|
-
description: "Error message when tax ID is invalid"
|
|
2034
|
-
});
|
|
2035
|
-
};
|
|
2036
|
-
const taxId = common.withMessage(getTaxIdMessage, taxIdValidator);
|
|
1
|
+
import { ref, computed, onMounted, watch, defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, useModel, createElementBlock, withModifiers, Fragment, createCommentVNode, createSlots, normalizeClass, mergeModels, renderSlot, renderList, toRef, nextTick, withDirectives, withKeys, vShow, defineAsyncComponent } from "vue";
|
|
2
|
+
import { $ as taxId, a0 as convertDateRangeToTimePeriod, H as useValidation, J as objectDiff, u as useIntl, a1 as _sfc_main$q, _ as _sfc_main$r, a2 as isEUCountry, a3 as isValidCountryCode, a4 as getCountryNameByCode, b as _sfc_main$s, M as _sfc_main$t, N as _sfc_main$u, e as _sfc_main$v, a5 as _sfc_main$w, O as _sfc_main$x, a6 as _sfc_main$y, a7 as _sfc_main$z, a8 as _sfc_main$A, a9 as TooltipContent, aa as _sfc_main$B, ab as formatBillingPeriod, v as formatAmount, ac as _sfc_main$D, ad as useTimePeriod, f as _sfc_main$E, ae as _sfc_main$G, af as _sfc_main$H, ag as _sfc_main$I, t as _sfc_main$J, D as _sfc_main$L, ah as _sfc_main$M, ai as usePricingItem, aj as _sfc_main$N, ak as _sfc_main$O, A as _sfc_main$P } from "../../vendor-ui-BwxuPDg8.mjs";
|
|
3
|
+
import { a as useLogger, _ as _sfc_main$Q, d as defineCustomElement, g as getComponentName } from "../../component-CM9g6tbD.mjs";
|
|
4
|
+
import { c as createSubscriptionsService } from "../../subscriptions-mOgjjzUi.mjs";
|
|
5
|
+
import { A as ApiStatus } from "../../ApiStatus-CyNDp_op.mjs";
|
|
6
|
+
import { i as isEqual, u as useService, a as isEmpty } from "../../useService-BuWWE5ND.mjs";
|
|
7
|
+
import { c as createInvoicesService } from "../../invoices-BuVOuTOm.mjs";
|
|
8
|
+
import { a as requiredIf, r as required, e as email } from "../../index-CzL1ZcGi.mjs";
|
|
9
|
+
import { u as useWatchDebounced } from "../../useWatchDebounced-D1xuIX6_.mjs";
|
|
10
|
+
import { c as createPaymentMethodsService } from "../../paymentMethods-Di32oJ39.mjs";
|
|
11
|
+
import { u as usePortal } from "../../usePortal-DJDJNLbo.mjs";
|
|
12
|
+
import { c as createCustomerService } from "../../customer-TIi7iZFw.mjs";
|
|
13
|
+
import { _ as _sfc_main$C, l as loadAdyen, e as getAdyenExpressCheckoutConfiguration, c as transformObjectToAdyenObject, d as createReturnUrl, s as safeUrlRedirect } from "../../adyenLoader-gsbzSjYV.mjs";
|
|
14
|
+
import { _ as _sfc_main$F } from "../../PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs";
|
|
15
|
+
import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
|
|
16
|
+
import { _ as _sfc_main$K } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
17
|
+
import { c as createPaymentsService } from "../../payments-C5fD1PXB.mjs";
|
|
18
|
+
import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-BTdixy3L.mjs";
|
|
2037
19
|
function getFirstPricingPlanScheduleOfType({
|
|
2038
20
|
pricingPlanScheduleInfos,
|
|
2039
21
|
type
|
|
@@ -2056,12 +38,12 @@ function getPricingItemConfigMetaById({
|
|
|
2056
38
|
(_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach((billingConfig) => {
|
|
2057
39
|
var _a4;
|
|
2058
40
|
(_a4 = billingConfig.configs) == null ? void 0 : _a4.forEach((config) => {
|
|
2059
|
-
var _a5, _b2, _c2;
|
|
41
|
+
var _a5, _b2, _c2, _d;
|
|
2060
42
|
if (config.id) {
|
|
2061
|
-
const currency = (_c2 = (_b2 = (_a5 = config.
|
|
43
|
+
const currency = (_d = (_c2 = (_b2 = (_a5 = config.details) == null ? void 0 : _a5.bands) == null ? void 0 : _b2.find((band) => {
|
|
2062
44
|
var _a6;
|
|
2063
45
|
return (_a6 = band.amount) == null ? void 0 : _a6.currency;
|
|
2064
|
-
})) == null ? void 0 :
|
|
46
|
+
})) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
|
|
2065
47
|
metaById.set(config.id, {
|
|
2066
48
|
...currency && { currency },
|
|
2067
49
|
billingPeriod: billingConfig.billing_period
|
|
@@ -2070,12 +52,12 @@ function getPricingItemConfigMetaById({
|
|
|
2070
52
|
});
|
|
2071
53
|
});
|
|
2072
54
|
(_b = item.configs) == null ? void 0 : _b.forEach((config) => {
|
|
2073
|
-
var _a4, _b2, _c2;
|
|
55
|
+
var _a4, _b2, _c2, _d;
|
|
2074
56
|
if (config.id) {
|
|
2075
|
-
const currency = (_c2 = (_b2 = (_a4 = config.
|
|
57
|
+
const currency = (_d = (_c2 = (_b2 = (_a4 = config.details) == null ? void 0 : _a4.bands) == null ? void 0 : _b2.find((band) => {
|
|
2076
58
|
var _a5;
|
|
2077
59
|
return (_a5 = band.amount) == null ? void 0 : _a5.currency;
|
|
2078
|
-
})) == null ? void 0 :
|
|
60
|
+
})) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
|
|
2079
61
|
metaById.set(config.id, {
|
|
2080
62
|
...currency && { currency }
|
|
2081
63
|
});
|
|
@@ -2501,7 +483,7 @@ const useInvoicePreview = () => {
|
|
|
2501
483
|
}
|
|
2502
484
|
};
|
|
2503
485
|
const cachedPayload = cachedPreviewPayloads.value[periodKey];
|
|
2504
|
-
if (cachedPayload && isEqual
|
|
486
|
+
if (cachedPayload && isEqual(payload, cachedPayload)) {
|
|
2505
487
|
return { periodKey, response: void 0 };
|
|
2506
488
|
}
|
|
2507
489
|
cachedPreviewPayloads.value = {
|
|
@@ -2592,7 +574,7 @@ function useCheckoutForm({
|
|
|
2592
574
|
const updateInitialState = (state) => {
|
|
2593
575
|
const newState = getInitialState({ ...form.value, ...state });
|
|
2594
576
|
form.value = newState;
|
|
2595
|
-
initialFormState.value =
|
|
577
|
+
initialFormState.value = structuredClone(newState);
|
|
2596
578
|
};
|
|
2597
579
|
const requiredFields = computed(
|
|
2598
580
|
() => getRequiredFieldsForCountry(form.value.country)
|
|
@@ -2643,9 +625,7 @@ function useCheckoutForm({
|
|
|
2643
625
|
onMounted(async () => {
|
|
2644
626
|
await getCountryFromGeoLocationService(initialState == null ? void 0 : initialState.country);
|
|
2645
627
|
});
|
|
2646
|
-
|
|
2647
|
-
debounce: 200
|
|
2648
|
-
});
|
|
628
|
+
useWatchDebounced(() => structuredClone(form.value), handleFormChange, { debounce: 200 });
|
|
2649
629
|
return {
|
|
2650
630
|
form,
|
|
2651
631
|
validation,
|
|
@@ -2695,7 +675,7 @@ const usePaymentMethodOptions = () => {
|
|
|
2695
675
|
country,
|
|
2696
676
|
amount
|
|
2697
677
|
};
|
|
2698
|
-
if (isEqual
|
|
678
|
+
if (isEqual(payload, cachedPayload.value)) {
|
|
2699
679
|
return;
|
|
2700
680
|
}
|
|
2701
681
|
cachedPayload.value = payload;
|
|
@@ -3023,7 +1003,7 @@ function useCheckoutView({
|
|
|
3023
1003
|
} catch {
|
|
3024
1004
|
}
|
|
3025
1005
|
});
|
|
3026
|
-
|
|
1006
|
+
watch(shouldLoadPaymentMethodOptions, (shouldLoad) => {
|
|
3027
1007
|
if (shouldLoad) {
|
|
3028
1008
|
void loadPaymentMethodOptions({
|
|
3029
1009
|
subscriptionId: subscription.value.id,
|
|
@@ -3031,7 +1011,7 @@ function useCheckoutView({
|
|
|
3031
1011
|
amount: amount.value
|
|
3032
1012
|
});
|
|
3033
1013
|
}
|
|
3034
|
-
});
|
|
1014
|
+
}, { once: true });
|
|
3035
1015
|
return {
|
|
3036
1016
|
invoicePreview: invoicePreview.invoicePreview,
|
|
3037
1017
|
invoicePreviewByBillingPeriod: invoicePreview.invoicePreviewByBillingPeriod,
|
|
@@ -3126,8 +1106,8 @@ function usePromotionCode({
|
|
|
3126
1106
|
function isFieldError(error) {
|
|
3127
1107
|
return typeof error === "object" && error !== null && "field" in error;
|
|
3128
1108
|
}
|
|
3129
|
-
const _hoisted_1$
|
|
3130
|
-
const _sfc_main$
|
|
1109
|
+
const _hoisted_1$m = { class: "flex items-center gap-2" };
|
|
1110
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
3131
1111
|
__name: "TaxIDCheckNotice",
|
|
3132
1112
|
props: {
|
|
3133
1113
|
taxIdValidationResult: { type: Object }
|
|
@@ -3141,22 +1121,22 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
3141
1121
|
const taxIdValidationMessage = computed(() => {
|
|
3142
1122
|
return isTaxIdValid.value ? formatMessage({
|
|
3143
1123
|
defaultMessage: "VAT number is valid.",
|
|
3144
|
-
id: "
|
|
1124
|
+
id: "tax_check.valid_vat_number",
|
|
3145
1125
|
description: "The message shown when the VAT number is valid"
|
|
3146
1126
|
}) : formatMessage({
|
|
3147
1127
|
defaultMessage: "VAT number is invalid.",
|
|
3148
|
-
id: "
|
|
1128
|
+
id: "tax_check.invalid_vat_number",
|
|
3149
1129
|
description: "The message shown when the VAT number is invalid"
|
|
3150
1130
|
});
|
|
3151
1131
|
});
|
|
3152
1132
|
return (_ctx, _cache) => {
|
|
3153
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
1133
|
+
return openBlock(), createBlock(unref(_sfc_main$q), {
|
|
3154
1134
|
type: isTaxIdValid.value ? "success" : "danger",
|
|
3155
1135
|
icon: false
|
|
3156
1136
|
}, {
|
|
3157
1137
|
default: withCtx(() => [
|
|
3158
|
-
createElementVNode("div", _hoisted_1$
|
|
3159
|
-
createVNode(unref(_sfc_main$
|
|
1138
|
+
createElementVNode("div", _hoisted_1$m, [
|
|
1139
|
+
createVNode(unref(_sfc_main$r), { variant: "body-xs" }, {
|
|
3160
1140
|
default: withCtx(() => [
|
|
3161
1141
|
createTextVNode(toDisplayString(taxIdValidationMessage.value), 1)
|
|
3162
1142
|
]),
|
|
@@ -3221,16 +1201,16 @@ function useTaxIDValidationCheck(form) {
|
|
|
3221
1201
|
isSelectedCountryEU
|
|
3222
1202
|
};
|
|
3223
1203
|
}
|
|
3224
|
-
const _hoisted_1$
|
|
3225
|
-
const _hoisted_2$
|
|
3226
|
-
const _hoisted_3$
|
|
1204
|
+
const _hoisted_1$l = { class: "grid grid-cols-1 gap-1" };
|
|
1205
|
+
const _hoisted_2$d = { class: "grid grid-cols-1 gap-2" };
|
|
1206
|
+
const _hoisted_3$6 = { key: 0 };
|
|
3227
1207
|
const _hoisted_4$4 = { class: "mt-2 flex flex-col gap-3" };
|
|
3228
1208
|
const _hoisted_5$2 = { class: "grid grid-cols-3 gap-2" };
|
|
3229
1209
|
const _hoisted_6$1 = { class: "flex grow flex-col" };
|
|
3230
1210
|
const _hoisted_7$1 = { key: 0 };
|
|
3231
1211
|
const _hoisted_8$1 = { class: "mt-4 grid grid-cols-1 gap-3" };
|
|
3232
1212
|
const FORM_ID = "checkout-form";
|
|
3233
|
-
const _sfc_main$
|
|
1213
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
3234
1214
|
__name: "CheckoutForm",
|
|
3235
1215
|
props: /* @__PURE__ */ mergeModels({
|
|
3236
1216
|
validation: { type: null },
|
|
@@ -3283,8 +1263,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3283
1263
|
id: FORM_ID,
|
|
3284
1264
|
onSubmit: _cache[12] || (_cache[12] = withModifiers(($event) => _ctx.$emit("submit", model.value), ["prevent"]))
|
|
3285
1265
|
}, [
|
|
3286
|
-
createElementVNode("div", _hoisted_1$
|
|
3287
|
-
createVNode(unref(_sfc_main$
|
|
1266
|
+
createElementVNode("div", _hoisted_1$l, [
|
|
1267
|
+
createVNode(unref(_sfc_main$s), {
|
|
3288
1268
|
title: unref($t)({
|
|
3289
1269
|
defaultMessage: "Customer information",
|
|
3290
1270
|
id: "checkout.contact_information_block.title",
|
|
@@ -3292,9 +1272,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3292
1272
|
})
|
|
3293
1273
|
}, {
|
|
3294
1274
|
default: withCtx(() => [
|
|
3295
|
-
createElementVNode("div", _hoisted_2$
|
|
1275
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
3296
1276
|
__props.readOnly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3297
|
-
createVNode(unref(_sfc_main$
|
|
1277
|
+
createVNode(unref(_sfc_main$r), {
|
|
3298
1278
|
variant: "body",
|
|
3299
1279
|
tag: "span",
|
|
3300
1280
|
weight: "semibold",
|
|
@@ -3305,7 +1285,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3305
1285
|
]),
|
|
3306
1286
|
_: 1
|
|
3307
1287
|
}),
|
|
3308
|
-
createVNode(unref(_sfc_main$
|
|
1288
|
+
createVNode(unref(_sfc_main$r), {
|
|
3309
1289
|
variant: "body-sm",
|
|
3310
1290
|
tag: "span",
|
|
3311
1291
|
shade: "lighter",
|
|
@@ -3317,7 +1297,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3317
1297
|
_: 1
|
|
3318
1298
|
})
|
|
3319
1299
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3320
|
-
createVNode(unref(_sfc_main$
|
|
1300
|
+
createVNode(unref(_sfc_main$t), {
|
|
3321
1301
|
modelValue: model.value.email,
|
|
3322
1302
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.email = $event),
|
|
3323
1303
|
required: "",
|
|
@@ -3336,7 +1316,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3336
1316
|
}) + getOptionalSuffix("email"),
|
|
3337
1317
|
error: __props.validation.value.email.$errors
|
|
3338
1318
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
|
|
3339
|
-
createVNode(unref(_sfc_main$
|
|
1319
|
+
createVNode(unref(_sfc_main$u), {
|
|
3340
1320
|
"single-model-value": country.value,
|
|
3341
1321
|
"onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) => country.value = $event),
|
|
3342
1322
|
required: "",
|
|
@@ -3349,7 +1329,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3349
1329
|
error: __props.validation.value.country.$errors
|
|
3350
1330
|
}, {
|
|
3351
1331
|
"label-suffix": withCtx(() => [
|
|
3352
|
-
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1332
|
+
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
3353
1333
|
key: 0,
|
|
3354
1334
|
size: "xs",
|
|
3355
1335
|
variant: "ghost",
|
|
@@ -3366,7 +1346,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3366
1346
|
]),
|
|
3367
1347
|
_: 1
|
|
3368
1348
|
})) : createCommentVNode("", true),
|
|
3369
|
-
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1349
|
+
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
3370
1350
|
key: 1,
|
|
3371
1351
|
size: "sm",
|
|
3372
1352
|
variant: "ghost",
|
|
@@ -3388,11 +1368,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3388
1368
|
}, 8, ["single-model-value", "label", "error"])
|
|
3389
1369
|
], 64))
|
|
3390
1370
|
]),
|
|
3391
|
-
createVNode(unref(_sfc_main$
|
|
1371
|
+
createVNode(unref(_sfc_main$w), null, {
|
|
3392
1372
|
default: withCtx(() => [
|
|
3393
|
-
showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1373
|
+
showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
3394
1374
|
createElementVNode("div", _hoisted_4$4, [
|
|
3395
|
-
createVNode(unref(_sfc_main$
|
|
1375
|
+
createVNode(unref(_sfc_main$t), {
|
|
3396
1376
|
modelValue: model.value.addressLine1,
|
|
3397
1377
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => model.value.addressLine1 = $event),
|
|
3398
1378
|
name: "address_line_1",
|
|
@@ -3409,7 +1389,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3409
1389
|
required: "",
|
|
3410
1390
|
error: __props.validation.value.addressLine1.$errors
|
|
3411
1391
|
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
3412
|
-
createVNode(unref(_sfc_main$
|
|
1392
|
+
createVNode(unref(_sfc_main$t), {
|
|
3413
1393
|
modelValue: model.value.addressLine2,
|
|
3414
1394
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => model.value.addressLine2 = $event),
|
|
3415
1395
|
name: "address_line_2",
|
|
@@ -3420,7 +1400,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3420
1400
|
}) + getOptionalSuffix("addressLine2")
|
|
3421
1401
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3422
1402
|
createElementVNode("div", _hoisted_5$2, [
|
|
3423
|
-
createVNode(unref(_sfc_main$
|
|
1403
|
+
createVNode(unref(_sfc_main$t), {
|
|
3424
1404
|
modelValue: model.value.postalCode,
|
|
3425
1405
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => model.value.postalCode = $event),
|
|
3426
1406
|
name: "postal_code",
|
|
@@ -3431,7 +1411,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3431
1411
|
}) + getOptionalSuffix("postalCode"),
|
|
3432
1412
|
error: __props.validation.value.addressLine1.$errors
|
|
3433
1413
|
}, null, 8, ["modelValue", "placeholder", "error"]),
|
|
3434
|
-
createVNode(unref(_sfc_main$
|
|
1414
|
+
createVNode(unref(_sfc_main$t), {
|
|
3435
1415
|
modelValue: model.value.city,
|
|
3436
1416
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => model.value.city = $event),
|
|
3437
1417
|
name: "city",
|
|
@@ -3441,7 +1421,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3441
1421
|
description: "City of the customer address in the checkout form"
|
|
3442
1422
|
}) + getOptionalSuffix("city")
|
|
3443
1423
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3444
|
-
createVNode(unref(_sfc_main$
|
|
1424
|
+
createVNode(unref(_sfc_main$t), {
|
|
3445
1425
|
modelValue: model.value.state,
|
|
3446
1426
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => model.value.state = $event),
|
|
3447
1427
|
name: "state",
|
|
@@ -3461,9 +1441,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3461
1441
|
]),
|
|
3462
1442
|
_: 1
|
|
3463
1443
|
}, 8, ["title"]),
|
|
3464
|
-
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1444
|
+
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$s), { key: 0 }, {
|
|
3465
1445
|
default: withCtx(() => [
|
|
3466
|
-
createVNode(unref(_sfc_main$
|
|
1446
|
+
createVNode(unref(_sfc_main$x), {
|
|
3467
1447
|
modelValue: companyPurchaseModel.value,
|
|
3468
1448
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => companyPurchaseModel.value = $event),
|
|
3469
1449
|
"no-spacing": "",
|
|
@@ -3472,7 +1452,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3472
1452
|
}, {
|
|
3473
1453
|
"inline-label": withCtx(() => [
|
|
3474
1454
|
createElementVNode("div", _hoisted_6$1, [
|
|
3475
|
-
createVNode(unref(_sfc_main$
|
|
1455
|
+
createVNode(unref(_sfc_main$r), { tag: "span" }, {
|
|
3476
1456
|
default: withCtx(() => [
|
|
3477
1457
|
createTextVNode(toDisplayString(unref($t)({
|
|
3478
1458
|
defaultMessage: "Company purchase",
|
|
@@ -3482,7 +1462,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3482
1462
|
]),
|
|
3483
1463
|
_: 1
|
|
3484
1464
|
}),
|
|
3485
|
-
createVNode(unref(_sfc_main$
|
|
1465
|
+
createVNode(unref(_sfc_main$r), {
|
|
3486
1466
|
tag: "span",
|
|
3487
1467
|
variant: "body-xs",
|
|
3488
1468
|
shade: "lighter"
|
|
@@ -3500,11 +1480,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3500
1480
|
]),
|
|
3501
1481
|
_: 1
|
|
3502
1482
|
}, 8, ["modelValue"]),
|
|
3503
|
-
createVNode(unref(_sfc_main$
|
|
1483
|
+
createVNode(unref(_sfc_main$w), null, {
|
|
3504
1484
|
default: withCtx(() => [
|
|
3505
1485
|
isCompanyPurchase.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
3506
1486
|
createElementVNode("div", _hoisted_8$1, [
|
|
3507
|
-
createVNode(unref(_sfc_main$
|
|
1487
|
+
createVNode(unref(_sfc_main$t), {
|
|
3508
1488
|
modelValue: model.value.companyLegalName,
|
|
3509
1489
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyLegalName = $event),
|
|
3510
1490
|
required: "",
|
|
@@ -3520,7 +1500,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3520
1500
|
description: "The legal name of the organization customer in the checkout form"
|
|
3521
1501
|
})
|
|
3522
1502
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
3523
|
-
showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1503
|
+
showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$t), {
|
|
3524
1504
|
key: 0,
|
|
3525
1505
|
modelValue: model.value.companyVatNumber,
|
|
3526
1506
|
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => model.value.companyVatNumber = $event),
|
|
@@ -3542,7 +1522,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3542
1522
|
unref(isEUCountry)(model.value.country ?? "") ? {
|
|
3543
1523
|
name: "suffix",
|
|
3544
1524
|
fn: withCtx(() => [
|
|
3545
|
-
createVNode(unref(_sfc_main$
|
|
1525
|
+
createVNode(unref(_sfc_main$v), {
|
|
3546
1526
|
type: "button",
|
|
3547
1527
|
size: "sm",
|
|
3548
1528
|
color: "green",
|
|
@@ -3566,7 +1546,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3566
1546
|
key: 1,
|
|
3567
1547
|
class: normalizeClass({ "opacity-75": unref(isTaxIDCheckPending) })
|
|
3568
1548
|
}, [
|
|
3569
|
-
createVNode(_sfc_main$
|
|
1549
|
+
createVNode(_sfc_main$p, { "tax-id-validation-result": unref(taxIdValidationData) }, null, 8, ["tax-id-validation-result"])
|
|
3570
1550
|
], 2)) : createCommentVNode("", true)
|
|
3571
1551
|
])
|
|
3572
1552
|
])) : createCommentVNode("", true)
|
|
@@ -3581,13 +1561,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3581
1561
|
};
|
|
3582
1562
|
}
|
|
3583
1563
|
});
|
|
3584
|
-
const _hoisted_1$
|
|
1564
|
+
const _hoisted_1$k = {
|
|
3585
1565
|
key: 0,
|
|
3586
1566
|
class: "flex items-center"
|
|
3587
1567
|
};
|
|
3588
|
-
const _hoisted_2$
|
|
3589
|
-
const _hoisted_3$
|
|
3590
|
-
const _sfc_main$
|
|
1568
|
+
const _hoisted_2$c = ["innerHTML"];
|
|
1569
|
+
const _hoisted_3$5 = ["innerHTML"];
|
|
1570
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3591
1571
|
__name: "CheckoutTitle",
|
|
3592
1572
|
props: {
|
|
3593
1573
|
trialPeriod: { type: Object },
|
|
@@ -3603,7 +1583,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3603
1583
|
return (_ctx, _cache) => {
|
|
3604
1584
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3605
1585
|
createElementVNode("div", null, [
|
|
3606
|
-
createVNode(unref(_sfc_main$
|
|
1586
|
+
createVNode(unref(_sfc_main$r), {
|
|
3607
1587
|
variant: "heading-1",
|
|
3608
1588
|
class: "inline-block"
|
|
3609
1589
|
}, {
|
|
@@ -3613,7 +1593,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3613
1593
|
id: "checkout.page_title",
|
|
3614
1594
|
description: "The title of the checkout page"
|
|
3615
1595
|
})) + toDisplayString(" "), 1),
|
|
3616
|
-
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1596
|
+
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
3617
1597
|
key: 0,
|
|
3618
1598
|
"trial-period": __props.trialPeriod,
|
|
3619
1599
|
size: "lg",
|
|
@@ -3623,18 +1603,18 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3623
1603
|
_: 1
|
|
3624
1604
|
})
|
|
3625
1605
|
]),
|
|
3626
|
-
createVNode(unref(_sfc_main$
|
|
1606
|
+
createVNode(unref(_sfc_main$r), {
|
|
3627
1607
|
variant: "body-sm",
|
|
3628
1608
|
shade: "lighter",
|
|
3629
1609
|
"no-spacing": ""
|
|
3630
1610
|
}, {
|
|
3631
1611
|
default: withCtx(() => [
|
|
3632
|
-
!__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3633
|
-
createVNode(unref(_sfc_main$
|
|
1612
|
+
!__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$k, [
|
|
1613
|
+
createVNode(unref(_sfc_main$z), { "is-dark-mode": "" }, {
|
|
3634
1614
|
tooltip: withCtx(() => [
|
|
3635
1615
|
createVNode(unref(TooltipContent), null, {
|
|
3636
1616
|
default: withCtx(() => [
|
|
3637
|
-
createVNode(unref(_sfc_main$
|
|
1617
|
+
createVNode(unref(_sfc_main$B), null, {
|
|
3638
1618
|
default: withCtx(() => [
|
|
3639
1619
|
createTextVNode(toDisplayString(unref($t)({
|
|
3640
1620
|
defaultMessage: "Will be determined by billing information",
|
|
@@ -3649,7 +1629,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3649
1629
|
})
|
|
3650
1630
|
]),
|
|
3651
1631
|
default: withCtx(() => [
|
|
3652
|
-
createVNode(unref(_sfc_main$
|
|
1632
|
+
createVNode(unref(_sfc_main$A), {
|
|
3653
1633
|
"width-class": "w-10",
|
|
3654
1634
|
"height-class": "h-4",
|
|
3655
1635
|
shade: "darker",
|
|
@@ -3686,7 +1666,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3686
1666
|
})
|
|
3687
1667
|
}
|
|
3688
1668
|
)
|
|
3689
|
-
}, null, 8, _hoisted_2$
|
|
1669
|
+
}, null, 8, _hoisted_2$c)
|
|
3690
1670
|
])) : (openBlock(), createElementBlock("span", {
|
|
3691
1671
|
key: 1,
|
|
3692
1672
|
innerHTML: __props.trialStartDate ? unref($t)(
|
|
@@ -3722,7 +1702,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3722
1702
|
strong: (text) => `<strong>${text}</strong>`
|
|
3723
1703
|
}
|
|
3724
1704
|
)
|
|
3725
|
-
}, null, 8, _hoisted_3$
|
|
1705
|
+
}, null, 8, _hoisted_3$5))
|
|
3726
1706
|
]),
|
|
3727
1707
|
_: 1
|
|
3728
1708
|
})
|
|
@@ -3745,9 +1725,9 @@ const isInvoiceUsageBased = (invoice) => {
|
|
|
3745
1725
|
)
|
|
3746
1726
|
)) ?? false;
|
|
3747
1727
|
};
|
|
3748
|
-
const _hoisted_1$
|
|
3749
|
-
const _hoisted_2$
|
|
3750
|
-
const _sfc_main$
|
|
1728
|
+
const _hoisted_1$j = { class: "flex w-full min-h-96 justify-center items-center" };
|
|
1729
|
+
const _hoisted_2$b = { class: "max-w-sm" };
|
|
1730
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
3751
1731
|
__name: "CheckoutNotAvailable",
|
|
3752
1732
|
setup(__props) {
|
|
3753
1733
|
const { $t } = useIntl();
|
|
@@ -3755,9 +1735,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
3755
1735
|
window.location.reload();
|
|
3756
1736
|
};
|
|
3757
1737
|
return (_ctx, _cache) => {
|
|
3758
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3759
|
-
createElementVNode("div", _hoisted_2$
|
|
3760
|
-
createVNode(unref(_sfc_main$
|
|
1738
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
1739
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
1740
|
+
createVNode(unref(_sfc_main$r), { variant: "heading-1" }, {
|
|
3761
1741
|
default: withCtx(() => [
|
|
3762
1742
|
createTextVNode(toDisplayString(unref($t)({
|
|
3763
1743
|
defaultMessage: "Checkout not available",
|
|
@@ -3767,7 +1747,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
3767
1747
|
]),
|
|
3768
1748
|
_: 1
|
|
3769
1749
|
}),
|
|
3770
|
-
createVNode(unref(_sfc_main$
|
|
1750
|
+
createVNode(unref(_sfc_main$r), {
|
|
3771
1751
|
variant: "body-sm",
|
|
3772
1752
|
shade: "lighter"
|
|
3773
1753
|
}, {
|
|
@@ -3799,22 +1779,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
3799
1779
|
};
|
|
3800
1780
|
}
|
|
3801
1781
|
});
|
|
3802
|
-
const _sfc_main$
|
|
1782
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
3803
1783
|
__name: "SubscriptionPaymentCompletedCard",
|
|
3804
|
-
|
|
3805
|
-
redirectUrl: { type: String }
|
|
3806
|
-
},
|
|
1784
|
+
emits: ["continue-to-merchant"],
|
|
3807
1785
|
setup(__props) {
|
|
3808
|
-
const props = __props;
|
|
3809
1786
|
const { $t } = useIntl();
|
|
3810
|
-
onMounted(() => {
|
|
3811
|
-
if (!props.redirectUrl) {
|
|
3812
|
-
return;
|
|
3813
|
-
}
|
|
3814
|
-
window.location.replace(props.redirectUrl);
|
|
3815
|
-
});
|
|
3816
1787
|
return (_ctx, _cache) => {
|
|
3817
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1788
|
+
return openBlock(), createBlock(_sfc_main$C, {
|
|
3818
1789
|
status: "success",
|
|
3819
1790
|
title: unref($t)({
|
|
3820
1791
|
defaultMessage: "Payment successful",
|
|
@@ -3823,7 +1794,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
3823
1794
|
})
|
|
3824
1795
|
}, {
|
|
3825
1796
|
default: withCtx(() => [
|
|
3826
|
-
createVNode(unref(_sfc_main$
|
|
1797
|
+
createVNode(unref(_sfc_main$r), {
|
|
3827
1798
|
variant: "body-xs",
|
|
3828
1799
|
shade: "lighter",
|
|
3829
1800
|
tag: "span"
|
|
@@ -3837,14 +1808,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
3837
1808
|
]),
|
|
3838
1809
|
_: 1
|
|
3839
1810
|
}),
|
|
3840
|
-
|
|
3841
|
-
key: 0,
|
|
3842
|
-
tag: "a",
|
|
3843
|
-
href: __props.redirectUrl,
|
|
1811
|
+
createVNode(unref(_sfc_main$v), {
|
|
3844
1812
|
color: "gray",
|
|
3845
1813
|
variant: "outline",
|
|
3846
1814
|
size: "xs",
|
|
3847
|
-
class: "align-center"
|
|
1815
|
+
class: "align-center",
|
|
1816
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("continue-to-merchant"))
|
|
3848
1817
|
}, {
|
|
3849
1818
|
default: withCtx(() => [
|
|
3850
1819
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -3854,16 +1823,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
3854
1823
|
})), 1)
|
|
3855
1824
|
]),
|
|
3856
1825
|
_: 1
|
|
3857
|
-
}
|
|
1826
|
+
})
|
|
3858
1827
|
]),
|
|
3859
1828
|
_: 1
|
|
3860
1829
|
}, 8, ["title"]);
|
|
3861
1830
|
};
|
|
3862
1831
|
}
|
|
3863
1832
|
});
|
|
3864
|
-
const _hoisted_1$
|
|
3865
|
-
const _hoisted_2$
|
|
3866
|
-
const _sfc_main$
|
|
1833
|
+
const _hoisted_1$i = { class: "flex flex-row gap-3 px-3 py-2" };
|
|
1834
|
+
const _hoisted_2$a = { class: "grow" };
|
|
1835
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
3867
1836
|
__name: "SubscriptionSummary",
|
|
3868
1837
|
props: {
|
|
3869
1838
|
subscription: { type: Object },
|
|
@@ -3910,15 +1879,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3910
1879
|
return names;
|
|
3911
1880
|
});
|
|
3912
1881
|
return (_ctx, _cache) => {
|
|
3913
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3914
|
-
__props.avatar ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1882
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
1883
|
+
__props.avatar ? (openBlock(), createBlock(unref(_sfc_main$D), {
|
|
3915
1884
|
key: 0,
|
|
3916
1885
|
"image-src": __props.avatar,
|
|
3917
1886
|
size: "lg",
|
|
3918
1887
|
class: "my-1"
|
|
3919
1888
|
}, null, 8, ["image-src"])) : createCommentVNode("", true),
|
|
3920
|
-
createElementVNode("div", _hoisted_2$
|
|
3921
|
-
createVNode(unref(_sfc_main$
|
|
1889
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
1890
|
+
createVNode(unref(_sfc_main$r), {
|
|
3922
1891
|
variant: "body",
|
|
3923
1892
|
weight: "semibold",
|
|
3924
1893
|
"no-spacing": ""
|
|
@@ -3928,7 +1897,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3928
1897
|
]),
|
|
3929
1898
|
_: 1
|
|
3930
1899
|
}),
|
|
3931
|
-
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1900
|
+
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
3932
1901
|
key: 0,
|
|
3933
1902
|
variant: "body-xs",
|
|
3934
1903
|
shade: "lighter",
|
|
@@ -3939,7 +1908,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3939
1908
|
]),
|
|
3940
1909
|
_: 1
|
|
3941
1910
|
})) : createCommentVNode("", true),
|
|
3942
|
-
description.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1911
|
+
description.value ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
3943
1912
|
key: 1,
|
|
3944
1913
|
variant: "body-xs",
|
|
3945
1914
|
shade: "lighter",
|
|
@@ -3958,11 +1927,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3958
1927
|
};
|
|
3959
1928
|
}
|
|
3960
1929
|
});
|
|
3961
|
-
const _hoisted_1$
|
|
3962
|
-
const _hoisted_2$
|
|
3963
|
-
const _hoisted_3$
|
|
1930
|
+
const _hoisted_1$h = { class: "grid grid-cols-1 gap-1" };
|
|
1931
|
+
const _hoisted_2$9 = { class: "px-3 py-2" };
|
|
1932
|
+
const _hoisted_3$4 = { class: "flex flex-col gap-3" };
|
|
3964
1933
|
const _hoisted_4$3 = { class: "px-3 py-2" };
|
|
3965
|
-
const _sfc_main$
|
|
1934
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
3966
1935
|
__name: "OrderSummary",
|
|
3967
1936
|
props: {
|
|
3968
1937
|
subscription: { type: Object },
|
|
@@ -3986,9 +1955,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3986
1955
|
const emit = __emit;
|
|
3987
1956
|
const { $t } = useIntl();
|
|
3988
1957
|
const { map, formatTimePeriod } = useTimePeriod();
|
|
3989
|
-
const
|
|
3990
|
-
const
|
|
3991
|
-
const saveBadgeSize = computed(() => isMobile.value ? "sm" : "xs");
|
|
1958
|
+
const { isMobileViewport } = useViewport();
|
|
1959
|
+
const saveBadgeSize = computed(() => isMobileViewport.value ? "sm" : "xs");
|
|
3992
1960
|
const getBillingPeriodKey = (period) => `${period.type}:${period.value}`;
|
|
3993
1961
|
const BILLING_PERIOD_TYPES = ["DAY", "WEEK", "MONTH", "YEAR"];
|
|
3994
1962
|
const isBillingPeriodType = (value) => BILLING_PERIOD_TYPES.includes(value);
|
|
@@ -4185,7 +2153,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4185
2153
|
label,
|
|
4186
2154
|
subLabel: getSelectedPeriodAmountLabel(period),
|
|
4187
2155
|
labelSuffixComponent: saveText ? {
|
|
4188
|
-
component: _sfc_main$
|
|
2156
|
+
component: _sfc_main$E,
|
|
4189
2157
|
props: {
|
|
4190
2158
|
color: "primary",
|
|
4191
2159
|
content: saveText,
|
|
@@ -4244,7 +2212,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4244
2212
|
selectedBillingPeriodKey.value = checked ? biggestPeriod : smallestPeriod;
|
|
4245
2213
|
};
|
|
4246
2214
|
return (_ctx, _cache) => {
|
|
4247
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
2215
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
4248
2216
|
"no-border": "",
|
|
4249
2217
|
"no-spacing": "",
|
|
4250
2218
|
"content-background": "none",
|
|
@@ -4255,10 +2223,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4255
2223
|
})
|
|
4256
2224
|
}, {
|
|
4257
2225
|
default: withCtx(() => [
|
|
4258
|
-
createElementVNode("div", _hoisted_1$
|
|
4259
|
-
createVNode(unref(_sfc_main$
|
|
2226
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
2227
|
+
createVNode(unref(_sfc_main$s), { "no-spacing": "" }, {
|
|
4260
2228
|
default: withCtx(() => [
|
|
4261
|
-
__props.subscription ? (openBlock(), createBlock(_sfc_main$
|
|
2229
|
+
__props.subscription ? (openBlock(), createBlock(_sfc_main$k, {
|
|
4262
2230
|
key: 0,
|
|
4263
2231
|
avatar: __props.avatar,
|
|
4264
2232
|
invoice: __props.invoice,
|
|
@@ -4270,7 +2238,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4270
2238
|
]),
|
|
4271
2239
|
_: 1
|
|
4272
2240
|
}),
|
|
4273
|
-
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2241
|
+
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
4274
2242
|
key: 0,
|
|
4275
2243
|
"no-spacing": "",
|
|
4276
2244
|
"content-classes": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod ? "border-primary-500" : void 0
|
|
@@ -4278,15 +2246,15 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4278
2246
|
default: withCtx(() => {
|
|
4279
2247
|
var _a;
|
|
4280
2248
|
return [
|
|
4281
|
-
createElementVNode("div", _hoisted_2$
|
|
4282
|
-
createElementVNode("div", _hoisted_3$
|
|
4283
|
-
highOption.value ? (openBlock(), createBlock(_sfc_main$
|
|
2249
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
2250
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
2251
|
+
highOption.value ? (openBlock(), createBlock(_sfc_main$F, {
|
|
4284
2252
|
key: 0,
|
|
4285
2253
|
name: highOption.value.label,
|
|
4286
2254
|
description: ((_a = selectedBillingPeriodOption.value) == null ? void 0 : _a.subLabel) ?? ""
|
|
4287
2255
|
}, createSlots({
|
|
4288
2256
|
default: withCtx(() => [
|
|
4289
|
-
createVNode(unref(_sfc_main$
|
|
2257
|
+
createVNode(unref(_sfc_main$x), {
|
|
4290
2258
|
"model-value": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod,
|
|
4291
2259
|
"onUpdate:modelValue": handleBinaryBillingToggle
|
|
4292
2260
|
}, null, 8, ["model-value"])
|
|
@@ -4296,7 +2264,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4296
2264
|
toggleSaveText.value ? {
|
|
4297
2265
|
name: "badge",
|
|
4298
2266
|
fn: withCtx(() => [
|
|
4299
|
-
createVNode(unref(_sfc_main$
|
|
2267
|
+
createVNode(unref(_sfc_main$E), {
|
|
4300
2268
|
color: "primary",
|
|
4301
2269
|
content: toggleSaveText.value,
|
|
4302
2270
|
size: saveBadgeSize.value,
|
|
@@ -4311,7 +2279,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4311
2279
|
];
|
|
4312
2280
|
}),
|
|
4313
2281
|
_: 1
|
|
4314
|
-
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2282
|
+
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$G), {
|
|
4315
2283
|
key: 1,
|
|
4316
2284
|
"single-model-value": selectedBillingPeriodKey.value,
|
|
4317
2285
|
"onUpdate:singleModelValue": _cache[0] || (_cache[0] = ($event) => selectedBillingPeriodKey.value = $event),
|
|
@@ -4321,13 +2289,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4321
2289
|
"show-sub-label-in-input": "",
|
|
4322
2290
|
"show-suffix-in-closed-input": ""
|
|
4323
2291
|
}, null, 8, ["single-model-value", "options"])) : createCommentVNode("", true),
|
|
4324
|
-
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2292
|
+
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
4325
2293
|
key: 2,
|
|
4326
2294
|
"no-spacing": ""
|
|
4327
2295
|
}, {
|
|
4328
2296
|
default: withCtx(() => [
|
|
4329
2297
|
createElementVNode("div", _hoisted_4$3, [
|
|
4330
|
-
createVNode(unref(_sfc_main$
|
|
2298
|
+
createVNode(unref(_sfc_main$r), {
|
|
4331
2299
|
"no-spacing": "",
|
|
4332
2300
|
variant: "body-sm",
|
|
4333
2301
|
shade: "lighter"
|
|
@@ -4345,14 +2313,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4345
2313
|
]),
|
|
4346
2314
|
_: 1
|
|
4347
2315
|
})) : createCommentVNode("", true),
|
|
4348
|
-
__props.invoice && __props.variant !== "products-inline" ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2316
|
+
__props.invoice && __props.variant !== "products-inline" ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
4349
2317
|
key: 3,
|
|
4350
2318
|
invoice: __props.invoice,
|
|
4351
|
-
"wrapper-component": unref(_sfc_main$
|
|
2319
|
+
"wrapper-component": unref(_sfc_main$s)
|
|
4352
2320
|
}, null, 8, ["invoice", "wrapper-component"])) : createCommentVNode("", true),
|
|
4353
|
-
createVNode(unref(_sfc_main$
|
|
2321
|
+
createVNode(unref(_sfc_main$s), null, {
|
|
4354
2322
|
default: withCtx(() => [
|
|
4355
|
-
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2323
|
+
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$I), {
|
|
4356
2324
|
key: 0,
|
|
4357
2325
|
variant: __props.variant === "products-inline" ? "default" : "without-products",
|
|
4358
2326
|
invoice: __props.invoice,
|
|
@@ -4361,7 +2329,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4361
2329
|
collapsible: __props.collapsible,
|
|
4362
2330
|
"is-preview-without-taxes": !__props.countryCode,
|
|
4363
2331
|
"is-customer-facing": ""
|
|
4364
|
-
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
2332
|
+
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
4365
2333
|
key: 1,
|
|
4366
2334
|
variant: "body-sm",
|
|
4367
2335
|
shade: "lighter"
|
|
@@ -4385,23 +2353,23 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
4385
2353
|
};
|
|
4386
2354
|
}
|
|
4387
2355
|
});
|
|
4388
|
-
const _hoisted_1$
|
|
4389
|
-
const _sfc_main$
|
|
2356
|
+
const _hoisted_1$g = { class: "py-4 flex flex-col items-center justify-center" };
|
|
2357
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
4390
2358
|
__name: "EmptyStatePlaceholder",
|
|
4391
2359
|
props: {
|
|
4392
2360
|
icon: { type: null }
|
|
4393
2361
|
},
|
|
4394
2362
|
setup(__props) {
|
|
4395
2363
|
return (_ctx, _cache) => {
|
|
4396
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
2364
|
+
return openBlock(), createBlock(unref(_sfc_main$s), null, {
|
|
4397
2365
|
default: withCtx(() => [
|
|
4398
|
-
createElementVNode("div", _hoisted_1$
|
|
4399
|
-
createVNode(unref(_sfc_main$
|
|
2366
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
2367
|
+
createVNode(unref(_sfc_main$J), {
|
|
4400
2368
|
icon: __props.icon,
|
|
4401
2369
|
size: "lg",
|
|
4402
2370
|
class: "text-gray-500"
|
|
4403
2371
|
}, null, 8, ["icon"]),
|
|
4404
|
-
createVNode(unref(_sfc_main$
|
|
2372
|
+
createVNode(unref(_sfc_main$r), {
|
|
4405
2373
|
center: "",
|
|
4406
2374
|
tag: "span",
|
|
4407
2375
|
variant: "body-sm",
|
|
@@ -4414,7 +2382,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
4414
2382
|
]),
|
|
4415
2383
|
_: 3
|
|
4416
2384
|
}),
|
|
4417
|
-
createVNode(unref(_sfc_main$
|
|
2385
|
+
createVNode(unref(_sfc_main$r), {
|
|
4418
2386
|
center: "",
|
|
4419
2387
|
tag: "span",
|
|
4420
2388
|
variant: "body-xs",
|
|
@@ -4433,19 +2401,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
4433
2401
|
};
|
|
4434
2402
|
}
|
|
4435
2403
|
});
|
|
4436
|
-
const _hoisted_1$
|
|
2404
|
+
const _hoisted_1$f = {
|
|
4437
2405
|
key: 0,
|
|
4438
2406
|
id: "svg-logo",
|
|
4439
2407
|
viewBox: "0 0 35 15",
|
|
4440
2408
|
class: "h-[44px]"
|
|
4441
2409
|
};
|
|
4442
|
-
const _hoisted_2$
|
|
2410
|
+
const _hoisted_2$8 = {
|
|
4443
2411
|
key: 1,
|
|
4444
2412
|
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
|
|
4445
2413
|
role: "presentation",
|
|
4446
2414
|
class: "h-[22px]"
|
|
4447
2415
|
};
|
|
4448
|
-
const _sfc_main$
|
|
2416
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
4449
2417
|
__name: "ExpressPaymentMethodButton",
|
|
4450
2418
|
props: {
|
|
4451
2419
|
type: { type: String }
|
|
@@ -4482,14 +2450,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4482
2450
|
emit("click");
|
|
4483
2451
|
}
|
|
4484
2452
|
return (_ctx, _cache) => {
|
|
4485
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
2453
|
+
return openBlock(), createBlock(unref(_sfc_main$v), {
|
|
4486
2454
|
size: "lg",
|
|
4487
2455
|
"aria-label": ariaLabel.value,
|
|
4488
2456
|
class: normalizeClass([buttonClasses.value, "!block w-full h-11 bg-center bg-no-repeat"]),
|
|
4489
2457
|
onClick: handleClick
|
|
4490
2458
|
}, {
|
|
4491
2459
|
default: withCtx(() => [
|
|
4492
|
-
props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2460
|
+
props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
|
|
4493
2461
|
createElementVNode("svg", {
|
|
4494
2462
|
id: "svg-logo",
|
|
4495
2463
|
x: "0",
|
|
@@ -4517,16 +2485,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4517
2485
|
])
|
|
4518
2486
|
])
|
|
4519
2487
|
], -1)
|
|
4520
|
-
])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$
|
|
2488
|
+
])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$8)) : createCommentVNode("", true)
|
|
4521
2489
|
]),
|
|
4522
2490
|
_: 1
|
|
4523
2491
|
}, 8, ["aria-label", "class"]);
|
|
4524
2492
|
};
|
|
4525
2493
|
}
|
|
4526
2494
|
});
|
|
4527
|
-
const _hoisted_1$
|
|
2495
|
+
const _hoisted_1$e = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
|
|
4528
2496
|
const PAYMENT_GATEWAY_VARIANT_ADYEN = "ADYEN";
|
|
4529
|
-
const _sfc_main$
|
|
2497
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
4530
2498
|
__name: "ExpressPaymentMethodApplePay",
|
|
4531
2499
|
props: {
|
|
4532
2500
|
onBillingInformationChange: { type: Function },
|
|
@@ -4546,7 +2514,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4546
2514
|
const { authorizePayment } = createPaymentsService();
|
|
4547
2515
|
const paymentAcceptorId = props.paymentMethodOptionsResponse.payment_acceptor.id;
|
|
4548
2516
|
const initApplePay = async () => {
|
|
4549
|
-
const { AdyenCheckout, ApplePay } = await
|
|
2517
|
+
const { AdyenCheckout, ApplePay } = await loadAdyen();
|
|
4550
2518
|
const checkout = await AdyenCheckout(
|
|
4551
2519
|
getAdyenExpressCheckoutConfiguration({
|
|
4552
2520
|
amount: props.amount,
|
|
@@ -4760,12 +2728,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4760
2728
|
});
|
|
4761
2729
|
return (_ctx, _cache) => {
|
|
4762
2730
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
4763
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
2731
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
|
|
4764
2732
|
key: 0,
|
|
4765
2733
|
type: "applepay",
|
|
4766
2734
|
onClick: handleClick
|
|
4767
2735
|
})) : createCommentVNode("", true),
|
|
4768
|
-
createElementVNode("div", _hoisted_1$
|
|
2736
|
+
createElementVNode("div", _hoisted_1$e, [
|
|
4769
2737
|
createElementVNode("div", {
|
|
4770
2738
|
ref_key: "applePayButtonRef",
|
|
4771
2739
|
ref: applePayButtonRef
|
|
@@ -4775,8 +2743,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4775
2743
|
};
|
|
4776
2744
|
}
|
|
4777
2745
|
});
|
|
4778
|
-
const _hoisted_1$
|
|
4779
|
-
const _sfc_main$
|
|
2746
|
+
const _hoisted_1$d = { class: "relative overflow-hidden" };
|
|
2747
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
4780
2748
|
__name: "ExpressPaymentMethodPaypal",
|
|
4781
2749
|
props: {
|
|
4782
2750
|
amount: { type: Object },
|
|
@@ -4793,7 +2761,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4793
2761
|
const paypalButtonRef = ref();
|
|
4794
2762
|
const logger = useLogger();
|
|
4795
2763
|
const initPaypal = async () => {
|
|
4796
|
-
const { AdyenCheckout, PayPal } = await
|
|
2764
|
+
const { AdyenCheckout, PayPal } = await loadAdyen();
|
|
4797
2765
|
const checkout = await AdyenCheckout(
|
|
4798
2766
|
getAdyenExpressCheckoutConfiguration({
|
|
4799
2767
|
locale: props.locale,
|
|
@@ -4834,8 +2802,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4834
2802
|
void initPaypal();
|
|
4835
2803
|
});
|
|
4836
2804
|
return (_ctx, _cache) => {
|
|
4837
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4838
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
2805
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
2806
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
|
|
4839
2807
|
key: 0,
|
|
4840
2808
|
type: "paypal",
|
|
4841
2809
|
class: "w-full"
|
|
@@ -4849,8 +2817,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4849
2817
|
};
|
|
4850
2818
|
}
|
|
4851
2819
|
});
|
|
4852
|
-
const _hoisted_1$
|
|
4853
|
-
const _sfc_main$
|
|
2820
|
+
const _hoisted_1$c = { class: "w-[1px] h-[1px] overflow-hidden opacity-0 absolute" };
|
|
2821
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
4854
2822
|
__name: "ExpressPaymentMethodGooglePay",
|
|
4855
2823
|
props: {
|
|
4856
2824
|
amount: { type: Object },
|
|
@@ -4867,7 +2835,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4867
2835
|
const googlePayButtonRef = ref();
|
|
4868
2836
|
const logger = useLogger();
|
|
4869
2837
|
const initGooglePay = async () => {
|
|
4870
|
-
const { AdyenCheckout, GooglePay } = await
|
|
2838
|
+
const { AdyenCheckout, GooglePay } = await loadAdyen();
|
|
4871
2839
|
const checkout = await AdyenCheckout(
|
|
4872
2840
|
getAdyenExpressCheckoutConfiguration({
|
|
4873
2841
|
locale: props.locale,
|
|
@@ -4913,12 +2881,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4913
2881
|
});
|
|
4914
2882
|
return (_ctx, _cache) => {
|
|
4915
2883
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
4916
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
2884
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$h, {
|
|
4917
2885
|
key: 0,
|
|
4918
2886
|
type: "googlepay",
|
|
4919
2887
|
onClick: handleClick
|
|
4920
2888
|
})) : createCommentVNode("", true),
|
|
4921
|
-
createElementVNode("div", _hoisted_1$
|
|
2889
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
4922
2890
|
createElementVNode("div", {
|
|
4923
2891
|
ref_key: "googlePayButtonRef",
|
|
4924
2892
|
ref: googlePayButtonRef
|
|
@@ -4928,15 +2896,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4928
2896
|
};
|
|
4929
2897
|
}
|
|
4930
2898
|
});
|
|
4931
|
-
const _hoisted_1$
|
|
2899
|
+
const _hoisted_1$b = {
|
|
4932
2900
|
key: 0,
|
|
4933
2901
|
class: "mt-4n"
|
|
4934
2902
|
};
|
|
4935
|
-
const _hoisted_2$
|
|
4936
|
-
const _hoisted_3$
|
|
2903
|
+
const _hoisted_2$7 = { class: "mb-2" };
|
|
2904
|
+
const _hoisted_3$3 = { class: "grid grid-cols-6 gap-1 md:gap-2" };
|
|
4937
2905
|
const _hoisted_4$2 = { class: "h-4 mt-4" };
|
|
4938
2906
|
const DEFAULT_EXPRESS_PAYMENT_BUTTON_COUNT = 2;
|
|
4939
|
-
const _sfc_main$
|
|
2907
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
4940
2908
|
__name: "ExpressPaymentMethods",
|
|
4941
2909
|
props: {
|
|
4942
2910
|
amount: { type: Object },
|
|
@@ -5010,12 +2978,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5010
2978
|
return (paymentMethodOptionsResponseEntryIncludingApplePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingGooglePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingPayPal.value ? 1 : 0);
|
|
5011
2979
|
});
|
|
5012
2980
|
return (_ctx, _cache) => {
|
|
5013
|
-
return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
5014
|
-
createElementVNode("div", _hoisted_2$
|
|
5015
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
2981
|
+
return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2982
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
2983
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$K, {
|
|
5016
2984
|
key: 0,
|
|
5017
2985
|
variant: "title"
|
|
5018
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
2986
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
5019
2987
|
key: 1,
|
|
5020
2988
|
variant: "heading-3",
|
|
5021
2989
|
tag: "h2"
|
|
@@ -5030,10 +2998,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5030
2998
|
_: 1
|
|
5031
2999
|
}))
|
|
5032
3000
|
]),
|
|
5033
|
-
createElementVNode("div", _hoisted_3$
|
|
3001
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
5034
3002
|
!isReady.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5035
|
-
createVNode(_sfc_main$
|
|
5036
|
-
createVNode(_sfc_main$
|
|
3003
|
+
createVNode(_sfc_main$K, { class: "h-11 col-span-3" }),
|
|
3004
|
+
createVNode(_sfc_main$K, { class: "h-11 col-span-3" })
|
|
5037
3005
|
], 64)) : createCommentVNode("", true),
|
|
5038
3006
|
createElementVNode("div", {
|
|
5039
3007
|
class: normalizeClass(["col-span-3 md:col-span-2", {
|
|
@@ -5043,7 +3011,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5043
3011
|
"!col-span-6 md:!col-span-2": expressPaymentButtonCount.value === 3
|
|
5044
3012
|
}])
|
|
5045
3013
|
}, [
|
|
5046
|
-
paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$
|
|
3014
|
+
paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$g, {
|
|
5047
3015
|
key: 0,
|
|
5048
3016
|
amount: __props.amount,
|
|
5049
3017
|
"billing-information": __props.billingInformation,
|
|
@@ -5063,7 +3031,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5063
3031
|
"md:!col-span-3": expressPaymentButtonCount.value === 2
|
|
5064
3032
|
}])
|
|
5065
3033
|
}, [
|
|
5066
|
-
paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$
|
|
3034
|
+
paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$e, {
|
|
5067
3035
|
key: 0,
|
|
5068
3036
|
amount: __props.amount,
|
|
5069
3037
|
"billing-information": __props.billingInformation,
|
|
@@ -5081,7 +3049,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5081
3049
|
"md:!col-span-3": expressPaymentButtonCount.value === 2
|
|
5082
3050
|
}])
|
|
5083
3051
|
}, [
|
|
5084
|
-
paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$
|
|
3052
|
+
paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$f, {
|
|
5085
3053
|
key: 0,
|
|
5086
3054
|
amount: __props.amount,
|
|
5087
3055
|
"billing-information": __props.billingInformation,
|
|
@@ -5094,10 +3062,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5094
3062
|
], 2)
|
|
5095
3063
|
]),
|
|
5096
3064
|
createElementVNode("div", _hoisted_4$2, [
|
|
5097
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
3065
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$K, {
|
|
5098
3066
|
key: 0,
|
|
5099
3067
|
variant: "divider-text"
|
|
5100
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
3068
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$L), {
|
|
5101
3069
|
key: 1,
|
|
5102
3070
|
text: unref($t)({
|
|
5103
3071
|
defaultMessage: "Or",
|
|
@@ -5111,8 +3079,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
5111
3079
|
};
|
|
5112
3080
|
}
|
|
5113
3081
|
});
|
|
5114
|
-
const _hoisted_1$
|
|
5115
|
-
const _sfc_main$
|
|
3082
|
+
const _hoisted_1$a = { class: "grid grid-cols-2 gap-2" };
|
|
3083
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
5116
3084
|
__name: "TieredTableRow",
|
|
5117
3085
|
props: {
|
|
5118
3086
|
band: { type: Object },
|
|
@@ -5141,8 +3109,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5141
3109
|
return props.band.tier_top_bound.number;
|
|
5142
3110
|
});
|
|
5143
3111
|
return (_ctx, _cache) => {
|
|
5144
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5145
|
-
createVNode(unref(_sfc_main$
|
|
3112
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
3113
|
+
createVNode(unref(_sfc_main$r), {
|
|
5146
3114
|
variant: "body-xs",
|
|
5147
3115
|
shade: "lighter",
|
|
5148
3116
|
tag: "div"
|
|
@@ -5175,7 +3143,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5175
3143
|
]),
|
|
5176
3144
|
_: 1
|
|
5177
3145
|
}),
|
|
5178
|
-
createVNode(unref(_sfc_main$
|
|
3146
|
+
createVNode(unref(_sfc_main$r), {
|
|
5179
3147
|
variant: "body-xs",
|
|
5180
3148
|
shade: "lighter",
|
|
5181
3149
|
tag: "div",
|
|
@@ -5203,8 +3171,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5203
3171
|
};
|
|
5204
3172
|
}
|
|
5205
3173
|
});
|
|
5206
|
-
const _hoisted_1$
|
|
5207
|
-
const _sfc_main$
|
|
3174
|
+
const _hoisted_1$9 = { class: "grid grid-cols-1 gap-0.5 pt-1.5" };
|
|
3175
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
5208
3176
|
__name: "TieredTable",
|
|
5209
3177
|
props: {
|
|
5210
3178
|
bands: { type: Array },
|
|
@@ -5212,9 +3180,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5212
3180
|
},
|
|
5213
3181
|
setup(__props) {
|
|
5214
3182
|
return (_ctx, _cache) => {
|
|
5215
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3183
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
5216
3184
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.bands, (band, index) => {
|
|
5217
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3185
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
5218
3186
|
key: index,
|
|
5219
3187
|
band,
|
|
5220
3188
|
"is-first": index === 0,
|
|
@@ -5247,7 +3215,7 @@ function useSeatBasedPricing({
|
|
|
5247
3215
|
pricingItemConfigId
|
|
5248
3216
|
}) {
|
|
5249
3217
|
return computed(() => {
|
|
5250
|
-
var _a, _b;
|
|
3218
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5251
3219
|
const { config, productItem } = getPricingItemByPricingConfigId({
|
|
5252
3220
|
pricings,
|
|
5253
3221
|
pricingItemConfigId
|
|
@@ -5262,18 +3230,18 @@ function useSeatBasedPricing({
|
|
|
5262
3230
|
description: productItem == null ? void 0 : productItem.description
|
|
5263
3231
|
},
|
|
5264
3232
|
pricing: {
|
|
5265
|
-
...(config == null ? void 0 : config.
|
|
5266
|
-
...(config == null ? void 0 : config.
|
|
3233
|
+
...((_a = config == null ? void 0 : config.details) == null ? void 0 : _a.pricing_type) === "FLAT" && { amount: (_d = (_c = (_b = config.details) == null ? void 0 : _b.bands) == null ? void 0 : _c[0]) == null ? void 0 : _d.amount },
|
|
3234
|
+
...((_e = config == null ? void 0 : config.details) == null ? void 0 : _e.pricing_type) === "TIERED" && { tiered: { bands: (_f = config.details) == null ? void 0 : _f.bands } }
|
|
5267
3235
|
}
|
|
5268
3236
|
};
|
|
5269
3237
|
});
|
|
5270
3238
|
}
|
|
5271
|
-
const _hoisted_1$
|
|
5272
|
-
const _hoisted_2$
|
|
5273
|
-
const _hoisted_3$
|
|
3239
|
+
const _hoisted_1$8 = { class: "flex flex-row-reverse md:flex-row gap-4" };
|
|
3240
|
+
const _hoisted_2$6 = { class: "w-24 md:w-32 shrink-0 justify-start" };
|
|
3241
|
+
const _hoisted_3$2 = ["tabindex"];
|
|
5274
3242
|
const _hoisted_4$1 = { key: 0 };
|
|
5275
3243
|
const _hoisted_5$1 = { key: 0 };
|
|
5276
|
-
const _sfc_main$
|
|
3244
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
5277
3245
|
__name: "SeatsEditorItem",
|
|
5278
3246
|
props: /* @__PURE__ */ mergeModels({
|
|
5279
3247
|
modelValue: { type: Object },
|
|
@@ -5310,9 +3278,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5310
3278
|
return (_ctx, _cache) => {
|
|
5311
3279
|
var _a, _b, _c;
|
|
5312
3280
|
return openBlock(), createElementBlock("div", null, [
|
|
5313
|
-
createElementVNode("div", _hoisted_1$
|
|
5314
|
-
createElementVNode("div", _hoisted_2$
|
|
5315
|
-
createVNode(unref(_sfc_main$
|
|
3281
|
+
createElementVNode("div", _hoisted_1$8, [
|
|
3282
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
3283
|
+
createVNode(unref(_sfc_main$M), {
|
|
5316
3284
|
modelValue: seatsNumber.value,
|
|
5317
3285
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsNumber.value = $event),
|
|
5318
3286
|
size: "sm",
|
|
@@ -5324,7 +3292,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5324
3292
|
tabindex: isCollapsible.value ? 0 : void 0,
|
|
5325
3293
|
onClick: _cache[1] || (_cache[1] = ($event) => isCollapsible.value ? isExpanded.value = !isExpanded.value : void 0)
|
|
5326
3294
|
}, [
|
|
5327
|
-
createVNode(unref(_sfc_main$
|
|
3295
|
+
createVNode(unref(_sfc_main$r), {
|
|
5328
3296
|
tag: "span",
|
|
5329
3297
|
variant: "body-sm",
|
|
5330
3298
|
weight: "semibold"
|
|
@@ -5338,7 +3306,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5338
3306
|
]),
|
|
5339
3307
|
_: 1
|
|
5340
3308
|
}),
|
|
5341
|
-
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3309
|
+
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
5342
3310
|
key: 0,
|
|
5343
3311
|
tag: "span",
|
|
5344
3312
|
variant: "body-xs",
|
|
@@ -5361,7 +3329,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5361
3329
|
)), 1)
|
|
5362
3330
|
]),
|
|
5363
3331
|
_: 1
|
|
5364
|
-
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3332
|
+
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
5365
3333
|
key: 1,
|
|
5366
3334
|
tag: "span",
|
|
5367
3335
|
variant: "body-xs",
|
|
@@ -5373,7 +3341,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5373
3341
|
id: "seats.tiered_pricing_label",
|
|
5374
3342
|
description: "The label indicating tiered pricing structure for seats"
|
|
5375
3343
|
})) + " ", 1),
|
|
5376
|
-
createVNode(unref(_sfc_main$
|
|
3344
|
+
createVNode(unref(_sfc_main$J), {
|
|
5377
3345
|
icon: "keyboard_arrow_down",
|
|
5378
3346
|
size: "xs",
|
|
5379
3347
|
class: normalizeClass(["absolute transition ease-in-out text-gray-400", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
|
|
@@ -5381,13 +3349,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5381
3349
|
]),
|
|
5382
3350
|
_: 1
|
|
5383
3351
|
})) : createCommentVNode("", true)
|
|
5384
|
-
], 10, _hoisted_3$
|
|
3352
|
+
], 10, _hoisted_3$2)
|
|
5385
3353
|
]),
|
|
5386
3354
|
((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
5387
|
-
createVNode(unref(_sfc_main$
|
|
3355
|
+
createVNode(unref(_sfc_main$w), null, {
|
|
5388
3356
|
default: withCtx(() => [
|
|
5389
3357
|
isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
5390
|
-
createVNode(_sfc_main$
|
|
3358
|
+
createVNode(_sfc_main$b, {
|
|
5391
3359
|
bands: unref(seats).pricing.tiered.bands,
|
|
5392
3360
|
period: unref(seats).billing.period
|
|
5393
3361
|
}, null, 8, ["bands", "period"])
|
|
@@ -5400,7 +3368,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5400
3368
|
};
|
|
5401
3369
|
}
|
|
5402
3370
|
});
|
|
5403
|
-
const _sfc_main$
|
|
3371
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
5404
3372
|
__name: "SeatsEditor",
|
|
5405
3373
|
props: /* @__PURE__ */ mergeModels({
|
|
5406
3374
|
modelValue: { type: Array },
|
|
@@ -5423,11 +3391,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
5423
3391
|
});
|
|
5424
3392
|
return (_ctx, _cache) => {
|
|
5425
3393
|
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (item, index) => {
|
|
5426
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3394
|
+
return openBlock(), createBlock(unref(_sfc_main$s), { key: index }, {
|
|
5427
3395
|
default: withCtx(() => {
|
|
5428
3396
|
var _a;
|
|
5429
3397
|
return [
|
|
5430
|
-
item.pricing_item_config_id ? (openBlock(), createBlock(_sfc_main$
|
|
3398
|
+
item.pricing_item_config_id ? (openBlock(), createBlock(_sfc_main$a, {
|
|
5431
3399
|
key: item.pricing_item_config_id,
|
|
5432
3400
|
modelValue: itemModel(index).value,
|
|
5433
3401
|
"onUpdate:modelValue": ($event) => itemModel(index).value = $event,
|
|
@@ -5442,15 +3410,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
5442
3410
|
};
|
|
5443
3411
|
}
|
|
5444
3412
|
});
|
|
5445
|
-
const _hoisted_1$
|
|
5446
|
-
const _hoisted_2$
|
|
5447
|
-
const _sfc_main$
|
|
3413
|
+
const _hoisted_1$7 = { class: "flex gap-4 border-l-2 border-primary-600 px-2" };
|
|
3414
|
+
const _hoisted_2$5 = { class: "grow" };
|
|
3415
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
5448
3416
|
__name: "PricingGroupTitle",
|
|
5449
3417
|
setup(__props) {
|
|
5450
3418
|
return (_ctx, _cache) => {
|
|
5451
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5452
|
-
createElementVNode("div", _hoisted_2$
|
|
5453
|
-
createVNode(unref(_sfc_main$
|
|
3419
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3420
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
3421
|
+
createVNode(unref(_sfc_main$r), {
|
|
5454
3422
|
tag: "span",
|
|
5455
3423
|
variant: "body-sm",
|
|
5456
3424
|
weight: "semibold"
|
|
@@ -5462,7 +3430,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
5462
3430
|
})
|
|
5463
3431
|
]),
|
|
5464
3432
|
createElementVNode("div", null, [
|
|
5465
|
-
createVNode(unref(_sfc_main$
|
|
3433
|
+
createVNode(unref(_sfc_main$r), {
|
|
5466
3434
|
tag: "span",
|
|
5467
3435
|
variant: "body-xs",
|
|
5468
3436
|
shade: "lighter"
|
|
@@ -5477,9 +3445,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
5477
3445
|
};
|
|
5478
3446
|
}
|
|
5479
3447
|
});
|
|
5480
|
-
const _hoisted_1$
|
|
5481
|
-
const _hoisted_2$
|
|
5482
|
-
const _sfc_main$
|
|
3448
|
+
const _hoisted_1$6 = { class: "p-1" };
|
|
3449
|
+
const _hoisted_2$4 = { class: "grid grid-cols-1 gap-1 pt-1" };
|
|
3450
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
5483
3451
|
__name: "AddonSingleEditor",
|
|
5484
3452
|
props: /* @__PURE__ */ mergeModels({
|
|
5485
3453
|
constraint: { type: String },
|
|
@@ -5538,10 +3506,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5538
3506
|
}
|
|
5539
3507
|
};
|
|
5540
3508
|
return (_ctx, _cache) => {
|
|
5541
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3509
|
+
return openBlock(), createBlock(unref(_sfc_main$s), { "no-spacing": "" }, {
|
|
5542
3510
|
default: withCtx(() => [
|
|
5543
|
-
createElementVNode("div", _hoisted_1$
|
|
5544
|
-
createVNode(_sfc_main$
|
|
3511
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
3512
|
+
createVNode(_sfc_main$8, null, {
|
|
5545
3513
|
title: withCtx(() => [
|
|
5546
3514
|
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
5547
3515
|
]),
|
|
@@ -5550,9 +3518,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5550
3518
|
]),
|
|
5551
3519
|
_: 1
|
|
5552
3520
|
}),
|
|
5553
|
-
createElementVNode("div", _hoisted_2$
|
|
3521
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
5554
3522
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
5555
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3523
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
5556
3524
|
key: pricing.id,
|
|
5557
3525
|
"content-background": "none",
|
|
5558
3526
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
@@ -5560,7 +3528,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5560
3528
|
default: withCtx(() => {
|
|
5561
3529
|
var _a, _b;
|
|
5562
3530
|
return [
|
|
5563
|
-
createVNode(_sfc_main$
|
|
3531
|
+
createVNode(_sfc_main$F, {
|
|
5564
3532
|
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
5565
3533
|
description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
|
|
5566
3534
|
pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
|
|
@@ -5571,7 +3539,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5571
3539
|
})
|
|
5572
3540
|
}, {
|
|
5573
3541
|
default: withCtx(() => [
|
|
5574
|
-
createVNode(unref(_sfc_main$
|
|
3542
|
+
createVNode(unref(_sfc_main$x), {
|
|
5575
3543
|
"model-value": isSelected(pricing.id),
|
|
5576
3544
|
"onUpdate:modelValue": ($event) => handleToggle(pricing.id)
|
|
5577
3545
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
@@ -5591,8 +3559,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5591
3559
|
};
|
|
5592
3560
|
}
|
|
5593
3561
|
});
|
|
5594
|
-
const _hoisted_1$
|
|
5595
|
-
const _sfc_main$
|
|
3562
|
+
const _hoisted_1$5 = { class: "grid grid-cols-1 gap-1" };
|
|
3563
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
5596
3564
|
__name: "AddonMultipleEditor",
|
|
5597
3565
|
props: /* @__PURE__ */ mergeModels({
|
|
5598
3566
|
modelValue: { type: Array },
|
|
@@ -5624,7 +3592,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5624
3592
|
}
|
|
5625
3593
|
};
|
|
5626
3594
|
return (_ctx, _cache) => {
|
|
5627
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3595
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
5628
3596
|
"no-spacing": "",
|
|
5629
3597
|
"no-border": !__props.groupName,
|
|
5630
3598
|
"content-background": __props.groupName ? "gray" : "none"
|
|
@@ -5633,7 +3601,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5633
3601
|
createElementVNode("div", {
|
|
5634
3602
|
class: normalizeClass(["grid grid-cols-1 gap-1", { "p-1": __props.groupName }])
|
|
5635
3603
|
}, [
|
|
5636
|
-
__props.groupName ? (openBlock(), createBlock(_sfc_main$
|
|
3604
|
+
__props.groupName ? (openBlock(), createBlock(_sfc_main$8, { key: 0 }, {
|
|
5637
3605
|
title: withCtx(() => [
|
|
5638
3606
|
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
5639
3607
|
]),
|
|
@@ -5646,9 +3614,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5646
3614
|
]),
|
|
5647
3615
|
_: 1
|
|
5648
3616
|
})) : createCommentVNode("", true),
|
|
5649
|
-
createElementVNode("div", _hoisted_1$
|
|
3617
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
5650
3618
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
5651
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3619
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
5652
3620
|
key: pricing.id,
|
|
5653
3621
|
"content-background": __props.groupName || isSelected(pricing.id) ? "none" : "gray",
|
|
5654
3622
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
@@ -5656,7 +3624,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5656
3624
|
default: withCtx(() => {
|
|
5657
3625
|
var _a, _b;
|
|
5658
3626
|
return [
|
|
5659
|
-
createVNode(_sfc_main$
|
|
3627
|
+
createVNode(_sfc_main$F, {
|
|
5660
3628
|
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
5661
3629
|
description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
|
|
5662
3630
|
pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
|
|
@@ -5667,7 +3635,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5667
3635
|
})
|
|
5668
3636
|
}, {
|
|
5669
3637
|
default: withCtx(() => [
|
|
5670
|
-
isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3638
|
+
isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
5671
3639
|
key: 0,
|
|
5672
3640
|
color: "gray",
|
|
5673
3641
|
variant: "outline",
|
|
@@ -5675,7 +3643,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5675
3643
|
size: "sm",
|
|
5676
3644
|
"icon-prefix": "remove_shopping_cart",
|
|
5677
3645
|
onClick: ($event) => handleToggle(pricing.id)
|
|
5678
|
-
}, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
3646
|
+
}, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
5679
3647
|
key: 1,
|
|
5680
3648
|
color: "primary",
|
|
5681
3649
|
"icon-prefix": "add",
|
|
@@ -5707,16 +3675,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5707
3675
|
};
|
|
5708
3676
|
}
|
|
5709
3677
|
});
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
const isMobileViewport = breakpoints.smallerOrEqual("sm");
|
|
5713
|
-
return { isMobileViewport };
|
|
5714
|
-
}
|
|
5715
|
-
const _hoisted_1$3 = { class: "p-1" };
|
|
5716
|
-
const _hoisted_2$1 = { class: "pt-1" };
|
|
3678
|
+
const _hoisted_1$4 = { class: "p-1" };
|
|
3679
|
+
const _hoisted_2$3 = { class: "pt-1" };
|
|
5717
3680
|
const SHOW_RADIO_GROUP_MAX_OPTIONS = 3;
|
|
5718
3681
|
const SHOW_SELECT_MAX_OPTIONS = 6;
|
|
5719
|
-
const _sfc_main$
|
|
3682
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
5720
3683
|
__name: "PricingGroupSingleEditor",
|
|
5721
3684
|
props: /* @__PURE__ */ mergeModels({
|
|
5722
3685
|
modelValue: { type: Array },
|
|
@@ -5776,31 +3739,31 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
5776
3739
|
}));
|
|
5777
3740
|
};
|
|
5778
3741
|
return (_ctx, _cache) => {
|
|
5779
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3742
|
+
return openBlock(), createBlock(unref(_sfc_main$s), { "no-spacing": "" }, {
|
|
5780
3743
|
default: withCtx(() => [
|
|
5781
|
-
createElementVNode("div", _hoisted_1$
|
|
5782
|
-
createVNode(_sfc_main$
|
|
3744
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
3745
|
+
createVNode(_sfc_main$8, null, {
|
|
5783
3746
|
title: withCtx(() => [
|
|
5784
3747
|
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
5785
3748
|
]),
|
|
5786
3749
|
_: 1
|
|
5787
3750
|
}),
|
|
5788
|
-
createElementVNode("div", _hoisted_2$
|
|
5789
|
-
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3751
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
3752
|
+
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$N), {
|
|
5790
3753
|
key: 0,
|
|
5791
3754
|
modelValue: singleModelValue.value,
|
|
5792
3755
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => singleModelValue.value = $event),
|
|
5793
3756
|
options: getRadioGroupOptions(),
|
|
5794
3757
|
direction: unref(isMobileViewport) ? "column" : "row",
|
|
5795
3758
|
"show-radio": false
|
|
5796
|
-
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3759
|
+
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$G), {
|
|
5797
3760
|
key: 1,
|
|
5798
3761
|
"single-model-value": singleModelValue.value,
|
|
5799
3762
|
"onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => singleModelValue.value = $event),
|
|
5800
3763
|
options: getSelectOptions(),
|
|
5801
3764
|
size: "xl",
|
|
5802
3765
|
"show-sub-label-in-input": ""
|
|
5803
|
-
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
3766
|
+
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$O), {
|
|
5804
3767
|
key: 2,
|
|
5805
3768
|
modelValue: singleModelValue.value,
|
|
5806
3769
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => singleModelValue.value = $event),
|
|
@@ -5820,8 +3783,8 @@ function getAllPricingsFromPricingPlanVersion(pricingPlanVersion) {
|
|
|
5820
3783
|
const pricings = ((_a = pricingPlanVersion.pricing_categories) == null ? void 0 : _a.flatMap((category) => category.pricings ?? [])) ?? [];
|
|
5821
3784
|
return pricings.filter((pricing) => pricing !== null);
|
|
5822
3785
|
}
|
|
5823
|
-
const _hoisted_1$
|
|
5824
|
-
const _sfc_main$
|
|
3786
|
+
const _hoisted_1$3 = { class: "grid grid-cols-1 gap-1" };
|
|
3787
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
5825
3788
|
__name: "PlanCustomizationEditor",
|
|
5826
3789
|
props: /* @__PURE__ */ mergeModels({
|
|
5827
3790
|
subscription: { type: Object },
|
|
@@ -5861,7 +3824,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5861
3824
|
() => getPricingGroupsFromExtendedPricingPlanSubscription(props.subscription)
|
|
5862
3825
|
);
|
|
5863
3826
|
return (_ctx, _cache) => {
|
|
5864
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3827
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
5865
3828
|
title: unref($t)({
|
|
5866
3829
|
defaultMessage: "Customize plan",
|
|
5867
3830
|
id: "checkout.customize_plan_block.title",
|
|
@@ -5872,8 +3835,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5872
3835
|
"content-background": "none"
|
|
5873
3836
|
}, {
|
|
5874
3837
|
default: withCtx(() => [
|
|
5875
|
-
createElementVNode("div", _hoisted_1$
|
|
5876
|
-
createVNode(_sfc_main$
|
|
3838
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
3839
|
+
createVNode(_sfc_main$9, {
|
|
5877
3840
|
modelValue: seatsModel.value,
|
|
5878
3841
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsModel.value = $event),
|
|
5879
3842
|
"initial-seats-values": __props.initialSeatsValues,
|
|
@@ -5883,7 +3846,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5883
3846
|
return openBlock(), createElementBlock(Fragment, {
|
|
5884
3847
|
key: pricingGroup.id
|
|
5885
3848
|
}, [
|
|
5886
|
-
pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$
|
|
3849
|
+
pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
5887
3850
|
key: 0,
|
|
5888
3851
|
modelValue: enabledPricingIdsModel.value,
|
|
5889
3852
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => enabledPricingIdsModel.value = $event),
|
|
@@ -5891,7 +3854,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5891
3854
|
pricings: pricingGroup.pricings,
|
|
5892
3855
|
"billing-period": __props.billingPeriod,
|
|
5893
3856
|
currency: __props.currency
|
|
5894
|
-
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$
|
|
3857
|
+
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
5895
3858
|
key: 1,
|
|
5896
3859
|
modelValue: enabledPricingIdsModel.value,
|
|
5897
3860
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => enabledPricingIdsModel.value = $event),
|
|
@@ -5900,7 +3863,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5900
3863
|
constraint: pricingGroup.selection_constraint,
|
|
5901
3864
|
"billing-period": __props.billingPeriod,
|
|
5902
3865
|
currency: __props.currency
|
|
5903
|
-
}, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$
|
|
3866
|
+
}, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$6, {
|
|
5904
3867
|
key: 2,
|
|
5905
3868
|
modelValue: enabledPricingIdsModel.value,
|
|
5906
3869
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => enabledPricingIdsModel.value = $event),
|
|
@@ -5911,7 +3874,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5911
3874
|
}, null, 8, ["modelValue", "pricings", "group-name", "billing-period", "currency"])) : createCommentVNode("", true)
|
|
5912
3875
|
], 64);
|
|
5913
3876
|
}), 128)),
|
|
5914
|
-
createVNode(_sfc_main$
|
|
3877
|
+
createVNode(_sfc_main$6, {
|
|
5915
3878
|
modelValue: enabledPricingIdsModel.value,
|
|
5916
3879
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => enabledPricingIdsModel.value = $event),
|
|
5917
3880
|
pricings: addonPricings.value,
|
|
@@ -5925,18 +3888,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5925
3888
|
};
|
|
5926
3889
|
}
|
|
5927
3890
|
});
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
3891
|
+
function uniqueId(prefix = "") {
|
|
3892
|
+
return `${prefix}${crypto.randomUUID()}`;
|
|
3893
|
+
}
|
|
3894
|
+
const _hoisted_1$2 = ["aria-expanded", "aria-label"];
|
|
3895
|
+
const _hoisted_2$2 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
|
|
3896
|
+
const _hoisted_3$1 = { class: "flex flex-row items-center gap-2" };
|
|
5931
3897
|
const _hoisted_4 = ["onKeydown"];
|
|
5932
3898
|
const _hoisted_5 = ["aria-label"];
|
|
5933
|
-
const _hoisted_6 = { class: "flex flex-row items-center justify-between
|
|
5934
|
-
const _hoisted_7 = { class: "flex flex-row gap-2
|
|
3899
|
+
const _hoisted_6 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
|
|
3900
|
+
const _hoisted_7 = { class: "flex flex-row items-center gap-2" };
|
|
5935
3901
|
const _hoisted_8 = {
|
|
5936
3902
|
class: "sr-only",
|
|
5937
3903
|
"aria-live": "polite"
|
|
5938
3904
|
};
|
|
5939
|
-
const _sfc_main$
|
|
3905
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
5940
3906
|
__name: "PromotionCodeSection",
|
|
5941
3907
|
props: {
|
|
5942
3908
|
promotionCode: { default: null, type: [String, null] }
|
|
@@ -6057,10 +4023,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6057
4023
|
);
|
|
6058
4024
|
return (_ctx, _cache) => {
|
|
6059
4025
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
6060
|
-
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4026
|
+
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
6061
4027
|
key: 0,
|
|
6062
4028
|
"no-spacing": "",
|
|
6063
|
-
class: "w-full
|
|
4029
|
+
class: "relative w-full"
|
|
6064
4030
|
}, {
|
|
6065
4031
|
default: withCtx(() => [
|
|
6066
4032
|
createElementVNode("button", {
|
|
@@ -6073,10 +4039,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6073
4039
|
"aria-label": toggleAriaLabel.value,
|
|
6074
4040
|
onClick: toggleExpanded
|
|
6075
4041
|
}, [
|
|
6076
|
-
createElementVNode("div", _hoisted_2, [
|
|
6077
|
-
createElementVNode("div", _hoisted_3, [
|
|
6078
|
-
createVNode(unref(_sfc_main$
|
|
6079
|
-
createVNode(unref(_sfc_main$
|
|
4042
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
4043
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
4044
|
+
createVNode(unref(_sfc_main$J), { icon: "local_activity" }),
|
|
4045
|
+
createVNode(unref(_sfc_main$r), {
|
|
6080
4046
|
id: labelId,
|
|
6081
4047
|
variant: "body-sm"
|
|
6082
4048
|
}, {
|
|
@@ -6090,21 +4056,21 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6090
4056
|
_: 1
|
|
6091
4057
|
})
|
|
6092
4058
|
]),
|
|
6093
|
-
createVNode(unref(_sfc_main$
|
|
4059
|
+
createVNode(unref(_sfc_main$J), {
|
|
6094
4060
|
icon: isExpanded.value ? "remove" : "add"
|
|
6095
4061
|
}, null, 8, ["icon"])
|
|
6096
4062
|
])
|
|
6097
|
-
], 8, _hoisted_1$
|
|
4063
|
+
], 8, _hoisted_1$2),
|
|
6098
4064
|
withDirectives(createElementVNode("div", {
|
|
6099
4065
|
id: panelId,
|
|
6100
4066
|
ref_key: "panelRef",
|
|
6101
4067
|
ref: panelRef,
|
|
6102
4068
|
role: "region",
|
|
6103
4069
|
"aria-labelledby": labelId,
|
|
6104
|
-
class: "w-full
|
|
4070
|
+
class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
|
|
6105
4071
|
onKeydown: withKeys(withModifiers(collapseExpanded, ["prevent"]), ["esc"])
|
|
6106
4072
|
}, [
|
|
6107
|
-
createVNode(unref(_sfc_main$
|
|
4073
|
+
createVNode(unref(_sfc_main$t), {
|
|
6108
4074
|
modelValue: inputValue.value,
|
|
6109
4075
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
6110
4076
|
placeholder: unref($t)({
|
|
@@ -6120,7 +4086,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6120
4086
|
class: "w-full",
|
|
6121
4087
|
onKeydown: withKeys(withModifiers(applyCode, ["prevent"]), ["enter"])
|
|
6122
4088
|
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
6123
|
-
createVNode(unref(_sfc_main$
|
|
4089
|
+
createVNode(unref(_sfc_main$v), {
|
|
6124
4090
|
type: "button",
|
|
6125
4091
|
disabled: !canApply.value,
|
|
6126
4092
|
"aria-label": applyAriaLabel.value,
|
|
@@ -6141,24 +4107,24 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6141
4107
|
])
|
|
6142
4108
|
]),
|
|
6143
4109
|
_: 1
|
|
6144
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
4110
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
6145
4111
|
key: 1,
|
|
6146
4112
|
"no-border": "",
|
|
6147
4113
|
"no-spacing": "",
|
|
6148
4114
|
"content-background": "none",
|
|
6149
|
-
class: "w-full
|
|
4115
|
+
class: "relative w-full"
|
|
6150
4116
|
}, {
|
|
6151
4117
|
default: withCtx(() => [
|
|
6152
4118
|
createElementVNode("button", {
|
|
6153
4119
|
type: "button",
|
|
6154
|
-
class: "w-full
|
|
4120
|
+
class: "w-full rounded border border-primary-900 bg-white",
|
|
6155
4121
|
"aria-label": removeAriaLabel.value,
|
|
6156
4122
|
onClick: removeCode
|
|
6157
4123
|
}, [
|
|
6158
4124
|
createElementVNode("div", _hoisted_6, [
|
|
6159
4125
|
createElementVNode("div", _hoisted_7, [
|
|
6160
|
-
createVNode(unref(_sfc_main$
|
|
6161
|
-
createVNode(unref(_sfc_main$
|
|
4126
|
+
createVNode(unref(_sfc_main$J), { icon: "local_activity" }),
|
|
4127
|
+
createVNode(unref(_sfc_main$r), {
|
|
6162
4128
|
variant: "body-sm",
|
|
6163
4129
|
class: "font-semibold"
|
|
6164
4130
|
}, {
|
|
@@ -6168,7 +4134,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6168
4134
|
_: 1
|
|
6169
4135
|
})
|
|
6170
4136
|
]),
|
|
6171
|
-
createVNode(unref(_sfc_main$
|
|
4137
|
+
createVNode(unref(_sfc_main$J), { icon: "close" })
|
|
6172
4138
|
])
|
|
6173
4139
|
], 8, _hoisted_5)
|
|
6174
4140
|
]),
|
|
@@ -6179,7 +4145,77 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6179
4145
|
};
|
|
6180
4146
|
}
|
|
6181
4147
|
});
|
|
4148
|
+
const _hoisted_1$1 = { class: "flex justify-around" };
|
|
4149
|
+
const _hoisted_2$1 = { class: "flex items-center gap-0.5" };
|
|
4150
|
+
const _hoisted_3 = {
|
|
4151
|
+
key: 0,
|
|
4152
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4153
|
+
width: "40",
|
|
4154
|
+
height: "15",
|
|
4155
|
+
fill: "none",
|
|
4156
|
+
viewBox: "0 0 40 15",
|
|
4157
|
+
class: "inline-block translate-y-[1px]"
|
|
4158
|
+
};
|
|
4159
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4160
|
+
__name: "SecurePaymentsKPI",
|
|
4161
|
+
props: {
|
|
4162
|
+
paymentMethodOptions: { type: Array }
|
|
4163
|
+
},
|
|
4164
|
+
setup(__props) {
|
|
4165
|
+
const props = __props;
|
|
4166
|
+
const { $t } = useIntl();
|
|
4167
|
+
const showAdyen = computed(
|
|
4168
|
+
() => props.paymentMethodOptions.find(
|
|
4169
|
+
({ integration }) => {
|
|
4170
|
+
var _a;
|
|
4171
|
+
return ((_a = integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN";
|
|
4172
|
+
}
|
|
4173
|
+
)
|
|
4174
|
+
);
|
|
4175
|
+
const securePaymentsText = computed(() => {
|
|
4176
|
+
if (showAdyen.value) {
|
|
4177
|
+
return $t({
|
|
4178
|
+
defaultMessage: "Secure and encrypted payments by",
|
|
4179
|
+
description: "Secure encrypted payments KPI for a specific vendor, followed by a vendor logo",
|
|
4180
|
+
id: "secure_payments_kpi.specific_vendor"
|
|
4181
|
+
});
|
|
4182
|
+
}
|
|
4183
|
+
return $t({
|
|
4184
|
+
defaultMessage: "Secure and encrypted payments",
|
|
4185
|
+
description: "Secure encrypted payments KPI",
|
|
4186
|
+
id: "secure_payments_kpi.generic"
|
|
4187
|
+
});
|
|
4188
|
+
});
|
|
4189
|
+
return (_ctx, _cache) => {
|
|
4190
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
4191
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
4192
|
+
createVNode(unref(_sfc_main$J), {
|
|
4193
|
+
icon: "lock",
|
|
4194
|
+
size: "xs"
|
|
4195
|
+
}),
|
|
4196
|
+
createVNode(unref(_sfc_main$r), {
|
|
4197
|
+
tag: "span",
|
|
4198
|
+
variant: "body-xs",
|
|
4199
|
+
shade: "lighter"
|
|
4200
|
+
}, {
|
|
4201
|
+
default: withCtx(() => [
|
|
4202
|
+
createTextVNode(toDisplayString(securePaymentsText.value) + " ", 1),
|
|
4203
|
+
showAdyen.value ? (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
|
|
4204
|
+
createElementVNode("path", {
|
|
4205
|
+
fill: "currentColor",
|
|
4206
|
+
d: "M.049 2.917h5.845c.646 0 1.17.522 1.17 1.166v5.834H1.217c-.646 0-1.17-.522-1.17-1.167V5.833h2.924v2.334H4.14v-3.5H.049zM32.784 2.917v7h2.922v-5.25h1.17v5.25h2.922V4.083c0-.644-.523-1.166-1.169-1.166zM16.417 12.833h5.845c.646 0 1.17-.522 1.17-1.166v-8.75h-2.924v5.25H19.34v-5.25h-2.922V8.75c0 .645.523 1.167 1.169 1.167h2.922v1.166h-4.091zM31.614 9.917H25.77c-.646 0-1.17-.522-1.17-1.167V2.917h5.846c.646 0 1.17.522 1.17 1.166V7h-2.923V4.667h-1.17v3.5h4.092zM15.248 0v9.917H9.402c-.646 0-1.17-.522-1.17-1.167V4.083c0-.644.524-1.166 1.17-1.166h1.754v5.25h1.169V0z"
|
|
4207
|
+
}, null, -1)
|
|
4208
|
+
])])) : createCommentVNode("", true)
|
|
4209
|
+
]),
|
|
4210
|
+
_: 1
|
|
4211
|
+
})
|
|
4212
|
+
])
|
|
4213
|
+
]);
|
|
4214
|
+
};
|
|
4215
|
+
}
|
|
4216
|
+
});
|
|
6182
4217
|
const _hoisted_1 = { key: 0 };
|
|
4218
|
+
const _hoisted_2 = { class: "flex flex-col gap-2" };
|
|
6183
4219
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
6184
4220
|
__name: "Checkout",
|
|
6185
4221
|
props: {
|
|
@@ -6188,6 +4224,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6188
4224
|
emits: ["error", "ready"],
|
|
6189
4225
|
setup(__props, { emit: __emit }) {
|
|
6190
4226
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4227
|
+
const PaymentIntegrationForm = defineAsyncComponent(
|
|
4228
|
+
() => import("../../PaymentIntegrationForm-ID4QnvA3.mjs")
|
|
4229
|
+
);
|
|
6191
4230
|
const props = __props;
|
|
6192
4231
|
const emit = __emit;
|
|
6193
4232
|
const configuration = computed(() => props.configuration);
|
|
@@ -6454,17 +4493,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6454
4493
|
checkoutForm,
|
|
6455
4494
|
updateInvoicePreviewOnBillingInformationChange,
|
|
6456
4495
|
logger,
|
|
6457
|
-
formatErrorMessage: ({ action }) => $t(
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
}
|
|
6467
|
-
),
|
|
4496
|
+
formatErrorMessage: ({ action }) => action === "apply" ? $t({
|
|
4497
|
+
defaultMessage: "Promotion code could not be applied. Please try again.",
|
|
4498
|
+
id: "checkout.promotion_code.apply_failed",
|
|
4499
|
+
description: "Error message when applying a promotion code in checkout failed"
|
|
4500
|
+
}) : $t({
|
|
4501
|
+
defaultMessage: "Promotion code could not be removed. Please try again.",
|
|
4502
|
+
id: "checkout.promotion_code.remove_failed",
|
|
4503
|
+
description: "Error message when removing a promotion code in checkout failed"
|
|
4504
|
+
}),
|
|
6468
4505
|
onInvalidPromotionCode: () => {
|
|
6469
4506
|
promotionCode.value = null;
|
|
6470
4507
|
},
|
|
@@ -6472,9 +4509,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6472
4509
|
promotionCode.value = null;
|
|
6473
4510
|
}
|
|
6474
4511
|
});
|
|
4512
|
+
const handleRedirect = () => {
|
|
4513
|
+
if (!successRedirectUrl) return;
|
|
4514
|
+
safeUrlRedirect(successRedirectUrl);
|
|
4515
|
+
};
|
|
6475
4516
|
const handlePaymentSuccess = () => {
|
|
4517
|
+
var _a2;
|
|
6476
4518
|
isPaid.value = true;
|
|
6477
4519
|
promotionCodeErrorMessage.value = null;
|
|
4520
|
+
if ((_a2 = props.configuration) == null ? void 0 : _a2.onPaymentSuccess) {
|
|
4521
|
+
props.configuration.onPaymentSuccess();
|
|
4522
|
+
return;
|
|
4523
|
+
}
|
|
4524
|
+
if (successRedirectUrl) {
|
|
4525
|
+
handleRedirect();
|
|
4526
|
+
return;
|
|
4527
|
+
}
|
|
6478
4528
|
};
|
|
6479
4529
|
const handleBillingPeriodChange = (billingPeriod) => {
|
|
6480
4530
|
if (!subscription.value) {
|
|
@@ -6490,13 +4540,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6490
4540
|
emit("ready");
|
|
6491
4541
|
});
|
|
6492
4542
|
return (_ctx, _cache) => {
|
|
6493
|
-
return criticalError.value ? (openBlock(), createBlock(_sfc_main$
|
|
4543
|
+
return criticalError.value ? (openBlock(), createBlock(_sfc_main$m, { key: 0 })) : (openBlock(), createBlock(unref(ContentWithAsideLayout), { key: 1 }, {
|
|
6494
4544
|
header: withCtx(() => [
|
|
6495
|
-
createVNode(_sfc_main$
|
|
4545
|
+
createVNode(_sfc_main$K, { class: "min-h-[52px] w-96" }, {
|
|
6496
4546
|
default: withCtx(() => {
|
|
6497
4547
|
var _a2, _b2, _c2;
|
|
6498
4548
|
return [
|
|
6499
|
-
unref(invoicePreview) && unref(subscription) && subscriptionStartDate.value ? (openBlock(), createBlock(_sfc_main$
|
|
4549
|
+
unref(invoicePreview) && unref(subscription) && subscriptionStartDate.value ? (openBlock(), createBlock(_sfc_main$n, {
|
|
6500
4550
|
key: 0,
|
|
6501
4551
|
"trial-start-date": trialStartDate.value,
|
|
6502
4552
|
"trial-period": unref(trialPeriod),
|
|
@@ -6514,7 +4564,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6514
4564
|
content: withCtx(() => {
|
|
6515
4565
|
var _a2, _b2, _c2;
|
|
6516
4566
|
return [
|
|
6517
|
-
unref(subscription) && unref(isMobileViewport) ? (openBlock(), createBlock(_sfc_main$
|
|
4567
|
+
unref(subscription) && unref(isMobileViewport) ? (openBlock(), createBlock(_sfc_main$j, {
|
|
6518
4568
|
key: 0,
|
|
6519
4569
|
subscription: unref(subscription),
|
|
6520
4570
|
invoice: unref(invoicePreview),
|
|
@@ -6531,7 +4581,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6531
4581
|
variant: "products-inline",
|
|
6532
4582
|
onBillingPeriodChange: handleBillingPeriodChange
|
|
6533
4583
|
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending", "country-code"])) : createCommentVNode("", true),
|
|
6534
|
-
showPlanCustomizationEditor.value && unref(subscription) ? (openBlock(), createBlock(_sfc_main$
|
|
4584
|
+
showPlanCustomizationEditor.value && unref(subscription) ? (openBlock(), createBlock(_sfc_main$4, {
|
|
6535
4585
|
key: 1,
|
|
6536
4586
|
"seats-values": seatsValuesModel.value,
|
|
6537
4587
|
"onUpdate:seatsValues": _cache[0] || (_cache[0] = ($event) => seatsValuesModel.value = $event),
|
|
@@ -6542,7 +4592,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6542
4592
|
"billing-period": unref(subscription).billing_period,
|
|
6543
4593
|
currency: activePricingCurrency.value
|
|
6544
4594
|
}, null, 8, ["seats-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "billing-period", "currency"])) : createCommentVNode("", true),
|
|
6545
|
-
!unref(isPaid) && unref(checkoutForm).form.value.country && unref(amount) && expressPaymentMethodBillingInformation.value ? (openBlock(), createBlock(_sfc_main$
|
|
4595
|
+
!unref(isPaid) && unref(checkoutForm).form.value.country && unref(amount) && expressPaymentMethodBillingInformation.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
6546
4596
|
key: 2,
|
|
6547
4597
|
amount: unref(amount),
|
|
6548
4598
|
"country-code": unref(checkoutForm).form.value.country,
|
|
@@ -6552,11 +4602,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6552
4602
|
"on-billing-information-change": unref(updateInvoicePreviewOnBillingInformationChange),
|
|
6553
4603
|
onUpdateBillingInformation: handleUpdateBillingInformation
|
|
6554
4604
|
}, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : createCommentVNode("", true),
|
|
6555
|
-
unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
4605
|
+
unref(isPaid) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
6556
4606
|
key: 3,
|
|
6557
|
-
|
|
6558
|
-
}
|
|
6559
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
4607
|
+
onContinueToMerchant: handleRedirect
|
|
4608
|
+
})) : createCommentVNode("", true),
|
|
4609
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$o, {
|
|
6560
4610
|
key: 4,
|
|
6561
4611
|
modelValue: unref(checkoutForm).form.value,
|
|
6562
4612
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(checkoutForm).form.value = $event),
|
|
@@ -6567,14 +4617,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6567
4617
|
"get-is-field-required": unref(checkoutForm).getIsFieldRequired,
|
|
6568
4618
|
"read-only": unref(isPaid)
|
|
6569
4619
|
}, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"])) : createCommentVNode("", true),
|
|
6570
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
4620
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$K, {
|
|
6571
4621
|
key: 5,
|
|
6572
4622
|
variant: "section",
|
|
6573
4623
|
class: "min-h-[130px]"
|
|
6574
4624
|
}, {
|
|
6575
4625
|
default: withCtx(() => [
|
|
6576
4626
|
!unref(isPaymentMethodsPending) || unref(isPaymentMethodsPending) && unref(paymentMethodOptions).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
6577
|
-
createVNode(unref(_sfc_main$
|
|
4627
|
+
createVNode(unref(_sfc_main$r), {
|
|
6578
4628
|
variant: "heading-3",
|
|
6579
4629
|
tag: "h2",
|
|
6580
4630
|
class: "mb-2"
|
|
@@ -6588,7 +4638,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6588
4638
|
]),
|
|
6589
4639
|
_: 1
|
|
6590
4640
|
}),
|
|
6591
|
-
!unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$
|
|
4641
|
+
!unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$i, {
|
|
6592
4642
|
key: 0,
|
|
6593
4643
|
icon: "captive_portal"
|
|
6594
4644
|
}, {
|
|
@@ -6607,7 +4657,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6607
4657
|
})), 1)
|
|
6608
4658
|
]),
|
|
6609
4659
|
_: 1
|
|
6610
|
-
})) : unref(paymentMethodOptions).length === 0 ? (openBlock(), createBlock(_sfc_main$
|
|
4660
|
+
})) : unref(paymentMethodOptions).length === 0 ? (openBlock(), createBlock(_sfc_main$i, {
|
|
6611
4661
|
key: 1,
|
|
6612
4662
|
icon: "credit_card_off"
|
|
6613
4663
|
}, {
|
|
@@ -6626,7 +4676,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6626
4676
|
})), 1)
|
|
6627
4677
|
]),
|
|
6628
4678
|
_: 1
|
|
6629
|
-
})) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createBlock(
|
|
4679
|
+
})) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createBlock(unref(PaymentIntegrationForm), {
|
|
6630
4680
|
key: 2,
|
|
6631
4681
|
ref_key: "paymentIntegrationFormRef",
|
|
6632
4682
|
ref: paymentIntegrationFormRef,
|
|
@@ -6635,12 +4685,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6635
4685
|
amount: unref(amount),
|
|
6636
4686
|
variant: "AUTHORIZE",
|
|
6637
4687
|
"payment-method-options": unref(paymentMethodOptions) ?? [],
|
|
6638
|
-
"success-redirect-url": unref(successRedirectUrl),
|
|
6639
4688
|
"validate-on-submit": handleValidateOnSubmit,
|
|
6640
4689
|
"force-store-payment-method": "",
|
|
6641
4690
|
onPaymentSuccess: handlePaymentSuccess,
|
|
6642
4691
|
onReady: _cache[3] || (_cache[3] = ($event) => emit("ready"))
|
|
6643
|
-
}, null, 8, ["country-code", "context", "amount", "payment-method-options"
|
|
4692
|
+
}, null, 8, ["country-code", "context", "amount", "payment-method-options"])) : createCommentVNode("", true)
|
|
6644
4693
|
])) : createCommentVNode("", true)
|
|
6645
4694
|
]),
|
|
6646
4695
|
_: 1
|
|
@@ -6648,14 +4697,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6648
4697
|
];
|
|
6649
4698
|
}),
|
|
6650
4699
|
aside: withCtx(() => [
|
|
6651
|
-
createVNode(_sfc_main$
|
|
4700
|
+
createVNode(_sfc_main$K, {
|
|
6652
4701
|
variant: "section",
|
|
6653
4702
|
class: "min-h-[220px]"
|
|
6654
4703
|
}, {
|
|
6655
4704
|
default: withCtx(() => {
|
|
6656
4705
|
var _a2;
|
|
6657
4706
|
return [
|
|
6658
|
-
unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$
|
|
4707
|
+
unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$j, {
|
|
6659
4708
|
key: 0,
|
|
6660
4709
|
subscription: unref(subscription),
|
|
6661
4710
|
invoice: unref(invoicePreview),
|
|
@@ -6674,65 +4723,50 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6674
4723
|
}),
|
|
6675
4724
|
_: 1
|
|
6676
4725
|
}),
|
|
6677
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
4726
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
6678
4727
|
key: 0,
|
|
6679
4728
|
"promotion-code": promotionCode.value,
|
|
6680
4729
|
"onUpdate:appliedCode": _cache[4] || (_cache[4] = ($event) => promotionCode.value = $event),
|
|
6681
4730
|
onRemove: unref(removePromotionCode),
|
|
6682
4731
|
onApply: unref(applyPromotionCode)
|
|
6683
4732
|
}, null, 8, ["promotion-code", "onRemove", "onApply"])) : createCommentVNode("", true),
|
|
6684
|
-
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4733
|
+
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
6685
4734
|
key: 1,
|
|
6686
4735
|
class: "mt-2",
|
|
6687
4736
|
title: unref(promotionCodeErrorMessage)
|
|
6688
4737
|
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
shade: "lighter",
|
|
6722
|
-
class: "flex grow justify-center"
|
|
6723
|
-
}, {
|
|
6724
|
-
default: withCtx(() => [
|
|
6725
|
-
createVNode(_sfc_main$$, {
|
|
6726
|
-
icon: "lock",
|
|
6727
|
-
kpi: unref($t)({
|
|
6728
|
-
defaultMessage: "Secure and encrypted payments",
|
|
6729
|
-
id: "checkout.kpi.encrypted_payments.label",
|
|
6730
|
-
description: "The encrypted payments KPI shown in the checkout"
|
|
6731
|
-
})
|
|
6732
|
-
}, null, 8, ["kpi"])
|
|
6733
|
-
]),
|
|
6734
|
-
_: 1
|
|
6735
|
-
})
|
|
4738
|
+
createElementVNode("div", _hoisted_2, [
|
|
4739
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$K, {
|
|
4740
|
+
key: 0,
|
|
4741
|
+
class: "min-h-[44px]"
|
|
4742
|
+
}, {
|
|
4743
|
+
default: withCtx(() => [
|
|
4744
|
+
unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
4745
|
+
key: 0,
|
|
4746
|
+
type: "button",
|
|
4747
|
+
size: "lg",
|
|
4748
|
+
class: "w-full",
|
|
4749
|
+
disabled: unref(isPromotionCodePending) || unref(paymentMethodOptions).length === 0,
|
|
4750
|
+
onClick: handleSubmit
|
|
4751
|
+
}, {
|
|
4752
|
+
default: withCtx(() => [
|
|
4753
|
+
createTextVNode(toDisplayString(hasTrialPeriod.value ? unref($t)({
|
|
4754
|
+
defaultMessage: "Start trial",
|
|
4755
|
+
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
4756
|
+
description: "The label of the start trial button in the checkout form"
|
|
4757
|
+
}) : unref($t)({
|
|
4758
|
+
defaultMessage: "Pay and subscribe",
|
|
4759
|
+
id: "checkout.pay_and_subscribe_button.label",
|
|
4760
|
+
description: "The label of the pay and subscribe button in the checkout form"
|
|
4761
|
+
})), 1)
|
|
4762
|
+
]),
|
|
4763
|
+
_: 1
|
|
4764
|
+
}, 8, ["disabled"])) : createCommentVNode("", true)
|
|
4765
|
+
]),
|
|
4766
|
+
_: 1
|
|
4767
|
+
})) : createCommentVNode("", true),
|
|
4768
|
+
createVNode(_sfc_main$2, { "payment-method-options": unref(paymentMethodOptions) }, null, 8, ["payment-method-options"])
|
|
4769
|
+
])
|
|
6736
4770
|
]),
|
|
6737
4771
|
_: 1
|
|
6738
4772
|
}));
|
|
@@ -6746,7 +4780,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6746
4780
|
locale: { type: String },
|
|
6747
4781
|
dateLocale: { type: String },
|
|
6748
4782
|
messages: { type: Object },
|
|
6749
|
-
showTimezones: { type: Boolean },
|
|
6750
4783
|
primaryColor: { type: String },
|
|
6751
4784
|
secondaryColor: { type: String },
|
|
6752
4785
|
isShadowRoot: { type: Boolean },
|
|
@@ -6755,7 +4788,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6755
4788
|
onLog: { type: Function },
|
|
6756
4789
|
allowedPortalTypes: { type: Array },
|
|
6757
4790
|
portalObject: { type: Object },
|
|
6758
|
-
customElementName: { type: String },
|
|
6759
4791
|
branding: { type: Object },
|
|
6760
4792
|
configuration: { type: Object }
|
|
6761
4793
|
},
|
|
@@ -6789,7 +4821,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6789
4821
|
const validEmail = getValidEmail((_b = props.configuration) == null ? void 0 : _b.email);
|
|
6790
4822
|
return (_ctx, _cache) => {
|
|
6791
4823
|
var _a2, _b2, _c, _d;
|
|
6792
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4824
|
+
return openBlock(), createBlock(_sfc_main$Q, {
|
|
6793
4825
|
"custom-element-name": unref(COMPONENT_NAME),
|
|
6794
4826
|
environment: __props.environment,
|
|
6795
4827
|
locale: __props.locale,
|