@craterapp/vue-sdk 0.0.2-alpha.4 → 0.0.2-alpha.40

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 (75) hide show
  1. package/README.md +39 -1
  2. package/dist/{AddressType-8PU0QNGJ.js → AddressType-2PURLweo.js} +93 -66
  3. package/dist/AmountType-xegmjFS_.js +72 -0
  4. package/dist/BusinessType--urewVkM.js +72 -0
  5. package/dist/{CheckboxType-C5lpH21J.js → CheckboxType-CS0_N8Yx.js} +19 -19
  6. package/dist/DOBType-Wl8DaZ8C.js +129 -0
  7. package/dist/{DocumentType-GO5DTq0Z.js → DocumentType-g5Mu0OYk.js} +26 -26
  8. package/dist/{DropdownType-4jsWtYZp.js → DropdownType-xJUlWxf0.js} +1 -1
  9. package/dist/{EmailType-eEkcNiZo.js → EmailType-1G8QFuka.js} +4 -4
  10. package/dist/{ExternalAccountType-IAgoVvRA.js → ExternalAccountType-jh_KoCR1.js} +145 -111
  11. package/dist/{IdentityNumberType-eqbpWGqv.js → IdentityNumberType-ClnUPTNj.js} +5 -5
  12. package/dist/{InputType-sOejaH9_.js → InputType-xaHgxJi5.js} +20 -19
  13. package/dist/{MCCType-G9pgwc9A.js → MCCType-0H4sMPzk.js} +1 -1
  14. package/dist/PercentageType-TGBu2uIO.js +75 -0
  15. package/dist/PhoneType-GgwMlYQE.js +67 -0
  16. package/dist/{SSNType-BEvc-Buf.js → SSNType-oNFyGAf4.js} +4 -4
  17. package/dist/TaxType-OtVfTcvR.js +71 -0
  18. package/dist/{TextAreaType--obAg2K-.js → TextAreaType-z0z5TIuf.js} +6 -6
  19. package/dist/UrlType-ZRbrIcDq.js +120 -0
  20. package/dist/crater-vue-sdk.es.js +45 -23
  21. package/dist/crater-vue-sdk.umd.js +88 -92
  22. package/dist/index-v67UVpQ6.js +111548 -0
  23. package/dist/stripe.esm-Bik5J_JE.js +65 -0
  24. package/dist/style.css +2 -2
  25. package/dist/types/interfaces.d.ts +2 -1
  26. package/dist/views/BillCreate.vue.d.ts +32 -0
  27. package/dist/views/BillDetails.vue.d.ts +146 -0
  28. package/dist/views/BillEdit.vue.d.ts +41 -0
  29. package/dist/views/BillTable.vue.d.ts +175 -0
  30. package/dist/views/{SalesChartYearlyWidget.vue.d.ts → Breadcrumb.vue.d.ts} +3 -1
  31. package/dist/views/BreadcrumbItem.vue.d.ts +29 -0
  32. package/dist/views/BusinessOverviewLineChartWidget.vue.d.ts +75 -0
  33. package/dist/views/BusinessOverviewVerticalBarChartWidget.vue.d.ts +90 -0
  34. package/dist/views/BusinessPaymentStatus.vue.d.ts +9 -0
  35. package/dist/views/{CustomerEdit.vue.d.ts → BusinessStat.vue.d.ts} +12 -10
  36. package/dist/views/{PlatformSalesChartMonthlyWidget.vue.d.ts → BusinessStatItem.vue.d.ts} +15 -19
  37. package/dist/views/CreditNoteDetails.vue.d.ts +68 -0
  38. package/dist/views/CreditNoteTable.vue.d.ts +79 -0
  39. package/dist/views/CustomerCreate.vue.d.ts +35 -5
  40. package/dist/views/CustomerDetails.vue.d.ts +53 -12
  41. package/dist/views/CustomerTable.vue.d.ts +58 -11
  42. package/dist/views/EstimateCreate.vue.d.ts +26 -5
  43. package/dist/views/EstimateDetails.vue.d.ts +53 -6
  44. package/dist/views/EstimateEdit.vue.d.ts +20 -2
  45. package/dist/views/EstimateTable.vue.d.ts +88 -16
  46. package/dist/views/InvoiceCreate.vue.d.ts +26 -5
  47. package/dist/views/InvoiceDetails.vue.d.ts +80 -13
  48. package/dist/views/InvoiceEdit.vue.d.ts +20 -2
  49. package/dist/views/InvoiceTable.vue.d.ts +104 -23
  50. package/dist/views/ItemCreate.vue.d.ts +32 -0
  51. package/dist/views/ItemDetails.vue.d.ts +50 -0
  52. package/dist/views/ItemEdit.vue.d.ts +41 -0
  53. package/dist/views/ItemTable.vue.d.ts +110 -0
  54. package/dist/views/Payment.vue.d.ts +11 -2
  55. package/dist/views/PaymentDetails.vue.d.ts +68 -0
  56. package/dist/views/PaymentMethodCreate.vue.d.ts +50 -0
  57. package/dist/views/PaymentMethodTable.vue.d.ts +86 -0
  58. package/dist/views/PaymentTable.vue.d.ts +97 -0
  59. package/dist/views/{PlatformSalesChartYearlyWidget.vue.d.ts → PlatformOverviewChartWidget.vue.d.ts} +11 -0
  60. package/dist/views/RecurringInvoiceCreate.vue.d.ts +32 -0
  61. package/dist/views/RecurringInvoiceDetails.vue.d.ts +135 -0
  62. package/dist/views/RecurringInvoiceEdit.vue.d.ts +45 -0
  63. package/dist/views/RecurringInvoiceTable.vue.d.ts +119 -0
  64. package/dist/views/VendorCreate.vue.d.ts +32 -0
  65. package/dist/views/VendorDetails.vue.d.ts +73 -0
  66. package/dist/views/VendorTable.vue.d.ts +101 -0
  67. package/dist/views/index.d.ts +28 -6
  68. package/package.json +19 -18
  69. package/dist/DOBType-pINw7W9N.js +0 -129
  70. package/dist/PhoneType-anUg_IHm.js +0 -69
  71. package/dist/TaxType-v4merd3R.js +0 -68
  72. package/dist/UrlType-_XIXbmVm.js +0 -114
  73. package/dist/index-Pe5A-Fvf.js +0 -86463
  74. package/dist/views/HelloWorld.vue.d.ts +0 -6
  75. package/dist/views/SalesChartMonthlyWidget.vue.d.ts +0 -28
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ## Crater Vue SDK
2
2
 
