orion-design 0.1.30 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/index.js +30 -14
  3. package/dist/Throne/index.js.map +1 -1
  4. package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
  5. package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
  6. package/dist/components/Button/index.js +40 -33
  7. package/dist/components/Button/index.js.map +1 -1
  8. package/dist/components/Flex/index.js +122 -89
  9. package/dist/components/Flex/index.js.map +1 -1
  10. package/dist/components/Form/Form.js +2 -2
  11. package/dist/components/Form/Form.js.map +1 -1
  12. package/dist/components/Form/LovInput/LovInput.js +2 -2
  13. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  14. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  15. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  16. package/dist/components/Form/LovInput/index.js +4 -4
  17. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  18. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  19. package/dist/components/Form/hooks/index.js +128 -66
  20. package/dist/components/Form/hooks/index.js.map +1 -1
  21. package/dist/components/Form/index.js +836 -656
  22. package/dist/components/Form/index.js.map +1 -1
  23. package/dist/components/Form/utils/index.js +30 -18
  24. package/dist/components/Form/utils/index.js.map +1 -1
  25. package/dist/components/LovTable/index.js +179 -105
  26. package/dist/components/LovTable/index.js.map +1 -1
  27. package/dist/components/Modal/index.js +111 -56
  28. package/dist/components/Modal/index.js.map +1 -1
  29. package/dist/components/Modal/types.js +4 -3
  30. package/dist/components/Modal/types.js.map +1 -1
  31. package/dist/components/Modal/useModal.js +5 -5
  32. package/dist/components/Modal/useModal.js.map +1 -1
  33. package/dist/components/Pagetable/hooks/useColumns.js +88 -80
  34. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  35. package/dist/components/Pagetable/index.js +687 -542
  36. package/dist/components/Pagetable/index.js.map +1 -1
  37. package/dist/components/Pagetable/utils/index.js +92 -54
  38. package/dist/components/Pagetable/utils/index.js.map +1 -1
  39. package/dist/components/Querytable/hooks/useColumns.js +82 -74
  40. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  41. package/dist/components/Querytable/index.js +579 -469
  42. package/dist/components/Querytable/index.js.map +1 -1
  43. package/dist/components/Querytable/utils/index.js +92 -54
  44. package/dist/components/Querytable/utils/index.js.map +1 -1
  45. package/dist/components/RichTextEditor/index.js +100 -74
  46. package/dist/components/RichTextEditor/index.js.map +1 -1
  47. package/dist/components/Tabs/constants.js +2 -2
  48. package/dist/components/Tabs/constants.js.map +1 -1
  49. package/dist/components/Tabs/index.js +603 -358
  50. package/dist/components/Tabs/index.js.map +1 -1
  51. package/dist/components/Tabs/tab-bar.js +6 -6
  52. package/dist/components/Tabs/tab-bar.js.map +1 -1
  53. package/dist/components/Tabs/tab-pane.js +3 -3
  54. package/dist/components/Tabs/tab-pane.js.map +1 -1
  55. package/dist/components/_constants/aria.js +2 -2
  56. package/dist/components/_constants/aria.js.map +1 -1
  57. package/dist/components/_constants/event.js +6 -4
  58. package/dist/components/_constants/event.js.map +1 -1
  59. package/dist/components/_constants/index.js +6 -6
  60. package/dist/components/_hooks/index.js +7 -7
  61. package/dist/components/_hooks/use-namespace/index.js +74 -39
  62. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  63. package/dist/components/_hooks/use-ordered-children/index.js +29 -19
  64. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  65. package/dist/components/_util/arrays.js +9 -5
  66. package/dist/components/_util/arrays.js.map +1 -1
  67. package/dist/components/_util/browser.js +6 -6
  68. package/dist/components/_util/browser.js.map +1 -1
  69. package/dist/components/_util/classNames.js +22 -17
  70. package/dist/components/_util/classNames.js.map +1 -1
  71. package/dist/components/_util/dom/aria.js +74 -39
  72. package/dist/components/_util/dom/aria.js.map +1 -1
  73. package/dist/components/_util/dom/element.js +9 -8
  74. package/dist/components/_util/dom/element.js.map +1 -1
  75. package/dist/components/_util/dom/event.js +14 -7
  76. package/dist/components/_util/dom/event.js.map +1 -1
  77. package/dist/components/_util/dom/index.js +36 -36
  78. package/dist/components/_util/dom/position.js +49 -25
  79. package/dist/components/_util/dom/position.js.map +1 -1
  80. package/dist/components/_util/dom/scroll.js +103 -61
  81. package/dist/components/_util/dom/scroll.js.map +1 -1
  82. package/dist/components/_util/dom/style.js +65 -50
  83. package/dist/components/_util/dom/style.js.map +1 -1
  84. package/dist/components/_util/easings.js +8 -4
  85. package/dist/components/_util/easings.js.map +1 -1
  86. package/dist/components/_util/error.js +12 -11
  87. package/dist/components/_util/error.js.map +1 -1
  88. package/dist/components/_util/functions.js +3 -3
  89. package/dist/components/_util/i18n.js +2 -2
  90. package/dist/components/_util/i18n.js.map +1 -1
  91. package/dist/components/_util/index.js +137 -137
  92. package/dist/components/_util/isValid.js +4 -2
  93. package/dist/components/_util/isValid.js.map +1 -1
  94. package/dist/components/_util/objects.js +18 -14
  95. package/dist/components/_util/objects.js.map +1 -1
  96. package/dist/components/_util/props-util/index.js +46 -20
  97. package/dist/components/_util/props-util/index.js.map +1 -1
  98. package/dist/components/_util/props-util/initDefaultProps.js +18 -10
  99. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  100. package/dist/components/_util/raf.js +5 -4
  101. package/dist/components/_util/raf.js.map +1 -1
  102. package/dist/components/_util/rand.js +4 -3
  103. package/dist/components/_util/rand.js.map +1 -1
  104. package/dist/components/_util/strings.js +9 -8
  105. package/dist/components/_util/strings.js.map +1 -1
  106. package/dist/components/_util/throttleByRaf.js +16 -10
  107. package/dist/components/_util/throttleByRaf.js.map +1 -1
  108. package/dist/components/_util/type.js +41 -38
  109. package/dist/components/_util/type.js.map +1 -1
  110. package/dist/components/_util/types.js +41 -22
  111. package/dist/components/_util/types.js.map +1 -1
  112. package/dist/components/_util/typescript.js +2 -2
  113. package/dist/components/_util/typescript.js.map +1 -1
  114. package/dist/components/_util/util.js +85 -43
  115. package/dist/components/_util/util.js.map +1 -1
  116. package/dist/components/_util/vue/global-node.js +27 -15
  117. package/dist/components/_util/vue/global-node.js.map +1 -1
  118. package/dist/components/_util/vue/icon.js +29 -25
  119. package/dist/components/_util/vue/icon.js.map +1 -1
  120. package/dist/components/_util/vue/index.js +41 -41
  121. package/dist/components/_util/vue/install.js +35 -18
  122. package/dist/components/_util/vue/install.js.map +1 -1
  123. package/dist/components/_util/vue/props/index.js +6 -6
  124. package/dist/components/_util/vue/props/runtime.js +46 -30
  125. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  126. package/dist/components/_util/vue/refs.js +12 -6
  127. package/dist/components/_util/vue/refs.js.map +1 -1
  128. package/dist/components/_util/vue/size.js +5 -3
  129. package/dist/components/_util/vue/size.js.map +1 -1
  130. package/dist/components/_util/vue/validator.js +5 -4
  131. package/dist/components/_util/vue/validator.js.map +1 -1
  132. package/dist/components/_util/vue/vnode.js +100 -54
  133. package/dist/components/_util/vue/vnode.js.map +1 -1
  134. package/dist/components/_util/vue-types/index.js +231 -220
  135. package/dist/components/_util/vue-types/index.js.map +1 -1
  136. package/dist/components/components.js +20 -20
  137. package/dist/components/index.js +38 -35
  138. package/dist/components/index.js.map +1 -1
  139. package/dist/components-B3d9m_tn.js +27 -0
  140. package/dist/components-B3d9m_tn.js.map +1 -0
  141. package/dist/error/OrionError.js +8 -4
  142. package/dist/error/OrionError.js.map +1 -1
  143. package/dist/functions-BeMkokbY.js +63 -0
  144. package/dist/functions-BeMkokbY.js.map +1 -0
  145. package/dist/index-BOKLZnqH.js +54 -0
  146. package/dist/index-BOKLZnqH.js.map +1 -0
  147. package/dist/index-D1m0KTpK.js +69 -0
  148. package/dist/index-D1m0KTpK.js.map +1 -0
  149. package/dist/index-DR5ZP7mD.js +160 -0
  150. package/dist/index-DR5ZP7mD.js.map +1 -0
  151. package/dist/index-DkwIULcN.js +200 -0
  152. package/dist/index-DkwIULcN.js.map +1 -0
  153. package/dist/index.css +797 -1
  154. package/dist/index.js +36 -36
  155. package/dist/print/LodopFuncs.js +101 -43
  156. package/dist/print/LodopFuncs.js.map +1 -1
  157. package/dist/print/index.js +200 -108
  158. package/dist/print/index.js.map +1 -1
  159. package/dist/request/ErrorHandlerChain.js +17 -14
  160. package/dist/request/ErrorHandlerChain.js.map +1 -1
  161. package/dist/request/RequestFilterChain.js +16 -13
  162. package/dist/request/RequestFilterChain.js.map +1 -1
  163. package/dist/request/ResponseParserChain.js +17 -14
  164. package/dist/request/ResponseParserChain.js.map +1 -1
  165. package/dist/request/disivion/DateSerializer.js +47 -22
  166. package/dist/request/disivion/DateSerializer.js.map +1 -1
  167. package/dist/request/disivion/DivisionErrorHandler.js +40 -25
  168. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  169. package/dist/request/disivion/DivisionResponseParser.js +16 -10
  170. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  171. package/dist/request/disivion/index.js +305 -201
  172. package/dist/request/disivion/index.js.map +1 -1
  173. package/dist/request/error/BizExceptionResponseError.js +11 -5
  174. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  175. package/dist/request/error/ExceptionResponseError.js +11 -5
  176. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  177. package/dist/request/error/ResponseError.js +9 -4
  178. package/dist/request/error/ResponseError.js.map +1 -1
  179. package/dist/request/error/SessionExceptionResponseError.js +11 -5
  180. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  181. package/dist/request/index.js +11 -11
  182. package/dist/utils/DateUtil.js +48 -33
  183. package/dist/utils/DateUtil.js.map +1 -1
  184. package/dist/utils/NumberUtil.js +6 -6
  185. package/dist/utils/NumberUtil.js.map +1 -1
  186. package/dist/utils/cloneDeep.js +2 -2
  187. package/dist/utils/delay.js +3 -3
  188. package/dist/utils/delay.js.map +1 -1
  189. package/dist/utils/functions.js +3 -3
  190. package/dist/utils/index.js +12 -12
  191. package/dist/utils/md5.js +191 -93
  192. package/dist/utils/md5.js.map +1 -1
  193. package/dist/utils/uuid.js +35 -25
  194. package/dist/utils/uuid.js.map +1 -1
  195. package/dist/version/index.js +2 -2
  196. package/dist/version/version.d.ts +1 -1
  197. package/dist/version/version.js +2 -2
  198. package/dist/version/version.js.map +1 -1
  199. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../src/components/_util/util.ts"],"sourcesContent":["import type { VueNode } from './type'\r\nexport const isFunction = (val) => typeof val === 'function'\r\nexport const controlDefaultValue = Symbol('controlDefaultValue') as any\r\nexport const isArray = Array.isArray\r\nexport const isString = (val) => typeof val === 'string'\r\nexport const isSymbol = (val) => typeof val === 'symbol'\r\nexport const isObject = (val) => val !== null && typeof val === 'object'\r\nconst onRE = /^on[^a-z]/\r\nconst isOn = (key) => onRE.test(key)\r\n\r\nconst cacheStringFunction = (fn) => {\r\n const cache = Object.create(null)\r\n return (str) => {\r\n const hit = cache[str]\r\n return hit || (cache[str] = fn(str))\r\n }\r\n}\r\nconst camelizeRE = /-(\\w)/g\r\nconst camelize = cacheStringFunction((str) => {\r\n return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))\r\n})\r\n\r\nconst hyphenateRE = /\\B([A-Z])/g\r\nconst hyphenate = cacheStringFunction((str) => {\r\n return str.replace(hyphenateRE, '-$1').toLowerCase()\r\n})\r\n\r\nconst capitalize = cacheStringFunction((str) => {\r\n return str.charAt(0).toUpperCase() + str.slice(1)\r\n})\r\n\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key)\r\n\r\n// change from vue sourcecode\r\nfunction resolvePropValue(options, props, key, value) {\r\n const opt = options[key]\r\n if (opt != null) {\r\n const hasDefault = hasOwn(opt, 'default')\r\n // default values\r\n if (hasDefault && value === undefined) {\r\n const defaultValue = opt.default\r\n value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue\r\n }\r\n // boolean casting\r\n if (opt.type === Boolean) {\r\n if (!hasOwn(props, key) && !hasDefault) {\r\n value = false\r\n } else if (value === '') {\r\n value = true\r\n }\r\n }\r\n }\r\n return value\r\n}\r\n\r\nexport function getDataAndAriaProps(props) {\r\n return Object.keys(props).reduce((memo, key) => {\r\n if (key.startsWith('data-') || key.startsWith('aria-')) {\r\n memo[key] = props[key]\r\n }\r\n return memo\r\n }, {})\r\n}\r\n\r\nexport function toPx(val) {\r\n if (typeof val === 'number') return `${val}px`\r\n return val\r\n}\r\n\r\nexport function renderHelper<T = Record<string, any>>(v: VueNode | ((arg0: T) => VueNode), props: T = {} as T, defaultV?: any) {\r\n if (typeof v === 'function') {\r\n return v(props)\r\n }\r\n return v ?? defaultV\r\n}\r\nexport function wrapPromiseFn(openFn: (resolve: VoidFunction) => VoidFunction) {\r\n let closeFn: VoidFunction\r\n\r\n const closePromise = new Promise<boolean>((resolve) => {\r\n closeFn = openFn(() => {\r\n resolve(true)\r\n })\r\n })\r\n\r\n const result: any = () => {\r\n closeFn?.()\r\n }\r\n\r\n result.then = (filled: VoidFunction, rejected: VoidFunction) => closePromise.then(filled, rejected)\r\n result.promise = closePromise\r\n\r\n return result\r\n}\r\n\r\nexport { isOn, cacheStringFunction, camelize, hyphenate, capitalize, resolvePropValue }\r\n"],"names":["isFunction","val","controlDefaultValue","isArray","isString","isSymbol","isObject","onRE","isOn","key","cacheStringFunction","fn","cache","str","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","hasOwnProperty","hasOwn","resolvePropValue","options","props","value","opt","hasDefault","defaultValue","getDataAndAriaProps","memo","toPx","renderHelper","v","defaultV","wrapPromiseFn","openFn","closeFn","closePromise","resolve","result","filled","rejected"],"mappings":"AACO,MAAMA,IAAa,CAACC,MAAQ,OAAOA,KAAQ,YACrCC,IAAsB,OAAO,qBAAqB,GAClDC,IAAU,MAAM,SAChBC,IAAW,CAACH,MAAQ,OAAOA,KAAQ,UACnCI,IAAW,CAACJ,MAAQ,OAAOA,KAAQ,UACnCK,IAAW,CAACL,MAAQA,MAAQ,QAAQ,OAAOA,KAAQ,UAC1DM,IAAO,aACPC,IAAO,CAACC,MAAQF,EAAK,KAAKE,CAAG,GAE7BC,IAAsB,CAACC,MAAO;AAC5B,QAAAC,IAAe,uBAAA,OAAO,IAAI;AAChC,SAAO,CAACC,MACMD,EAAMC,CAAG,MACND,EAAMC,CAAG,IAAIF,EAAGE,CAAG;AAEtC,GACMC,IAAa,UACbC,IAAWL,EAAoB,CAACG,MAC7BA,EAAI,QAAQC,GAAY,CAACE,GAAGC,MAAOA,IAAIA,EAAE,YAAY,IAAI,EAAG,CACpE,GAEKC,IAAc,cACdC,IAAYT,EAAoB,CAACG,MAC9BA,EAAI,QAAQK,GAAa,KAAK,EAAE,YAAY,CACpD,GAEKE,IAAaV,EAAoB,CAACG,MAC/BA,EAAI,OAAO,CAAC,EAAE,gBAAgBA,EAAI,MAAM,CAAC,CACjD,GAEKQ,IAAiB,OAAO,UAAU,gBAClCC,IAAS,CAACrB,GAAKQ,MAAQY,EAAe,KAAKpB,GAAKQ,CAAG;AAGzD,SAASc,EAAiBC,GAASC,GAAOhB,GAAKiB,GAAO;AAC9C,QAAAC,IAAMH,EAAQf,CAAG;AACvB,MAAIkB,KAAO,MAAM;AACT,UAAAC,IAAaN,EAAOK,GAAK,SAAS;AAEpC,QAAAC,KAAcF,MAAU,QAAW;AACrC,YAAMG,IAAeF,EAAI;AACzB,MAAAD,IAAQC,EAAI,SAAS,YAAY3B,EAAW6B,CAAY,IAAIA,EAAiB,IAAAA;AAAA,IAC/E;AAEI,IAAAF,EAAI,SAAS,YACX,CAACL,EAAOG,GAAOhB,CAAG,KAAK,CAACmB,IAClBF,IAAA,KACCA,MAAU,OACXA,IAAA;AAAA,EAGd;AACO,SAAAA;AACT;AAEO,SAASI,EAAoBL,GAAO;AACzC,SAAO,OAAO,KAAKA,CAAK,EAAE,OAAO,CAACM,GAAMtB,QAClCA,EAAI,WAAW,OAAO,KAAKA,EAAI,WAAW,OAAO,OAC9CsB,EAAAtB,CAAG,IAAIgB,EAAMhB,CAAG,IAEhBsB,IACN,CAAE,CAAA;AACP;AAEO,SAASC,EAAK/B,GAAK;AACxB,SAAI,OAAOA,KAAQ,WAAiB,GAAGA,CAAG,OACnCA;AACT;AAEO,SAASgC,EAAsCC,GAAqCT,IAAW,CAAA,GAASU,GAAgB;AACzH,SAAA,OAAOD,KAAM,aACRA,EAAET,CAAK,IAETS,KAAKC;AACd;AACO,SAASC,EAAcC,GAAiD;AACzE,MAAAC;AAEJ,QAAMC,IAAe,IAAI,QAAiB,CAACC,MAAY;AACrD,IAAAF,IAAUD,EAAO,MAAM;AACrB,MAAAG,EAAQ,EAAI;AAAA,IAAA,CACb;AAAA,EAAA,CACF,GAEKC,IAAc,MAAM;AACd,IAAAH,KAAA,QAAAA;AAAA,EAAA;AAGZ,SAAAG,EAAO,OAAO,CAACC,GAAsBC,MAA2BJ,EAAa,KAAKG,GAAQC,CAAQ,GAClGF,EAAO,UAAUF,GAEVE;AACT;"}
