@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.
- package/README.md +39 -1
- package/dist/{AddressType-8PU0QNGJ.js → AddressType-2PURLweo.js} +93 -66
- package/dist/AmountType-xegmjFS_.js +72 -0
- package/dist/BusinessType--urewVkM.js +72 -0
- package/dist/{CheckboxType-C5lpH21J.js → CheckboxType-CS0_N8Yx.js} +19 -19
- package/dist/DOBType-Wl8DaZ8C.js +129 -0
- package/dist/{DocumentType-GO5DTq0Z.js → DocumentType-g5Mu0OYk.js} +26 -26
- package/dist/{DropdownType-4jsWtYZp.js → DropdownType-xJUlWxf0.js} +1 -1
- package/dist/{EmailType-eEkcNiZo.js → EmailType-1G8QFuka.js} +4 -4
- package/dist/{ExternalAccountType-IAgoVvRA.js → ExternalAccountType-jh_KoCR1.js} +145 -111
- package/dist/{IdentityNumberType-eqbpWGqv.js → IdentityNumberType-ClnUPTNj.js} +5 -5
- package/dist/{InputType-sOejaH9_.js → InputType-xaHgxJi5.js} +20 -19
- package/dist/{MCCType-G9pgwc9A.js → MCCType-0H4sMPzk.js} +1 -1
- package/dist/PercentageType-TGBu2uIO.js +75 -0
- package/dist/PhoneType-GgwMlYQE.js +67 -0
- package/dist/{SSNType-BEvc-Buf.js → SSNType-oNFyGAf4.js} +4 -4
- package/dist/TaxType-OtVfTcvR.js +71 -0
- package/dist/{TextAreaType--obAg2K-.js → TextAreaType-z0z5TIuf.js} +6 -6
- package/dist/UrlType-ZRbrIcDq.js +120 -0
- package/dist/crater-vue-sdk.es.js +45 -23
- package/dist/crater-vue-sdk.umd.js +88 -92
- package/dist/index-v67UVpQ6.js +111548 -0
- package/dist/stripe.esm-Bik5J_JE.js +65 -0
- package/dist/style.css +2 -2
- package/dist/types/interfaces.d.ts +2 -1
- package/dist/views/BillCreate.vue.d.ts +32 -0
- package/dist/views/BillDetails.vue.d.ts +146 -0
- package/dist/views/BillEdit.vue.d.ts +41 -0
- package/dist/views/BillTable.vue.d.ts +175 -0
- package/dist/views/{SalesChartYearlyWidget.vue.d.ts → Breadcrumb.vue.d.ts} +3 -1
- package/dist/views/BreadcrumbItem.vue.d.ts +29 -0
- package/dist/views/BusinessOverviewLineChartWidget.vue.d.ts +75 -0
- package/dist/views/BusinessOverviewVerticalBarChartWidget.vue.d.ts +90 -0
- package/dist/views/BusinessPaymentStatus.vue.d.ts +9 -0
- package/dist/views/{CustomerEdit.vue.d.ts → BusinessStat.vue.d.ts} +12 -10
- package/dist/views/{PlatformSalesChartMonthlyWidget.vue.d.ts → BusinessStatItem.vue.d.ts} +15 -19
- package/dist/views/CreditNoteDetails.vue.d.ts +68 -0
- package/dist/views/CreditNoteTable.vue.d.ts +79 -0
- package/dist/views/CustomerCreate.vue.d.ts +35 -5
- package/dist/views/CustomerDetails.vue.d.ts +53 -12
- package/dist/views/CustomerTable.vue.d.ts +58 -11
- package/dist/views/EstimateCreate.vue.d.ts +26 -5
- package/dist/views/EstimateDetails.vue.d.ts +53 -6
- package/dist/views/EstimateEdit.vue.d.ts +20 -2
- package/dist/views/EstimateTable.vue.d.ts +88 -16
- package/dist/views/InvoiceCreate.vue.d.ts +26 -5
- package/dist/views/InvoiceDetails.vue.d.ts +80 -13
- package/dist/views/InvoiceEdit.vue.d.ts +20 -2
- package/dist/views/InvoiceTable.vue.d.ts +104 -23
- package/dist/views/ItemCreate.vue.d.ts +32 -0
- package/dist/views/ItemDetails.vue.d.ts +50 -0
- package/dist/views/ItemEdit.vue.d.ts +41 -0
- package/dist/views/ItemTable.vue.d.ts +110 -0
- package/dist/views/Payment.vue.d.ts +11 -2
- package/dist/views/PaymentDetails.vue.d.ts +68 -0
- package/dist/views/PaymentMethodCreate.vue.d.ts +50 -0
- package/dist/views/PaymentMethodTable.vue.d.ts +86 -0
- package/dist/views/PaymentTable.vue.d.ts +97 -0
- package/dist/views/{PlatformSalesChartYearlyWidget.vue.d.ts → PlatformOverviewChartWidget.vue.d.ts} +11 -0
- package/dist/views/RecurringInvoiceCreate.vue.d.ts +32 -0
- package/dist/views/RecurringInvoiceDetails.vue.d.ts +135 -0
- package/dist/views/RecurringInvoiceEdit.vue.d.ts +45 -0
- package/dist/views/RecurringInvoiceTable.vue.d.ts +119 -0
- package/dist/views/VendorCreate.vue.d.ts +32 -0
- package/dist/views/VendorDetails.vue.d.ts +73 -0
- package/dist/views/VendorTable.vue.d.ts +101 -0
- package/dist/views/index.d.ts +28 -6
- package/package.json +19 -18
- package/dist/DOBType-pINw7W9N.js +0 -129
- package/dist/PhoneType-anUg_IHm.js +0 -69
- package/dist/TaxType-v4merd3R.js +0 -68
- package/dist/UrlType-_XIXbmVm.js +0 -114
- package/dist/index-Pe5A-Fvf.js +0 -86463
- package/dist/views/HelloWorld.vue.d.ts +0 -6
- 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
|
-
|
|
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 {
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
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__ */
|
|
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(
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
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
|
|
91
|
-
return
|
|
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
|
-
|
|
97
|
-
|
|
95
|
+
s("validation.required"),
|
|
96
|
+
t(e("address.line1"))
|
|
98
97
|
)
|
|
99
98
|
},
|
|
100
99
|
[e("address.line2")]: {
|
|
101
100
|
required: n.withMessage(
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
s("validation.required"),
|
|
102
|
+
t(e("address.line2"))
|
|
104
103
|
)
|
|
105
104
|
},
|
|
106
105
|
[e("address.state")]: {
|
|
107
106
|
required: n.withMessage(
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
|
|
121
|
-
|
|
125
|
+
s("validation.required"),
|
|
126
|
+
t(e("address.postal_code"))
|
|
122
127
|
),
|
|
123
|
-
postalCode: n.withMessage("Enter a valid postal code",
|
|
128
|
+
postalCode: n.withMessage("Enter a valid postal code", M)
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
|
-
}, d =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{ $scope:
|
|
131
|
+
}, d = q(
|
|
132
|
+
v,
|
|
133
|
+
C(() => g.field),
|
|
134
|
+
{ $scope: g.validationScope }
|
|
130
135
|
);
|
|
131
|
-
return (
|
|
132
|
-
const
|
|
133
|
-
return
|
|
134
|
-
e("address.line1") || e("address.line2") ? (
|
|
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:
|
|
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:
|
|
141
|
-
f(
|
|
142
|
-
modelValue:
|
|
143
|
-
"onUpdate:modelValue":
|
|
144
|
-
placeholder:
|
|
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") ? (
|
|
155
|
+
e("address.line2") ? (i(), u(y, {
|
|
151
156
|
key: 0,
|
|
152
|
-
modelValue:
|
|
153
|
-
"onUpdate:modelValue":
|
|
154
|
-
placeholder:
|
|
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"])) :
|
|
165
|
+
}, null, 8, ["modelValue", "placeholder", "invalid"])) : c("", !0)
|
|
161
166
|
]),
|
|
162
167
|
_: 1
|
|
163
|
-
}, 8, ["label", "error"])) :
|
|
164
|
-
e("address.city") ? (
|
|
168
|
+
}, 8, ["label", "error"])) : c("", !0),
|
|
169
|
+
e("address.city") ? (i(), u(b, {
|
|
165
170
|
key: 1,
|
|
166
|
-
label:
|
|
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:
|
|
171
|
-
f(
|
|
172
|
-
modelValue:
|
|
173
|
-
"onUpdate:modelValue":
|
|
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"])) :
|
|
181
|
-
e("address.state") ? (
|
|
185
|
+
}, 8, ["label", "error"])) : c("", !0),
|
|
186
|
+
e("address.state") ? (i(), u(b, {
|
|
182
187
|
key: 2,
|
|
183
|
-
label:
|
|
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:
|
|
188
|
-
f(
|
|
189
|
-
modelValue:
|
|
190
|
-
"onUpdate:modelValue":
|
|
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(
|
|
196
|
-
placeholder:
|
|
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"])) :
|
|
203
|
-
e("address.
|
|
207
|
+
}, 8, ["label", "error"])) : c("", !0),
|
|
208
|
+
e("address.region") ? (i(), u(b, {
|
|
204
209
|
key: 3,
|
|
205
|
-
label:
|
|
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:
|
|
211
|
-
f(
|
|
212
|
-
modelValue:
|
|
213
|
-
"onUpdate:modelValue":
|
|
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"])) :
|
|
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
|
|
2
|
-
import { defineComponent as x, computed as
|
|
3
|
-
const
|
|
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:
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
sameAs: p.withMessage(
|
|
34
|
+
f("validation.required"),
|
|
35
|
+
y(!0)
|
|
36
36
|
)
|
|
37
37
|
}
|
|
38
|
-
}, i =
|
|
38
|
+
}, u = _(), i = s(() => u.tenant), a = v(
|
|
39
39
|
l,
|
|
40
|
-
|
|
40
|
+
s(() => r.field),
|
|
41
41
|
{ $scope: r.validationScope }
|
|
42
42
|
);
|
|
43
|
-
return
|
|
44
|
-
const
|
|
45
|
-
return V(),
|
|
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:
|
|
49
|
-
k(
|
|
48
|
+
default: n(() => [
|
|
49
|
+
k(c, {
|
|
50
50
|
modelValue: e.field.value,
|
|
51
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
51
|
+
"onUpdate:modelValue": o[0] || (o[0] = (m) => e.field.value = m),
|
|
52
52
|
variant: "primary"
|
|
53
53
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
|
|
56
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
+
};
|