@vue-interface/input-field 1.0.0-beta.1 → 1.0.0-beta.10
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/dist/input-field.js +1107 -262
- package/dist/input-field.umd.cjs +1 -1
- package/dist/src/InputField.vue.d.ts +71 -62
- package/dist/style.css +1 -1
- package/package.json +16 -19
package/dist/input-field.js
CHANGED
|
@@ -1,12 +1,78 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
return
|
|
1
|
+
import { defineComponent as p, inject as Ye, toRaw as Ke, openBlock as a, createElementBlock as d, normalizeClass as W, normalizeStyle as Qe, createElementVNode as $, createBlock as _, resolveDynamicComponent as Xe, toDisplayString as O, createCommentVNode as g, computed as et, Fragment as $e, renderList as Ce, unref as P, renderSlot as c, normalizeProps as E, guardReactiveProps as w, resolveComponent as R, resolveDirective as tt, withDirectives as rt, mergeProps as ot, vModelDynamic as nt, createVNode as X, Transition as it, withCtx as D, createTextVNode as st } from "vue";
|
|
2
|
+
var at = Object.defineProperty, lt = (e, t, r) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ut = (e, t, r) => (lt(e, typeof t != "symbol" ? t + "" : t, r), r), I = function() {
|
|
3
|
+
return I = Object.assign || function(e) {
|
|
4
|
+
for (var t, r = 1, o = arguments.length; r < o; r++) {
|
|
5
|
+
t = arguments[r];
|
|
6
|
+
for (var n in t)
|
|
7
|
+
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
8
|
+
}
|
|
9
|
+
return e;
|
|
10
|
+
}, I.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
function ct(e) {
|
|
13
|
+
return e.toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
var dt = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], ht = /[^A-Z0-9]+/gi;
|
|
16
|
+
function ft(e, t) {
|
|
17
|
+
t === void 0 && (t = {});
|
|
18
|
+
for (var r = t.splitRegexp, o = r === void 0 ? dt : r, n = t.stripRegexp, u = n === void 0 ? ht : n, b = t.transform, V = b === void 0 ? ct : b, z = t.delimiter, T = z === void 0 ? " " : z, s = ee(ee(e, o, "$1\0$2"), u, "\0"), M = 0, L = s.length; s.charAt(M) === "\0"; )
|
|
19
|
+
M++;
|
|
20
|
+
for (; s.charAt(L - 1) === "\0"; )
|
|
21
|
+
L--;
|
|
22
|
+
return s.slice(M, L).split("\0").map(V).join(T);
|
|
23
|
+
}
|
|
24
|
+
function ee(e, t, r) {
|
|
25
|
+
return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(o, n) {
|
|
26
|
+
return o.replace(n, r);
|
|
27
|
+
}, e);
|
|
28
|
+
}
|
|
29
|
+
function pt(e, t) {
|
|
30
|
+
return t === void 0 && (t = {}), ft(e, I({ delimiter: "." }, t));
|
|
31
|
+
}
|
|
32
|
+
function B(e, t) {
|
|
33
|
+
return t === void 0 && (t = {}), pt(e, I({ delimiter: "-" }, t));
|
|
34
|
+
}
|
|
35
|
+
let yt = class {
|
|
36
|
+
constructor(t = {}) {
|
|
37
|
+
ut(this, "components"), this.components = /* @__PURE__ */ new Map(), Object.entries(t).forEach(([r, o]) => {
|
|
38
|
+
this.register(r, o);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
get(t) {
|
|
42
|
+
const r = this.components.get(
|
|
43
|
+
t = B(t)
|
|
44
|
+
);
|
|
45
|
+
if (r)
|
|
46
|
+
return r;
|
|
47
|
+
throw new Error(`"${t}" has not been registered yet!`);
|
|
48
|
+
}
|
|
49
|
+
register(t, r) {
|
|
50
|
+
return typeof t == "object" ? (Object.entries(t).forEach(([o, n]) => {
|
|
51
|
+
this.register(B(o), n);
|
|
52
|
+
}), this) : (this.components.set(B(t), r), this);
|
|
53
|
+
}
|
|
54
|
+
remove(t) {
|
|
55
|
+
return this.components.delete(B(t)), this;
|
|
56
|
+
}
|
|
57
|
+
reset() {
|
|
58
|
+
return this.components = /* @__PURE__ */ new Map(), this;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function vt(e = {}) {
|
|
62
|
+
return new yt(e);
|
|
63
|
+
}
|
|
64
|
+
const bt = vt();
|
|
65
|
+
function m(e, t = "px") {
|
|
66
|
+
return e != null && e !== !1 && isFinite(e) ? `${e}${t}` : e;
|
|
4
67
|
}
|
|
5
|
-
const
|
|
68
|
+
const mt = p({
|
|
6
69
|
props: {
|
|
7
70
|
absolute: Boolean,
|
|
8
71
|
center: Boolean,
|
|
9
|
-
label:
|
|
72
|
+
label: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: void 0
|
|
75
|
+
},
|
|
10
76
|
size: {
|
|
11
77
|
type: String,
|
|
12
78
|
default: "md"
|
|
@@ -16,24 +82,37 @@ const W = S({
|
|
|
16
82
|
default: "indicators"
|
|
17
83
|
},
|
|
18
84
|
type: {
|
|
19
|
-
type: String,
|
|
85
|
+
type: [Object, String],
|
|
20
86
|
required: !0
|
|
21
87
|
},
|
|
22
|
-
height:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
88
|
+
height: {
|
|
89
|
+
type: [String, Number],
|
|
90
|
+
default: void 0
|
|
91
|
+
},
|
|
92
|
+
maxHeight: {
|
|
93
|
+
type: [String, Number],
|
|
94
|
+
default: void 0
|
|
95
|
+
},
|
|
96
|
+
minHeight: {
|
|
97
|
+
type: [String, Number],
|
|
98
|
+
default: void 0
|
|
99
|
+
},
|
|
100
|
+
width: {
|
|
101
|
+
type: [String, Number],
|
|
102
|
+
default: void 0
|
|
103
|
+
},
|
|
104
|
+
maxWidth: {
|
|
105
|
+
type: [String, Number],
|
|
106
|
+
default: void 0
|
|
107
|
+
},
|
|
108
|
+
minWidth: {
|
|
109
|
+
type: [String, Number],
|
|
110
|
+
default: void 0
|
|
111
|
+
}
|
|
28
112
|
},
|
|
29
113
|
data: () => ({
|
|
30
114
|
is: null
|
|
31
115
|
}),
|
|
32
|
-
setup(t) {
|
|
33
|
-
return {
|
|
34
|
-
registryInstance: N(t.registry || "indicators")
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
116
|
computed: {
|
|
38
117
|
classes() {
|
|
39
118
|
return {
|
|
@@ -44,122 +123,62 @@ const W = S({
|
|
|
44
123
|
},
|
|
45
124
|
style() {
|
|
46
125
|
return {
|
|
47
|
-
width:
|
|
48
|
-
maxWidth:
|
|
49
|
-
minWidth:
|
|
50
|
-
height:
|
|
51
|
-
maxHeight:
|
|
52
|
-
minHeight:
|
|
126
|
+
width: m(this.width),
|
|
127
|
+
maxWidth: m(this.maxWidth),
|
|
128
|
+
minWidth: m(this.minWidth),
|
|
129
|
+
height: m(this.height),
|
|
130
|
+
maxHeight: m(this.maxHeight),
|
|
131
|
+
minHeight: m(this.minHeight)
|
|
53
132
|
};
|
|
54
133
|
}
|
|
55
134
|
},
|
|
56
|
-
async mounted() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
135
|
+
// async mounted() {
|
|
136
|
+
// const component = await this.component();
|
|
137
|
+
// this.is = () => component;
|
|
138
|
+
// },
|
|
60
139
|
methods: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
140
|
+
componentFromRegistry(e) {
|
|
141
|
+
var t;
|
|
142
|
+
try {
|
|
143
|
+
return (t = Ye(this.registry || "indicators", bt)) == null ? void 0 : t.get(e);
|
|
144
|
+
} catch {
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
component() {
|
|
148
|
+
return typeof this.type == "string" ? this.componentFromRegistry(this.type) : Ke(this.type);
|
|
64
149
|
}
|
|
65
150
|
}
|
|
66
|
-
}),
|
|
67
|
-
const
|
|
68
|
-
for (const [
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
},
|
|
72
|
-
key:
|
|
151
|
+
}), gt = (e, t) => {
|
|
152
|
+
const r = e.__vccOpts || e;
|
|
153
|
+
for (const [o, n] of t)
|
|
154
|
+
r[o] = n;
|
|
155
|
+
return r;
|
|
156
|
+
}, jt = { class: "activity-indicator-content" }, $t = {
|
|
157
|
+
key: 0,
|
|
73
158
|
class: "activity-indicator-label"
|
|
74
159
|
};
|
|
75
|
-
function
|
|
76
|
-
return
|
|
77
|
-
class:
|
|
78
|
-
style:
|
|
160
|
+
function Ct(e, t, r, o, n, u) {
|
|
161
|
+
return a(), d("div", {
|
|
162
|
+
class: W(["activity-indicator", e.classes]),
|
|
163
|
+
style: Qe(e.style)
|
|
79
164
|
}, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class: "mx-auto"
|
|
84
|
-
})) : p("", !0),
|
|
85
|
-
t.label ? (r(), l("div", G, B(t.label), 1)) : p("", !0)
|
|
165
|
+
$("div", jt, [
|
|
166
|
+
(a(), _(Xe(e.component()), { class: "mx-auto" })),
|
|
167
|
+
e.label ? (a(), d("div", $t, O(e.label), 1)) : g("", !0)
|
|
86
168
|
])
|
|
87
169
|
], 6);
|
|
88
170
|
}
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, $.apply(this, arguments);
|
|
99
|
-
};
|
|
100
|
-
function X(t) {
|
|
101
|
-
return t.toLowerCase();
|
|
102
|
-
}
|
|
103
|
-
var Y = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], tt = /[^A-Z0-9]+/gi;
|
|
104
|
-
function et(t, e) {
|
|
105
|
-
e === void 0 && (e = {});
|
|
106
|
-
for (var i = e.splitRegexp, n = i === void 0 ? Y : i, s = e.stripRegexp, d = s === void 0 ? tt : s, u = e.transform, m = u === void 0 ? X : u, o = e.delimiter, w = o === void 0 ? " " : o, a = F(F(t, n, "$1\0$2"), d, "\0"), c = 0, h = a.length; a.charAt(c) === "\0"; )
|
|
107
|
-
c++;
|
|
108
|
-
for (; a.charAt(h - 1) === "\0"; )
|
|
109
|
-
h--;
|
|
110
|
-
return a.slice(c, h).split("\0").map(m).join(w);
|
|
111
|
-
}
|
|
112
|
-
function F(t, e, i) {
|
|
113
|
-
return e instanceof RegExp ? t.replace(e, i) : e.reduce(function(n, s) {
|
|
114
|
-
return n.replace(s, i);
|
|
115
|
-
}, t);
|
|
116
|
-
}
|
|
117
|
-
function it(t, e) {
|
|
118
|
-
return e === void 0 && (e = {}), et(t, $({ delimiter: "." }, e));
|
|
119
|
-
}
|
|
120
|
-
function b(t, e) {
|
|
121
|
-
return e === void 0 && (e = {}), it(t, $({ delimiter: "-" }, e));
|
|
122
|
-
}
|
|
123
|
-
class st {
|
|
124
|
-
constructor(e = {}) {
|
|
125
|
-
U(this, "components"), this.components = /* @__PURE__ */ new Map(), Object.entries(e).forEach(([i, n]) => {
|
|
126
|
-
this.register(i, n);
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
get(e) {
|
|
130
|
-
const i = this.components.get(
|
|
131
|
-
e = b(e)
|
|
132
|
-
);
|
|
133
|
-
if (i)
|
|
134
|
-
return i;
|
|
135
|
-
throw new Error(`"${e}" has not been registered yet!`);
|
|
136
|
-
}
|
|
137
|
-
register(e, i) {
|
|
138
|
-
return typeof e == "object" ? (Object.entries(e).forEach(([n, s]) => {
|
|
139
|
-
this.register(b(n), s);
|
|
140
|
-
}), this) : (this.components.set(b(e), i), this);
|
|
141
|
-
}
|
|
142
|
-
remove(e) {
|
|
143
|
-
return this.components.delete(b(e)), this;
|
|
144
|
-
}
|
|
145
|
-
reset() {
|
|
146
|
-
return this.components = /* @__PURE__ */ new Map(), this;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function nt(t = {}) {
|
|
150
|
-
return new st(t);
|
|
151
|
-
}
|
|
152
|
-
nt();
|
|
153
|
-
const g = {};
|
|
154
|
-
function y(...t) {
|
|
155
|
-
if (!t.length)
|
|
156
|
-
return g;
|
|
157
|
-
const [e, i] = t;
|
|
158
|
-
return typeof e == "string" ? typeof g[e] < "u" ? g[e] : i : Array.isArray(e) ? e.reduce((n, s) => Object.assign(n, {
|
|
159
|
-
[s]: g[s]
|
|
160
|
-
}), {}) : Object.assign(g, ...t);
|
|
171
|
+
const St = /* @__PURE__ */ gt(mt, [["render", Ct]]), S = {};
|
|
172
|
+
function l(...e) {
|
|
173
|
+
if (!e.length)
|
|
174
|
+
return S;
|
|
175
|
+
const [t, r] = e;
|
|
176
|
+
return typeof t == "string" ? typeof S[t] < "u" ? S[t] : r : Array.isArray(t) ? t.reduce((o, n) => Object.assign(o, {
|
|
177
|
+
//@ts-ignore
|
|
178
|
+
[n]: S[n]
|
|
179
|
+
}), {}) : Object.assign(S, ...e);
|
|
161
180
|
}
|
|
162
|
-
const
|
|
181
|
+
const Se = p({
|
|
163
182
|
props: {
|
|
164
183
|
dropShadow: {
|
|
165
184
|
type: [Boolean, String],
|
|
@@ -180,142 +199,950 @@ const rt = S({
|
|
|
180
199
|
},
|
|
181
200
|
computed: {
|
|
182
201
|
shadowableClass() {
|
|
183
|
-
const
|
|
202
|
+
const e = this.dropShadow === !0 ? "" : this.dropShadow && `-${this.dropShadow}`, t = this.shadow === !0 ? "" : this.shadow && `-${this.shadow}`;
|
|
184
203
|
return {
|
|
185
|
-
[`${this.dropShadowableClassPrefix}${
|
|
186
|
-
[`${this.shadowableClassPrefix}${
|
|
204
|
+
[`${this.dropShadowableClassPrefix}${e}`]: !!this.dropShadow,
|
|
205
|
+
[`${this.shadowableClassPrefix}${t}`]: !!this.shadow
|
|
187
206
|
};
|
|
188
207
|
}
|
|
189
208
|
}
|
|
190
209
|
});
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
210
|
+
var At = typeof global == "object" && global && global.Object === Object && global;
|
|
211
|
+
const Ae = At;
|
|
212
|
+
var Ot = typeof self == "object" && self && self.Object === Object && self, Et = Ae || Ot || Function("return this")();
|
|
213
|
+
const h = Et;
|
|
214
|
+
var wt = h.Symbol;
|
|
215
|
+
const C = wt;
|
|
216
|
+
var Oe = Object.prototype, kt = Oe.hasOwnProperty, xt = Oe.toString, A = C ? C.toStringTag : void 0;
|
|
217
|
+
function Ft(e) {
|
|
218
|
+
var t = kt.call(e, A), r = e[A];
|
|
219
|
+
try {
|
|
220
|
+
e[A] = void 0;
|
|
221
|
+
var o = !0;
|
|
222
|
+
} catch {
|
|
223
|
+
}
|
|
224
|
+
var n = xt.call(e);
|
|
225
|
+
return o && (t ? e[A] = r : delete e[A]), n;
|
|
226
|
+
}
|
|
227
|
+
var zt = Object.prototype, Bt = zt.toString;
|
|
228
|
+
function It(e) {
|
|
229
|
+
return Bt.call(e);
|
|
230
|
+
}
|
|
231
|
+
var Nt = "[object Null]", Vt = "[object Undefined]", te = C ? C.toStringTag : void 0;
|
|
232
|
+
function y(e) {
|
|
233
|
+
return e == null ? e === void 0 ? Vt : Nt : te && te in Object(e) ? Ft(e) : It(e);
|
|
234
|
+
}
|
|
235
|
+
function x(e) {
|
|
236
|
+
return e != null && typeof e == "object";
|
|
237
|
+
}
|
|
238
|
+
var Tt = "[object Symbol]";
|
|
239
|
+
function Mt(e) {
|
|
240
|
+
return typeof e == "symbol" || x(e) && y(e) == Tt;
|
|
241
|
+
}
|
|
242
|
+
function Lt(e, t) {
|
|
243
|
+
for (var r = -1, o = e == null ? 0 : e.length, n = Array(o); ++r < o; )
|
|
244
|
+
n[r] = t(e[r], r, e);
|
|
245
|
+
return n;
|
|
246
|
+
}
|
|
247
|
+
var Pt = Array.isArray;
|
|
248
|
+
const Ee = Pt;
|
|
249
|
+
var Rt = 1 / 0, re = C ? C.prototype : void 0, oe = re ? re.toString : void 0;
|
|
250
|
+
function we(e) {
|
|
251
|
+
if (typeof e == "string")
|
|
252
|
+
return e;
|
|
253
|
+
if (Ee(e))
|
|
254
|
+
return Lt(e, we) + "";
|
|
255
|
+
if (Mt(e))
|
|
256
|
+
return oe ? oe.call(e) : "";
|
|
257
|
+
var t = e + "";
|
|
258
|
+
return t == "0" && 1 / e == -Rt ? "-0" : t;
|
|
259
|
+
}
|
|
260
|
+
function Q(e) {
|
|
261
|
+
var t = typeof e;
|
|
262
|
+
return e != null && (t == "object" || t == "function");
|
|
263
|
+
}
|
|
264
|
+
var Dt = "[object AsyncFunction]", Ut = "[object Function]", Zt = "[object GeneratorFunction]", Ht = "[object Proxy]";
|
|
265
|
+
function ke(e) {
|
|
266
|
+
if (!Q(e))
|
|
267
|
+
return !1;
|
|
268
|
+
var t = y(e);
|
|
269
|
+
return t == Ut || t == Zt || t == Dt || t == Ht;
|
|
270
|
+
}
|
|
271
|
+
var Wt = h["__core-js_shared__"];
|
|
272
|
+
const U = Wt;
|
|
273
|
+
var ne = function() {
|
|
274
|
+
var e = /[^.]+$/.exec(U && U.keys && U.keys.IE_PROTO || "");
|
|
275
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
276
|
+
}();
|
|
277
|
+
function _t(e) {
|
|
278
|
+
return !!ne && ne in e;
|
|
279
|
+
}
|
|
280
|
+
var Gt = Function.prototype, qt = Gt.toString;
|
|
281
|
+
function v(e) {
|
|
282
|
+
if (e != null) {
|
|
283
|
+
try {
|
|
284
|
+
return qt.call(e);
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
return e + "";
|
|
289
|
+
} catch {
|
|
197
290
|
}
|
|
198
|
-
|
|
199
|
-
|
|
291
|
+
}
|
|
292
|
+
return "";
|
|
293
|
+
}
|
|
294
|
+
var Jt = /[\\^$.*+?()[\]{}|]/g, Yt = /^\[object .+?Constructor\]$/, Kt = Function.prototype, Qt = Object.prototype, Xt = Kt.toString, er = Qt.hasOwnProperty, tr = RegExp(
|
|
295
|
+
"^" + Xt.call(er).replace(Jt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
296
|
+
);
|
|
297
|
+
function rr(e) {
|
|
298
|
+
if (!Q(e) || _t(e))
|
|
299
|
+
return !1;
|
|
300
|
+
var t = ke(e) ? tr : Yt;
|
|
301
|
+
return t.test(v(e));
|
|
302
|
+
}
|
|
303
|
+
function or(e, t) {
|
|
304
|
+
return e == null ? void 0 : e[t];
|
|
305
|
+
}
|
|
306
|
+
function F(e, t) {
|
|
307
|
+
var r = or(e, t);
|
|
308
|
+
return rr(r) ? r : void 0;
|
|
309
|
+
}
|
|
310
|
+
var nr = F(h, "WeakMap");
|
|
311
|
+
const G = nr;
|
|
312
|
+
var ir = 9007199254740991;
|
|
313
|
+
function xe(e) {
|
|
314
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ir;
|
|
315
|
+
}
|
|
316
|
+
function sr(e) {
|
|
317
|
+
return e != null && xe(e.length) && !ke(e);
|
|
318
|
+
}
|
|
319
|
+
var ar = Object.prototype;
|
|
320
|
+
function Fe(e) {
|
|
321
|
+
var t = e && e.constructor, r = typeof t == "function" && t.prototype || ar;
|
|
322
|
+
return e === r;
|
|
323
|
+
}
|
|
324
|
+
var lr = "[object Arguments]";
|
|
325
|
+
function ie(e) {
|
|
326
|
+
return x(e) && y(e) == lr;
|
|
327
|
+
}
|
|
328
|
+
var ze = Object.prototype, ur = ze.hasOwnProperty, cr = ze.propertyIsEnumerable, dr = ie(function() {
|
|
329
|
+
return arguments;
|
|
330
|
+
}()) ? ie : function(e) {
|
|
331
|
+
return x(e) && ur.call(e, "callee") && !cr.call(e, "callee");
|
|
200
332
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return
|
|
212
|
-
}
|
|
213
|
-
function
|
|
214
|
-
return
|
|
215
|
-
return
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
333
|
+
const hr = dr;
|
|
334
|
+
function fr() {
|
|
335
|
+
return !1;
|
|
336
|
+
}
|
|
337
|
+
var Be = typeof exports == "object" && exports && !exports.nodeType && exports, se = Be && typeof module == "object" && module && !module.nodeType && module, pr = se && se.exports === Be, ae = pr ? h.Buffer : void 0, yr = ae ? ae.isBuffer : void 0, vr = yr || fr;
|
|
338
|
+
const br = vr;
|
|
339
|
+
var mr = "[object Arguments]", gr = "[object Array]", jr = "[object Boolean]", $r = "[object Date]", Cr = "[object Error]", Sr = "[object Function]", Ar = "[object Map]", Or = "[object Number]", Er = "[object Object]", wr = "[object RegExp]", kr = "[object Set]", xr = "[object String]", Fr = "[object WeakMap]", zr = "[object ArrayBuffer]", Br = "[object DataView]", Ir = "[object Float32Array]", Nr = "[object Float64Array]", Vr = "[object Int8Array]", Tr = "[object Int16Array]", Mr = "[object Int32Array]", Lr = "[object Uint8Array]", Pr = "[object Uint8ClampedArray]", Rr = "[object Uint16Array]", Dr = "[object Uint32Array]", i = {};
|
|
340
|
+
i[Ir] = i[Nr] = i[Vr] = i[Tr] = i[Mr] = i[Lr] = i[Pr] = i[Rr] = i[Dr] = !0;
|
|
341
|
+
i[mr] = i[gr] = i[zr] = i[jr] = i[Br] = i[$r] = i[Cr] = i[Sr] = i[Ar] = i[Or] = i[Er] = i[wr] = i[kr] = i[xr] = i[Fr] = !1;
|
|
342
|
+
function Ur(e) {
|
|
343
|
+
return x(e) && xe(e.length) && !!i[y(e)];
|
|
344
|
+
}
|
|
345
|
+
function Zr(e) {
|
|
346
|
+
return function(t) {
|
|
347
|
+
return e(t);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
var Ie = typeof exports == "object" && exports && !exports.nodeType && exports, k = Ie && typeof module == "object" && module && !module.nodeType && module, Hr = k && k.exports === Ie, Z = Hr && Ae.process, Wr = function() {
|
|
351
|
+
try {
|
|
352
|
+
var e = k && k.require && k.require("util").types;
|
|
353
|
+
return e || Z && Z.binding && Z.binding("util");
|
|
354
|
+
} catch {
|
|
355
|
+
}
|
|
356
|
+
}();
|
|
357
|
+
const le = Wr;
|
|
358
|
+
var ue = le && le.isTypedArray, _r = ue ? Zr(ue) : Ur;
|
|
359
|
+
const Gr = _r;
|
|
360
|
+
function Ne(e, t) {
|
|
361
|
+
return function(r) {
|
|
362
|
+
return e(t(r));
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
var qr = Ne(Object.keys, Object);
|
|
366
|
+
const Jr = qr;
|
|
367
|
+
var Yr = Object.prototype, Kr = Yr.hasOwnProperty;
|
|
368
|
+
function Qr(e) {
|
|
369
|
+
if (!Fe(e))
|
|
370
|
+
return Jr(e);
|
|
371
|
+
var t = [];
|
|
372
|
+
for (var r in Object(e))
|
|
373
|
+
Kr.call(e, r) && r != "constructor" && t.push(r);
|
|
374
|
+
return t;
|
|
375
|
+
}
|
|
376
|
+
var Xr = F(h, "Map");
|
|
377
|
+
const q = Xr;
|
|
378
|
+
function Ve(e) {
|
|
379
|
+
return e == null ? "" : we(e);
|
|
380
|
+
}
|
|
381
|
+
var eo = Ne(Object.getPrototypeOf, Object);
|
|
382
|
+
const to = eo;
|
|
383
|
+
var ro = "[object Object]", oo = Function.prototype, no = Object.prototype, Te = oo.toString, io = no.hasOwnProperty, so = Te.call(Object);
|
|
384
|
+
function ao(e) {
|
|
385
|
+
if (!x(e) || y(e) != ro)
|
|
386
|
+
return !1;
|
|
387
|
+
var t = to(e);
|
|
388
|
+
if (t === null)
|
|
389
|
+
return !0;
|
|
390
|
+
var r = io.call(t, "constructor") && t.constructor;
|
|
391
|
+
return typeof r == "function" && r instanceof r && Te.call(r) == so;
|
|
392
|
+
}
|
|
393
|
+
function lo(e, t, r, o) {
|
|
394
|
+
var n = -1, u = e == null ? 0 : e.length;
|
|
395
|
+
for (o && u && (r = e[++n]); ++n < u; )
|
|
396
|
+
r = t(r, e[n], n, e);
|
|
397
|
+
return r;
|
|
398
|
+
}
|
|
399
|
+
function uo(e) {
|
|
400
|
+
return function(t) {
|
|
401
|
+
return e == null ? void 0 : e[t];
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
var co = {
|
|
405
|
+
// Latin-1 Supplement block.
|
|
406
|
+
À: "A",
|
|
407
|
+
Á: "A",
|
|
408
|
+
Â: "A",
|
|
409
|
+
Ã: "A",
|
|
410
|
+
Ä: "A",
|
|
411
|
+
Å: "A",
|
|
412
|
+
à: "a",
|
|
413
|
+
á: "a",
|
|
414
|
+
â: "a",
|
|
415
|
+
ã: "a",
|
|
416
|
+
ä: "a",
|
|
417
|
+
å: "a",
|
|
418
|
+
Ç: "C",
|
|
419
|
+
ç: "c",
|
|
420
|
+
Ð: "D",
|
|
421
|
+
ð: "d",
|
|
422
|
+
È: "E",
|
|
423
|
+
É: "E",
|
|
424
|
+
Ê: "E",
|
|
425
|
+
Ë: "E",
|
|
426
|
+
è: "e",
|
|
427
|
+
é: "e",
|
|
428
|
+
ê: "e",
|
|
429
|
+
ë: "e",
|
|
430
|
+
Ì: "I",
|
|
431
|
+
Í: "I",
|
|
432
|
+
Î: "I",
|
|
433
|
+
Ï: "I",
|
|
434
|
+
ì: "i",
|
|
435
|
+
í: "i",
|
|
436
|
+
î: "i",
|
|
437
|
+
ï: "i",
|
|
438
|
+
Ñ: "N",
|
|
439
|
+
ñ: "n",
|
|
440
|
+
Ò: "O",
|
|
441
|
+
Ó: "O",
|
|
442
|
+
Ô: "O",
|
|
443
|
+
Õ: "O",
|
|
444
|
+
Ö: "O",
|
|
445
|
+
Ø: "O",
|
|
446
|
+
ò: "o",
|
|
447
|
+
ó: "o",
|
|
448
|
+
ô: "o",
|
|
449
|
+
õ: "o",
|
|
450
|
+
ö: "o",
|
|
451
|
+
ø: "o",
|
|
452
|
+
Ù: "U",
|
|
453
|
+
Ú: "U",
|
|
454
|
+
Û: "U",
|
|
455
|
+
Ü: "U",
|
|
456
|
+
ù: "u",
|
|
457
|
+
ú: "u",
|
|
458
|
+
û: "u",
|
|
459
|
+
ü: "u",
|
|
460
|
+
Ý: "Y",
|
|
461
|
+
ý: "y",
|
|
462
|
+
ÿ: "y",
|
|
463
|
+
Æ: "Ae",
|
|
464
|
+
æ: "ae",
|
|
465
|
+
Þ: "Th",
|
|
466
|
+
þ: "th",
|
|
467
|
+
ß: "ss",
|
|
468
|
+
// Latin Extended-A block.
|
|
469
|
+
Ā: "A",
|
|
470
|
+
Ă: "A",
|
|
471
|
+
Ą: "A",
|
|
472
|
+
ā: "a",
|
|
473
|
+
ă: "a",
|
|
474
|
+
ą: "a",
|
|
475
|
+
Ć: "C",
|
|
476
|
+
Ĉ: "C",
|
|
477
|
+
Ċ: "C",
|
|
478
|
+
Č: "C",
|
|
479
|
+
ć: "c",
|
|
480
|
+
ĉ: "c",
|
|
481
|
+
ċ: "c",
|
|
482
|
+
č: "c",
|
|
483
|
+
Ď: "D",
|
|
484
|
+
Đ: "D",
|
|
485
|
+
ď: "d",
|
|
486
|
+
đ: "d",
|
|
487
|
+
Ē: "E",
|
|
488
|
+
Ĕ: "E",
|
|
489
|
+
Ė: "E",
|
|
490
|
+
Ę: "E",
|
|
491
|
+
Ě: "E",
|
|
492
|
+
ē: "e",
|
|
493
|
+
ĕ: "e",
|
|
494
|
+
ė: "e",
|
|
495
|
+
ę: "e",
|
|
496
|
+
ě: "e",
|
|
497
|
+
Ĝ: "G",
|
|
498
|
+
Ğ: "G",
|
|
499
|
+
Ġ: "G",
|
|
500
|
+
Ģ: "G",
|
|
501
|
+
ĝ: "g",
|
|
502
|
+
ğ: "g",
|
|
503
|
+
ġ: "g",
|
|
504
|
+
ģ: "g",
|
|
505
|
+
Ĥ: "H",
|
|
506
|
+
Ħ: "H",
|
|
507
|
+
ĥ: "h",
|
|
508
|
+
ħ: "h",
|
|
509
|
+
Ĩ: "I",
|
|
510
|
+
Ī: "I",
|
|
511
|
+
Ĭ: "I",
|
|
512
|
+
Į: "I",
|
|
513
|
+
İ: "I",
|
|
514
|
+
ĩ: "i",
|
|
515
|
+
ī: "i",
|
|
516
|
+
ĭ: "i",
|
|
517
|
+
į: "i",
|
|
518
|
+
ı: "i",
|
|
519
|
+
Ĵ: "J",
|
|
520
|
+
ĵ: "j",
|
|
521
|
+
Ķ: "K",
|
|
522
|
+
ķ: "k",
|
|
523
|
+
ĸ: "k",
|
|
524
|
+
Ĺ: "L",
|
|
525
|
+
Ļ: "L",
|
|
526
|
+
Ľ: "L",
|
|
527
|
+
Ŀ: "L",
|
|
528
|
+
Ł: "L",
|
|
529
|
+
ĺ: "l",
|
|
530
|
+
ļ: "l",
|
|
531
|
+
ľ: "l",
|
|
532
|
+
ŀ: "l",
|
|
533
|
+
ł: "l",
|
|
534
|
+
Ń: "N",
|
|
535
|
+
Ņ: "N",
|
|
536
|
+
Ň: "N",
|
|
537
|
+
Ŋ: "N",
|
|
538
|
+
ń: "n",
|
|
539
|
+
ņ: "n",
|
|
540
|
+
ň: "n",
|
|
541
|
+
ŋ: "n",
|
|
542
|
+
Ō: "O",
|
|
543
|
+
Ŏ: "O",
|
|
544
|
+
Ő: "O",
|
|
545
|
+
ō: "o",
|
|
546
|
+
ŏ: "o",
|
|
547
|
+
ő: "o",
|
|
548
|
+
Ŕ: "R",
|
|
549
|
+
Ŗ: "R",
|
|
550
|
+
Ř: "R",
|
|
551
|
+
ŕ: "r",
|
|
552
|
+
ŗ: "r",
|
|
553
|
+
ř: "r",
|
|
554
|
+
Ś: "S",
|
|
555
|
+
Ŝ: "S",
|
|
556
|
+
Ş: "S",
|
|
557
|
+
Š: "S",
|
|
558
|
+
ś: "s",
|
|
559
|
+
ŝ: "s",
|
|
560
|
+
ş: "s",
|
|
561
|
+
š: "s",
|
|
562
|
+
Ţ: "T",
|
|
563
|
+
Ť: "T",
|
|
564
|
+
Ŧ: "T",
|
|
565
|
+
ţ: "t",
|
|
566
|
+
ť: "t",
|
|
567
|
+
ŧ: "t",
|
|
568
|
+
Ũ: "U",
|
|
569
|
+
Ū: "U",
|
|
570
|
+
Ŭ: "U",
|
|
571
|
+
Ů: "U",
|
|
572
|
+
Ű: "U",
|
|
573
|
+
Ų: "U",
|
|
574
|
+
ũ: "u",
|
|
575
|
+
ū: "u",
|
|
576
|
+
ŭ: "u",
|
|
577
|
+
ů: "u",
|
|
578
|
+
ű: "u",
|
|
579
|
+
ų: "u",
|
|
580
|
+
Ŵ: "W",
|
|
581
|
+
ŵ: "w",
|
|
582
|
+
Ŷ: "Y",
|
|
583
|
+
ŷ: "y",
|
|
584
|
+
Ÿ: "Y",
|
|
585
|
+
Ź: "Z",
|
|
586
|
+
Ż: "Z",
|
|
587
|
+
Ž: "Z",
|
|
588
|
+
ź: "z",
|
|
589
|
+
ż: "z",
|
|
590
|
+
ž: "z",
|
|
591
|
+
IJ: "IJ",
|
|
592
|
+
ij: "ij",
|
|
593
|
+
Œ: "Oe",
|
|
594
|
+
œ: "oe",
|
|
595
|
+
ʼn: "'n",
|
|
596
|
+
ſ: "s"
|
|
597
|
+
}, ho = uo(co);
|
|
598
|
+
const fo = ho;
|
|
599
|
+
var po = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, yo = "\\u0300-\\u036f", vo = "\\ufe20-\\ufe2f", bo = "\\u20d0-\\u20ff", mo = yo + vo + bo, go = "[" + mo + "]", jo = RegExp(go, "g");
|
|
600
|
+
function $o(e) {
|
|
601
|
+
return e = Ve(e), e && e.replace(po, fo).replace(jo, "");
|
|
602
|
+
}
|
|
603
|
+
var Co = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
604
|
+
function So(e) {
|
|
605
|
+
return e.match(Co) || [];
|
|
606
|
+
}
|
|
607
|
+
var Ao = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
608
|
+
function Oo(e) {
|
|
609
|
+
return Ao.test(e);
|
|
610
|
+
}
|
|
611
|
+
var Me = "\\ud800-\\udfff", Eo = "\\u0300-\\u036f", wo = "\\ufe20-\\ufe2f", ko = "\\u20d0-\\u20ff", xo = Eo + wo + ko, Le = "\\u2700-\\u27bf", Pe = "a-z\\xdf-\\xf6\\xf8-\\xff", Fo = "\\xac\\xb1\\xd7\\xf7", zo = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Bo = "\\u2000-\\u206f", Io = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Re = "A-Z\\xc0-\\xd6\\xd8-\\xde", No = "\\ufe0e\\ufe0f", De = Fo + zo + Bo + Io, Ue = "['’]", ce = "[" + De + "]", Vo = "[" + xo + "]", Ze = "\\d+", To = "[" + Le + "]", He = "[" + Pe + "]", We = "[^" + Me + De + Ze + Le + Pe + Re + "]", Mo = "\\ud83c[\\udffb-\\udfff]", Lo = "(?:" + Vo + "|" + Mo + ")", Po = "[^" + Me + "]", _e = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ge = "[\\ud800-\\udbff][\\udc00-\\udfff]", j = "[" + Re + "]", Ro = "\\u200d", de = "(?:" + He + "|" + We + ")", Do = "(?:" + j + "|" + We + ")", he = "(?:" + Ue + "(?:d|ll|m|re|s|t|ve))?", fe = "(?:" + Ue + "(?:D|LL|M|RE|S|T|VE))?", qe = Lo + "?", Je = "[" + No + "]?", Uo = "(?:" + Ro + "(?:" + [Po, _e, Ge].join("|") + ")" + Je + qe + ")*", Zo = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ho = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Wo = Je + qe + Uo, _o = "(?:" + [To, _e, Ge].join("|") + ")" + Wo, Go = RegExp([
|
|
612
|
+
j + "?" + He + "+" + he + "(?=" + [ce, j, "$"].join("|") + ")",
|
|
613
|
+
Do + "+" + fe + "(?=" + [ce, j + de, "$"].join("|") + ")",
|
|
614
|
+
j + "?" + de + "+" + he,
|
|
615
|
+
j + "+" + fe,
|
|
616
|
+
Ho,
|
|
617
|
+
Zo,
|
|
618
|
+
Ze,
|
|
619
|
+
_o
|
|
620
|
+
].join("|"), "g");
|
|
621
|
+
function qo(e) {
|
|
622
|
+
return e.match(Go) || [];
|
|
623
|
+
}
|
|
624
|
+
function Jo(e, t, r) {
|
|
625
|
+
return e = Ve(e), t = r ? void 0 : t, t === void 0 ? Oo(e) ? qo(e) : So(e) : e.match(t) || [];
|
|
626
|
+
}
|
|
627
|
+
var Yo = "['’]", Ko = RegExp(Yo, "g");
|
|
628
|
+
function Qo(e) {
|
|
629
|
+
return function(t) {
|
|
630
|
+
return lo(Jo($o(t).replace(Ko, "")), e, "");
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
var Xo = F(h, "DataView");
|
|
634
|
+
const J = Xo;
|
|
635
|
+
var en = F(h, "Promise");
|
|
636
|
+
const Y = en;
|
|
637
|
+
var tn = F(h, "Set");
|
|
638
|
+
const K = tn;
|
|
639
|
+
var pe = "[object Map]", rn = "[object Object]", ye = "[object Promise]", ve = "[object Set]", be = "[object WeakMap]", me = "[object DataView]", on = v(J), nn = v(q), sn = v(Y), an = v(K), ln = v(G), f = y;
|
|
640
|
+
(J && f(new J(new ArrayBuffer(1))) != me || q && f(new q()) != pe || Y && f(Y.resolve()) != ye || K && f(new K()) != ve || G && f(new G()) != be) && (f = function(e) {
|
|
641
|
+
var t = y(e), r = t == rn ? e.constructor : void 0, o = r ? v(r) : "";
|
|
642
|
+
if (o)
|
|
643
|
+
switch (o) {
|
|
644
|
+
case on:
|
|
645
|
+
return me;
|
|
646
|
+
case nn:
|
|
647
|
+
return pe;
|
|
648
|
+
case sn:
|
|
649
|
+
return ye;
|
|
650
|
+
case an:
|
|
651
|
+
return ve;
|
|
652
|
+
case ln:
|
|
653
|
+
return be;
|
|
654
|
+
}
|
|
655
|
+
return t;
|
|
656
|
+
});
|
|
657
|
+
const un = f;
|
|
658
|
+
var cn = "[object Map]", dn = "[object Set]", hn = Object.prototype, fn = hn.hasOwnProperty;
|
|
659
|
+
function pn(e) {
|
|
660
|
+
if (e == null)
|
|
661
|
+
return !0;
|
|
662
|
+
if (sr(e) && (Ee(e) || typeof e == "string" || typeof e.splice == "function" || br(e) || Gr(e) || hr(e)))
|
|
663
|
+
return !e.length;
|
|
664
|
+
var t = un(e);
|
|
665
|
+
if (t == cn || t == dn)
|
|
666
|
+
return !e.size;
|
|
667
|
+
if (Fe(e))
|
|
668
|
+
return !Qr(e).length;
|
|
669
|
+
for (var r in e)
|
|
670
|
+
if (fn.call(e, r))
|
|
671
|
+
return !1;
|
|
672
|
+
return !0;
|
|
673
|
+
}
|
|
674
|
+
var yn = Qo(function(e, t, r) {
|
|
675
|
+
return e + (r ? "-" : "") + t.toLowerCase();
|
|
676
|
+
});
|
|
677
|
+
const N = yn, vn = /* @__PURE__ */ p({
|
|
678
|
+
__name: "FormControlErrors",
|
|
679
|
+
props: {
|
|
680
|
+
error: null,
|
|
681
|
+
errors: null,
|
|
682
|
+
name: null,
|
|
683
|
+
id: null
|
|
684
|
+
},
|
|
685
|
+
setup(e) {
|
|
686
|
+
const t = e, r = String((t == null ? void 0 : t.id) || (t == null ? void 0 : t.name)), o = et(() => t.error ? /* @__PURE__ */ new Map(
|
|
687
|
+
[[r, [t.error]]]
|
|
688
|
+
) : ao(t.errors) ? new Map(
|
|
689
|
+
Object.entries(t.errors)
|
|
690
|
+
) : Array.isArray(t.errors) ? /* @__PURE__ */ new Map(
|
|
691
|
+
[[r, t.errors]]
|
|
692
|
+
) : /* @__PURE__ */ new Map());
|
|
693
|
+
return (n, u) => (a(!0), d($e, null, Ce(P(o).get(P(r)), (b) => c(n.$slots, "default", E(w({ key: P(r), error: b })))), 256));
|
|
694
|
+
}
|
|
695
|
+
}), bn = /* @__PURE__ */ p({
|
|
696
|
+
__name: "FormControlFeedback",
|
|
697
|
+
props: {
|
|
698
|
+
feedback: null
|
|
699
|
+
},
|
|
700
|
+
setup(e) {
|
|
701
|
+
return (t, r) => (a(!0), d($e, null, Ce([].concat(e.feedback), (o) => c(t.$slots, "default", E(w({ feedback: o })))), 256));
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
function ge(e, t, r = "-") {
|
|
705
|
+
const o = String(t).replace(new RegExp(`^${e}${r}?`), "");
|
|
226
706
|
return [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
].filter((
|
|
707
|
+
N(o),
|
|
708
|
+
e
|
|
709
|
+
].filter((n) => !!n).join(r);
|
|
230
710
|
}
|
|
231
|
-
|
|
232
|
-
|
|
711
|
+
const mn = p({
|
|
712
|
+
components: {
|
|
713
|
+
FormControlErrors: vn,
|
|
714
|
+
FormControlFeedback: bn
|
|
715
|
+
},
|
|
716
|
+
directives: {
|
|
717
|
+
bindEvents: {
|
|
718
|
+
created(e, t) {
|
|
719
|
+
var r, o;
|
|
720
|
+
(o = (r = t.instance) == null ? void 0 : r.bindEvents) == null || o.call(r, e);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
mixins: [
|
|
725
|
+
Se
|
|
726
|
+
],
|
|
727
|
+
inheritAttrs: !1,
|
|
728
|
+
props: {
|
|
729
|
+
/**
|
|
730
|
+
* Show type activity indicator.
|
|
731
|
+
*/
|
|
732
|
+
activity: {
|
|
733
|
+
type: Boolean,
|
|
734
|
+
default: !1
|
|
735
|
+
},
|
|
736
|
+
/**
|
|
737
|
+
* Animate floating labels inside the input.
|
|
738
|
+
*/
|
|
739
|
+
animated: {
|
|
740
|
+
type: Boolean,
|
|
741
|
+
default: () => l("animated", !1)
|
|
742
|
+
},
|
|
743
|
+
/**
|
|
744
|
+
* Additional classes assigned to the control element. These do not
|
|
745
|
+
* override any of the classes assigned by the FormControl.
|
|
746
|
+
*/
|
|
747
|
+
controlClass: {
|
|
748
|
+
type: [Array, Object, String],
|
|
749
|
+
default: void 0
|
|
750
|
+
},
|
|
751
|
+
/**
|
|
752
|
+
* An inline field validation error.
|
|
753
|
+
*/
|
|
754
|
+
error: {
|
|
755
|
+
type: [String, Array, Boolean],
|
|
756
|
+
default: void 0
|
|
757
|
+
},
|
|
758
|
+
/**
|
|
759
|
+
* An inline field validation errors passed as object with key/value
|
|
760
|
+
* pairs. If errors passed as an object, the form name will be used for
|
|
761
|
+
* the key.
|
|
762
|
+
*/
|
|
763
|
+
errors: {
|
|
764
|
+
type: [Array, Object, Boolean],
|
|
765
|
+
default() {
|
|
766
|
+
return {};
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
/**
|
|
770
|
+
* Some feedback to add to the field once the field is successfully
|
|
771
|
+
* valid.
|
|
772
|
+
*/
|
|
773
|
+
feedback: {
|
|
774
|
+
type: [String, Array],
|
|
775
|
+
default: void 0
|
|
776
|
+
},
|
|
777
|
+
/**
|
|
778
|
+
* The primary class assigned to the form control.
|
|
779
|
+
*/
|
|
780
|
+
formControlClass: {
|
|
781
|
+
type: [Array, Object, String],
|
|
782
|
+
default: () => l("controlClass", "form-control")
|
|
783
|
+
},
|
|
784
|
+
/**
|
|
785
|
+
* Add form-group wrapper to input.
|
|
786
|
+
*/
|
|
787
|
+
group: {
|
|
788
|
+
type: Boolean,
|
|
789
|
+
default: () => l("group", !0)
|
|
790
|
+
},
|
|
791
|
+
/**
|
|
792
|
+
* Some instructions to appear under the field label.
|
|
793
|
+
*/
|
|
794
|
+
helpText: {
|
|
795
|
+
type: [Number, String],
|
|
796
|
+
default: void 0
|
|
797
|
+
},
|
|
798
|
+
/**
|
|
799
|
+
* The activity indicator type.
|
|
800
|
+
*/
|
|
801
|
+
indicator: {
|
|
802
|
+
type: [Object, String, Boolean],
|
|
803
|
+
default: () => l("indicator", "spinner")
|
|
804
|
+
},
|
|
805
|
+
/**
|
|
806
|
+
* The activity indicator size.
|
|
807
|
+
*/
|
|
808
|
+
indicatorSize: {
|
|
809
|
+
type: String,
|
|
810
|
+
default: void 0
|
|
811
|
+
},
|
|
812
|
+
/**
|
|
813
|
+
* Force the input to be invalid.
|
|
814
|
+
*/
|
|
815
|
+
invalid: Boolean,
|
|
816
|
+
/**
|
|
817
|
+
* The value of label element. If no value, no label will appear.
|
|
818
|
+
*/
|
|
819
|
+
label: {
|
|
820
|
+
type: [Number, String],
|
|
821
|
+
default: void 0
|
|
822
|
+
},
|
|
823
|
+
/**
|
|
824
|
+
* The default label class assigned to the label element.
|
|
825
|
+
*/
|
|
826
|
+
labelClass: {
|
|
827
|
+
type: [Object, String],
|
|
828
|
+
default: () => l("labelClass", "form-label")
|
|
829
|
+
},
|
|
830
|
+
/**
|
|
831
|
+
* The model default value.
|
|
832
|
+
*/
|
|
833
|
+
modelValue: {
|
|
834
|
+
type: [Boolean, Number, String, Array, Object],
|
|
835
|
+
default: void 0
|
|
836
|
+
},
|
|
837
|
+
/**
|
|
838
|
+
* Should the control look like plaintext.
|
|
839
|
+
*/
|
|
840
|
+
plaintext: Boolean,
|
|
841
|
+
/**
|
|
842
|
+
* The size of the form control.
|
|
843
|
+
*/
|
|
844
|
+
size: {
|
|
845
|
+
type: String,
|
|
846
|
+
default: void 0
|
|
847
|
+
},
|
|
848
|
+
/**
|
|
849
|
+
* Force the input to be valid.
|
|
850
|
+
*/
|
|
851
|
+
valid: Boolean
|
|
852
|
+
},
|
|
853
|
+
emits: [
|
|
854
|
+
"focus",
|
|
855
|
+
"blur",
|
|
856
|
+
"change",
|
|
857
|
+
"click",
|
|
858
|
+
"keypress",
|
|
859
|
+
"keyup",
|
|
860
|
+
"keydown",
|
|
861
|
+
"progress",
|
|
862
|
+
"paste",
|
|
863
|
+
"update:modelValue"
|
|
864
|
+
],
|
|
865
|
+
data() {
|
|
866
|
+
return {
|
|
867
|
+
currentValue: null,
|
|
868
|
+
hasChanged: !1,
|
|
869
|
+
hasFocus: !1,
|
|
870
|
+
isDirty: !1
|
|
871
|
+
};
|
|
872
|
+
},
|
|
873
|
+
computed: {
|
|
874
|
+
model: {
|
|
875
|
+
get() {
|
|
876
|
+
return this.getModelValue();
|
|
877
|
+
},
|
|
878
|
+
set(e) {
|
|
879
|
+
this.setModelValue(e);
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
id() {
|
|
883
|
+
return this.$attrs.id || Math.random().toString(36).slice(2);
|
|
884
|
+
},
|
|
885
|
+
isEmpty() {
|
|
886
|
+
return pn(this.model);
|
|
887
|
+
},
|
|
888
|
+
isInvalid() {
|
|
889
|
+
return !!(this.invalid || this.error || (Array.isArray(this.errors) ? this.errors.length : this.errors[this.$attrs.id || this.$attrs.name]));
|
|
890
|
+
},
|
|
891
|
+
isValid() {
|
|
892
|
+
return !!(this.valid || this.feedback);
|
|
893
|
+
},
|
|
894
|
+
componentName() {
|
|
895
|
+
return this.$options.name;
|
|
896
|
+
},
|
|
897
|
+
controlAttributes() {
|
|
898
|
+
return Object.assign({}, this.$attrs, {
|
|
899
|
+
id: this.id,
|
|
900
|
+
class: this.controlClasses
|
|
901
|
+
// value: this.model
|
|
902
|
+
});
|
|
903
|
+
},
|
|
904
|
+
controlClasses() {
|
|
905
|
+
return Object.assign({
|
|
906
|
+
[this.controlClass]: !!this.controlClass,
|
|
907
|
+
[this.controlSizeClass]: !!this.controlSizeClass,
|
|
908
|
+
[this.formControlClass]: !!this.formControlClass,
|
|
909
|
+
[this.plaintextClass]: this.plaintext,
|
|
910
|
+
"form-control-icon": !!this.$slots.icon,
|
|
911
|
+
"is-valid": this.isValid,
|
|
912
|
+
"is-invalid": this.isInvalid
|
|
913
|
+
}, this.shadowableClass);
|
|
914
|
+
},
|
|
915
|
+
controlSizeClass() {
|
|
916
|
+
return ge(this.size, this.formControlClass);
|
|
917
|
+
},
|
|
918
|
+
formGroupClasses() {
|
|
919
|
+
return Object.assign({
|
|
920
|
+
animated: this.animated,
|
|
921
|
+
"form-group": this.group,
|
|
922
|
+
"has-activity": this.activity,
|
|
923
|
+
"has-changed": this.hasChanged,
|
|
924
|
+
"has-focus": this.hasFocus,
|
|
925
|
+
"has-icon": !!this.$slots.icon,
|
|
926
|
+
"is-dirty": this.isDirty,
|
|
927
|
+
"is-empty": this.isEmpty,
|
|
928
|
+
"is-invalid": this.isInvalid,
|
|
929
|
+
"is-valid": this.isValid,
|
|
930
|
+
[this.$attrs.class]: !!this.$attrs.class,
|
|
931
|
+
[this.size && ge(this.size, this.componentName)]: !!this.size
|
|
932
|
+
}, !!this.componentName && {
|
|
933
|
+
[N(this.componentName)]: !0
|
|
934
|
+
});
|
|
935
|
+
},
|
|
936
|
+
plaintextClass() {
|
|
937
|
+
return "form-control-plaintext";
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
methods: {
|
|
941
|
+
bindEvents(e) {
|
|
942
|
+
for (const t of this.$options.emits)
|
|
943
|
+
e.addEventListener(t, (r) => {
|
|
944
|
+
this.$emit(t, r);
|
|
945
|
+
});
|
|
946
|
+
e.addEventListener("focus", () => {
|
|
947
|
+
this.isDirty = !0, this.hasFocus = !0;
|
|
948
|
+
}), e.addEventListener("blur", () => {
|
|
949
|
+
this.hasFocus = !1;
|
|
950
|
+
});
|
|
951
|
+
},
|
|
952
|
+
blur() {
|
|
953
|
+
var e;
|
|
954
|
+
(e = this.$refs.field) == null || e.blur();
|
|
955
|
+
},
|
|
956
|
+
focus() {
|
|
957
|
+
var e;
|
|
958
|
+
(e = this.$refs.field) == null || e.focus();
|
|
959
|
+
},
|
|
960
|
+
getFieldErrors() {
|
|
961
|
+
let e = this.error || this.errors;
|
|
962
|
+
return this.errors && !Array.isArray(this.errors) && (e = this.errors[this.$attrs.name || this.$attrs.id]), !e || Array.isArray(e) || Q(e) ? e : [e];
|
|
963
|
+
},
|
|
964
|
+
getModelValue() {
|
|
965
|
+
return this.modelValue !== void 0 ? this.modelValue : this.currentValue;
|
|
966
|
+
},
|
|
967
|
+
setModelValue(e) {
|
|
968
|
+
this.hasChanged = !0, this.currentValue = e, this.$emit("update:modelValue", e);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
function H(e, t, r = "-") {
|
|
973
|
+
const o = String(t).replace(new RegExp(`^${e}${r}?`), "");
|
|
974
|
+
return [
|
|
975
|
+
N(o),
|
|
976
|
+
e
|
|
977
|
+
].filter((n) => !!n).join(r);
|
|
233
978
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
979
|
+
function je(e) {
|
|
980
|
+
return !Array.isArray(e) && typeof e == "object";
|
|
236
981
|
}
|
|
237
|
-
|
|
982
|
+
p({
|
|
238
983
|
directives: {
|
|
239
984
|
bindEvents: {
|
|
240
|
-
beforeMount(
|
|
241
|
-
var
|
|
242
|
-
(
|
|
985
|
+
beforeMount(e, t) {
|
|
986
|
+
var r, o;
|
|
987
|
+
(o = (r = t.instance) == null ? void 0 : r.bindEvents) == null || o.call(r, e);
|
|
243
988
|
}
|
|
244
989
|
}
|
|
245
990
|
},
|
|
246
991
|
mixins: [
|
|
247
|
-
|
|
992
|
+
Se
|
|
248
993
|
],
|
|
249
994
|
inheritAttrs: !1,
|
|
250
995
|
props: {
|
|
996
|
+
modelValue: {
|
|
997
|
+
default: void 0
|
|
998
|
+
},
|
|
999
|
+
/**
|
|
1000
|
+
* Show type activity indicator.
|
|
1001
|
+
*/
|
|
251
1002
|
activity: {
|
|
252
1003
|
type: Boolean,
|
|
253
1004
|
default: !1
|
|
254
1005
|
},
|
|
1006
|
+
/**
|
|
1007
|
+
* Animate floating labels inside the input.
|
|
1008
|
+
*/
|
|
255
1009
|
animated: {
|
|
256
1010
|
type: Boolean,
|
|
257
|
-
default: () =>
|
|
1011
|
+
default: () => l("animated", !1)
|
|
258
1012
|
},
|
|
1013
|
+
/**
|
|
1014
|
+
* An array of event names that correlate with callback functions.
|
|
1015
|
+
*/
|
|
259
1016
|
nativeEvents: {
|
|
260
1017
|
type: Array,
|
|
261
1018
|
default() {
|
|
262
1019
|
return ["focus", "blur", "change", "click", "keypress", "keyup", "keydown", "progress", "paste"];
|
|
263
1020
|
}
|
|
264
1021
|
},
|
|
1022
|
+
/**
|
|
1023
|
+
* The default class name assigned to the control element.
|
|
1024
|
+
*/
|
|
265
1025
|
defaultControlClass: {
|
|
266
1026
|
type: String,
|
|
267
|
-
default: () =>
|
|
1027
|
+
default: () => l("defaultControlClass", "form-control")
|
|
268
1028
|
},
|
|
1029
|
+
/**
|
|
1030
|
+
* An inline field validation error.
|
|
1031
|
+
*/
|
|
269
1032
|
error: {
|
|
270
1033
|
type: [String, Array, Boolean],
|
|
271
1034
|
default: void 0
|
|
272
1035
|
},
|
|
1036
|
+
/**
|
|
1037
|
+
* An inline field validation errors passed as object with key/value
|
|
1038
|
+
* pairs. If errors passed as an object, the form name will be used for
|
|
1039
|
+
* the key.
|
|
1040
|
+
*/
|
|
273
1041
|
errors: {
|
|
274
1042
|
type: [Array, Object, Boolean],
|
|
275
1043
|
default() {
|
|
276
1044
|
return {};
|
|
277
1045
|
}
|
|
278
1046
|
},
|
|
1047
|
+
/**
|
|
1048
|
+
* Some feedback to add to the field once the field is successfully
|
|
1049
|
+
* valid.
|
|
1050
|
+
*/
|
|
279
1051
|
feedback: {
|
|
280
1052
|
type: [String, Array],
|
|
281
1053
|
default: void 0
|
|
282
1054
|
},
|
|
1055
|
+
/**
|
|
1056
|
+
* Add form-group wrapper to input.
|
|
1057
|
+
*/
|
|
283
1058
|
group: {
|
|
284
1059
|
type: Boolean,
|
|
285
|
-
default: () =>
|
|
1060
|
+
default: () => l("group", !0)
|
|
286
1061
|
},
|
|
1062
|
+
/**
|
|
1063
|
+
* Some instructions to appear under the field label.
|
|
1064
|
+
*/
|
|
287
1065
|
helpText: {
|
|
288
1066
|
type: [Number, String],
|
|
289
1067
|
default: void 0
|
|
290
1068
|
},
|
|
1069
|
+
/**
|
|
1070
|
+
* Hide the label for browsers, but leave it for screen readers.
|
|
1071
|
+
*/
|
|
291
1072
|
hideLabel: Boolean,
|
|
1073
|
+
/**
|
|
1074
|
+
* The activity indicator type.
|
|
1075
|
+
*/
|
|
292
1076
|
indicator: {
|
|
293
|
-
type: String,
|
|
294
|
-
default: () =>
|
|
1077
|
+
type: [String, Boolean],
|
|
1078
|
+
default: () => l("indicator", "spinner")
|
|
295
1079
|
},
|
|
1080
|
+
/**
|
|
1081
|
+
* The activity indicator size.
|
|
1082
|
+
*/
|
|
296
1083
|
indicatorSize: {
|
|
297
1084
|
type: String,
|
|
298
1085
|
default: void 0
|
|
299
1086
|
},
|
|
1087
|
+
/**
|
|
1088
|
+
* Display the form field inline.
|
|
1089
|
+
*/
|
|
300
1090
|
inline: Boolean,
|
|
1091
|
+
/**
|
|
1092
|
+
* The invalid property.
|
|
1093
|
+
*/
|
|
301
1094
|
invalid: Boolean,
|
|
1095
|
+
/**
|
|
1096
|
+
* The value of label element. If no value, no label will appear.
|
|
1097
|
+
*/
|
|
302
1098
|
label: {
|
|
303
1099
|
type: [Number, String],
|
|
304
1100
|
default: void 0
|
|
305
1101
|
},
|
|
1102
|
+
/**
|
|
1103
|
+
* The default label class assigned to the label element.
|
|
1104
|
+
*/
|
|
306
1105
|
labelClass: {
|
|
307
1106
|
type: [Object, String],
|
|
308
|
-
default: () =>
|
|
309
|
-
},
|
|
310
|
-
modelValue: {
|
|
311
|
-
default: void 0
|
|
1107
|
+
default: () => l("labelClass", "form-label")
|
|
312
1108
|
},
|
|
1109
|
+
/**
|
|
1110
|
+
* Should the control look like a pill.
|
|
1111
|
+
*/
|
|
313
1112
|
pill: Boolean,
|
|
1113
|
+
/**
|
|
1114
|
+
* Should the control look like plaintext.
|
|
1115
|
+
*/
|
|
314
1116
|
plaintext: Boolean,
|
|
315
|
-
|
|
316
|
-
|
|
1117
|
+
/**
|
|
1118
|
+
* The size of the form control.
|
|
1119
|
+
*/
|
|
1120
|
+
size: {
|
|
1121
|
+
type: String,
|
|
1122
|
+
default: void 0
|
|
1123
|
+
},
|
|
1124
|
+
/**
|
|
1125
|
+
* Additional margin/padding classes for fine control of spacing.
|
|
1126
|
+
*/
|
|
1127
|
+
spacing: {
|
|
1128
|
+
type: String,
|
|
1129
|
+
default: void 0
|
|
1130
|
+
},
|
|
1131
|
+
/**
|
|
1132
|
+
* The valid property.
|
|
1133
|
+
*/
|
|
317
1134
|
valid: Boolean
|
|
318
1135
|
},
|
|
1136
|
+
emits: [
|
|
1137
|
+
"blur",
|
|
1138
|
+
"change",
|
|
1139
|
+
"click",
|
|
1140
|
+
"focus",
|
|
1141
|
+
"keydown",
|
|
1142
|
+
"keypress",
|
|
1143
|
+
"keyup",
|
|
1144
|
+
"update:modelValue"
|
|
1145
|
+
],
|
|
319
1146
|
data() {
|
|
320
1147
|
return {
|
|
321
1148
|
defaultEmpty: !1,
|
|
@@ -335,7 +1162,8 @@ const ht = S({
|
|
|
335
1162
|
return Object.fromEntries(
|
|
336
1163
|
Object.entries(this.$attrs).concat([
|
|
337
1164
|
["id", this.id],
|
|
338
|
-
["class", this.controlClasses]
|
|
1165
|
+
["class", this.controlClasses],
|
|
1166
|
+
["value", this.modelValue]
|
|
339
1167
|
])
|
|
340
1168
|
);
|
|
341
1169
|
},
|
|
@@ -343,16 +1171,15 @@ const ht = S({
|
|
|
343
1171
|
return this.defaultControlClass;
|
|
344
1172
|
},
|
|
345
1173
|
controlSizeClass() {
|
|
346
|
-
return
|
|
1174
|
+
return H(this.size, this.controlClass);
|
|
347
1175
|
},
|
|
348
1176
|
formGroupClasses() {
|
|
349
|
-
return {
|
|
350
|
-
[
|
|
351
|
-
[this.size && E(this.size, this.componentName)]: !!this.size,
|
|
1177
|
+
return Object.assign({
|
|
1178
|
+
[this.size && H(this.size, this.componentName)]: !!this.size,
|
|
352
1179
|
animated: this.animated,
|
|
353
1180
|
"default-empty": this.defaultEmpty,
|
|
354
1181
|
"form-group": this.group,
|
|
355
|
-
[this.size &&
|
|
1182
|
+
[this.size && H(this.size, "form-group")]: !!this.size,
|
|
356
1183
|
"has-activity": this.activity,
|
|
357
1184
|
"has-changed": this.hasChanged,
|
|
358
1185
|
"has-focus": this.hasFocus,
|
|
@@ -362,7 +1189,9 @@ const ht = S({
|
|
|
362
1189
|
"is-valid": !!(this.valid || this.validFeedback),
|
|
363
1190
|
[this.$attrs.class]: !!this.$attrs.class,
|
|
364
1191
|
[this.$attrs.id]: !!this.$attrs.id
|
|
365
|
-
}
|
|
1192
|
+
}, !!this.componentName && {
|
|
1193
|
+
[N(this.componentName)]: !0
|
|
1194
|
+
});
|
|
366
1195
|
},
|
|
367
1196
|
controlClasses() {
|
|
368
1197
|
return Object.assign({
|
|
@@ -384,8 +1213,8 @@ const ht = S({
|
|
|
384
1213
|
return null;
|
|
385
1214
|
if (this.error)
|
|
386
1215
|
return this.error;
|
|
387
|
-
const
|
|
388
|
-
return Array.isArray(
|
|
1216
|
+
const e = this.getFieldErrors();
|
|
1217
|
+
return Array.isArray(e) ? e.filter((t) => t && typeof t == "string").join("<br>") : e;
|
|
389
1218
|
},
|
|
390
1219
|
pillClasses() {
|
|
391
1220
|
return "rounded rounded-pill";
|
|
@@ -406,22 +1235,22 @@ const ht = S({
|
|
|
406
1235
|
}
|
|
407
1236
|
},
|
|
408
1237
|
methods: {
|
|
409
|
-
bindEvents(
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
|
|
1238
|
+
bindEvents(e, t) {
|
|
1239
|
+
var r;
|
|
1240
|
+
t || (t = this.onInput);
|
|
1241
|
+
const o = e instanceof HTMLSelectElement ? (r = e.querySelectorAll("option")) == null ? void 0 : r[e.selectedIndex] : null;
|
|
1242
|
+
o && (e.value = o == null ? void 0 : o.value), e.value && t(e.value), this.hasChanged = !!e.value, this.isEmpty = !e.value, e.addEventListener("focus", () => {
|
|
414
1243
|
this.hasFocus = !0;
|
|
415
|
-
}),
|
|
1244
|
+
}), e.addEventListener("blur", () => {
|
|
416
1245
|
this.hasFocus = !1;
|
|
417
|
-
}),
|
|
1246
|
+
}), e.addEventListener("input", () => {
|
|
418
1247
|
this.isEmpty = !1, this.hasChanged = !0;
|
|
419
|
-
}),
|
|
420
|
-
|
|
421
|
-
() => e
|
|
422
|
-
), this.nativeEvents.forEach((
|
|
423
|
-
|
|
424
|
-
this.$emit(
|
|
1248
|
+
}), e.addEventListener(
|
|
1249
|
+
e.tagName === "SELECT" ? "change" : "input",
|
|
1250
|
+
() => t(e.value)
|
|
1251
|
+
), this.nativeEvents.forEach((n) => {
|
|
1252
|
+
e.addEventListener(n, (u) => {
|
|
1253
|
+
this.$emit(n, u);
|
|
425
1254
|
});
|
|
426
1255
|
});
|
|
427
1256
|
},
|
|
@@ -437,98 +1266,114 @@ const ht = S({
|
|
|
437
1266
|
);
|
|
438
1267
|
},
|
|
439
1268
|
getFieldErrors() {
|
|
440
|
-
let
|
|
441
|
-
return this.errors &&
|
|
1269
|
+
let e = this.error || this.errors;
|
|
1270
|
+
return this.errors && je(this.errors) && (e = this.errors[this.$attrs.name || this.$attrs.id]), !e || Array.isArray(e) || je(e) ? e : [e];
|
|
442
1271
|
},
|
|
443
1272
|
shouldChangeOnFocus() {
|
|
444
1273
|
return !this.getInputField().readOnly;
|
|
445
1274
|
},
|
|
446
|
-
onInput(
|
|
447
|
-
this.$emit("update:modelValue",
|
|
1275
|
+
onInput(e) {
|
|
1276
|
+
this.$emit("update:modelValue", e);
|
|
448
1277
|
}
|
|
449
1278
|
}
|
|
450
|
-
})
|
|
1279
|
+
});
|
|
1280
|
+
const gn = p({
|
|
1281
|
+
name: "InputField",
|
|
451
1282
|
components: {
|
|
452
|
-
ActivityIndicator:
|
|
1283
|
+
ActivityIndicator: St
|
|
453
1284
|
},
|
|
454
|
-
|
|
455
|
-
ht
|
|
456
|
-
]
|
|
1285
|
+
extends: mn
|
|
457
1286
|
});
|
|
458
|
-
const
|
|
459
|
-
const
|
|
460
|
-
for (const [
|
|
461
|
-
|
|
462
|
-
return
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
1287
|
+
const jn = (e, t) => {
|
|
1288
|
+
const r = e.__vccOpts || e;
|
|
1289
|
+
for (const [o, n] of t)
|
|
1290
|
+
r[o] = n;
|
|
1291
|
+
return r;
|
|
1292
|
+
}, $n = ["for"], Cn = { class: "form-group-inner" }, Sn = {
|
|
1293
|
+
invalid: "",
|
|
1294
|
+
class: "invalid-feedback"
|
|
1295
|
+
}, An = /* @__PURE__ */ $("br", null, null, -1), On = {
|
|
1296
|
+
valid: "",
|
|
1297
|
+
class: "valid-feedback"
|
|
1298
|
+
};
|
|
1299
|
+
function En(e, t, r, o, n, u) {
|
|
1300
|
+
const b = R("activity-indicator"), V = R("FormControlErrors"), z = R("FormControlFeedback"), T = tt("bind-events");
|
|
1301
|
+
return a(), d("div", {
|
|
1302
|
+
class: W(["input-field", e.formGroupClasses])
|
|
468
1303
|
}, [
|
|
469
|
-
|
|
470
|
-
|
|
1304
|
+
c(e.$slots, "label", {}, () => [
|
|
1305
|
+
e.label ? (a(), d("label", {
|
|
471
1306
|
key: 0,
|
|
472
1307
|
ref: "label",
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
innerHTML: t.label
|
|
477
|
-
}, null, 10, vt)) : p("", !0)
|
|
1308
|
+
class: W(e.labelClass),
|
|
1309
|
+
for: e.id
|
|
1310
|
+
}, O(e.label), 11, $n)) : g("", !0)
|
|
478
1311
|
]),
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
controlAttributes: t.controlAttributes,
|
|
483
|
-
focus: t.focus
|
|
484
|
-
}, () => [
|
|
485
|
-
t.$slots.icon ? (r(), l("div", {
|
|
1312
|
+
$("div", Cn, [
|
|
1313
|
+
c(e.$slots, "control", E(w({ bindEvents: e.bindEvents, controlAttributes: e.controlAttributes })), () => [
|
|
1314
|
+
e.$slots.icon ? (a(), d("div", {
|
|
486
1315
|
key: 0,
|
|
487
1316
|
class: "form-group-inner-icon",
|
|
488
|
-
onClick:
|
|
1317
|
+
onClick: t[0] || (t[0] = (...s) => e.focus && e.focus(...s))
|
|
489
1318
|
}, [
|
|
490
|
-
|
|
491
|
-
])) :
|
|
492
|
-
|
|
493
|
-
|
|
1319
|
+
c(e.$slots, "icon")
|
|
1320
|
+
])) : g("", !0),
|
|
1321
|
+
rt($("input", ot({
|
|
1322
|
+
ref: "field",
|
|
1323
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => e.model = s)
|
|
1324
|
+
}, e.controlAttributes), null, 16), [
|
|
1325
|
+
[nt, e.model],
|
|
1326
|
+
[T]
|
|
494
1327
|
])
|
|
495
1328
|
]),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
default:
|
|
499
|
-
|
|
1329
|
+
c(e.$slots, "activity", {}, () => [
|
|
1330
|
+
X(it, { name: "input-field-fade" }, {
|
|
1331
|
+
default: D(() => [
|
|
1332
|
+
e.activity ? (a(), _(b, {
|
|
500
1333
|
key: "activity",
|
|
501
1334
|
ref: "activity",
|
|
502
|
-
type:
|
|
503
|
-
size:
|
|
504
|
-
}, null, 8, ["type", "size"])) :
|
|
1335
|
+
type: e.indicator,
|
|
1336
|
+
size: e.indicatorSize || e.size
|
|
1337
|
+
}, null, 8, ["type", "size"])) : g("", !0)
|
|
505
1338
|
]),
|
|
506
1339
|
_: 1
|
|
507
1340
|
})
|
|
508
1341
|
])
|
|
509
1342
|
]),
|
|
510
|
-
|
|
511
|
-
|
|
1343
|
+
c(e.$slots, "errors", E(w({ error: e.error, errors: e.errors, id: e.$attrs.id, name: e.$attrs.name })), () => [
|
|
1344
|
+
e.error || e.errors ? (a(), _(V, {
|
|
512
1345
|
key: 0,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
1346
|
+
id: e.$attrs.id,
|
|
1347
|
+
name: e.$attrs.name,
|
|
1348
|
+
error: e.error,
|
|
1349
|
+
errors: e.errors
|
|
1350
|
+
}, {
|
|
1351
|
+
default: D(({ error: s }) => [
|
|
1352
|
+
$("div", Sn, [
|
|
1353
|
+
st(O(s), 1),
|
|
1354
|
+
An
|
|
1355
|
+
])
|
|
1356
|
+
]),
|
|
1357
|
+
_: 1
|
|
1358
|
+
}, 8, ["id", "name", "error", "errors"])) : g("", !0)
|
|
1359
|
+
]),
|
|
1360
|
+
c(e.$slots, "feedback", E(w({ feedback: e.feedback })), () => [
|
|
1361
|
+
X(z, { feedback: e.feedback }, {
|
|
1362
|
+
default: D(({ feedback: s }) => [
|
|
1363
|
+
$("div", On, O(s), 1)
|
|
1364
|
+
]),
|
|
1365
|
+
_: 1
|
|
1366
|
+
}, 8, ["feedback"])
|
|
522
1367
|
]),
|
|
523
|
-
|
|
524
|
-
|
|
1368
|
+
c(e.$slots, "help", {}, () => [
|
|
1369
|
+
e.helpText ? (a(), d("small", {
|
|
525
1370
|
key: 0,
|
|
526
1371
|
ref: "help"
|
|
527
|
-
},
|
|
1372
|
+
}, O(e.helpText), 513)) : g("", !0)
|
|
528
1373
|
])
|
|
529
1374
|
], 2);
|
|
530
1375
|
}
|
|
531
|
-
const
|
|
1376
|
+
const xn = /* @__PURE__ */ jn(gn, [["render", En]]);
|
|
532
1377
|
export {
|
|
533
|
-
|
|
1378
|
+
xn as InputField
|
|
534
1379
|
};
|