1
+ {"version":3,"file":"util.js","sources":["../../../src/components/_util/util.ts"],"sourcesContent":["import type { VueNode } from './type'\r\nexport const isFunction = (val) => typeof val === 'function'\r\nexport const controlDefaultValue = Symbol('controlDefaultValue') as any\r\nexport const isArray = Array.isArray\r\nexport const isString = (val) => typeof val === 'string'\r\nexport const isSymbol = (val) => typeof val === 'symbol'\r\nexport const isObject = (val) => val !== null && typeof val === 'object'\r\nconst onRE = /^on[^a-z]/\r\nconst isOn = (key) => onRE.test(key)\r\n\r\nconst cacheStringFunction = (fn) => {\r\n const cache = Object.create(null)\r\n return (str) => {\r\n const hit = cache[str]\r\n return hit || (cache[str] = fn(str))\r\n }\r\n}\r\nconst camelizeRE = /-(\\w)/g\r\nconst camelize = cacheStringFunction((str) => {\r\n return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))\r\n})\r\n\r\nconst hyphenateRE = /\\B([A-Z])/g\r\nconst hyphenate = cacheStringFunction((str) => {\r\n return str.replace(hyphenateRE, '-$1').toLowerCase()\r\n})\r\n\r\nconst capitalize = cacheStringFunction((str) => {\r\n return str.charAt(0).toUpperCase() + str.slice(1)\r\n})\r\n\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key)\r\n\r\n// change from vue sourcecode\r\nfunction resolvePropValue(options, props, key, value) {\r\n const opt = options[key]\r\n if (opt != null) {\r\n const hasDefault = hasOwn(opt, 'default')\r\n // default values\r\n if (hasDefault && value === undefined) {\r\n const defaultValue = opt.default\r\n value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue\r\n }\r\n // boolean casting\r\n if (opt.type === Boolean) {\r\n if (!hasOwn(props, key) && !hasDefault) {\r\n value = false\r\n } else if (value === '') {\r\n value = true\r\n }\r\n }\r\n }\r\n return value\r\n}\r\n\r\nexport function getDataAndAriaProps(props) {\r\n return Object.keys(props).reduce((memo, key) => {\r\n if (key.startsWith('data-') || key.startsWith('aria-')) {\r\n memo[key] = props[key]\r\n }\r\n return memo\r\n }, {})\r\n}\r\n\r\nexport function toPx(val) {\r\n if (typeof val === 'number') return `${val}px`\r\n return val\r\n}\r\n\r\nexport function renderHelper<T = Record<string, any>>(v: VueNode | ((arg0: T) => VueNode), props: T = {} as T, defaultV?: any) {\r\n if (typeof v === 'function') {\r\n return v(props)\r\n }\r\n return v ?? defaultV\r\n}\r\nexport function wrapPromiseFn(openFn: (resolve: VoidFunction) => VoidFunction) {\r\n let closeFn: VoidFunction\r\n\r\n const closePromise = new Promise<boolean>((resolve) => {\r\n closeFn = openFn(() => {\r\n resolve(true)\r\n })\r\n })\r\n\r\n const result: any = () => {\r\n closeFn?.()\r\n }\r\n\r\n result.then = (filled: VoidFunction, rejected: VoidFunction) => closePromise.then(filled, rejected)\r\n result.promise = closePromise\r\n\r\n return result\r\n}\r\n\r\nexport { isOn, cacheStringFunction, camelize, hyphenate, capitalize, resolvePropValue }\r\n"],"names":[],"mappings":"AACO,MAAM,aAAa,CAAC,QAAQ,OAAO,QAAQ;AACrC,MAAA,sBAAsB,OAAO,qBAAqB;AACxD,MAAM,UAAU,MAAM;AACtB,MAAM,WAAW,CAAC,QAAQ,OAAO,QAAQ;AACzC,MAAM,WAAW,CAAC,QAAQ,OAAO,QAAQ;AACzC,MAAM,WAAW,CAAC,QAAQ,QAAQ,QAAQ,OAAO,QAAQ;AAChE,MAAM,OAAO;AACb,MAAM,OAAO,CAAC,QAAQ,KAAK,KAAK,GAAG;AAE7B,MAAA,sBAAsB,CAAC,OAAO;AAC5B,QAAA,QAAe,uBAAA,OAAO,IAAI;AAChC,SAAO,CAAC,QAAQ;AACR,UAAA,MAAM,MAAM,GAAG;AACrB,WAAO,QAAQ,MAAM,GAAG,IAAI,GAAG,GAAG;AAAA,EAAA;AAEtC;AACA,MAAM,aAAa;AACb,MAAA,WAAW,oBAAoB,CAAC,QAAQ;AACrC,SAAA,IAAI,QAAQ,YAAY,CAAC,GAAG,MAAO,IAAI,EAAE,YAAY,IAAI,EAAG;AACrE,CAAC;AAED,MAAM,cAAc;AACd,MAAA,YAAY,oBAAoB,CAAC,QAAQ;AAC7C,SAAO,IAAI,QAAQ,aAAa,KAAK,EAAE,YAAY;AACrD,CAAC;AAEK,MAAA,aAAa,oBAAoB,CAAC,QAAQ;AACvC,SAAA,IAAI,OAAO,CAAC,EAAE,gBAAgB,IAAI,MAAM,CAAC;AAClD,CAAC;AAED,MAAM,iBAAiB,OAAO,UAAU;AACxC,MAAM,SAAS,CAAC,KAAK,QAAQ,eAAe,KAAK,KAAK,GAAG;AAGzD,SAAS,iBAAiB,SAAS,OAAO,KAAK,OAAO;AAC9C,QAAA,MAAM,QAAQ,GAAG;AACvB,MAAI,OAAO,MAAM;AACT,UAAA,aAAa,OAAO,KAAK,SAAS;AAEpC,QAAA,cAAc,UAAU,QAAW;AACrC,YAAM,eAAe,IAAI;AACzB,cAAQ,IAAI,SAAS,YAAY,WAAW,YAAY,IAAI,aAAiB,IAAA;AAAA,IAC/E;AAEI,QAAA,IAAI,SAAS,SAAS;AACxB,UAAI,CAAC,OAAO,OAAO,GAAG,KAAK,CAAC,YAAY;AAC9B,gBAAA;AAAA,MAAA,WACC,UAAU,IAAI;AACf,gBAAA;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACO,SAAA;AACT;AAEO,SAAS,oBAAoB,OAAO;AACzC,SAAO,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,MAAM,QAAQ;AAC9C,QAAI,IAAI,WAAW,OAAO,KAAK,IAAI,WAAW,OAAO,GAAG;AACjD,WAAA,GAAG,IAAI,MAAM,GAAG;AAAA,IACvB;AACO,WAAA;AAAA,EACT,GAAG,CAAE,CAAA;AACP;AAEO,SAAS,KAAK,KAAK;AACxB,MAAI,OAAO,QAAQ,SAAU,QAAO,GAAG,GAAG;AACnC,SAAA;AACT;AAEO,SAAS,aAAsC,GAAqC,QAAW,CAAA,GAAS,UAAgB;AACzH,MAAA,OAAO,MAAM,YAAY;AAC3B,WAAO,EAAE,KAAK;AAAA,EAChB;AACA,SAAO,KAAK;AACd;AACO,SAAS,cAAc,QAAiD;AACzE,MAAA;AAEJ,QAAM,eAAe,IAAI,QAAiB,CAAC,YAAY;AACrD,cAAU,OAAO,MAAM;AACrB,cAAQ,IAAI;AAAA,IAAA,CACb;AAAA,EAAA,CACF;AAED,QAAM,SAAc,MAAM;AACd;AAAA,EAAA;AAGZ,SAAO,OAAO,CAAC,QAAsB,aAA2B,aAAa,KAAK,QAAQ,QAAQ;AAClG,SAAO,UAAU;AAEV,SAAA;AACT;"}
@@ -1,21 +1,33 @@
1
- import { i as n } from "../../../index-C9tCD90X.js";
2
- const i = [];
3
- let t = n ? document.body : void 0;
4
- function r(e) {
5
- const o = document.createElement("div");
6
- return e !== void 0 && o.setAttribute("id", e), t && (t.appendChild(o), i.push(o)), o;
1
+ import { i as isClient } from "../../../index-D1m0KTpK.js";
2
+ const globalNodes = [];
3
+ let target = !isClient ? void 0 : document.body;
4
+ function createGlobalNode(id) {
5
+ const el = document.createElement("div");
6
+ if (id !== void 0) {
7
+ el.setAttribute("id", id);
8
+ }
9
+ if (target) {
10
+ target.appendChild(el);
11
+ globalNodes.push(el);
12
+ }
13
+ return el;
7
14
  }
8
- function a(e) {
9
- i.splice(i.indexOf(e), 1), e.remove();
15
+ function removeGlobalNode(el) {
16
+ globalNodes.splice(globalNodes.indexOf(el), 1);
17
+ el.remove();
10
18
  }
11
- function c(e) {
12
- e !== t && (t = e, i.forEach((o) => {
13
- t && !o.contains(t) && t.appendChild(o);
14
- }));
19
+ function changeGlobalNodesTarget(el) {
20
+ if (el === target) return;
21
+ target = el;
22
+ globalNodes.forEach((el2) => {
23
+ if (target && !el2.contains(target)) {
24
+ target.appendChild(el2);
25
+ }
26
+ });
15
27
  }
16
28
  export {
17
- c as changeGlobalNodesTarget,
18
- r as createGlobalNode,
19
- a as removeGlobalNode
29
+ changeGlobalNodesTarget,
30
+ createGlobalNode,
31
+ removeGlobalNode
20
32
  };
21
33
  //# sourceMappingURL=global-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-node.js","sources":["../../../../src/components/_util/vue/global-node.ts"],"sourcesContent":["import { isClient } from '../browser'\r\n\r\nconst globalNodes: HTMLElement[] = []\r\nlet target: HTMLElement | undefined = !isClient ? undefined : document.body\r\n\r\nexport function createGlobalNode(id?: string) {\r\n const el = document.createElement('div')\r\n if (id !== undefined) {\r\n el.setAttribute('id', id)\r\n }\r\n\r\n if (target) {\r\n target.appendChild(el)\r\n globalNodes.push(el)\r\n }\r\n\r\n return el\r\n}\r\n\r\nexport function removeGlobalNode(el: HTMLElement) {\r\n globalNodes.splice(globalNodes.indexOf(el), 1)\r\n el.remove()\r\n}\r\n\r\nexport function changeGlobalNodesTarget(el: HTMLElement) {\r\n if (el === target) return\r\n\r\n target = el\r\n globalNodes.forEach((el) => {\r\n if (target && !el.contains(target)) {\r\n target.appendChild(el)\r\n }\r\n })\r\n}\r\n"],"names":["globalNodes","target","isClient","createGlobalNode","id","el","removeGlobalNode","changeGlobalNodesTarget"],"mappings":";AAEA,MAAMA,IAA6B,CAAA;AACnC,IAAIC,IAAmCC,IAAuB,SAAS,OAArB;AAE3C,SAASC,EAAiBC,GAAa;AACtC,QAAAC,IAAK,SAAS,cAAc,KAAK;AACvC,SAAID,MAAO,UACNC,EAAA,aAAa,MAAMD,CAAE,GAGtBH,MACFA,EAAO,YAAYI,CAAE,GACrBL,EAAY,KAAKK,CAAE,IAGdA;AACT;AAEO,SAASC,EAAiBD,GAAiB;AAChD,EAAAL,EAAY,OAAOA,EAAY,QAAQK,CAAE,GAAG,CAAC,GAC7CA,EAAG,OAAO;AACZ;AAEO,SAASE,EAAwBF,GAAiB;AACvD,EAAIA,MAAOJ,MAEFA,IAAAI,GACGL,EAAA,QAAQ,CAACK,MAAO;AAC1B,IAAIJ,KAAU,CAACI,EAAG,SAASJ,CAAM,KAC/BA,EAAO,YAAYI,CAAE;AAAA,EACvB,CACD;AACH;"}
1
+ {"version":3,"file":"global-node.js","sources":["../../../../src/components/_util/vue/global-node.ts"],"sourcesContent":["import { isClient } from '../browser'\r\n\r\nconst globalNodes: HTMLElement[] = []\r\nlet target: HTMLElement | undefined = !isClient ? undefined : document.body\r\n\r\nexport function createGlobalNode(id?: string) {\r\n const el = document.createElement('div')\r\n if (id !== undefined) {\r\n el.setAttribute('id', id)\r\n }\r\n\r\n if (target) {\r\n target.appendChild(el)\r\n globalNodes.push(el)\r\n }\r\n\r\n return el\r\n}\r\n\r\nexport function removeGlobalNode(el: HTMLElement) {\r\n globalNodes.splice(globalNodes.indexOf(el), 1)\r\n el.remove()\r\n}\r\n\r\nexport function changeGlobalNodesTarget(el: HTMLElement) {\r\n if (el === target) return\r\n\r\n target = el\r\n globalNodes.forEach((el) => {\r\n if (target && !el.contains(target)) {\r\n target.appendChild(el)\r\n }\r\n })\r\n}\r\n"],"names":["el"],"mappings":";AAEA,MAAM,cAA6B,CAAA;AACnC,IAAI,SAAkC,CAAC,WAAW,SAAY,SAAS;AAEhE,SAAS,iBAAiB,IAAa;AACtC,QAAA,KAAK,SAAS,cAAc,KAAK;AACvC,MAAI,OAAO,QAAW;AACjB,OAAA,aAAa,MAAM,EAAE;AAAA,EAC1B;AAEA,MAAI,QAAQ;AACV,WAAO,YAAY,EAAE;AACrB,gBAAY,KAAK,EAAE;AAAA,EACrB;AAEO,SAAA;AACT;AAEO,SAAS,iBAAiB,IAAiB;AAChD,cAAY,OAAO,YAAY,QAAQ,EAAE,GAAG,CAAC;AAC7C,KAAG,OAAO;AACZ;AAEO,SAAS,wBAAwB,IAAiB;AACvD,MAAI,OAAO,OAAQ;AAEV,WAAA;AACG,cAAA,QAAQ,CAACA,QAAO;AAC1B,QAAI,UAAU,CAACA,IAAG,SAAS,MAAM,GAAG;AAClC,aAAO,YAAYA,GAAE;AAAA,IACvB;AAAA,EAAA,CACD;AACH;"}
@@ -1,32 +1,36 @@
1
- import { c as e, s as l, i as s, w as o, a as c, l as n, b as i, d as a } from "../../../index-C6P_0wAy.js";
2
- import { definePropType as t } from "./props/runtime.js";
3
- const f = t([
1
+ import { c as close_default, s as success_filled_default, i as info_filled_default, w as warning_filled_default, a as circle_close_filled_default, l as loading_default, b as circle_check_default, d as circle_close_default } from "../../../index-DkwIULcN.js";
2
+ import { definePropType } from "./props/runtime.js";
3
+ const iconPropType = definePropType([
4
4
  String,
5
5
  Object,
6
6
  Function
7
- ]), p = {
8
- Close: e
9
- }, _ = {
10
- Close: e,
11
- SuccessFilled: l,
12
- InfoFilled: s,
13
- WarningFilled: o,
14
- CircleCloseFilled: c
15
- }, u = {
16
- success: l,
17
- warning: o,
18
- error: c,
19
- info: s
20
- }, C = {
21
- validating: n,
22
- success: i,
23
- error: a
7
+ ]);
8
+ const CloseComponents = {
9
+ Close: close_default
10
+ };
11
+ const TypeComponents = {
12
+ Close: close_default,
13
+ SuccessFilled: success_filled_default,
14
+ InfoFilled: info_filled_default,
15
+ WarningFilled: warning_filled_default,
16
+ CircleCloseFilled: circle_close_filled_default
17
+ };
18
+ const TypeComponentsMap = {
19
+ success: success_filled_default,
20
+ warning: warning_filled_default,
21
+ error: circle_close_filled_default,
22
+ info: info_filled_default
23
+ };
24
+ const ValidateComponentsMap = {
25
+ validating: loading_default,
26
+ success: circle_check_default,
27
+ error: circle_close_default
24
28
  };
25
29
  export {
26
- p as CloseComponents,
27
- _ as TypeComponents,
28
- u as TypeComponentsMap,
29
- C as ValidateComponentsMap,
30
- f as iconPropType
30
+ CloseComponents,
31
+ TypeComponents,
32
+ TypeComponentsMap,
33
+ ValidateComponentsMap,
34
+ iconPropType
31
35
  };
32
36
  //# sourceMappingURL=icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../../../src/components/_util/vue/icon.ts"],"sourcesContent":["import {\r\n CircleCheck,\r\n CircleClose,\r\n CircleCloseFilled,\r\n Close,\r\n InfoFilled,\r\n Loading,\r\n SuccessFilled,\r\n WarningFilled,\r\n} from '@element-plus/icons-vue'\r\nimport { definePropType } from './props'\r\n\r\nimport type { Component } from 'vue'\r\n\r\nexport const iconPropType = definePropType<string | Component>([\r\n String,\r\n Object,\r\n Function,\r\n])\r\n\r\nexport const CloseComponents = {\r\n Close,\r\n}\r\n\r\nexport const TypeComponents = {\r\n Close,\r\n SuccessFilled,\r\n InfoFilled,\r\n WarningFilled,\r\n CircleCloseFilled,\r\n}\r\n\r\nexport const TypeComponentsMap = {\r\n success: SuccessFilled,\r\n warning: WarningFilled,\r\n error: CircleCloseFilled,\r\n info: InfoFilled,\r\n}\r\n\r\nexport const ValidateComponentsMap = {\r\n validating: Loading,\r\n success: CircleCheck,\r\n error: CircleClose,\r\n}\r\n"],"names":["iconPropType","definePropType","CloseComponents","Close","TypeComponents","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","TypeComponentsMap","ValidateComponentsMap","Loading","CircleCheck","CircleClose"],"mappings":";;AAcO,MAAMA,IAAeC,EAAmC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEYC,IAAkB;AAAA,EAAA,OAC7BC;AACF,GAEaC,IAAiB;AAAA,EAAA,OAC5BD;AAAAA,EAAA,eACAE;AAAAA,EAAA,YACAC;AAAAA,EAAA,eACAC;AAAAA,EAAA,mBACAC;AACF,GAEaC,IAAoB;AAAA,EAC/B,SAASJ;AAAAA,EACT,SAASE;AAAAA,EACT,OAAOC;AAAAA,EACP,MAAMF;AACR,GAEaI,IAAwB;AAAA,EACnC,YAAYC;AAAAA,EACZ,SAASC;AAAAA,EACT,OAAOC;AACT;"}
1
+ {"version":3,"file":"icon.js","sources":["../../../../src/components/_util/vue/icon.ts"],"sourcesContent":["import {\r\n CircleCheck,\r\n CircleClose,\r\n CircleCloseFilled,\r\n Close,\r\n InfoFilled,\r\n Loading,\r\n SuccessFilled,\r\n WarningFilled,\r\n} from '@element-plus/icons-vue'\r\nimport { definePropType } from './props'\r\n\r\nimport type { Component } from 'vue'\r\n\r\nexport const iconPropType = definePropType<string | Component>([\r\n String,\r\n Object,\r\n Function,\r\n])\r\n\r\nexport const CloseComponents = {\r\n Close,\r\n}\r\n\r\nexport const TypeComponents = {\r\n Close,\r\n SuccessFilled,\r\n InfoFilled,\r\n WarningFilled,\r\n CircleCloseFilled,\r\n}\r\n\r\nexport const TypeComponentsMap = {\r\n success: SuccessFilled,\r\n warning: WarningFilled,\r\n error: CircleCloseFilled,\r\n info: InfoFilled,\r\n}\r\n\r\nexport const ValidateComponentsMap = {\r\n validating: Loading,\r\n success: CircleCheck,\r\n error: CircleClose,\r\n}\r\n"],"names":["Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;AAcO,MAAM,eAAe,eAAmC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,kBAAkB;AAAA,EAAA,OAC7BA;AACF;AAEO,MAAM,iBAAiB;AAAA,EAAA,OAC5BA;AAAAA,EAAA,eACAC;AAAAA,EAAA,YACAC;AAAAA,EAAA,eACAC;AAAAA,EAAA,mBACAC;AACF;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAASH;AAAAA,EACT,SAASE;AAAAA,EACT,OAAOC;AAAAA,EACP,MAAMF;AACR;AAEO,MAAM,wBAAwB;AAAA,EACnC,YAAYG;AAAAA,EACZ,SAASC;AAAAA,EACT,OAAOC;AACT;"}
@@ -1,44 +1,44 @@
1
- import { changeGlobalNodesTarget as t, createGlobalNode as r, removeGlobalNode as p } from "./global-node.js";
2
- import { CloseComponents as l, TypeComponents as n, TypeComponentsMap as a, ValidateComponentsMap as s, iconPropType as m } from "./icon.js";
3
- import { withInstall as f, withInstallDirective as C, withInstallFunction as c, withNoopInstall as x } from "./install.js";
4
- import { buildProp as h, buildProps as T, definePropType as g, epPropKey as y, isEpProp as N } from "./props/runtime.js";
5
- import { composeRefs as I } from "./refs.js";
6
- import { getComponentSize as u } from "./size.js";
7
- import { isValidComponentSize as F, isValidDatePickType as z } from "./validator.js";
8
- import { PatchFlags as k, ensureOnlyChild as v, flattedChildren as D, getFirstValidNode as E, getNormalizedProps as M, isComment as S, isFragment as B, isTemplate as K, isText as O, isValidElementNode as R, renderBlock as j, renderIf as q } from "./vnode.js";
1
+ import { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from "./global-node.js";
2
+ import { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from "./icon.js";
3
+ import { withInstall, withInstallDirective, withInstallFunction, withNoopInstall } from "./install.js";
4
+ import { buildProp, buildProps, definePropType, epPropKey, isEpProp } from "./props/runtime.js";
5
+ import { composeRefs } from "./refs.js";
6
+ import { getComponentSize } from "./size.js";
7
+ import { isValidComponentSize, isValidDatePickType } from "./validator.js";
8
+ import { PatchFlags, ensureOnlyChild, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from "./vnode.js";
9
9
  export {
10
- l as CloseComponents,
11
- k as PatchFlags,
12
- n as TypeComponents,
13
- a as TypeComponentsMap,
14
- s as ValidateComponentsMap,
15
- h as buildProp,
16
- T as buildProps,
17
- t as changeGlobalNodesTarget,
18
- I as composeRefs,
19
- r as createGlobalNode,
20
- g as definePropType,
21
- v as ensureOnlyChild,
22
- y as epPropKey,
23
- D as flattedChildren,
24
- u as getComponentSize,
25
- E as getFirstValidNode,
26
- M as getNormalizedProps,
27
- m as iconPropType,
28
- S as isComment,
29
- N as isEpProp,
30
- B as isFragment,
31
- K as isTemplate,
32
- O as isText,
33
- F as isValidComponentSize,
34
- z as isValidDatePickType,
35
- R as isValidElementNode,
36
- p as removeGlobalNode,
37
- j as renderBlock,
38
- q as renderIf,
39
- f as withInstall,
40
- C as withInstallDirective,
41
- c as withInstallFunction,
42
- x as withNoopInstall
10
+ CloseComponents,
11
+ PatchFlags,
12
+ TypeComponents,
13
+ TypeComponentsMap,
14
+ ValidateComponentsMap,
15
+ buildProp,
16
+ buildProps,
17
+ changeGlobalNodesTarget,
18
+ composeRefs,
19
+ createGlobalNode,
20
+ definePropType,
21
+ ensureOnlyChild,
22
+ epPropKey,
23
+ flattedChildren,
24
+ getComponentSize,
25
+ getFirstValidNode,
26
+ getNormalizedProps,
27
+ iconPropType,
28
+ isComment,
29
+ isEpProp,
30
+ isFragment,
31
+ isTemplate,
32
+ isText,
33
+ isValidComponentSize,
34
+ isValidDatePickType,
35
+ isValidElementNode,
36
+ removeGlobalNode,
37
+ renderBlock,
38
+ renderIf,
39
+ withInstall,
40
+ withInstallDirective,
41
+ withInstallFunction,
42
+ withNoopInstall
43
43
  };
44
44
  //# sourceMappingURL=index.js.map
@@ -1,21 +1,38 @@
1
- import { N as s } from "../../../functions-DzLqXvGt.js";
2
- const e = (t, l) => {
3
- if (t.install = (o) => {
4
- for (const n of [t, ...Object.values(l ?? {})])
5
- o.component(n.name, n);
6
- }, l)
7
- for (const [o, n] of Object.entries(l))
8
- t[o] = n;
9
- return t;
10
- }, r = (t, l) => (t.install = (o) => {
11
- t._context = o._context, o.config.globalProperties[l] = t;
12
- }, t), i = (t, l) => (t.install = (o) => {
13
- o.directive(l, t);
14
- }, t), a = (t) => (t.install = s, t);
1
+ import { N as NOOP } from "../../../functions-BeMkokbY.js";
2
+ const withInstall = (main, extra) => {
3
+ main.install = (app) => {
4
+ for (const comp of [main, ...Object.values(extra ?? {})]) {
5
+ app.component(comp.name, comp);
6
+ }
7
+ };
8
+ if (extra) {
9
+ for (const [key, comp] of Object.entries(extra)) {
10
+ main[key] = comp;
11
+ }
12
+ }
13
+ return main;
14
+ };
15
+ const withInstallFunction = (fn, name) => {
16
+ fn.install = (app) => {
17
+ fn._context = app._context;
18
+ app.config.globalProperties[name] = fn;
19
+ };
20
+ return fn;
21
+ };
22
+ const withInstallDirective = (directive, name) => {
23
+ directive.install = (app) => {
24
+ app.directive(name, directive);
25
+ };
26
+ return directive;
27
+ };
28
+ const withNoopInstall = (component) => {
29
+ component.install = NOOP;
30
+ return component;
31
+ };
15
32
  export {
16
- e as withInstall,
17
- i as withInstallDirective,
18
- r as withInstallFunction,
19
- a as withNoopInstall
33
+ withInstall,
34
+ withInstallDirective,
35
+ withInstallFunction,
36
+ withNoopInstall
20
37
  };
21
38
  //# sourceMappingURL=install.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sources":["../../../../src/components/_util/vue/install.ts"],"sourcesContent":["import { NOOP } from '../functions'\r\n\r\nimport type { App, Directive } from 'vue'\r\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\r\n\r\nexport const withInstall = <T, E extends Record<string, any>>(\r\n main: T,\r\n extra?: E\r\n) => {\r\n ;(main as SFCWithInstall<T>).install = (app): void => {\r\n for (const comp of [main, ...Object.values(extra ?? {})]) {\r\n app.component(comp.name, comp)\r\n }\r\n }\r\n\r\n if (extra) {\r\n for (const [key, comp] of Object.entries(extra)) {\r\n ;(main as any)[key] = comp\r\n }\r\n }\r\n return main as SFCWithInstall<T> & E\r\n}\r\n\r\nexport const withInstallFunction = <T>(fn: T, name: string) => {\r\n ;(fn as SFCWithInstall<T>).install = (app: App) => {\r\n ;(fn as SFCInstallWithContext<T>)._context = app._context\r\n app.config.globalProperties[name] = fn\r\n }\r\n\r\n return fn as SFCInstallWithContext<T>\r\n}\r\n\r\nexport const withInstallDirective = <T extends Directive>(\r\n directive: T,\r\n name: string\r\n) => {\r\n ;(directive as SFCWithInstall<T>).install = (app: App): void => {\r\n app.directive(name, directive)\r\n }\r\n\r\n return directive as SFCWithInstall<T>\r\n}\r\n\r\nexport const withNoopInstall = <T>(component: T) => {\r\n ;(component as SFCWithInstall<T>).install = NOOP\r\n\r\n return component as SFCWithInstall<T>\r\n}\r\n"],"names":["withInstall","main","extra","app","comp","key","withInstallFunction","fn","name","withInstallDirective","directive","withNoopInstall","component","NOOP"],"mappings":";AAKa,MAAAA,IAAc,CACzBC,GACAC,MACG;AAOH,MANED,EAA2B,UAAU,CAACE,MAAc;AACzC,eAAAC,KAAQ,CAACH,GAAM,GAAG,OAAO,OAAOC,KAAS,CAAE,CAAA,CAAC;AACjD,MAAAC,EAAA,UAAUC,EAAK,MAAMA,CAAI;AAAA,EAC/B,GAGEF;AACF,eAAW,CAACG,GAAKD,CAAI,KAAK,OAAO,QAAQF,CAAK;AAC1C,MAAAD,EAAaI,CAAG,IAAID;AAGnB,SAAAH;AACT,GAEaK,IAAsB,CAAIC,GAAOC,OAC1CD,EAAyB,UAAU,CAACJ,MAAa;AAC/C,EAAAI,EAAgC,WAAWJ,EAAI,UAC7CA,EAAA,OAAO,iBAAiBK,CAAI,IAAID;AAAA,GAG/BA,IAGIE,IAAuB,CAClCC,GACAF,OAEEE,EAAgC,UAAU,CAACP,MAAmB;AAC1D,EAAAA,EAAA,UAAUK,GAAME,CAAS;AAAA,GAGxBA,IAGIC,IAAkB,CAAIC,OAC/BA,EAAgC,UAAUC,GAErCD;"}
1
+ {"version":3,"file":"install.js","sources":["../../../../src/components/_util/vue/install.ts"],"sourcesContent":["import { NOOP } from '../functions'\r\n\r\nimport type { App, Directive } from 'vue'\r\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\r\n\r\nexport const withInstall = <T, E extends Record<string, any>>(\r\n main: T,\r\n extra?: E\r\n) => {\r\n ;(main as SFCWithInstall<T>).install = (app): void => {\r\n for (const comp of [main, ...Object.values(extra ?? {})]) {\r\n app.component(comp.name, comp)\r\n }\r\n }\r\n\r\n if (extra) {\r\n for (const [key, comp] of Object.entries(extra)) {\r\n ;(main as any)[key] = comp\r\n }\r\n }\r\n return main as SFCWithInstall<T> & E\r\n}\r\n\r\nexport const withInstallFunction = <T>(fn: T, name: string) => {\r\n ;(fn as SFCWithInstall<T>).install = (app: App) => {\r\n ;(fn as SFCInstallWithContext<T>)._context = app._context\r\n app.config.globalProperties[name] = fn\r\n }\r\n\r\n return fn as SFCInstallWithContext<T>\r\n}\r\n\r\nexport const withInstallDirective = <T extends Directive>(\r\n directive: T,\r\n name: string\r\n) => {\r\n ;(directive as SFCWithInstall<T>).install = (app: App): void => {\r\n app.directive(name, directive)\r\n }\r\n\r\n return directive as SFCWithInstall<T>\r\n}\r\n\r\nexport const withNoopInstall = <T>(component: T) => {\r\n ;(component as SFCWithInstall<T>).install = NOOP\r\n\r\n return component as SFCWithInstall<T>\r\n}\r\n"],"names":[],"mappings":";AAKa,MAAA,cAAc,CACzB,MACA,UACG;AACD,OAA2B,UAAU,CAAC,QAAc;AACzC,eAAA,QAAQ,CAAC,MAAM,GAAG,OAAO,OAAO,SAAS,CAAE,CAAA,CAAC,GAAG;AACpD,UAAA,UAAU,KAAK,MAAM,IAAI;AAAA,IAC/B;AAAA,EAAA;AAGF,MAAI,OAAO;AACT,eAAW,CAAC,KAAK,IAAI,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC7C,WAAa,GAAG,IAAI;AAAA,IACxB;AAAA,EACF;AACO,SAAA;AACT;AAEa,MAAA,sBAAsB,CAAI,IAAO,SAAiB;AAC3D,KAAyB,UAAU,CAAC,QAAa;AAC/C,OAAgC,WAAW,IAAI;AAC7C,QAAA,OAAO,iBAAiB,IAAI,IAAI;AAAA,EAAA;AAG/B,SAAA;AACT;AAEa,MAAA,uBAAuB,CAClC,WACA,SACG;AACD,YAAgC,UAAU,CAAC,QAAmB;AAC1D,QAAA,UAAU,MAAM,SAAS;AAAA,EAAA;AAGxB,SAAA;AACT;AAEa,MAAA,kBAAkB,CAAI,cAAiB;AAChD,YAAgC,UAAU;AAErC,SAAA;AACT;"}
@@ -1,9 +1,9 @@
1
- import { buildProp as r, buildProps as e, definePropType as P, epPropKey as i, isEpProp as d } from "./runtime.js";
1
+ import { buildProp, buildProps, definePropType, epPropKey, isEpProp } from "./runtime.js";
2
2
  export {
3
- r as buildProp,
4
- e as buildProps,
5
- P as definePropType,
6
- i as epPropKey,
7
- d as isEpProp
3
+ buildProp,
4
+ buildProps,
5
+ definePropType,
6
+ epPropKey,
7
+ isEpProp
8
8
  };
9
9
  //# sourceMappingURL=index.js.map
@@ -1,37 +1,53 @@
1
- import { warn as v } from "vue";
2
- import { fromPairs as w } from "lodash-es";
3
- import { d as f, h as d } from "../../../../functions-DzLqXvGt.js";
4
- const u = "__epPropKey", $ = (e) => e, y = (e) => f(e) && !!e[u], O = (e, t) => {
5
- if (!f(e) || y(e)) return e;
6
- const { values: r, required: p, default: n, type: c, validator: a } = e, s = {
7
- type: c,
8
- required: !!p,
9
- validator: r || a ? (l) => {
10
- let i = !1, o = [];
11
- if (r && (o = Array.from(r), d(e, "default") && o.push(n), i || (i = o.includes(l))), a && (i || (i = a(l))), !i && o.length > 0) {
12
- const m = [...new Set(o)].map((P) => JSON.stringify(P)).join(", ");
13
- v(
14
- `Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${m}], got value ${JSON.stringify(
15
- l
16
- )}.`
17
- );
1
+ import { warn } from "vue";
2
+ import { fromPairs } from "lodash-es";
3
+ import { d as isObject, h as hasOwn } from "../../../../functions-BeMkokbY.js";
4
+ const epPropKey = "__epPropKey";
5
+ const definePropType = (val) => val;
6
+ const isEpProp = (val) => isObject(val) && !!val[epPropKey];
7
+ const buildProp = (prop, key) => {
8
+ if (!isObject(prop) || isEpProp(prop)) return prop;
9
+ const { values, required, default: defaultValue, type, validator } = prop;
10
+ const _validator = values || validator ? (val) => {
11
+ let valid = false;
12
+ let allowedValues = [];
13
+ if (values) {
14
+ allowedValues = Array.from(values);
15
+ if (hasOwn(prop, "default")) {
16
+ allowedValues.push(defaultValue);
18
17
  }
19
- return i;
20
- } : void 0,
21
- [u]: !0
18
+ valid || (valid = allowedValues.includes(val));
19
+ }
20
+ if (validator) valid || (valid = validator(val));
21
+ if (!valid && allowedValues.length > 0) {
22
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
23
+ warn(
24
+ `Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
25
+ val
26
+ )}.`
27
+ );
28
+ }
29
+ return valid;
30
+ } : void 0;
31
+ const epProp = {
32
+ type,
33
+ required: !!required,
34
+ validator: _validator,
35
+ [epPropKey]: true
22
36
  };
23
- return d(e, "default") && (s.default = n), s;
24
- }, j = (e) => w(
25
- Object.entries(e).map(([t, r]) => [
26
- t,
27
- O(r, t)
37
+ if (hasOwn(prop, "default")) epProp.default = defaultValue;
38
+ return epProp;
39
+ };
40
+ const buildProps = (props) => fromPairs(
41
+ Object.entries(props).map(([key, option]) => [
42
+ key,
43
+ buildProp(option, key)
28
44
  ])
29
45
  );
30
46
  export {
31
- O as buildProp,
32
- j as buildProps,
33
- $ as definePropType,
34
- u as epPropKey,
35
- y as isEpProp
47
+ buildProp,
48
+ buildProps,
49
+ definePropType,
50
+ epPropKey,
51
+ isEpProp
36
52
  };
37
53
  //# sourceMappingURL=runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sources":["../../../../../src/components/_util/vue/props/runtime.ts"],"sourcesContent":["import { warn } from 'vue'\r\nimport { fromPairs } from 'lodash-unified'\r\nimport { isObject } from '../../types'\r\nimport { hasOwn } from '../../objects'\r\n\r\nimport type { PropType } from 'vue'\r\nimport type {\r\n EpProp,\r\n EpPropConvert,\r\n EpPropFinalized,\r\n EpPropInput,\r\n EpPropMergeType,\r\n IfEpProp,\r\n IfNativePropType,\r\n NativePropType,\r\n} from './types'\r\n\r\nexport const epPropKey = '__epPropKey'\r\n\r\nexport const definePropType = <T>(val: any): PropType<T> => val\r\n\r\nexport const isEpProp = (val: unknown): val is EpProp<any, any, any> =>\r\n isObject(val) && !!(val as any)[epPropKey]\r\n\r\n/**\r\n * @description Build prop. It can better optimize prop types\r\n * @description 生成 prop,能更好地优化类型\r\n * @example\r\n // limited options\r\n // the type will be PropType<'light' | 'dark'>\r\n buildProp({\r\n type: String,\r\n values: ['light', 'dark'],\r\n } as const)\r\n * @example\r\n // limited options and other types\r\n // the type will be PropType<'small' | 'large' | number>\r\n buildProp({\r\n type: [String, Number],\r\n values: ['small', 'large'],\r\n validator: (val: unknown): val is number => typeof val === 'number',\r\n } as const)\r\n @link see more: https://github.com/element-plus/element-plus/pull/3341\r\n */\r\nexport const buildProp = <\r\n Type = never,\r\n Value = never,\r\n Validator = never,\r\n Default extends EpPropMergeType<Type, Value, Validator> = never,\r\n Required extends boolean = false\r\n>(\r\n prop: EpPropInput<Type, Value, Validator, Default, Required>,\r\n key?: string\r\n): EpPropFinalized<Type, Value, Validator, Default, Required> => {\r\n // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)\r\n if (!isObject(prop) || isEpProp(prop)) return prop as any\r\n\r\n const { values, required, default: defaultValue, type, validator } = prop\r\n\r\n const _validator =\r\n values || validator\r\n ? (val: unknown) => {\r\n let valid = false\r\n let allowedValues: unknown[] = []\r\n\r\n if (values) {\r\n allowedValues = Array.from(values)\r\n if (hasOwn(prop, 'default')) {\r\n allowedValues.push(defaultValue)\r\n }\r\n valid ||= allowedValues.includes(val)\r\n }\r\n if (validator) valid ||= validator(val)\r\n\r\n if (!valid && allowedValues.length > 0) {\r\n const allowValuesText = [...new Set(allowedValues)]\r\n .map((value) => JSON.stringify(value))\r\n .join(', ')\r\n warn(\r\n `Invalid prop: validation failed${\r\n key ? ` for prop \"${key}\"` : ''\r\n }. Expected one of [${allowValuesText}], got value ${JSON.stringify(\r\n val\r\n )}.`\r\n )\r\n }\r\n return valid\r\n }\r\n : undefined\r\n\r\n const epProp: any = {\r\n type,\r\n required: !!required,\r\n validator: _validator,\r\n [epPropKey]: true,\r\n }\r\n if (hasOwn(prop, 'default')) epProp.default = defaultValue\r\n return epProp\r\n}\r\n\r\nexport const buildProps = <\r\n Props extends Record<\r\n string,\r\n | { [epPropKey]: true }\r\n | NativePropType\r\n | EpPropInput<any, any, any, any, any>\r\n >\r\n>(\r\n props: Props\r\n): {\r\n [K in keyof Props]: IfEpProp<\r\n Props[K],\r\n Props[K],\r\n IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>\r\n >\r\n} =>\r\n fromPairs(\r\n Object.entries(props).map(([key, option]) => [\r\n key,\r\n buildProp(option as any, key),\r\n ])\r\n ) as any\r\n"],"names":["epPropKey","definePropType","val","isEpProp","isObject","buildProp","prop","key","values","required","defaultValue","type","validator","epProp","valid","allowedValues","hasOwn","allowValuesText","value","warn","buildProps","props","fromPairs","option"],"mappings":";;;AAiBO,MAAMA,IAAY,eAEZC,IAAiB,CAAIC,MAA0BA,GAE/CC,IAAW,CAACD,MACvBE,EAASF,CAAG,KAAK,CAAC,CAAEA,EAAYF,CAAS,GAsB9BK,IAAY,CAOvBC,GACAC,MAC+D;AAE/D,MAAI,CAACH,EAASE,CAAI,KAAKH,EAASG,CAAI,EAAU,QAAAA;AAE9C,QAAM,EAAE,QAAAE,GAAQ,UAAAC,GAAU,SAASC,GAAc,MAAAC,GAAM,WAAAC,EAAc,IAAAN,GAiC/DO,IAAc;AAAA,IAClB,MAAAF;AAAA,IACA,UAAU,CAAC,CAACF;AAAA,IACZ,WAjCAD,KAAUI,IACN,CAACV,MAAiB;AAChB,UAAIY,IAAQ,IACRC,IAA2B,CAAA;AAW/B,UATIP,MACcO,IAAA,MAAM,KAAKP,CAAM,GAC7BQ,EAAOV,GAAM,SAAS,KACxBS,EAAc,KAAKL,CAAY,GAEvBI,UAAAC,EAAc,SAASb,CAAG,KAElCU,MAAqBE,UAAAF,EAAUV,CAAG,KAElC,CAACY,KAASC,EAAc,SAAS,GAAG;AACtC,cAAME,IAAkB,CAAC,GAAG,IAAI,IAAIF,CAAa,CAAC,EAC/C,IAAI,CAACG,MAAU,KAAK,UAAUA,CAAK,CAAC,EACpC,KAAK,IAAI;AACZ,QAAAC;AAAA,UACE,kCACEZ,IAAM,cAAcA,CAAG,MAAM,EAC/B,sBAAsBU,CAAe,gBAAgB,KAAK;AAAA,YACxDf;AAAA,UACD,CAAA;AAAA,QAAA;AAAA,MAEL;AACO,aAAAY;AAAA,IAET,IAAA;AAAA,IAMJ,CAACd,CAAS,GAAG;AAAA,EAAA;AAEf,SAAIgB,EAAOV,GAAM,SAAS,QAAU,UAAUI,IACvCG;AACT,GAEaO,IAAa,CAQxBC,MAQAC;AAAA,EACE,OAAO,QAAQD,CAAK,EAAE,IAAI,CAAC,CAACd,GAAKgB,CAAM,MAAM;AAAA,IAC3ChB;AAAA,IACAF,EAAUkB,GAAehB,CAAG;AAAA,EAAA,CAC7B;AACH;"}
1
+ {"version":3,"file":"runtime.js","sources":["../../../../../src/components/_util/vue/props/runtime.ts"],"sourcesContent":["import { warn } from 'vue'\r\nimport { fromPairs } from 'lodash-unified'\r\nimport { isObject } from '../../types'\r\nimport { hasOwn } from '../../objects'\r\n\r\nimport type { PropType } from 'vue'\r\nimport type {\r\n EpProp,\r\n EpPropConvert,\r\n EpPropFinalized,\r\n EpPropInput,\r\n EpPropMergeType,\r\n IfEpProp,\r\n IfNativePropType,\r\n NativePropType,\r\n} from './types'\r\n\r\nexport const epPropKey = '__epPropKey'\r\n\r\nexport const definePropType = <T>(val: any): PropType<T> => val\r\n\r\nexport const isEpProp = (val: unknown): val is EpProp<any, any, any> =>\r\n isObject(val) && !!(val as any)[epPropKey]\r\n\r\n/**\r\n * @description Build prop. It can better optimize prop types\r\n * @description 生成 prop,能更好地优化类型\r\n * @example\r\n // limited options\r\n // the type will be PropType<'light' | 'dark'>\r\n buildProp({\r\n type: String,\r\n values: ['light', 'dark'],\r\n } as const)\r\n * @example\r\n // limited options and other types\r\n // the type will be PropType<'small' | 'large' | number>\r\n buildProp({\r\n type: [String, Number],\r\n values: ['small', 'large'],\r\n validator: (val: unknown): val is number => typeof val === 'number',\r\n } as const)\r\n @link see more: https://github.com/element-plus/element-plus/pull/3341\r\n */\r\nexport const buildProp = <\r\n Type = never,\r\n Value = never,\r\n Validator = never,\r\n Default extends EpPropMergeType<Type, Value, Validator> = never,\r\n Required extends boolean = false\r\n>(\r\n prop: EpPropInput<Type, Value, Validator, Default, Required>,\r\n key?: string\r\n): EpPropFinalized<Type, Value, Validator, Default, Required> => {\r\n // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)\r\n if (!isObject(prop) || isEpProp(prop)) return prop as any\r\n\r\n const { values, required, default: defaultValue, type, validator } = prop\r\n\r\n const _validator =\r\n values || validator\r\n ? (val: unknown) => {\r\n let valid = false\r\n let allowedValues: unknown[] = []\r\n\r\n if (values) {\r\n allowedValues = Array.from(values)\r\n if (hasOwn(prop, 'default')) {\r\n allowedValues.push(defaultValue)\r\n }\r\n valid ||= allowedValues.includes(val)\r\n }\r\n if (validator) valid ||= validator(val)\r\n\r\n if (!valid && allowedValues.length > 0) {\r\n const allowValuesText = [...new Set(allowedValues)]\r\n .map((value) => JSON.stringify(value))\r\n .join(', ')\r\n warn(\r\n `Invalid prop: validation failed${\r\n key ? ` for prop \"${key}\"` : ''\r\n }. Expected one of [${allowValuesText}], got value ${JSON.stringify(\r\n val\r\n )}.`\r\n )\r\n }\r\n return valid\r\n }\r\n : undefined\r\n\r\n const epProp: any = {\r\n type,\r\n required: !!required,\r\n validator: _validator,\r\n [epPropKey]: true,\r\n }\r\n if (hasOwn(prop, 'default')) epProp.default = defaultValue\r\n return epProp\r\n}\r\n\r\nexport const buildProps = <\r\n Props extends Record<\r\n string,\r\n | { [epPropKey]: true }\r\n | NativePropType\r\n | EpPropInput<any, any, any, any, any>\r\n >\r\n>(\r\n props: Props\r\n): {\r\n [K in keyof Props]: IfEpProp<\r\n Props[K],\r\n Props[K],\r\n IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>\r\n >\r\n} =>\r\n fromPairs(\r\n Object.entries(props).map(([key, option]) => [\r\n key,\r\n buildProp(option as any, key),\r\n ])\r\n ) as any\r\n"],"names":[],"mappings":";;;AAiBO,MAAM,YAAY;AAEZ,MAAA,iBAAiB,CAAI,QAA0B;AAE/C,MAAA,WAAW,CAAC,QACvB,SAAS,GAAG,KAAK,CAAC,CAAE,IAAY,SAAS;AAsB9B,MAAA,YAAY,CAOvB,MACA,QAC+D;AAE/D,MAAI,CAAC,SAAS,IAAI,KAAK,SAAS,IAAI,EAAU,QAAA;AAE9C,QAAM,EAAE,QAAQ,UAAU,SAAS,cAAc,MAAM,UAAc,IAAA;AAErE,QAAM,aACJ,UAAU,YACN,CAAC,QAAiB;AAChB,QAAI,QAAQ;AACZ,QAAI,gBAA2B,CAAA;AAE/B,QAAI,QAAQ;AACM,sBAAA,MAAM,KAAK,MAAM;AAC7B,UAAA,OAAO,MAAM,SAAS,GAAG;AAC3B,sBAAc,KAAK,YAAY;AAAA,MACjC;AACU,wBAAA,cAAc,SAAS,GAAG;AAAA,IACtC;AACI,QAAA,UAAqB,mBAAA,UAAU,GAAG;AAEtC,QAAI,CAAC,SAAS,cAAc,SAAS,GAAG;AACtC,YAAM,kBAAkB,CAAC,GAAG,IAAI,IAAI,aAAa,CAAC,EAC/C,IAAI,CAAC,UAAU,KAAK,UAAU,KAAK,CAAC,EACpC,KAAK,IAAI;AACZ;AAAA,QACE,kCACE,MAAM,cAAc,GAAG,MAAM,EAC/B,sBAAsB,eAAe,gBAAgB,KAAK;AAAA,UACxD;AAAA,QACD,CAAA;AAAA,MAAA;AAAA,IAEL;AACO,WAAA;AAAA,EAET,IAAA;AAEN,QAAM,SAAc;AAAA,IAClB;AAAA,IACA,UAAU,CAAC,CAAC;AAAA,IACZ,WAAW;AAAA,IACX,CAAC,SAAS,GAAG;AAAA,EAAA;AAEf,MAAI,OAAO,MAAM,SAAS,UAAU,UAAU;AACvC,SAAA;AACT;AAEa,MAAA,aAAa,CAQxB,UAQA;AAAA,EACE,OAAO,QAAQ,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,MAAM,MAAM;AAAA,IAC3C;AAAA,IACA,UAAU,QAAe,GAAG;AAAA,EAAA,CAC7B;AACH;"}
@@ -1,12 +1,18 @@
1
- import { b as r } from "../../../functions-DzLqXvGt.js";
1
+ import { b as isFunction } from "../../../functions-BeMkokbY.js";
2
2
  import "lodash-es";
3
3
  import "vue";
4
- const c = (...i) => (t) => {
5
- i.forEach((o) => {
6
- r(o) ? o(t) : o.value = t;
7
- });
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
+ };
8
14
  };
9
15
  export {
10
- c as composeRefs
16
+ composeRefs
11
17
  };
12
18
  //# 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":["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
+ {"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,6 +1,8 @@
1
- import { componentSizeMap as o } from "element-plus";
2
- const n = (e) => o[e || "default"];
1
+ import { componentSizeMap } from "element-plus";
2
+ const getComponentSize = (size) => {
3
+ return componentSizeMap[size || "default"];
4
+ };
3
5
  export {
4
- n as getComponentSize
6
+ getComponentSize
5
7
  };
6
8
  //# 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":["getComponentSize","size","componentSizeMap"],"mappings":";AAIa,MAAAA,IAAmB,CAACC,MACxBC,EAAiBD,KAAQ,SAAS;"}
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,7 +1,8 @@
1
- import { componentSizes as i, datePickTypes as o } from "element-plus";
2
- const s = (e) => ["", ...i].includes(e), t = (e) => [...o].includes(e);
1
+ import { componentSizes, datePickTypes } from "element-plus";
2
+ const isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
3
+ const isValidDatePickType = (val) => [...datePickTypes].includes(val);
3
4
  export {
4
- s as isValidComponentSize,
5
- t as isValidDatePickType
5
+ isValidComponentSize,
6
+ isValidDatePickType
6
7
  };
7
8
  //# 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":["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
+ {"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;"}