orion-design 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +14 -30
- package/dist/Throne/index.js.map +1 -1
- package/dist/components/Button/index.js +33 -40
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +89 -122
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +68 -127
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +656 -836
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +18 -30
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
- package/dist/components/LovTable/index.d.ts +246 -0
- package/dist/components/LovTable/index.js +106 -179
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +56 -111
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.d.ts +1 -1
- package/dist/components/Modal/types.js +3 -4
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +92 -1
- package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
- package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
- package/dist/components/Pagetable/hooks/useColumns.js +85 -88
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.d.ts +155 -0
- package/dist/components/Pagetable/index.js +596 -683
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +54 -92
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +74 -82
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +469 -579
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +54 -92
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +74 -100
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +358 -603
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +4 -6
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +39 -74
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +19 -29
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +5 -9
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +17 -22
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +39 -74
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +8 -9
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +7 -14
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +25 -49
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +61 -103
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +50 -65
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +4 -8
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +11 -12
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +2 -4
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +14 -18
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +20 -46
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +10 -18
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +4 -5
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +3 -4
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +8 -9
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +10 -16
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +38 -41
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +22 -41
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +43 -85
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +15 -27
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +25 -29
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +18 -35
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +30 -46
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +6 -12
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +3 -5
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +4 -5
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +54 -100
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +220 -231
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +35 -38
- package/dist/components/index.js.map +1 -1
- package/dist/error/OrionError.js +4 -8
- package/dist/error/OrionError.js.map +1 -1
- package/dist/index.css +1 -797
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +43 -101
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +108 -200
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +14 -17
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +13 -16
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +14 -17
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +22 -47
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +25 -40
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +10 -16
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +201 -305
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +5 -11
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +5 -11
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +4 -9
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +5 -11
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +33 -48
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +93 -191
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +25 -35
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
- package/dist/components-B3d9m_tn.js +0 -27
- package/dist/components-B3d9m_tn.js.map +0 -1
- package/dist/functions-BeMkokbY.js +0 -63
- package/dist/functions-BeMkokbY.js.map +0 -1
- package/dist/index-BOKLZnqH.js +0 -54
- package/dist/index-BOKLZnqH.js.map +0 -1
- package/dist/index-D1m0KTpK.js +0 -69
- package/dist/index-D1m0KTpK.js.map +0 -1
- package/dist/index-DR5ZP7mD.js +0 -160
- package/dist/index-DR5ZP7mD.js.map +0 -1
- package/dist/index-DkwIULcN.js +0 -200
- package/dist/index-DkwIULcN.js.map +0 -1
@@ -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":[],"mappings":"AACO,
|
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,33 +1,21 @@
|
|
1
|
-
import { i as
|
2
|
-
const
|
3
|
-
let
|
4
|
-
function
|
5
|
-
const
|
6
|
-
|
7
|
-
el.setAttribute("id", id);
|
8
|
-
}
|
9
|
-
if (target) {
|
10
|
-
target.appendChild(el);
|
11
|
-
globalNodes.push(el);
|
12
|
-
}
|
13
|
-
return el;
|
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;
|
14
7
|
}
|
15
|
-
function
|
16
|
-
|
17
|
-
el.remove();
|
8
|
+
function a(e) {
|
9
|
+
i.splice(i.indexOf(e), 1), e.remove();
|
18
10
|
}
|
19
|
-
function
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
if (target && !el2.contains(target)) {
|
24
|
-
target.appendChild(el2);
|
25
|
-
}
|
26
|
-
});
|
11
|
+
function c(e) {
|
12
|
+
e !== t && (t = e, i.forEach((o) => {
|
13
|
+
t && !o.contains(t) && t.appendChild(o);
|
14
|
+
}));
|
27
15
|
}
|
28
16
|
export {
|
29
|
-
changeGlobalNodesTarget,
|
30
|
-
createGlobalNode,
|
31
|
-
removeGlobalNode
|
17
|
+
c as changeGlobalNodesTarget,
|
18
|
+
r as createGlobalNode,
|
19
|
+
a as removeGlobalNode
|
32
20
|
};
|
33
21
|
//# 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":["el"],"mappings":";AAEA,
|
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,36 +1,32 @@
|
|
1
|
-
import { c as
|
2
|
-
import { definePropType } from "./props/runtime.js";
|
3
|
-
const
|
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([
|
4
4
|
String,
|
5
5
|
Object,
|
6
6
|
Function
|
7
|
-
])
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
const ValidateComponentsMap = {
|
25
|
-
validating: loading_default,
|
26
|
-
success: circle_check_default,
|
27
|
-
error: circle_close_default
|
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
|
28
24
|
};
|
29
25
|
export {
|
30
|
-
CloseComponents,
|
31
|
-
TypeComponents,
|
32
|
-
TypeComponentsMap,
|
33
|
-
ValidateComponentsMap,
|
34
|
-
iconPropType
|
26
|
+
p as CloseComponents,
|
27
|
+
_ as TypeComponents,
|
28
|
+
u as TypeComponentsMap,
|
29
|
+
C as ValidateComponentsMap,
|
30
|
+
f as iconPropType
|
35
31
|
};
|
36
32
|
//# 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":["Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;AAcO,
|
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,44 +1,44 @@
|
|
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";
|
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";
|
9
9
|
export {
|
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
|
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
|
43
43
|
};
|
44
44
|
//# sourceMappingURL=index.js.map
|
@@ -1,38 +1,21 @@
|
|
1
|
-
import { N as
|
2
|
-
const
|
3
|
-
|
4
|
-
for (const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
};
|
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);
|
32
15
|
export {
|
33
|
-
withInstall,
|
34
|
-
withInstallDirective,
|
35
|
-
withInstallFunction,
|
36
|
-
withNoopInstall
|
16
|
+
e as withInstall,
|
17
|
+
i as withInstallDirective,
|
18
|
+
r as withInstallFunction,
|
19
|
+
a as withNoopInstall
|
37
20
|
};
|
38
21
|
//# 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":[],"mappings":";AAKa,
|
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,9 +1,9 @@
|
|
1
|
-
import { buildProp, buildProps, definePropType, epPropKey, isEpProp } from "./runtime.js";
|
1
|
+
import { buildProp as r, buildProps as e, definePropType as P, epPropKey as i, isEpProp as d } from "./runtime.js";
|
2
2
|
export {
|
3
|
-
buildProp,
|
4
|
-
buildProps,
|
5
|
-
definePropType,
|
6
|
-
epPropKey,
|
7
|
-
isEpProp
|
3
|
+
r as buildProp,
|
4
|
+
e as buildProps,
|
5
|
+
P as definePropType,
|
6
|
+
i as epPropKey,
|
7
|
+
d as isEpProp
|
8
8
|
};
|
9
9
|
//# sourceMappingURL=index.js.map
|
@@ -1,53 +1,37 @@
|
|
1
|
-
import { warn } from "vue";
|
2
|
-
import { fromPairs } from "lodash-es";
|
3
|
-
import { d as
|
4
|
-
const
|
5
|
-
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
+
);
|
17
18
|
}
|
18
|
-
|
19
|
-
}
|
20
|
-
|
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
|
19
|
+
return i;
|
20
|
+
} : void 0,
|
21
|
+
[u]: !0
|
36
22
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
key,
|
43
|
-
buildProp(option, key)
|
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)
|
44
28
|
])
|
45
29
|
);
|
46
30
|
export {
|
47
|
-
buildProp,
|
48
|
-
buildProps,
|
49
|
-
definePropType,
|
50
|
-
epPropKey,
|
51
|
-
isEpProp
|
31
|
+
O as buildProp,
|
32
|
+
j as buildProps,
|
33
|
+
$ as definePropType,
|
34
|
+
u as epPropKey,
|
35
|
+
y as isEpProp
|
52
36
|
};
|
53
37
|
//# 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":[],"mappings":";;;AAiBO,
|
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,18 +1,12 @@
|
|
1
|
-
import { b as
|
1
|
+
import { b as r } from "../../../functions-DzLqXvGt.js";
|
2
2
|
import "lodash-es";
|
3
3
|
import "vue";
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
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,
|
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
|
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,
|
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
|
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,
|
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;"}
|