orion-design 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +14 -30
- package/dist/Throne/index.js.map +1 -1
- package/dist/components/Button/index.js +33 -40
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +89 -122
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +68 -127
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +656 -836
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +18 -30
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
- package/dist/components/LovTable/index.d.ts +246 -0
- package/dist/components/LovTable/index.js +106 -179
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +56 -111
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.d.ts +1 -1
- package/dist/components/Modal/types.js +3 -4
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +92 -1
- package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
- package/dist/components/Pagetable/hooks/useColumns.js +85 -88
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.d.ts +155 -0
- package/dist/components/Pagetable/index.js +596 -683
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +54 -92
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +74 -82
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +469 -579
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +54 -92
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +74 -100
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +358 -603
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +4 -6
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +39 -74
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +19 -29
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +5 -9
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +17 -22
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +39 -74
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +8 -9
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +7 -14
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +25 -49
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +61 -103
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +50 -65
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +4 -8
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +11 -12
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +2 -4
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +14 -18
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +20 -46
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +10 -18
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +4 -5
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +3 -4
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +8 -9
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +10 -16
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +38 -41
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +22 -41
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +43 -85
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +15 -27
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +25 -29
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +18 -35
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +30 -46
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +6 -12
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +3 -5
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +4 -5
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +54 -100
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +220 -231
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +35 -38
- package/dist/components/index.js.map +1 -1
- package/dist/error/OrionError.js +4 -8
- package/dist/error/OrionError.js.map +1 -1
- package/dist/index.css +1 -797
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +43 -101
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +108 -200
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +14 -17
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +13 -16
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +14 -17
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +22 -47
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +25 -40
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +10 -16
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +201 -305
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +5 -11
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +5 -11
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +4 -9
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +5 -11
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +33 -48
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +93 -191
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +25 -35
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
- package/dist/components-B3d9m_tn.js +0 -27
- package/dist/components-B3d9m_tn.js.map +0 -1
- package/dist/functions-BeMkokbY.js +0 -63
- package/dist/functions-BeMkokbY.js.map +0 -1
- package/dist/index-BOKLZnqH.js +0 -54
- package/dist/index-BOKLZnqH.js.map +0 -1
- package/dist/index-D1m0KTpK.js +0 -69
- package/dist/index-D1m0KTpK.js.map +0 -1
- package/dist/index-DR5ZP7mD.js +0 -160
- package/dist/index-DR5ZP7mD.js.map +0 -1
- package/dist/index-DkwIULcN.js +0 -200
- package/dist/index-DkwIULcN.js.map +0 -1
@@ -4,305 +4,295 @@
|
|
4
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
5
5
|
* Released under the MIT License.
|
6
6
|
*/
|
7
|
-
function
|
8
|
-
return Object.prototype.toString.call(
|
7
|
+
function $(e) {
|
8
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
9
9
|
}
|
10
|
-
function
|
11
|
-
var
|
12
|
-
|
13
|
-
ctor = o2.constructor;
|
14
|
-
if (ctor === void 0) return true;
|
15
|
-
prot = ctor.prototype;
|
16
|
-
if (isObject(prot) === false) return false;
|
17
|
-
if (prot.hasOwnProperty("isPrototypeOf") === false) {
|
18
|
-
return false;
|
19
|
-
}
|
20
|
-
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)));
|
21
13
|
}
|
22
|
-
function
|
23
|
-
return
|
24
|
-
for (var
|
25
|
-
var
|
26
|
-
for (var
|
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]);
|
27
19
|
}
|
28
20
|
return e;
|
29
|
-
},
|
21
|
+
}, O.apply(this, arguments);
|
30
22
|
}
|
31
|
-
function
|
32
|
-
if (
|
33
|
-
var
|
34
|
-
for (var
|
35
|
-
if (
|
36
|
-
|
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];
|
37
29
|
}
|
38
|
-
return
|
30
|
+
return r;
|
39
31
|
}
|
40
|
-
const
|
41
|
-
function
|
42
|
-
var
|
43
|
-
const
|
44
|
-
if (
|
45
|
-
const
|
46
|
-
return
|
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] : "";
|
47
39
|
}
|
48
40
|
return "";
|
49
41
|
}
|
50
|
-
const
|
51
|
-
function
|
42
|
+
const y = k;
|
43
|
+
function V() {
|
52
44
|
}
|
53
|
-
let
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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 });
|
59
56
|
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
const a2 = b(r2) ? r2._vueTypes_name + " - " : "";
|
72
|
-
if (g(r2) && null !== r2.type) {
|
73
|
-
if (void 0 === r2.type || true === r2.type) return i2;
|
74
|
-
if (!r2.required && null == t2) return i2;
|
75
|
-
v(r2.type) ? (i2 = r2.type.some((e2) => true === m(e2, t2, true)), o2 = r2.type.map((e2) => l(e2)).join(" or ")) : (o2 = l(r2), i2 = "Array" === o2 ? v(t2) : "Object" === o2 ? c(t2) : "String" === o2 || "Number" === o2 || "Boolean" === o2 || "Function" === o2 ? function(e2) {
|
76
|
-
if (null == e2) return "";
|
77
|
-
const t3 = e2.constructor.toString().match(u);
|
78
|
-
return t3 ? t3[1].replace(/^Async/, "") : "";
|
79
|
-
}(t2) === o2 : t2 instanceof r2.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);
|
80
68
|
}
|
81
|
-
if (!
|
82
|
-
const
|
83
|
-
return
|
69
|
+
if (!i) {
|
70
|
+
const s = `${o}value "${n}" should be of type "${a}"`;
|
71
|
+
return r === !1 ? (c(s), !1) : s;
|
84
72
|
}
|
85
|
-
if (
|
86
|
-
const
|
87
|
-
if (
|
88
|
-
|
89
|
-
},
|
90
|
-
const
|
91
|
-
|
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;
|
92
81
|
}
|
93
82
|
}
|
94
|
-
return
|
83
|
+
return i;
|
95
84
|
}
|
96
|
-
function
|
97
|
-
const
|
98
|
-
return this.required =
|
99
|
-
} }, def: { value(
|
100
|
-
return void 0
|
101
|
-
} } }), { validator:
|
102
|
-
return
|
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;
|
103
92
|
}
|
104
|
-
function
|
105
|
-
const
|
106
|
-
return Object.defineProperty(
|
107
|
-
return
|
108
|
-
${JSON.stringify(this)}`), this.validator =
|
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;
|
109
98
|
} });
|
110
99
|
}
|
111
|
-
function
|
112
|
-
const
|
113
|
-
const
|
114
|
-
return Object.getOwnPropertyNames(
|
115
|
-
|
116
|
-
}), Object.defineProperties({},
|
117
|
-
}(
|
118
|
-
if (
|
119
|
-
const { validator:
|
120
|
-
if (
|
121
|
-
let { validator:
|
122
|
-
|
123
|
-
return
|
124
|
-
} :
|
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);
|
125
114
|
}
|
126
|
-
var
|
127
|
-
return Object.assign(
|
115
|
+
var o, s;
|
116
|
+
return Object.assign(t, a);
|
128
117
|
}
|
129
|
-
function
|
118
|
+
function j(e) {
|
130
119
|
return e.replace(/^(?!\s*$)/gm, " ");
|
131
120
|
}
|
132
|
-
const
|
133
|
-
const
|
134
|
-
return
|
135
|
-
} }),
|
136
|
-
const
|
137
|
-
return
|
138
|
-
} }),
|
139
|
-
const
|
140
|
-
return
|
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;
|
141
130
|
} }, "_vueTypes_name", { value: "nullable" });
|
142
|
-
function
|
143
|
-
if ("function"
|
144
|
-
return
|
145
|
-
const
|
146
|
-
return
|
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;
|
147
136
|
} });
|
148
137
|
}
|
149
|
-
function
|
150
|
-
if (!
|
151
|
-
const
|
152
|
-
const
|
153
|
-
return
|
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;
|
154
143
|
} };
|
155
|
-
if (
|
156
|
-
const
|
157
|
-
if (
|
158
|
-
const
|
159
|
-
|
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);
|
160
149
|
}
|
161
|
-
return
|
150
|
+
return i;
|
162
151
|
}, []);
|
163
|
-
|
152
|
+
t.length > 0 && (r.type = t);
|
164
153
|
}
|
165
|
-
return
|
154
|
+
return f("oneOf", r);
|
166
155
|
}
|
167
|
-
function
|
168
|
-
if (!
|
169
|
-
let
|
170
|
-
for (let
|
171
|
-
const
|
172
|
-
if (
|
173
|
-
if (
|
174
|
-
|
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);
|
175
164
|
continue;
|
176
165
|
}
|
177
|
-
if (
|
178
|
-
|
166
|
+
if (m(o, "nullable")) {
|
167
|
+
r = !0;
|
179
168
|
continue;
|
180
169
|
}
|
181
|
-
if (
|
182
|
-
|
170
|
+
if (o.type === !0 || !o.type) {
|
171
|
+
c('oneOfType - invalid usage of "true" and "null" as types.');
|
183
172
|
continue;
|
184
173
|
}
|
185
|
-
|
186
|
-
} else
|
174
|
+
t = t.concat(o.type);
|
175
|
+
} else t.push(o);
|
187
176
|
}
|
188
|
-
|
189
|
-
const
|
190
|
-
return
|
191
|
-
const
|
192
|
-
const
|
193
|
-
return "string"
|
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;
|
194
183
|
});
|
195
|
-
return
|
196
|
-
${
|
197
|
-
|
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 });
|
198
188
|
}
|
199
|
-
function
|
200
|
-
return
|
201
|
-
let
|
202
|
-
const
|
203
|
-
return
|
204
|
-
${
|
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;
|
205
195
|
} });
|
206
196
|
}
|
207
|
-
function
|
208
|
-
return
|
197
|
+
function X(e) {
|
198
|
+
return f("instanceOf", { type: e });
|
209
199
|
}
|
210
|
-
function
|
211
|
-
return
|
212
|
-
let
|
213
|
-
const
|
214
|
-
return
|
215
|
-
${
|
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;
|
216
206
|
} });
|
217
207
|
}
|
218
|
-
function
|
219
|
-
const
|
220
|
-
var
|
221
|
-
return !(
|
222
|
-
}),
|
223
|
-
if (!
|
224
|
-
const
|
225
|
-
if (
|
226
|
-
const
|
227
|
-
return
|
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;
|
228
218
|
}
|
229
|
-
return
|
230
|
-
if (
|
231
|
-
const
|
232
|
-
return "string"
|
233
|
-
${
|
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;
|
234
224
|
});
|
235
225
|
} });
|
236
|
-
return Object.defineProperty(
|
237
|
-
return this._vueTypes_isLoose =
|
238
|
-
} }),
|
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;
|
239
229
|
}
|
240
|
-
const
|
230
|
+
const te = ["name", "validate", "getter"], ne = /* @__PURE__ */ ((e) => ((e = class {
|
241
231
|
static get any() {
|
242
|
-
return
|
232
|
+
return Y();
|
243
233
|
}
|
244
234
|
static get func() {
|
245
|
-
return
|
235
|
+
return U().def(this.defaults.func);
|
246
236
|
}
|
247
237
|
static get bool() {
|
248
|
-
return
|
238
|
+
return this.defaults.bool === void 0 ? x() : x().def(this.defaults.bool);
|
249
239
|
}
|
250
240
|
static get string() {
|
251
|
-
return
|
241
|
+
return I().def(this.defaults.string);
|
252
242
|
}
|
253
243
|
static get number() {
|
254
|
-
return
|
244
|
+
return J().def(this.defaults.number);
|
255
245
|
}
|
256
246
|
static get array() {
|
257
|
-
return
|
247
|
+
return M().def(this.defaults.array);
|
258
248
|
}
|
259
249
|
static get object() {
|
260
|
-
return
|
250
|
+
return R().def(this.defaults.object);
|
261
251
|
}
|
262
252
|
static get integer() {
|
263
|
-
return
|
253
|
+
return z().def(this.defaults.integer);
|
264
254
|
}
|
265
255
|
static get symbol() {
|
266
|
-
return
|
256
|
+
return C();
|
267
257
|
}
|
268
258
|
static get nullable() {
|
269
|
-
return
|
259
|
+
return G();
|
270
260
|
}
|
271
|
-
static extend(
|
272
|
-
if (
|
273
|
-
const { name:
|
274
|
-
if (
|
275
|
-
const { type:
|
276
|
-
if (
|
277
|
-
const
|
278
|
-
return
|
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;
|
279
269
|
} });
|
280
|
-
let
|
281
|
-
return
|
282
|
-
const
|
283
|
-
return
|
284
|
-
}, enumerable:
|
285
|
-
const
|
286
|
-
let
|
287
|
-
return
|
288
|
-
}, enumerable:
|
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);
|
289
279
|
}
|
290
|
-
}).defaults = {}, e.sensibleDefaults = void 0, e.config =
|
291
|
-
function
|
292
|
-
}, bool:
|
293
|
-
var
|
294
|
-
return (
|
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 }) {
|
283
|
+
var n;
|
284
|
+
return (n = class extends ne {
|
295
285
|
static get sensibleDefaults() {
|
296
|
-
return
|
286
|
+
return O({}, this.defaults);
|
297
287
|
}
|
298
|
-
static set sensibleDefaults(
|
299
|
-
this.defaults =
|
288
|
+
static set sensibleDefaults(r) {
|
289
|
+
this.defaults = r !== !1 ? O({}, r !== !0 ? r : e) : {};
|
300
290
|
}
|
301
|
-
}).defaults =
|
291
|
+
}).defaults = O({}, e), n;
|
302
292
|
}
|
303
|
-
class
|
293
|
+
class ie extends B() {
|
304
294
|
}
|
305
|
-
const
|
295
|
+
const re = B({
|
306
296
|
func: void 0,
|
307
297
|
bool: void 0,
|
308
298
|
string: void 0,
|
@@ -311,32 +301,31 @@ const PropTypes = U({
|
|
311
301
|
object: void 0,
|
312
302
|
integer: void 0
|
313
303
|
});
|
314
|
-
|
304
|
+
re.extend([
|
315
305
|
{
|
316
306
|
name: "looseBool",
|
317
|
-
getter:
|
307
|
+
getter: !0,
|
318
308
|
type: Boolean,
|
319
309
|
default: void 0
|
320
310
|
},
|
321
311
|
{
|
322
312
|
name: "style",
|
323
|
-
getter:
|
313
|
+
getter: !0,
|
324
314
|
type: [String, Object],
|
325
315
|
default: void 0
|
326
316
|
},
|
327
317
|
{
|
328
318
|
name: "VueNode",
|
329
|
-
getter:
|
319
|
+
getter: !0,
|
330
320
|
// @ts-ignore
|
331
321
|
type: null
|
332
322
|
}
|
333
323
|
]);
|
334
|
-
function
|
335
|
-
|
336
|
-
return type;
|
324
|
+
function oe(e) {
|
325
|
+
return e.default = void 0, e;
|
337
326
|
}
|
338
327
|
export {
|
339
|
-
|
340
|
-
withUndefined
|
328
|
+
re as default,
|
329
|
+
oe as withUndefined
|
341
330
|
};
|
342
331
|
//# sourceMappingURL=index.js.map
|