orion-design 0.1.31 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  3. package/dist/Throne/hooks/use-throne-context.js +15 -0
  4. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  5. package/dist/Throne/index.d.ts +1 -1
  6. package/dist/Throne/index.js +14 -30
  7. package/dist/Throne/index.js.map +1 -1
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  9. package/dist/components/Button/index.js +36 -41
  10. package/dist/components/Button/index.js.map +1 -1
  11. package/dist/components/Flex/index.js +89 -122
  12. package/dist/components/Flex/index.js.map +1 -1
  13. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  14. package/dist/components/Form/Form.js +2 -2
  15. package/dist/components/Form/Form.js.map +1 -1
  16. package/dist/components/Form/LovInput/LovInput.js +2 -2
  17. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  18. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  19. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  20. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  21. package/dist/components/Form/LovInput/index.js +4 -4
  22. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  23. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  24. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  25. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  26. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  27. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  28. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  29. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  30. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  31. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  32. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  33. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  34. package/dist/components/Form/hooks/index.js +69 -127
  35. package/dist/components/Form/hooks/index.js.map +1 -1
  36. package/dist/components/Form/index.d.ts +3 -0
  37. package/dist/components/Form/index.js +790 -829
  38. package/dist/components/Form/index.js.map +1 -1
  39. package/dist/components/Form/utils/index.js +18 -30
  40. package/dist/components/Form/utils/index.js.map +1 -1
  41. package/dist/components/LovTable/LovPagetable.vue.d.ts +510 -6
  42. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  43. package/dist/components/LovTable/index.d.ts +489 -5
  44. package/dist/components/LovTable/index.js +104 -179
  45. package/dist/components/LovTable/index.js.map +1 -1
  46. package/dist/components/Modal/index.js +56 -111
  47. package/dist/components/Modal/index.js.map +1 -1
  48. package/dist/components/Modal/types.d.ts +1 -1
  49. package/dist/components/Modal/types.js +3 -4
  50. package/dist/components/Modal/types.js.map +1 -1
  51. package/dist/components/Modal/useModal.js +5 -5
  52. package/dist/components/Modal/useModal.js.map +1 -1
  53. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  54. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  55. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  56. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  57. package/dist/components/Pagetable/Pagetable.d.ts +96 -3
  58. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +14 -1
  59. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +14 -1
  60. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  61. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +14 -1
  62. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +14 -1
  63. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +14 -1
  64. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +14 -1
  65. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +14 -1
  66. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  67. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  68. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  69. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  70. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  71. package/dist/components/Pagetable/index.d.ts +159 -2
  72. package/dist/components/Pagetable/index.js +601 -684
  73. package/dist/components/Pagetable/index.js.map +1 -1
  74. package/dist/components/Pagetable/utils/index.js +54 -92
  75. package/dist/components/Pagetable/utils/index.js.map +1 -1
  76. package/dist/components/Querytable/Querytable.d.ts +80 -2
  77. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  78. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  79. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  80. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  81. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  82. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  83. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  84. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  85. package/dist/components/Querytable/hooks/useColumns.js +79 -82
  86. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  87. package/dist/components/Querytable/index.d.ts +147 -1
  88. package/dist/components/Querytable/index.js +526 -579
  89. package/dist/components/Querytable/index.js.map +1 -1
  90. package/dist/components/Querytable/utils/index.js +54 -92
  91. package/dist/components/Querytable/utils/index.js.map +1 -1
  92. package/dist/components/RichTextEditor/index.js +74 -100
  93. package/dist/components/RichTextEditor/index.js.map +1 -1
  94. package/dist/components/Tabs/constants.js +2 -2
  95. package/dist/components/Tabs/constants.js.map +1 -1
  96. package/dist/components/Tabs/index.js +358 -603
  97. package/dist/components/Tabs/index.js.map +1 -1
  98. package/dist/components/Tabs/tab-bar.js +6 -6
  99. package/dist/components/Tabs/tab-bar.js.map +1 -1
  100. package/dist/components/Tabs/tab-pane.js +3 -3
  101. package/dist/components/Tabs/tab-pane.js.map +1 -1
  102. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  103. package/dist/components/_constants/aria.js +2 -2
  104. package/dist/components/_constants/aria.js.map +1 -1
  105. package/dist/components/_constants/event.js +4 -6
  106. package/dist/components/_constants/event.js.map +1 -1
  107. package/dist/components/_constants/index.js +6 -6
  108. package/dist/components/_hooks/index.js +7 -7
  109. package/dist/components/_hooks/use-namespace/index.js +39 -74
  110. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  111. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  112. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  113. package/dist/components/_util/arrays.js +5 -9
  114. package/dist/components/_util/arrays.js.map +1 -1
  115. package/dist/components/_util/browser.js +6 -6
  116. package/dist/components/_util/browser.js.map +1 -1
  117. package/dist/components/_util/classNames.js +17 -22
  118. package/dist/components/_util/classNames.js.map +1 -1
  119. package/dist/components/_util/dom/aria.js +39 -74
  120. package/dist/components/_util/dom/aria.js.map +1 -1
  121. package/dist/components/_util/dom/element.js +8 -9
  122. package/dist/components/_util/dom/element.js.map +1 -1
  123. package/dist/components/_util/dom/event.js +7 -14
  124. package/dist/components/_util/dom/event.js.map +1 -1
  125. package/dist/components/_util/dom/index.js +36 -36
  126. package/dist/components/_util/dom/position.js +25 -49
  127. package/dist/components/_util/dom/position.js.map +1 -1
  128. package/dist/components/_util/dom/scroll.js +61 -103
  129. package/dist/components/_util/dom/scroll.js.map +1 -1
  130. package/dist/components/_util/dom/style.js +50 -65
  131. package/dist/components/_util/dom/style.js.map +1 -1
  132. package/dist/components/_util/easings.js +4 -8
  133. package/dist/components/_util/easings.js.map +1 -1
  134. package/dist/components/_util/error.js +11 -12
  135. package/dist/components/_util/error.js.map +1 -1
  136. package/dist/components/_util/functions.js +3 -3
  137. package/dist/components/_util/i18n.js +2 -2
  138. package/dist/components/_util/i18n.js.map +1 -1
  139. package/dist/components/_util/index.js +137 -137
  140. package/dist/components/_util/isValid.js +2 -4
  141. package/dist/components/_util/isValid.js.map +1 -1
  142. package/dist/components/_util/objects.js +14 -18
  143. package/dist/components/_util/objects.js.map +1 -1
  144. package/dist/components/_util/props-util/index.js +20 -46
  145. package/dist/components/_util/props-util/index.js.map +1 -1
  146. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  147. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  148. package/dist/components/_util/raf.js +4 -5
  149. package/dist/components/_util/raf.js.map +1 -1
  150. package/dist/components/_util/rand.js +3 -4
  151. package/dist/components/_util/rand.js.map +1 -1
  152. package/dist/components/_util/strings.js +8 -9
  153. package/dist/components/_util/strings.js.map +1 -1
  154. package/dist/components/_util/throttleByRaf.js +10 -16
  155. package/dist/components/_util/throttleByRaf.js.map +1 -1
  156. package/dist/components/_util/type.js +38 -41
  157. package/dist/components/_util/type.js.map +1 -1
  158. package/dist/components/_util/types.js +22 -41
  159. package/dist/components/_util/types.js.map +1 -1
  160. package/dist/components/_util/typescript.js +2 -2
  161. package/dist/components/_util/typescript.js.map +1 -1
  162. package/dist/components/_util/util.js +43 -85
  163. package/dist/components/_util/util.js.map +1 -1
  164. package/dist/components/_util/vue/global-node.js +15 -27
  165. package/dist/components/_util/vue/global-node.js.map +1 -1
  166. package/dist/components/_util/vue/icon.js +25 -29
  167. package/dist/components/_util/vue/icon.js.map +1 -1
  168. package/dist/components/_util/vue/index.js +41 -41
  169. package/dist/components/_util/vue/install.js +18 -35
  170. package/dist/components/_util/vue/install.js.map +1 -1
  171. package/dist/components/_util/vue/props/index.js +6 -6
  172. package/dist/components/_util/vue/props/runtime.js +30 -46
  173. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  174. package/dist/components/_util/vue/refs.js +6 -12
  175. package/dist/components/_util/vue/refs.js.map +1 -1
  176. package/dist/components/_util/vue/size.js +3 -5
  177. package/dist/components/_util/vue/size.js.map +1 -1
  178. package/dist/components/_util/vue/validator.js +4 -5
  179. package/dist/components/_util/vue/validator.js.map +1 -1
  180. package/dist/components/_util/vue/vnode.js +54 -100
  181. package/dist/components/_util/vue/vnode.js.map +1 -1
  182. package/dist/components/_util/vue-types/index.js +220 -231
  183. package/dist/components/_util/vue-types/index.js.map +1 -1
  184. package/dist/components/components.d.ts +2 -0
  185. package/dist/components/components.js +24 -20
  186. package/dist/components/components.js.map +1 -1
  187. package/dist/components/index.js +43 -38
  188. package/dist/components/index.js.map +1 -1
  189. package/dist/components-DP9bnDLm.js +48 -0
  190. package/dist/components-DP9bnDLm.js.map +1 -0
  191. package/dist/error/OrionError.js +4 -8
  192. package/dist/error/OrionError.js.map +1 -1
  193. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  194. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  195. package/dist/index.css +1 -797
  196. package/dist/index.d.ts +1 -0
  197. package/dist/index.js +46 -36
  198. package/dist/index.js.map +1 -1
  199. package/dist/print/LodopFuncs.js +43 -101
  200. package/dist/print/LodopFuncs.js.map +1 -1
  201. package/dist/print/index.js +108 -200
  202. package/dist/print/index.js.map +1 -1
  203. package/dist/request/ErrorHandlerChain.js +14 -17
  204. package/dist/request/ErrorHandlerChain.js.map +1 -1
  205. package/dist/request/RequestFilterChain.js +13 -16
  206. package/dist/request/RequestFilterChain.js.map +1 -1
  207. package/dist/request/ResponseParserChain.js +14 -17
  208. package/dist/request/ResponseParserChain.js.map +1 -1
  209. package/dist/request/disivion/DateSerializer.js +22 -47
  210. package/dist/request/disivion/DateSerializer.js.map +1 -1
  211. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  212. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  213. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  214. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  215. package/dist/request/disivion/index.js +201 -305
  216. package/dist/request/disivion/index.js.map +1 -1
  217. package/dist/request/error/BizExceptionResponseError.js +5 -11
  218. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  219. package/dist/request/error/ExceptionResponseError.js +5 -11
  220. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  221. package/dist/request/error/ResponseError.js +4 -9
  222. package/dist/request/error/ResponseError.js.map +1 -1
  223. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  224. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  225. package/dist/request/index.js +11 -11
  226. package/dist/utils/DateUtil.js +33 -48
  227. package/dist/utils/DateUtil.js.map +1 -1
  228. package/dist/utils/NumberUtil.js +6 -6
  229. package/dist/utils/NumberUtil.js.map +1 -1
  230. package/dist/utils/cloneDeep.js +2 -2
  231. package/dist/utils/delay.js +3 -3
  232. package/dist/utils/delay.js.map +1 -1
  233. package/dist/utils/functions.js +3 -3
  234. package/dist/utils/index.js +12 -12
  235. package/dist/utils/md5.js +93 -191
  236. package/dist/utils/md5.js.map +1 -1
  237. package/dist/utils/uuid.js +25 -35
  238. package/dist/utils/uuid.js.map +1 -1
  239. package/dist/version/index.js +2 -2
  240. package/dist/version/version.d.ts +1 -1
  241. package/dist/version/version.js +2 -2
  242. package/dist/version/version.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  245. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  246. package/dist/components-8oZ2kpUC.js +0 -27
  247. package/dist/components-8oZ2kpUC.js.map +0 -1
  248. package/dist/components-B3d9m_tn.js +0 -27
  249. package/dist/components-B3d9m_tn.js.map +0 -1
  250. package/dist/functions-BeMkokbY.js +0 -63
  251. package/dist/functions-BeMkokbY.js.map +0 -1
  252. package/dist/index-BOKLZnqH.js +0 -54
  253. package/dist/index-BOKLZnqH.js.map +0 -1
  254. package/dist/index-D1m0KTpK.js +0 -69
  255. package/dist/index-D1m0KTpK.js.map +0 -1
  256. package/dist/index-DR5ZP7mD.js +0 -160
  257. package/dist/index-DR5ZP7mD.js.map +0 -1
  258. package/dist/index-DkwIULcN.js +0 -200
  259. 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 isObject(o2) {
8
- return Object.prototype.toString.call(o2) === "[object Object]";
7
+ function $(e) {
8
+ return Object.prototype.toString.call(e) === "[object Object]";
9
9
  }
10
- function isPlainObject(o2) {
11
- var ctor, prot;
12
- if (isObject(o2) === false) return false;
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 t() {
23
- return t = Object.assign ? Object.assign.bind() : function(e) {
24
- for (var t2 = 1; t2 < arguments.length; t2++) {
25
- var n2 = arguments[t2];
26
- for (var r2 in n2) Object.prototype.hasOwnProperty.call(n2, r2) && (e[r2] = n2[r2]);
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
- }, t.apply(this, arguments);
21
+ }, O.apply(this, arguments);
30
22
  }
31
- function n(e, t2) {
32
- if (null == e) return {};
33
- var n2 = {};
34
- for (var r2 in e) if (Object.prototype.hasOwnProperty.call(e, r2)) {
35
- if (t2.indexOf(r2) >= 0) continue;
36
- n2[r2] = e[r2];
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 n2;
30
+ return r;
39
31
  }
40
- const r = { silent: false, logLevel: "warn" }, i = ["validator"], o = Object.prototype, a = o.toString, s = o.hasOwnProperty, u = /^\s*function (\w+)/;
41
- function l(e) {
42
- var t2;
43
- const n2 = null !== (t2 = null == e ? void 0 : e.type) && void 0 !== t2 ? t2 : e;
44
- if (n2) {
45
- const e2 = n2.toString().match(u);
46
- return e2 ? e2[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] : "";
47
39
  }
48
40
  return "";
49
41
  }
50
- const c = isPlainObject;
51
- function f() {
42
+ const y = k;
43
+ function V() {
52
44
  }
53
- let d = f;
54
- if ("production" !== process.env.NODE_ENV) {
55
- const e = "undefined" != typeof console;
56
- d = e ? function(e2, t2 = r.logLevel) {
57
- false === r.silent && console[t2](`[VueTypes warn]: ${e2}`);
58
- } : f;
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
- const p = (e, t2) => s.call(e, t2), y = Number.isInteger || function(e) {
61
- return "number" == typeof e && isFinite(e) && Math.floor(e) === e;
62
- }, v = Array.isArray || function(e) {
63
- return "[object Array]" === a.call(e);
64
- }, h = (e) => "[object Function]" === a.call(e), b = (e, t2) => c(e) && p(e, "_vueTypes_name") && (!t2 || e._vueTypes_name === t2), g = (e) => c(e) && (p(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t2) => p(e, t2)));
65
- function O(e, t2) {
66
- return Object.defineProperty(e.bind(t2), "__original", { value: e });
67
- }
68
- function m(e, t2, n2 = false) {
69
- let r2, i2 = true, o2 = "";
70
- r2 = c(e) ? e : { type: e };
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 (!i2) {
82
- const e2 = `${a2}value "${t2}" should be of type "${o2}"`;
83
- return false === n2 ? (d(e2), false) : e2;
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 (p(r2, "validator") && h(r2.validator)) {
86
- const e2 = d, o3 = [];
87
- if (d = (e3) => {
88
- o3.push(e3);
89
- }, i2 = r2.validator(t2), d = e2, !i2) {
90
- const e3 = (o3.length > 1 ? "* " : "") + o3.join("\n* ");
91
- return o3.length = 0, false === n2 ? (d(e3), i2) : e3;
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 i2;
83
+ return i;
95
84
  }
96
- function j(e, t2) {
97
- const n2 = Object.defineProperties(t2, { _vueTypes_name: { value: e, writable: true }, isRequired: { get() {
98
- return this.required = true, this;
99
- } }, def: { value(e2) {
100
- return void 0 === e2 ? this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean) ? void (this.default = void 0) : (p(this, "default") && delete this.default, this) : h(e2) || true === m(this, e2, true) ? (this.default = v(e2) ? () => [...e2] : c(e2) ? () => Object.assign({}, e2) : e2, this) : (d(`${this._vueTypes_name} - invalid default value: "${e2}"`), this);
101
- } } }), { validator: r2 } = n2;
102
- return h(r2) && (n2.validator = O(r2, n2)), n2;
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 _(e, t2) {
105
- const n2 = j(e, t2);
106
- return Object.defineProperty(n2, "validate", { value(e2) {
107
- return h(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
108
- ${JSON.stringify(this)}`), this.validator = O(e2, this), this;
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 T(e, t2, r2) {
112
- const o2 = function(e2) {
113
- const t3 = {};
114
- return Object.getOwnPropertyNames(e2).forEach((n2) => {
115
- t3[n2] = Object.getOwnPropertyDescriptor(e2, n2);
116
- }), Object.defineProperties({}, t3);
117
- }(t2);
118
- if (o2._vueTypes_name = e, !c(r2)) return o2;
119
- const { validator: a2 } = r2, s2 = n(r2, i);
120
- if (h(a2)) {
121
- let { validator: e2 } = o2;
122
- e2 && (e2 = null !== (l2 = (u2 = e2).__original) && void 0 !== l2 ? l2 : u2), o2.validator = O(e2 ? function(t3) {
123
- return e2.call(this, t3) && a2.call(this, t3);
124
- } : a2, o2);
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 u2, l2;
127
- return Object.assign(o2, s2);
115
+ var o, s;
116
+ return Object.assign(t, a);
128
117
  }
129
- function $(e) {
118
+ function j(e) {
130
119
  return e.replace(/^(?!\s*$)/gm, " ");
131
120
  }
132
- const w = () => _("any", {}), x = () => _("function", { type: Function }), P = () => _("boolean", { type: Boolean }), A = () => _("string", { type: String }), E = () => _("number", { type: Number }), S = () => _("array", { type: Array }), N = () => _("object", { type: Object }), V = () => j("integer", { type: Number, validator(e) {
133
- const t2 = y(e);
134
- return false === t2 && d(`integer - "${e}" is not an integer`), t2;
135
- } }), q = () => j("symbol", { validator(e) {
136
- const t2 = "symbol" == typeof e;
137
- return false === t2 && d(`symbol - invalid value "${e}"`), t2;
138
- } }), k = () => Object.defineProperty({ type: null, validator(e) {
139
- const t2 = null === e;
140
- return false === t2 && d("nullable - value should be null"), t2;
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 D(e, t2 = "custom validation failed") {
143
- if ("function" != typeof e) throw new TypeError("[VueTypes error]: You must provide a function as argument");
144
- return j(e.name || "<<anonymous function>>", { type: null, validator(n2) {
145
- const r2 = e(n2);
146
- return r2 || d(`${this._vueTypes_name} - ${t2}`), r2;
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 L(e) {
150
- if (!v(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
151
- const t2 = `oneOf - value should be one of "${e.map((e2) => "symbol" == typeof e2 ? e2.toString() : e2).join('", "')}".`, n2 = { validator(n3) {
152
- const r2 = -1 !== e.indexOf(n3);
153
- return r2 || d(t2), r2;
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 (-1 === e.indexOf(null)) {
156
- const t3 = e.reduce((e2, t4) => {
157
- if (null != t4) {
158
- const n3 = t4.constructor;
159
- -1 === e2.indexOf(n3) && e2.push(n3);
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 e2;
150
+ return i;
162
151
  }, []);
163
- t3.length > 0 && (n2.type = t3);
152
+ t.length > 0 && (r.type = t);
164
153
  }
165
- return j("oneOf", n2);
154
+ return f("oneOf", r);
166
155
  }
167
- function B(e) {
168
- if (!v(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
169
- let t2 = false, n2 = false, r2 = [];
170
- for (let i3 = 0; i3 < e.length; i3 += 1) {
171
- const o2 = e[i3];
172
- if (g(o2)) {
173
- if (h(o2.validator) && (t2 = true), b(o2, "oneOf") && o2.type) {
174
- r2 = r2.concat(o2.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);
175
164
  continue;
176
165
  }
177
- if (b(o2, "nullable")) {
178
- n2 = true;
166
+ if (m(o, "nullable")) {
167
+ r = !0;
179
168
  continue;
180
169
  }
181
- if (true === o2.type || !o2.type) {
182
- d('oneOfType - invalid usage of "true" and "null" as types.');
170
+ if (o.type === !0 || !o.type) {
171
+ c('oneOfType - invalid usage of "true" and "null" as types.');
183
172
  continue;
184
173
  }
185
- r2 = r2.concat(o2.type);
186
- } else r2.push(o2);
174
+ t = t.concat(o.type);
175
+ } else t.push(o);
187
176
  }
188
- r2 = r2.filter((e2, t3) => r2.indexOf(e2) === t3);
189
- const i2 = false === n2 && r2.length > 0 ? r2 : null;
190
- return j("oneOfType", t2 ? { type: i2, validator(t3) {
191
- const n3 = [], r3 = e.some((e2) => {
192
- const r4 = m(e2, t3, true);
193
- return "string" == typeof r4 && n3.push(r4), true === r4;
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 r3 || d(`oneOfType - provided value does not match any of the ${n3.length} passed-in validators:
196
- ${$(n3.join("\n"))}`), r3;
197
- } } : { type: i2 });
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 F(e) {
200
- return j("arrayOf", { type: Array, validator(t2) {
201
- let n2 = "";
202
- const r2 = t2.every((t3) => (n2 = m(e, t3, true), true === n2));
203
- return r2 || d(`arrayOf - value validation error:
204
- ${$(n2)}`), r2;
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 Y(e) {
208
- return j("instanceOf", { type: e });
197
+ function X(e) {
198
+ return f("instanceOf", { type: e });
209
199
  }
210
- function I(e) {
211
- return j("objectOf", { type: Object, validator(t2) {
212
- let n2 = "";
213
- const r2 = Object.keys(t2).every((r3) => (n2 = m(e, t2[r3], true), true === n2));
214
- return r2 || d(`objectOf - value validation error:
215
- ${$(n2)}`), r2;
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 J(e) {
219
- const t2 = Object.keys(e), n2 = t2.filter((t3) => {
220
- var n3;
221
- return !(null === (n3 = e[t3]) || void 0 === n3 || !n3.required);
222
- }), r2 = j("shape", { type: Object, validator(r3) {
223
- if (!c(r3)) return false;
224
- const i2 = Object.keys(r3);
225
- if (n2.length > 0 && n2.some((e2) => -1 === i2.indexOf(e2))) {
226
- const e2 = n2.filter((e3) => -1 === i2.indexOf(e3));
227
- return d(1 === e2.length ? `shape - required property "${e2[0]}" is not defined.` : `shape - required properties "${e2.join('", "')}" are not defined.`), false;
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 i2.every((n3) => {
230
- if (-1 === t2.indexOf(n3)) return true === this._vueTypes_isLoose || (d(`shape - shape definition does not include a "${n3}" property. Allowed keys: "${t2.join('", "')}".`), false);
231
- const i3 = m(e[n3], r3[n3], true);
232
- return "string" == typeof i3 && d(`shape - "${n3}" property validation error:
233
- ${$(i3)}`), true === i3;
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(r2, "_vueTypes_isLoose", { writable: true, value: false }), Object.defineProperty(r2, "loose", { get() {
237
- return this._vueTypes_isLoose = true, this;
238
- } }), r2;
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 M = ["name", "validate", "getter"], R = /* @__PURE__ */ ((e) => ((e = class {
230
+ const te = ["name", "validate", "getter"], ne = /* @__PURE__ */ ((e) => ((e = class {
241
231
  static get any() {
242
- return w();
232
+ return Y();
243
233
  }
244
234
  static get func() {
245
- return x().def(this.defaults.func);
235
+ return U().def(this.defaults.func);
246
236
  }
247
237
  static get bool() {
248
- return void 0 === this.defaults.bool ? P() : P().def(this.defaults.bool);
238
+ return this.defaults.bool === void 0 ? x() : x().def(this.defaults.bool);
249
239
  }
250
240
  static get string() {
251
- return A().def(this.defaults.string);
241
+ return I().def(this.defaults.string);
252
242
  }
253
243
  static get number() {
254
- return E().def(this.defaults.number);
244
+ return J().def(this.defaults.number);
255
245
  }
256
246
  static get array() {
257
- return S().def(this.defaults.array);
247
+ return M().def(this.defaults.array);
258
248
  }
259
249
  static get object() {
260
- return N().def(this.defaults.object);
250
+ return R().def(this.defaults.object);
261
251
  }
262
252
  static get integer() {
263
- return V().def(this.defaults.integer);
253
+ return z().def(this.defaults.integer);
264
254
  }
265
255
  static get symbol() {
266
- return q();
256
+ return C();
267
257
  }
268
258
  static get nullable() {
269
- return k();
259
+ return G();
270
260
  }
271
- static extend(e2) {
272
- 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(e2)) return e2.forEach((e3) => this.extend(e3)), this;
273
- const { name: t2, validate: r2 = false, getter: i2 = false } = e2, o2 = n(e2, M);
274
- if (p(this, t2)) throw new TypeError(`[VueTypes error]: Type "${t2}" already defined`);
275
- const { type: a2 } = o2;
276
- if (b(a2)) return delete o2.type, Object.defineProperty(this, t2, i2 ? { get: () => T(t2, a2, o2) } : { value(...e3) {
277
- const n2 = T(t2, a2, o2);
278
- return n2.validator && (n2.validator = n2.validator.bind(n2, ...e3)), n2;
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 s2;
281
- return s2 = i2 ? { get() {
282
- const e3 = Object.assign({}, o2);
283
- return r2 ? _(t2, e3) : j(t2, e3);
284
- }, enumerable: true } : { value(...e3) {
285
- const n2 = Object.assign({}, o2);
286
- let i3;
287
- return i3 = r2 ? _(t2, n2) : j(t2, n2), n2.validator && (i3.validator = n2.validator.bind(i3, ...e3)), i3;
288
- }, enumerable: true }, Object.defineProperty(this, t2, s2);
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 = r, e.custom = D, e.oneOf = L, e.instanceOf = Y, e.oneOfType = B, e.arrayOf = F, e.objectOf = I, e.shape = J, e.utils = { validate: (e2, t2) => true === m(t2, e2, true), toType: (e2, t2, n2 = false) => n2 ? _(e2, t2) : j(e2, t2) }, e))();
291
- function U(e = { func: () => {
292
- }, bool: true, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
293
- var n2;
294
- return (n2 = class extends R {
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 t({}, this.defaults);
286
+ return O({}, this.defaults);
297
287
  }
298
- static set sensibleDefaults(n3) {
299
- this.defaults = false !== n3 ? t({}, true !== n3 ? n3 : e) : {};
288
+ static set sensibleDefaults(r) {
289
+ this.defaults = r !== !1 ? O({}, r !== !0 ? r : e) : {};
300
290
  }
301
- }).defaults = t({}, e), n2;
291
+ }).defaults = O({}, e), n;
302
292
  }
303
- class z extends U() {
293
+ class ie extends B() {
304
294
  }
305
- const PropTypes = U({
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
- PropTypes.extend([
304
+ re.extend([
315
305
  {
316
306
  name: "looseBool",
317
- getter: true,
307
+ getter: !0,
318
308
  type: Boolean,
319
309
  default: void 0
320
310
  },
321
311
  {
322
312
  name: "style",
323
- getter: true,
313
+ getter: !0,
324
314
  type: [String, Object],
325
315
  default: void 0
326
316
  },
327
317
  {
328
318
  name: "VueNode",
329
- getter: true,
319
+ getter: !0,
330
320
  // @ts-ignore
331
321
  type: null
332
322
  }
333
323
  ]);
334
- function withUndefined(type) {
335
- type.default = void 0;
336
- return type;
324
+ function oe(e) {
325
+ return e.default = void 0, e;
337
326
  }
338
327
  export {
339
- PropTypes as default,
340
- withUndefined
328
+ re as default,
329
+ oe as withUndefined
341
330
  };
342
331
  //# sourceMappingURL=index.js.map