@solvimon/solvimon-web 0.1.0-alpha.28 → 0.1.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
- package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
- package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
- package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
- package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
- package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
- package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
- package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
- package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
- package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
- package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +21 -20
- package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
- package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
- package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
- package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
- package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
- package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
- package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs} +4 -4
- package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
- package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
- package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
- package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
- package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +46 -88
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
- package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
- package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
- package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
- package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
- package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
- package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
- package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
- package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
- package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
- package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
- package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
- package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
- package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
- package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
- package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
- package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
- package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
- package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
- package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
- package/dist/components/Invoice/Invoice.mjs +2660 -193
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
- package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
- package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
- package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
- package/dist/customElements-BTj4ii4f.mjs +5072 -0
- package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
- package/dist/customer.es-DQKl6wFt.mjs +24 -0
- package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
- package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
- package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
- package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
- package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
- package/dist/fr-FR-IWJE-urI.mjs +431 -0
- package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
- package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.es-CpmQmvOg.mjs +633 -0
- package/dist/index.mjs +2 -2
- package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
- package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
- package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
- package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
- package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
- package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
- package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
- package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
- package/dist/payments-BnxbzQUC.mjs +68 -0
- package/dist/pricing-BOhvWWMj.mjs +29 -0
- package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
- package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
- package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
- package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
- package/dist/subscriptions-BWXZGK0E.mjs +66 -0
- package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
- package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
- package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
- package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
- package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
- package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
- package/dist/types/public/core/types.d.ts +5 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
- package/dist/types/translations/supported.d.ts +1 -1
- package/dist/types/types/portalAuthentication.d.ts +2 -0
- package/dist/types/types/portalToken.d.ts +9 -0
- package/dist/types/types/shippingAddress.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
- package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
- package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
- package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
- package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
- package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
- package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
- package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
- package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
- package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
- package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
- package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
- package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
- package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
- package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
- package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
- package/package.json +7 -7
- package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
- package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
- package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
- package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
- package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
- package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
- package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
- package/dist/customElements-Di3zwlEU.mjs +0 -6447
- package/dist/customer.es-B5ppZf0j.mjs +0 -20
- package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
- package/dist/payments-Ci8bF4C6.mjs +0 -45
- package/dist/subscriptions-CwogJODR.mjs +0 -54
- package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
- package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
- package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
- package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { defineComponent as S, computed as h, openBlock as s, createElementBlock as m, normalizeClass as f, createBlock as b, unref as r, createSlots as R, withCtx as t, createTextVNode as g, toDisplayString as y, renderSlot as o, createCommentVNode as n, createElementVNode as v, normalizeStyle as q, Fragment as p, renderList as D, withDirectives as E, mergeProps as N, isRef as K, vModelRadio as P, createVNode as x } from "vue";
|
|
2
|
+
import { u as T } from "./index.es-C7J3WGGo.mjs";
|
|
3
|
+
import { u as z, _ as M } from "./Label.vue.es-DtpLM1KH.mjs";
|
|
4
|
+
import { d as w } from "./customElements-BTj4ii4f.mjs";
|
|
5
|
+
import { _ as F } from "./Alert.vue.es-CNrEaLvh.mjs";
|
|
6
|
+
import { _ as G } from "./FormMessage.vue.es-Cjv358Ab.mjs";
|
|
7
|
+
const I = ["disabled"], L = ["aria-label"], U = ["tabindex", "data-testid", "for", "aria-label", "onKeydown"], j = ["id", "disabled", "value", "name", "aria-checked", "aria-describedby"], A = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "mt-2 text-sm text-secondary"
|
|
10
|
+
}, Z = /* @__PURE__ */ S({
|
|
11
|
+
__name: "RadioGroupExtended",
|
|
12
|
+
props: {
|
|
13
|
+
options: {},
|
|
14
|
+
direction: { default: "row" },
|
|
15
|
+
showRadio: { type: Boolean, default: !0 },
|
|
16
|
+
columns: {},
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
label: {},
|
|
19
|
+
modelValue: { type: [String, Boolean] },
|
|
20
|
+
name: {},
|
|
21
|
+
required: { type: Boolean },
|
|
22
|
+
rootClass: {},
|
|
23
|
+
error: {},
|
|
24
|
+
variant: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(a, { emit: k }) {
|
|
28
|
+
const d = a, i = T(d, "modelValue", k), V = h(
|
|
29
|
+
() => d.columns ? "grid" : ["flex", d.direction === "column" ? "flex-col" : "flex-row"]
|
|
30
|
+
), C = h(
|
|
31
|
+
() => d.columns ? { gridTemplateColumns: `repeat(${d.columns}, minmax(0, 1fr))` } : void 0
|
|
32
|
+
), u = z(d.name ? `radio_${d.name}_` : "radio_"), B = (l, c) => {
|
|
33
|
+
d.disabled || l.target !== l.currentTarget || (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), i.value = c);
|
|
34
|
+
};
|
|
35
|
+
return (l, c) => (s(), m("fieldset", {
|
|
36
|
+
class: f(a.rootClass),
|
|
37
|
+
disabled: a.disabled
|
|
38
|
+
}, [
|
|
39
|
+
a.label ? (s(), b(r(M), {
|
|
40
|
+
key: 0,
|
|
41
|
+
tag: "legend",
|
|
42
|
+
required: a.required
|
|
43
|
+
}, R({
|
|
44
|
+
default: t(() => [
|
|
45
|
+
g(y(a.label) + " ", 1)
|
|
46
|
+
]),
|
|
47
|
+
_: 2
|
|
48
|
+
}, [
|
|
49
|
+
l.$slots.tooltip ? {
|
|
50
|
+
name: "tooltip",
|
|
51
|
+
fn: t(() => [
|
|
52
|
+
o(l.$slots, "tooltip")
|
|
53
|
+
]),
|
|
54
|
+
key: "0"
|
|
55
|
+
} : void 0
|
|
56
|
+
]), 1032, ["required"])) : n("", !0),
|
|
57
|
+
v("div", {
|
|
58
|
+
role: "group",
|
|
59
|
+
"aria-label": a.label,
|
|
60
|
+
class: f([V.value, "gap-2 rounded"]),
|
|
61
|
+
style: q(C.value)
|
|
62
|
+
}, [
|
|
63
|
+
(s(!0), m(p, null, D(a.options, (e) => (s(), m("div", {
|
|
64
|
+
key: e.value.toString(),
|
|
65
|
+
class: "flex min-w-0 flex-1 flex-col"
|
|
66
|
+
}, [
|
|
67
|
+
v("label", {
|
|
68
|
+
tabindex: a.disabled ? void 0 : 0,
|
|
69
|
+
"data-testid": `radio-group-item-${e.value}`,
|
|
70
|
+
for: `${r(u)}${e.value}`,
|
|
71
|
+
"aria-label": e.label + (e.description ? `: ${e.description}` : ""),
|
|
72
|
+
class: f(["label relative flex flex-1 gap-3 rounded border border-gray-300 px-4 py-3 outline-none focus-visible:border-primary-600 focus-visible:ring-1 focus-visible:ring-primary-600", {
|
|
73
|
+
"cursor-pointer": !a.disabled,
|
|
74
|
+
"cursor-not-allowed": a.disabled,
|
|
75
|
+
"hover:bg-primary-50/50 bg-white": r(i) !== e.value,
|
|
76
|
+
"bg-primary-50/50 border-transparent ring-1 ring-primary-600": r(i) === e.value && !a.disabled,
|
|
77
|
+
"bg-gray-50/50": r(i) === e.value && a.disabled,
|
|
78
|
+
"opacity-60": a.disabled
|
|
79
|
+
}]),
|
|
80
|
+
onKeydown: ($) => B($, e.value)
|
|
81
|
+
}, [
|
|
82
|
+
E(v("input", N({ ref_for: !0 }, l.$attrs, {
|
|
83
|
+
id: `${r(u)}${e.value}`,
|
|
84
|
+
"onUpdate:modelValue": c[0] || (c[0] = ($) => K(i) ? i.value = $ : null),
|
|
85
|
+
disabled: a.disabled,
|
|
86
|
+
value: e.value,
|
|
87
|
+
type: "radio",
|
|
88
|
+
name: a.name,
|
|
89
|
+
"aria-checked": r(i) === e.value,
|
|
90
|
+
"aria-describedby": e.warning ? `${r(u)}${e.value}-warning` : void 0,
|
|
91
|
+
tabindex: "-1",
|
|
92
|
+
class: a.showRadio ? "mt-px accent-primary-600 checked:bg-primary-600 focus:!shadow-none focus:outline-none focus:!ring-0 focus:!ring-offset-0" : "sr-only"
|
|
93
|
+
}), null, 16, j), [
|
|
94
|
+
[P, r(i)]
|
|
95
|
+
]),
|
|
96
|
+
!a.showRadio && l.$slots.prefix ? o(l.$slots, "prefix", {
|
|
97
|
+
option: e,
|
|
98
|
+
optionValue: e.value
|
|
99
|
+
}, void 0, void 0, 0) : n("", !0),
|
|
100
|
+
v("div", {
|
|
101
|
+
class: f(["flex min-w-0 grow flex-col", { "opacity-50": a.disabled }])
|
|
102
|
+
}, [
|
|
103
|
+
x(r(w), {
|
|
104
|
+
tag: "span",
|
|
105
|
+
weight: "semibold",
|
|
106
|
+
"no-spacing": "",
|
|
107
|
+
variant: "body-sm"
|
|
108
|
+
}, {
|
|
109
|
+
default: t(() => [
|
|
110
|
+
o(l.$slots, "label", {
|
|
111
|
+
option: e,
|
|
112
|
+
optionValue: e.value
|
|
113
|
+
}, () => [
|
|
114
|
+
g(y(e.label), 1)
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
_: 2
|
|
118
|
+
}, 1024),
|
|
119
|
+
o(l.$slots, "description", {
|
|
120
|
+
option: e,
|
|
121
|
+
optionValue: e.value
|
|
122
|
+
}, () => [
|
|
123
|
+
e.description ? (s(), b(r(w), {
|
|
124
|
+
key: 0,
|
|
125
|
+
tag: "span",
|
|
126
|
+
variant: "body-xs",
|
|
127
|
+
"no-spacing": "",
|
|
128
|
+
color: "secondary"
|
|
129
|
+
}, {
|
|
130
|
+
default: t(() => [
|
|
131
|
+
g(y(e.description), 1)
|
|
132
|
+
]),
|
|
133
|
+
_: 2
|
|
134
|
+
}, 1024)) : n("", !0)
|
|
135
|
+
])
|
|
136
|
+
], 2),
|
|
137
|
+
o(l.$slots, "suffix", {
|
|
138
|
+
option: e,
|
|
139
|
+
optionValue: e.value
|
|
140
|
+
})
|
|
141
|
+
], 42, U),
|
|
142
|
+
e.warning ? (s(), b(r(F), {
|
|
143
|
+
key: 0,
|
|
144
|
+
id: `${r(u)}${e.value}-warning`,
|
|
145
|
+
class: "mt-1",
|
|
146
|
+
type: r(i) === e.value ? "danger" : "neutral",
|
|
147
|
+
role: "alert"
|
|
148
|
+
}, {
|
|
149
|
+
default: t(() => [
|
|
150
|
+
x(r(w), {
|
|
151
|
+
tag: "span",
|
|
152
|
+
variant: "body-xs",
|
|
153
|
+
color: "inherit"
|
|
154
|
+
}, {
|
|
155
|
+
default: t(() => [
|
|
156
|
+
g(y(e.warning), 1)
|
|
157
|
+
]),
|
|
158
|
+
_: 2
|
|
159
|
+
}, 1024)
|
|
160
|
+
]),
|
|
161
|
+
_: 2
|
|
162
|
+
}, 1032, ["id", "type"])) : n("", !0)
|
|
163
|
+
]))), 128))
|
|
164
|
+
], 14, L),
|
|
165
|
+
a.error || l.$slots.helper ? (s(), m("div", A, [
|
|
166
|
+
a.error ? (s(), b(r(G), {
|
|
167
|
+
key: 0,
|
|
168
|
+
message: a.error
|
|
169
|
+
}, null, 8, ["message"])) : l.$slots.helper ? o(l.$slots, "helper", {}, void 0, void 0, 1) : n("", !0)
|
|
170
|
+
])) : n("", !0)
|
|
171
|
+
], 10, I));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
export {
|
|
175
|
+
Z as _
|
|
176
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as s, openBlock as n, createElementBlock as r, createBlock as i, unref as c, withCtx as o, renderSlot as a, createCommentVNode as l, resolveDynamicComponent as m, createVNode as u, createSlots as f, createTextVNode as g, toDisplayString as h, createElementVNode as y, normalizeClass as B } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { d as k } from "./customElements-BTj4ii4f.mjs";
|
|
3
3
|
const $ = { class: "flex items-center gap-4" }, v = { key: 1 }, C = /* @__PURE__ */ s({
|
|
4
4
|
__name: "SectionTitle",
|
|
5
5
|
setup(e) {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as y, computed as c, openBlock as r, createElementBlock as l, createElementVNode as i, createVNode as p, unref as v, withCtx as g, toDisplayString as d, createTextVNode as f, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { a as V } from "./Button.vue.es-Zw--kuaU.mjs";
|
|
3
|
+
import { a as w, d as M } from "./customElements-BTj4ii4f.mjs";
|
|
4
|
+
const x = '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="15" fill="none" viewBox="0 0 40 15"><path fill="currentColor" d="M.049 2.917h5.845c.646 0 1.17.522 1.17 1.166v5.834H1.217c-.646 0-1.17-.522-1.17-1.167V5.833h2.924v2.334H4.14v-3.5H.049zm32.735 0v7h2.922v-5.25h1.17v5.25h2.922V4.083c0-.644-.523-1.166-1.169-1.166zm-16.367 9.916h5.845c.646 0 1.17-.522 1.17-1.166v-8.75h-2.924v5.25H19.34v-5.25h-2.922V8.75c0 .645.523 1.167 1.169 1.167h2.922v1.166h-4.091zm15.197-2.916H25.77c-.646 0-1.17-.522-1.17-1.167V2.917h5.846c.646 0 1.17.522 1.17 1.166V7h-2.923V4.667h-1.17v3.5h4.092zM15.248 0v9.917H9.402c-.646 0-1.17-.522-1.17-1.167V4.083c0-.644.524-1.166 1.17-1.166h1.754v5.25h1.169V0z"/></svg>', b = '<svg xmlns="http://www.w3.org/2000/svg" width="36" height="15" viewBox="0 0 36 15"><path d="M35.996 7.746c0-2.559-1.238-4.578-3.61-4.578-2.378 0-3.816 2.02-3.816 4.559 0 3.011 1.7 4.53 4.137 4.53 1.191 0 2.09-.269 2.77-.648v-2c-.68.34-1.457.547-2.45.547-.968 0-1.828-.34-1.937-1.52h4.887c0-.128.02-.648.02-.89m-4.937-.95c0-1.128.691-1.597 1.32-1.597.61 0 1.258.469 1.258 1.598ZM24.707 3.168c-.977 0-1.61.46-1.957.781l-.133-.62h-2.199v11.66l2.5-.532.012-2.828c.36.258.89.629 1.77.629 1.788 0 3.417-1.442 3.417-4.61-.008-2.898-1.66-4.48-3.41-4.48m-.598 6.89c-.59 0-.941-.21-1.18-.472l-.011-3.707c.262-.29.621-.492 1.191-.492.91 0 1.54 1.02 1.54 2.332 0 1.34-.622 2.34-1.54 2.34M16.98 2.578l2.508-.539V.008L16.98.539ZM16.98 3.34h2.508v8.746H16.98ZM14.29 4.078l-.161-.738h-2.16v8.746h2.5v-5.93c.59-.77 1.59-.629 1.898-.52V3.34c-.316-.121-1.488-.34-2.078.738M9.29 1.168l-2.438.52-.012 8.011c0 1.48 1.11 2.57 2.59 2.57.82 0 1.418-.152 1.75-.332v-2.03c-.32.132-1.899.59-1.899-.887V5.469h1.899v-2.13H9.28ZM2.531 5.879c0-.39.32-.54.848-.54a5.56 5.56 0 0 1 2.48.638V3.629a6.55 6.55 0 0 0-2.48-.461C1.352 3.168 0 4.227 0 6c0 2.758 3.8 2.316 3.8 3.508 0 .46-.402.61-.96.61-.828 0-1.89-.34-2.73-.802V11.7c.93.399 1.87.57 2.73.57 2.078 0 3.512-1.03 3.512-2.82-.012-2.98-3.82-2.453-3.82-3.57m0 0" style="stroke:none;fill-rule:evenodd;fill:currentColor;fill-opacity:1"/></svg>', H = { class: "flex justify-around" }, S = { class: "flex items-center gap-0.5" }, k = ["aria-label", "innerHTML"], N = /* @__PURE__ */ y({
|
|
5
|
+
__name: "SecurePaymentsKPI",
|
|
6
|
+
props: {
|
|
7
|
+
paymentMethodOptions: { type: Array }
|
|
8
|
+
},
|
|
9
|
+
setup(m) {
|
|
10
|
+
const h = m, { $t: a } = w(), o = {
|
|
11
|
+
ADYEN: { svg: x, label: "Adyen" },
|
|
12
|
+
STRIPE: { svg: b, label: "Stripe" }
|
|
13
|
+
}, t = c(() => {
|
|
14
|
+
const n = h.paymentMethodOptions.find(
|
|
15
|
+
({ integration: e }) => {
|
|
16
|
+
var s;
|
|
17
|
+
return ((s = e.payment_gateway) == null ? void 0 : s.variant) != null && e.payment_gateway.variant in o;
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
return n ? o[n.integration.payment_gateway.variant] : null;
|
|
21
|
+
}), u = c(() => t.value ? a({
|
|
22
|
+
defaultMessage: "Secure and encrypted payments by",
|
|
23
|
+
description: "Secure encrypted payments KPI for a specific vendor, followed by a vendor logo",
|
|
24
|
+
id: "secure_payments_kpi.specific_vendor"
|
|
25
|
+
}) : a({
|
|
26
|
+
defaultMessage: "Secure and encrypted payments",
|
|
27
|
+
description: "Secure encrypted payments KPI",
|
|
28
|
+
id: "secure_payments_kpi.generic"
|
|
29
|
+
}));
|
|
30
|
+
return (n, e) => (r(), l("div", H, [
|
|
31
|
+
i("div", S, [
|
|
32
|
+
p(v(V), {
|
|
33
|
+
icon: "lock",
|
|
34
|
+
size: "xs"
|
|
35
|
+
}),
|
|
36
|
+
p(v(M), {
|
|
37
|
+
tag: "span",
|
|
38
|
+
variant: "body-xs",
|
|
39
|
+
color: "subtle"
|
|
40
|
+
}, {
|
|
41
|
+
default: g(() => [
|
|
42
|
+
i("span", null, d(u.value), 1),
|
|
43
|
+
e[0] || (e[0] = f(d(" ") + " ", -1)),
|
|
44
|
+
t.value ? (r(), l("span", {
|
|
45
|
+
key: 0,
|
|
46
|
+
"aria-label": t.value.label,
|
|
47
|
+
role: "img",
|
|
48
|
+
class: "inline-block h-[15px] align-middle",
|
|
49
|
+
innerHTML: t.value.svg
|
|
50
|
+
}, null, 8, k)) : _("", !0)
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
})
|
|
54
|
+
])
|
|
55
|
+
]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
N as _
|
|
60
|
+
};
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import { defineComponent as H, ref as f, computed as _, openBlock as v, createElementBlock as U, createBlock as D, unref as a, isRef as Z, createCommentVNode as V, createVNode as E, watch as J, createSlots as Q, withCtx as g, createElementVNode as B, createTextVNode as R, toDisplayString as F } from "vue";
|
|
2
|
+
import { _ as q } from "./Button.vue.es-Zw--kuaU.mjs";
|
|
3
|
+
import { _ as X } from "./ErrorNotification.vue.es-DNd65mQq.mjs";
|
|
4
|
+
import { _ as Y } from "./Section.vue.es-CvX9tg2f.mjs";
|
|
5
|
+
import { a as W, e as ee, d as se } from "./customElements-BTj4ii4f.mjs";
|
|
6
|
+
import { M as ae } from "./Modal.vue.es-C8ZcO117.mjs";
|
|
7
|
+
import { t as te, u as ie, _ as oe, a as ne } from "./CustomerShippingAddresses-Bj8Y17O8.mjs";
|
|
8
|
+
import { f as de, u as re, r as le, a as pe } from "./formControl-BZQLHnOO.mjs";
|
|
9
|
+
import { i as ue, a as ce } from "./typeGuards.es-B4XMtlkM.mjs";
|
|
10
|
+
import { g as me } from "./customer.es-DQKl6wFt.mjs";
|
|
11
|
+
import { g as ge, a as he, t as fe, _ as ve, i as _e } from "./useCustomerFormLabels-DJWf2O17.mjs";
|
|
12
|
+
import { u as ye, s as be, a as Le, r as Ee, _ as Ie } from "./CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs";
|
|
13
|
+
import { _ as Se } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs";
|
|
14
|
+
import { _ as Te } from "./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs";
|
|
15
|
+
const Ce = ["disabled"], we = /* @__PURE__ */ H({
|
|
16
|
+
__name: "ShippingAddressForm",
|
|
17
|
+
props: {
|
|
18
|
+
customer: { type: Object },
|
|
19
|
+
address: { type: Object },
|
|
20
|
+
disabled: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(h, { expose: x }) {
|
|
23
|
+
const I = h, { $t: c } = W(), d = I.customer, i = (e) => _e(e), S = ((e) => e && i(e) ? e : void 0)(
|
|
24
|
+
me(d)
|
|
25
|
+
), r = () => {
|
|
26
|
+
var e, p, t, b, L;
|
|
27
|
+
return {
|
|
28
|
+
type: d.type,
|
|
29
|
+
email: d.email,
|
|
30
|
+
country: S,
|
|
31
|
+
shippingCountry: S,
|
|
32
|
+
// An organization is shipped to under its legal name; a person under their own.
|
|
33
|
+
...ce(d) && { companyLegalName: (e = d.organization) == null ? void 0 : e.legal_name },
|
|
34
|
+
...ue(d) && {
|
|
35
|
+
shippingFirstName: (t = (p = d.individual) == null ? void 0 : p.name) == null ? void 0 : t.first_name,
|
|
36
|
+
shippingLastName: (L = (b = d.individual) == null ? void 0 : b.name) == null ? void 0 : L.last_name
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, T = ({
|
|
40
|
+
recipient: e = {},
|
|
41
|
+
...p
|
|
42
|
+
}) => {
|
|
43
|
+
var L, $, M, k, P, O;
|
|
44
|
+
const t = te(p.address), b = i(t.country) ? t.country : S;
|
|
45
|
+
return {
|
|
46
|
+
type: e.type ?? d.type,
|
|
47
|
+
email: e.email || d.email,
|
|
48
|
+
country: b,
|
|
49
|
+
shippingCountry: b,
|
|
50
|
+
companyLegalName: (L = e.organization) == null ? void 0 : L.company_name,
|
|
51
|
+
shippingAttentionName: (($ = e.organization) == null ? void 0 : $.attention_name) ?? void 0,
|
|
52
|
+
shippingFirstName: (k = (M = e.individual) == null ? void 0 : M.name) == null ? void 0 : k.first_name,
|
|
53
|
+
shippingLastName: (O = (P = e.individual) == null ? void 0 : P.name) == null ? void 0 : O.last_name,
|
|
54
|
+
shippingAddressLine1: t.line1,
|
|
55
|
+
shippingAddressLine2: t.line2,
|
|
56
|
+
shippingPostalCode: t.postal_code,
|
|
57
|
+
shippingCity: t.city,
|
|
58
|
+
shippingState: t.state,
|
|
59
|
+
shippingPhoneNumber: e.phone_number || void 0
|
|
60
|
+
};
|
|
61
|
+
}, o = f(
|
|
62
|
+
ge({
|
|
63
|
+
...I.address ? T(I.address) : r(),
|
|
64
|
+
billingAddressSameAsShipping: !0
|
|
65
|
+
})
|
|
66
|
+
), { formatOf: l } = ye({
|
|
67
|
+
isNeeded: () => !0,
|
|
68
|
+
countries: [() => o.value.shippingCountry]
|
|
69
|
+
}), m = _(() => l(o.value.shippingCountry)), y = _(() => o.value.type === "ORGANIZATION"), C = de(o, "companyLegalName", pe), A = _(() => [
|
|
70
|
+
...he("SHIPPING", o.value.shippingCountry, m.value),
|
|
71
|
+
"shippingCountry",
|
|
72
|
+
"shippingPhoneNumber",
|
|
73
|
+
...y.value ? [] : ["shippingLastName"]
|
|
74
|
+
]), w = (e) => A.value.includes(e), n = re(
|
|
75
|
+
_(() => ({
|
|
76
|
+
...Le("SHIPPING", () => m.value, w),
|
|
77
|
+
...be(w),
|
|
78
|
+
companyLegalName: { required: le(() => y.value) }
|
|
79
|
+
})),
|
|
80
|
+
o
|
|
81
|
+
), z = (e) => w(e) ? "" : " " + c({
|
|
82
|
+
defaultMessage: "(optional)",
|
|
83
|
+
id: "checkout.optional_suffix.label",
|
|
84
|
+
description: "The suffix for optional fields in the checkout form"
|
|
85
|
+
});
|
|
86
|
+
return x({
|
|
87
|
+
/**
|
|
88
|
+
* Checks the form and hands back the address to store, or nothing while something is missing —
|
|
89
|
+
* the fields say what. Every address gets a fresh reference, since the API keeps it unique per
|
|
90
|
+
* customer, and an edit is stored as a new address next to the one it replaces.
|
|
91
|
+
*/
|
|
92
|
+
submit: async () => {
|
|
93
|
+
if (await n.value.$validate())
|
|
94
|
+
return {
|
|
95
|
+
...fe(o.value, Ee(), m.value),
|
|
96
|
+
customer_id: I.customer.id
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}), (e, p) => (v(), U("fieldset", {
|
|
100
|
+
class: "sv-shipping-address-form grid grid-cols-1 gap-2",
|
|
101
|
+
disabled: h.disabled
|
|
102
|
+
}, [
|
|
103
|
+
y.value ? (v(), D(ve, {
|
|
104
|
+
key: 0,
|
|
105
|
+
modelValue: a(C),
|
|
106
|
+
"onUpdate:modelValue": p[0] || (p[0] = (t) => Z(C) ? C.value = t : null),
|
|
107
|
+
name: "shipping_company_name",
|
|
108
|
+
class: "sv-shipping-address-form__company-name",
|
|
109
|
+
autocomplete: "shipping organization",
|
|
110
|
+
label: a(c)({
|
|
111
|
+
defaultMessage: "Company name",
|
|
112
|
+
id: "shipping_address_form.company_name.label",
|
|
113
|
+
description: "Label of the name of the company a shipping address is for"
|
|
114
|
+
}),
|
|
115
|
+
placeholder: a(c)({
|
|
116
|
+
defaultMessage: "Company name",
|
|
117
|
+
id: "shipping_address_form.company_name.placeholder",
|
|
118
|
+
description: "Placeholder of the name of the company a shipping address is for"
|
|
119
|
+
}),
|
|
120
|
+
error: a(n).companyLegalName.$errors
|
|
121
|
+
}, null, 8, ["modelValue", "label", "placeholder", "error"])) : V("", !0),
|
|
122
|
+
E(Ie, {
|
|
123
|
+
modelValue: o.value,
|
|
124
|
+
"onUpdate:modelValue": p[1] || (p[1] = (t) => o.value = t),
|
|
125
|
+
variant: "SHIPPING",
|
|
126
|
+
"with-country": "",
|
|
127
|
+
"country-before-address": "",
|
|
128
|
+
"country-label": a(c)({
|
|
129
|
+
defaultMessage: "Country",
|
|
130
|
+
id: "shipping_address_form.country.label",
|
|
131
|
+
description: "Label of the country of a shipping address"
|
|
132
|
+
}),
|
|
133
|
+
"get-optional-suffix": z,
|
|
134
|
+
format: m.value,
|
|
135
|
+
errors: {
|
|
136
|
+
addressLine1: a(n).shippingAddressLine1.$errors,
|
|
137
|
+
postalCode: a(n).shippingPostalCode.$errors,
|
|
138
|
+
city: a(n).shippingCity.$errors,
|
|
139
|
+
state: a(n).shippingState.$errors,
|
|
140
|
+
country: a(n).shippingCountry.$errors,
|
|
141
|
+
phoneNumber: a(n).shippingPhoneNumber.$errors,
|
|
142
|
+
lastName: a(n).shippingLastName.$errors
|
|
143
|
+
}
|
|
144
|
+
}, null, 8, ["modelValue", "country-label", "format", "errors"])
|
|
145
|
+
], 8, Ce));
|
|
146
|
+
}
|
|
147
|
+
}), De = { class: "sv-shipping-addresses-modal grid grid-cols-1 gap-4 pb-4" }, Me = { class: "sv-shipping-addresses-modal__list grid grid-cols-1 gap-4" }, Ne = { class: "grid grid-cols-1 gap-3" }, Ae = {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: "grid grid-cols-1 gap-3"
|
|
150
|
+
}, Ue = /* @__PURE__ */ H({
|
|
151
|
+
__name: "ShippingAddressesModal",
|
|
152
|
+
props: {
|
|
153
|
+
showModal: { type: Boolean },
|
|
154
|
+
customer: { type: Object },
|
|
155
|
+
addresses: { type: Array },
|
|
156
|
+
isLoading: { type: Boolean },
|
|
157
|
+
start: { type: Object },
|
|
158
|
+
actions: { type: Object }
|
|
159
|
+
},
|
|
160
|
+
emits: ["close"],
|
|
161
|
+
setup(h, { emit: x }) {
|
|
162
|
+
const I = ["LIST", "FORM", "DELETE"], c = h, d = x, { $t: i } = W(), S = ee(), r = f("LIST"), T = f("LIST"), o = f(), l = f(!1), m = f(), y = /* @__PURE__ */ new Map(), C = f({}), A = f(), w = f(0), n = _(() => r.value === "ADD" || r.value === "EDIT" ? "FORM" : r.value), z = () => i({
|
|
163
|
+
defaultMessage: "Something went wrong. Please try again.",
|
|
164
|
+
id: "shipping_addresses_modal.error",
|
|
165
|
+
description: "Error shown in the shipping addresses modal when a change cannot be made"
|
|
166
|
+
}), e = (s) => {
|
|
167
|
+
m.value = void 0, o.value = "address" in s ? s.address : void 0, (s.step === "ADD" || s.step === "EDIT") && (w.value += 1), s.step === "EDIT" && (y.has(s.address.id) || y.set(s.address.id, {}), C.value = y.get(s.address.id)), r.value = s.step;
|
|
168
|
+
};
|
|
169
|
+
J(
|
|
170
|
+
() => c.showModal,
|
|
171
|
+
(s) => {
|
|
172
|
+
if (!s) return;
|
|
173
|
+
const u = c.start ?? { step: "LIST" };
|
|
174
|
+
T.value = u.step, e(u);
|
|
175
|
+
},
|
|
176
|
+
{ immediate: !0 }
|
|
177
|
+
);
|
|
178
|
+
const p = () => {
|
|
179
|
+
if (T.value === "LIST") {
|
|
180
|
+
e({ step: "LIST" });
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
d("close");
|
|
184
|
+
}, t = async (s, u) => {
|
|
185
|
+
l.value = !0, m.value = void 0;
|
|
186
|
+
try {
|
|
187
|
+
return await s(), !0;
|
|
188
|
+
} catch (N) {
|
|
189
|
+
return u(N), m.value = z(), !1;
|
|
190
|
+
} finally {
|
|
191
|
+
l.value = !1;
|
|
192
|
+
}
|
|
193
|
+
}, b = async () => {
|
|
194
|
+
var j;
|
|
195
|
+
if (l.value) return;
|
|
196
|
+
l.value = !0;
|
|
197
|
+
let s;
|
|
198
|
+
try {
|
|
199
|
+
s = await ((j = A.value) == null ? void 0 : j.submit());
|
|
200
|
+
} finally {
|
|
201
|
+
l.value = !1;
|
|
202
|
+
}
|
|
203
|
+
if (!s) return;
|
|
204
|
+
const u = r.value === "EDIT" ? o.value : void 0;
|
|
205
|
+
await t(
|
|
206
|
+
() => u ? c.actions.replace(u, s, C.value) : c.actions.create(s),
|
|
207
|
+
(K) => S.error(
|
|
208
|
+
"SHIPPING_ADDRESS_SAVE_FAILED",
|
|
209
|
+
"Failed to save the shipping address",
|
|
210
|
+
{},
|
|
211
|
+
K
|
|
212
|
+
)
|
|
213
|
+
) && p();
|
|
214
|
+
}, L = async () => {
|
|
215
|
+
const s = o.value;
|
|
216
|
+
if (!s || l.value) return;
|
|
217
|
+
await t(
|
|
218
|
+
() => c.actions.remove(s),
|
|
219
|
+
(N) => S.error(
|
|
220
|
+
"SHIPPING_ADDRESS_DELETE_FAILED",
|
|
221
|
+
"Failed to delete the shipping address",
|
|
222
|
+
{},
|
|
223
|
+
N
|
|
224
|
+
)
|
|
225
|
+
) && p();
|
|
226
|
+
}, { getMenuItems: $ } = ie({
|
|
227
|
+
onEdit: (s) => e({ step: "EDIT", address: s }),
|
|
228
|
+
onDelete: (s) => e({ step: "DELETE", address: s })
|
|
229
|
+
}), M = () => {
|
|
230
|
+
if (!l.value) {
|
|
231
|
+
if (r.value === T.value) {
|
|
232
|
+
d("close");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
e({ step: "LIST" });
|
|
236
|
+
}
|
|
237
|
+
}, k = () => {
|
|
238
|
+
n.value === "FORM" && b(), n.value === "DELETE" && L();
|
|
239
|
+
}, P = _(() => {
|
|
240
|
+
switch (r.value) {
|
|
241
|
+
case "ADD":
|
|
242
|
+
return i({
|
|
243
|
+
defaultMessage: "Add shipping address",
|
|
244
|
+
id: "shipping_addresses_modal.add.title",
|
|
245
|
+
description: "Title of the shipping addresses modal while a new address is added"
|
|
246
|
+
});
|
|
247
|
+
case "EDIT":
|
|
248
|
+
return i({
|
|
249
|
+
defaultMessage: "Edit shipping address",
|
|
250
|
+
id: "shipping_addresses_modal.edit.title",
|
|
251
|
+
description: "Title of the shipping addresses modal while an address is changed"
|
|
252
|
+
});
|
|
253
|
+
case "DELETE":
|
|
254
|
+
return i({
|
|
255
|
+
defaultMessage: "Delete shipping address",
|
|
256
|
+
id: "shipping_addresses_modal.delete.title",
|
|
257
|
+
description: "Title of the shipping addresses modal while a delete is confirmed"
|
|
258
|
+
});
|
|
259
|
+
default:
|
|
260
|
+
return i({
|
|
261
|
+
defaultMessage: "Shipping addresses",
|
|
262
|
+
id: "shipping_addresses_modal.title",
|
|
263
|
+
description: "Title of the modal that lists the customer shipping addresses"
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}), O = _(() => {
|
|
267
|
+
if (n.value === "FORM")
|
|
268
|
+
return i({
|
|
269
|
+
defaultMessage: "Save address",
|
|
270
|
+
id: "shipping_addresses_modal.save_button.label",
|
|
271
|
+
description: "Label of the button that stores a new or changed shipping address"
|
|
272
|
+
});
|
|
273
|
+
if (n.value === "DELETE")
|
|
274
|
+
return i({
|
|
275
|
+
defaultMessage: "Delete",
|
|
276
|
+
id: "shipping_addresses_modal.delete_button.label",
|
|
277
|
+
description: "Label of the button that confirms deleting a shipping address"
|
|
278
|
+
});
|
|
279
|
+
}), G = _(() => r.value !== T.value ? i({
|
|
280
|
+
defaultMessage: "Back",
|
|
281
|
+
id: "shipping_addresses_modal.back_button.label",
|
|
282
|
+
description: "Label of the button that goes back to the list of shipping addresses"
|
|
283
|
+
}) : r.value === "LIST" ? i({
|
|
284
|
+
defaultMessage: "Close",
|
|
285
|
+
id: "shipping_addresses_modal.close_button.label",
|
|
286
|
+
description: "Label of the button that closes the shipping addresses modal"
|
|
287
|
+
}) : i({
|
|
288
|
+
defaultMessage: "Cancel",
|
|
289
|
+
id: "shipping_addresses_modal.cancel_button.label",
|
|
290
|
+
description: "Label of the button that closes the shipping addresses modal without saving or deleting"
|
|
291
|
+
}));
|
|
292
|
+
return (s, u) => (v(), D(a(ae), {
|
|
293
|
+
"no-click-away": "",
|
|
294
|
+
size: "lg",
|
|
295
|
+
"show-modal": h.showModal,
|
|
296
|
+
title: P.value,
|
|
297
|
+
"confirm-button-text": O.value,
|
|
298
|
+
"cancel-button-text": G.value,
|
|
299
|
+
"is-loading": l.value,
|
|
300
|
+
onConfirm: k,
|
|
301
|
+
onClose: M
|
|
302
|
+
}, Q({
|
|
303
|
+
body: g(() => [
|
|
304
|
+
B("div", De, [
|
|
305
|
+
m.value ? (v(), D(a(X), {
|
|
306
|
+
key: 0,
|
|
307
|
+
class: "sv-shipping-addresses-modal__error sv-error",
|
|
308
|
+
title: m.value
|
|
309
|
+
}, null, 8, ["title"])) : V("", !0),
|
|
310
|
+
E(Te, {
|
|
311
|
+
panes: I,
|
|
312
|
+
current: n.value
|
|
313
|
+
}, {
|
|
314
|
+
LIST: g(() => [
|
|
315
|
+
B("div", Me, [
|
|
316
|
+
h.addresses.length ? (v(), D(ne, {
|
|
317
|
+
key: 0,
|
|
318
|
+
addresses: h.addresses,
|
|
319
|
+
"get-menu-items": a($)
|
|
320
|
+
}, null, 8, ["addresses", "get-menu-items"])) : h.isLoading ? V("", !0) : (v(), D(Se, {
|
|
321
|
+
key: 1,
|
|
322
|
+
class: "sv-shipping-addresses-modal__empty",
|
|
323
|
+
icon: "home"
|
|
324
|
+
}, {
|
|
325
|
+
title: g(() => [
|
|
326
|
+
R(F(a(i)({
|
|
327
|
+
defaultMessage: "No shipping addresses yet",
|
|
328
|
+
id: "shipping_addresses_modal.empty.title",
|
|
329
|
+
description: "Shown in the shipping addresses modal when the customer has none"
|
|
330
|
+
})), 1)
|
|
331
|
+
]),
|
|
332
|
+
_: 1
|
|
333
|
+
})),
|
|
334
|
+
E(a(q), {
|
|
335
|
+
class: "sv-action sv-action--secondary sv-action--full-width sv-shipping-addresses-modal__add w-full",
|
|
336
|
+
intent: "secondary",
|
|
337
|
+
"icon-prefix": "add",
|
|
338
|
+
type: "button",
|
|
339
|
+
size: "lg",
|
|
340
|
+
disabled: l.value,
|
|
341
|
+
onClick: u[0] || (u[0] = (N) => e({ step: "ADD" }))
|
|
342
|
+
}, {
|
|
343
|
+
default: g(() => [
|
|
344
|
+
R(F(a(i)({
|
|
345
|
+
defaultMessage: "Add shipping address",
|
|
346
|
+
id: "shipping_addresses_modal.add_button.label",
|
|
347
|
+
description: "Label of the button that moves to the form for a new shipping address"
|
|
348
|
+
})), 1)
|
|
349
|
+
]),
|
|
350
|
+
_: 1
|
|
351
|
+
}, 8, ["disabled"])
|
|
352
|
+
])
|
|
353
|
+
]),
|
|
354
|
+
FORM: g(() => [
|
|
355
|
+
B("div", Ne, [
|
|
356
|
+
(v(), D(we, {
|
|
357
|
+
ref_key: "formRef",
|
|
358
|
+
ref: A,
|
|
359
|
+
key: w.value,
|
|
360
|
+
customer: h.customer,
|
|
361
|
+
address: r.value === "EDIT" ? o.value : void 0,
|
|
362
|
+
disabled: l.value
|
|
363
|
+
}, null, 8, ["customer", "address", "disabled"]))
|
|
364
|
+
])
|
|
365
|
+
]),
|
|
366
|
+
DELETE: g(() => [
|
|
367
|
+
o.value ? (v(), U("div", Ae, [
|
|
368
|
+
E(a(se), {
|
|
369
|
+
variant: "body-sm",
|
|
370
|
+
color: "secondary",
|
|
371
|
+
tag: "p"
|
|
372
|
+
}, {
|
|
373
|
+
default: g(() => [
|
|
374
|
+
R(F(a(i)({
|
|
375
|
+
defaultMessage: "This address will no longer be offered for shipping.",
|
|
376
|
+
id: "shipping_addresses_modal.delete.message",
|
|
377
|
+
description: "Explains what deleting a shipping address does, above the address"
|
|
378
|
+
})), 1)
|
|
379
|
+
]),
|
|
380
|
+
_: 1
|
|
381
|
+
}),
|
|
382
|
+
E(a(Y), { class: "sv-shipping-addresses-modal__pending-delete" }, {
|
|
383
|
+
default: g(() => [
|
|
384
|
+
E(oe, { address: o.value }, null, 8, ["address"])
|
|
385
|
+
]),
|
|
386
|
+
_: 1
|
|
387
|
+
})
|
|
388
|
+
])) : V("", !0)
|
|
389
|
+
]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, ["current"])
|
|
392
|
+
])
|
|
393
|
+
]),
|
|
394
|
+
_: 2
|
|
395
|
+
}, [
|
|
396
|
+
r.value === "LIST" ? {
|
|
397
|
+
name: "footer",
|
|
398
|
+
fn: g(() => [
|
|
399
|
+
E(a(q), {
|
|
400
|
+
size: "lg",
|
|
401
|
+
intent: "secondary",
|
|
402
|
+
class: "sv-action sv-action--secondary sv-shipping-addresses-modal__close w-full",
|
|
403
|
+
onClick: M
|
|
404
|
+
}, {
|
|
405
|
+
default: g(() => [
|
|
406
|
+
R(F(G.value), 1)
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
})
|
|
410
|
+
]),
|
|
411
|
+
key: "0"
|
|
412
|
+
} : void 0
|
|
413
|
+
]), 1032, ["show-modal", "title", "confirm-button-text", "cancel-button-text", "is-loading"]));
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
export {
|
|
417
|
+
Ue as default
|
|
418
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as V, createPropsRestProxy as E, computed as d, openBlock as c, createBlock as m, unref as I, mergeProps as S, withCtx as u, createTextVNode as N, toDisplayString as w, useModel as D, ref as q, onMounted as A, watch as P, createSlots as U, createVNode as b, normalizeClass as x, createElementVNode as g, createCommentVNode as h, renderSlot as j, mergeModels as F } from "vue";
|
|
2
|
-
import { _ as z } from "./IconButton.vue.es-
|
|
3
|
-
import { _ as H } from "./Input.vue.es-
|
|
4
|
-
import {
|
|
5
|
-
import { _ as L } from "./Chip.vue.es-
|
|
2
|
+
import { _ as z } from "./IconButton.vue.es-C8lYFx5_.mjs";
|
|
3
|
+
import { _ as H } from "./Input.vue.es-D8Oj8MWv.mjs";
|
|
4
|
+
import { d as y } from "./customElements-BTj4ii4f.mjs";
|
|
5
|
+
import { _ as L } from "./Chip.vue.es-D3UDSyXC.mjs";
|
|
6
6
|
const G = /* @__PURE__ */ V({
|
|
7
7
|
__name: "DeltaChip",
|
|
8
8
|
props: {
|