orion-design 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Throne/index.js +30 -14
- package/dist/Throne/index.js.map +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/components/Button/index.js +40 -33
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +122 -89
- 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 +128 -66
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +836 -656
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +30 -18
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +28 -0
- package/dist/components/LovTable/index.d.ts +14 -0
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Modal/ModalLocator.vue.d.ts +20 -0
- package/dist/components/Modal/index.d.ts +4 -1
- package/dist/components/Modal/index.js +127 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/types.d.ts +18 -0
- package/dist/components/Modal/types.js +7 -0
- package/dist/components/Modal/types.js.map +1 -0
- package/dist/components/Modal/useModal.d.ts +1 -3
- package/dist/components/Modal/useModal.js +5 -4
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +13 -0
- 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/PagetableColumnDiy.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 +88 -74
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.d.ts +9 -0
- package/dist/components/Pagetable/index.js +697 -491
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +92 -54
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +82 -74
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +579 -469
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +92 -54
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +100 -74
- 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 +603 -358
- 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 +6 -4
- 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 +74 -39
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +29 -19
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +9 -5
- 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 +22 -17
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +74 -39
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +9 -8
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +14 -7
- 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 +49 -25
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +103 -61
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +65 -50
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +8 -4
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +12 -11
- 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 +4 -2
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +18 -14
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +46 -20
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +18 -10
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +5 -4
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +4 -3
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +9 -8
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +16 -10
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +41 -38
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +41 -22
- 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 +85 -43
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +27 -15
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +29 -25
- 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 +35 -18
- 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 +46 -30
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +12 -6
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +5 -3
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +5 -4
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +100 -54
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +231 -220
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +38 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components-8oZ2kpUC.js +27 -0
- package/dist/components-8oZ2kpUC.js.map +1 -0
- package/dist/components-B3d9m_tn.js +27 -0
- package/dist/components-B3d9m_tn.js.map +1 -0
- package/dist/error/OrionError.js +8 -4
- package/dist/error/OrionError.js.map +1 -1
- package/dist/functions-BeMkokbY.js +63 -0
- package/dist/functions-BeMkokbY.js.map +1 -0
- package/dist/index-BOKLZnqH.js +54 -0
- package/dist/index-BOKLZnqH.js.map +1 -0
- package/dist/index-D1m0KTpK.js +69 -0
- package/dist/index-D1m0KTpK.js.map +1 -0
- package/dist/index-DR5ZP7mD.js +160 -0
- package/dist/index-DR5ZP7mD.js.map +1 -0
- package/dist/index-DkwIULcN.js +200 -0
- package/dist/index-DkwIULcN.js.map +1 -0
- package/dist/index.css +797 -1
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +101 -43
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +200 -108
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +17 -14
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +16 -13
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +17 -14
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +47 -22
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +40 -25
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +16 -10
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +305 -201
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +11 -5
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +11 -5
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +9 -4
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +11 -5
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +48 -33
- 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 +191 -93
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +35 -25
- 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/components-J6-qau6Y.js +0 -73
- package/dist/components-J6-qau6Y.js.map +0 -1
@@ -1,26 +1,52 @@
|
|
1
|
-
import { Fragment
|
2
|
-
import
|
3
|
-
import { default as
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { Fragment, isVNode, Comment, Text } from "vue";
|
2
|
+
import isValid from "../isValid.js";
|
3
|
+
import { default as default2 } from "./initDefaultProps.js";
|
4
|
+
const skipFlattenKey = Symbol("skipFlatten");
|
5
|
+
const flattenChildren = (children = [], filterEmpty2 = true) => {
|
6
|
+
const temp = Array.isArray(children) ? children : [children];
|
7
|
+
const res = [];
|
8
|
+
temp.forEach((child) => {
|
9
|
+
if (Array.isArray(child)) {
|
10
|
+
res.push(...flattenChildren(child, filterEmpty2));
|
11
|
+
} else if (child && child.type === Fragment) {
|
12
|
+
if (child.key === skipFlattenKey) {
|
13
|
+
res.push(child);
|
14
|
+
} else {
|
15
|
+
res.push(...flattenChildren(child.children, filterEmpty2));
|
16
|
+
}
|
17
|
+
} else if (child && isVNode(child)) {
|
18
|
+
if (filterEmpty2 && !isEmptyElement(child)) {
|
19
|
+
res.push(child);
|
20
|
+
} else if (!filterEmpty2) {
|
21
|
+
res.push(child);
|
22
|
+
}
|
23
|
+
} else if (isValid(child)) {
|
24
|
+
res.push(child);
|
25
|
+
}
|
26
|
+
});
|
27
|
+
return res;
|
9
28
|
};
|
10
|
-
function
|
11
|
-
const
|
12
|
-
|
13
|
-
Array.isArray(
|
14
|
-
|
29
|
+
function filterEmpty(children = []) {
|
30
|
+
const res = [];
|
31
|
+
children.forEach((child) => {
|
32
|
+
if (Array.isArray(child)) {
|
33
|
+
res.push(...child);
|
34
|
+
} else if ((child == null ? void 0 : child.type) === Fragment) {
|
35
|
+
res.push(...filterEmpty(child.children));
|
36
|
+
} else {
|
37
|
+
res.push(child);
|
38
|
+
}
|
39
|
+
});
|
40
|
+
return res.filter((c) => !isEmptyElement(c));
|
15
41
|
}
|
16
|
-
function
|
17
|
-
return
|
42
|
+
function isEmptyElement(c) {
|
43
|
+
return c && (c.type === Comment || c.type === Fragment && c.children.length === 0 || c.type === Text && c.children.trim() === "");
|
18
44
|
}
|
19
45
|
export {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
46
|
+
filterEmpty,
|
47
|
+
flattenChildren,
|
48
|
+
default2 as initDefaultProps,
|
49
|
+
isEmptyElement,
|
50
|
+
skipFlattenKey
|
25
51
|
};
|
26
52
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/_util/props-util/index.ts"],"sourcesContent":["import { isVNode, Fragment, Comment, Text } from 'vue'\r\nimport isValid from '../isValid'\r\nimport initDefaultProps from './initDefaultProps'\r\n\r\nexport const skipFlattenKey = Symbol('skipFlatten')\r\n\r\nexport const flattenChildren = (children = [], filterEmpty = true) => {\r\n const temp = Array.isArray(children) ? children : [children]\r\n const res = []\r\n temp.forEach((child) => {\r\n if (Array.isArray(child)) {\r\n res.push(...flattenChildren(child, filterEmpty))\r\n // @ts-ignore\r\n } else if (child && child.type === Fragment) {\r\n // @ts-ignore\r\n if (child.key === skipFlattenKey) {\r\n res.push(child)\r\n } else {\r\n // @ts-ignore\r\n res.push(...flattenChildren(child.children, filterEmpty))\r\n }\r\n } else if (child && isVNode(child)) {\r\n if (filterEmpty && !isEmptyElement(child)) {\r\n res.push(child)\r\n } else if (!filterEmpty) {\r\n res.push(child)\r\n }\r\n } else if (isValid(child)) {\r\n res.push(child)\r\n }\r\n })\r\n return res\r\n}\r\n\r\nexport function filterEmpty(children = []) {\r\n const res = []\r\n children.forEach((child) => {\r\n if (Array.isArray(child)) {\r\n // @ts-ignore\r\n res.push(...child)\r\n // @ts-ignore\r\n } else if (child?.type === Fragment) {\r\n // @ts-ignore\r\n res.push(...filterEmpty(child.children))\r\n } else {\r\n res.push(child)\r\n }\r\n })\r\n return res.filter((c) => !isEmptyElement(c))\r\n}\r\n\r\nexport function isEmptyElement(c: any) {\r\n return c && (c.type === Comment || (c.type === Fragment && c.children.length === 0) || (c.type === Text && c.children.trim() === ''))\r\n}\r\n\r\nexport { initDefaultProps }\r\n"],"names":["
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/_util/props-util/index.ts"],"sourcesContent":["import { isVNode, Fragment, Comment, Text } from 'vue'\r\nimport isValid from '../isValid'\r\nimport initDefaultProps from './initDefaultProps'\r\n\r\nexport const skipFlattenKey = Symbol('skipFlatten')\r\n\r\nexport const flattenChildren = (children = [], filterEmpty = true) => {\r\n const temp = Array.isArray(children) ? children : [children]\r\n const res = []\r\n temp.forEach((child) => {\r\n if (Array.isArray(child)) {\r\n res.push(...flattenChildren(child, filterEmpty))\r\n // @ts-ignore\r\n } else if (child && child.type === Fragment) {\r\n // @ts-ignore\r\n if (child.key === skipFlattenKey) {\r\n res.push(child)\r\n } else {\r\n // @ts-ignore\r\n res.push(...flattenChildren(child.children, filterEmpty))\r\n }\r\n } else if (child && isVNode(child)) {\r\n if (filterEmpty && !isEmptyElement(child)) {\r\n res.push(child)\r\n } else if (!filterEmpty) {\r\n res.push(child)\r\n }\r\n } else if (isValid(child)) {\r\n res.push(child)\r\n }\r\n })\r\n return res\r\n}\r\n\r\nexport function filterEmpty(children = []) {\r\n const res = []\r\n children.forEach((child) => {\r\n if (Array.isArray(child)) {\r\n // @ts-ignore\r\n res.push(...child)\r\n // @ts-ignore\r\n } else if (child?.type === Fragment) {\r\n // @ts-ignore\r\n res.push(...filterEmpty(child.children))\r\n } else {\r\n res.push(child)\r\n }\r\n })\r\n return res.filter((c) => !isEmptyElement(c))\r\n}\r\n\r\nexport function isEmptyElement(c: any) {\r\n return c && (c.type === Comment || (c.type === Fragment && c.children.length === 0) || (c.type === Text && c.children.trim() === ''))\r\n}\r\n\r\nexport { initDefaultProps }\r\n"],"names":["filterEmpty"],"mappings":";;;AAIa,MAAA,iBAAiB,OAAO,aAAa;AAE3C,MAAM,kBAAkB,CAAC,WAAW,IAAIA,eAAc,SAAS;AACpE,QAAM,OAAO,MAAM,QAAQ,QAAQ,IAAI,WAAW,CAAC,QAAQ;AAC3D,QAAM,MAAM,CAAA;AACP,OAAA,QAAQ,CAAC,UAAU;AAClB,QAAA,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAI,KAAK,GAAG,gBAAgB,OAAOA,YAAW,CAAC;AAAA,IAEtC,WAAA,SAAS,MAAM,SAAS,UAAU;AAEvC,UAAA,MAAM,QAAQ,gBAAgB;AAChC,YAAI,KAAK,KAAK;AAAA,MAAA,OACT;AAEL,YAAI,KAAK,GAAG,gBAAgB,MAAM,UAAUA,YAAW,CAAC;AAAA,MAC1D;AAAA,IACS,WAAA,SAAS,QAAQ,KAAK,GAAG;AAClC,UAAIA,gBAAe,CAAC,eAAe,KAAK,GAAG;AACzC,YAAI,KAAK,KAAK;AAAA,MAAA,WACL,CAACA,cAAa;AACvB,YAAI,KAAK,KAAK;AAAA,MAChB;AAAA,IAAA,WACS,QAAQ,KAAK,GAAG;AACzB,UAAI,KAAK,KAAK;AAAA,IAChB;AAAA,EAAA,CACD;AACM,SAAA;AACT;AAEgB,SAAA,YAAY,WAAW,IAAI;AACzC,QAAM,MAAM,CAAA;AACH,WAAA,QAAQ,CAAC,UAAU;AACtB,QAAA,MAAM,QAAQ,KAAK,GAAG;AAEpB,UAAA,KAAK,GAAG,KAAK;AAAA,IAAA,YAER,+BAAO,UAAS,UAAU;AAEnC,UAAI,KAAK,GAAG,YAAY,MAAM,QAAQ,CAAC;AAAA,IAAA,OAClC;AACL,UAAI,KAAK,KAAK;AAAA,IAChB;AAAA,EAAA,CACD;AACD,SAAO,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAC7C;AAEO,SAAS,eAAe,GAAQ;AACrC,SAAO,MAAM,EAAE,SAAS,WAAY,EAAE,SAAS,YAAY,EAAE,SAAS,WAAW,KAAO,EAAE,SAAS,QAAQ,EAAE,SAAS,WAAW;AACnI;"}
|
@@ -1,14 +1,22 @@
|
|
1
|
-
const
|
2
|
-
const
|
3
|
-
|
4
|
-
const
|
5
|
-
if (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
const initDefaultProps = (types, defaultProps) => {
|
2
|
+
const propTypes = { ...types };
|
3
|
+
Object.keys(defaultProps).forEach((k) => {
|
4
|
+
const prop = propTypes[k];
|
5
|
+
if (prop) {
|
6
|
+
if (prop.type || prop.default) {
|
7
|
+
prop.default = defaultProps[k];
|
8
|
+
} else if (prop.def) {
|
9
|
+
prop.def(defaultProps[k]);
|
10
|
+
} else {
|
11
|
+
propTypes[k] = { type: prop, default: defaultProps[k] };
|
12
|
+
}
|
13
|
+
} else {
|
14
|
+
throw new Error(`not have ${k} prop`);
|
15
|
+
}
|
16
|
+
});
|
17
|
+
return propTypes;
|
10
18
|
};
|
11
19
|
export {
|
12
|
-
|
20
|
+
initDefaultProps as default
|
13
21
|
};
|
14
22
|
//# sourceMappingURL=initDefaultProps.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initDefaultProps.js","sources":["../../../../src/components/_util/props-util/initDefaultProps.ts"],"sourcesContent":["import type { PropType } from 'vue'\r\nimport type { VueTypeValidableDef, VueTypeDef } from 'vue-types'\r\n\r\nconst initDefaultProps = <T>(\r\n types: T,\r\n defaultProps: {\r\n [K in keyof T]?: T[K] extends VueTypeValidableDef<infer U> ? U : T[K] extends VueTypeDef<infer U> ? U : T[K] extends { type: PropType<infer U> } ? U : any\r\n }\r\n): T => {\r\n const propTypes: T = { ...types }\r\n Object.keys(defaultProps).forEach((k) => {\r\n const prop = propTypes[k] as VueTypeValidableDef\r\n if (prop) {\r\n if (prop.type || prop.default) {\r\n prop.default = defaultProps[k]\r\n } else if (prop.def) {\r\n prop.def(defaultProps[k])\r\n } else {\r\n propTypes[k] = { type: prop, default: defaultProps[k] }\r\n }\r\n } else {\r\n throw new Error(`not have ${k} prop`)\r\n }\r\n })\r\n return propTypes\r\n}\r\n\r\nexport default initDefaultProps\r\n"],"names":[
|
1
|
+
{"version":3,"file":"initDefaultProps.js","sources":["../../../../src/components/_util/props-util/initDefaultProps.ts"],"sourcesContent":["import type { PropType } from 'vue'\r\nimport type { VueTypeValidableDef, VueTypeDef } from 'vue-types'\r\n\r\nconst initDefaultProps = <T>(\r\n types: T,\r\n defaultProps: {\r\n [K in keyof T]?: T[K] extends VueTypeValidableDef<infer U> ? U : T[K] extends VueTypeDef<infer U> ? U : T[K] extends { type: PropType<infer U> } ? U : any\r\n }\r\n): T => {\r\n const propTypes: T = { ...types }\r\n Object.keys(defaultProps).forEach((k) => {\r\n const prop = propTypes[k] as VueTypeValidableDef\r\n if (prop) {\r\n if (prop.type || prop.default) {\r\n prop.default = defaultProps[k]\r\n } else if (prop.def) {\r\n prop.def(defaultProps[k])\r\n } else {\r\n propTypes[k] = { type: prop, default: defaultProps[k] }\r\n }\r\n } else {\r\n throw new Error(`not have ${k} prop`)\r\n }\r\n })\r\n return propTypes\r\n}\r\n\r\nexport default initDefaultProps\r\n"],"names":[],"mappings":"AAGM,MAAA,mBAAmB,CACvB,OACA,iBAGM;AACA,QAAA,YAAe,EAAE,GAAG;AAC1B,SAAO,KAAK,YAAY,EAAE,QAAQ,CAAC,MAAM;AACjC,UAAA,OAAO,UAAU,CAAC;AACxB,QAAI,MAAM;AACJ,UAAA,KAAK,QAAQ,KAAK,SAAS;AACxB,aAAA,UAAU,aAAa,CAAC;AAAA,MAAA,WACpB,KAAK,KAAK;AACd,aAAA,IAAI,aAAa,CAAC,CAAC;AAAA,MAAA,OACnB;AACK,kBAAA,CAAC,IAAI,EAAE,MAAM,MAAM,SAAS,aAAa,CAAC;MACtD;AAAA,IAAA,OACK;AACL,YAAM,IAAI,MAAM,YAAY,CAAC,OAAO;AAAA,IACtC;AAAA,EAAA,CACD;AACM,SAAA;AACT;"}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { i as
|
2
|
-
const
|
1
|
+
import { i as isClient } from "../../index-D1m0KTpK.js";
|
2
|
+
const rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
|
3
|
+
const cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
|
3
4
|
export {
|
4
|
-
|
5
|
-
|
5
|
+
cAF,
|
6
|
+
rAF
|
6
7
|
};
|
7
8
|
//# sourceMappingURL=raf.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"raf.js","sources":["../../../src/components/_util/raf.ts"],"sourcesContent":["import { isClient } from './browser'\n\nexport const rAF = (fn: () => void) =>\n isClient\n ? window.requestAnimationFrame(fn)\n : (setTimeout(fn, 16) as unknown as number)\n\nexport const cAF = (handle: number) =>\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\n"],"names":[
|
1
|
+
{"version":3,"file":"raf.js","sources":["../../../src/components/_util/raf.ts"],"sourcesContent":["import { isClient } from './browser'\r\n\r\nexport const rAF = (fn: () => void) =>\r\n isClient\r\n ? window.requestAnimationFrame(fn)\r\n : (setTimeout(fn, 16) as unknown as number)\r\n\r\nexport const cAF = (handle: number) =>\r\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\r\n"],"names":[],"mappings":";AAEa,MAAA,MAAM,CAAC,OAClB,WACI,OAAO,sBAAsB,EAAE,IAC9B,WAAW,IAAI,EAAE;AAEX,MAAA,MAAM,CAAC,WAClB,WAAW,OAAO,qBAAqB,MAAM,IAAI,aAAa,MAAM;"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
const
|
1
|
+
const generateId = () => Math.floor(Math.random() * 1e4);
|
2
|
+
const getRandomInt = (max) => Math.floor(Math.random() * Math.floor(max));
|
2
3
|
export {
|
3
|
-
|
4
|
-
|
4
|
+
generateId,
|
5
|
+
getRandomInt
|
5
6
|
};
|
6
7
|
//# sourceMappingURL=rand.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rand.js","sources":["../../../src/components/_util/rand.ts"],"sourcesContent":["/**\n * @deprecated Use `useId` `useIdInjection` instead\n * Generate random number in range [0, 1000]\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\n */\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\n\n/**\n * @deprecated\n * Generating a random int in range (0, max - 1)\n * @param max {number}\n */\nexport const getRandomInt = (max: number) =>\n Math.floor(Math.random() * Math.floor(max))\n"],"names":[
|
1
|
+
{"version":3,"file":"rand.js","sources":["../../../src/components/_util/rand.ts"],"sourcesContent":["/**\r\n * @deprecated Use `useId` `useIdInjection` instead\r\n * Generate random number in range [0, 1000]\r\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\r\n */\r\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\r\n\r\n/**\r\n * @deprecated\r\n * Generating a random int in range (0, max - 1)\r\n * @param max {number}\r\n */\r\nexport const getRandomInt = (max: number) =>\r\n Math.floor(Math.random() * Math.floor(max))\r\n"],"names":[],"mappings":"AAKO,MAAM,aAAa,MAAc,KAAK,MAAM,KAAK,WAAW,GAAK;AAO3D,MAAA,eAAe,CAAC,QAC3B,KAAK,MAAM,KAAK,WAAW,KAAK,MAAM,GAAG,CAAC;"}
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import { l as
|
2
|
-
import { c
|
3
|
-
const
|
1
|
+
import { l as capitalize$1 } from "../../functions-BeMkokbY.js";
|
2
|
+
import { c, a, a as a2 } from "../../functions-BeMkokbY.js";
|
3
|
+
const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
4
|
+
const capitalize = (str) => capitalize$1(str);
|
4
5
|
export {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
c as camelize,
|
7
|
+
capitalize,
|
8
|
+
escapeStringRegexp,
|
9
|
+
a as hyphenate,
|
10
|
+
a2 as kebabCase
|
10
11
|
};
|
11
12
|
//# sourceMappingURL=strings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strings.js","sources":["../../../src/components/_util/strings.ts"],"sourcesContent":["import { capitalize as toCapitalize } from '@vue/shared'\nexport {\n camelize,\n hyphenate,\n hyphenate as kebabCase, // alias\n} from '@vue/shared'\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\nexport const capitalize = <T extends string>(str: T) =>\n toCapitalize(str) as Capitalize<T>\n"],"names":["
|
1
|
+
{"version":3,"file":"strings.js","sources":["../../../src/components/_util/strings.ts"],"sourcesContent":["import { capitalize as toCapitalize } from '@vue/shared'\r\nexport {\r\n camelize,\r\n hyphenate,\r\n hyphenate as kebabCase, // alias\r\n} from '@vue/shared'\r\n\r\n/**\r\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\r\n */\r\nexport const escapeStringRegexp = (string = '') =>\r\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\r\n\r\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\r\nexport const capitalize = <T extends string>(str: T) =>\r\n toCapitalize(str) as Capitalize<T>\r\n"],"names":["toCapitalize"],"mappings":";;AAUa,MAAA,qBAAqB,CAAC,SAAS,OAC1C,OAAO,QAAQ,uBAAuB,MAAM,EAAE,QAAQ,MAAM,OAAO;AAG9D,MAAM,aAAa,CAAmB,QAC3CA,aAAa,GAAG;"}
|
@@ -1,16 +1,22 @@
|
|
1
|
-
import { cAF
|
2
|
-
function
|
3
|
-
let
|
4
|
-
const
|
5
|
-
|
6
|
-
|
1
|
+
import { cAF, rAF } from "./raf.js";
|
2
|
+
function throttleByRaf(cb) {
|
3
|
+
let timer = 0;
|
4
|
+
const throttle = (...args) => {
|
5
|
+
if (timer) {
|
6
|
+
cAF(timer);
|
7
|
+
}
|
8
|
+
timer = rAF(() => {
|
9
|
+
cb(...args);
|
10
|
+
timer = 0;
|
7
11
|
});
|
8
12
|
};
|
9
|
-
|
10
|
-
|
11
|
-
|
13
|
+
throttle.cancel = () => {
|
14
|
+
cAF(timer);
|
15
|
+
timer = 0;
|
16
|
+
};
|
17
|
+
return throttle;
|
12
18
|
}
|
13
19
|
export {
|
14
|
-
|
20
|
+
throttleByRaf
|
15
21
|
};
|
16
22
|
//# sourceMappingURL=throttleByRaf.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"throttleByRaf.js","sources":["../../../src/components/_util/throttleByRaf.ts"],"sourcesContent":["import { cAF, rAF } from './raf'\n\nexport function throttleByRaf(cb: (...args: any[]) => void) {\n let timer = 0\n\n const throttle = (...args: any[]): void => {\n if (timer) {\n cAF(timer)\n }\n timer = rAF(() => {\n cb(...args)\n timer = 0\n })\n }\n\n throttle.cancel = () => {\n cAF(timer)\n timer = 0\n }\n\n return throttle\n}\n"],"names":[
|
1
|
+
{"version":3,"file":"throttleByRaf.js","sources":["../../../src/components/_util/throttleByRaf.ts"],"sourcesContent":["import { cAF, rAF } from './raf'\r\n\r\nexport function throttleByRaf(cb: (...args: any[]) => void) {\r\n let timer = 0\r\n\r\n const throttle = (...args: any[]): void => {\r\n if (timer) {\r\n cAF(timer)\r\n }\r\n timer = rAF(() => {\r\n cb(...args)\r\n timer = 0\r\n })\r\n }\r\n\r\n throttle.cancel = () => {\r\n cAF(timer)\r\n timer = 0\r\n }\r\n\r\n return throttle\r\n}\r\n"],"names":[],"mappings":";AAEO,SAAS,cAAc,IAA8B;AAC1D,MAAI,QAAQ;AAEN,QAAA,WAAW,IAAI,SAAsB;AACzC,QAAI,OAAO;AACT,UAAI,KAAK;AAAA,IACX;AACA,YAAQ,IAAI,MAAM;AAChB,SAAG,GAAG,IAAI;AACF,cAAA;AAAA,IAAA,CACT;AAAA,EAAA;AAGH,WAAS,SAAS,MAAM;AACtB,QAAI,KAAK;AACD,YAAA;AAAA,EAAA;AAGH,SAAA;AACT;"}
|
@@ -1,53 +1,56 @@
|
|
1
|
-
const
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
const tuple = (...args) => args;
|
2
|
+
const tupleNum = (...args) => args;
|
3
|
+
const withInstall = (comp) => {
|
4
|
+
const c = comp;
|
5
|
+
c.install = function(app) {
|
6
|
+
app.component(c.displayName || c.name, comp);
|
7
|
+
};
|
8
|
+
return comp;
|
6
9
|
};
|
7
|
-
function
|
10
|
+
function eventType() {
|
8
11
|
return { type: [Function, Array] };
|
9
12
|
}
|
10
|
-
function
|
11
|
-
return { type: Object, default:
|
13
|
+
function objectType(defaultVal) {
|
14
|
+
return { type: Object, default: defaultVal };
|
12
15
|
}
|
13
|
-
function
|
14
|
-
return { type: Boolean, default:
|
16
|
+
function booleanType(defaultVal) {
|
17
|
+
return { type: Boolean, default: defaultVal };
|
15
18
|
}
|
16
|
-
function
|
17
|
-
return { type: Function, default:
|
19
|
+
function functionType(defaultVal) {
|
20
|
+
return { type: Function, default: defaultVal };
|
18
21
|
}
|
19
|
-
function
|
20
|
-
const
|
21
|
-
return
|
22
|
+
function anyType(defaultVal, required) {
|
23
|
+
const type = { validator: () => true, default: defaultVal };
|
24
|
+
return required ? type : type;
|
22
25
|
}
|
23
|
-
function
|
24
|
-
return { validator: () =>
|
26
|
+
function vNodeType() {
|
27
|
+
return { validator: () => true };
|
25
28
|
}
|
26
|
-
function
|
27
|
-
return { type: Array, default:
|
29
|
+
function arrayType(defaultVal) {
|
30
|
+
return { type: Array, default: defaultVal };
|
28
31
|
}
|
29
|
-
function
|
30
|
-
return { type: String, default:
|
32
|
+
function stringType(defaultVal) {
|
33
|
+
return { type: String, default: defaultVal };
|
31
34
|
}
|
32
|
-
function
|
33
|
-
return { type: Number, default:
|
35
|
+
function numberType(defaultVal) {
|
36
|
+
return { type: Number, default: defaultVal };
|
34
37
|
}
|
35
|
-
function
|
36
|
-
return
|
38
|
+
function someType(types, defaultVal) {
|
39
|
+
return types ? { type: types, default: defaultVal } : anyType(defaultVal);
|
37
40
|
}
|
38
41
|
export {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
42
|
+
anyType,
|
43
|
+
arrayType,
|
44
|
+
booleanType,
|
45
|
+
eventType,
|
46
|
+
functionType,
|
47
|
+
numberType,
|
48
|
+
objectType,
|
49
|
+
someType,
|
50
|
+
stringType,
|
51
|
+
tuple,
|
52
|
+
tupleNum,
|
53
|
+
vNodeType,
|
54
|
+
withInstall
|
52
55
|
};
|
53
56
|
//# sourceMappingURL=type.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"type.js","sources":["../../../src/components/_util/type.ts"],"sourcesContent":["// @ts-ignore\r\nimport type { App, PropType, Plugin, Ref, VNode, SlotsType } from 'vue'\r\n\r\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\r\nexport const tuple = <T extends string[]>(...args: T) => args\r\n\r\nexport const tupleNum = <T extends number[]>(...args: T) => args\r\n\r\n/**\r\n * https://stackoverflow.com/a/59187769\r\n * Extract the type of an element of an array/tuple without performing indexing\r\n */\r\nexport type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never\r\n\r\n/**\r\n * https://github.com/Microsoft/TypeScript/issues/29729\r\n */\r\nexport type LiteralUnion<T extends string> = T | (string & {})\r\n\r\nexport type Data = Record<string, unknown>\r\n\r\nexport type Key = string | number\r\n\r\ntype DefaultFactory<T> = (props: Data) => T | null | undefined\r\n\r\nexport interface PropOptions<T = any, D = T> {\r\n type?: PropType<T> | true | null\r\n required?: boolean\r\n default?: D | DefaultFactory<D> | null | undefined | object\r\n validator?(value: unknown): boolean\r\n}\r\n\r\ndeclare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void\r\n\r\n// eslint-disable-next-line no-undef\r\nexport type VueNode = VNodeChildAtom | VNodeChildAtom[] | VNode\r\n\r\nexport const withInstall = <T>(comp: T) => {\r\n const c = comp as any\r\n c.install = function (app: App) {\r\n // @ts-ignore\r\n app.component(c.displayName || c.name, comp)\r\n }\r\n\r\n return comp as T & Plugin\r\n}\r\n\r\nexport type MaybeRef<T> = T | Ref<T>\r\n\r\nexport function eventType<T>() {\r\n return { type: [Function, Array] as PropType<T | T[]> }\r\n}\r\n\r\nexport function objectType<T = {}>(defaultVal?: T) {\r\n return { type: Object as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function booleanType(defaultVal?: boolean) {\r\n return { type: Boolean, default: defaultVal as boolean }\r\n}\r\n\r\nexport function functionType<T = () => {}>(defaultVal?: T) {\r\n return { type: Function as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function anyType<T = any>(defaultVal?: T, required?: boolean) {\r\n const type = { validator: () => true, default: defaultVal as T } as unknown\r\n return required\r\n ? (type as {\r\n type: PropType<T>\r\n default: T\r\n required: true\r\n })\r\n : (type as {\r\n default: T\r\n type: PropType<T>\r\n })\r\n}\r\nexport function vNodeType<T = VueNode>() {\r\n return { validator: () => true } as unknown as { type: PropType<T> }\r\n}\r\n\r\nexport function arrayType<T extends any[]>(defaultVal?: T) {\r\n return { type: Array as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function stringType<T extends string = string>(defaultVal?: T) {\r\n return { type: String as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function numberType<T extends number = number>(defaultVal?: T) {\r\n return { type: Number as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function someType<T>(types?: any[], defaultVal?: T) {\r\n return types ? { type: types as PropType<T>, default: defaultVal as T } : anyType<T>(defaultVal)\r\n}\r\n\r\n// @ts-ignore\r\nexport type CustomSlotsType<T> = SlotsType<T>\r\n\r\nexport type AnyObject = Record<PropertyKey, any>\r\n"],"names":[
|
1
|
+
{"version":3,"file":"type.js","sources":["../../../src/components/_util/type.ts"],"sourcesContent":["// @ts-ignore\r\nimport type { App, PropType, Plugin, Ref, VNode, SlotsType } from 'vue'\r\n\r\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\r\nexport const tuple = <T extends string[]>(...args: T) => args\r\n\r\nexport const tupleNum = <T extends number[]>(...args: T) => args\r\n\r\n/**\r\n * https://stackoverflow.com/a/59187769\r\n * Extract the type of an element of an array/tuple without performing indexing\r\n */\r\nexport type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never\r\n\r\n/**\r\n * https://github.com/Microsoft/TypeScript/issues/29729\r\n */\r\nexport type LiteralUnion<T extends string> = T | (string & {})\r\n\r\nexport type Data = Record<string, unknown>\r\n\r\nexport type Key = string | number\r\n\r\ntype DefaultFactory<T> = (props: Data) => T | null | undefined\r\n\r\nexport interface PropOptions<T = any, D = T> {\r\n type?: PropType<T> | true | null\r\n required?: boolean\r\n default?: D | DefaultFactory<D> | null | undefined | object\r\n validator?(value: unknown): boolean\r\n}\r\n\r\ndeclare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void\r\n\r\n// eslint-disable-next-line no-undef\r\nexport type VueNode = VNodeChildAtom | VNodeChildAtom[] | VNode\r\n\r\nexport const withInstall = <T>(comp: T) => {\r\n const c = comp as any\r\n c.install = function (app: App) {\r\n // @ts-ignore\r\n app.component(c.displayName || c.name, comp)\r\n }\r\n\r\n return comp as T & Plugin\r\n}\r\n\r\nexport type MaybeRef<T> = T | Ref<T>\r\n\r\nexport function eventType<T>() {\r\n return { type: [Function, Array] as PropType<T | T[]> }\r\n}\r\n\r\nexport function objectType<T = {}>(defaultVal?: T) {\r\n return { type: Object as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function booleanType(defaultVal?: boolean) {\r\n return { type: Boolean, default: defaultVal as boolean }\r\n}\r\n\r\nexport function functionType<T = () => {}>(defaultVal?: T) {\r\n return { type: Function as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function anyType<T = any>(defaultVal?: T, required?: boolean) {\r\n const type = { validator: () => true, default: defaultVal as T } as unknown\r\n return required\r\n ? (type as {\r\n type: PropType<T>\r\n default: T\r\n required: true\r\n })\r\n : (type as {\r\n default: T\r\n type: PropType<T>\r\n })\r\n}\r\nexport function vNodeType<T = VueNode>() {\r\n return { validator: () => true } as unknown as { type: PropType<T> }\r\n}\r\n\r\nexport function arrayType<T extends any[]>(defaultVal?: T) {\r\n return { type: Array as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function stringType<T extends string = string>(defaultVal?: T) {\r\n return { type: String as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function numberType<T extends number = number>(defaultVal?: T) {\r\n return { type: Number as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function someType<T>(types?: any[], defaultVal?: T) {\r\n return types ? { type: types as PropType<T>, default: defaultVal as T } : anyType<T>(defaultVal)\r\n}\r\n\r\n// @ts-ignore\r\nexport type CustomSlotsType<T> = SlotsType<T>\r\n\r\nexport type AnyObject = Record<PropertyKey, any>\r\n"],"names":[],"mappings":"AAIa,MAAA,QAAQ,IAAwB,SAAY;AAE5C,MAAA,WAAW,IAAwB,SAAY;AA+B/C,MAAA,cAAc,CAAI,SAAY;AACzC,QAAM,IAAI;AACR,IAAA,UAAU,SAAU,KAAU;AAE9B,QAAI,UAAU,EAAE,eAAe,EAAE,MAAM,IAAI;AAAA,EAAA;AAGtC,SAAA;AACT;AAIO,SAAS,YAAe;AAC7B,SAAO,EAAE,MAAM,CAAC,UAAU,KAAK,EAAuB;AACxD;AAEO,SAAS,WAAmB,YAAgB;AACjD,SAAO,EAAE,MAAM,QAAuB,SAAS,WAAgB;AACjE;AAEO,SAAS,YAAY,YAAsB;AAChD,SAAO,EAAE,MAAM,SAAS,SAAS,WAAsB;AACzD;AAEO,SAAS,aAA2B,YAAgB;AACzD,SAAO,EAAE,MAAM,UAAyB,SAAS,WAAgB;AACnE;AAEgB,SAAA,QAAiB,YAAgB,UAAoB;AACnE,QAAM,OAAO,EAAE,WAAW,MAAM,MAAM,SAAS;AAC/C,SAAO,WACF,OAKA;AAIP;AACO,SAAS,YAAyB;AAChC,SAAA,EAAE,WAAW,MAAM;AAC5B;AAEO,SAAS,UAA2B,YAAgB;AACzD,SAAO,EAAE,MAAM,OAAiC,SAAS,WAAgB;AAC3E;AAEO,SAAS,WAAsC,YAAgB;AACpE,SAAO,EAAE,MAAM,QAAkC,SAAS,WAAgB;AAC5E;AAEO,SAAS,WAAsC,YAAgB;AACpE,SAAO,EAAE,MAAM,QAAkC,SAAS,WAAgB;AAC5E;AAEgB,SAAA,SAAY,OAAe,YAAgB;AAClD,SAAA,QAAQ,EAAE,MAAM,OAAsB,SAAS,WAAgB,IAAI,QAAW,UAAU;AACjG;"}
|
@@ -1,25 +1,44 @@
|
|
1
|
-
import { i as
|
2
|
-
import { f
|
3
|
-
import { isNil
|
4
|
-
import { isVNode
|
5
|
-
const
|
1
|
+
import { i as isArray, d as isObject, e as isString } from "../../functions-BeMkokbY.js";
|
2
|
+
import { f, b, k, g, j } from "../../functions-BeMkokbY.js";
|
3
|
+
import { isNil } from "lodash-es";
|
4
|
+
import { isVNode } from "vue";
|
5
|
+
const isUndefined = (val) => val === void 0;
|
6
|
+
const isBoolean = (val) => typeof val === "boolean";
|
7
|
+
const isNumber = (val) => typeof val === "number";
|
8
|
+
const isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
|
9
|
+
const isElement = (e) => {
|
10
|
+
if (typeof Element === "undefined") return false;
|
11
|
+
return e instanceof Element;
|
12
|
+
};
|
13
|
+
const isPropAbsent = (prop) => {
|
14
|
+
return isNil(prop);
|
15
|
+
};
|
16
|
+
const isStringNumber = (val) => {
|
17
|
+
if (!isString(val)) {
|
18
|
+
return false;
|
19
|
+
}
|
20
|
+
return !Number.isNaN(Number(val));
|
21
|
+
};
|
22
|
+
const isWindow = (val) => {
|
23
|
+
return val === window;
|
24
|
+
};
|
6
25
|
export {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
isArray,
|
27
|
+
isBoolean,
|
28
|
+
f as isDate,
|
29
|
+
isElement,
|
30
|
+
isEmpty,
|
31
|
+
b as isFunction,
|
32
|
+
isNumber,
|
33
|
+
isObject,
|
34
|
+
k as isPlainObject,
|
35
|
+
g as isPromise,
|
36
|
+
isPropAbsent,
|
37
|
+
isString,
|
38
|
+
isStringNumber,
|
39
|
+
j as isSymbol,
|
40
|
+
isUndefined,
|
41
|
+
isVNode,
|
42
|
+
isWindow
|
24
43
|
};
|
25
44
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/components/_util/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol,\n isPlainObject,\n} from '@vue/shared'\nexport { isVNode } from 'vue'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isEmpty = (val: unknown) =>\n (!val && val !== 0) ||\n (isArray(val) && val.length === 0) ||\n (isObject(val) && !Object.keys(val).length)\n\nexport const isElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\nexport const isPropAbsent = (prop: unknown): prop is null | undefined => {\n return isNil(prop)\n}\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n\nexport const isWindow = (val: unknown): val is Window => {\n return val === window\n}\n"],"names":[
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/_util/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\r\nimport { isNil } from 'lodash-unified'\r\n\r\nexport {\r\n isArray,\r\n isFunction,\r\n isObject,\r\n isString,\r\n isDate,\r\n isPromise,\r\n isSymbol,\r\n isPlainObject,\r\n} from '@vue/shared'\r\nexport { isVNode } from 'vue'\r\n\r\nexport const isUndefined = (val: any): val is undefined => val === undefined\r\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\r\nexport const isNumber = (val: any): val is number => typeof val === 'number'\r\n\r\nexport const isEmpty = (val: unknown) =>\r\n (!val && val !== 0) ||\r\n (isArray(val) && val.length === 0) ||\r\n (isObject(val) && !Object.keys(val).length)\r\n\r\nexport const isElement = (e: unknown): e is Element => {\r\n if (typeof Element === 'undefined') return false\r\n return e instanceof Element\r\n}\r\n\r\nexport const isPropAbsent = (prop: unknown): prop is null | undefined => {\r\n return isNil(prop)\r\n}\r\n\r\nexport const isStringNumber = (val: string): boolean => {\r\n if (!isString(val)) {\r\n return false\r\n }\r\n return !Number.isNaN(Number(val))\r\n}\r\n\r\nexport const isWindow = (val: unknown): val is Window => {\r\n return val === window\r\n}\r\n"],"names":[],"mappings":";;;;AAea,MAAA,cAAc,CAAC,QAA+B,QAAQ;AAC5D,MAAM,YAAY,CAAC,QAA6B,OAAO,QAAQ;AAC/D,MAAM,WAAW,CAAC,QAA4B,OAAO,QAAQ;AAEvD,MAAA,UAAU,CAAC,QACrB,CAAC,OAAO,QAAQ,KAChB,QAAQ,GAAG,KAAK,IAAI,WAAW,KAC/B,SAAS,GAAG,KAAK,CAAC,OAAO,KAAK,GAAG,EAAE;AAEzB,MAAA,YAAY,CAAC,MAA6B;AACjD,MAAA,OAAO,YAAY,YAAoB,QAAA;AAC3C,SAAO,aAAa;AACtB;AAEa,MAAA,eAAe,CAAC,SAA4C;AACvE,SAAO,MAAM,IAAI;AACnB;AAEa,MAAA,iBAAiB,CAAC,QAAyB;AAClD,MAAA,CAAC,SAAS,GAAG,GAAG;AACX,WAAA;AAAA,EACT;AACA,SAAO,CAAC,OAAO,MAAM,OAAO,GAAG,CAAC;AAClC;AAEa,MAAA,WAAW,CAAC,QAAgC;AACvD,SAAO,QAAQ;AACjB;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"typescript.js","sources":["../../../src/components/_util/typescript.ts"],"sourcesContent":["export const mutable = <T extends readonly any[] | Record<string, unknown>>(\n val: T\n) => val as Mutable<typeof val>\nexport type Mutable<T> = { -readonly [P in keyof T]: T[P] }\n\nexport type HTMLElementCustomized<T> = HTMLElement & T\n\n/**\n * @deprecated stop to use null\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\n */\nexport type Nullable<T> = T | null\n\nexport type Arrayable<T> = T | T[]\nexport type Awaitable<T> = Promise<T> | T\n"],"names":[
|
1
|
+
{"version":3,"file":"typescript.js","sources":["../../../src/components/_util/typescript.ts"],"sourcesContent":["export const mutable = <T extends readonly any[] | Record<string, unknown>>(\r\n val: T\r\n) => val as Mutable<typeof val>\r\nexport type Mutable<T> = { -readonly [P in keyof T]: T[P] }\r\n\r\nexport type HTMLElementCustomized<T> = HTMLElement & T\r\n\r\n/**\r\n * @deprecated stop to use null\r\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\r\n */\r\nexport type Nullable<T> = T | null\r\n\r\nexport type Arrayable<T> = T | T[]\r\nexport type Awaitable<T> = Promise<T> | T\r\n"],"names":[],"mappings":"AAAa,MAAA,UAAU,CACrB,QACG;"}
|
@@ -1,55 +1,97 @@
|
|
1
|
-
const
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
const isFunction = (val) => typeof val === "function";
|
2
|
+
const controlDefaultValue = Symbol("controlDefaultValue");
|
3
|
+
const isArray = Array.isArray;
|
4
|
+
const isString = (val) => typeof val === "string";
|
5
|
+
const isSymbol = (val) => typeof val === "symbol";
|
6
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
7
|
+
const onRE = /^on[^a-z]/;
|
8
|
+
const isOn = (key) => onRE.test(key);
|
9
|
+
const cacheStringFunction = (fn) => {
|
10
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
11
|
+
return (str) => {
|
12
|
+
const hit = cache[str];
|
13
|
+
return hit || (cache[str] = fn(str));
|
14
|
+
};
|
15
|
+
};
|
16
|
+
const camelizeRE = /-(\w)/g;
|
17
|
+
const camelize = cacheStringFunction((str) => {
|
18
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
19
|
+
});
|
20
|
+
const hyphenateRE = /\B([A-Z])/g;
|
21
|
+
const hyphenate = cacheStringFunction((str) => {
|
22
|
+
return str.replace(hyphenateRE, "-$1").toLowerCase();
|
23
|
+
});
|
24
|
+
const capitalize = cacheStringFunction((str) => {
|
25
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
26
|
+
});
|
27
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
28
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
29
|
+
function resolvePropValue(options, props, key, value) {
|
30
|
+
const opt = options[key];
|
31
|
+
if (opt != null) {
|
32
|
+
const hasDefault = hasOwn(opt, "default");
|
33
|
+
if (hasDefault && value === void 0) {
|
34
|
+
const defaultValue = opt.default;
|
35
|
+
value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue;
|
36
|
+
}
|
37
|
+
if (opt.type === Boolean) {
|
38
|
+
if (!hasOwn(props, key) && !hasDefault) {
|
39
|
+
value = false;
|
40
|
+
} else if (value === "") {
|
41
|
+
value = true;
|
42
|
+
}
|
12
43
|
}
|
13
|
-
r.type === Boolean && (!a(n, e) && !c ? o = !1 : o === "" && (o = !0));
|
14
44
|
}
|
15
|
-
return
|
45
|
+
return value;
|
16
46
|
}
|
17
|
-
function
|
18
|
-
return Object.keys(
|
47
|
+
function getDataAndAriaProps(props) {
|
48
|
+
return Object.keys(props).reduce((memo, key) => {
|
49
|
+
if (key.startsWith("data-") || key.startsWith("aria-")) {
|
50
|
+
memo[key] = props[key];
|
51
|
+
}
|
52
|
+
return memo;
|
53
|
+
}, {});
|
19
54
|
}
|
20
|
-
function
|
21
|
-
|
55
|
+
function toPx(val) {
|
56
|
+
if (typeof val === "number") return `${val}px`;
|
57
|
+
return val;
|
22
58
|
}
|
23
|
-
function
|
24
|
-
|
59
|
+
function renderHelper(v, props = {}, defaultV) {
|
60
|
+
if (typeof v === "function") {
|
61
|
+
return v(props);
|
62
|
+
}
|
63
|
+
return v ?? defaultV;
|
25
64
|
}
|
26
|
-
function
|
27
|
-
let
|
28
|
-
const
|
29
|
-
|
30
|
-
|
65
|
+
function wrapPromiseFn(openFn) {
|
66
|
+
let closeFn;
|
67
|
+
const closePromise = new Promise((resolve) => {
|
68
|
+
closeFn = openFn(() => {
|
69
|
+
resolve(true);
|
31
70
|
});
|
32
|
-
})
|
33
|
-
|
71
|
+
});
|
72
|
+
const result = () => {
|
73
|
+
closeFn == null ? void 0 : closeFn();
|
34
74
|
};
|
35
|
-
|
75
|
+
result.then = (filled, rejected) => closePromise.then(filled, rejected);
|
76
|
+
result.promise = closePromise;
|
77
|
+
return result;
|
36
78
|
}
|
37
79
|
export {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
80
|
+
cacheStringFunction,
|
81
|
+
camelize,
|
82
|
+
capitalize,
|
83
|
+
controlDefaultValue,
|
84
|
+
getDataAndAriaProps,
|
85
|
+
hyphenate,
|
86
|
+
isArray,
|
87
|
+
isFunction,
|
88
|
+
isObject,
|
89
|
+
isOn,
|
90
|
+
isString,
|
91
|
+
isSymbol,
|
92
|
+
renderHelper,
|
93
|
+
resolvePropValue,
|
94
|
+
toPx,
|
95
|
+
wrapPromiseFn
|
54
96
|
};
|
55
97
|
//# sourceMappingURL=util.js.map
|