@solvimon/solvimon-web 0.1.0-alpha.5 → 0.1.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert.vue.es-DMPvSykx.js +1 -0
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
- package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
- package/dist/Amount.vue.es-h8wulbBG.js +1 -0
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
- package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CvUwy_tp.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +8 -5
- package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
- package/dist/Button.vue.es-BC4_TItq.js +1 -0
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
- package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
- package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
- package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
- package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
- package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
- package/dist/{ContentWithAsideLayout-CKbnuXMU.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-BjJufFeN.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
- package/dist/{useCustomerPaymentMethodOptions-BlFH4zxG.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +16 -33
- package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
- package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
- package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
- package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
- package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DaEPSNrY.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CLU-8-Ao.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs} +9 -5
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-DAwMy1l8.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs} +6 -5
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
- package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
- package/dist/Section.vue.es-BuzTXRLP.js +1 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs} +17 -5
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Cj4cnM8z.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +24 -24
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
- package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
- package/dist/_flatRest.es-dFffnTpX.js +1 -0
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/api.es-B4qAAJKr.js +1 -0
- package/dist/api.es-UkfpLiLL.mjs +83 -0
- package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
- package/dist/cn.es-C7xoIs3C.js +1 -0
- package/dist/cn.es-tfxVlz02.mjs +3191 -0
- package/dist/component-ZRZIt3ZW.js +1 -0
- package/dist/component-dpA83LIN.mjs +6569 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +6 -12
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +2612 -28
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +4 -4
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +12 -9
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4821 -8
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/countryData.es--zJAd6LA.mjs +252 -0
- package/dist/countryData.es-D3MFzU92.js +1 -0
- package/dist/customer-CJrpbGX4.mjs +32 -0
- package/dist/customer-CcQR-JIm.js +1 -0
- package/dist/customer.es-D42Md24r.js +1 -0
- package/dist/customer.es-LIW2YmLL.mjs +30 -0
- package/dist/formatting.es-9hM8aHSg.js +1 -0
- package/dist/formatting.es-D5H_ySFv.mjs +68 -0
- package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
- package/dist/index-CI71bVGE.mjs +2521 -0
- package/dist/index-WLSPwi90.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-BBJF2O2l.js +1 -0
- package/dist/index.es-LCAKs4tH.mjs +438 -0
- package/dist/index.es.js +1 -1
- package/dist/invoices-3kVHsAXr.js +1 -0
- package/dist/{invoices-CoEBP5UT.mjs → invoices-CNK1Ushv.mjs} +15 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
- package/dist/isEmpty.es-Dycf-CD_.js +1 -0
- package/dist/{paymentMethods-C2gWIbEr.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
- package/dist/paymentMethods-DZRf0WRl.js +1 -0
- package/dist/{payments-DLjkq_hN.mjs → payments-CE9U7aKK.mjs} +1 -1
- package/dist/{payments-ClJySb0d.js → payments-CLt0SExf.js} +1 -1
- package/dist/pick.es-BgDAfhAl.js +1 -0
- package/dist/pick.es-DdVOyp0Q.mjs +45 -0
- package/dist/{registry-bo_7pcbl.mjs → registry-B99ZnfEn.mjs} +1 -2
- package/dist/registry-ClZ43bQn.js +1 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +1873 -172
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +31 -17
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
- package/dist/solvimon-web.css +1 -1
- package/dist/{sprite-i5T7eZnk-C55G-dBo.js → sprite.svg.es-CCc3Mz1x.js} +1 -1
- package/dist/{sprite-i5T7eZnk-i5T7eZnk.mjs → sprite.svg.es-DZD704h3.mjs} +1 -1
- package/dist/subscriptions-CS8HTxzC.js +1 -0
- package/dist/{subscriptions-BepBTXR5.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
- package/dist/typeGuards.es-C4nR5FkL.js +1 -0
- package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
- package/dist/{useActionDispatchProvider-D4OtXsNA.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
- package/dist/{useActionDispatchProvider-B_SkyymZ.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
- package/dist/useCustomer--jycAz--.mjs +25 -0
- package/dist/useCustomer-PthyTFLl.js +1 -0
- package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
- package/dist/{useIncrementalLoading-BqD4k_-r.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
- package/dist/{useInvoiceData-7mqBeSPa.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
- package/dist/{useInvoiceData-DvNf2402.js → useInvoiceData-DvQO_nKz.js} +1 -1
- package/dist/useInvoicesList-CHkwSNO9.js +1 -0
- package/dist/{useInvoicesList-B5vYDRyl.mjs → useInvoicesList-DFhF_gp7.mjs} +261 -24
- package/dist/{usePaymentMethods-BdZkt6re.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
- package/dist/{usePaymentMethods-4Io2ZHlo.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
- package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
- package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
- package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
- package/package.json +14 -8
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BouYyZhD.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ck_1lRDB.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DFCX2tcj.mjs +0 -6568
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BOZurit_.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D49i1DHa.js +0 -1
- package/dist/component-B0RYS5uK.mjs +0 -58666
- package/dist/component-BeqkeC9h.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-CUrXmVXe.js +0 -1
- package/dist/paymentMethods-D_rYLg3F.js +0 -1
- package/dist/registry-EPF-VAYZ.js +0 -1
- package/dist/subscriptions-DERHtyHo.js +0 -1
- package/dist/useCustomer-C0RKKfGJ.mjs +0 -45
- package/dist/useCustomer-CEFUPIDZ.js +0 -1
- package/dist/useCustomerPaymentMethodOptions-BgCFkLeQ.js +0 -1
- package/dist/useIncrementalLoading-CDpeHhKs.js +0 -1
- package/dist/useInvoicesList-CBqZG_rw.js +0 -1
- package/dist/useWalletBalanceItems-B0NZuM3W.mjs +0 -105
- package/dist/useWalletBalanceItems-CzV3PcJH.js +0 -1
|
@@ -1,19 +1,1575 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
1
|
+
import { defineComponent, createPropsRestProxy, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createVNode, renderSlot, Fragment, renderList, resolveDynamicComponent, ref, createCommentVNode, createElementVNode, withDirectives, isRef, vModelRadio, withKeys, normalizeProps, getCurrentInstance, inject, createSlots, guardReactiveProps, Teleport, normalizeStyle, nextTick, useModel, onMounted, watch, mergeModels, withModifiers, toRef, vShow } from "vue";
|
|
2
|
+
import { _ as _sfc_main$C, a as useIntl, S as SEARCH_SELECT_TELEPORT_TARGET, I as I18N_INJECTION_KEY, b as _sfc_main$11, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
|
|
3
|
+
import { c as countryData } from "../../countryData.es--zJAd6LA.mjs";
|
|
4
|
+
import { _ as _sfc_main$G, c as convertDateRangeToTimePeriod, a as _sfc_main$T, u as useTimePeriod, b as usePricingItem, d as _sfc_main$Z } from "../../TrialChip.vue.es-BHYbW8b6.mjs";
|
|
5
|
+
import { b as formatBillingPeriod, a as formatAmount } from "../../formatting.es-D5H_ySFv.mjs";
|
|
6
|
+
import { a as _sfc_main$I, _ as _sfc_main$P } from "../../Button.vue.es-6sBk5tBL.mjs";
|
|
7
|
+
import { _ as _sfc_main$_ } from "../../ErrorNotification.vue.es-Bgw0MIl8.mjs";
|
|
8
|
+
import { c as createSubscriptionsService } from "../../subscriptions-CoeCrY1I.mjs";
|
|
4
9
|
import { S as Symbol$1, m as isArrayLike, d as isArray, i as isBuffer, c as isTypedArray, p as isArguments, a as getTag, k as isPrototype, q as baseKeys, A as ApiStatus } from "../../_Uint8Array-DHE03FZr.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
10
|
+
import { c as createInvoicesService } from "../../invoices-CNK1Ushv.mjs";
|
|
11
|
+
import { i as isEqual$1, u as useService } from "../../useService-DG_zedHV.mjs";
|
|
12
|
+
import { c as escapeUserInput, d as _sfc_main$M, s as sortedUniqBy, f as useIsMounted, _ as _sfc_main$N, u as useValidation, g as requiredIf, r as required, e as email, o as objectDiff, a as _sfc_main$R, b as _sfc_main$S } from "../../index-CI71bVGE.mjs";
|
|
8
13
|
import { w as watchDebounced, f as watchOnce } from "../../index-BFZ0dPh9.mjs";
|
|
9
14
|
import { c as cloneDeep } from "../../cloneDeep-sm9cY-u2.mjs";
|
|
10
|
-
import { c as createPaymentMethodsService } from "../../paymentMethods-
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { _ as _sfc_main$
|
|
15
|
+
import { c as createPaymentMethodsService } from "../../paymentMethods-C-ApE-G4.mjs";
|
|
16
|
+
import { u as usePortal, C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Ct24RV-2.mjs";
|
|
17
|
+
import { a as _sfc_main$U, u as useLogger, g as getAdyenExpressCheckoutConfiguration, t as transformObjectToAdyenObject, c as createReturnUrl, _ as _sfc_main$10 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs";
|
|
18
|
+
import { _ as _sfc_main$W, a as _sfc_main$$ } from "../../PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs";
|
|
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";
|
|
14
31
|
import { a as useBreakpoints, b as breakpointsTailwind } from "../../index-D3v7hAtc.mjs";
|
|
15
|
-
import { _ as _sfc_main$
|
|
16
|
-
import {
|
|
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
|
+
}
|
|
17
1573
|
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
|
|
18
1574
|
symbolProto ? symbolProto.toString : void 0;
|
|
19
1575
|
function baseToString(value) {
|
|
@@ -478,23 +2034,6 @@ const getTaxIdMessage = ({ $model }) => {
|
|
|
478
2034
|
});
|
|
479
2035
|
};
|
|
480
2036
|
const taxId = common.withMessage(getTaxIdMessage, taxIdValidator);
|
|
481
|
-
const everythingButWhitespaceOrEmptyValidator = (value) => {
|
|
482
|
-
if (value === null || value === void 0) return false;
|
|
483
|
-
const str = String(value);
|
|
484
|
-
return /^\S+$/.test(str);
|
|
485
|
-
};
|
|
486
|
-
common.withMessage(
|
|
487
|
-
"Everything but whitespace",
|
|
488
|
-
everythingButWhitespaceOrEmptyValidator
|
|
489
|
-
);
|
|
490
|
-
const everythingButWhitespaceValidator = (value) => {
|
|
491
|
-
if (!common.req(value)) return true;
|
|
492
|
-
return everythingButWhitespaceOrEmptyValidator(String(value));
|
|
493
|
-
};
|
|
494
|
-
common.withMessage(
|
|
495
|
-
"Everything but whitespace",
|
|
496
|
-
everythingButWhitespaceValidator
|
|
497
|
-
);
|
|
498
2037
|
function getFirstPricingPlanScheduleOfType({
|
|
499
2038
|
pricingPlanScheduleInfos,
|
|
500
2039
|
type
|
|
@@ -513,9 +2052,37 @@ function getPricingItemConfigMetaById({
|
|
|
513
2052
|
(_a = category.pricings) == null ? void 0 : _a.forEach((pricing) => {
|
|
514
2053
|
var _a2;
|
|
515
2054
|
(_a2 = pricing.items) == null ? void 0 : _a2.forEach((item) => {
|
|
516
|
-
var _a3;
|
|
517
|
-
(_a3 = item.
|
|
518
|
-
var _a4
|
|
2055
|
+
var _a3, _b, _c;
|
|
2056
|
+
(_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach((billingConfig) => {
|
|
2057
|
+
var _a4;
|
|
2058
|
+
(_a4 = billingConfig.configs) == null ? void 0 : _a4.forEach((config) => {
|
|
2059
|
+
var _a5, _b2, _c2;
|
|
2060
|
+
if (config.id) {
|
|
2061
|
+
const currency = (_c2 = (_b2 = (_a5 = config.bands) == null ? void 0 : _a5.find((band) => {
|
|
2062
|
+
var _a6;
|
|
2063
|
+
return (_a6 = band.amount) == null ? void 0 : _a6.currency;
|
|
2064
|
+
})) == null ? void 0 : _b2.amount) == null ? void 0 : _c2.currency;
|
|
2065
|
+
metaById.set(config.id, {
|
|
2066
|
+
...currency && { currency },
|
|
2067
|
+
billingPeriod: billingConfig.billing_period
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
});
|
|
2072
|
+
(_b = item.configs) == null ? void 0 : _b.forEach((config) => {
|
|
2073
|
+
var _a4, _b2, _c2;
|
|
2074
|
+
if (config.id) {
|
|
2075
|
+
const currency = (_c2 = (_b2 = (_a4 = config.bands) == null ? void 0 : _a4.find((band) => {
|
|
2076
|
+
var _a5;
|
|
2077
|
+
return (_a5 = band.amount) == null ? void 0 : _a5.currency;
|
|
2078
|
+
})) == null ? void 0 : _b2.amount) == null ? void 0 : _c2.currency;
|
|
2079
|
+
metaById.set(config.id, {
|
|
2080
|
+
...currency && { currency }
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
(_c = item.pricing_currency_configs) == null ? void 0 : _c.forEach((currencyConfig) => {
|
|
2085
|
+
var _a4, _b2;
|
|
519
2086
|
const currency = currencyConfig.currency;
|
|
520
2087
|
(_a4 = currencyConfig.billing_period_configs) == null ? void 0 : _a4.forEach((billingConfig) => {
|
|
521
2088
|
var _a5;
|
|
@@ -528,7 +2095,7 @@ function getPricingItemConfigMetaById({
|
|
|
528
2095
|
}
|
|
529
2096
|
});
|
|
530
2097
|
});
|
|
531
|
-
(
|
|
2098
|
+
(_b2 = currencyConfig.configs) == null ? void 0 : _b2.forEach((config) => {
|
|
532
2099
|
if (config.id) {
|
|
533
2100
|
metaById.set(config.id, { currency });
|
|
534
2101
|
}
|
|
@@ -934,7 +2501,7 @@ const useInvoicePreview = () => {
|
|
|
934
2501
|
}
|
|
935
2502
|
};
|
|
936
2503
|
const cachedPayload = cachedPreviewPayloads.value[periodKey];
|
|
937
|
-
if (cachedPayload &&
|
|
2504
|
+
if (cachedPayload && isEqual$1(payload, cachedPayload)) {
|
|
938
2505
|
return { periodKey, response: void 0 };
|
|
939
2506
|
}
|
|
940
2507
|
cachedPreviewPayloads.value = {
|
|
@@ -1128,7 +2695,7 @@ const usePaymentMethodOptions = () => {
|
|
|
1128
2695
|
country,
|
|
1129
2696
|
amount
|
|
1130
2697
|
};
|
|
1131
|
-
if (
|
|
2698
|
+
if (isEqual$1(payload, cachedPayload.value)) {
|
|
1132
2699
|
return;
|
|
1133
2700
|
}
|
|
1134
2701
|
cachedPayload.value = payload;
|
|
@@ -1559,6 +3126,101 @@ function usePromotionCode({
|
|
|
1559
3126
|
function isFieldError(error) {
|
|
1560
3127
|
return typeof error === "object" && error !== null && "field" in error;
|
|
1561
3128
|
}
|
|
3129
|
+
const _hoisted_1$l = { class: "flex items-center gap-2" };
|
|
3130
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
3131
|
+
__name: "TaxIDCheckNotice",
|
|
3132
|
+
props: {
|
|
3133
|
+
taxIdValidationResult: { type: Object }
|
|
3134
|
+
},
|
|
3135
|
+
setup(__props) {
|
|
3136
|
+
const props = __props;
|
|
3137
|
+
const { formatMessage } = useIntl();
|
|
3138
|
+
const isTaxIdValid = computed(() => {
|
|
3139
|
+
return props.taxIdValidationResult.valid === "VALID";
|
|
3140
|
+
});
|
|
3141
|
+
const taxIdValidationMessage = computed(() => {
|
|
3142
|
+
return isTaxIdValid.value ? formatMessage({
|
|
3143
|
+
defaultMessage: "VAT number is valid.",
|
|
3144
|
+
id: "damFt1",
|
|
3145
|
+
description: "The message shown when the VAT number is valid"
|
|
3146
|
+
}) : formatMessage({
|
|
3147
|
+
defaultMessage: "VAT number is invalid.",
|
|
3148
|
+
id: "gR9xe+",
|
|
3149
|
+
description: "The message shown when the VAT number is invalid"
|
|
3150
|
+
});
|
|
3151
|
+
});
|
|
3152
|
+
return (_ctx, _cache) => {
|
|
3153
|
+
return openBlock(), createBlock(unref(_sfc_main$K), {
|
|
3154
|
+
type: isTaxIdValid.value ? "success" : "danger",
|
|
3155
|
+
icon: false
|
|
3156
|
+
}, {
|
|
3157
|
+
default: withCtx(() => [
|
|
3158
|
+
createElementVNode("div", _hoisted_1$l, [
|
|
3159
|
+
createVNode(unref(_sfc_main$C), { variant: "body-xs" }, {
|
|
3160
|
+
default: withCtx(() => [
|
|
3161
|
+
createTextVNode(toDisplayString(taxIdValidationMessage.value), 1)
|
|
3162
|
+
]),
|
|
3163
|
+
_: 1
|
|
3164
|
+
})
|
|
3165
|
+
])
|
|
3166
|
+
]),
|
|
3167
|
+
_: 1
|
|
3168
|
+
}, 8, ["type"]);
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3171
|
+
});
|
|
3172
|
+
function useTaxIDValidationCheck(form) {
|
|
3173
|
+
const { checkTaxID } = createCustomerService();
|
|
3174
|
+
const taxIdValidationData = ref(void 0);
|
|
3175
|
+
const taxId2 = computed(() => {
|
|
3176
|
+
var _a;
|
|
3177
|
+
return ((_a = form.value.companyVatNumber) == null ? void 0 : _a.trim()) ?? "";
|
|
3178
|
+
});
|
|
3179
|
+
const legalName = computed(() => form.value.companyLegalName ?? "");
|
|
3180
|
+
const countryCode = computed(() => form.value.country);
|
|
3181
|
+
const isTaxIDCheckPending = ref(false);
|
|
3182
|
+
const isSelectedCountryEU = computed(() => {
|
|
3183
|
+
return isEUCountry(countryCode.value ?? "");
|
|
3184
|
+
});
|
|
3185
|
+
const isTaxIDCheckEnabled = computed(() => !!(taxId2.value && legalName.value && countryCode.value));
|
|
3186
|
+
const showViesCheckNotice = computed(() => {
|
|
3187
|
+
return isSelectedCountryEU.value && taxId2.value;
|
|
3188
|
+
});
|
|
3189
|
+
async function runTaxIDCheck() {
|
|
3190
|
+
var _a;
|
|
3191
|
+
if (!isTaxIDCheckEnabled.value || !isSelectedCountryEU.value || !countryCode.value) {
|
|
3192
|
+
return;
|
|
3193
|
+
}
|
|
3194
|
+
isTaxIDCheckPending.value = true;
|
|
3195
|
+
try {
|
|
3196
|
+
const result = await checkTaxID({
|
|
3197
|
+
type: "ORGANIZATION",
|
|
3198
|
+
organization: {
|
|
3199
|
+
legal_name: legalName.value,
|
|
3200
|
+
tax_ids: [{ id: taxId2.value, type: "GENERIC_TAX_ID" }],
|
|
3201
|
+
registered_address: {
|
|
3202
|
+
country: countryCode.value
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
});
|
|
3206
|
+
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.length) {
|
|
3207
|
+
taxIdValidationData.value = result.data[0];
|
|
3208
|
+
} else {
|
|
3209
|
+
taxIdValidationData.value = void 0;
|
|
3210
|
+
}
|
|
3211
|
+
} finally {
|
|
3212
|
+
isTaxIDCheckPending.value = false;
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
return {
|
|
3216
|
+
runTaxIDCheck,
|
|
3217
|
+
taxIdValidationData,
|
|
3218
|
+
isTaxIDCheckPending,
|
|
3219
|
+
isTaxIDCheckEnabled,
|
|
3220
|
+
showViesCheckNotice,
|
|
3221
|
+
isSelectedCountryEU
|
|
3222
|
+
};
|
|
3223
|
+
}
|
|
1562
3224
|
const _hoisted_1$k = { class: "grid grid-cols-1 gap-1" };
|
|
1563
3225
|
const _hoisted_2$b = { class: "grid grid-cols-1 gap-2" };
|
|
1564
3226
|
const _hoisted_3$5 = { key: 0 };
|
|
@@ -1594,7 +3256,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1594
3256
|
}
|
|
1595
3257
|
});
|
|
1596
3258
|
const isCompanyPurchase = computed(() => model.value.type === "ORGANIZATION");
|
|
3259
|
+
const country = computed({
|
|
3260
|
+
get: () => model.value.country,
|
|
3261
|
+
set: (value) => {
|
|
3262
|
+
model.value.country = value && isValidCountryCode(value) ? value : void 0;
|
|
3263
|
+
}
|
|
3264
|
+
});
|
|
1597
3265
|
const showVatIdInput = computed(() => model.value.country !== "US");
|
|
3266
|
+
const { isTaxIDCheckEnabled, isTaxIDCheckPending, taxIdValidationData, runTaxIDCheck } = useTaxIDValidationCheck(model);
|
|
1598
3267
|
const { $t } = useIntl();
|
|
1599
3268
|
const getOptionalSuffix = (field) => {
|
|
1600
3269
|
if (props.getIsFieldRequired(field)) {
|
|
@@ -1615,7 +3284,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1615
3284
|
onSubmit: _cache[12] || (_cache[12] = withModifiers(($event) => _ctx.$emit("submit", model.value), ["prevent"]))
|
|
1616
3285
|
}, [
|
|
1617
3286
|
createElementVNode("div", _hoisted_1$k, [
|
|
1618
|
-
createVNode(unref(_sfc_main$
|
|
3287
|
+
createVNode(unref(_sfc_main$Q), {
|
|
1619
3288
|
title: unref($t)({
|
|
1620
3289
|
defaultMessage: "Customer information",
|
|
1621
3290
|
id: "checkout.contact_information_block.title",
|
|
@@ -1625,7 +3294,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1625
3294
|
default: withCtx(() => [
|
|
1626
3295
|
createElementVNode("div", _hoisted_2$b, [
|
|
1627
3296
|
__props.readOnly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1628
|
-
createVNode(unref(_sfc_main$
|
|
3297
|
+
createVNode(unref(_sfc_main$C), {
|
|
1629
3298
|
variant: "body",
|
|
1630
3299
|
tag: "span",
|
|
1631
3300
|
weight: "semibold",
|
|
@@ -1636,7 +3305,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1636
3305
|
]),
|
|
1637
3306
|
_: 1
|
|
1638
3307
|
}),
|
|
1639
|
-
createVNode(unref(_sfc_main$
|
|
3308
|
+
createVNode(unref(_sfc_main$C), {
|
|
1640
3309
|
variant: "body-sm",
|
|
1641
3310
|
tag: "span",
|
|
1642
3311
|
shade: "lighter",
|
|
@@ -1648,7 +3317,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1648
3317
|
_: 1
|
|
1649
3318
|
})
|
|
1650
3319
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1651
|
-
createVNode(unref(_sfc_main$
|
|
3320
|
+
createVNode(unref(_sfc_main$N), {
|
|
1652
3321
|
modelValue: model.value.email,
|
|
1653
3322
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.email = $event),
|
|
1654
3323
|
required: "",
|
|
@@ -1667,9 +3336,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1667
3336
|
}) + getOptionalSuffix("email"),
|
|
1668
3337
|
error: __props.validation.value.email.$errors
|
|
1669
3338
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
|
|
1670
|
-
createVNode(unref(_sfc_main$
|
|
1671
|
-
"single-model-value":
|
|
1672
|
-
"onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) =>
|
|
3339
|
+
createVNode(unref(_sfc_main$R), {
|
|
3340
|
+
"single-model-value": country.value,
|
|
3341
|
+
"onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) => country.value = $event),
|
|
1673
3342
|
required: "",
|
|
1674
3343
|
name: "country",
|
|
1675
3344
|
label: unref($t)({
|
|
@@ -1680,7 +3349,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1680
3349
|
error: __props.validation.value.country.$errors
|
|
1681
3350
|
}, {
|
|
1682
3351
|
"label-suffix": withCtx(() => [
|
|
1683
|
-
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3352
|
+
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
1684
3353
|
key: 0,
|
|
1685
3354
|
size: "xs",
|
|
1686
3355
|
variant: "ghost",
|
|
@@ -1697,7 +3366,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1697
3366
|
]),
|
|
1698
3367
|
_: 1
|
|
1699
3368
|
})) : createCommentVNode("", true),
|
|
1700
|
-
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3369
|
+
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
1701
3370
|
key: 1,
|
|
1702
3371
|
size: "sm",
|
|
1703
3372
|
variant: "ghost",
|
|
@@ -1719,11 +3388,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1719
3388
|
}, 8, ["single-model-value", "label", "error"])
|
|
1720
3389
|
], 64))
|
|
1721
3390
|
]),
|
|
1722
|
-
createVNode(unref(_sfc_main$
|
|
3391
|
+
createVNode(unref(_sfc_main$G), null, {
|
|
1723
3392
|
default: withCtx(() => [
|
|
1724
3393
|
showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
1725
3394
|
createElementVNode("div", _hoisted_4$4, [
|
|
1726
|
-
createVNode(unref(_sfc_main$
|
|
3395
|
+
createVNode(unref(_sfc_main$N), {
|
|
1727
3396
|
modelValue: model.value.addressLine1,
|
|
1728
3397
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => model.value.addressLine1 = $event),
|
|
1729
3398
|
name: "address_line_1",
|
|
@@ -1740,7 +3409,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1740
3409
|
required: "",
|
|
1741
3410
|
error: __props.validation.value.addressLine1.$errors
|
|
1742
3411
|
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
1743
|
-
createVNode(unref(_sfc_main$
|
|
3412
|
+
createVNode(unref(_sfc_main$N), {
|
|
1744
3413
|
modelValue: model.value.addressLine2,
|
|
1745
3414
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => model.value.addressLine2 = $event),
|
|
1746
3415
|
name: "address_line_2",
|
|
@@ -1751,7 +3420,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1751
3420
|
}) + getOptionalSuffix("addressLine2")
|
|
1752
3421
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1753
3422
|
createElementVNode("div", _hoisted_5$2, [
|
|
1754
|
-
createVNode(unref(_sfc_main$
|
|
3423
|
+
createVNode(unref(_sfc_main$N), {
|
|
1755
3424
|
modelValue: model.value.postalCode,
|
|
1756
3425
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => model.value.postalCode = $event),
|
|
1757
3426
|
name: "postal_code",
|
|
@@ -1762,7 +3431,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1762
3431
|
}) + getOptionalSuffix("postalCode"),
|
|
1763
3432
|
error: __props.validation.value.addressLine1.$errors
|
|
1764
3433
|
}, null, 8, ["modelValue", "placeholder", "error"]),
|
|
1765
|
-
createVNode(unref(_sfc_main$
|
|
3434
|
+
createVNode(unref(_sfc_main$N), {
|
|
1766
3435
|
modelValue: model.value.city,
|
|
1767
3436
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => model.value.city = $event),
|
|
1768
3437
|
name: "city",
|
|
@@ -1772,7 +3441,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1772
3441
|
description: "City of the customer address in the checkout form"
|
|
1773
3442
|
}) + getOptionalSuffix("city")
|
|
1774
3443
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1775
|
-
createVNode(unref(_sfc_main$
|
|
3444
|
+
createVNode(unref(_sfc_main$N), {
|
|
1776
3445
|
modelValue: model.value.state,
|
|
1777
3446
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => model.value.state = $event),
|
|
1778
3447
|
name: "state",
|
|
@@ -1792,9 +3461,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1792
3461
|
]),
|
|
1793
3462
|
_: 1
|
|
1794
3463
|
}, 8, ["title"]),
|
|
1795
|
-
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3464
|
+
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$Q), { key: 0 }, {
|
|
1796
3465
|
default: withCtx(() => [
|
|
1797
|
-
createVNode(unref(_sfc_main$
|
|
3466
|
+
createVNode(unref(_sfc_main$S), {
|
|
1798
3467
|
modelValue: companyPurchaseModel.value,
|
|
1799
3468
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => companyPurchaseModel.value = $event),
|
|
1800
3469
|
"no-spacing": "",
|
|
@@ -1803,7 +3472,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1803
3472
|
}, {
|
|
1804
3473
|
"inline-label": withCtx(() => [
|
|
1805
3474
|
createElementVNode("div", _hoisted_6$1, [
|
|
1806
|
-
createVNode(unref(_sfc_main$
|
|
3475
|
+
createVNode(unref(_sfc_main$C), { tag: "span" }, {
|
|
1807
3476
|
default: withCtx(() => [
|
|
1808
3477
|
createTextVNode(toDisplayString(unref($t)({
|
|
1809
3478
|
defaultMessage: "Company purchase",
|
|
@@ -1813,7 +3482,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1813
3482
|
]),
|
|
1814
3483
|
_: 1
|
|
1815
3484
|
}),
|
|
1816
|
-
createVNode(unref(_sfc_main$
|
|
3485
|
+
createVNode(unref(_sfc_main$C), {
|
|
1817
3486
|
tag: "span",
|
|
1818
3487
|
variant: "body-xs",
|
|
1819
3488
|
shade: "lighter"
|
|
@@ -1831,30 +3500,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1831
3500
|
]),
|
|
1832
3501
|
_: 1
|
|
1833
3502
|
}, 8, ["modelValue"]),
|
|
1834
|
-
createVNode(unref(_sfc_main$
|
|
3503
|
+
createVNode(unref(_sfc_main$G), null, {
|
|
1835
3504
|
default: withCtx(() => [
|
|
1836
3505
|
isCompanyPurchase.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
1837
3506
|
createElementVNode("div", _hoisted_8$1, [
|
|
1838
|
-
|
|
1839
|
-
key: 0,
|
|
1840
|
-
modelValue: model.value.companyVatNumber,
|
|
1841
|
-
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyVatNumber = $event),
|
|
1842
|
-
name: "vat_number",
|
|
1843
|
-
label: unref($t)({
|
|
1844
|
-
defaultMessage: "VAT number",
|
|
1845
|
-
id: "checkout.vat_number.label",
|
|
1846
|
-
description: "The label for the vat number in the checkout form"
|
|
1847
|
-
}),
|
|
1848
|
-
placeholder: unref($t)({
|
|
1849
|
-
defaultMessage: "VAT number...",
|
|
1850
|
-
id: "checkout.vat_number.placeholder",
|
|
1851
|
-
description: "The label for the vat number in the checkout form"
|
|
1852
|
-
}),
|
|
1853
|
-
error: __props.validation.value.companyVatNumber.$errors
|
|
1854
|
-
}, null, 8, ["modelValue", "label", "placeholder", "error"])) : createCommentVNode("", true),
|
|
1855
|
-
createVNode(unref(_sfc_main$2a), {
|
|
3507
|
+
createVNode(unref(_sfc_main$N), {
|
|
1856
3508
|
modelValue: model.value.companyLegalName,
|
|
1857
|
-
"onUpdate:modelValue": _cache[
|
|
3509
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyLegalName = $event),
|
|
1858
3510
|
required: "",
|
|
1859
3511
|
name: "legal_name",
|
|
1860
3512
|
label: unref($t)({
|
|
@@ -1867,7 +3519,55 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1867
3519
|
id: "checkout.legal_name.placeholder",
|
|
1868
3520
|
description: "The legal name of the organization customer in the checkout form"
|
|
1869
3521
|
})
|
|
1870
|
-
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
3522
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
3523
|
+
showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$N), {
|
|
3524
|
+
key: 0,
|
|
3525
|
+
modelValue: model.value.companyVatNumber,
|
|
3526
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => model.value.companyVatNumber = $event),
|
|
3527
|
+
name: "vat_number",
|
|
3528
|
+
"input-class": "focus:outline-none focus:ring-0",
|
|
3529
|
+
label: unref($t)({
|
|
3530
|
+
defaultMessage: "VAT number",
|
|
3531
|
+
id: "checkout.vat_number.label",
|
|
3532
|
+
description: "The label for the vat number in the checkout form"
|
|
3533
|
+
}),
|
|
3534
|
+
placeholder: unref($t)({
|
|
3535
|
+
defaultMessage: "VAT number...",
|
|
3536
|
+
id: "checkout.vat_number.placeholder",
|
|
3537
|
+
description: "The label for the vat number in the checkout form"
|
|
3538
|
+
}),
|
|
3539
|
+
error: __props.validation.value.companyVatNumber.$errors,
|
|
3540
|
+
"suffix-class": "px-2 border-l-0"
|
|
3541
|
+
}, createSlots({ _: 2 }, [
|
|
3542
|
+
unref(isEUCountry)(model.value.country ?? "") ? {
|
|
3543
|
+
name: "suffix",
|
|
3544
|
+
fn: withCtx(() => [
|
|
3545
|
+
createVNode(unref(_sfc_main$P), {
|
|
3546
|
+
type: "button",
|
|
3547
|
+
size: "sm",
|
|
3548
|
+
color: "green",
|
|
3549
|
+
disabled: !unref(isTaxIDCheckEnabled) || unref(isTaxIDCheckPending) || __props.validation.value.companyVatNumber.$invalid,
|
|
3550
|
+
onClick: unref(runTaxIDCheck)
|
|
3551
|
+
}, {
|
|
3552
|
+
default: withCtx(() => [
|
|
3553
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
3554
|
+
defaultMessage: "Check",
|
|
3555
|
+
id: "checkout.vat_number.check_button.label",
|
|
3556
|
+
description: "The label for the check button in the checkout form"
|
|
3557
|
+
})), 1)
|
|
3558
|
+
]),
|
|
3559
|
+
_: 1
|
|
3560
|
+
}, 8, ["disabled", "onClick"])
|
|
3561
|
+
]),
|
|
3562
|
+
key: "0"
|
|
3563
|
+
} : void 0
|
|
3564
|
+
]), 1032, ["modelValue", "label", "placeholder", "error"])) : createCommentVNode("", true),
|
|
3565
|
+
unref(taxIdValidationData) ? (openBlock(), createElementBlock("div", {
|
|
3566
|
+
key: 1,
|
|
3567
|
+
class: normalizeClass({ "opacity-75": unref(isTaxIDCheckPending) })
|
|
3568
|
+
}, [
|
|
3569
|
+
createVNode(_sfc_main$o, { "tax-id-validation-result": unref(taxIdValidationData) }, null, 8, ["tax-id-validation-result"])
|
|
3570
|
+
], 2)) : createCommentVNode("", true)
|
|
1871
3571
|
])
|
|
1872
3572
|
])) : createCommentVNode("", true)
|
|
1873
3573
|
]),
|
|
@@ -1903,7 +3603,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1903
3603
|
return (_ctx, _cache) => {
|
|
1904
3604
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1905
3605
|
createElementVNode("div", null, [
|
|
1906
|
-
createVNode(unref(_sfc_main$
|
|
3606
|
+
createVNode(unref(_sfc_main$C), {
|
|
1907
3607
|
variant: "heading-1",
|
|
1908
3608
|
class: "inline-block"
|
|
1909
3609
|
}, {
|
|
@@ -1913,7 +3613,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1913
3613
|
id: "checkout.page_title",
|
|
1914
3614
|
description: "The title of the checkout page"
|
|
1915
3615
|
})) + toDisplayString(" "), 1),
|
|
1916
|
-
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3616
|
+
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$T), {
|
|
1917
3617
|
key: 0,
|
|
1918
3618
|
"trial-period": __props.trialPeriod,
|
|
1919
3619
|
size: "lg",
|
|
@@ -1923,18 +3623,18 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1923
3623
|
_: 1
|
|
1924
3624
|
})
|
|
1925
3625
|
]),
|
|
1926
|
-
createVNode(unref(_sfc_main$
|
|
3626
|
+
createVNode(unref(_sfc_main$C), {
|
|
1927
3627
|
variant: "body-sm",
|
|
1928
3628
|
shade: "lighter",
|
|
1929
3629
|
"no-spacing": ""
|
|
1930
3630
|
}, {
|
|
1931
3631
|
default: withCtx(() => [
|
|
1932
3632
|
!__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$j, [
|
|
1933
|
-
createVNode(unref(_sfc_main$
|
|
3633
|
+
createVNode(unref(_sfc_main$D), { "is-dark-mode": "" }, {
|
|
1934
3634
|
tooltip: withCtx(() => [
|
|
1935
3635
|
createVNode(unref(TooltipContent), null, {
|
|
1936
3636
|
default: withCtx(() => [
|
|
1937
|
-
createVNode(unref(_sfc_main$
|
|
3637
|
+
createVNode(unref(_sfc_main$E), null, {
|
|
1938
3638
|
default: withCtx(() => [
|
|
1939
3639
|
createTextVNode(toDisplayString(unref($t)({
|
|
1940
3640
|
defaultMessage: "Will be determined by billing information",
|
|
@@ -1949,7 +3649,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1949
3649
|
})
|
|
1950
3650
|
]),
|
|
1951
3651
|
default: withCtx(() => [
|
|
1952
|
-
createVNode(unref(_sfc_main$
|
|
3652
|
+
createVNode(unref(_sfc_main$y), {
|
|
1953
3653
|
"width-class": "w-10",
|
|
1954
3654
|
"height-class": "h-4",
|
|
1955
3655
|
shade: "darker",
|
|
@@ -2057,7 +3757,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2057
3757
|
return (_ctx, _cache) => {
|
|
2058
3758
|
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
2059
3759
|
createElementVNode("div", _hoisted_2$9, [
|
|
2060
|
-
createVNode(unref(_sfc_main$
|
|
3760
|
+
createVNode(unref(_sfc_main$C), { variant: "heading-1" }, {
|
|
2061
3761
|
default: withCtx(() => [
|
|
2062
3762
|
createTextVNode(toDisplayString(unref($t)({
|
|
2063
3763
|
defaultMessage: "Checkout not available",
|
|
@@ -2067,7 +3767,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2067
3767
|
]),
|
|
2068
3768
|
_: 1
|
|
2069
3769
|
}),
|
|
2070
|
-
createVNode(unref(_sfc_main$
|
|
3770
|
+
createVNode(unref(_sfc_main$C), {
|
|
2071
3771
|
variant: "body-sm",
|
|
2072
3772
|
shade: "lighter"
|
|
2073
3773
|
}, {
|
|
@@ -2114,7 +3814,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2114
3814
|
window.location.replace(props.redirectUrl);
|
|
2115
3815
|
});
|
|
2116
3816
|
return (_ctx, _cache) => {
|
|
2117
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3817
|
+
return openBlock(), createBlock(_sfc_main$U, {
|
|
2118
3818
|
status: "success",
|
|
2119
3819
|
title: unref($t)({
|
|
2120
3820
|
defaultMessage: "Payment successful",
|
|
@@ -2123,7 +3823,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2123
3823
|
})
|
|
2124
3824
|
}, {
|
|
2125
3825
|
default: withCtx(() => [
|
|
2126
|
-
createVNode(unref(_sfc_main$
|
|
3826
|
+
createVNode(unref(_sfc_main$C), {
|
|
2127
3827
|
variant: "body-xs",
|
|
2128
3828
|
shade: "lighter",
|
|
2129
3829
|
tag: "span"
|
|
@@ -2137,9 +3837,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2137
3837
|
]),
|
|
2138
3838
|
_: 1
|
|
2139
3839
|
}),
|
|
2140
|
-
__props.redirectUrl ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3840
|
+
__props.redirectUrl ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
2141
3841
|
key: 0,
|
|
2142
|
-
|
|
3842
|
+
tag: "a",
|
|
3843
|
+
href: __props.redirectUrl,
|
|
2143
3844
|
color: "gray",
|
|
2144
3845
|
variant: "outline",
|
|
2145
3846
|
size: "xs",
|
|
@@ -2153,7 +3854,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2153
3854
|
})), 1)
|
|
2154
3855
|
]),
|
|
2155
3856
|
_: 1
|
|
2156
|
-
}, 8, ["
|
|
3857
|
+
}, 8, ["href"])) : createCommentVNode("", true)
|
|
2157
3858
|
]),
|
|
2158
3859
|
_: 1
|
|
2159
3860
|
}, 8, ["title"]);
|
|
@@ -2210,14 +3911,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2210
3911
|
});
|
|
2211
3912
|
return (_ctx, _cache) => {
|
|
2212
3913
|
return openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
2213
|
-
__props.avatar ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3914
|
+
__props.avatar ? (openBlock(), createBlock(unref(_sfc_main$V), {
|
|
2214
3915
|
key: 0,
|
|
2215
3916
|
"image-src": __props.avatar,
|
|
2216
3917
|
size: "lg",
|
|
2217
3918
|
class: "my-1"
|
|
2218
3919
|
}, null, 8, ["image-src"])) : createCommentVNode("", true),
|
|
2219
3920
|
createElementVNode("div", _hoisted_2$8, [
|
|
2220
|
-
createVNode(unref(_sfc_main$
|
|
3921
|
+
createVNode(unref(_sfc_main$C), {
|
|
2221
3922
|
variant: "body",
|
|
2222
3923
|
weight: "semibold",
|
|
2223
3924
|
"no-spacing": ""
|
|
@@ -2227,7 +3928,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2227
3928
|
]),
|
|
2228
3929
|
_: 1
|
|
2229
3930
|
}),
|
|
2230
|
-
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3931
|
+
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
2231
3932
|
key: 0,
|
|
2232
3933
|
variant: "body-xs",
|
|
2233
3934
|
shade: "lighter",
|
|
@@ -2238,7 +3939,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2238
3939
|
]),
|
|
2239
3940
|
_: 1
|
|
2240
3941
|
})) : createCommentVNode("", true),
|
|
2241
|
-
description.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3942
|
+
description.value ? (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
2242
3943
|
key: 1,
|
|
2243
3944
|
variant: "body-xs",
|
|
2244
3945
|
shade: "lighter",
|
|
@@ -2484,7 +4185,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2484
4185
|
label,
|
|
2485
4186
|
subLabel: getSelectedPeriodAmountLabel(period),
|
|
2486
4187
|
labelSuffixComponent: saveText ? {
|
|
2487
|
-
component: _sfc_main$
|
|
4188
|
+
component: _sfc_main$B,
|
|
2488
4189
|
props: {
|
|
2489
4190
|
color: "primary",
|
|
2490
4191
|
content: saveText,
|
|
@@ -2543,7 +4244,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2543
4244
|
selectedBillingPeriodKey.value = checked ? biggestPeriod : smallestPeriod;
|
|
2544
4245
|
};
|
|
2545
4246
|
return (_ctx, _cache) => {
|
|
2546
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4247
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
2547
4248
|
"no-border": "",
|
|
2548
4249
|
"no-spacing": "",
|
|
2549
4250
|
"content-background": "none",
|
|
@@ -2555,7 +4256,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2555
4256
|
}, {
|
|
2556
4257
|
default: withCtx(() => [
|
|
2557
4258
|
createElementVNode("div", _hoisted_1$g, [
|
|
2558
|
-
createVNode(unref(_sfc_main$
|
|
4259
|
+
createVNode(unref(_sfc_main$Q), { "no-spacing": "" }, {
|
|
2559
4260
|
default: withCtx(() => [
|
|
2560
4261
|
__props.subscription ? (openBlock(), createBlock(_sfc_main$j, {
|
|
2561
4262
|
key: 0,
|
|
@@ -2569,7 +4270,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2569
4270
|
]),
|
|
2570
4271
|
_: 1
|
|
2571
4272
|
}),
|
|
2572
|
-
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4273
|
+
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
2573
4274
|
key: 0,
|
|
2574
4275
|
"no-spacing": "",
|
|
2575
4276
|
"content-classes": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod ? "border-primary-500" : void 0
|
|
@@ -2579,15 +4280,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2579
4280
|
return [
|
|
2580
4281
|
createElementVNode("div", _hoisted_2$7, [
|
|
2581
4282
|
createElementVNode("div", _hoisted_3$3, [
|
|
2582
|
-
highOption.value ? (openBlock(), createBlock(_sfc_main$
|
|
4283
|
+
highOption.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
2583
4284
|
key: 0,
|
|
2584
4285
|
name: highOption.value.label,
|
|
2585
4286
|
description: ((_a = selectedBillingPeriodOption.value) == null ? void 0 : _a.subLabel) ?? ""
|
|
2586
4287
|
}, createSlots({
|
|
2587
4288
|
default: withCtx(() => [
|
|
2588
|
-
createVNode(unref(_sfc_main$
|
|
4289
|
+
createVNode(unref(_sfc_main$S), {
|
|
2589
4290
|
"model-value": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod,
|
|
2590
|
-
"show-suffix-label-in-input": "",
|
|
2591
4291
|
"onUpdate:modelValue": handleBinaryBillingToggle
|
|
2592
4292
|
}, null, 8, ["model-value"])
|
|
2593
4293
|
]),
|
|
@@ -2596,7 +4296,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2596
4296
|
toggleSaveText.value ? {
|
|
2597
4297
|
name: "badge",
|
|
2598
4298
|
fn: withCtx(() => [
|
|
2599
|
-
createVNode(unref(_sfc_main$
|
|
4299
|
+
createVNode(unref(_sfc_main$B), {
|
|
2600
4300
|
color: "primary",
|
|
2601
4301
|
content: toggleSaveText.value,
|
|
2602
4302
|
size: saveBadgeSize.value,
|
|
@@ -2611,7 +4311,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2611
4311
|
];
|
|
2612
4312
|
}),
|
|
2613
4313
|
_: 1
|
|
2614
|
-
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4314
|
+
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$q), {
|
|
2615
4315
|
key: 1,
|
|
2616
4316
|
"single-model-value": selectedBillingPeriodKey.value,
|
|
2617
4317
|
"onUpdate:singleModelValue": _cache[0] || (_cache[0] = ($event) => selectedBillingPeriodKey.value = $event),
|
|
@@ -2621,13 +4321,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2621
4321
|
"show-sub-label-in-input": "",
|
|
2622
4322
|
"show-suffix-in-closed-input": ""
|
|
2623
4323
|
}, null, 8, ["single-model-value", "options"])) : createCommentVNode("", true),
|
|
2624
|
-
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4324
|
+
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
2625
4325
|
key: 2,
|
|
2626
4326
|
"no-spacing": ""
|
|
2627
4327
|
}, {
|
|
2628
4328
|
default: withCtx(() => [
|
|
2629
4329
|
createElementVNode("div", _hoisted_4$3, [
|
|
2630
|
-
createVNode(unref(_sfc_main$
|
|
4330
|
+
createVNode(unref(_sfc_main$C), {
|
|
2631
4331
|
"no-spacing": "",
|
|
2632
4332
|
variant: "body-sm",
|
|
2633
4333
|
shade: "lighter"
|
|
@@ -2645,14 +4345,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2645
4345
|
]),
|
|
2646
4346
|
_: 1
|
|
2647
4347
|
})) : createCommentVNode("", true),
|
|
2648
|
-
__props.invoice && __props.variant !== "products-inline" ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4348
|
+
__props.invoice && __props.variant !== "products-inline" ? (openBlock(), createBlock(unref(_sfc_main$w), {
|
|
2649
4349
|
key: 3,
|
|
2650
4350
|
invoice: __props.invoice,
|
|
2651
|
-
"wrapper-component": unref(_sfc_main$
|
|
4351
|
+
"wrapper-component": unref(_sfc_main$Q)
|
|
2652
4352
|
}, null, 8, ["invoice", "wrapper-component"])) : createCommentVNode("", true),
|
|
2653
|
-
createVNode(unref(_sfc_main$
|
|
4353
|
+
createVNode(unref(_sfc_main$Q), null, {
|
|
2654
4354
|
default: withCtx(() => [
|
|
2655
|
-
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4355
|
+
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
2656
4356
|
key: 0,
|
|
2657
4357
|
variant: __props.variant === "products-inline" ? "default" : "without-products",
|
|
2658
4358
|
invoice: __props.invoice,
|
|
@@ -2661,7 +4361,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2661
4361
|
collapsible: __props.collapsible,
|
|
2662
4362
|
"is-preview-without-taxes": !__props.countryCode,
|
|
2663
4363
|
"is-customer-facing": ""
|
|
2664
|
-
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
4364
|
+
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
2665
4365
|
key: 1,
|
|
2666
4366
|
variant: "body-sm",
|
|
2667
4367
|
shade: "lighter"
|
|
@@ -2693,15 +4393,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2693
4393
|
},
|
|
2694
4394
|
setup(__props) {
|
|
2695
4395
|
return (_ctx, _cache) => {
|
|
2696
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4396
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), null, {
|
|
2697
4397
|
default: withCtx(() => [
|
|
2698
4398
|
createElementVNode("div", _hoisted_1$f, [
|
|
2699
|
-
createVNode(unref(_sfc_main$
|
|
4399
|
+
createVNode(unref(_sfc_main$I), {
|
|
2700
4400
|
icon: __props.icon,
|
|
2701
4401
|
size: "lg",
|
|
2702
4402
|
class: "text-gray-500"
|
|
2703
4403
|
}, null, 8, ["icon"]),
|
|
2704
|
-
createVNode(unref(_sfc_main$
|
|
4404
|
+
createVNode(unref(_sfc_main$C), {
|
|
2705
4405
|
center: "",
|
|
2706
4406
|
tag: "span",
|
|
2707
4407
|
variant: "body-sm",
|
|
@@ -2714,7 +4414,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2714
4414
|
]),
|
|
2715
4415
|
_: 3
|
|
2716
4416
|
}),
|
|
2717
|
-
createVNode(unref(_sfc_main$
|
|
4417
|
+
createVNode(unref(_sfc_main$C), {
|
|
2718
4418
|
center: "",
|
|
2719
4419
|
tag: "span",
|
|
2720
4420
|
variant: "body-xs",
|
|
@@ -2782,7 +4482,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2782
4482
|
emit("click");
|
|
2783
4483
|
}
|
|
2784
4484
|
return (_ctx, _cache) => {
|
|
2785
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4485
|
+
return openBlock(), createBlock(unref(_sfc_main$P), {
|
|
2786
4486
|
size: "lg",
|
|
2787
4487
|
"aria-label": ariaLabel.value,
|
|
2788
4488
|
class: normalizeClass([buttonClasses.value, "!block w-full h-11 bg-center bg-no-repeat"]),
|
|
@@ -2799,8 +4499,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2799
4499
|
class: "logo",
|
|
2800
4500
|
viewBox: "0 0 105 43",
|
|
2801
4501
|
version: "1.1",
|
|
2802
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2803
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
4502
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2804
4503
|
}, [
|
|
2805
4504
|
createElementVNode("title", null, "Apple Logo"),
|
|
2806
4505
|
createElementVNode("g", {
|
|
@@ -3313,10 +5012,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3313
5012
|
return (_ctx, _cache) => {
|
|
3314
5013
|
return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
3315
5014
|
createElementVNode("div", _hoisted_2$5, [
|
|
3316
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
5015
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$X, {
|
|
3317
5016
|
key: 0,
|
|
3318
5017
|
variant: "title"
|
|
3319
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
5018
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
3320
5019
|
key: 1,
|
|
3321
5020
|
variant: "heading-3",
|
|
3322
5021
|
tag: "h2"
|
|
@@ -3333,8 +5032,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3333
5032
|
]),
|
|
3334
5033
|
createElementVNode("div", _hoisted_3$2, [
|
|
3335
5034
|
!isReady.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3336
|
-
createVNode(_sfc_main$
|
|
3337
|
-
createVNode(_sfc_main$
|
|
5035
|
+
createVNode(_sfc_main$X, { class: "h-11 col-span-3" }),
|
|
5036
|
+
createVNode(_sfc_main$X, { class: "h-11 col-span-3" })
|
|
3338
5037
|
], 64)) : createCommentVNode("", true),
|
|
3339
5038
|
createElementVNode("div", {
|
|
3340
5039
|
class: normalizeClass(["col-span-3 md:col-span-2", {
|
|
@@ -3395,10 +5094,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3395
5094
|
], 2)
|
|
3396
5095
|
]),
|
|
3397
5096
|
createElementVNode("div", _hoisted_4$2, [
|
|
3398
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
5097
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$X, {
|
|
3399
5098
|
key: 0,
|
|
3400
5099
|
variant: "divider-text"
|
|
3401
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
5100
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$Y), {
|
|
3402
5101
|
key: 1,
|
|
3403
5102
|
text: unref($t)({
|
|
3404
5103
|
defaultMessage: "Or",
|
|
@@ -3443,7 +5142,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3443
5142
|
});
|
|
3444
5143
|
return (_ctx, _cache) => {
|
|
3445
5144
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
3446
|
-
createVNode(unref(_sfc_main$
|
|
5145
|
+
createVNode(unref(_sfc_main$C), {
|
|
3447
5146
|
variant: "body-xs",
|
|
3448
5147
|
shade: "lighter",
|
|
3449
5148
|
tag: "div"
|
|
@@ -3476,7 +5175,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3476
5175
|
]),
|
|
3477
5176
|
_: 1
|
|
3478
5177
|
}),
|
|
3479
|
-
createVNode(unref(_sfc_main$
|
|
5178
|
+
createVNode(unref(_sfc_main$C), {
|
|
3480
5179
|
variant: "body-xs",
|
|
3481
5180
|
shade: "lighter",
|
|
3482
5181
|
tag: "div",
|
|
@@ -3613,7 +5312,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3613
5312
|
return openBlock(), createElementBlock("div", null, [
|
|
3614
5313
|
createElementVNode("div", _hoisted_1$7, [
|
|
3615
5314
|
createElementVNode("div", _hoisted_2$4, [
|
|
3616
|
-
createVNode(unref(_sfc_main$
|
|
5315
|
+
createVNode(unref(_sfc_main$p), {
|
|
3617
5316
|
modelValue: seatsNumber.value,
|
|
3618
5317
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsNumber.value = $event),
|
|
3619
5318
|
size: "sm",
|
|
@@ -3625,7 +5324,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3625
5324
|
tabindex: isCollapsible.value ? 0 : void 0,
|
|
3626
5325
|
onClick: _cache[1] || (_cache[1] = ($event) => isCollapsible.value ? isExpanded.value = !isExpanded.value : void 0)
|
|
3627
5326
|
}, [
|
|
3628
|
-
createVNode(unref(_sfc_main$
|
|
5327
|
+
createVNode(unref(_sfc_main$C), {
|
|
3629
5328
|
tag: "span",
|
|
3630
5329
|
variant: "body-sm",
|
|
3631
5330
|
weight: "semibold"
|
|
@@ -3639,7 +5338,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3639
5338
|
]),
|
|
3640
5339
|
_: 1
|
|
3641
5340
|
}),
|
|
3642
|
-
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$
|
|
5341
|
+
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
3643
5342
|
key: 0,
|
|
3644
5343
|
tag: "span",
|
|
3645
5344
|
variant: "body-xs",
|
|
@@ -3662,7 +5361,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3662
5361
|
)), 1)
|
|
3663
5362
|
]),
|
|
3664
5363
|
_: 1
|
|
3665
|
-
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$
|
|
5364
|
+
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$C), {
|
|
3666
5365
|
key: 1,
|
|
3667
5366
|
tag: "span",
|
|
3668
5367
|
variant: "body-xs",
|
|
@@ -3674,7 +5373,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3674
5373
|
id: "seats.tiered_pricing_label",
|
|
3675
5374
|
description: "The label indicating tiered pricing structure for seats"
|
|
3676
5375
|
})) + " ", 1),
|
|
3677
|
-
createVNode(unref(_sfc_main$
|
|
5376
|
+
createVNode(unref(_sfc_main$I), {
|
|
3678
5377
|
icon: "keyboard_arrow_down",
|
|
3679
5378
|
size: "xs",
|
|
3680
5379
|
class: normalizeClass(["absolute transition ease-in-out text-gray-400", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
|
|
@@ -3685,7 +5384,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3685
5384
|
], 10, _hoisted_3$1)
|
|
3686
5385
|
]),
|
|
3687
5386
|
((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
3688
|
-
createVNode(unref(_sfc_main$
|
|
5387
|
+
createVNode(unref(_sfc_main$G), null, {
|
|
3689
5388
|
default: withCtx(() => [
|
|
3690
5389
|
isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
3691
5390
|
createVNode(_sfc_main$a, {
|
|
@@ -3724,7 +5423,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3724
5423
|
});
|
|
3725
5424
|
return (_ctx, _cache) => {
|
|
3726
5425
|
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (item, index) => {
|
|
3727
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5426
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), { key: index }, {
|
|
3728
5427
|
default: withCtx(() => {
|
|
3729
5428
|
var _a;
|
|
3730
5429
|
return [
|
|
@@ -3751,7 +5450,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3751
5450
|
return (_ctx, _cache) => {
|
|
3752
5451
|
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
3753
5452
|
createElementVNode("div", _hoisted_2$3, [
|
|
3754
|
-
createVNode(unref(_sfc_main$
|
|
5453
|
+
createVNode(unref(_sfc_main$C), {
|
|
3755
5454
|
tag: "span",
|
|
3756
5455
|
variant: "body-sm",
|
|
3757
5456
|
weight: "semibold"
|
|
@@ -3763,7 +5462,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3763
5462
|
})
|
|
3764
5463
|
]),
|
|
3765
5464
|
createElementVNode("div", null, [
|
|
3766
|
-
createVNode(unref(_sfc_main$
|
|
5465
|
+
createVNode(unref(_sfc_main$C), {
|
|
3767
5466
|
tag: "span",
|
|
3768
5467
|
variant: "body-xs",
|
|
3769
5468
|
shade: "lighter"
|
|
@@ -3839,7 +5538,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3839
5538
|
}
|
|
3840
5539
|
};
|
|
3841
5540
|
return (_ctx, _cache) => {
|
|
3842
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5541
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), { "no-spacing": "" }, {
|
|
3843
5542
|
default: withCtx(() => [
|
|
3844
5543
|
createElementVNode("div", _hoisted_1$5, [
|
|
3845
5544
|
createVNode(_sfc_main$7, null, {
|
|
@@ -3853,7 +5552,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3853
5552
|
}),
|
|
3854
5553
|
createElementVNode("div", _hoisted_2$2, [
|
|
3855
5554
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
3856
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5555
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
3857
5556
|
key: pricing.id,
|
|
3858
5557
|
"content-background": "none",
|
|
3859
5558
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
@@ -3861,7 +5560,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3861
5560
|
default: withCtx(() => {
|
|
3862
5561
|
var _a, _b;
|
|
3863
5562
|
return [
|
|
3864
|
-
createVNode(_sfc_main$
|
|
5563
|
+
createVNode(_sfc_main$W, {
|
|
3865
5564
|
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
3866
5565
|
description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
|
|
3867
5566
|
pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
|
|
@@ -3872,7 +5571,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3872
5571
|
})
|
|
3873
5572
|
}, {
|
|
3874
5573
|
default: withCtx(() => [
|
|
3875
|
-
createVNode(unref(_sfc_main$
|
|
5574
|
+
createVNode(unref(_sfc_main$S), {
|
|
3876
5575
|
"model-value": isSelected(pricing.id),
|
|
3877
5576
|
"onUpdate:modelValue": ($event) => handleToggle(pricing.id)
|
|
3878
5577
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
@@ -3925,7 +5624,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3925
5624
|
}
|
|
3926
5625
|
};
|
|
3927
5626
|
return (_ctx, _cache) => {
|
|
3928
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5627
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
3929
5628
|
"no-spacing": "",
|
|
3930
5629
|
"no-border": !__props.groupName,
|
|
3931
5630
|
"content-background": __props.groupName ? "gray" : "none"
|
|
@@ -3949,7 +5648,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3949
5648
|
})) : createCommentVNode("", true),
|
|
3950
5649
|
createElementVNode("div", _hoisted_1$4, [
|
|
3951
5650
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
3952
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5651
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
3953
5652
|
key: pricing.id,
|
|
3954
5653
|
"content-background": __props.groupName || isSelected(pricing.id) ? "none" : "gray",
|
|
3955
5654
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
@@ -3957,7 +5656,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3957
5656
|
default: withCtx(() => {
|
|
3958
5657
|
var _a, _b;
|
|
3959
5658
|
return [
|
|
3960
|
-
createVNode(_sfc_main$
|
|
5659
|
+
createVNode(_sfc_main$W, {
|
|
3961
5660
|
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
3962
5661
|
description: ((_a = pricing.items) == null ? void 0 : _a[0]) ? unref(renderPricingForPricingItem)({
|
|
3963
5662
|
pricingItem: (_b = pricing.items) == null ? void 0 : _b[0]
|
|
@@ -3968,7 +5667,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3968
5667
|
})
|
|
3969
5668
|
}, {
|
|
3970
5669
|
default: withCtx(() => [
|
|
3971
|
-
isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
5670
|
+
isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
3972
5671
|
key: 0,
|
|
3973
5672
|
color: "gray",
|
|
3974
5673
|
variant: "outline",
|
|
@@ -3976,7 +5675,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3976
5675
|
size: "sm",
|
|
3977
5676
|
"icon-prefix": "remove_shopping_cart",
|
|
3978
5677
|
onClick: ($event) => handleToggle(pricing.id)
|
|
3979
|
-
}, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
5678
|
+
}, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
3980
5679
|
key: 1,
|
|
3981
5680
|
color: "primary",
|
|
3982
5681
|
"icon-prefix": "add",
|
|
@@ -4077,7 +5776,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4077
5776
|
}));
|
|
4078
5777
|
};
|
|
4079
5778
|
return (_ctx, _cache) => {
|
|
4080
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5779
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), { "no-spacing": "" }, {
|
|
4081
5780
|
default: withCtx(() => [
|
|
4082
5781
|
createElementVNode("div", _hoisted_1$3, [
|
|
4083
5782
|
createVNode(_sfc_main$7, null, {
|
|
@@ -4087,21 +5786,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4087
5786
|
_: 1
|
|
4088
5787
|
}),
|
|
4089
5788
|
createElementVNode("div", _hoisted_2$1, [
|
|
4090
|
-
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$
|
|
5789
|
+
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$u), {
|
|
4091
5790
|
key: 0,
|
|
4092
5791
|
modelValue: singleModelValue.value,
|
|
4093
5792
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => singleModelValue.value = $event),
|
|
4094
5793
|
options: getRadioGroupOptions(),
|
|
4095
5794
|
direction: unref(isMobileViewport) ? "column" : "row",
|
|
4096
5795
|
"show-radio": false
|
|
4097
|
-
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$
|
|
5796
|
+
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$q), {
|
|
4098
5797
|
key: 1,
|
|
4099
5798
|
"single-model-value": singleModelValue.value,
|
|
4100
5799
|
"onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => singleModelValue.value = $event),
|
|
4101
5800
|
options: getSelectOptions(),
|
|
4102
5801
|
size: "xl",
|
|
4103
5802
|
"show-sub-label-in-input": ""
|
|
4104
|
-
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
5803
|
+
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$Z), {
|
|
4105
5804
|
key: 2,
|
|
4106
5805
|
modelValue: singleModelValue.value,
|
|
4107
5806
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => singleModelValue.value = $event),
|
|
@@ -4162,7 +5861,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4162
5861
|
() => getPricingGroupsFromExtendedPricingPlanSubscription(props.subscription)
|
|
4163
5862
|
);
|
|
4164
5863
|
return (_ctx, _cache) => {
|
|
4165
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
5864
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
4166
5865
|
title: unref($t)({
|
|
4167
5866
|
defaultMessage: "Customize plan",
|
|
4168
5867
|
id: "checkout.customize_plan_block.title",
|
|
@@ -4358,7 +6057,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4358
6057
|
);
|
|
4359
6058
|
return (_ctx, _cache) => {
|
|
4360
6059
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
4361
|
-
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
6060
|
+
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
4362
6061
|
key: 0,
|
|
4363
6062
|
"no-spacing": "",
|
|
4364
6063
|
class: "w-full relative"
|
|
@@ -4376,8 +6075,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4376
6075
|
}, [
|
|
4377
6076
|
createElementVNode("div", _hoisted_2, [
|
|
4378
6077
|
createElementVNode("div", _hoisted_3, [
|
|
4379
|
-
createVNode(unref(_sfc_main$
|
|
4380
|
-
createVNode(unref(_sfc_main$
|
|
6078
|
+
createVNode(unref(_sfc_main$I), { icon: "local_activity" }),
|
|
6079
|
+
createVNode(unref(_sfc_main$C), {
|
|
4381
6080
|
id: labelId,
|
|
4382
6081
|
variant: "body-sm"
|
|
4383
6082
|
}, {
|
|
@@ -4391,7 +6090,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4391
6090
|
_: 1
|
|
4392
6091
|
})
|
|
4393
6092
|
]),
|
|
4394
|
-
createVNode(unref(_sfc_main$
|
|
6093
|
+
createVNode(unref(_sfc_main$I), {
|
|
4395
6094
|
icon: isExpanded.value ? "remove" : "add"
|
|
4396
6095
|
}, null, 8, ["icon"])
|
|
4397
6096
|
])
|
|
@@ -4405,7 +6104,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4405
6104
|
class: "w-full border-t px-3 py-2 flex flex-row gap-2 items-center overflow-hidden",
|
|
4406
6105
|
onKeydown: withKeys(withModifiers(collapseExpanded, ["prevent"]), ["esc"])
|
|
4407
6106
|
}, [
|
|
4408
|
-
createVNode(unref(_sfc_main$
|
|
6107
|
+
createVNode(unref(_sfc_main$N), {
|
|
4409
6108
|
modelValue: inputValue.value,
|
|
4410
6109
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
4411
6110
|
placeholder: unref($t)({
|
|
@@ -4421,7 +6120,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4421
6120
|
class: "w-full",
|
|
4422
6121
|
onKeydown: withKeys(withModifiers(applyCode, ["prevent"]), ["enter"])
|
|
4423
6122
|
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
4424
|
-
createVNode(unref(_sfc_main$
|
|
6123
|
+
createVNode(unref(_sfc_main$P), {
|
|
4425
6124
|
type: "button",
|
|
4426
6125
|
disabled: !canApply.value,
|
|
4427
6126
|
"aria-label": applyAriaLabel.value,
|
|
@@ -4442,7 +6141,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4442
6141
|
])
|
|
4443
6142
|
]),
|
|
4444
6143
|
_: 1
|
|
4445
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
6144
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
4446
6145
|
key: 1,
|
|
4447
6146
|
"no-border": "",
|
|
4448
6147
|
"no-spacing": "",
|
|
@@ -4458,8 +6157,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4458
6157
|
}, [
|
|
4459
6158
|
createElementVNode("div", _hoisted_6, [
|
|
4460
6159
|
createElementVNode("div", _hoisted_7, [
|
|
4461
|
-
createVNode(unref(_sfc_main$
|
|
4462
|
-
createVNode(unref(_sfc_main$
|
|
6160
|
+
createVNode(unref(_sfc_main$I), { icon: "local_activity" }),
|
|
6161
|
+
createVNode(unref(_sfc_main$C), {
|
|
4463
6162
|
variant: "body-sm",
|
|
4464
6163
|
class: "font-semibold"
|
|
4465
6164
|
}, {
|
|
@@ -4469,7 +6168,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4469
6168
|
_: 1
|
|
4470
6169
|
})
|
|
4471
6170
|
]),
|
|
4472
|
-
createVNode(unref(_sfc_main$
|
|
6171
|
+
createVNode(unref(_sfc_main$I), { icon: "close" })
|
|
4473
6172
|
])
|
|
4474
6173
|
], 8, _hoisted_5)
|
|
4475
6174
|
]),
|
|
@@ -4793,7 +6492,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4793
6492
|
return (_ctx, _cache) => {
|
|
4794
6493
|
return criticalError.value ? (openBlock(), createBlock(_sfc_main$l, { key: 0 })) : (openBlock(), createBlock(unref(ContentWithAsideLayout), { key: 1 }, {
|
|
4795
6494
|
header: withCtx(() => [
|
|
4796
|
-
createVNode(_sfc_main$
|
|
6495
|
+
createVNode(_sfc_main$X, { class: "min-h-[52px] w-96" }, {
|
|
4797
6496
|
default: withCtx(() => {
|
|
4798
6497
|
var _a2, _b2, _c2;
|
|
4799
6498
|
return [
|
|
@@ -4868,14 +6567,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4868
6567
|
"get-is-field-required": unref(checkoutForm).getIsFieldRequired,
|
|
4869
6568
|
"read-only": unref(isPaid)
|
|
4870
6569
|
}, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"])) : createCommentVNode("", true),
|
|
4871
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
6570
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$X, {
|
|
4872
6571
|
key: 5,
|
|
4873
6572
|
variant: "section",
|
|
4874
6573
|
class: "min-h-[130px]"
|
|
4875
6574
|
}, {
|
|
4876
6575
|
default: withCtx(() => [
|
|
4877
6576
|
!unref(isPaymentMethodsPending) || unref(isPaymentMethodsPending) && unref(paymentMethodOptions).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4878
|
-
createVNode(unref(_sfc_main$
|
|
6577
|
+
createVNode(unref(_sfc_main$C), {
|
|
4879
6578
|
variant: "heading-3",
|
|
4880
6579
|
tag: "h2",
|
|
4881
6580
|
class: "mb-2"
|
|
@@ -4927,7 +6626,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4927
6626
|
})), 1)
|
|
4928
6627
|
]),
|
|
4929
6628
|
_: 1
|
|
4930
|
-
})) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$
|
|
6629
|
+
})) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$10, {
|
|
4931
6630
|
key: 2,
|
|
4932
6631
|
ref_key: "paymentIntegrationFormRef",
|
|
4933
6632
|
ref: paymentIntegrationFormRef,
|
|
@@ -4949,7 +6648,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4949
6648
|
];
|
|
4950
6649
|
}),
|
|
4951
6650
|
aside: withCtx(() => [
|
|
4952
|
-
createVNode(_sfc_main$
|
|
6651
|
+
createVNode(_sfc_main$X, {
|
|
4953
6652
|
variant: "section",
|
|
4954
6653
|
class: "min-h-[220px]"
|
|
4955
6654
|
}, {
|
|
@@ -4982,17 +6681,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4982
6681
|
onRemove: unref(removePromotionCode),
|
|
4983
6682
|
onApply: unref(applyPromotionCode)
|
|
4984
6683
|
}, null, 8, ["promotion-code", "onRemove", "onApply"])) : createCommentVNode("", true),
|
|
4985
|
-
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
6684
|
+
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$_), {
|
|
4986
6685
|
key: 1,
|
|
4987
6686
|
class: "mt-2",
|
|
4988
6687
|
title: unref(promotionCodeErrorMessage)
|
|
4989
6688
|
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
4990
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$
|
|
6689
|
+
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$X, {
|
|
4991
6690
|
key: 2,
|
|
4992
6691
|
class: "min-h-[44px]"
|
|
4993
6692
|
}, {
|
|
4994
6693
|
default: withCtx(() => [
|
|
4995
|
-
unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
6694
|
+
unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$P), {
|
|
4996
6695
|
key: 0,
|
|
4997
6696
|
type: "button",
|
|
4998
6697
|
size: "lg",
|
|
@@ -5016,14 +6715,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5016
6715
|
]),
|
|
5017
6716
|
_: 1
|
|
5018
6717
|
})) : createCommentVNode("", true),
|
|
5019
|
-
createVNode(unref(_sfc_main$
|
|
6718
|
+
createVNode(unref(_sfc_main$C), {
|
|
5020
6719
|
tag: "div",
|
|
5021
6720
|
variant: "body-sm",
|
|
5022
6721
|
shade: "lighter",
|
|
5023
6722
|
class: "flex grow justify-center"
|
|
5024
6723
|
}, {
|
|
5025
6724
|
default: withCtx(() => [
|
|
5026
|
-
createVNode(_sfc_main
|
|
6725
|
+
createVNode(_sfc_main$$, {
|
|
5027
6726
|
icon: "lock",
|
|
5028
6727
|
kpi: unref($t)({
|
|
5029
6728
|
defaultMessage: "Secure and encrypted payments",
|
|
@@ -5090,7 +6789,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5090
6789
|
const validEmail = getValidEmail((_b = props.configuration) == null ? void 0 : _b.email);
|
|
5091
6790
|
return (_ctx, _cache) => {
|
|
5092
6791
|
var _a2, _b2, _c, _d;
|
|
5093
|
-
return openBlock(), createBlock(_sfc_main$
|
|
6792
|
+
return openBlock(), createBlock(_sfc_main$11, {
|
|
5094
6793
|
"custom-element-name": unref(COMPONENT_NAME),
|
|
5095
6794
|
environment: __props.environment,
|
|
5096
6795
|
locale: __props.locale,
|
|
@@ -5107,10 +6806,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5107
6806
|
var _a3, _b3, _c2;
|
|
5108
6807
|
return [
|
|
5109
6808
|
createVNode(_sfc_main$1, {
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
6809
|
+
configuration: {
|
|
6810
|
+
avatar: (_b3 = (_a3 = __props.branding) == null ? void 0 : _a3.emblem) == null ? void 0 : _b3.public_url,
|
|
6811
|
+
email: unref(validEmail),
|
|
6812
|
+
countryCode: unref(validCountryCode),
|
|
6813
|
+
enabledPricingIds: (_c2 = __props.configuration) == null ? void 0 : _c2.enabledPricingIds
|
|
6814
|
+
},
|
|
5114
6815
|
onReady: _cache[0] || (_cache[0] = ($event) => emit("ready"))
|
|
5115
6816
|
}, createSlots({ _: 2 }, [
|
|
5116
6817
|
_ctx.$slots["terms-and-conditions"] ? {
|
|
@@ -5120,7 +6821,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5120
6821
|
]),
|
|
5121
6822
|
key: "0"
|
|
5122
6823
|
} : void 0
|
|
5123
|
-
]), 1032, ["
|
|
6824
|
+
]), 1032, ["configuration"])
|
|
5124
6825
|
];
|
|
5125
6826
|
}),
|
|
5126
6827
|
_: 3
|