@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.
Files changed (127) hide show
  1. package/README.md +12 -2
  2. package/dist/{Alert.vue.es-CNrEaLvh.mjs → Alert.vue.es-ZPG49yR_.mjs} +1 -1
  3. package/dist/{AuthProvider.handle-DKfNs8rr.mjs → AuthProvider.handle-SRR_04XS.mjs} +1 -1
  4. package/dist/{Avatar.vue.es-r0NbcIib.mjs → Avatar.vue.es-geDQsZwu.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs} +4 -4
  6. package/dist/{Button.vue.es-Zw--kuaU.mjs → Button.vue.es-j7iYlqtJ.mjs} +1 -1
  7. package/dist/{ChargeOnDemandModal-B8FDkS9U.mjs → ChargeOnDemandModal-CR01PkP_.mjs} +14 -14
  8. package/dist/{Checkout.entry.ce-DsGl-5aR.mjs → Checkout.entry.ce-CopWuLJC.mjs} +1784 -1817
  9. 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
  10. package/dist/{Chip.vue.es-D3UDSyXC.mjs → Chip.vue.es-Dxx_0dte.mjs} +2 -2
  11. package/dist/{ContextMenu.vue.es-B9mFpUQK.mjs → ContextMenu.vue.es-BJO4U47Q.mjs} +5 -5
  12. package/dist/{CustomerBillingInformation.vue.es-B8NiQaJs.mjs → CustomerBillingInformation.vue.es-CmNpqcBw.mjs} +2 -2
  13. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs} +5 -5
  14. package/dist/{CustomerShippingAddresses-Bj8Y17O8.mjs → CustomerShippingAddresses-BRPukhRI.mjs} +8 -8
  15. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs} +434 -425
  16. package/dist/{DividerText.vue.es-CNbgif-3.mjs → DividerText.vue.es-BusbyeAI.mjs} +1 -1
  17. 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
  18. package/dist/{ErrorNotification.vue.es-DNd65mQq.mjs → ErrorNotification.vue.es-F068p7PY.mjs} +2 -2
  19. package/dist/{FormMessage.vue.es-Cjv358Ab.mjs → FormMessage.vue.es-CwMQpIAW.mjs} +1 -1
  20. package/dist/{IconButton.vue.es-C8lYFx5_.mjs → IconButton.vue.es-D8DtBW9i.mjs} +2 -2
  21. package/dist/{IconTitle.vue.es-O2kcqgKm.mjs → IconTitle.vue.es-6VJtjJX2.mjs} +3 -3
  22. package/dist/{Input.vue.es-D8Oj8MWv.mjs → Input.vue.es-BLyHcmu4.mjs} +4 -4
  23. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs} +2 -2
  24. 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
  25. package/dist/{InvoicePreview.vue.es-4Q2hzaFS.mjs → InvoicePreview.vue.es-Cpf66_xV.mjs} +4 -4
  26. package/dist/{InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs → InvoicePricingClauseChip.vue.es-CDrAE901.mjs} +3 -3
  27. package/dist/{Label.vue.es-DtpLM1KH.mjs → Label.vue.es-es7ZUBSP.mjs} +3 -3
  28. package/dist/{Modal.vue.es-C8ZcO117.mjs → Modal.vue.es-eeR9FmvQ.mjs} +6 -6
  29. 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
  30. package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs} +2 -2
  31. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs} +4 -4
  32. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs} +3 -3
  33. package/dist/{PaymentHistoryBlock-BvY2nXGV.mjs → PaymentHistoryBlock-CN42ewCn.mjs} +1 -1
  34. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs} +4 -4
  35. package/dist/{PaymentIntegrationForm-CcfQSzKM.mjs → PaymentIntegrationForm-D3Ye7LZ5.mjs} +1 -1
  36. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs} +5 -5
  37. package/dist/{PaymentIntegrationFormAdyen-DqgDfO6K.mjs → PaymentIntegrationFormAdyen-Fm-diCCO.mjs} +39 -38
  38. package/dist/{PaymentIntegrationFormStripe-BYdAkvLt.mjs → PaymentIntegrationFormStripe-BANBL6za.mjs} +14 -13
  39. package/dist/{PaymentMethod.vue.es-b0p3a0L-.mjs → PaymentMethod.vue.es-t3-VyoE8.mjs} +4 -4
  40. package/dist/{PaymentMethodForm-BsTrTwCg.mjs → PaymentMethodForm-CqP3GoNj.mjs} +1 -1
  41. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs} +6 -6
  42. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs} +6 -6
  43. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs} +7 -7
  44. package/dist/PlanCustomizationEditor-B76UNEMm.mjs +791 -0
  45. package/dist/{PortalLinkUnverified-B_EE2wTJ.mjs → PortalLinkUnverified-Cp60_kRJ.mjs} +3 -3
  46. package/dist/{PortalNotAvailable-DPE9y37H.mjs → PortalNotAvailable-DzSQnfzw.mjs} +2 -2
  47. package/dist/{PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs → PricingGroupRangeInput.vue.es-Srq_3cga.mjs} +156 -206
  48. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs +177 -0
  49. package/dist/{RadioGroupExtended.vue.es-3nDXqIGi.mjs → RadioGroupExtended.vue.es-BbBMDf6l.mjs} +5 -5
  50. package/dist/{Section.vue.es-CvX9tg2f.mjs → Section.vue.es-Oqn1wGPZ.mjs} +1 -1
  51. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs} +2 -2
  52. package/dist/{ShippingAddressesModal-C4p1IXXk.mjs → ShippingAddressesModal-c7nqf4Ny.mjs} +10 -10
  53. package/dist/StepInput.vue.es-ieh4EuJ7.mjs +213 -0
  54. package/dist/{SubscriptionDetails.entry.ce-D5SwM0YS.mjs → SubscriptionDetails.entry.ce-uYv45FGH.mjs} +91 -92
  55. package/dist/{SubscriptionSchedules-BZqlpAtk.mjs → SubscriptionSchedules-DMxX3GpK.mjs} +1 -1
  56. 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
  57. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs} +4 -4
  58. 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
  59. package/dist/{TooltipParagraph.vue.es-Dw0ndjle.mjs → TooltipParagraph.vue.es-BES3zsYN.mjs} +1 -1
  60. package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs} +1 -1
  61. package/dist/{TrialChip.vue.es-DOopmaXA.mjs → TrialChip.vue.es-C51z1ZiA.mjs} +2 -2
  62. package/dist/addonQuantity-CCVaA3e-.mjs +758 -0
  63. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  64. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +8 -8
  65. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  66. package/dist/components/Invoice/Invoice.mjs +14 -14
  67. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  68. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  69. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  70. package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
  71. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  72. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  73. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  74. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  75. package/dist/core/index.mjs +1 -1
  76. package/dist/{customElements-BTj4ii4f.mjs → customElements-DK4GKNJG.mjs} +10 -10
  77. package/dist/{customer-BIjC0CWJ.mjs → customer-lf6S5DBR.mjs} +1 -1
  78. package/dist/{de-DE-DBbERiFr.mjs → de-DE-Cyj_NtiI.mjs} +4 -0
  79. package/dist/{fr-FR-IWJE-urI.mjs → fr-FR-CRFoWQ7J.mjs} +4 -0
  80. package/dist/{index.es-C7J3WGGo.mjs → index.es-BrVTOW5D.mjs} +4 -4
  81. package/dist/index.mjs +2 -2
  82. package/dist/{invoices-e1sKLgxg.mjs → invoices-DdREPDXV.mjs} +1 -1
  83. package/dist/{it-IT-B7ui2oxO.mjs → it-IT-DObZEc-U.mjs} +4 -0
  84. package/dist/{nl-NL-Bafh2xoT.mjs → nl-NL-C02xHilF.mjs} +4 -0
  85. package/dist/paymentFailure-QZdZHBhf.mjs +47 -0
  86. package/dist/{paymentMethods-B_82JGk_.mjs → paymentMethods-8w-ccfY_.mjs} +1 -1
  87. package/dist/{paymentMethods-Nfv9HdkS.mjs → paymentMethods-Goa25rTs.mjs} +2 -2
  88. package/dist/paymentOutcome-B6sW1eCV.mjs +22 -0
  89. package/dist/{payments-BnxbzQUC.mjs → payments-CKpU1K3t.mjs} +1 -1
  90. package/dist/{pricing-BOhvWWMj.mjs → pricing-CEaZGgKe.mjs} +1 -1
  91. package/dist/pricingItem.es-bCPArbTa.mjs +55 -0
  92. package/dist/{pricingPlanScheduleOverrides-Dxv5FOBd.mjs → pricingPlanScheduleOverrides-BBp-DmpV.mjs} +2 -2
  93. package/dist/{pricingPlanSchedules-Dv7ZCgNp.mjs → pricingPlanSchedules-DSMptcAh.mjs} +1 -1
  94. package/dist/screens/Checkout/Checkout.mjs +2 -2
  95. package/dist/screens/CustomerOverview/CustomerOverview.mjs +13 -13
  96. package/dist/screens/PayInvoice/PayInvoice.mjs +33 -32
  97. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
  98. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  99. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +172 -163
  100. package/dist/{sorting.es-CVyKw23D.mjs → sorting.es-C0pdMgX0.mjs} +1 -1
  101. package/dist/subscription-BwzkagDI.mjs +212 -0
  102. package/dist/{subscriptions-BWXZGK0E.mjs → subscriptions-B5bH8hsI.mjs} +1 -1
  103. package/dist/{taxId.es-DkD3Ltr8.mjs → taxId.es-e6NEvprh.mjs} +2 -2
  104. package/dist/types/public/core/configuration.d.ts +0 -1
  105. package/dist/types/public/core/types.d.ts +10 -5
  106. package/dist/{useActionDispatchProvider-3W2vEyIg.mjs → useActionDispatchProvider-ChAHdwR8.mjs} +1 -1
  107. package/dist/{useCustomer-cObBvDOu.mjs → useCustomer-CTMhg1nd.mjs} +2 -2
  108. package/dist/{useCustomerFormLabels-DJWf2O17.mjs → useCustomerFormLabels-D4oDnfxA.mjs} +9 -9
  109. package/dist/{useIncrementalLoading-CATuO36d.mjs → useIncrementalLoading-CBVutPH8.mjs} +1 -1
  110. package/dist/{useInvoiceData-DD44HTl7.mjs → useInvoiceData-qUGbBAQK.mjs} +2 -2
  111. package/dist/{useInvoicesList-CpB-41MQ.mjs → useInvoicesList-wJvZAJpW.mjs} +9 -9
  112. package/dist/{useLoadInitialData-qzdnBoui.mjs → useLoadInitialData-UvfYXgbi.mjs} +1 -1
  113. package/dist/{usePaymentFormHold-ByUZi3A-.mjs → usePaymentFormHold-Cwdr-vyc.mjs} +2 -2
  114. package/dist/{usePaymentMethodAvailability-DUdrs0Ji.mjs → usePaymentMethodAvailability-35l4pWdH.mjs} +4 -4
  115. package/dist/{usePaymentMethods-ByaKF7mf.mjs → usePaymentMethods-De7hlLHo.mjs} +2 -2
  116. package/dist/{usePayments-BXABv-lF.mjs → usePayments-hWS7fnOx.mjs} +9 -9
  117. package/dist/{usePortal-CwR_FxTb.mjs → usePortal-DUfD6hrA.mjs} +1 -1
  118. package/dist/{useService-BZcbUZHI.mjs → useService-BwzIBIRp.mjs} +1 -1
  119. package/dist/{useTimePeriod.es-BpdiVwg8.mjs → useTimePeriod.es-BUorDLVK.mjs} +1 -1
  120. package/package.json +4 -4
  121. package/dist/PlanCustomizationEditor-D29N4HUM.mjs +0 -711
  122. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs +0 -141
  123. package/dist/StepInput.vue.es-DweyzpkL.mjs +0 -200
  124. package/dist/index.es-CpmQmvOg.mjs +0 -633
  125. package/dist/paymentOutcome-BXEU5-84.mjs +0 -67
  126. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +0 -132
  127. package/dist/subscription-BhxoqwcT.mjs +0 -83
