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
@@ -1,18 +1,12 @@
1
- import { b as isFunction } from "../../../functions-BeMkokbY.js";
1
+ import { b as r } from "../../../functions-DzLqXvGt.js";
2
2
  import "lodash-es";
3
3
  import "vue";
4
- const composeRefs = (...refs) => {
5
- return (el) => {
6
- refs.forEach((ref) => {
7
- if (isFunction(ref)) {
8
- ref(el);
9
- } else {
10
- ref.value = el;
11
- }
12
- });
13
- };
4
+ const c = (...i) => (t) => {
5
+ i.forEach((o) => {
6
+ r(o) ? o(t) : o.value = t;
7
+ });
14
8
  };
15
9
  export {
16
- composeRefs
10
+ c as composeRefs
17
11
  };
18
12
  //# sourceMappingURL=refs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"refs.js","sources":["../../../../src/components/_util/vue/refs.ts"],"sourcesContent":["import { isFunction } from '../types'\r\n\r\nimport type { ComponentPublicInstance, Ref } from 'vue'\r\n\r\nexport type RefSetter = (\r\n el: Element | ComponentPublicInstance | undefined\r\n) => void\r\n\r\nexport const composeRefs = (\r\n ...refs: (Ref<HTMLElement | undefined> | RefSetter)[]\r\n) => {\r\n return (el: Element | ComponentPublicInstance | null) => {\r\n refs.forEach((ref) => {\r\n if (isFunction(ref)) {\r\n ref(el as Element | ComponentPublicInstance)\r\n } else {\r\n ref.value = el as HTMLElement | undefined\r\n }\r\n })\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAQa,MAAA,cAAc,IACtB,SACA;AACH,SAAO,CAAC,OAAiD;AAClD,SAAA,QAAQ,CAAC,QAAQ;AAChB,UAAA,WAAW,GAAG,GAAG;AACnB,YAAI,EAAuC;AAAA,MAAA,OACtC;AACL,YAAI,QAAQ;AAAA,MACd;AAAA,IAAA,CACD;AAAA,EAAA;AAEL;"}
1
+ {"version":3,"file":"refs.js","sources":["../../../../src/components/_util/vue/refs.ts"],"sourcesContent":["import { isFunction } from '../types'\r\n\r\nimport type { ComponentPublicInstance, Ref } from 'vue'\r\n\r\nexport type RefSetter = (\r\n el: Element | ComponentPublicInstance | undefined\r\n) => void\r\n\r\nexport const composeRefs = (\r\n ...refs: (Ref<HTMLElement | undefined> | RefSetter)[]\r\n) => {\r\n return (el: Element | ComponentPublicInstance | null) => {\r\n refs.forEach((ref) => {\r\n if (isFunction(ref)) {\r\n ref(el as Element | ComponentPublicInstance)\r\n } else {\r\n ref.value = el as HTMLElement | undefined\r\n }\r\n })\r\n }\r\n}\r\n"],"names":["composeRefs","refs","el","ref","isFunction"],"mappings":";;;AAQa,MAAAA,IAAc,IACtBC,MAEI,CAACC,MAAiD;AAClD,EAAAD,EAAA,QAAQ,CAACE,MAAQ;AAChB,IAAAC,EAAWD,CAAG,IAChBA,EAAID,CAAuC,IAE3CC,EAAI,QAAQD;AAAA,EACd,CACD;AAAA;"}
@@ -1,8 +1,6 @@
1
- import { componentSizeMap } from "element-plus";
2
- const getComponentSize = (size) => {
3
- return componentSizeMap[size || "default"];
4
- };
1
+ import { componentSizeMap as o } from "element-plus";
2
+ const n = (e) => o[e || "default"];
5
3
  export {
6
- getComponentSize
4
+ n as getComponentSize
7
5
  };
8
6
  //# sourceMappingURL=size.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"size.js","sources":["../../../../src/components/_util/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from 'element-plus'\r\n\r\nimport type { ComponentSize } from 'element-plus'\r\n\r\nexport const getComponentSize = (size?: ComponentSize) => {\r\n return componentSizeMap[size || 'default']\r\n}\r\n"],"names":[],"mappings":";AAIa,MAAA,mBAAmB,CAAC,SAAyB;AACjD,SAAA,iBAAiB,QAAQ,SAAS;AAC3C;"}
1
+ {"version":3,"file":"size.js","sources":["../../../../src/components/_util/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from 'element-plus'\r\n\r\nimport type { ComponentSize } from 'element-plus'\r\n\r\nexport const getComponentSize = (size?: ComponentSize) => {\r\n return componentSizeMap[size || 'default']\r\n}\r\n"],"names":["getComponentSize","size","componentSizeMap"],"mappings":";AAIa,MAAAA,IAAmB,CAACC,MACxBC,EAAiBD,KAAQ,SAAS;"}
@@ -1,8 +1,7 @@
1
- import { componentSizes, datePickTypes } from "element-plus";
2
- const isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
3
- const isValidDatePickType = (val) => [...datePickTypes].includes(val);
1
+ import { componentSizes as i, datePickTypes as o } from "element-plus";
2
+ const s = (e) => ["", ...i].includes(e), t = (e) => [...o].includes(e);
4
3
  export {
5
- isValidComponentSize,
6
- isValidDatePickType
4
+ s as isValidComponentSize,
5
+ t as isValidDatePickType
7
6
  };
8
7
  //# sourceMappingURL=validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validator.js","sources":["../../../../src/components/_util/vue/validator.ts"],"sourcesContent":["import { componentSizes, datePickTypes } from 'element-plus'\r\nimport type { ComponentSize, DatePickType } from 'element-plus'\r\n\r\nexport const isValidComponentSize = (val: string): val is ComponentSize | '' =>\r\n ['', ...componentSizes].includes(val)\r\n\r\nexport const isValidDatePickType = (val: string): val is DatePickType =>\r\n ([...datePickTypes] as string[]).includes(val)\r\n"],"names":[],"mappings":";AAGa,MAAA,uBAAuB,CAAC,QACnC,CAAC,IAAI,GAAG,cAAc,EAAE,SAAS,GAAG;AAEzB,MAAA,sBAAsB,CAAC,QACjC,CAAC,GAAG,aAAa,EAAe,SAAS,GAAG;"}
1
+ {"version":3,"file":"validator.js","sources":["../../../../src/components/_util/vue/validator.ts"],"sourcesContent":["import { componentSizes, datePickTypes } from 'element-plus'\r\nimport type { ComponentSize, DatePickType } from 'element-plus'\r\n\r\nexport const isValidComponentSize = (val: string): val is ComponentSize | '' =>\r\n ['', ...componentSizes].includes(val)\r\n\r\nexport const isValidDatePickType = (val: string): val is DatePickType =>\r\n ([...datePickTypes] as string[]).includes(val)\r\n"],"names":["isValidComponentSize","val","componentSizes","isValidDatePickType","datePickTypes"],"mappings":";AAGa,MAAAA,IAAuB,CAACC,MACnC,CAAC,IAAI,GAAGC,CAAc,EAAE,SAASD,CAAG,GAEzBE,IAAsB,CAACF,MACjC,CAAC,GAAGG,CAAa,EAAe,SAASH,CAAG;"}
@@ -1,114 +1,68 @@
1
- import { isVNode, Fragment, Text, Comment, createCommentVNode, openBlock, createBlock } from "vue";
2
- import { h as hasOwn, c as camelize, i as isArray } from "../../../functions-BeMkokbY.js";
1
+ import { isVNode as u, Fragment as m, Text as A, Comment as N, createCommentVNode as S, openBlock as s, createBlock as L } from "vue";
2
+ import { h as _, c as C, i as E } from "../../../functions-DzLqXvGt.js";
3
3
  import "lodash-es";
4
- import { debugWarn } from "../error.js";
5
- const SCOPE = "utils/vue/vnode";
6
- var PatchFlags = /* @__PURE__ */ ((PatchFlags2) => {
7
- PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
8
- PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS";
9
- PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE";
10
- PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS";
11
- PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS";
12
- PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
13
- PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
14
- PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
15
- PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
16
- PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH";
17
- PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
18
- PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED";
19
- PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL";
20
- return PatchFlags2;
21
- })(PatchFlags || {});
22
- function isFragment(node) {
23
- return isVNode(node) && node.type === Fragment;
4
+ import { debugWarn as O } from "../error.js";
5
+ const R = "utils/vue/vnode";
6
+ var D = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(D || {});
7
+ function f(e) {
8
+ return u(e) && e.type === m;
24
9
  }
25
- function isText(node) {
26
- return isVNode(node) && node.type === Text;
10
+ function G(e) {
11
+ return u(e) && e.type === A;
27
12
  }
28
- function isComment(node) {
29
- return isVNode(node) && node.type === Comment;
13
+ function p(e) {
14
+ return u(e) && e.type === N;
30
15
  }
31
- const TEMPLATE = "template";
32
- function isTemplate(node) {
33
- return isVNode(node) && node.type === TEMPLATE;
16
+ const y = "template";
17
+ function Y(e) {
18
+ return u(e) && e.type === y;
34
19
  }
35
- function isValidElementNode(node) {
36
- return isVNode(node) && !isFragment(node) && !isComment(node);
20
+ function H(e) {
21
+ return u(e) && !f(e) && !p(e);
37
22
  }
38
- function getChildren(node, depth) {
39
- if (isComment(node)) return;
40
- if (isFragment(node) || isTemplate(node)) {
41
- return depth > 0 ? getFirstValidNode(node.children, depth - 1) : void 0;
42
- }
43
- return node;
23
+ function T(e, t) {
24
+ if (!p(e))
25
+ return f(e) || Y(e) ? t > 0 ? M(e.children, t - 1) : void 0 : e;
44
26
  }
45
- const getFirstValidNode = (nodes, maxDepth = 3) => {
46
- if (Array.isArray(nodes)) {
47
- return getChildren(nodes[0], maxDepth);
48
- } else {
49
- return getChildren(nodes, maxDepth);
50
- }
51
- };
52
- function renderIf(condition, ...args) {
53
- return condition ? renderBlock(...args) : createCommentVNode("v-if", true);
27
+ const M = (e, t = 3) => Array.isArray(e) ? T(e[0], t) : T(e, t);
28
+ function w(e, ...t) {
29
+ return e ? v(...t) : S("v-if", !0);
54
30
  }
55
- function renderBlock(...args) {
56
- return openBlock(), createBlock(...args);
31
+ function v(...e) {
32
+ return s(), L(...e);
57
33
  }
58
- const getNormalizedProps = (node) => {
59
- if (!isVNode(node)) {
60
- debugWarn(SCOPE, "[getNormalizedProps] must be a VNode");
61
- return {};
62
- }
63
- const raw = node.props || {};
64
- const type = (isVNode(node.type) ? node.type.props : void 0) || {};
65
- const props = {};
66
- Object.keys(type).forEach((key) => {
67
- if (hasOwn(type[key], "default")) {
68
- props[key] = type[key].default;
69
- }
70
- });
71
- Object.keys(raw).forEach((key) => {
72
- props[camelize(key)] = raw[key];
73
- });
74
- return props;
75
- };
76
- const ensureOnlyChild = (children) => {
77
- if (!isArray(children) || children.length > 1) {
34
+ const K = (e) => {
35
+ if (!u(e))
36
+ return O(R, "[getNormalizedProps] must be a VNode"), {};
37
+ const t = e.props || {}, n = (u(e.type) ? e.type.props : void 0) || {}, r = {};
38
+ return Object.keys(n).forEach((o) => {
39
+ _(n[o], "default") && (r[o] = n[o].default);
40
+ }), Object.keys(t).forEach((o) => {
41
+ r[C(o)] = t[o];
42
+ }), r;
43
+ }, U = (e) => {
44
+ if (!E(e) || e.length > 1)
78
45
  throw new Error("expect to receive a single Vue element child");
79
- }
80
- return children[0];
81
- };
82
- const flattedChildren = (children) => {
83
- const vNodes = isArray(children) ? children : [children];
84
- const result = [];
85
- vNodes.forEach((child) => {
86
- var _a;
87
- if (isArray(child)) {
88
- result.push(...flattedChildren(child));
89
- } else if (isVNode(child) && isArray(child.children)) {
90
- result.push(...flattedChildren(child.children));
91
- } else {
92
- result.push(child);
93
- if (isVNode(child) && ((_a = child.component) == null ? void 0 : _a.subTree)) {
94
- result.push(...flattedChildren(child.component.subTree));
95
- }
96
- }
97
- });
98
- return result;
46
+ return e[0];
47
+ }, i = (e) => {
48
+ const t = E(e) ? e : [e], n = [];
49
+ return t.forEach((r) => {
50
+ var o;
51
+ E(r) ? n.push(...i(r)) : u(r) && E(r.children) ? n.push(...i(r.children)) : (n.push(r), u(r) && ((o = r.component) != null && o.subTree) && n.push(...i(r.component.subTree)));
52
+ }), n;
99
53
  };
100
54
  export {
101
- PatchFlags,
102
- ensureOnlyChild,
103
- flattedChildren,
104
- getFirstValidNode,
105
- getNormalizedProps,
106
- isComment,
107
- isFragment,
108
- isTemplate,
109
- isText,
110
- isValidElementNode,
111
- renderBlock,
112
- renderIf
55
+ D as PatchFlags,
56
+ U as ensureOnlyChild,
57
+ i as flattedChildren,
58
+ M as getFirstValidNode,
59
+ K as getNormalizedProps,
60
+ p as isComment,
61
+ f as isFragment,
62
+ Y as isTemplate,
63
+ G as isText,
64
+ H as isValidElementNode,
65
+ v as renderBlock,
66
+ w as renderIf
113
67
  };
114
68
  //# sourceMappingURL=vnode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vnode.js","sources":["../../../../src/components/_util/vue/vnode.ts"],"sourcesContent":["import {\r\n Comment,\r\n Fragment,\r\n Text,\r\n createBlock,\r\n createCommentVNode,\r\n isVNode,\r\n openBlock,\r\n} from 'vue'\r\nimport { camelize } from '../strings'\r\nimport { isArray } from '../types'\r\nimport { hasOwn } from '../objects'\r\nimport { debugWarn } from '../error'\r\nimport type {\r\n VNode,\r\n VNodeArrayChildren,\r\n VNodeChild,\r\n VNodeNormalizedChildren,\r\n} from 'vue'\r\n\r\nconst SCOPE = 'utils/vue/vnode'\r\n\r\nexport enum PatchFlags {\r\n TEXT = 1,\r\n CLASS = 2,\r\n STYLE = 4,\r\n PROPS = 8,\r\n FULL_PROPS = 16,\r\n HYDRATE_EVENTS = 32,\r\n STABLE_FRAGMENT = 64,\r\n KEYED_FRAGMENT = 128,\r\n UNKEYED_FRAGMENT = 256,\r\n NEED_PATCH = 512,\r\n DYNAMIC_SLOTS = 1024,\r\n HOISTED = -1,\r\n BAIL = -2,\r\n}\r\n\r\nexport type VNodeChildAtom = Exclude<VNodeChild, Array<any>>\r\nexport type RawSlots = Exclude<\r\n VNodeNormalizedChildren,\r\n Array<any> | null | string\r\n>\r\n\r\nexport function isFragment(node: VNode): boolean\r\nexport function isFragment(node: unknown): node is VNode\r\nexport function isFragment(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Fragment\r\n}\r\n\r\nexport function isText(node: VNode): boolean\r\nexport function isText(node: unknown): node is VNode\r\nexport function isText(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Text\r\n}\r\n\r\nexport function isComment(node: VNode): boolean\r\nexport function isComment(node: unknown): node is VNode\r\nexport function isComment(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Comment\r\n}\r\n\r\nconst TEMPLATE = 'template'\r\nexport function isTemplate(node: VNode): boolean\r\nexport function isTemplate(node: unknown): node is VNode\r\nexport function isTemplate(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === TEMPLATE\r\n}\r\n\r\n/**\r\n * determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if\r\n * @param node {VNode} node to be tested\r\n */\r\nexport function isValidElementNode(node: VNode): boolean\r\nexport function isValidElementNode(node: unknown): node is VNode\r\nexport function isValidElementNode(node: unknown): node is VNode {\r\n return isVNode(node) && !isFragment(node) && !isComment(node)\r\n}\r\n\r\n/**\r\n * get a valid child node (not fragment nor comment)\r\n * @param node {VNode} node to be searched\r\n * @param depth {number} depth to be searched\r\n */\r\nfunction getChildren(\r\n node: VNodeNormalizedChildren | VNodeChild,\r\n depth: number\r\n): VNodeNormalizedChildren | VNodeChild {\r\n if (isComment(node)) return\r\n if (isFragment(node) || isTemplate(node)) {\r\n return depth > 0 ? getFirstValidNode(node.children, depth - 1) : undefined\r\n }\r\n return node\r\n}\r\n\r\nexport const getFirstValidNode = (\r\n nodes: VNodeNormalizedChildren,\r\n maxDepth = 3\r\n) => {\r\n if (Array.isArray(nodes)) {\r\n return getChildren(nodes[0], maxDepth)\r\n } else {\r\n return getChildren(nodes, maxDepth)\r\n }\r\n}\r\n\r\nexport function renderIf(\r\n condition: boolean,\r\n ...args: Parameters<typeof createBlock>\r\n) {\r\n return condition ? renderBlock(...args) : createCommentVNode('v-if', true)\r\n}\r\n\r\nexport function renderBlock(...args: Parameters<typeof createBlock>) {\r\n return openBlock(), createBlock(...args)\r\n}\r\n\r\nexport const getNormalizedProps = (node: VNode) => {\r\n if (!isVNode(node)) {\r\n debugWarn(SCOPE, '[getNormalizedProps] must be a VNode')\r\n return {}\r\n }\r\n\r\n const raw = node.props || {}\r\n const type = (isVNode(node.type) ? node.type.props : undefined) || {}\r\n const props: Record<string, any> = {}\r\n\r\n Object.keys(type).forEach((key) => {\r\n if (hasOwn(type[key], 'default')) {\r\n props[key] = type[key].default\r\n }\r\n })\r\n\r\n Object.keys(raw).forEach((key) => {\r\n props[camelize(key)] = raw[key]\r\n })\r\n\r\n return props\r\n}\r\n\r\nexport const ensureOnlyChild = (children: VNodeArrayChildren | undefined) => {\r\n if (!isArray(children) || children.length > 1) {\r\n throw new Error('expect to receive a single Vue element child')\r\n }\r\n return children[0]\r\n}\r\n\r\nexport type FlattenVNodes = Array<VNodeChildAtom | RawSlots>\r\n\r\nexport const flattedChildren = (\r\n children: FlattenVNodes | VNode | VNodeNormalizedChildren\r\n): FlattenVNodes => {\r\n const vNodes = isArray(children) ? children : [children]\r\n const result: FlattenVNodes = []\r\n\r\n vNodes.forEach((child) => {\r\n if (isArray(child)) {\r\n result.push(...flattedChildren(child))\r\n } else if (isVNode(child) && isArray(child.children)) {\r\n result.push(...flattedChildren(child.children))\r\n } else {\r\n result.push(child)\r\n if (isVNode(child) && child.component?.subTree) {\r\n result.push(...flattedChildren(child.component.subTree))\r\n }\r\n }\r\n })\r\n return result\r\n}\r\n"],"names":["PatchFlags"],"mappings":";;;;AAoBA,MAAM,QAAQ;AAEF,IAAA,+BAAAA,gBAAL;AACLA,cAAAA,YAAA,UAAO,CAAP,IAAA;AACAA,cAAAA,YAAA,WAAQ,CAAR,IAAA;AACAA,cAAAA,YAAA,WAAQ,CAAR,IAAA;AACAA,cAAAA,YAAA,WAAQ,CAAR,IAAA;AACAA,cAAAA,YAAA,gBAAa,EAAb,IAAA;AACAA,cAAAA,YAAA,oBAAiB,EAAjB,IAAA;AACAA,cAAAA,YAAA,qBAAkB,EAAlB,IAAA;AACAA,cAAAA,YAAA,oBAAiB,GAAjB,IAAA;AACAA,cAAAA,YAAA,sBAAmB,GAAnB,IAAA;AACAA,cAAAA,YAAA,gBAAa,GAAb,IAAA;AACAA,cAAAA,YAAA,mBAAgB,IAAhB,IAAA;AACAA,cAAAA,YAAA,aAAU,EAAV,IAAA;AACAA,cAAAA,YAAA,UAAO,EAAP,IAAA;AAbUA,SAAAA;AAAA,GAAA,cAAA,CAAA,CAAA;AAwBL,SAAS,WAAW,MAA8B;AACvD,SAAO,QAAQ,IAAI,KAAK,KAAK,SAAS;AACxC;AAIO,SAAS,OAAO,MAA8B;AACnD,SAAO,QAAQ,IAAI,KAAK,KAAK,SAAS;AACxC;AAIO,SAAS,UAAU,MAA8B;AACtD,SAAO,QAAQ,IAAI,KAAK,KAAK,SAAS;AACxC;AAEA,MAAM,WAAW;AAGV,SAAS,WAAW,MAA8B;AACvD,SAAO,QAAQ,IAAI,KAAK,KAAK,SAAS;AACxC;AAQO,SAAS,mBAAmB,MAA8B;AACxD,SAAA,QAAQ,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,UAAU,IAAI;AAC9D;AAOA,SAAS,YACP,MACA,OACsC;AAClC,MAAA,UAAU,IAAI,EAAG;AACrB,MAAI,WAA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;AAClB,QAAM,SAAS,QAAQ,QAAQ,IAAI,WAAW,CAAC,QAAQ;AACvD,QAAM,SAAwB,CAAA;AAEvB,SAAA,QAAQ,CAAC,UAAU;;AACpB,QAAA,QAAQ,KAAK,GAAG;AAClB,aAAO,KAAK,GAAG,gBAAgB,KAAK,CAAC;AAAA,IAAA,WAC5B,QAAQ,KAAK,KAAK,QAAQ,MAAM,QAAQ,GAAG;AACpD,aAAO,KAAK,GAAG,gBAAgB,MAAM,QAAQ,CAAC;AAAA,IAAA,OACzC;AACL,aAAO,KAAK,KAAK;AACjB,UAAI,QAAQ,KAAK,OAAK,WAAM,cAAN,mBAAiB,UAAS;AAC9C,eAAO,KAAK,GAAG,gBAAgB,MAAM,UAAU,OAAO,CAAC;AAAA,MACzD;AAAA,IACF;AAAA,EAAA,CACD;AACM,SAAA;AACT;"}
1
+ {"version":3,"file":"vnode.js","sources":["../../../../src/components/_util/vue/vnode.ts"],"sourcesContent":["import {\r\n Comment,\r\n Fragment,\r\n Text,\r\n createBlock,\r\n createCommentVNode,\r\n isVNode,\r\n openBlock,\r\n} from 'vue'\r\nimport { camelize } from '../strings'\r\nimport { isArray } from '../types'\r\nimport { hasOwn } from '../objects'\r\nimport { debugWarn } from '../error'\r\nimport type {\r\n VNode,\r\n VNodeArrayChildren,\r\n VNodeChild,\r\n VNodeNormalizedChildren,\r\n} from 'vue'\r\n\r\nconst SCOPE = 'utils/vue/vnode'\r\n\r\nexport enum PatchFlags {\r\n TEXT = 1,\r\n CLASS = 2,\r\n STYLE = 4,\r\n PROPS = 8,\r\n FULL_PROPS = 16,\r\n HYDRATE_EVENTS = 32,\r\n STABLE_FRAGMENT = 64,\r\n KEYED_FRAGMENT = 128,\r\n UNKEYED_FRAGMENT = 256,\r\n NEED_PATCH = 512,\r\n DYNAMIC_SLOTS = 1024,\r\n HOISTED = -1,\r\n BAIL = -2,\r\n}\r\n\r\nexport type VNodeChildAtom = Exclude<VNodeChild, Array<any>>\r\nexport type RawSlots = Exclude<\r\n VNodeNormalizedChildren,\r\n Array<any> | null | string\r\n>\r\n\r\nexport function isFragment(node: VNode): boolean\r\nexport function isFragment(node: unknown): node is VNode\r\nexport function isFragment(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Fragment\r\n}\r\n\r\nexport function isText(node: VNode): boolean\r\nexport function isText(node: unknown): node is VNode\r\nexport function isText(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Text\r\n}\r\n\r\nexport function isComment(node: VNode): boolean\r\nexport function isComment(node: unknown): node is VNode\r\nexport function isComment(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === Comment\r\n}\r\n\r\nconst TEMPLATE = 'template'\r\nexport function isTemplate(node: VNode): boolean\r\nexport function isTemplate(node: unknown): node is VNode\r\nexport function isTemplate(node: unknown): node is VNode {\r\n return isVNode(node) && node.type === TEMPLATE\r\n}\r\n\r\n/**\r\n * determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if\r\n * @param node {VNode} node to be tested\r\n */\r\nexport function isValidElementNode(node: VNode): boolean\r\nexport function isValidElementNode(node: unknown): node is VNode\r\nexport function isValidElementNode(node: unknown): node is VNode {\r\n return isVNode(node) && !isFragment(node) && !isComment(node)\r\n}\r\n\r\n/**\r\n * get a valid child node (not fragment nor comment)\r\n * @param node {VNode} node to be searched\r\n * @param depth {number} depth to be searched\r\n */\r\nfunction getChildren(\r\n node: VNodeNormalizedChildren | VNodeChild,\r\n depth: number\r\n): VNodeNormalizedChildren | VNodeChild {\r\n if (isComment(node)) return\r\n if (isFragment(node) || isTemplate(node)) {\r\n return depth > 0 ? getFirstValidNode(node.children, depth - 1) : undefined\r\n }\r\n return node\r\n}\r\n\r\nexport const getFirstValidNode = (\r\n nodes: VNodeNormalizedChildren,\r\n maxDepth = 3\r\n) => {\r\n if (Array.isArray(nodes)) {\r\n return getChildren(nodes[0], maxDepth)\r\n } else {\r\n return getChildren(nodes, maxDepth)\r\n }\r\n}\r\n\r\nexport function renderIf(\r\n condition: boolean,\r\n ...args: Parameters<typeof createBlock>\r\n) {\r\n return condition ? renderBlock(...args) : createCommentVNode('v-if', true)\r\n}\r\n\r\nexport function renderBlock(...args: Parameters<typeof createBlock>) {\r\n return openBlock(), createBlock(...args)\r\n}\r\n\r\nexport const getNormalizedProps = (node: VNode) => {\r\n if (!isVNode(node)) {\r\n debugWarn(SCOPE, '[getNormalizedProps] must be a VNode')\r\n return {}\r\n }\r\n\r\n const raw = node.props || {}\r\n const type = (isVNode(node.type) ? node.type.props : undefined) || {}\r\n const props: Record<string, any> = {}\r\n\r\n Object.keys(type).forEach((key) => {\r\n if (hasOwn(type[key], 'default')) {\r\n props[key] = type[key].default\r\n }\r\n })\r\n\r\n Object.keys(raw).forEach((key) => {\r\n props[camelize(key)] = raw[key]\r\n })\r\n\r\n return props\r\n}\r\n\r\nexport const ensureOnlyChild = (children: VNodeArrayChildren | undefined) => {\r\n if (!isArray(children) || children.length > 1) {\r\n throw new Error('expect to receive a single Vue element child')\r\n }\r\n return children[0]\r\n}\r\n\r\nexport type FlattenVNodes = Array<VNodeChildAtom | RawSlots>\r\n\r\nexport const flattedChildren = (\r\n children: FlattenVNodes | VNode | VNodeNormalizedChildren\r\n): FlattenVNodes => {\r\n const vNodes = isArray(children) ? children : [children]\r\n const result: FlattenVNodes = []\r\n\r\n vNodes.forEach((child) => {\r\n if (isArray(child)) {\r\n result.push(...flattedChildren(child))\r\n } else if (isVNode(child) && isArray(child.children)) {\r\n result.push(...flattedChildren(child.children))\r\n } else {\r\n result.push(child)\r\n if (isVNode(child) && child.component?.subTree) {\r\n result.push(...flattedChildren(child.component.subTree))\r\n }\r\n }\r\n })\r\n return result\r\n}\r\n"],"names":["SCOPE","PatchFlags","isFragment","node","isVNode","Fragment","isText","Text","isComment","Comment","TEMPLATE","isTemplate","isValidElementNode","getChildren","depth","getFirstValidNode","nodes","maxDepth","renderIf","condition","args","renderBlock","createCommentVNode","openBlock","createBlock","getNormalizedProps","debugWarn","raw","type","props","key","hasOwn","camelize","ensure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