orion-design 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/dist/components/Button/Button.vue.d.ts +2 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.js +27 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Flex/Col.d.ts +4 -4
- package/dist/components/Flex/Item.d.ts +4 -4
- package/dist/components/Flex/Row.d.ts +4 -4
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/index.js +95 -127
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +21 -0
- package/dist/components/Form/Form.js +5 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.vue.d.ts +465 -0
- package/dist/components/Form/PasswordInput/PasswordInput.d.ts +15 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js +2 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.vue.d.ts +3 -0
- package/dist/components/Form/PasswordInput/index.d.ts +1 -0
- package/dist/components/Form/PasswordInput/index.js +2 -0
- package/dist/components/Form/PasswordInput/index.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.d.ts +15 -0
- package/dist/components/Form/StringInput/StringInput.js +2 -0
- package/dist/components/Form/StringInput/StringInput.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.vue.d.ts +3 -0
- package/dist/components/Form/StringInput/index.d.ts +1 -0
- package/dist/components/Form/StringInput/index.js +2 -0
- package/dist/components/Form/StringInput/index.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.d.ts +16 -0
- package/dist/components/Form/Textarea/Textarea.js +2 -0
- package/dist/components/Form/Textarea/Textarea.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/Form/Textarea/index.d.ts +1 -0
- package/dist/components/Form/Textarea/index.js +2 -0
- package/dist/components/Form/Textarea/index.js.map +1 -0
- package/dist/components/Form/hooks/useForm.d.ts +4 -0
- package/dist/components/Form/hooks/useForm.js +21 -0
- package/dist/components/Form/hooks/useForm.js.map +1 -0
- package/dist/components/Form/index.d.ts +273 -0
- package/dist/components/Form/index.js +194 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +1 -14
- package/dist/components/Modal/useModal.d.ts +1 -1
- package/dist/components/Modal/useModal.js +7 -7
- package/dist/components/Modal/useModal.js.map +1 -0
- package/dist/components/Pagetable/Pagetable.d.ts +79 -0
- package/dist/components/Pagetable/columns/PagetableDatecolumn.d.ts +88 -0
- package/dist/components/Pagetable/columns/PagetableStringcolumn.d.ts +62 -0
- package/dist/components/Pagetable/index.d.ts +60 -0
- package/dist/components/Pagetable/index.js +144 -0
- package/dist/components/Pagetable/index.js.map +1 -0
- package/dist/components/Pagetable/interface.d.ts +10 -0
- package/dist/components/Pagetable/interface.js +2 -0
- package/dist/components/Pagetable/interface.js.map +1 -0
- package/dist/components/Space/index.d.ts +9 -9
- package/dist/components/_util/arrays.d.ts +5 -0
- package/dist/components/_util/arrays.js +8 -0
- package/dist/components/_util/arrays.js.map +1 -0
- package/dist/components/_util/browser.d.ts +3 -0
- package/dist/components/_util/browser.js +9 -0
- package/dist/components/_util/browser.js.map +1 -0
- package/dist/components/_util/classNames.js +20 -27
- package/dist/components/_util/classNames.js.map +1 -0
- package/dist/components/_util/dom/aria.d.ts +30 -0
- package/dist/components/_util/dom/aria.js +46 -0
- package/dist/components/_util/dom/aria.js.map +1 -0
- package/dist/components/_util/dom/element.d.ts +3 -0
- package/dist/components/_util/dom/element.js +18 -0
- package/dist/components/_util/dom/element.js.map +1 -0
- package/dist/components/_util/dom/event.d.ts +6 -0
- package/dist/components/_util/dom/event.js +10 -0
- package/dist/components/_util/dom/event.js.map +1 -0
- package/dist/components/_util/dom/index.d.ts +6 -0
- package/dist/components/_util/dom/index.js +39 -0
- package/dist/components/_util/dom/index.js.map +1 -0
- package/dist/components/_util/dom/position.d.ts +7 -0
- package/dist/components/_util/dom/position.js +30 -0
- package/dist/components/_util/dom/position.js.map +1 -0
- package/dist/components/_util/dom/scroll.d.ts +11 -0
- package/dist/components/_util/dom/scroll.js +78 -0
- package/dist/components/_util/dom/scroll.js.map +1 -0
- package/dist/components/_util/dom/style.d.ts +9 -0
- package/dist/components/_util/dom/style.js +58 -0
- package/dist/components/_util/dom/style.js.map +1 -0
- package/dist/components/_util/easings.d.ts +1 -0
- package/dist/components/_util/easings.js +8 -0
- package/dist/components/_util/easings.js.map +1 -0
- package/dist/components/_util/error.d.ts +3 -0
- package/dist/components/_util/error.js +22 -0
- package/dist/components/_util/error.js.map +1 -0
- package/dist/components/_util/functions.d.ts +1 -0
- package/dist/components/_util/functions.js +6 -0
- package/dist/components/_util/functions.js.map +1 -0
- package/dist/components/_util/i18n.d.ts +1 -0
- package/dist/components/_util/i18n.js +5 -0
- package/dist/components/_util/i18n.js.map +1 -0
- package/dist/components/_util/index.d.ts +15 -0
- package/dist/components/_util/index.js +140 -0
- package/dist/components/_util/index.js.map +1 -0
- package/dist/components/_util/isValid.js +4 -4
- package/dist/components/_util/isValid.js.map +1 -0
- package/dist/components/_util/objects.d.ts +8 -0
- package/dist/components/_util/objects.js +17 -0
- package/dist/components/_util/objects.js.map +1 -0
- package/dist/components/_util/props-util/index.d.ts +4 -4
- package/dist/components/_util/props-util/index.js +23 -50
- package/dist/components/_util/props-util/index.js.map +1 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +2 -2
- package/dist/components/_util/props-util/initDefaultProps.js +13 -24
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -0
- package/dist/components/_util/raf.d.ts +2 -0
- package/dist/components/_util/raf.js +7 -0
- package/dist/components/_util/raf.js.map +1 -0
- package/dist/components/_util/rand.d.ts +12 -0
- package/dist/components/_util/rand.js +6 -0
- package/dist/components/_util/rand.js.map +1 -0
- package/dist/components/_util/strings.d.ts +6 -0
- package/dist/components/_util/strings.js +11 -0
- package/dist/components/_util/strings.js.map +1 -0
- package/dist/components/_util/throttleByRaf.d.ts +4 -0
- package/dist/components/_util/throttleByRaf.js +16 -0
- package/dist/components/_util/throttleByRaf.js.map +1 -0
- package/dist/components/_util/type.d.ts +1 -1
- package/dist/components/_util/type.js +48 -65
- package/dist/components/_util/type.js.map +1 -0
- package/dist/components/_util/types.d.ts +10 -0
- package/dist/components/_util/types.js +25 -0
- package/dist/components/_util/types.js.map +1 -0
- package/dist/components/_util/typescript.d.ts +12 -0
- package/dist/components/_util/typescript.js +5 -0
- package/dist/components/_util/typescript.js.map +1 -0
- package/dist/components/_util/util.d.ts +1 -1
- package/dist/components/_util/util.js +46 -74
- package/dist/components/_util/util.js.map +1 -0
- package/dist/components/_util/vue/global-node.d.ts +3 -0
- package/dist/components/_util/vue/global-node.js +21 -0
- package/dist/components/_util/vue/global-node.js.map +1 -0
- package/dist/components/_util/vue/icon.d.ts +23 -0
- package/dist/components/_util/vue/icon.js +154 -0
- package/dist/components/_util/vue/icon.js.map +1 -0
- package/dist/components/_util/vue/index.d.ts +9 -0
- package/dist/components/_util/vue/index.js +44 -0
- package/dist/components/_util/vue/index.js.map +1 -0
- package/dist/components/_util/vue/install.d.ts +6 -0
- package/dist/components/_util/vue/install.js +21 -0
- package/dist/components/_util/vue/install.js.map +1 -0
- package/dist/components/_util/vue/props/index.d.ts +3 -0
- package/dist/components/_util/vue/props/index.js +9 -0
- package/dist/components/_util/vue/props/index.js.map +1 -0
- package/dist/components/_util/vue/props/runtime.d.ts +29 -0
- package/dist/components/_util/vue/props/runtime.js +37 -0
- package/dist/components/_util/vue/props/runtime.js.map +1 -0
- package/dist/components/_util/vue/props/types.d.ts +120 -0
- package/dist/components/_util/vue/props/types.js +2 -0
- package/dist/components/_util/vue/props/types.js.map +1 -0
- package/dist/components/_util/vue/props/util.d.ts +8 -0
- package/dist/components/_util/vue/props/util.js +2 -0
- package/dist/components/_util/vue/props/util.js.map +1 -0
- package/dist/components/_util/vue/refs.d.ts +3 -0
- package/dist/components/_util/vue/refs.js +12 -0
- package/dist/components/_util/vue/refs.js.map +1 -0
- package/dist/components/_util/vue/size.d.ts +2 -0
- package/dist/components/_util/vue/size.js +6 -0
- package/dist/components/_util/vue/size.js.map +1 -0
- package/dist/components/_util/vue/typescript.d.ts +5 -0
- package/dist/components/_util/vue/typescript.js +2 -0
- package/dist/components/_util/vue/typescript.js.map +1 -0
- package/dist/components/_util/vue/validator.d.ts +3 -0
- package/dist/components/_util/vue/validator.js +7 -0
- package/dist/components/_util/vue/validator.js.map +1 -0
- package/dist/components/_util/vue/vnode.d.ts +50 -0
- package/dist/components/_util/vue/vnode.js +68 -0
- package/dist/components/_util/vue/vnode.js.map +1 -0
- package/dist/components/_util/vue-types/index.d.ts +3 -3
- package/dist/components/_util/vue-types/index.js +275 -417
- package/dist/components/_util/vue-types/index.js.map +1 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +18 -12
- package/dist/components/components.js.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +25 -24
- package/dist/components/index.js.map +1 -0
- package/dist/components-BZukhWDk.js +106 -0
- package/dist/components-BZukhWDk.js.map +1 -0
- package/dist/error/OrionError.js +7 -12
- package/dist/error/OrionError.js.map +1 -0
- package/dist/functions-DzLqXvGt.js +33 -0
- package/dist/functions-DzLqXvGt.js.map +1 -0
- package/dist/index-C8JNJPWW.js +8 -0
- package/dist/index-C8JNJPWW.js.map +1 -0
- package/dist/index.css +1 -44
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -14
- package/dist/index.js.map +1 -0
- package/dist/print/LodopFuncs.js +48 -111
- package/dist/print/LodopFuncs.js.map +1 -0
- package/dist/print/index.d.ts +2 -2
- package/dist/print/index.js +111 -220
- package/dist/print/index.js.map +1 -0
- package/dist/request/ErrorHandlerChain.js +17 -15
- package/dist/request/ErrorHandlerChain.js.map +1 -0
- package/dist/request/RequestFilterChain.d.ts +1 -1
- package/dist/request/RequestFilterChain.js +16 -14
- package/dist/request/RequestFilterChain.js.map +1 -0
- package/dist/request/ResponseParserChain.d.ts +1 -1
- package/dist/request/ResponseParserChain.js +17 -15
- package/dist/request/ResponseParserChain.js.map +1 -0
- package/dist/request/disivion/DateSerializer.js +25 -46
- package/dist/request/disivion/DateSerializer.js.map +1 -0
- package/dist/request/disivion/DivisionErrorHandler.d.ts +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +30 -52
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -0
- package/dist/request/disivion/DivisionResponseParser.d.ts +2 -2
- package/dist/request/disivion/DivisionResponseParser.js +13 -25
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -0
- package/dist/request/disivion/index.d.ts +3 -3
- package/dist/request/disivion/index.js +230 -480
- package/dist/request/disivion/index.js.map +1 -0
- package/dist/request/error/BizExceptionResponseError.d.ts +2 -2
- package/dist/request/error/BizExceptionResponseError.js +8 -15
- package/dist/request/error/BizExceptionResponseError.js.map +1 -0
- package/dist/request/error/ExceptionResponseError.d.ts +2 -2
- package/dist/request/error/ExceptionResponseError.js +8 -15
- package/dist/request/error/ExceptionResponseError.js.map +1 -0
- package/dist/request/error/ResponseError.d.ts +1 -1
- package/dist/request/error/ResponseError.js +7 -14
- package/dist/request/error/ResponseError.js.map +1 -0
- package/dist/request/error/SessionExceptionResponseError.d.ts +2 -2
- package/dist/request/error/SessionExceptionResponseError.js +8 -15
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -0
- package/dist/request/index.js +11 -17
- package/dist/request/index.js.map +1 -0
- package/dist/style/index.d.ts +0 -3
- package/dist/style/index.js +1 -0
- package/dist/style/index.js.map +1 -0
- package/dist/utils/DateUtil.js +36 -50
- package/dist/utils/DateUtil.js.map +1 -0
- package/dist/utils/NumberUtil.js +9 -8
- package/dist/utils/NumberUtil.js.map +1 -0
- package/dist/utils/cloneDeep.js +5 -1
- package/dist/utils/cloneDeep.js.map +1 -0
- package/dist/utils/delay.js +6 -4
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/functions.d.ts +1 -0
- package/dist/utils/functions.js +6 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.js +15 -9
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/md5.js +121 -244
- package/dist/utils/md5.js.map +1 -0
- package/dist/utils/uuid.js +28 -58
- package/dist/utils/uuid.js.map +1 -0
- package/dist/utils/vue/install.d.ts +6 -0
- package/dist/utils/vue/install.js +21 -0
- package/dist/utils/vue/install.js.map +1 -0
- package/dist/utils/vue/typescript.d.ts +5 -0
- package/dist/utils/vue/typescript.js +2 -0
- package/dist/utils/vue/typescript.js.map +1 -0
- package/dist/version/index.d.ts +1 -1
- package/dist/version/index.js +5 -6
- package/dist/version/index.js.map +1 -0
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +5 -3
- package/dist/version/version.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/global.d.ts +6 -0
- package/package.json +52 -63
- package/dist/components-BTX5S_6V.js +0 -128
@@ -4,470 +4,328 @@
|
|
4
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
5
5
|
* Released under the MIT License.
|
6
6
|
*/
|
7
|
-
|
8
|
-
|
9
|
-
return Object.prototype.toString.call(o) === '[object Object]';
|
7
|
+
function $(e) {
|
8
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
10
9
|
}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
if (isObject(o) === false) return false;
|
16
|
-
|
17
|
-
// If has modified constructor
|
18
|
-
ctor = o.constructor;
|
19
|
-
if (ctor === undefined) return true;
|
20
|
-
|
21
|
-
// If has modified prototype
|
22
|
-
prot = ctor.prototype;
|
23
|
-
if (isObject(prot) === false) return false;
|
24
|
-
|
25
|
-
// If constructor does not have an Object-specific method
|
26
|
-
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
27
|
-
return false;
|
28
|
-
}
|
29
|
-
|
30
|
-
// Most likely a plain Object
|
31
|
-
return true;
|
10
|
+
function k(e) {
|
11
|
+
var n, r;
|
12
|
+
return $(e) === !1 ? !1 : (n = e.constructor, n === void 0 ? !0 : (r = n.prototype, !($(r) === !1 || r.hasOwnProperty("isPrototypeOf") === !1)));
|
32
13
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
var
|
38
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
14
|
+
function O() {
|
15
|
+
return O = Object.assign ? Object.assign.bind() : function(e) {
|
16
|
+
for (var n = 1; n < arguments.length; n++) {
|
17
|
+
var r = arguments[n];
|
18
|
+
for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
39
19
|
}
|
40
20
|
return e;
|
41
|
-
},
|
21
|
+
}, O.apply(this, arguments);
|
42
22
|
}
|
43
|
-
function
|
44
|
-
if (
|
45
|
-
var
|
46
|
-
for (var
|
47
|
-
if (
|
48
|
-
|
23
|
+
function S(e, n) {
|
24
|
+
if (e == null) return {};
|
25
|
+
var r = {};
|
26
|
+
for (var t in e) if (Object.prototype.hasOwnProperty.call(e, t)) {
|
27
|
+
if (n.indexOf(t) >= 0) continue;
|
28
|
+
r[t] = e[t];
|
49
29
|
}
|
50
|
-
return
|
30
|
+
return r;
|
51
31
|
}
|
52
|
-
const
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
s = o.hasOwnProperty,
|
60
|
-
u = /^\s*function (\w+)/;
|
61
|
-
function l(e) {
|
62
|
-
var t;
|
63
|
-
const n = null !== (t = null == e ? void 0 : e.type) && void 0 !== t ? t : e;
|
64
|
-
if (n) {
|
65
|
-
const e = n.toString().match(u);
|
66
|
-
return e ? e[1] : "";
|
32
|
+
const _ = { silent: !1, logLevel: "warn" }, D = ["validator"], A = Object.prototype, E = A.toString, L = A.hasOwnProperty, N = /^\s*function (\w+)/;
|
33
|
+
function w(e) {
|
34
|
+
var n;
|
35
|
+
const r = (n = e == null ? void 0 : e.type) !== null && n !== void 0 ? n : e;
|
36
|
+
if (r) {
|
37
|
+
const t = r.toString().match(N);
|
38
|
+
return t ? t[1] : "";
|
67
39
|
}
|
68
40
|
return "";
|
69
41
|
}
|
70
|
-
const
|
71
|
-
function
|
72
|
-
let d = f;
|
73
|
-
if ("production" !== process.env.NODE_ENV) {
|
74
|
-
const e = "undefined" != typeof console;
|
75
|
-
d = e ? function (e, t = r.logLevel) {
|
76
|
-
!1 === r.silent && console[t](`[VueTypes warn]: ${e}`);
|
77
|
-
} : f;
|
42
|
+
const y = k;
|
43
|
+
function V() {
|
78
44
|
}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
return Object.defineProperty(e.bind(t), "__original", {
|
91
|
-
value: e
|
92
|
-
});
|
45
|
+
let c = V;
|
46
|
+
process.env.NODE_ENV !== "production" && (c = typeof console < "u" ? function(n, r = _.logLevel) {
|
47
|
+
_.silent === !1 && console[r](`[VueTypes warn]: ${n}`);
|
48
|
+
} : V);
|
49
|
+
const h = (e, n) => L.call(e, n), F = Number.isInteger || function(e) {
|
50
|
+
return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
|
51
|
+
}, b = Array.isArray || function(e) {
|
52
|
+
return E.call(e) === "[object Array]";
|
53
|
+
}, g = (e) => E.call(e) === "[object Function]", m = (e, n) => y(e) && h(e, "_vueTypes_name") && (!n || e._vueTypes_name === n), q = (e) => y(e) && (h(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((n) => h(e, n)));
|
54
|
+
function T(e, n) {
|
55
|
+
return Object.defineProperty(e.bind(n), "__original", { value: e });
|
93
56
|
}
|
94
|
-
function
|
95
|
-
let
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
type
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
v(r.type) ? (i = r.type.some(e => !0 === m(e, t, !0)), o = r.type.map(e => l(e)).join(" or ")) : (o = l(r), i = "Array" === o ? v(t) : "Object" === o ? c(t) : "String" === o || "Number" === o || "Boolean" === o || "Function" === o ? function (e) {
|
106
|
-
if (null == e) return "";
|
107
|
-
const t = e.constructor.toString().match(u);
|
108
|
-
return t ? t[1].replace(/^Async/, "") : "";
|
109
|
-
}(t) === o : t instanceof r.type);
|
57
|
+
function v(e, n, r = !1) {
|
58
|
+
let t, i = !0, a = "";
|
59
|
+
t = y(e) ? e : { type: e };
|
60
|
+
const o = m(t) ? t._vueTypes_name + " - " : "";
|
61
|
+
if (q(t) && t.type !== null) {
|
62
|
+
if (t.type === void 0 || t.type === !0 || !t.required && n == null) return i;
|
63
|
+
b(t.type) ? (i = t.type.some((s) => v(s, n, !0) === !0), a = t.type.map((s) => w(s)).join(" or ")) : (a = w(t), i = a === "Array" ? b(n) : a === "Object" ? y(n) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(s) {
|
64
|
+
if (s == null) return "";
|
65
|
+
const u = s.constructor.toString().match(N);
|
66
|
+
return u ? u[1].replace(/^Async/, "") : "";
|
67
|
+
}(n) === a : n instanceof t.type);
|
110
68
|
}
|
111
69
|
if (!i) {
|
112
|
-
const
|
113
|
-
return
|
70
|
+
const s = `${o}value "${n}" should be of type "${a}"`;
|
71
|
+
return r === !1 ? (c(s), !1) : s;
|
114
72
|
}
|
115
|
-
if (
|
116
|
-
const
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
return
|
73
|
+
if (h(t, "validator") && g(t.validator)) {
|
74
|
+
const s = c, u = [];
|
75
|
+
if (c = (l) => {
|
76
|
+
u.push(l);
|
77
|
+
}, i = t.validator(n), c = s, !i) {
|
78
|
+
const l = (u.length > 1 ? "* " : "") + u.join(`
|
79
|
+
* `);
|
80
|
+
return u.length = 0, r === !1 ? (c(l), i) : l;
|
123
81
|
}
|
124
82
|
}
|
125
83
|
return i;
|
126
84
|
}
|
127
|
-
function
|
128
|
-
const
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
get() {
|
135
|
-
return this.required = !0, this;
|
136
|
-
}
|
137
|
-
},
|
138
|
-
def: {
|
139
|
-
value(e) {
|
140
|
-
return void 0 === e ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this.default = void 0) : (p(this, "default") && delete this.default, this) : h(e) || !0 === m(this, e, !0) ? (this.default = v(e) ? () => [...e] : c(e) ? () => Object.assign({}, e) : e, this) : (d(`${this._vueTypes_name} - invalid default value: "${e}"`), this);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
}),
|
144
|
-
{
|
145
|
-
validator: r
|
146
|
-
} = n;
|
147
|
-
return h(r) && (n.validator = O(r, n)), n;
|
85
|
+
function f(e, n) {
|
86
|
+
const r = Object.defineProperties(n, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
|
87
|
+
return this.required = !0, this;
|
88
|
+
} }, def: { value(i) {
|
89
|
+
return i === void 0 ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this.default = void 0) : (h(this, "default") && delete this.default, this) : g(i) || v(this, i, !0) === !0 ? (this.default = b(i) ? () => [...i] : y(i) ? () => Object.assign({}, i) : i, this) : (c(`${this._vueTypes_name} - invalid default value: "${i}"`), this);
|
90
|
+
} } }), { validator: t } = r;
|
91
|
+
return g(t) && (r.validator = T(t, r)), r;
|
148
92
|
}
|
149
|
-
function
|
150
|
-
const
|
151
|
-
return Object.defineProperty(
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
});
|
93
|
+
function d(e, n) {
|
94
|
+
const r = f(e, n);
|
95
|
+
return Object.defineProperty(r, "validate", { value(t) {
|
96
|
+
return g(this.validator) && c(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
97
|
+
${JSON.stringify(this)}`), this.validator = T(t, this), this;
|
98
|
+
} });
|
156
99
|
}
|
157
|
-
function
|
158
|
-
const
|
159
|
-
const
|
160
|
-
return Object.getOwnPropertyNames(
|
161
|
-
|
162
|
-
}), Object.defineProperties({},
|
163
|
-
}(
|
164
|
-
if (
|
165
|
-
const {
|
166
|
-
|
167
|
-
} =
|
168
|
-
s =
|
169
|
-
|
170
|
-
|
171
|
-
validator: e
|
172
|
-
} = o;
|
173
|
-
e && (e = null !== (l = (u = e).__original) && void 0 !== l ? l : u), o.validator = O(e ? function (t) {
|
174
|
-
return e.call(this, t) && a.call(this, t);
|
175
|
-
} : a, o);
|
100
|
+
function P(e, n, r) {
|
101
|
+
const t = function(u) {
|
102
|
+
const l = {};
|
103
|
+
return Object.getOwnPropertyNames(u).forEach((p) => {
|
104
|
+
l[p] = Object.getOwnPropertyDescriptor(u, p);
|
105
|
+
}), Object.defineProperties({}, l);
|
106
|
+
}(n);
|
107
|
+
if (t._vueTypes_name = e, !y(r)) return t;
|
108
|
+
const { validator: i } = r, a = S(r, D);
|
109
|
+
if (g(i)) {
|
110
|
+
let { validator: u } = t;
|
111
|
+
u && (u = (s = (o = u).__original) !== null && s !== void 0 ? s : o), t.validator = T(u ? function(l) {
|
112
|
+
return u.call(this, l) && i.call(this, l);
|
113
|
+
} : i, t);
|
176
114
|
}
|
177
|
-
var
|
178
|
-
return Object.assign(
|
115
|
+
var o, s;
|
116
|
+
return Object.assign(t, a);
|
179
117
|
}
|
180
|
-
function
|
118
|
+
function j(e) {
|
181
119
|
return e.replace(/^(?!\s*$)/gm, " ");
|
182
120
|
}
|
183
|
-
const
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
})
|
199
|
-
N = () => _("object", {
|
200
|
-
type: Object
|
201
|
-
}),
|
202
|
-
V = () => j("integer", {
|
203
|
-
type: Number,
|
204
|
-
validator(e) {
|
205
|
-
const t = y(e);
|
206
|
-
return !1 === t && d(`integer - "${e}" is not an integer`), t;
|
207
|
-
}
|
208
|
-
}),
|
209
|
-
q = () => j("symbol", {
|
210
|
-
validator(e) {
|
211
|
-
const t = "symbol" == typeof e;
|
212
|
-
return !1 === t && d(`symbol - invalid value "${e}"`), t;
|
213
|
-
}
|
214
|
-
}),
|
215
|
-
k = () => Object.defineProperty({
|
216
|
-
type: null,
|
217
|
-
validator(e) {
|
218
|
-
const t = null === e;
|
219
|
-
return !1 === t && d("nullable - value should be null"), t;
|
220
|
-
}
|
221
|
-
}, "_vueTypes_name", {
|
222
|
-
value: "nullable"
|
223
|
-
});
|
224
|
-
function D(e, t = "custom validation failed") {
|
225
|
-
if ("function" != typeof e) throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
226
|
-
return j(e.name || "<<anonymous function>>", {
|
227
|
-
type: null,
|
228
|
-
validator(n) {
|
229
|
-
const r = e(n);
|
230
|
-
return r || d(`${this._vueTypes_name} - ${t}`), r;
|
231
|
-
}
|
232
|
-
});
|
121
|
+
const Y = () => d("any", {}), U = () => d("function", { type: Function }), x = () => d("boolean", { type: Boolean }), I = () => d("string", { type: String }), J = () => d("number", { type: Number }), M = () => d("array", { type: Array }), R = () => d("object", { type: Object }), z = () => f("integer", { type: Number, validator(e) {
|
122
|
+
const n = F(e);
|
123
|
+
return n === !1 && c(`integer - "${e}" is not an integer`), n;
|
124
|
+
} }), C = () => f("symbol", { validator(e) {
|
125
|
+
const n = typeof e == "symbol";
|
126
|
+
return n === !1 && c(`symbol - invalid value "${e}"`), n;
|
127
|
+
} }), G = () => Object.defineProperty({ type: null, validator(e) {
|
128
|
+
const n = e === null;
|
129
|
+
return n === !1 && c("nullable - value should be null"), n;
|
130
|
+
} }, "_vueTypes_name", { value: "nullable" });
|
131
|
+
function H(e, n = "custom validation failed") {
|
132
|
+
if (typeof e != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
133
|
+
return f(e.name || "<<anonymous function>>", { type: null, validator(r) {
|
134
|
+
const t = e(r);
|
135
|
+
return t || c(`${this._vueTypes_name} - ${n}`), t;
|
136
|
+
} });
|
233
137
|
}
|
234
|
-
function
|
235
|
-
if (!
|
236
|
-
const
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
if (null != t) {
|
246
|
-
const n = t.constructor;
|
247
|
-
-1 === e.indexOf(n) && e.push(n);
|
138
|
+
function K(e) {
|
139
|
+
if (!b(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
|
140
|
+
const n = `oneOf - value should be one of "${e.map((t) => typeof t == "symbol" ? t.toString() : t).join('", "')}".`, r = { validator(t) {
|
141
|
+
const i = e.indexOf(t) !== -1;
|
142
|
+
return i || c(n), i;
|
143
|
+
} };
|
144
|
+
if (e.indexOf(null) === -1) {
|
145
|
+
const t = e.reduce((i, a) => {
|
146
|
+
if (a != null) {
|
147
|
+
const o = a.constructor;
|
148
|
+
i.indexOf(o) === -1 && i.push(o);
|
248
149
|
}
|
249
|
-
return
|
150
|
+
return i;
|
250
151
|
}, []);
|
251
|
-
t.length > 0 && (
|
152
|
+
t.length > 0 && (r.type = t);
|
252
153
|
}
|
253
|
-
return
|
154
|
+
return f("oneOf", r);
|
254
155
|
}
|
255
|
-
function
|
256
|
-
if (!
|
257
|
-
let
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
if (h(o.validator) && (t = !0), b(o, "oneOf") && o.type) {
|
264
|
-
r = r.concat(o.type);
|
156
|
+
function Q(e) {
|
157
|
+
if (!b(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
158
|
+
let n = !1, r = !1, t = [];
|
159
|
+
for (let a = 0; a < e.length; a += 1) {
|
160
|
+
const o = e[a];
|
161
|
+
if (q(o)) {
|
162
|
+
if (g(o.validator) && (n = !0), m(o, "oneOf") && o.type) {
|
163
|
+
t = t.concat(o.type);
|
265
164
|
continue;
|
266
165
|
}
|
267
|
-
if (
|
268
|
-
|
166
|
+
if (m(o, "nullable")) {
|
167
|
+
r = !0;
|
269
168
|
continue;
|
270
169
|
}
|
271
|
-
if (
|
272
|
-
|
170
|
+
if (o.type === !0 || !o.type) {
|
171
|
+
c('oneOfType - invalid usage of "true" and "null" as types.');
|
273
172
|
continue;
|
274
173
|
}
|
275
|
-
|
276
|
-
} else
|
174
|
+
t = t.concat(o.type);
|
175
|
+
} else t.push(o);
|
277
176
|
}
|
278
|
-
|
279
|
-
const i =
|
280
|
-
return
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
}
|
290
|
-
} : {
|
291
|
-
type: i
|
292
|
-
});
|
177
|
+
t = t.filter((a, o) => t.indexOf(a) === o);
|
178
|
+
const i = r === !1 && t.length > 0 ? t : null;
|
179
|
+
return f("oneOfType", n ? { type: i, validator(a) {
|
180
|
+
const o = [], s = e.some((u) => {
|
181
|
+
const l = v(u, a, !0);
|
182
|
+
return typeof l == "string" && o.push(l), l === !0;
|
183
|
+
});
|
184
|
+
return s || c(`oneOfType - provided value does not match any of the ${o.length} passed-in validators:
|
185
|
+
${j(o.join(`
|
186
|
+
`))}`), s;
|
187
|
+
} } : { type: i });
|
293
188
|
}
|
294
|
-
function
|
295
|
-
return
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
}
|
302
|
-
});
|
189
|
+
function W(e) {
|
190
|
+
return f("arrayOf", { type: Array, validator(n) {
|
191
|
+
let r = "";
|
192
|
+
const t = n.every((i) => (r = v(e, i, !0), r === !0));
|
193
|
+
return t || c(`arrayOf - value validation error:
|
194
|
+
${j(r)}`), t;
|
195
|
+
} });
|
303
196
|
}
|
304
|
-
function
|
305
|
-
return
|
306
|
-
type: e
|
307
|
-
});
|
197
|
+
function X(e) {
|
198
|
+
return f("instanceOf", { type: e });
|
308
199
|
}
|
309
|
-
function
|
310
|
-
return
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
}
|
317
|
-
});
|
200
|
+
function Z(e) {
|
201
|
+
return f("objectOf", { type: Object, validator(n) {
|
202
|
+
let r = "";
|
203
|
+
const t = Object.keys(n).every((i) => (r = v(e, n[i], !0), r === !0));
|
204
|
+
return t || c(`objectOf - value validation error:
|
205
|
+
${j(r)}`), t;
|
206
|
+
} });
|
318
207
|
}
|
319
|
-
function
|
320
|
-
const
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
const i = Object.keys(r);
|
330
|
-
if (n.length > 0 && n.some(e => -1 === i.indexOf(e))) {
|
331
|
-
const e = n.filter(e => -1 === i.indexOf(e));
|
332
|
-
return d(1 === e.length ? `shape - required property "${e[0]}" is not defined.` : `shape - required properties "${e.join('", "')}" are not defined.`), !1;
|
333
|
-
}
|
334
|
-
return i.every(n => {
|
335
|
-
if (-1 === t.indexOf(n)) return !0 === this._vueTypes_isLoose || (d(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`), !1);
|
336
|
-
const i = m(e[n], r[n], !0);
|
337
|
-
return "string" == typeof i && d(`shape - "${n}" property validation error:\n ${$(i)}`), !0 === i;
|
338
|
-
});
|
339
|
-
}
|
340
|
-
});
|
341
|
-
return Object.defineProperty(r, "_vueTypes_isLoose", {
|
342
|
-
writable: !0,
|
343
|
-
value: !1
|
344
|
-
}), Object.defineProperty(r, "loose", {
|
345
|
-
get() {
|
346
|
-
return this._vueTypes_isLoose = !0, this;
|
208
|
+
function ee(e) {
|
209
|
+
const n = Object.keys(e), r = n.filter((i) => {
|
210
|
+
var a;
|
211
|
+
return !((a = e[i]) === null || a === void 0 || !a.required);
|
212
|
+
}), t = f("shape", { type: Object, validator(i) {
|
213
|
+
if (!y(i)) return !1;
|
214
|
+
const a = Object.keys(i);
|
215
|
+
if (r.length > 0 && r.some((o) => a.indexOf(o) === -1)) {
|
216
|
+
const o = r.filter((s) => a.indexOf(s) === -1);
|
217
|
+
return c(o.length === 1 ? `shape - required property "${o[0]}" is not defined.` : `shape - required properties "${o.join('", "')}" are not defined.`), !1;
|
347
218
|
}
|
348
|
-
|
219
|
+
return a.every((o) => {
|
220
|
+
if (n.indexOf(o) === -1) return this._vueTypes_isLoose === !0 || (c(`shape - shape definition does not include a "${o}" property. Allowed keys: "${n.join('", "')}".`), !1);
|
221
|
+
const s = v(e[o], i[o], !0);
|
222
|
+
return typeof s == "string" && c(`shape - "${o}" property validation error:
|
223
|
+
${j(s)}`), s === !0;
|
224
|
+
});
|
225
|
+
} });
|
226
|
+
return Object.defineProperty(t, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(t, "loose", { get() {
|
227
|
+
return this._vueTypes_isLoose = !0, this;
|
228
|
+
} }), t;
|
349
229
|
}
|
350
|
-
const
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
return s = i ? {
|
404
|
-
get() {
|
405
|
-
const e = Object.assign({}, o);
|
406
|
-
return r ? _(t, e) : j(t, e);
|
407
|
-
},
|
408
|
-
enumerable: !0
|
409
|
-
} : {
|
410
|
-
value(...e) {
|
411
|
-
const n = Object.assign({}, o);
|
412
|
-
let i;
|
413
|
-
return i = r ? _(t, n) : j(t, n), n.validator && (i.validator = n.validator.bind(i, ...e)), i;
|
414
|
-
},
|
415
|
-
enumerable: !0
|
416
|
-
}, Object.defineProperty(this, t, s);
|
417
|
-
}
|
418
|
-
}).defaults = {}, e.sensibleDefaults = void 0, e.config = r, e.custom = D, e.oneOf = L, e.instanceOf = Y, e.oneOfType = B, e.arrayOf = F, e.objectOf = I, e.shape = J, e.utils = {
|
419
|
-
validate: (e, t) => !0 === m(t, e, !0),
|
420
|
-
toType: (e, t, n = !1) => n ? _(e, t) : j(e, t)
|
421
|
-
}, e))();
|
422
|
-
function U(e = {
|
423
|
-
func: () => {},
|
424
|
-
bool: !0,
|
425
|
-
string: "",
|
426
|
-
number: 0,
|
427
|
-
array: () => [],
|
428
|
-
object: () => ({}),
|
429
|
-
integer: 0
|
430
|
-
}) {
|
230
|
+
const te = ["name", "validate", "getter"], ne = /* @__PURE__ */ ((e) => ((e = class {
|
231
|
+
static get any() {
|
232
|
+
return Y();
|
233
|
+
}
|
234
|
+
static get func() {
|
235
|
+
return U().def(this.defaults.func);
|
236
|
+
}
|
237
|
+
static get bool() {
|
238
|
+
return this.defaults.bool === void 0 ? x() : x().def(this.defaults.bool);
|
239
|
+
}
|
240
|
+
static get string() {
|
241
|
+
return I().def(this.defaults.string);
|
242
|
+
}
|
243
|
+
static get number() {
|
244
|
+
return J().def(this.defaults.number);
|
245
|
+
}
|
246
|
+
static get array() {
|
247
|
+
return M().def(this.defaults.array);
|
248
|
+
}
|
249
|
+
static get object() {
|
250
|
+
return R().def(this.defaults.object);
|
251
|
+
}
|
252
|
+
static get integer() {
|
253
|
+
return z().def(this.defaults.integer);
|
254
|
+
}
|
255
|
+
static get symbol() {
|
256
|
+
return C();
|
257
|
+
}
|
258
|
+
static get nullable() {
|
259
|
+
return G();
|
260
|
+
}
|
261
|
+
static extend(n) {
|
262
|
+
if (c("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."), b(n)) return n.forEach((u) => this.extend(u)), this;
|
263
|
+
const { name: r, validate: t = !1, getter: i = !1 } = n, a = S(n, te);
|
264
|
+
if (h(this, r)) throw new TypeError(`[VueTypes error]: Type "${r}" already defined`);
|
265
|
+
const { type: o } = a;
|
266
|
+
if (m(o)) return delete a.type, Object.defineProperty(this, r, i ? { get: () => P(r, o, a) } : { value(...u) {
|
267
|
+
const l = P(r, o, a);
|
268
|
+
return l.validator && (l.validator = l.validator.bind(l, ...u)), l;
|
269
|
+
} });
|
270
|
+
let s;
|
271
|
+
return s = i ? { get() {
|
272
|
+
const u = Object.assign({}, a);
|
273
|
+
return t ? d(r, u) : f(r, u);
|
274
|
+
}, enumerable: !0 } : { value(...u) {
|
275
|
+
const l = Object.assign({}, a);
|
276
|
+
let p;
|
277
|
+
return p = t ? d(r, l) : f(r, l), l.validator && (p.validator = l.validator.bind(p, ...u)), p;
|
278
|
+
}, enumerable: !0 }, Object.defineProperty(this, r, s);
|
279
|
+
}
|
280
|
+
}).defaults = {}, e.sensibleDefaults = void 0, e.config = _, e.custom = H, e.oneOf = K, e.instanceOf = X, e.oneOfType = Q, e.arrayOf = W, e.objectOf = Z, e.shape = ee, e.utils = { validate: (n, r) => v(r, n, !0) === !0, toType: (n, r, t = !1) => t ? d(n, r) : f(n, r) }, e))();
|
281
|
+
function B(e = { func: () => {
|
282
|
+
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
|
431
283
|
var n;
|
432
|
-
return (n = class extends
|
284
|
+
return (n = class extends ne {
|
433
285
|
static get sensibleDefaults() {
|
434
|
-
return
|
286
|
+
return O({}, this.defaults);
|
435
287
|
}
|
436
|
-
static set sensibleDefaults(
|
437
|
-
this.defaults =
|
288
|
+
static set sensibleDefaults(r) {
|
289
|
+
this.defaults = r !== !1 ? O({}, r !== !0 ? r : e) : {};
|
438
290
|
}
|
439
|
-
}).defaults =
|
291
|
+
}).defaults = O({}, e), n;
|
292
|
+
}
|
293
|
+
class ie extends B() {
|
440
294
|
}
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
object: undefined,
|
450
|
-
integer: undefined
|
295
|
+
const re = B({
|
296
|
+
func: void 0,
|
297
|
+
bool: void 0,
|
298
|
+
string: void 0,
|
299
|
+
number: void 0,
|
300
|
+
array: void 0,
|
301
|
+
object: void 0,
|
302
|
+
integer: void 0
|
451
303
|
});
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
304
|
+
re.extend([
|
305
|
+
{
|
306
|
+
name: "looseBool",
|
307
|
+
getter: !0,
|
308
|
+
type: Boolean,
|
309
|
+
default: void 0
|
310
|
+
},
|
311
|
+
{
|
312
|
+
name: "style",
|
313
|
+
getter: !0,
|
314
|
+
type: [String, Object],
|
315
|
+
default: void 0
|
316
|
+
},
|
317
|
+
{
|
318
|
+
name: "VueNode",
|
319
|
+
getter: !0,
|
320
|
+
// @ts-ignore
|
321
|
+
type: null
|
322
|
+
}
|
323
|
+
]);
|
324
|
+
function oe(e) {
|
325
|
+
return e.default = void 0, e;
|
471
326
|
}
|
472
|
-
|
473
|
-
|
327
|
+
export {
|
328
|
+
re as default,
|
329
|
+
oe as withUndefined
|
330
|
+
};
|
331
|
+
//# sourceMappingURL=index.js.map
|