@@ -1,141 +0,0 @@
1
- import { defineComponent as O, openBlock as c, createElementBlock as x, createElementVNode as g, createVNode as f, unref as s, withCtx as _, renderSlot as P, useModel as I, toRef as b, computed as d, createBlock as m, createTextVNode as N, toDisplayString as h, mergeModels as k } from "vue";
2
- import { u as E, _ as T } from "./PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs";
3
- import { _ as A } from "./RadioGroupExtended.vue.es-3nDXqIGi.mjs";
4
- import { _ as U } from "./Section.vue.es-CvX9tg2f.mjs";
5
- import { S as G } from "./index.es-CpmQmvOg.mjs";
6
- import { d as S, a as R } from "./customElements-BTj4ii4f.mjs";
7
- import { g as B } from "./pricing-BOhvWWMj.mjs";
8
- import { u as C } from "./useViewport-psZejz_H.mjs";
9
- const D = { class: "flex gap-4 border-l-2 border-primary-600 px-2" }, F = { class: "grow" }, H = /* @__PURE__ */ O({
10
- __name: "PricingGroupTitle",
11
- setup(r) {
12
- return (t, l) => (c(), x("div", D, [
13
- g("div", F, [
14
- f(s(S), {
15
- tag: "span",
16
- variant: "body-sm",
17
- weight: "semibold"
18
- }, {
19
- default: _(() => [
20
- P(t.$slots, "title")
21
- ]),
22
- _: 3
23
- })
24
- ]),
25
- g("div", null, [
26
- f(s(S), {
27
- tag: "span",
28
- variant: "body-xs",
29
- color: "subtle"
30
- }, {
31
- default: _(() => [
32
- P(t.$slots, "description")
33
- ]),
34
- _: 3
35
- })
36
- ])
37
- ]));
38
- }
39
- });
40
- function W({
41
- currency: r,
42
- billingPeriod: t
43
- }) {
44
- const { $t: l } = R(), { renderPricingForPricingItem: v } = E({ currency: r, billingPeriod: t });
45
- return { describePricing: (p) => {
46
- var a;
47
- const o = (a = p.items) == null ? void 0 : a[0];
48
- return o ? v({ pricingItem: o }) : l({
49
- defaultMessage: "Unsupported pricing",
50
- id: "pricing_item_pricing.unsupported_pricing_error",
51
- description: "Text displayed when the pricing item pricing is unsupported"
52
- });
53
- } };
54
- }
55
- const X = { class: "p-1" }, j = { class: "pt-1" }, M = 3, q = 6, ie = /* @__PURE__ */ O({
56
- __name: "PricingGroupSingleEditor",
57
- props: /* @__PURE__ */ k({
58
- modelValue: { type: Array },
59
- pricings: { type: Array },
60
- billingPeriod: { type: Object },
61
- currency: { type: String },
62
- groupName: { type: String }
63
- }, {
64
- modelValue: {
65
- required: !0
66
- },
67
- modelModifiers: {}
68
- }),
69
- emits: ["update:modelValue"],
70
- setup(r) {
71
- const t = r, l = I(r, "modelValue"), { describePricing: v } = W({
72
- currency: b(t, "currency"),
73
- billingPeriod: b(t, "billingPeriod")
74
- }), { isMobileViewport: y } = C(), p = d(() => t.pricings.map((e) => e.id)), o = d({
75
- get: () => l.value.find((e) => p.value.includes(e)) ?? void 0,
76
- set: (e) => {
77
- const i = l.value.filter((n) => !p.value.includes(n));
78
- l.value = e ? [...i, e] : i;
79
- }
80
- }), a = d({
81
- get: () => o.value,
82
- set: (e) => {
83
- o.value = typeof e == "string" ? e : void 0;
84
- }
85
- }), V = d({
86
- get: () => o.value,
87
- set: (e) => {
88
- o.value = e ?? void 0;
89
- }
90
- }), u = d(() => t.pricings.map((e) => ({
91
- label: B(e) ?? "",
92
- value: e.id,
93
- description: v(e)
94
- }))), $ = () => u.value.slice(0, M), w = () => u.value.map(({ value: e, label: i, description: n }) => ({
95
- label: i,
96
- subLabel: n,
97
- value: e
98
- }));
99
- return (e, i) => (c(), m(s(U), { "no-spacing": "" }, {
100
- default: _(() => [
101
- g("div", X, [
102
- f(H, null, {
103
- title: _(() => [
104
- N(h(r.groupName), 1)
105
- ]),
106
- _: 1
107
- }),
108
- g("div", j, [
109
- u.value.length <= M ? (c(), m(s(A), {
110
- key: 0,
111
- modelValue: a.value,
112
- "onUpdate:modelValue": i[0] || (i[0] = (n) => a.value = n),
113
- options: $(),
114
- direction: s(y) ? "column" : "row",
115
- "show-radio": !1
116
- }, null, 8, ["modelValue", "options", "direction"])) : u.value.length <= q ? (c(), m(s(G), {
117
- key: 1,
118
- "single-model-value": V.value,
119
- "onUpdate:singleModelValue": i[1] || (i[1] = (n) => V.value = n),
120
- options: w(),
121
- size: "xl",
122
- "show-sub-label-in-input": ""
123
- }, null, 8, ["single-model-value", "options"])) : (c(), m(s(T), {
124
- key: 2,
125
- modelValue: o.value,
126
- "onUpdate:modelValue": i[2] || (i[2] = (n) => o.value = n),
127
- options: u.value,
128
- name: `pricing-group-range-input-${r.groupName}`
129
- }, null, 8, ["modelValue", "options", "name"]))
130
- ])
131
- ])
132
- ]),
133
- _: 1
134
- }));
135
- }
136
- });
137
- export {
138
- ie as _,
139
- H as a,
140
- W as u
141
- };
@@ -1,200 +0,0 @@
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-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
- const G = /* @__PURE__ */ V({
7
- __name: "DeltaChip",
8
- props: {
9
- oldValue: {},
10
- newValue: {},
11
- intent: { default: "neutral" },
12
- color: {},
13
- content: {},
14
- removable: { type: Boolean },
15
- size: {},
16
- variant: {},
17
- textClass: {},
18
- tag: {},
19
- hasChipBefore: { type: Boolean },
20
- hasChipAfter: { type: Boolean }
21
- },
22
- setup(e) {
23
- const t = E(e, ["oldValue", "newValue", "intent"]), a = d(() => {
24
- const o = e.newValue - e.oldValue;
25
- return `${o >= 0 ? "+" : ""}${o}`;
26
- });
27
- return (o, f) => (c(), m(I(L), S(t, {
28
- intent: e.intent,
29
- class: "pointer-events-none select-none"
30
- }), {
31
- default: u(() => [
32
- N(w(a.value), 1)
33
- ]),
34
- _: 1
35
- }, 16, ["intent"]));
36
- }
37
- }), J = { class: "flex items-center gap-1.5" }, Y = /* @__PURE__ */ V({
38
- __name: "StepInput",
39
- props: /* @__PURE__ */ F({
40
- step: { default: 1 },
41
- min: { default: 0 },
42
- max: {},
43
- initialValue: { default: 1 },
44
- unitName: {},
45
- showDelta: { type: Boolean, default: !1 },
46
- size: { default: "md" },
47
- name: {},
48
- required: { type: Boolean },
49
- label: {},
50
- error: {},
51
- disabled: { type: Boolean, default: !1 }
52
- }, {
53
- modelValue: { required: !0 },
54
- modelModifiers: {}
55
- }),
56
- emits: ["update:modelValue"],
57
- setup(e) {
58
- const t = e, a = D(e, "modelValue"), o = q(null), f = d(() => {
59
- if (t.unitName)
60
- return t.unitName[a.value === 1 ? "singular" : "plural"];
61
- }), $ = () => {
62
- t.max && a.value + t.step > t.max || (a.value += t.step);
63
- }, B = () => {
64
- a.value - t.step < t.min || (a.value -= t.step);
65
- };
66
- function p(l) {
67
- var n;
68
- const s = (n = o.value) == null ? void 0 : n.el;
69
- if (!s) return;
70
- const i = parseInt(`${l}`);
71
- a.value = i, s.innerText = `${i}`, s.focus();
72
- const v = document.createRange();
73
- v.selectNodeContents(s), v.collapse(!1);
74
- const r = window.getSelection();
75
- r == null || r.removeAllRanges(), r == null || r.addRange(v);
76
- }
77
- const C = (l) => {
78
- const n = l.target;
79
- n instanceof HTMLElement && !Number.isNaN(parseInt(n.innerText)) && p(n.innerText);
80
- }, T = () => {
81
- var l;
82
- const n = (l = o.value) == null ? void 0 : l.el;
83
- if (!n) return;
84
- const s = parseInt(n.innerText);
85
- (Number.isNaN(s) || s < t.min) && (a.value = t.min, n.innerText = `${t.min}`);
86
- }, M = d(() => t.disabled ? !1 : t.max ? a.value + t.step < t.max : !0), R = d(() => t.disabled ? !1 : a.value - t.step >= t.min);
87
- function k() {
88
- var l;
89
- const n = (l = o.value) == null ? void 0 : l.el;
90
- if (!n) return;
91
- n.focus();
92
- const s = document.createRange();
93
- s.selectNodeContents(n);
94
- const i = window.getSelection();
95
- i == null || i.removeAllRanges(), i == null || i.addRange(s);
96
- }
97
- return A(() => {
98
- var l;
99
- const n = (l = o.value) == null ? void 0 : l.el;
100
- n && (n.innerText = `${a.value}`);
101
- }), P(
102
- () => a.value,
103
- (l) => {
104
- var n, s;
105
- ((s = (n = o.value) == null ? void 0 : n.el) == null ? void 0 : s.innerText) !== `${l}` && p(l);
106
- }
107
- ), (l, n) => (c(), m(H, {
108
- modelValue: a.value,
109
- "onUpdate:modelValue": n[0] || (n[0] = (s) => a.value = s),
110
- type: "number",
111
- class: "text-transparent [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
112
- "prefix-class": {
113
- "!px-0 w-5": e.size === "sm",
114
- "!px-0 w-6": e.size === "md",
115
- "!px-0 w-7": e.size === "lg"
116
- },
117
- "suffix-class": {
118
- "!px-0 w-5": e.size === "sm",
119
- "!px-0 w-6": e.size === "md",
120
- "!px-0 w-7": e.size === "lg"
121
- },
122
- size: e.size,
123
- label: e.label,
124
- disabled: e.disabled,
125
- name: e.name,
126
- required: e.required,
127
- error: e.error
128
- }, U({
129
- prefix: u(() => [
130
- g("div", {
131
- class: "absolute inset-0 flex items-center justify-center",
132
- onMousedown: k
133
- }, [
134
- g("div", J, [
135
- b(y, {
136
- ref_key: "contentEditableRef",
137
- ref: o,
138
- tag: "span",
139
- variant: e.size === "sm" ? "body" : "body-lg",
140
- contenteditable: !e.disabled,
141
- class: x(["outline-none", { "pointer-events-none select-none": e.disabled }]),
142
- weight: "semibold",
143
- onInput: C,
144
- onBlur: T
145
- }, null, 8, ["variant", "contenteditable", "class"]),
146
- f.value ? (c(), m(y, {
147
- key: 0,
148
- tag: "span",
149
- color: "subtle",
150
- class: "pointer-events-none select-none"
151
- }, {
152
- default: u(() => [
153
- N(w(" ") + w(f.value), 1)
154
- ]),
155
- _: 1
156
- })) : h("", !0),
157
- e.showDelta ? (c(), m(G, {
158
- key: 1,
159
- "old-value": t.initialValue,
160
- "new-value": a.value,
161
- class: "pointer-events-none ml-0.5 select-none"
162
- }, null, 8, ["old-value", "new-value"])) : h("", !0)
163
- ])
164
- ], 32),
165
- b(z, {
166
- disabled: !R.value,
167
- type: "button",
168
- intent: "subtle",
169
- size: "sm",
170
- class: x(["!h-full select-none rounded-br-none rounded-tr-none", { "!w-7": e.size === "lg", "!w-5": e.size === "sm", "!w-6": e.size === "md" }]),
171
- icon: "remove",
172
- onMousedown: B
173
- }, null, 8, ["disabled", "class"])
174
- ]),
175
- suffix: u(() => [
176
- b(z, {
177
- disabled: !M.value,
178
- type: "button",
179
- intent: "subtle",
180
- size: "sm",
181
- class: x(["!h-full select-none rounded-bl-none rounded-tl-none", { "!w-7": e.size === "lg", "!w-5": e.size === "sm", "!w-6": e.size === "md" }]),
182
- icon: "add",
183
- onMousedown: $
184
- }, null, 8, ["disabled", "class"])
185
- ]),
186
- _: 2
187
- }, [
188
- l.$slots.helper ? {
189
- name: "helper",
190
- fn: u(() => [
191
- j(l.$slots, "helper")
192
- ]),
193
- key: "0"
194
- } : void 0
195
- ]), 1032, ["modelValue", "prefix-class", "suffix-class", "size", "label", "disabled", "name", "required", "error"]));
196
- }
197
- });
198
- export {
199
- Y as _
200
- };