orion-design 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Flex/Col.d.ts +25 -0
- package/dist/components/Flex/Item.d.ts +25 -0
- package/dist/components/Flex/Row.d.ts +25 -0
- package/dist/components/Flex/index.d.ts +10 -0
- package/dist/components/Flex/index.js +151 -0
- package/dist/components/Modal/index.d.ts +15 -0
- package/dist/components/Modal/useModal.d.ts +3 -0
- package/dist/components/Modal/useModal.js +8 -0
- package/dist/components/Space/index.d.ts +76 -0
- package/dist/components/_util/classNames.d.ts +2 -0
- package/dist/components/_util/classNames.js +31 -0
- package/dist/components/_util/isValid.d.ts +2 -0
- package/dist/components/_util/isValid.js +5 -0
- package/dist/components/_util/props-util/index.d.ts +6 -0
- package/dist/components/_util/props-util/index.js +53 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +6 -0
- package/dist/components/_util/props-util/initDefaultProps.js +25 -0
- package/dist/components/_util/type.d.ts +62 -0
- package/dist/components/_util/type.js +66 -0
- package/dist/components/_util/util.d.ts +18 -0
- package/dist/components/_util/util.js +83 -0
- package/dist/components/_util/vue-types/index.d.ts +12 -0
- package/dist/components/_util/vue-types/index.js +473 -0
- package/dist/components/components.d.ts +6 -0
- package/dist/components/components.js +12 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +25 -0
- package/dist/components-DhjIbmR3.js +128 -0
- package/dist/error/OrionError.js +9 -7
- package/dist/index.css +44 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -0
- package/dist/print/LodopFuncs.js +109 -140
- package/dist/print/index.js +204 -199
- package/dist/request/ErrorHandlerChain.js +13 -13
- package/dist/request/RequestFilterChain.js +13 -13
- package/dist/request/ResponseParserChain.js +13 -13
- package/dist/request/disivion/DateSerializer.js +43 -51
- package/dist/request/disivion/DivisionErrorHandler.js +42 -42
- package/dist/request/disivion/DivisionResponseParser.js +22 -18
- package/dist/request/disivion/index.d.ts +21 -1
- package/dist/request/disivion/index.js +174 -153
- package/dist/request/error/BizExceptionResponseError.js +10 -10
- package/dist/request/error/ExceptionResponseError.js +10 -10
- package/dist/request/error/ResponseError.js +11 -9
- package/dist/request/error/SessionExceptionResponseError.js +10 -10
- package/dist/request/index.d.ts +3 -0
- package/dist/request/index.js +3 -2
- package/dist/style/index.d.ts +3 -0
- package/dist/style/index.js +1 -0
- package/dist/utils/DateUtil.js +46 -50
- package/dist/utils/NumberUtil.js +5 -5
- package/dist/utils/cloneDeep.js +1 -2255
- package/dist/utils/delay.js +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/md5.js +215 -271
- package/dist/version/index.d.ts +2 -0
- package/dist/version/index.js +6 -0
- package/dist/version/version.d.ts +2 -0
- package/dist/version/version.js +3 -0
- package/global.d.ts +10 -0
- package/package.json +25 -9
- package/dist/bignumber-upqAL281.js +0 -2907
- package/dist/request/disivion/request.d.ts +0 -21
- package/dist/request/disivion/request.js +0 -476
- package/dist/request/postByOpenNewWindow.d.ts +0 -1
- package/dist/request/postByOpenNewWindow.js +0 -41
@@ -0,0 +1,83 @@
|
|
1
|
+
const isFunction = val => typeof val === 'function';
|
2
|
+
const controlDefaultValue = Symbol('controlDefaultValue');
|
3
|
+
const isArray = Array.isArray;
|
4
|
+
const isString = val => typeof val === 'string';
|
5
|
+
const isSymbol = val => typeof val === 'symbol';
|
6
|
+
const isObject = val => val !== null && typeof val === 'object';
|
7
|
+
const onRE = /^on[^a-z]/;
|
8
|
+
const isOn = key => onRE.test(key);
|
9
|
+
const cacheStringFunction = fn => {
|
10
|
+
const cache = Object.create(null);
|
11
|
+
return str => {
|
12
|
+
const hit = cache[str];
|
13
|
+
return hit || (cache[str] = fn(str));
|
14
|
+
};
|
15
|
+
};
|
16
|
+
const camelizeRE = /-(\w)/g;
|
17
|
+
const camelize = cacheStringFunction(str => {
|
18
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '');
|
19
|
+
});
|
20
|
+
const hyphenateRE = /\B([A-Z])/g;
|
21
|
+
const hyphenate = cacheStringFunction(str => {
|
22
|
+
return str.replace(hyphenateRE, '-$1').toLowerCase();
|
23
|
+
});
|
24
|
+
const capitalize = cacheStringFunction(str => {
|
25
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
26
|
+
});
|
27
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
28
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
29
|
+
// change from vue sourcecode
|
30
|
+
function resolvePropValue(options, props, key, value) {
|
31
|
+
const opt = options[key];
|
32
|
+
if (opt != null) {
|
33
|
+
const hasDefault = hasOwn(opt, 'default');
|
34
|
+
// default values
|
35
|
+
if (hasDefault && value === undefined) {
|
36
|
+
const defaultValue = opt.default;
|
37
|
+
value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue;
|
38
|
+
}
|
39
|
+
// boolean casting
|
40
|
+
if (opt.type === Boolean) {
|
41
|
+
if (!hasOwn(props, key) && !hasDefault) {
|
42
|
+
value = false;
|
43
|
+
} else if (value === '') {
|
44
|
+
value = true;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return value;
|
49
|
+
}
|
50
|
+
function getDataAndAriaProps(props) {
|
51
|
+
return Object.keys(props).reduce((memo, key) => {
|
52
|
+
if (key.startsWith('data-') || key.startsWith('aria-')) {
|
53
|
+
memo[key] = props[key];
|
54
|
+
}
|
55
|
+
return memo;
|
56
|
+
}, {});
|
57
|
+
}
|
58
|
+
function toPx(val) {
|
59
|
+
if (typeof val === 'number') return `${val}px`;
|
60
|
+
return val;
|
61
|
+
}
|
62
|
+
function renderHelper(v, props = {}, defaultV) {
|
63
|
+
if (typeof v === 'function') {
|
64
|
+
return v(props);
|
65
|
+
}
|
66
|
+
return v ?? defaultV;
|
67
|
+
}
|
68
|
+
function wrapPromiseFn(openFn) {
|
69
|
+
let closeFn;
|
70
|
+
const closePromise = new Promise(resolve => {
|
71
|
+
closeFn = openFn(() => {
|
72
|
+
resolve(true);
|
73
|
+
});
|
74
|
+
});
|
75
|
+
const result = () => {
|
76
|
+
closeFn?.();
|
77
|
+
};
|
78
|
+
result.then = (filled, rejected) => closePromise.then(filled, rejected);
|
79
|
+
result.promise = closePromise;
|
80
|
+
return result;
|
81
|
+
}
|
82
|
+
|
83
|
+
export { cacheStringFunction, camelize, capitalize, controlDefaultValue, getDataAndAriaProps, hyphenate, isArray, isFunction, isObject, isOn, isString, isSymbol, renderHelper, resolvePropValue, toPx, wrapPromiseFn };
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
2
|
+
import type { VueTypeValidableDef, VueTypesInterface } from 'vue-types';
|
3
|
+
import type { VueNode } from '../type';
|
4
|
+
export declare function withUndefined<T extends {
|
5
|
+
default?: any;
|
6
|
+
}>(type: T): T;
|
7
|
+
declare const _default: VueTypesInterface & {
|
8
|
+
readonly looseBool: VueTypeValidableDef<boolean>;
|
9
|
+
readonly style: VueTypeValidableDef<CSSProperties>;
|
10
|
+
readonly VueNode: VueTypeValidableDef<VueNode>;
|
11
|
+
};
|
12
|
+
export default _default;
|
@@ -0,0 +1,473 @@
|
|
1
|
+
/*!
|
2
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
3
|
+
*
|
4
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
5
|
+
* Released under the MIT License.
|
6
|
+
*/
|
7
|
+
|
8
|
+
function isObject(o) {
|
9
|
+
return Object.prototype.toString.call(o) === '[object Object]';
|
10
|
+
}
|
11
|
+
|
12
|
+
function isPlainObject(o) {
|
13
|
+
var ctor,prot;
|
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;
|
32
|
+
}
|
33
|
+
|
34
|
+
function t() {
|
35
|
+
return t = Object.assign ? Object.assign.bind() : function (e) {
|
36
|
+
for (var t = 1; t < arguments.length; t++) {
|
37
|
+
var n = arguments[t];
|
38
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
39
|
+
}
|
40
|
+
return e;
|
41
|
+
}, t.apply(this, arguments);
|
42
|
+
}
|
43
|
+
function n(e, t) {
|
44
|
+
if (null == e) return {};
|
45
|
+
var n = {};
|
46
|
+
for (var r in e) if (Object.prototype.hasOwnProperty.call(e, r)) {
|
47
|
+
if (t.indexOf(r) >= 0) continue;
|
48
|
+
n[r] = e[r];
|
49
|
+
}
|
50
|
+
return n;
|
51
|
+
}
|
52
|
+
const r = {
|
53
|
+
silent: !1,
|
54
|
+
logLevel: "warn"
|
55
|
+
},
|
56
|
+
i = ["validator"],
|
57
|
+
o = Object.prototype,
|
58
|
+
a = o.toString,
|
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] : "";
|
67
|
+
}
|
68
|
+
return "";
|
69
|
+
}
|
70
|
+
const c = isPlainObject;
|
71
|
+
function f() {}
|
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;
|
78
|
+
}
|
79
|
+
const p = (e, t) => s.call(e, t),
|
80
|
+
y = Number.isInteger || function (e) {
|
81
|
+
return "number" == typeof e && isFinite(e) && Math.floor(e) === e;
|
82
|
+
},
|
83
|
+
v = Array.isArray || function (e) {
|
84
|
+
return "[object Array]" === a.call(e);
|
85
|
+
},
|
86
|
+
h = e => "[object Function]" === a.call(e),
|
87
|
+
b = (e, t) => c(e) && p(e, "_vueTypes_name") && (!t || e._vueTypes_name === t),
|
88
|
+
g = e => c(e) && (p(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(t => p(e, t)));
|
89
|
+
function O(e, t) {
|
90
|
+
return Object.defineProperty(e.bind(t), "__original", {
|
91
|
+
value: e
|
92
|
+
});
|
93
|
+
}
|
94
|
+
function m(e, t, n = !1) {
|
95
|
+
let r,
|
96
|
+
i = !0,
|
97
|
+
o = "";
|
98
|
+
r = c(e) ? e : {
|
99
|
+
type: e
|
100
|
+
};
|
101
|
+
const a = b(r) ? r._vueTypes_name + " - " : "";
|
102
|
+
if (g(r) && null !== r.type) {
|
103
|
+
if (void 0 === r.type || !0 === r.type) return i;
|
104
|
+
if (!r.required && null == t) return i;
|
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);
|
110
|
+
}
|
111
|
+
if (!i) {
|
112
|
+
const e = `${a}value "${t}" should be of type "${o}"`;
|
113
|
+
return !1 === n ? (d(e), !1) : e;
|
114
|
+
}
|
115
|
+
if (p(r, "validator") && h(r.validator)) {
|
116
|
+
const e = d,
|
117
|
+
o = [];
|
118
|
+
if (d = e => {
|
119
|
+
o.push(e);
|
120
|
+
}, i = r.validator(t), d = e, !i) {
|
121
|
+
const e = (o.length > 1 ? "* " : "") + o.join("\n* ");
|
122
|
+
return o.length = 0, !1 === n ? (d(e), i) : e;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
return i;
|
126
|
+
}
|
127
|
+
function j(e, t) {
|
128
|
+
const n = Object.defineProperties(t, {
|
129
|
+
_vueTypes_name: {
|
130
|
+
value: e,
|
131
|
+
writable: !0
|
132
|
+
},
|
133
|
+
isRequired: {
|
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;
|
148
|
+
}
|
149
|
+
function _(e, t) {
|
150
|
+
const n = j(e, t);
|
151
|
+
return Object.defineProperty(n, "validate", {
|
152
|
+
value(e) {
|
153
|
+
return h(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`), this.validator = O(e, this), this;
|
154
|
+
}
|
155
|
+
});
|
156
|
+
}
|
157
|
+
function T(e, t, r) {
|
158
|
+
const o = function (e) {
|
159
|
+
const t = {};
|
160
|
+
return Object.getOwnPropertyNames(e).forEach(n => {
|
161
|
+
t[n] = Object.getOwnPropertyDescriptor(e, n);
|
162
|
+
}), Object.defineProperties({}, t);
|
163
|
+
}(t);
|
164
|
+
if (o._vueTypes_name = e, !c(r)) return o;
|
165
|
+
const {
|
166
|
+
validator: a
|
167
|
+
} = r,
|
168
|
+
s = n(r, i);
|
169
|
+
if (h(a)) {
|
170
|
+
let {
|
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);
|
176
|
+
}
|
177
|
+
var u, l;
|
178
|
+
return Object.assign(o, s);
|
179
|
+
}
|
180
|
+
function $(e) {
|
181
|
+
return e.replace(/^(?!\s*$)/gm, " ");
|
182
|
+
}
|
183
|
+
const w = () => _("any", {}),
|
184
|
+
x = () => _("function", {
|
185
|
+
type: Function
|
186
|
+
}),
|
187
|
+
P = () => _("boolean", {
|
188
|
+
type: Boolean
|
189
|
+
}),
|
190
|
+
A = () => _("string", {
|
191
|
+
type: String
|
192
|
+
}),
|
193
|
+
E = () => _("number", {
|
194
|
+
type: Number
|
195
|
+
}),
|
196
|
+
S = () => _("array", {
|
197
|
+
type: Array
|
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
|
+
});
|
233
|
+
}
|
234
|
+
function L(e) {
|
235
|
+
if (!v(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
|
236
|
+
const t = `oneOf - value should be one of "${e.map(e => "symbol" == typeof e ? e.toString() : e).join('", "')}".`,
|
237
|
+
n = {
|
238
|
+
validator(n) {
|
239
|
+
const r = -1 !== e.indexOf(n);
|
240
|
+
return r || d(t), r;
|
241
|
+
}
|
242
|
+
};
|
243
|
+
if (-1 === e.indexOf(null)) {
|
244
|
+
const t = e.reduce((e, t) => {
|
245
|
+
if (null != t) {
|
246
|
+
const n = t.constructor;
|
247
|
+
-1 === e.indexOf(n) && e.push(n);
|
248
|
+
}
|
249
|
+
return e;
|
250
|
+
}, []);
|
251
|
+
t.length > 0 && (n.type = t);
|
252
|
+
}
|
253
|
+
return j("oneOf", n);
|
254
|
+
}
|
255
|
+
function B(e) {
|
256
|
+
if (!v(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
257
|
+
let t = !1,
|
258
|
+
n = !1,
|
259
|
+
r = [];
|
260
|
+
for (let i = 0; i < e.length; i += 1) {
|
261
|
+
const o = e[i];
|
262
|
+
if (g(o)) {
|
263
|
+
if (h(o.validator) && (t = !0), b(o, "oneOf") && o.type) {
|
264
|
+
r = r.concat(o.type);
|
265
|
+
continue;
|
266
|
+
}
|
267
|
+
if (b(o, "nullable")) {
|
268
|
+
n = !0;
|
269
|
+
continue;
|
270
|
+
}
|
271
|
+
if (!0 === o.type || !o.type) {
|
272
|
+
d('oneOfType - invalid usage of "true" and "null" as types.');
|
273
|
+
continue;
|
274
|
+
}
|
275
|
+
r = r.concat(o.type);
|
276
|
+
} else r.push(o);
|
277
|
+
}
|
278
|
+
r = r.filter((e, t) => r.indexOf(e) === t);
|
279
|
+
const i = !1 === n && r.length > 0 ? r : null;
|
280
|
+
return j("oneOfType", t ? {
|
281
|
+
type: i,
|
282
|
+
validator(t) {
|
283
|
+
const n = [],
|
284
|
+
r = e.some(e => {
|
285
|
+
const r = m(e, t, !0);
|
286
|
+
return "string" == typeof r && n.push(r), !0 === r;
|
287
|
+
});
|
288
|
+
return r || d(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${$(n.join("\n"))}`), r;
|
289
|
+
}
|
290
|
+
} : {
|
291
|
+
type: i
|
292
|
+
});
|
293
|
+
}
|
294
|
+
function F(e) {
|
295
|
+
return j("arrayOf", {
|
296
|
+
type: Array,
|
297
|
+
validator(t) {
|
298
|
+
let n = "";
|
299
|
+
const r = t.every(t => (n = m(e, t, !0), !0 === n));
|
300
|
+
return r || d(`arrayOf - value validation error:\n${$(n)}`), r;
|
301
|
+
}
|
302
|
+
});
|
303
|
+
}
|
304
|
+
function Y(e) {
|
305
|
+
return j("instanceOf", {
|
306
|
+
type: e
|
307
|
+
});
|
308
|
+
}
|
309
|
+
function I(e) {
|
310
|
+
return j("objectOf", {
|
311
|
+
type: Object,
|
312
|
+
validator(t) {
|
313
|
+
let n = "";
|
314
|
+
const r = Object.keys(t).every(r => (n = m(e, t[r], !0), !0 === n));
|
315
|
+
return r || d(`objectOf - value validation error:\n${$(n)}`), r;
|
316
|
+
}
|
317
|
+
});
|
318
|
+
}
|
319
|
+
function J(e) {
|
320
|
+
const t = Object.keys(e),
|
321
|
+
n = t.filter(t => {
|
322
|
+
var n;
|
323
|
+
return !(null === (n = e[t]) || void 0 === n || !n.required);
|
324
|
+
}),
|
325
|
+
r = j("shape", {
|
326
|
+
type: Object,
|
327
|
+
validator(r) {
|
328
|
+
if (!c(r)) return !1;
|
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;
|
347
|
+
}
|
348
|
+
}), r;
|
349
|
+
}
|
350
|
+
const M = ["name", "validate", "getter"],
|
351
|
+
R = /*#__PURE__*/(e => ((e = class {
|
352
|
+
static get any() {
|
353
|
+
return w();
|
354
|
+
}
|
355
|
+
static get func() {
|
356
|
+
return x().def(this.defaults.func);
|
357
|
+
}
|
358
|
+
static get bool() {
|
359
|
+
return void 0 === this.defaults.bool ? P() : P().def(this.defaults.bool);
|
360
|
+
}
|
361
|
+
static get string() {
|
362
|
+
return A().def(this.defaults.string);
|
363
|
+
}
|
364
|
+
static get number() {
|
365
|
+
return E().def(this.defaults.number);
|
366
|
+
}
|
367
|
+
static get array() {
|
368
|
+
return S().def(this.defaults.array);
|
369
|
+
}
|
370
|
+
static get object() {
|
371
|
+
return N().def(this.defaults.object);
|
372
|
+
}
|
373
|
+
static get integer() {
|
374
|
+
return V().def(this.defaults.integer);
|
375
|
+
}
|
376
|
+
static get symbol() {
|
377
|
+
return q();
|
378
|
+
}
|
379
|
+
static get nullable() {
|
380
|
+
return k();
|
381
|
+
}
|
382
|
+
static extend(e) {
|
383
|
+
if (d("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."), v(e)) return e.forEach(e => this.extend(e)), this;
|
384
|
+
const {
|
385
|
+
name: t,
|
386
|
+
validate: r = !1,
|
387
|
+
getter: i = !1
|
388
|
+
} = e,
|
389
|
+
o = n(e, M);
|
390
|
+
if (p(this, t)) throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);
|
391
|
+
const {
|
392
|
+
type: a
|
393
|
+
} = o;
|
394
|
+
if (b(a)) return delete o.type, Object.defineProperty(this, t, i ? {
|
395
|
+
get: () => T(t, a, o)
|
396
|
+
} : {
|
397
|
+
value(...e) {
|
398
|
+
const n = T(t, a, o);
|
399
|
+
return n.validator && (n.validator = n.validator.bind(n, ...e)), n;
|
400
|
+
}
|
401
|
+
});
|
402
|
+
let s;
|
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
|
+
}) {
|
431
|
+
var n;
|
432
|
+
return (n = class extends R {
|
433
|
+
static get sensibleDefaults() {
|
434
|
+
return t({}, this.defaults);
|
435
|
+
}
|
436
|
+
static set sensibleDefaults(n) {
|
437
|
+
this.defaults = !1 !== n ? t({}, !0 !== n ? n : e) : {};
|
438
|
+
}
|
439
|
+
}).defaults = t({}, e), n;
|
440
|
+
}
|
441
|
+
class z extends U() {}
|
442
|
+
|
443
|
+
const PropTypes = U({
|
444
|
+
func: undefined,
|
445
|
+
bool: undefined,
|
446
|
+
string: undefined,
|
447
|
+
number: undefined,
|
448
|
+
array: undefined,
|
449
|
+
object: undefined,
|
450
|
+
integer: undefined
|
451
|
+
});
|
452
|
+
PropTypes.extend([{
|
453
|
+
name: 'looseBool',
|
454
|
+
getter: true,
|
455
|
+
type: Boolean,
|
456
|
+
default: undefined
|
457
|
+
}, {
|
458
|
+
name: 'style',
|
459
|
+
getter: true,
|
460
|
+
type: [String, Object],
|
461
|
+
default: undefined
|
462
|
+
}, {
|
463
|
+
name: 'VueNode',
|
464
|
+
getter: true,
|
465
|
+
// @ts-ignore
|
466
|
+
type: null
|
467
|
+
}]);
|
468
|
+
function withUndefined(type) {
|
469
|
+
type.default = undefined;
|
470
|
+
return type;
|
471
|
+
}
|
472
|
+
|
473
|
+
export { PropTypes as default, withUndefined };
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { default as Space } from './Space';
|
2
|
+
export type { SpaceProps } from './Space';
|
3
|
+
export { Rowflex, Colflex, Flexitem } from './Flex';
|
4
|
+
export type { RowflexProps, ColflexProps, FlexitemProps } from './Flex';
|
5
|
+
export { default as Modal } from './Modal';
|
6
|
+
export { default as useOModal } from './Modal/useModal';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export { a as Modal, i as Space } from '../components-DhjIbmR3.js';
|
2
|
+
export { Colflex, Flexitem, Rowflex } from './Flex/index.js';
|
3
|
+
export { default as useOModal } from './Modal/useModal.js';
|
4
|
+
import 'vue';
|
5
|
+
import './_util/props-util/index.js';
|
6
|
+
import './_util/isValid.js';
|
7
|
+
import './_util/props-util/initDefaultProps.js';
|
8
|
+
import './_util/type.js';
|
9
|
+
import 'element-plus';
|
10
|
+
import './_util/classNames.js';
|
11
|
+
import './_util/util.js';
|
12
|
+
import '../error/OrionError.js';
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { c as components } from '../components-DhjIbmR3.js';
|
2
|
+
export { a as Modal, i as Space } from '../components-DhjIbmR3.js';
|
3
|
+
export { Colflex, Flexitem, Rowflex } from './Flex/index.js';
|
4
|
+
export { default as useOModal } from './Modal/useModal.js';
|
5
|
+
import 'vue';
|
6
|
+
import './_util/props-util/index.js';
|
7
|
+
import './_util/isValid.js';
|
8
|
+
import './_util/props-util/initDefaultProps.js';
|
9
|
+
import './_util/type.js';
|
10
|
+
import 'element-plus';
|
11
|
+
import './_util/classNames.js';
|
12
|
+
import './_util/util.js';
|
13
|
+
import '../error/OrionError.js';
|
14
|
+
|
15
|
+
const install = function (app) {
|
16
|
+
Object.keys(components).forEach(key => {
|
17
|
+
const component = components[key];
|
18
|
+
if (component.install) {
|
19
|
+
app.use(component);
|
20
|
+
}
|
21
|
+
});
|
22
|
+
return app;
|
23
|
+
};
|
24
|
+
|
25
|
+
export { install };
|