@solvimon/solvimon-web 0.1.0-alpha.29 → 0.1.0-alpha.30
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 +12 -2
- package/dist/{Alert.vue.es-CNrEaLvh.mjs → Alert.vue.es-ZPG49yR_.mjs} +1 -1
- package/dist/{AuthProvider.handle-DKfNs8rr.mjs → AuthProvider.handle-SRR_04XS.mjs} +1 -1
- package/dist/{Avatar.vue.es-r0NbcIib.mjs → Avatar.vue.es-geDQsZwu.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs} +4 -4
- package/dist/{Button.vue.es-Zw--kuaU.mjs → Button.vue.es-j7iYlqtJ.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-B8FDkS9U.mjs → ChargeOnDemandModal-CR01PkP_.mjs} +14 -14
- package/dist/{Checkout.entry.ce-DsGl-5aR.mjs → Checkout.entry.ce-CopWuLJC.mjs} +1784 -1817
- package/dist/{CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs → CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs} +7 -7
- package/dist/{Chip.vue.es-D3UDSyXC.mjs → Chip.vue.es-Dxx_0dte.mjs} +2 -2
- package/dist/{ContextMenu.vue.es-B9mFpUQK.mjs → ContextMenu.vue.es-BJO4U47Q.mjs} +5 -5
- package/dist/{CustomerBillingInformation.vue.es-B8NiQaJs.mjs → CustomerBillingInformation.vue.es-CmNpqcBw.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs} +5 -5
- package/dist/{CustomerShippingAddresses-Bj8Y17O8.mjs → CustomerShippingAddresses-BRPukhRI.mjs} +8 -8
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs} +434 -425
- package/dist/{DividerText.vue.es-CNbgif-3.mjs → DividerText.vue.es-BusbyeAI.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-DNd65mQq.mjs → ErrorNotification.vue.es-F068p7PY.mjs} +2 -2
- package/dist/{FormMessage.vue.es-Cjv358Ab.mjs → FormMessage.vue.es-CwMQpIAW.mjs} +1 -1
- package/dist/{IconButton.vue.es-C8lYFx5_.mjs → IconButton.vue.es-D8DtBW9i.mjs} +2 -2
- package/dist/{IconTitle.vue.es-O2kcqgKm.mjs → IconTitle.vue.es-6VJtjJX2.mjs} +3 -3
- package/dist/{Input.vue.es-D8Oj8MWv.mjs → Input.vue.es-BLyHcmu4.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs} +4 -4
- package/dist/{InvoicePreview.vue.es-4Q2hzaFS.mjs → InvoicePreview.vue.es-Cpf66_xV.mjs} +4 -4
- package/dist/{InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs → InvoicePricingClauseChip.vue.es-CDrAE901.mjs} +3 -3
- package/dist/{Label.vue.es-DtpLM1KH.mjs → Label.vue.es-es7ZUBSP.mjs} +3 -3
- package/dist/{Modal.vue.es-C8ZcO117.mjs → Modal.vue.es-eeR9FmvQ.mjs} +6 -6
- package/dist/{OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs → OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs} +5 -5
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-BvY2nXGV.mjs → PaymentHistoryBlock-CN42ewCn.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-CcfQSzKM.mjs → PaymentIntegrationForm-D3Ye7LZ5.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs} +5 -5
- package/dist/{PaymentIntegrationFormAdyen-DqgDfO6K.mjs → PaymentIntegrationFormAdyen-Fm-diCCO.mjs} +39 -38
- package/dist/{PaymentIntegrationFormStripe-BYdAkvLt.mjs → PaymentIntegrationFormStripe-BANBL6za.mjs} +14 -13
- package/dist/{PaymentMethod.vue.es-b0p3a0L-.mjs → PaymentMethod.vue.es-t3-VyoE8.mjs} +4 -4
- package/dist/{PaymentMethodForm-BsTrTwCg.mjs → PaymentMethodForm-CqP3GoNj.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs} +6 -6
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs} +6 -6
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs} +7 -7
- package/dist/PlanCustomizationEditor-B76UNEMm.mjs +791 -0
- package/dist/{PortalLinkUnverified-B_EE2wTJ.mjs → PortalLinkUnverified-Cp60_kRJ.mjs} +3 -3
- package/dist/{PortalNotAvailable-DPE9y37H.mjs → PortalNotAvailable-DzSQnfzw.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs → PricingGroupRangeInput.vue.es-Srq_3cga.mjs} +156 -206
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs +177 -0
- package/dist/{RadioGroupExtended.vue.es-3nDXqIGi.mjs → RadioGroupExtended.vue.es-BbBMDf6l.mjs} +5 -5
- package/dist/{Section.vue.es-CvX9tg2f.mjs → Section.vue.es-Oqn1wGPZ.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs} +2 -2
- package/dist/{ShippingAddressesModal-C4p1IXXk.mjs → ShippingAddressesModal-c7nqf4Ny.mjs} +10 -10
- package/dist/StepInput.vue.es-ieh4EuJ7.mjs +213 -0
- package/dist/{SubscriptionDetails.entry.ce-D5SwM0YS.mjs → SubscriptionDetails.entry.ce-uYv45FGH.mjs} +91 -92
- package/dist/{SubscriptionSchedules-BZqlpAtk.mjs → SubscriptionSchedules-DMxX3GpK.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs} +1736 -1721
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs} +4 -4
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs} +9 -9
- package/dist/{TooltipParagraph.vue.es-Dw0ndjle.mjs → TooltipParagraph.vue.es-BES3zsYN.mjs} +1 -1
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs} +1 -1
- package/dist/{TrialChip.vue.es-DOopmaXA.mjs → TrialChip.vue.es-C51z1ZiA.mjs} +2 -2
- package/dist/addonQuantity-CCVaA3e-.mjs +758 -0
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +8 -8
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.mjs +14 -14
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/core/index.mjs +1 -1
- package/dist/{customElements-BTj4ii4f.mjs → customElements-DK4GKNJG.mjs} +10 -10
- package/dist/{customer-BIjC0CWJ.mjs → customer-lf6S5DBR.mjs} +1 -1
- package/dist/{de-DE-DBbERiFr.mjs → de-DE-Cyj_NtiI.mjs} +4 -0
- package/dist/{fr-FR-IWJE-urI.mjs → fr-FR-CRFoWQ7J.mjs} +4 -0
- package/dist/{index.es-C7J3WGGo.mjs → index.es-BrVTOW5D.mjs} +4 -4
- package/dist/index.mjs +2 -2
- package/dist/{invoices-e1sKLgxg.mjs → invoices-DdREPDXV.mjs} +1 -1
- package/dist/{it-IT-B7ui2oxO.mjs → it-IT-DObZEc-U.mjs} +4 -0
- package/dist/{nl-NL-Bafh2xoT.mjs → nl-NL-C02xHilF.mjs} +4 -0
- package/dist/paymentFailure-QZdZHBhf.mjs +47 -0
- package/dist/{paymentMethods-B_82JGk_.mjs → paymentMethods-8w-ccfY_.mjs} +1 -1
- package/dist/{paymentMethods-Nfv9HdkS.mjs → paymentMethods-Goa25rTs.mjs} +2 -2
- package/dist/paymentOutcome-B6sW1eCV.mjs +22 -0
- package/dist/{payments-BnxbzQUC.mjs → payments-CKpU1K3t.mjs} +1 -1
- package/dist/{pricing-BOhvWWMj.mjs → pricing-CEaZGgKe.mjs} +1 -1
- package/dist/pricingItem.es-bCPArbTa.mjs +55 -0
- package/dist/{pricingPlanScheduleOverrides-Dxv5FOBd.mjs → pricingPlanScheduleOverrides-BBp-DmpV.mjs} +2 -2
- package/dist/{pricingPlanSchedules-Dv7ZCgNp.mjs → pricingPlanSchedules-DSMptcAh.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +13 -13
- package/dist/screens/PayInvoice/PayInvoice.mjs +33 -32
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +172 -163
- package/dist/{sorting.es-CVyKw23D.mjs → sorting.es-C0pdMgX0.mjs} +1 -1
- package/dist/subscription-BwzkagDI.mjs +212 -0
- package/dist/{subscriptions-BWXZGK0E.mjs → subscriptions-B5bH8hsI.mjs} +1 -1
- package/dist/{taxId.es-DkD3Ltr8.mjs → taxId.es-e6NEvprh.mjs} +2 -2
- package/dist/types/public/core/configuration.d.ts +0 -1
- package/dist/types/public/core/types.d.ts +10 -5
- package/dist/{useActionDispatchProvider-3W2vEyIg.mjs → useActionDispatchProvider-ChAHdwR8.mjs} +1 -1
- package/dist/{useCustomer-cObBvDOu.mjs → useCustomer-CTMhg1nd.mjs} +2 -2
- package/dist/{useCustomerFormLabels-DJWf2O17.mjs → useCustomerFormLabels-D4oDnfxA.mjs} +9 -9
- package/dist/{useIncrementalLoading-CATuO36d.mjs → useIncrementalLoading-CBVutPH8.mjs} +1 -1
- package/dist/{useInvoiceData-DD44HTl7.mjs → useInvoiceData-qUGbBAQK.mjs} +2 -2
- package/dist/{useInvoicesList-CpB-41MQ.mjs → useInvoicesList-wJvZAJpW.mjs} +9 -9
- package/dist/{useLoadInitialData-qzdnBoui.mjs → useLoadInitialData-UvfYXgbi.mjs} +1 -1
- package/dist/{usePaymentFormHold-ByUZi3A-.mjs → usePaymentFormHold-Cwdr-vyc.mjs} +2 -2
- package/dist/{usePaymentMethodAvailability-DUdrs0Ji.mjs → usePaymentMethodAvailability-35l4pWdH.mjs} +4 -4
- package/dist/{usePaymentMethods-ByaKF7mf.mjs → usePaymentMethods-De7hlLHo.mjs} +2 -2
- package/dist/{usePayments-BXABv-lF.mjs → usePayments-hWS7fnOx.mjs} +9 -9
- package/dist/{usePortal-CwR_FxTb.mjs → usePortal-DUfD6hrA.mjs} +1 -1
- package/dist/{useService-BZcbUZHI.mjs → useService-BwzIBIRp.mjs} +1 -1
- package/dist/{useTimePeriod.es-BpdiVwg8.mjs → useTimePeriod.es-BUorDLVK.mjs} +1 -1
- package/package.json +4 -4
- package/dist/PlanCustomizationEditor-D29N4HUM.mjs +0 -711
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs +0 -141
- package/dist/StepInput.vue.es-DweyzpkL.mjs +0 -200
- package/dist/index.es-CpmQmvOg.mjs +0 -633
- package/dist/paymentOutcome-BXEU5-84.mjs +0 -67
- package/dist/pricingPlanSchedule-BPrS2WRd.mjs +0 -132
- package/dist/subscription-BhxoqwcT.mjs +0 -83
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
import { openBlock as u, createElementBlock as C, createElementVNode as y, renderSlot as T, defineComponent as te, computed as S, withKeys as Ee, normalizeClass as M, Fragment as Q, mergeProps as N, createBlock as b, resolveDynamicComponent as D, createCommentVNode as v, createVNode as P, normalizeProps as z, withCtx as k, createTextVNode as F, toDisplayString as q, renderList as be, getCurrentInstance as $e, ref as Y, inject as Oe, unref as I, isRef as Le, createSlots as De, guardReactiveProps as Pe, Teleport as Ae, normalizeStyle as me, nextTick as Re } from "vue";
|
|
2
|
+
import { u as _, d as Ve, c as Be } from "./index.es-BrVTOW5D.mjs";
|
|
3
|
+
import { _ as Te, u as Ne } from "./useLazyFloating.es-CycqRyeb.mjs";
|
|
4
|
+
import { e as ze } from "./sanitization.es-C6dbuxUJ.mjs";
|
|
5
|
+
import { _ as U, s as Fe, u as Ke } from "./sorting.es-C0pdMgX0.mjs";
|
|
6
|
+
import { d as G, S as qe } from "./customElements-DK4GKNJG.mjs";
|
|
7
|
+
import { u as Ue } from "./Label.vue.es-es7ZUBSP.mjs";
|
|
8
|
+
import { a as Qe, _ as ee } from "./Button.vue.es-j7iYlqtJ.mjs";
|
|
9
|
+
import { _ as je } from "./IconButton.vue.es-D8DtBW9i.mjs";
|
|
10
|
+
import { _ as He } from "./Chip.vue.es-Dxx_0dte.mjs";
|
|
11
|
+
import { a as Ye, i as Ge } from "./useService-BwzIBIRp.mjs";
|
|
12
|
+
import { _ as We } from "./Input.vue.es-BLyHcmu4.mjs";
|
|
13
|
+
import { g as Je } from "./pricingItem.es-bCPArbTa.mjs";
|
|
14
|
+
import { a as Xe, b as Ze } from "./pricing-CEaZGgKe.mjs";
|
|
15
|
+
import { h as _e } from "./subscription-BwzkagDI.mjs";
|
|
16
|
+
const et = (e) => `checkbox-item-${e}`, tt = "select-search-done-button", lt = {}, nt = { class: "flex items-center pt-1" }, at = { class: "px-1.5 text-xs font-semibold text-subtle" };
|
|
17
|
+
function ot(e, l) {
|
|
18
|
+
return u(), C("div", nt, [
|
|
19
|
+
l[0] || (l[0] = y("div", { class: "w-2 border-t" }, null, -1)),
|
|
20
|
+
y("span", at, [
|
|
21
|
+
T(e.$slots, "default")
|
|
22
|
+
]),
|
|
23
|
+
l[1] || (l[1] = y("div", { class: "grow border-t" }, null, -1))
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
const st = /* @__PURE__ */ Te(lt, [["render", ot]]), it = ["aria-selected", "aria-disabled", "data-testid"], ut = ["id", "value", "checked", "disabled"], dt = ["for"], rt = { class: "flex items-center gap-1" }, ct = { class: "flex flex-grow flex-col" }, ft = { class: "flex flex-grow gap-2" }, mt = { class: "flex flex-grow flex-col" }, vt = { class: "flex flex-grow items-start justify-between gap-2" }, bt = { class: "flex items-center gap-2" }, pt = /* @__PURE__ */ te({
|
|
27
|
+
__name: "SelectExtendedOption",
|
|
28
|
+
props: {
|
|
29
|
+
multiple: { type: Boolean },
|
|
30
|
+
inputValue: {},
|
|
31
|
+
condensed: { type: Boolean },
|
|
32
|
+
label: {},
|
|
33
|
+
checked: { type: Boolean },
|
|
34
|
+
disabled: { type: Boolean },
|
|
35
|
+
subLabel: {},
|
|
36
|
+
labelPrefixComponent: {},
|
|
37
|
+
labelSuffixComponent: {},
|
|
38
|
+
labelInlineComponent: {},
|
|
39
|
+
value: {},
|
|
40
|
+
labelSrOnly: { type: Boolean }
|
|
41
|
+
},
|
|
42
|
+
emits: ["value-changed"],
|
|
43
|
+
setup(e, { emit: l }) {
|
|
44
|
+
const o = l, n = e, c = (m) => {
|
|
45
|
+
const h = m.target;
|
|
46
|
+
o("value-changed", {
|
|
47
|
+
value: h.value,
|
|
48
|
+
checked: h.checked
|
|
49
|
+
});
|
|
50
|
+
}, a = () => {
|
|
51
|
+
n.multiple || n.disabled || o("value-changed", { value: n.value });
|
|
52
|
+
}, d = S(() => et(n.value)), s = S(() => ze(n.inputValue ?? ""));
|
|
53
|
+
return (m, h) => (u(), C("li", {
|
|
54
|
+
role: "option",
|
|
55
|
+
"aria-selected": e.checked,
|
|
56
|
+
"aria-disabled": e.disabled,
|
|
57
|
+
class: M([{ "hover:bg-gray-50": !e.disabled }, "relative flex"]),
|
|
58
|
+
"data-testid": d.value,
|
|
59
|
+
tabindex: "0",
|
|
60
|
+
onClick: a,
|
|
61
|
+
onKeydown: Ee(a, ["enter"])
|
|
62
|
+
}, [
|
|
63
|
+
e.multiple ? (u(), C(Q, { key: 0 }, [
|
|
64
|
+
y("input", N(m.$attrs, {
|
|
65
|
+
id: d.value,
|
|
66
|
+
ref: "inputRef",
|
|
67
|
+
value: e.value,
|
|
68
|
+
checked: e.checked,
|
|
69
|
+
disabled: e.disabled,
|
|
70
|
+
type: "checkbox",
|
|
71
|
+
class: ["absolute left-3.5 top-1/2 h-4 w-4 -translate-y-2 rounded border-gray-300 bg-gray-100 focus:ring-2 focus:ring-primary-500", e.disabled ? "text-disabled" : "text-primary-600"],
|
|
72
|
+
tabindex: "-1",
|
|
73
|
+
onChange: c
|
|
74
|
+
}), null, 16, ut),
|
|
75
|
+
y("label", {
|
|
76
|
+
for: d.value,
|
|
77
|
+
class: M([e.disabled ? "text-disabled" : "rounded text-default", "w-full px-4 py-3 pl-10 text-sm font-medium"])
|
|
78
|
+
}, [
|
|
79
|
+
y("div", rt, [
|
|
80
|
+
e.labelPrefixComponent ? (u(), b(D(e.labelPrefixComponent.component), { key: 0 })) : v("", !0),
|
|
81
|
+
y("div", ct, [
|
|
82
|
+
y("div", ft, [
|
|
83
|
+
P(U, {
|
|
84
|
+
text: e.label,
|
|
85
|
+
search: s.value,
|
|
86
|
+
class: M(["font-semibold", { "sr-only": e.labelSrOnly }])
|
|
87
|
+
}, null, 8, ["text", "search", "class"]),
|
|
88
|
+
e.labelInlineComponent ? (u(), b(D(e.labelInlineComponent.component), z(N({ key: 0 }, e.labelInlineComponent.props)), null, 16)) : v("", !0),
|
|
89
|
+
e.subLabel && e.condensed ? (u(), b(U, {
|
|
90
|
+
key: 1,
|
|
91
|
+
class: "text-xs text-secondary",
|
|
92
|
+
text: e.subLabel,
|
|
93
|
+
search: s.value
|
|
94
|
+
}, null, 8, ["text", "search"])) : v("", !0)
|
|
95
|
+
]),
|
|
96
|
+
e.subLabel && !e.condensed ? (u(), b(U, {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "text-xs text-secondary",
|
|
99
|
+
text: e.subLabel,
|
|
100
|
+
search: s.value
|
|
101
|
+
}, null, 8, ["text", "search"])) : v("", !0)
|
|
102
|
+
]),
|
|
103
|
+
e.labelSuffixComponent ? (u(), b(D(e.labelSuffixComponent.component), z(N({ key: 1 }, e.labelSuffixComponent.props)), null, 16)) : v("", !0)
|
|
104
|
+
])
|
|
105
|
+
], 10, dt)
|
|
106
|
+
], 64)) : (u(), C("div", {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: M(["flex w-full items-start gap-3 px-4 text-sm font-medium", [
|
|
109
|
+
e.condensed ? "p-2" : "py-3",
|
|
110
|
+
e.disabled ?? "cursor-not-allowed",
|
|
111
|
+
!e.disabled && "cursor-pointer"
|
|
112
|
+
]])
|
|
113
|
+
}, [
|
|
114
|
+
e.labelPrefixComponent ? (u(), b(D(e.labelPrefixComponent.component), z(N({ key: 0 }, e.labelPrefixComponent.props)), null, 16)) : v("", !0),
|
|
115
|
+
y("div", mt, [
|
|
116
|
+
y("div", vt, [
|
|
117
|
+
P(U, {
|
|
118
|
+
text: e.label,
|
|
119
|
+
search: s.value,
|
|
120
|
+
class: M(["font-semibold", { "text-disabled": e.disabled }])
|
|
121
|
+
}, null, 8, ["text", "search", "class"]),
|
|
122
|
+
y("div", bt, [
|
|
123
|
+
e.labelInlineComponent ? (u(), b(D(e.labelInlineComponent.component), z(N({ key: 0 }, e.labelInlineComponent.props)), null, 16)) : v("", !0),
|
|
124
|
+
e.labelSuffixComponent ? (u(), b(D(e.labelSuffixComponent.component), z(N({ key: 1 }, e.labelSuffixComponent.props)), null, 16)) : v("", !0)
|
|
125
|
+
])
|
|
126
|
+
]),
|
|
127
|
+
e.subLabel && e.condensed ? (u(), b(U, {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "text-xs text-secondary",
|
|
130
|
+
text: e.subLabel,
|
|
131
|
+
search: s.value
|
|
132
|
+
}, null, 8, ["text", "search"])) : v("", !0),
|
|
133
|
+
e.subLabel && !e.condensed ? (u(), b(U, {
|
|
134
|
+
key: 1,
|
|
135
|
+
class: "text-xs text-secondary",
|
|
136
|
+
text: e.subLabel,
|
|
137
|
+
search: s.value
|
|
138
|
+
}, null, 8, ["text", "search"])) : v("", !0)
|
|
139
|
+
])
|
|
140
|
+
], 2))
|
|
141
|
+
], 42, it));
|
|
142
|
+
}
|
|
143
|
+
}), yt = { class: "flex flex-col rounded-bl rounded-br" }, ht = { key: 0 }, gt = {
|
|
144
|
+
key: 2,
|
|
145
|
+
class: "border-t border-gray-200"
|
|
146
|
+
}, xt = /* @__PURE__ */ te({
|
|
147
|
+
__name: "SelectExtendedOptions",
|
|
148
|
+
props: {
|
|
149
|
+
model: {},
|
|
150
|
+
multiple: { type: Boolean },
|
|
151
|
+
condensed: { type: Boolean },
|
|
152
|
+
hasLargeDropdown: { type: Boolean },
|
|
153
|
+
inputValue: {},
|
|
154
|
+
addOnly: { type: Boolean },
|
|
155
|
+
options: {}
|
|
156
|
+
},
|
|
157
|
+
emits: ["value-changed"],
|
|
158
|
+
setup(e, { emit: l }) {
|
|
159
|
+
const o = e, n = l, c = (s) => n("value-changed", s), a = S(
|
|
160
|
+
() => Fe(o.options, "group").reduce((s, m) => m.value === "" ? s : { ...s, [m.value]: m.group }, {})
|
|
161
|
+
), d = S(() => o.options.length === 0);
|
|
162
|
+
return (s, m) => (u(), C("div", yt, [
|
|
163
|
+
d.value ? (u(), b(G, {
|
|
164
|
+
key: 0,
|
|
165
|
+
tag: "div",
|
|
166
|
+
"no-spacing": "",
|
|
167
|
+
variant: "body-sm",
|
|
168
|
+
color: "secondary",
|
|
169
|
+
class: "px-5 py-5"
|
|
170
|
+
}, {
|
|
171
|
+
default: k(() => [...m[0] || (m[0] = [
|
|
172
|
+
F("No results", -1)
|
|
173
|
+
])]),
|
|
174
|
+
_: 1
|
|
175
|
+
})) : (u(), C("ul", {
|
|
176
|
+
key: 1,
|
|
177
|
+
class: M(["list-none overflow-y-auto", [e.hasLargeDropdown ? "max-h-76" : "max-h-48"]])
|
|
178
|
+
}, [
|
|
179
|
+
e.addOnly ? (u(), C("div", ht, [
|
|
180
|
+
P(G, {
|
|
181
|
+
tag: "p",
|
|
182
|
+
"no-spacing": "",
|
|
183
|
+
variant: "body-sm",
|
|
184
|
+
color: "secondary",
|
|
185
|
+
class: "mt-1 px-3 py-2"
|
|
186
|
+
}, {
|
|
187
|
+
default: k(() => [...m[1] || (m[1] = [
|
|
188
|
+
F(q("You can only select currently unselected options."), -1)
|
|
189
|
+
])]),
|
|
190
|
+
_: 1
|
|
191
|
+
})
|
|
192
|
+
])) : v("", !0),
|
|
193
|
+
(u(!0), C(Q, null, be(e.options, ({
|
|
194
|
+
label: h,
|
|
195
|
+
subLabel: E,
|
|
196
|
+
value: f,
|
|
197
|
+
checked: w,
|
|
198
|
+
disabled: g,
|
|
199
|
+
labelInlineComponent: W,
|
|
200
|
+
labelSuffixComponent: A,
|
|
201
|
+
labelSrOnly: $,
|
|
202
|
+
labelPrefixComponent: H,
|
|
203
|
+
hidden: J
|
|
204
|
+
}) => (u(), C(Q, { key: f }, [
|
|
205
|
+
a.value[f] ? (u(), b(st, { key: 0 }, {
|
|
206
|
+
default: k(() => [
|
|
207
|
+
F(q(a.value[f]), 1)
|
|
208
|
+
]),
|
|
209
|
+
_: 2
|
|
210
|
+
}, 1024)) : v("", !0),
|
|
211
|
+
J ? v("", !0) : (u(), b(pt, {
|
|
212
|
+
key: 1,
|
|
213
|
+
label: h,
|
|
214
|
+
"sub-label": E,
|
|
215
|
+
value: f,
|
|
216
|
+
checked: w,
|
|
217
|
+
disabled: g,
|
|
218
|
+
multiple: e.multiple,
|
|
219
|
+
condensed: e.condensed,
|
|
220
|
+
"label-suffix-component": A,
|
|
221
|
+
"label-prefix-component": H,
|
|
222
|
+
"label-inline-component": W,
|
|
223
|
+
"label-sr-only": $,
|
|
224
|
+
"input-value": e.inputValue,
|
|
225
|
+
onValueChanged: c
|
|
226
|
+
}, null, 8, ["label", "sub-label", "value", "checked", "disabled", "multiple", "condensed", "label-suffix-component", "label-prefix-component", "label-inline-component", "label-sr-only", "input-value"]))
|
|
227
|
+
], 64))), 128))
|
|
228
|
+
], 2)),
|
|
229
|
+
s.$slots["list-footer-content"] ? (u(), C("div", gt, [
|
|
230
|
+
T(s.$slots, "list-footer-content")
|
|
231
|
+
])) : v("", !0)
|
|
232
|
+
]));
|
|
233
|
+
}
|
|
234
|
+
}), kt = ["aria-expanded", "aria-controls"], Ct = { class: "flex items-center gap-2" }, wt = { key: 1 }, St = { class: "flex items-center gap-2" }, It = {
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "mt-2 flex flex-wrap gap-2"
|
|
237
|
+
}, Mt = ["innerHTML"], Et = ["id"], $t = /* @__PURE__ */ te({
|
|
238
|
+
__name: "SelectExtended",
|
|
239
|
+
props: {
|
|
240
|
+
addOnly: { type: Boolean, default: !1 },
|
|
241
|
+
disabled: { type: Boolean },
|
|
242
|
+
label: {},
|
|
243
|
+
labelScreenReaderOnly: { type: Boolean },
|
|
244
|
+
inputModel: {},
|
|
245
|
+
singleModelValue: {},
|
|
246
|
+
multiModelValue: {},
|
|
247
|
+
options: { default: () => [] },
|
|
248
|
+
optionsOrder: { default: () => ["asc", "asc"] },
|
|
249
|
+
optionsOrderProperties: { default: () => ["group", "label"] },
|
|
250
|
+
required: { type: Boolean, default: !1 },
|
|
251
|
+
rootClass: {},
|
|
252
|
+
size: { default: "md" },
|
|
253
|
+
withChips: { type: Boolean, default: !1 },
|
|
254
|
+
error: {},
|
|
255
|
+
hasReset: { type: Boolean },
|
|
256
|
+
name: {},
|
|
257
|
+
hasLargeDropdown: { type: Boolean, default: !1 },
|
|
258
|
+
showSuffixInClosedInput: { type: Boolean },
|
|
259
|
+
showSuffixLabelInInput: { type: Boolean },
|
|
260
|
+
showSubLabelInInput: { type: Boolean, default: !1 },
|
|
261
|
+
condensed: { type: Boolean },
|
|
262
|
+
form: {},
|
|
263
|
+
isInputReadOnly: { type: Boolean, default: !0 },
|
|
264
|
+
textContent: { default: () => ({
|
|
265
|
+
placeholderSingleOpen: "Search",
|
|
266
|
+
placeholderSingleEmpty: "Select an option",
|
|
267
|
+
placeholderMultipleOpen: "Search",
|
|
268
|
+
placeholderMultipleEmpty: "Select one or more options",
|
|
269
|
+
buttonAddLabel: "Add",
|
|
270
|
+
buttonClearLabel: "Reset",
|
|
271
|
+
buttonDoneLabel: "Done"
|
|
272
|
+
}) }
|
|
273
|
+
},
|
|
274
|
+
emits: ["update:inputModel", "update:singleModelValue", "update:multiModelValue", "blur", "change", "focus", "add-option"],
|
|
275
|
+
setup(e, { emit: l }) {
|
|
276
|
+
var o;
|
|
277
|
+
const n = e, c = l, a = (o = $e()) == null ? void 0 : o.vnode.props, d = _(n, "inputModel", c), s = _(n, "singleModelValue", c), m = _(n, "multiModelValue", c), h = S(() => f.value ? m.value ?? [] : s.value ? [s.value] : []), E = Y(n.multiModelValue ?? []), f = S(() => Array.isArray(n.multiModelValue)), w = S({
|
|
278
|
+
get: () => f.value ? E.value ?? [] : typeof s.value == "string" ? [s.value] : [],
|
|
279
|
+
set(t) {
|
|
280
|
+
f.value ? E.value = t : s.value = (t == null ? void 0 : t[0]) ?? "";
|
|
281
|
+
}
|
|
282
|
+
}), g = Y(!1), W = Ke(), A = Y(), $ = Y(), H = Oe(qe), J = (t) => n.options.filter((i) => t.some((p) => i.value === p)), K = S(() => J(w.value)), x = S(() => K.value[0]), he = S(() => fe.value[0]), ae = S(
|
|
283
|
+
() => {
|
|
284
|
+
var t;
|
|
285
|
+
return !g.value && !f.value && ((t = x.value) == null ? void 0 : t.labelPrefixComponent);
|
|
286
|
+
}
|
|
287
|
+
), ge = !!(a != null && a.onAddOption), xe = () => {
|
|
288
|
+
c("add-option"), R();
|
|
289
|
+
}, ke = S(() => {
|
|
290
|
+
var t, i, p, r;
|
|
291
|
+
if (!f.value) {
|
|
292
|
+
if (x.value)
|
|
293
|
+
return (t = x.value) == null ? void 0 : t.label;
|
|
294
|
+
if (K.value.length === 0)
|
|
295
|
+
return n.textContent.placeholderSingleEmpty;
|
|
296
|
+
}
|
|
297
|
+
if (f.value) {
|
|
298
|
+
if (K.value.length === 1)
|
|
299
|
+
return (i = x.value) == null ? void 0 : i.label;
|
|
300
|
+
if (K.value.length >= 2)
|
|
301
|
+
return `${(p = x.value) == null ? void 0 : p.label} +${K.value.length - 1}`;
|
|
302
|
+
if (K.value.length === 0)
|
|
303
|
+
return n.textContent.placeholderMultipleEmpty;
|
|
304
|
+
}
|
|
305
|
+
return (r = he.value) == null ? void 0 : r.label;
|
|
306
|
+
}), R = () => {
|
|
307
|
+
f.value, g.value = !1;
|
|
308
|
+
}, oe = ({
|
|
309
|
+
value: t,
|
|
310
|
+
checked: i
|
|
311
|
+
}) => {
|
|
312
|
+
let p;
|
|
313
|
+
f.value ? p = i ? [...w.value, t] : w.value.filter((r) => r !== t) : (p = [t], g.value = !1), w.value = p, c("change");
|
|
314
|
+
}, se = S(() => n.disabled ? !1 : !!(n.addOnly && !Ye(E.value, n.multiModelValue) || !n.addOnly && w.value.length > 0 && !(w.value.length === 1 && w.value[0] === ""))), ie = () => {
|
|
315
|
+
if (n.addOnly) {
|
|
316
|
+
E.value = h.value, d.value = "", R();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
w.value = [], E.value = [], d.value && (d.value = ""), R();
|
|
320
|
+
}, ue = () => A.value ? Array.from(
|
|
321
|
+
A.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')
|
|
322
|
+
) : [], de = () => {
|
|
323
|
+
var t;
|
|
324
|
+
let i = document.activeElement;
|
|
325
|
+
for (; (t = i == null ? void 0 : i.shadowRoot) != null && t.activeElement; )
|
|
326
|
+
i = i.shadowRoot.activeElement;
|
|
327
|
+
return i;
|
|
328
|
+
}, X = () => {
|
|
329
|
+
if (!$.value) return null;
|
|
330
|
+
let t = $.value.querySelector("input");
|
|
331
|
+
if (t) return t;
|
|
332
|
+
const i = $.value.querySelectorAll("*");
|
|
333
|
+
for (const p of i)
|
|
334
|
+
if (p.shadowRoot && (t = p.shadowRoot.querySelector("input"), t))
|
|
335
|
+
return t;
|
|
336
|
+
return null;
|
|
337
|
+
}, Ce = (t) => {
|
|
338
|
+
var i, p;
|
|
339
|
+
if (!g.value) return;
|
|
340
|
+
const r = ue(), L = X();
|
|
341
|
+
if (de() === L)
|
|
342
|
+
switch (t.key) {
|
|
343
|
+
case "ArrowDown":
|
|
344
|
+
r.length > 0 && (t.preventDefault(), (i = r[0]) == null || i.focus());
|
|
345
|
+
break;
|
|
346
|
+
case "Tab":
|
|
347
|
+
!t.shiftKey && r.length > 0 && (t.preventDefault(), (p = r[0]) == null || p.focus());
|
|
348
|
+
break;
|
|
349
|
+
case "Escape":
|
|
350
|
+
t.preventDefault(), R();
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
}, we = (t) => {
|
|
354
|
+
var i, p, r, L;
|
|
355
|
+
const O = ue(), Z = de(), V = O.indexOf(Z), B = X();
|
|
356
|
+
switch (t.key) {
|
|
357
|
+
case "ArrowDown":
|
|
358
|
+
V < O.length - 1 && (t.preventDefault(), (i = O[V + 1]) == null || i.focus());
|
|
359
|
+
break;
|
|
360
|
+
case "ArrowUp":
|
|
361
|
+
t.preventDefault(), V <= 0 ? B == null || B.focus() : (p = O[V - 1]) == null || p.focus();
|
|
362
|
+
break;
|
|
363
|
+
case "Tab":
|
|
364
|
+
t.shiftKey ? V <= 0 ? (t.preventDefault(), B == null || B.focus()) : (t.preventDefault(), (r = O[V - 1]) == null || r.focus()) : V >= O.length - 1 ? (t.preventDefault(), R(), B == null || B.focus()) : (t.preventDefault(), (L = O[V + 1]) == null || L.focus());
|
|
365
|
+
break;
|
|
366
|
+
case "Escape":
|
|
367
|
+
t.preventDefault(), R(), Re(() => {
|
|
368
|
+
B == null || B.focus();
|
|
369
|
+
});
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
Ve("mousedown", (t) => {
|
|
374
|
+
const i = t.composedPath();
|
|
375
|
+
A.value && i.includes(A.value) || $.value && i.includes($.value) || g.value && R();
|
|
376
|
+
});
|
|
377
|
+
const { floatingStyles: Se } = Ne($, A, {
|
|
378
|
+
placement: "bottom",
|
|
379
|
+
middleware: ({ offset: t, flip: i }) => [
|
|
380
|
+
t(4),
|
|
381
|
+
i({
|
|
382
|
+
mainAxis: !0
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
}), re = Ue("search-select-options-"), { width: Ie } = Be($), Me = () => {
|
|
386
|
+
const t = X();
|
|
387
|
+
t && t.focus();
|
|
388
|
+
}, ce = S(() => n.options.map((t) => ({
|
|
389
|
+
...t,
|
|
390
|
+
checked: K.value.some((i) => i.value === t.value),
|
|
391
|
+
disabled: n.disabled || !n.disabled && n.addOnly && !!h.value.includes(t.value)
|
|
392
|
+
}))), fe = S(
|
|
393
|
+
() => ce.value.filter((t) => {
|
|
394
|
+
var i;
|
|
395
|
+
return (i = w.value) == null ? void 0 : i.includes(t.value);
|
|
396
|
+
})
|
|
397
|
+
);
|
|
398
|
+
return (t, i) => {
|
|
399
|
+
var p;
|
|
400
|
+
return u(), C(Q, null, [
|
|
401
|
+
y("div", {
|
|
402
|
+
ref_key: "wrapperRef",
|
|
403
|
+
ref: $,
|
|
404
|
+
class: M(["relative flex items-end", {
|
|
405
|
+
rootClass: e.rootClass,
|
|
406
|
+
"z-30": g.value,
|
|
407
|
+
"cursor-text": !e.disabled
|
|
408
|
+
}]),
|
|
409
|
+
role: "combobox",
|
|
410
|
+
"aria-expanded": g.value,
|
|
411
|
+
"aria-haspopup": !0,
|
|
412
|
+
"aria-controls": I(re),
|
|
413
|
+
onKeydown: Ce,
|
|
414
|
+
onClick: Me
|
|
415
|
+
}, [
|
|
416
|
+
P(I(We), {
|
|
417
|
+
modelValue: I(d),
|
|
418
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => Le(d) ? d.value = r : null),
|
|
419
|
+
readonly: e.isInputReadOnly,
|
|
420
|
+
required: e.required,
|
|
421
|
+
label: e.label,
|
|
422
|
+
name: e.name,
|
|
423
|
+
form: e.form,
|
|
424
|
+
"label-screen-reader-only": e.labelScreenReaderOnly,
|
|
425
|
+
placeholder: ke.value,
|
|
426
|
+
class: M(["grow !outline-none", { "cursor-default": e.isInputReadOnly }]),
|
|
427
|
+
"wrapper-class": {
|
|
428
|
+
"border-transparent border-b-gray-200 focus-within:border-b relative z-10": g.value
|
|
429
|
+
},
|
|
430
|
+
"input-class": !g.value && (!f.value && I(s) || f.value && !I(Ge)(e.multiModelValue)) ? "placeholder:text-default" : "",
|
|
431
|
+
"suffix-class": "border-l-0 pl-0",
|
|
432
|
+
disabled: e.disabled,
|
|
433
|
+
size: e.size,
|
|
434
|
+
error: e.error,
|
|
435
|
+
"prefix-has-border": !1,
|
|
436
|
+
"aria-autocomplete": "list",
|
|
437
|
+
onFocus: i[1] || (i[1] = () => g.value = !0),
|
|
438
|
+
onBlur: i[2] || (i[2] = (r) => t.$emit("blur"))
|
|
439
|
+
}, De({
|
|
440
|
+
"label-suffix": k(() => [
|
|
441
|
+
T(t.$slots, "label-suffix")
|
|
442
|
+
]),
|
|
443
|
+
suffix: k(() => {
|
|
444
|
+
var r, L;
|
|
445
|
+
return [
|
|
446
|
+
y("div", St, [
|
|
447
|
+
!g.value && !f.value && ((r = x.value) != null && r.labelInlineComponent) && (!e.showSuffixInClosedInput || e.showSuffixLabelInInput) ? (u(), b(D(x.value.labelInlineComponent.component), z(N({ key: 0 }, x.value.labelInlineComponent.props)), null, 16)) : v("", !0),
|
|
448
|
+
!g.value && !f.value && ((L = x.value) != null && L.labelSuffixComponent) && e.showSuffixInClosedInput ? (u(), b(D(x.value.labelSuffixComponent.component), z(N({ key: 1 }, x.value.labelSuffixComponent.props)), null, 16)) : v("", !0),
|
|
449
|
+
!e.disabled && (I(d) || se.value && e.hasReset) ? (u(), b(je, {
|
|
450
|
+
key: 2,
|
|
451
|
+
icon: "close",
|
|
452
|
+
size: "xs",
|
|
453
|
+
intent: "subtle",
|
|
454
|
+
type: "button",
|
|
455
|
+
onClick: ie
|
|
456
|
+
})) : v("", !0),
|
|
457
|
+
P(Qe, {
|
|
458
|
+
icon: "keyboard_arrow_down",
|
|
459
|
+
size: "xs",
|
|
460
|
+
class: M(["transition-transform", { "rotate-180": g.value }])
|
|
461
|
+
}, null, 8, ["class"])
|
|
462
|
+
])
|
|
463
|
+
];
|
|
464
|
+
}),
|
|
465
|
+
_: 2
|
|
466
|
+
}, [
|
|
467
|
+
e.showSubLabelInInput && ((p = x.value) != null && p.subLabel) ? {
|
|
468
|
+
name: "input",
|
|
469
|
+
fn: k(() => [
|
|
470
|
+
y("div", {
|
|
471
|
+
class: M(["pointer-events-none absolute inset-0 bg-white", { "px-4 py-3": e.size === "xl" }])
|
|
472
|
+
}, [
|
|
473
|
+
P(G, {
|
|
474
|
+
tag: "span",
|
|
475
|
+
class: "block",
|
|
476
|
+
variant: "body-sm",
|
|
477
|
+
weight: "semibold"
|
|
478
|
+
}, {
|
|
479
|
+
default: k(() => {
|
|
480
|
+
var r;
|
|
481
|
+
return [
|
|
482
|
+
F(q((r = x.value) == null ? void 0 : r.label), 1)
|
|
483
|
+
];
|
|
484
|
+
}),
|
|
485
|
+
_: 1
|
|
486
|
+
}),
|
|
487
|
+
P(G, {
|
|
488
|
+
tag: "span",
|
|
489
|
+
class: "block",
|
|
490
|
+
variant: "body-xs",
|
|
491
|
+
color: "secondary"
|
|
492
|
+
}, {
|
|
493
|
+
default: k(() => {
|
|
494
|
+
var r;
|
|
495
|
+
return [
|
|
496
|
+
F(q((r = x.value) == null ? void 0 : r.subLabel), 1)
|
|
497
|
+
];
|
|
498
|
+
}),
|
|
499
|
+
_: 1
|
|
500
|
+
})
|
|
501
|
+
], 2)
|
|
502
|
+
]),
|
|
503
|
+
key: "0"
|
|
504
|
+
} : void 0,
|
|
505
|
+
t.$slots.tooltip ? {
|
|
506
|
+
name: "tooltip",
|
|
507
|
+
fn: k(() => [
|
|
508
|
+
T(t.$slots, "tooltip")
|
|
509
|
+
]),
|
|
510
|
+
key: "1"
|
|
511
|
+
} : void 0,
|
|
512
|
+
ae.value || t.$slots.prefix ? {
|
|
513
|
+
name: "prefix",
|
|
514
|
+
fn: k(() => {
|
|
515
|
+
var r;
|
|
516
|
+
return [
|
|
517
|
+
y("div", Ct, [
|
|
518
|
+
t.$slots.prefix ? T(t.$slots, "prefix", {}, void 0, void 0, 0) : ae.value && ((r = x.value) != null && r.labelPrefixComponent) ? (u(), C("div", wt, [
|
|
519
|
+
(u(), b(D(x.value.labelPrefixComponent.component), z(Pe(x.value.labelPrefixComponent.props)), null, 16))
|
|
520
|
+
])) : v("", !0)
|
|
521
|
+
])
|
|
522
|
+
];
|
|
523
|
+
}),
|
|
524
|
+
key: "2"
|
|
525
|
+
} : void 0,
|
|
526
|
+
t.$slots.helper ? {
|
|
527
|
+
name: "helper",
|
|
528
|
+
fn: k(() => [
|
|
529
|
+
T(t.$slots, "helper")
|
|
530
|
+
]),
|
|
531
|
+
key: "3"
|
|
532
|
+
} : void 0
|
|
533
|
+
]), 1032, ["modelValue", "readonly", "required", "label", "name", "form", "label-screen-reader-only", "placeholder", "wrapper-class", "input-class", "class", "disabled", "size", "error"])
|
|
534
|
+
], 42, kt),
|
|
535
|
+
e.withChips ? (u(), C("div", It, [
|
|
536
|
+
(u(!0), C(Q, null, be(fe.value, ({ value: r, label: L, disabled: O }) => (u(), b(He, {
|
|
537
|
+
key: r,
|
|
538
|
+
removable: !e.disabled && !O,
|
|
539
|
+
onRemoved: (Z) => oe({ value: r, checked: !1 })
|
|
540
|
+
}, {
|
|
541
|
+
default: k(() => [
|
|
542
|
+
y("span", { innerHTML: L }, null, 8, Mt)
|
|
543
|
+
]),
|
|
544
|
+
_: 2
|
|
545
|
+
}, 1032, ["removable", "onRemoved"]))), 128))
|
|
546
|
+
])) : v("", !0),
|
|
547
|
+
I(W) && I(H) ? (u(), b(Ae, {
|
|
548
|
+
key: 1,
|
|
549
|
+
to: I(H)
|
|
550
|
+
}, [
|
|
551
|
+
g.value && !e.disabled ? (u(), C("div", {
|
|
552
|
+
key: 0,
|
|
553
|
+
id: I(re),
|
|
554
|
+
ref_key: "optionsRef",
|
|
555
|
+
ref: A,
|
|
556
|
+
role: "listbox",
|
|
557
|
+
style: me(I(Se)),
|
|
558
|
+
class: "z-70 rounded bg-white drop-shadow-md",
|
|
559
|
+
onMouseenter: i[3] || (i[3] = (r) => g.value = !0),
|
|
560
|
+
onKeydown: we
|
|
561
|
+
}, [
|
|
562
|
+
y("div", {
|
|
563
|
+
class: "rounded pt-0",
|
|
564
|
+
style: me({ width: `${I(Ie)}px` })
|
|
565
|
+
}, [
|
|
566
|
+
P(xt, {
|
|
567
|
+
options: ce.value,
|
|
568
|
+
multiple: f.value,
|
|
569
|
+
model: w.value,
|
|
570
|
+
"add-only": e.addOnly,
|
|
571
|
+
"allows-multiple-values": !!f.value,
|
|
572
|
+
condensed: e.condensed,
|
|
573
|
+
"has-large-dropdown": e.hasLargeDropdown,
|
|
574
|
+
"input-value": I(d),
|
|
575
|
+
onValueChanged: oe
|
|
576
|
+
}, {
|
|
577
|
+
"list-footer-content": k(() => [
|
|
578
|
+
ge ? (u(), b(ee, {
|
|
579
|
+
key: 0,
|
|
580
|
+
intent: "subtle",
|
|
581
|
+
class: "w-full",
|
|
582
|
+
type: "button",
|
|
583
|
+
"icon-prefix": "add",
|
|
584
|
+
onClick: xe
|
|
585
|
+
}, {
|
|
586
|
+
default: k(() => [
|
|
587
|
+
F(q(e.textContent.buttonAddLabel), 1)
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
})) : v("", !0),
|
|
591
|
+
f.value ? (u(), C("div", {
|
|
592
|
+
key: 1,
|
|
593
|
+
class: M(["flex items-center justify-between", { "py-2": !t.$slots["list-footer-content"] }])
|
|
594
|
+
}, [
|
|
595
|
+
se.value ? (u(), b(ee, {
|
|
596
|
+
key: 0,
|
|
597
|
+
type: "button",
|
|
598
|
+
intent: "subtle",
|
|
599
|
+
size: "sm",
|
|
600
|
+
class: "ml-2",
|
|
601
|
+
onClick: ie
|
|
602
|
+
}, {
|
|
603
|
+
default: k(() => [
|
|
604
|
+
F(q(e.textContent.buttonClearLabel), 1)
|
|
605
|
+
]),
|
|
606
|
+
_: 1
|
|
607
|
+
})) : v("", !0),
|
|
608
|
+
y("div", null, [
|
|
609
|
+
T(t.$slots, "list-footer-content")
|
|
610
|
+
]),
|
|
611
|
+
P(ee, {
|
|
612
|
+
type: "button",
|
|
613
|
+
size: "sm",
|
|
614
|
+
class: "mr-2",
|
|
615
|
+
"data-testid": I(tt),
|
|
616
|
+
onClick: R
|
|
617
|
+
}, {
|
|
618
|
+
default: k(() => [
|
|
619
|
+
F(q(e.textContent.buttonDoneLabel), 1)
|
|
620
|
+
]),
|
|
621
|
+
_: 1
|
|
622
|
+
}, 8, ["data-testid"])
|
|
623
|
+
], 2)) : T(t.$slots, "list-footer-content", {}, void 0, void 0, 2)
|
|
624
|
+
]),
|
|
625
|
+
_: 3
|
|
626
|
+
}, 8, ["options", "multiple", "model", "add-only", "allows-multiple-values", "condensed", "has-large-dropdown", "input-value"])
|
|
627
|
+
], 4)
|
|
628
|
+
], 44, Et)) : v("", !0)
|
|
629
|
+
], 8, ["to"])) : v("", !0)
|
|
630
|
+
], 64);
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
}), Yt = $t, ve = (e) => (e ?? []).flatMap(
|
|
634
|
+
(l) => l.configs ?? []
|
|
635
|
+
), pe = (e) => [
|
|
636
|
+
...e.configs ?? [],
|
|
637
|
+
...ve(e.billing_period_configs),
|
|
638
|
+
...(e.pricing_currency_configs ?? []).flatMap((l) => [
|
|
639
|
+
...l.configs ?? [],
|
|
640
|
+
...ve(l.billing_period_configs)
|
|
641
|
+
])
|
|
642
|
+
];
|
|
643
|
+
function Gt({
|
|
644
|
+
pricings: e,
|
|
645
|
+
pricingItemConfigId: l
|
|
646
|
+
}) {
|
|
647
|
+
var a, d;
|
|
648
|
+
const o = e.flatMap((s) => s.items ?? []).find((s) => {
|
|
649
|
+
var m;
|
|
650
|
+
return (m = s.configs) == null ? void 0 : m.some((h) => h.id === l);
|
|
651
|
+
}), n = (a = o == null ? void 0 : o.configs) == null ? void 0 : a.find((s) => s.id === l), c = (d = o == null ? void 0 : o.product_items) == null ? void 0 : d[0];
|
|
652
|
+
return {
|
|
653
|
+
config: n,
|
|
654
|
+
productItem: c
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
const le = "1", ye = {
|
|
658
|
+
seats: { schedule: "seats_values", planDefault: "default_seats_value" },
|
|
659
|
+
units: { schedule: "units", planDefault: "default_units" }
|
|
660
|
+
};
|
|
661
|
+
function Wt(e, l) {
|
|
662
|
+
var d;
|
|
663
|
+
const o = ye[e], n = (d = l == null ? void 0 : l.pricing_plan_schedule) == null ? void 0 : d[o.schedule];
|
|
664
|
+
if (!l || !(n != null && n.length))
|
|
665
|
+
return;
|
|
666
|
+
const c = l.pricing_plan_version ? Xe(l).flatMap((s) => s.items ?? []).flatMap(pe) : [], a = new Map(
|
|
667
|
+
c.flatMap((s) => {
|
|
668
|
+
var h;
|
|
669
|
+
const m = (h = s[o.planDefault]) == null ? void 0 : h.number;
|
|
670
|
+
return m ? [[s.id, m]] : [];
|
|
671
|
+
})
|
|
672
|
+
);
|
|
673
|
+
return n.map(({ pricing_item_config_id: s, number: m }) => ({
|
|
674
|
+
pricing_item_config_id: s,
|
|
675
|
+
number: m || a.get(s) || le
|
|
676
|
+
}));
|
|
677
|
+
}
|
|
678
|
+
function Ot(e, l) {
|
|
679
|
+
var n, c, a;
|
|
680
|
+
const o = (c = (n = e.product_items) == null ? void 0 : n[0]) == null ? void 0 : c.model_type;
|
|
681
|
+
if (o === "PER_SEAT") return "seats";
|
|
682
|
+
if (o === "ONE_OFF" && ((a = l == null ? void 0 : l.details) == null ? void 0 : a.pricing_type) === "FLAT") return "units";
|
|
683
|
+
}
|
|
684
|
+
function j(e, l) {
|
|
685
|
+
return (e.items ?? []).flatMap((o) => (l ? [Je({ pricingItem: o, ...l })] : pe(o)).flatMap((c) => {
|
|
686
|
+
var d;
|
|
687
|
+
const a = Ot(o, c);
|
|
688
|
+
return c && a ? [
|
|
689
|
+
{
|
|
690
|
+
kind: a,
|
|
691
|
+
id: c.id,
|
|
692
|
+
defaultNumber: Number((d = c[ye[a].planDefault]) == null ? void 0 : d.number)
|
|
693
|
+
}
|
|
694
|
+
] : [];
|
|
695
|
+
}));
|
|
696
|
+
}
|
|
697
|
+
const ne = (e) => e.some(({ kind: l }) => l === "seats") ? "seats" : "units";
|
|
698
|
+
function Jt(e, l = []) {
|
|
699
|
+
const o = e.pricing_plan_schedule_infos.filter(
|
|
700
|
+
(a) => a.pricing_plan_version
|
|
701
|
+
), n = new Set(l.map((a) => a.pricing_item_config_id));
|
|
702
|
+
return [
|
|
703
|
+
...Ze(o).filter(
|
|
704
|
+
(a) => a.product_type === "ADDON"
|
|
705
|
+
),
|
|
706
|
+
..._e({
|
|
707
|
+
...e,
|
|
708
|
+
pricing_plan_schedule_infos: o
|
|
709
|
+
}).filter(
|
|
710
|
+
(a) => a.product_type === "ADDON" && a.selection_constraint === "ANY"
|
|
711
|
+
).flatMap((a) => a.pricings ?? [])
|
|
712
|
+
].filter((a) => {
|
|
713
|
+
const d = j(a);
|
|
714
|
+
return d.length > 0 && !d.some(({ id: s }) => n.has(s));
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
function Lt(e) {
|
|
718
|
+
return new Set(e.flatMap((l) => j(l).map(({ id: o }) => o)));
|
|
719
|
+
}
|
|
720
|
+
function Xt(e, l = {}) {
|
|
721
|
+
const o = j(e, l), n = ne(o), c = o.filter((a) => a.kind === n && a.defaultNumber > 0).map(({ defaultNumber: a }) => a);
|
|
722
|
+
return Math.max(Number(le), ...c);
|
|
723
|
+
}
|
|
724
|
+
function Zt(e, l) {
|
|
725
|
+
if (!l.enabledPricingIds.includes(e.id)) return 0;
|
|
726
|
+
const o = j(e), n = ne(o), c = new Set(o.filter((d) => d.kind === n).map(({ id: d }) => d)), a = l[`${n}Values`].find(
|
|
727
|
+
({ pricing_item_config_id: d }) => c.has(d)
|
|
728
|
+
);
|
|
729
|
+
return Number(a == null ? void 0 : a.number) || void 0;
|
|
730
|
+
}
|
|
731
|
+
function _t(e, l, o, n = {}) {
|
|
732
|
+
const c = Lt([e]), a = l > 0 ? j(e, n) : [], d = ne(a), s = (h, E) => [
|
|
733
|
+
...h.filter(({ pricing_item_config_id: f }) => !c.has(f)),
|
|
734
|
+
...a.filter((f) => f.kind === E).map(({ id: f, defaultNumber: w }) => ({
|
|
735
|
+
pricing_item_config_id: f,
|
|
736
|
+
number: String(
|
|
737
|
+
E === d ? l : w > 0 ? w : le
|
|
738
|
+
)
|
|
739
|
+
}))
|
|
740
|
+
], m = o.enabledPricingIds.filter((h) => h !== e.id);
|
|
741
|
+
return {
|
|
742
|
+
enabledPricingIds: l <= 0 ? m : o.enabledPricingIds.includes(e.id) ? o.enabledPricingIds : [...m, e.id],
|
|
743
|
+
seatsValues: s(o.seatsValues, "seats"),
|
|
744
|
+
unitsValues: s(o.unitsValues, "units")
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
export {
|
|
748
|
+
le as F,
|
|
749
|
+
Yt as S,
|
|
750
|
+
Gt as a,
|
|
751
|
+
Xt as b,
|
|
752
|
+
Zt as c,
|
|
753
|
+
Jt as d,
|
|
754
|
+
Lt as e,
|
|
755
|
+
Wt as f,
|
|
756
|
+
Ot as g,
|
|
757
|
+
_t as s
|
|
758
|
+
};
|