3
+ ### https://www.npmjs.com/package/@craterapp/vue-sdk
4
+
3
5
  ### 1. Install
4
6
 
5
7
  Run the following command to Install Crater Vue SDK
@@ -26,9 +28,45 @@ import App from './App.vue'
26
28
  const app = createApp(App)
27
29
 
28
30
  app.use(craterPlugin, {
29
- tenantUrl: '<API_BASE_URL>',
31
+ apiBaseUrl: '<API_BASE_URL>',
30
32
  })
31
33
 
32
34
  app.mount('#app')
33
35
 
34
36
  ```
37
+
38
+
39
+ # Deployment Steps:
40
+
41
+ Prerequisites:
42
+
43
+ - Ensure Node.js and npm are installed and up-to-date.
44
+ - You have publish access to the `@craterapp` npm scope and an npm account.
45
+
46
+ Publish (alpha / prerelease):
47
+
48
+ 1. Login to npm for the scoped package:
49
+
50
+ ```bash
51
+ npm login --scope=@craterapp
52
+ ```
53
+
54
+ 2. Bump a prerelease version (alpha tag):
55
+
56
+ ```bash
57
+ npm version prerelease --preid=alpha
58
+ ```
59
+
60
+ 3. Build the package:
61
+
62
+ ```bash
63
+ yarn build
64
+ ```
65
+
66
+ 4. Publish the prerelease under the `alpha` tag:
67
+
68
+ ```bash
69
+ npm publish --tag alpha --access public
70
+ ```
71
+
72
+
@@ -1,6 +1,6 @@
1
- import { u as q, c as n, t as r, r as c, a as v, _ as N, b as h, d as A, e as k } from "./index-Pe5A-Fvf.js";
2
- import { defineComponent as C, computed as I, openBlock as t, createElementBlock as w, Fragment as _, createBlock as u, unref as a, withCtx as b, createVNode as f, createCommentVNode as m } from "vue";
3
- const S = [
1
+ import { c as n, t as s, r as t, u as q, _ as h, a as N, b as k, d as A } from "./index-v67UVpQ6.js";
2
+ import { defineComponent as w, computed as C, openBlock as i, createElementBlock as I, Fragment as x, createBlock as u, unref as a, withCtx as p, createVNode as f, createCommentVNode as c } from "vue";
3
+ const V = [
4
4
  { name: "Alabama", code: "AL" },
5
5
  { name: "Alaska", code: "AK" },
6
6
  { name: "Arizona", code: "AZ" },
@@ -52,7 +52,7 @@ const S = [
52
52
  { name: "West Virginia", code: "WV" },
53
53
  { name: "Wisconsin", code: "WI" },
54
54
  { name: "Wyoming", code: "WY" }
55
- ], O = /* @__PURE__ */ C({
55
+ ], O = /* @__PURE__ */ w({
56
56
  inheritAttrs: !1,
57
57
  __name: "AddressType",
58
58
  props: {
@@ -81,143 +81,170 @@ const S = [
81
81
  required: !0
82
82
  }
83
83
  },
84
- setup(o) {
85
- const y = o;
86
- q();
87
- function e(i) {
88
- return y.requirements.find((s) => s.includes(i));
84
+ setup(l) {
85
+ const g = l;
86
+ function e(m) {
87
+ return g.requirements.find((r) => r.includes(m));
89
88
  }
90
- const V = function(i) {
91
- return i ? /^\d{5}(-\d{4})?$/.test(i) : !0;
92
- }, $ = {
89
+ const M = function(m) {
90
+ return m ? /^\d{5}(-\d{4})?$/.test(m) : !0;
91
+ }, v = {
93
92
  subFields: {
94
93
  [e("address.line1")]: {
95
94
  required: n.withMessage(
96
- r("validation.required"),
97
- c(e("address.line1"))
95
+ s("validation.required"),
96
+ t(e("address.line1"))
98
97
  )
99
98
  },
100
99
  [e("address.line2")]: {
101
100
  required: n.withMessage(
102
- r("validation.required"),
103
- c(e("address.line2"))
101
+ s("validation.required"),
102
+ t(e("address.line2"))
104
103
  )
105
104
  },
106
105
  [e("address.state")]: {
107
106
  required: n.withMessage(
108
- r("validation.required"),
109
- c(e("address.state"))
107
+ s("validation.required"),
108
+ t(e("address.state"))
109
+ )
110
+ },
111
+ [e("address.region")]: {
112
+ required: n.withMessage(
113
+ s("validation.required"),
114
+ t(e("address.region"))
110
115
  )
111
116
  },
112
117
  [e("address.city")]: {
113
118
  required: n.withMessage(
114
- r("validation.required"),
115
- c(e("address.city"))
119
+ s("validation.required"),
120
+ t(e("address.city"))
116
121
  )
117
122
  },
118
123
  [e("address.postal_code")]: {
119
124
  required: n.withMessage(
120
- r("validation.required"),
121
- c(e("address.postal_code"))
125
+ s("validation.required"),
126
+ t(e("address.postal_code"))
122
127
  ),
123
- postalCode: n.withMessage("Enter a valid postal code", V)
128
+ postalCode: n.withMessage("Enter a valid postal code", M)
124
129
  }
125
130
  }
126
- }, d = v(
127
- $,
128
- I(() => y.field),
129
- { $scope: y.validationScope }
131
+ }, d = q(
132
+ v,
133
+ C(() => g.field),
134
+ { $scope: g.validationScope }
130
135
  );
131
- return (i, s) => {
132
- const F = N, p = h, g = A, M = k;
133
- return t(), w(_, null, [
134
- e("address.line1") || e("address.line2") ? (t(), u(p, {
136
+ return (m, r) => {
137
+ const y = h, b = N, F = k, $ = A;
138
+ return i(), I(x, null, [
139
+ e("address.line1") || e("address.line2") ? (i(), u(b, {
135
140
  key: 0,
136
- label: r("customers.address"),
141
+ label: s("customers.address"),
137
142
  error: a(d).subFields[e("address.line1")].$error && a(d).subFields[e("address.line1")].$errors[0].$message || a(d).subFields[e("address.line2")].$error && a(d).subFields[e("address.line2")].$errors[0].$message,
138
143
  required: ""
139
144
  }, {
140
- default: b(() => [
141
- f(F, {
142
- modelValue: o.field.subFields[e("address.line1")],
143
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.field.subFields[e("address.line1")] = l),
144
- placeholder: r("general.street_1"),
145
+ default: p(() => [
146
+ f(y, {
147
+ modelValue: l.field.subFields[e("address.line1")],
148
+ "onUpdate:modelValue": r[0] || (r[0] = (o) => l.field.subFields[e("address.line1")] = o),
149
+ placeholder: s("general.street_1"),
145
150
  type: "text",
146
151
  name: "address_street1",
147
152
  "container-class": "mt-3",
148
153
  invalid: a(d).subFields[e("address.line1")].$error
149
154
  }, null, 8, ["modelValue", "placeholder", "invalid"]),
150
- e("address.line2") ? (t(), u(F, {
155
+ e("address.line2") ? (i(), u(y, {
151
156
  key: 0,
152
- modelValue: o.field.subFields[e("address.line2")],
153
- "onUpdate:modelValue": s[1] || (s[1] = (l) => o.field.subFields[e("address.line2")] = l),
154
- placeholder: r("general.street_2"),
157
+ modelValue: l.field.subFields[e("address.line2")],
158
+ "onUpdate:modelValue": r[1] || (r[1] = (o) => l.field.subFields[e("address.line2")] = o),
159
+ placeholder: s("general.street_2"),
155
160
  type: "text",
156
161
  class: "mt-3",
157
162
  name: "address_street2",
158
163
  "container-class": "mt-3",
159
164
  invalid: a(d).subFields[e("address.line2")].$error
160
- }, null, 8, ["modelValue", "placeholder", "invalid"])) : m("", !0)
165
+ }, null, 8, ["modelValue", "placeholder", "invalid"])) : c("", !0)
161
166
  ]),
162
167
  _: 1
163
- }, 8, ["label", "error"])) : m("", !0),
164
- e("address.city") ? (t(), u(p, {
168
+ }, 8, ["label", "error"])) : c("", !0),
169
+ e("address.city") ? (i(), u(b, {
165
170
  key: 1,
166
- label: r("customers.city"),
171
+ label: s("customers.city"),
167
172
  error: a(d).subFields[e("address.city")].$error && a(d).subFields[e("address.city")].$errors[0].$message,
168
173
  required: ""
169
174
  }, {
170
- default: b(() => [
171
- f(g, {
172
- modelValue: o.field.subFields[e("address.city")],
173
- "onUpdate:modelValue": s[2] || (s[2] = (l) => o.field.subFields[e("address.city")] = l),
175
+ default: p(() => [
176
+ f(F, {
177
+ modelValue: l.field.subFields[e("address.city")],
178
+ "onUpdate:modelValue": r[2] || (r[2] = (o) => l.field.subFields[e("address.city")] = o),
174
179
  name: "address.city",
175
180
  type: "text",
176
181
  invalid: a(d).subFields[e("address.city")].$error
177
182
  }, null, 8, ["modelValue", "invalid"])
178
183
  ]),
179
184
  _: 1
180
- }, 8, ["label", "error"])) : m("", !0),
181
- e("address.state") ? (t(), u(p, {
185
+ }, 8, ["label", "error"])) : c("", !0),
186
+ e("address.state") ? (i(), u(b, {
182
187
  key: 2,
183
- label: r("customers.state"),
188
+ label: s("customers.state"),
184
189
  error: a(d).subFields[e("address.state")].$error && a(d).subFields[e("address.state")].$errors[0].$message,
185
190
  required: ""
186
191
  }, {
187
- default: b(() => [
188
- f(M, {
189
- modelValue: o.field.subFields[e("address.state")],
190
- "onUpdate:modelValue": s[3] || (s[3] = (l) => o.field.subFields[e("address.state")] = l),
192
+ default: p(() => [
193
+ f($, {
194
+ modelValue: l.field.subFields[e("address.state")],
195
+ "onUpdate:modelValue": r[3] || (r[3] = (o) => l.field.subFields[e("address.state")] = o),
191
196
  "value-prop": "code",
192
197
  label: "name",
193
198
  "track-by": "name",
194
199
  searchable: "",
195
- options: a(S),
196
- placeholder: r("general.select_state"),
200
+ options: a(V),
201
+ placeholder: s("general.select_state"),
197
202
  class: "w-full",
198
203
  invalid: a(d).subFields[e("address.state")].$error
199
204
  }, null, 8, ["modelValue", "options", "placeholder", "invalid"])
200
205
  ]),
201
206
  _: 1
202
- }, 8, ["label", "error"])) : m("", !0),
203
- e("address.postal_code") ? (t(), u(p, {
207
+ }, 8, ["label", "error"])) : c("", !0),
208
+ e("address.region") ? (i(), u(b, {
204
209
  key: 3,
205
- label: r("general.zip_code"),
210
+ label: s("customers.state"),
211
+ error: a(d).subFields[e("address.region")].$error && a(d).subFields[e("address.region")].$errors[0].$message,
212
+ required: ""
213
+ }, {
214
+ default: p(() => [
215
+ f($, {
216
+ modelValue: l.field.subFields[e("address.region")],
217
+ "onUpdate:modelValue": r[4] || (r[4] = (o) => l.field.subFields[e("address.region")] = o),
218
+ "value-prop": "code",
219
+ label: "name",
220
+ "track-by": "name",
221
+ searchable: "",
222
+ options: a(V),
223
+ placeholder: s("general.select_state"),
224
+ class: "w-full",
225
+ invalid: a(d).subFields[e("address.region")].$error
226
+ }, null, 8, ["modelValue", "options", "placeholder", "invalid"])
227
+ ]),
228
+ _: 1
229
+ }, 8, ["label", "error"])) : c("", !0),
230
+ e("address.postal_code") ? (i(), u(b, {
231
+ key: 4,
232
+ label: s("general.zip_code"),
206
233
  class: "mt-2 text-left",
207
234
  error: a(d).subFields[e("address.postal_code")].$error && a(d).subFields[e("address.postal_code")].$errors[0].$message,
208
235
  required: ""
209
236
  }, {
210
- default: b(() => [
211
- f(g, {
212
- modelValue: o.field.subFields[e("address.postal_code")],
213
- "onUpdate:modelValue": s[4] || (s[4] = (l) => o.field.subFields[e("address.postal_code")] = l),
237
+ default: p(() => [
238
+ f(F, {
239
+ modelValue: l.field.subFields[e("address.postal_code")],
240
+ "onUpdate:modelValue": r[5] || (r[5] = (o) => l.field.subFields[e("address.postal_code")] = o),
214
241
  type: "text",
215
242
  name: "postal_code",
216
243
  invalid: a(d).subFields[e("address.postal_code")].$error
217
244
  }, null, 8, ["modelValue", "invalid"])
218
245
  ]),
219
246
  _: 1
220
- }, 8, ["label", "error"])) : m("", !0)
247
+ }, 8, ["label", "error"])) : c("", !0)
221
248
  ], 64);
222
249
  };
223
250
  }
@@ -0,0 +1,72 @@
1
+ import { c as o, t as u, r as f, m as p, u as v, e as q, a as y } from "./index-v67UVpQ6.js";
2
+ import { defineComponent as g, computed as V, openBlock as $, createBlock as b, unref as a, withCtx as S, createVNode as w } from "vue";
3
+ const x = /* @__PURE__ */ g({
4
+ __name: "AmountType",
5
+ props: {
6
+ modelValue: {
7
+ type: String,
8
+ default: null
9
+ },
10
+ requirements: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ field: {
15
+ type: Object,
16
+ required: !0
17
+ },
18
+ placeholder: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ validationScope: {
23
+ type: String,
24
+ required: !0
25
+ },
26
+ step: {
27
+ type: Object,
28
+ required: !0
29
+ }
30
+ },
31
+ setup(e) {
32
+ const t = e, d = {
33
+ value: {
34
+ required: o.withMessage(
35
+ u("validation.required"),
36
+ f(t.field.is_required)
37
+ ),
38
+ minValue: o.withMessage(u("validation.required"), p(1))
39
+ }
40
+ }, r = v(
41
+ d,
42
+ V(() => t.field),
43
+ { $scope: t.validationScope }
44
+ );
45
+ function n(l) {
46
+ return l.toLowerCase().replace(/ /g, "-");
47
+ }
48
+ return (l, i) => {
49
+ const s = q, c = y;
50
+ return $(), b(c, {
51
+ label: e.field.label,
52
+ required: !!e.field.is_required,
53
+ error: a(r).value.$error && a(r).value.$errors[0].$message,
54
+ "data-cy": n(e.field.label),
55
+ tooltip: e.field.tooltip
56
+ }, {
57
+ default: S(() => [
58
+ w(s, {
59
+ modelValue: e.field.value,
60
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => e.field.value = m),
61
+ invalid: a(r).value.$error,
62
+ cents: ""
63
+ }, null, 8, ["modelValue", "invalid"])
64
+ ]),
65
+ _: 1
66
+ }, 8, ["label", "required", "error", "data-cy", "tooltip"]);
67
+ };
68
+ }
69
+ });
70
+ export {
71
+ x as default
72
+ };
@@ -0,0 +1,72 @@
1
+ import { f as d, c, t as p, r as f, u as m, d as v, a as b } from "./index-v67UVpQ6.js";
2
+ import { defineComponent as q, computed as y, openBlock as _, createBlock as S, unref as r, withCtx as $, createVNode as g } from "vue";
3
+ const k = /* @__PURE__ */ q({
4
+ inheritAttrs: !1,
5
+ __name: "BusinessType",
6
+ props: {
7
+ modelValue: {
8
+ type: String,
9
+ default: null
10
+ },
11
+ requirements: {
12
+ type: Array,
13
+ default: () => []
14
+ },
15
+ field: {
16
+ type: Object,
17
+ required: !0
18
+ },
19
+ placeholder: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ validationScope: {
24
+ type: String,
25
+ required: !0
26
+ },
27
+ step: {
28
+ type: Object,
29
+ required: !0
30
+ }
31
+ },
32
+ setup(e) {
33
+ const l = e, u = d(), s = {
34
+ value: {
35
+ required: c.withMessage(
36
+ p("validation.required"),
37
+ f(l.field.is_required)
38
+ )
39
+ }
40
+ }, t = m(
41
+ s,
42
+ y(() => l.field),
43
+ { $scope: l.validationScope }
44
+ );
45
+ return (B, a) => {
46
+ const i = v, o = b;
47
+ return _(), S(o, {
48
+ label: e.field.label,
49
+ required: !!e.field.is_required,
50
+ error: r(t).value.$error && r(t).value.$errors[0].$message
51
+ }, {
52
+ default: $(() => [
53
+ g(i, {
54
+ modelValue: e.field.value,
55
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => e.field.value = n),
56
+ "value-prop": "value",
57
+ label: "label",
58
+ "track-by": "label",
59
+ searchable: "",
60
+ options: r(u).businessTypes,
61
+ invalid: r(t).value.$error,
62
+ class: "w-full"
63
+ }, null, 8, ["modelValue", "options", "invalid"])
64
+ ]),
65
+ _: 1
66
+ }, 8, ["label", "required", "error"]);
67
+ };
68
+ }
69
+ });
70
+ export {
71
+ k as default
72
+ };
@@ -1,6 +1,6 @@
1
- import { c as m, t as p, s as f, a as y, u as _, f as v, b } from "./index-Pe5A-Fvf.js";
2
- import { defineComponent as x, computed as n, openBlock as V, createBlock as g, unref as t, withCtx as s, createVNode as k, createTextVNode as S, toDisplayString as $, createElementVNode as h } from "vue";
3
- const q = ["href"], A = /* @__PURE__ */ x({
1
+ import { c as p, t as f, s as y, f as _, u as v, g as S, h as b, a as g } from "./index-v67UVpQ6.js";
2
+ import { defineComponent as x, computed as s, openBlock as V, createBlock as h, unref as t, withCtx as n, createVNode as k, createTextVNode as $, toDisplayString as q, createElementVNode as B } from "vue";
3
+ const C = ["href"], w = /* @__PURE__ */ x({
4
4
  __name: "CheckboxType",
5
5
  props: {
6
6
  modelValue: {
@@ -30,34 +30,34 @@ const q = ["href"], A = /* @__PURE__ */ x({
30
30
  setup(e) {
31
31
  const r = e, l = {
32
32
  value: {
33
- sameAs: m.withMessage(
34
- p("validation.required"),
35
- f(!0)
33
+ sameAs: p.withMessage(
34
+ f("validation.required"),
35
+ y(!0)
36
36
  )
37
37
  }
38
- }, i = n(() => window.tenant), a = y(
38
+ }, u = _(), i = s(() => u.tenant), a = v(
39
39
  l,
40
- n(() => r.field),
40
+ s(() => r.field),
41
41
  { $scope: r.validationScope }
42
42
  );
43
- return _(), (w, o) => {
44
- const u = v, c = b;
45
- return V(), g(c, {
43
+ return S(), (A, o) => {
44
+ const c = b, d = g;
45
+ return V(), h(d, {
46
46
  error: t(a).value.$error && t(a).value.$errors[0].$message
47
47
  }, {
48
- default: s(() => [
49
- k(u, {
48
+ default: n(() => [
49
+ k(c, {
50
50
  modelValue: e.field.value,
51
- "onUpdate:modelValue": o[0] || (o[0] = (d) => e.field.value = d),
51
+ "onUpdate:modelValue": o[0] || (o[0] = (m) => e.field.value = m),
52
52
  variant: "primary"
53
53
  }, {
54
- default: s(() => [
55
- S($(e.label) + " ", 1),
56
- h("a", {
54
+ default: n(() => [
55
+ $(q(e.label) + " ", 1),
56
+ B("a", {
57
57
  class: "text-primary-500 dark:text-primary-400",
58
58
  href: t(i).terms_link,
59
59
  target: "_blank"
60
- }, " terms of service", 8, q)
60
+ }, " terms of service", 8, C)
61
61
  ]),
62
62
  _: 1
63
63
  }, 8, ["modelValue"])
@@ -68,5 +68,5 @@ const q = ["href"], A = /* @__PURE__ */ x({
68
68
  }
69
69
  });
70
70
  export {
71
- A as default
71
+ w as default
72
72
  };
@@ -0,0 +1,129 @@
1
+ import { g as F, c as m, t as f, r as y, u as $, b as V, a as x } from "./index-v67UVpQ6.js";
2
+ import { defineComponent as g, computed as w, resolveDirective as _, openBlock as d, createBlock as o, unref as l, withCtx as k, createElementVNode as i, withDirectives as b, createCommentVNode as p } from "vue";
3
+ const D = { class: "flex -space-x-px" }, M = { class: "min-w-0" }, S = /* @__PURE__ */ i("label", {
4
+ for: "card-expiration-date",
5
+ class: "sr-only"
6
+ }, " Month ", -1), B = { class: "min-w-0" }, Y = /* @__PURE__ */ i("label", {
7
+ for: "card-expiration-date",
8
+ class: "sr-only"
9
+ }, " Day ", -1), z = { class: "min-w-0" }, C = /* @__PURE__ */ i("label", {
10
+ for: "card-expiration-date",
11
+ class: "sr-only"
12
+ }, " Year ", -1), U = /* @__PURE__ */ g({
13
+ __name: "DOBType",
14
+ props: {
15
+ modelValue: {
16
+ type: String,
17
+ default: null
18
+ },
19
+ requirements: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ field: {
24
+ type: Object,
25
+ required: !0
26
+ },
27
+ placeholder: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ validationScope: {
32
+ type: String,
33
+ required: !0
34
+ },
35
+ step: {
36
+ type: Object,
37
+ required: !0
38
+ }
39
+ },
40
+ setup(r) {
41
+ const n = r;
42
+ F();
43
+ const h = {
44
+ subFields: {
45
+ [e("day")]: {
46
+ required: m.withMessage(
47
+ f("validation.required"),
48
+ y(e("day"))
49
+ )
50
+ },
51
+ [e("month")]: {
52
+ required: m.withMessage(
53
+ f("validation.required"),
54
+ y(e("month"))
55
+ )
56
+ },
57
+ [e("year")]: {
58
+ required: m.withMessage(
59
+ f("validation.required"),
60
+ y(e("year"))
61
+ )
62
+ }
63
+ }
64
+ }, t = $(
65
+ h,
66
+ w(() => n.field),
67
+ { $scope: n.validationScope }
68
+ );
69
+ function e(v) {
70
+ return n.requirements.find((s) => s.includes(v));
71
+ }
72
+ return (v, s) => {
73
+ const u = V, q = x, c = _("maska");
74
+ return d(), o(q, {
75
+ label: r.field.label,
76
+ required: !!r.field.is_required,
77
+ error: l(t).subFields[e("day")].$error && l(t).subFields[e("day")].$errors[0].$message || l(t).subFields[e("month")].$error && l(t).subFields[e("month")].$errors[0].$message || l(t).subFields[e("year")].$error && l(t).subFields[e("year")].$errors[0].$message
78
+ }, {
79
+ default: k(() => [
80
+ i("div", D, [
81
+ i("div", M, [
82
+ S,
83
+ e("month") ? b((d(), o(u, {
84
+ key: 0,
85
+ modelValue: r.field.subFields[e("month")],
86
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => r.field.subFields[e("month")] = a),
87
+ placeholder: "MM",
88
+ class: "w-14 text-center rounded-r-none relative focus:z-10",
89
+ invalid: l(t).subFields[e("month")].$error
90
+ }, null, 8, ["modelValue", "invalid"])), [
91
+ [c, "##"]
92
+ ]) : p("", !0)
93
+ ]),
94
+ i("div", B, [
95
+ Y,
96
+ e("day") ? b((d(), o(u, {
97
+ key: 0,
98
+ modelValue: r.field.subFields[e("day")],
99
+ "onUpdate:modelValue": s[1] || (s[1] = (a) => r.field.subFields[e("day")] = a),
100
+ placeholder: "DD",
101
+ class: "w-14 text-center rounded-none relative focus:z-10",
102
+ invalid: l(t).subFields[e("day")].$error
103
+ }, null, 8, ["modelValue", "invalid"])), [
104
+ [c, "##"]
105
+ ]) : p("", !0)
106
+ ]),
107
+ i("div", z, [
108
+ C,
109
+ e("year") ? b((d(), o(u, {
110
+ key: 0,
111
+ modelValue: r.field.subFields[e("year")],
112
+ "onUpdate:modelValue": s[2] || (s[2] = (a) => r.field.subFields[e("year")] = a),
113
+ placeholder: "YYYY",
114
+ class: "w-16 text-center rounded-l-none relative focus:z-10",
115
+ invalid: l(t).subFields[e("year")].$error
116
+ }, null, 8, ["modelValue", "invalid"])), [
117
+ [c, "####"]
118
+ ]) : p("", !0)
119
+ ])
120
+ ])
121
+ ]),
122
+ _: 1
123
+ }, 8, ["label", "required", "error"]);
124
+ };
125
+ }
126
+ });
127
+ export {
128
+ U as default
129
+ };