orion-design 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/index.d.ts +2 -10
  3. package/dist/Throne/index.js.map +1 -1
  4. package/dist/components/Button/Button.vue.d.ts +15 -1
  5. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +4 -0
  6. package/dist/components/Button/ButtonGroup/ButtonGroup.js +2 -0
  7. package/dist/components/Button/ButtonGroup/ButtonGroup.js.map +1 -0
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
  9. package/dist/components/Button/ButtonGroup/index.d.ts +1 -0
  10. package/dist/components/Button/ButtonGroup/index.js +2 -0
  11. package/dist/components/Button/ButtonGroup/index.js.map +1 -0
  12. package/dist/components/Button/index.d.ts +20 -1
  13. package/dist/components/Button/index.js +36 -18
  14. package/dist/components/Button/index.js.map +1 -1
  15. package/dist/components/Form/Checkbox/Checkbox.d.ts +0 -1
  16. package/dist/components/Form/DiyItem/DiyItem.d.ts +9 -0
  17. package/dist/components/Form/DiyItem/DiyItem.js +2 -0
  18. package/dist/components/Form/DiyItem/DiyItem.js.map +1 -0
  19. package/dist/components/Form/DiyItem/DiyItem.vue.d.ts +17 -0
  20. package/dist/components/Form/DiyItem/index.d.ts +1 -0
  21. package/dist/components/Form/DiyItem/index.js +2 -0
  22. package/dist/components/Form/DiyItem/index.js.map +1 -0
  23. package/dist/components/Form/FileInput/FileInput.vue.d.ts +2 -2
  24. package/dist/components/Form/Form.d.ts +4 -1
  25. package/dist/components/Form/Form.js.map +1 -1
  26. package/dist/components/Form/Form.vue.d.ts +6 -10
  27. package/dist/components/Form/Switch/Switch.d.ts +0 -1
  28. package/dist/components/Form/hooks/useForm.d.ts +4 -2
  29. package/dist/components/Form/hooks/useForm.js +71 -34
  30. package/dist/components/Form/hooks/useForm.js.map +1 -1
  31. package/dist/components/Form/index.d.ts +14 -19
  32. package/dist/components/Form/index.js +320 -284
  33. package/dist/components/Form/index.js.map +1 -1
  34. package/dist/components/_util/arrays.js.map +1 -1
  35. package/dist/components/_util/browser.js.map +1 -1
  36. package/dist/components/_util/dom/aria.js.map +1 -1
  37. package/dist/components/_util/dom/element.js.map +1 -1
  38. package/dist/components/_util/dom/event.js.map +1 -1
  39. package/dist/components/_util/dom/position.js.map +1 -1
  40. package/dist/components/_util/dom/scroll.js.map +1 -1
  41. package/dist/components/_util/dom/style.js.map +1 -1
  42. package/dist/components/_util/easings.js.map +1 -1
  43. package/dist/components/_util/error.js.map +1 -1
  44. package/dist/components/_util/i18n.js.map +1 -1
  45. package/dist/components/_util/objects.js.map +1 -1
  46. package/dist/components/_util/raf.js.map +1 -1
  47. package/dist/components/_util/rand.js.map +1 -1
  48. package/dist/components/_util/strings.js.map +1 -1
  49. package/dist/components/_util/throttleByRaf.js.map +1 -1
  50. package/dist/components/_util/types.js.map +1 -1
  51. package/dist/components/_util/typescript.js.map +1 -1
  52. package/dist/components/_util/vue/global-node.js.map +1 -1
  53. package/dist/components/_util/vue/icon.js.map +1 -1
  54. package/dist/components/_util/vue/install.js.map +1 -1
  55. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  56. package/dist/components/_util/vue/refs.js.map +1 -1
  57. package/dist/components/_util/vue/size.js.map +1 -1
  58. package/dist/components/_util/vue/validator.js.map +1 -1
  59. package/dist/components/_util/vue/vnode.js.map +1 -1
  60. package/dist/components/index.d.ts +1 -0
  61. package/dist/components/index.js.map +1 -1
  62. package/dist/components/types.d.ts +11 -0
  63. package/dist/components/types.js +2 -0
  64. package/dist/components/types.js.map +1 -0
  65. package/dist/index.css +1 -1
  66. package/dist/version/version.d.ts +1 -1
  67. package/dist/version/version.js +1 -1
  68. package/dist/version/version.js.map +1 -1
  69. package/package.json +6 -3
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
1
+ # Vue 3 + TypeScript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
@@ -1,17 +1,9 @@
1
1
  import { Ref } from 'vue';
2
- export interface CodeItem {
3
- value: string;
4
- content: string;
5
- }
6
- export type CascadeSysCodeItem = {
7
- value: string;
8
- content: string;
9
- parent?: string;
10
- };
2
+ import { CodeData } from '../components/types';
11
3
  export interface ThroneType {
12
4
  hasAuth: (authId: string) => boolean | null;
13
5
  getIcon: (iconId: string) => () => unknown;
14
- getCode: (codeName: string) => Ref<Array<CodeItem>>;
6
+ getCode: (codeName: string) => Ref<CodeData>;
15
7
  impl: (throne: Partial<ThroneType>) => void;
16
8
  }
17
9
  declare const Throne: ThroneType;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/Throne/index.ts"],"sourcesContent":["import OrionError from '../error/OrionError'\r\nimport type { Ref } from 'vue'\r\n\r\nexport interface CodeItem {\r\n value: string\r\n content: string\r\n}\r\n\r\nexport type CascadeSysCodeItem = {\r\n value: string\r\n content: string\r\n parent?: string\r\n}\r\n\r\nexport interface ThroneType {\r\n hasAuth: (authId: string) => boolean | null\r\n getIcon: (iconId: string) => () => unknown\r\n getCode: (codeName: string) => Ref<Array<CodeItem>>\r\n impl: (throne: Partial<ThroneType>) => void\r\n}\r\n\r\nlet hasAuth: ThroneType['hasAuth'] = () => {\r\n throw new OrionError(`Throne.hasAuth not configured!`)\r\n}\r\n\r\nlet getIcon: ThroneType['getIcon'] = (iconId) => {\r\n throw new OrionError(`Throne.getIcon not configured!`)\r\n}\r\n\r\nlet getCode: ThroneType['getCode'] = (codeName) => {\r\n throw new OrionError(`Throne.getCode not configured!`)\r\n}\r\n\r\nconst Throne: ThroneType = {\r\n hasAuth: (authId) => {\r\n return hasAuth(authId)\r\n },\r\n getIcon: (iconId) => {\r\n return getIcon(iconId)\r\n },\r\n getCode: (codeName) => {\r\n return getCode(codeName)\r\n },\r\n impl: (throne) => {\r\n if (throne.hasAuth) {\r\n hasAuth = throne.hasAuth\r\n }\r\n\r\n if (throne.getIcon) {\r\n getIcon = throne.getIcon\r\n }\r\n\r\n if (throne.getCode) {\r\n getCode = throne.getCode\r\n }\r\n },\r\n}\r\n\r\nexport default Throne\r\n"],"names":["hasAuth","OrionError","getIcon","iconId","getCode","codeName","Throne","authId","throne"],"mappings":";AAqBA,IAAIA,IAAiC,MAAM;AACnC,QAAA,IAAIC,EAAW,gCAAgC;AACvD,GAEIC,IAAiC,CAACC,MAAW;AACzC,QAAA,IAAIF,EAAW,gCAAgC;AACvD,GAEIG,IAAiC,CAACC,MAAa;AAC3C,QAAA,IAAIJ,EAAW,gCAAgC;AACvD;AAEA,MAAMK,IAAqB;AAAA,EACzB,SAAS,CAACC,MACDP,EAAQO,CAAM;AAAA,EAEvB,SAAS,CAACJ,MACDD,EAAQC,CAAM;AAAA,EAEvB,SAAS,CAACE,MACDD,EAAQC,CAAQ;AAAA,EAEzB,MAAM,CAACG,MAAW;AAChB,IAAIA,EAAO,YACTR,IAAUQ,EAAO,UAGfA,EAAO,YACTN,IAAUM,EAAO,UAGfA,EAAO,YACTJ,IAAUI,EAAO;AAAA,EAErB;AACF;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/Throne/index.ts"],"sourcesContent":["import OrionError from '../error/OrionError'\r\nimport type { Ref } from 'vue'\r\n\r\nimport type { CodeData } from '../components/types'\r\n\r\nexport interface ThroneType {\r\n hasAuth: (authId: string) => boolean | null\r\n getIcon: (iconId: string) => () => unknown\r\n getCode: (codeName: string) => Ref<CodeData>\r\n impl: (throne: Partial<ThroneType>) => void\r\n}\r\n\r\nlet hasAuth: ThroneType['hasAuth'] = () => {\r\n throw new OrionError(`Throne.hasAuth not configured!`)\r\n}\r\n\r\nlet getIcon: ThroneType['getIcon'] = (iconId) => {\r\n throw new OrionError(`Throne.getIcon not configured!`)\r\n}\r\n\r\nlet getCode: ThroneType['getCode'] = (codeName) => {\r\n throw new OrionError(`Throne.getCode not configured!`)\r\n}\r\n\r\nconst Throne: ThroneType = {\r\n hasAuth: (authId) => {\r\n return hasAuth(authId)\r\n },\r\n getIcon: (iconId) => {\r\n return getIcon(iconId)\r\n },\r\n getCode: (codeName) => {\r\n return getCode(codeName)\r\n },\r\n impl: (throne) => {\r\n if (throne.hasAuth) {\r\n hasAuth = throne.hasAuth\r\n }\r\n\r\n if (throne.getIcon) {\r\n getIcon = throne.getIcon\r\n }\r\n\r\n if (throne.getCode) {\r\n getCode = throne.getCode\r\n }\r\n },\r\n}\r\n\r\nexport default Throne\r\n"],"names":["hasAuth","OrionError","getIcon","iconId","getCode","codeName","Throne","authId","throne"],"mappings":";AAYA,IAAIA,IAAiC,MAAM;AACnC,QAAA,IAAIC,EAAW,gCAAgC;AACvD,GAEIC,IAAiC,CAACC,MAAW;AACzC,QAAA,IAAIF,EAAW,gCAAgC;AACvD,GAEIG,IAAiC,CAACC,MAAa;AAC3C,QAAA,IAAIJ,EAAW,gCAAgC;AACvD;AAEA,MAAMK,IAAqB;AAAA,EACzB,SAAS,CAACC,MACDP,EAAQO,CAAM;AAAA,EAEvB,SAAS,CAACJ,MACDD,EAAQC,CAAM;AAAA,EAEvB,SAAS,CAACE,MACDD,EAAQC,CAAQ;AAAA,EAEzB,MAAM,CAACG,MAAW;AAChB,IAAIA,EAAO,YACTR,IAAUQ,EAAO,UAGfA,EAAO,YACTN,IAAUM,EAAO,UAGfA,EAAO,YACTJ,IAAUI,EAAO;AAAA,EAErB;AACF;"}
@@ -1,2 +1,16 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ declare function __VLS_template(): {
2
+ slots: {
3
+ default?(_: {}): any;
4
+ };
5
+ refs: {};
6
+ attrs: Partial<{}>;
7
+ };
8
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
11
  export default _default;
12
+ type __VLS_WithTemplateSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,4 @@
1
+ export interface ButtonGroupProps {
2
+ gutter?: boolean | string;
3
+ align?: 'left' | 'center' | 'right';
4
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ButtonGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { ButtonGroupProps } from './ButtonGroup';
2
+ declare function __VLS_template(): {
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ attrs: Partial<{}>;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1 @@
1
+ export * from './ButtonGroup';
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,21 @@
1
- declare const _default: import('../_util').SFCWithInstall<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>> & {};
1
+ import { default as ButtonGroup } from './ButtonGroup/ButtonGroup.vue';
2
+ declare const _default: import('../_util').SFCWithInstall<{
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{}>, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
4
+ P: {};
5
+ B: {};
6
+ D: {};
7
+ C: {};
8
+ M: {};
9
+ Defaults: {};
10
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
11
+ __isFragment?: never;
12
+ __isTeleport?: never;
13
+ __isSuspense?: never;
14
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
15
+ $slots: {
16
+ default?(_: {}): any;
17
+ };
18
+ })> & {
19
+ ButtonGroup: typeof ButtonGroup;
20
+ };
2
21
  export default _default;
@@ -1,27 +1,45 @@
1
1
  import "lodash-es";
2
- import { defineComponent as u, onMounted as c, openBlock as s, createBlock as p, unref as _, withCtx as a, createTextVNode as l } from "vue";
3
- import { withInstall as m } from "../_util/vue/install.js";
4
- import { ElButton as d } from "element-plus";
5
- const f = /* @__PURE__ */ u({
2
+ import { defineComponent as r, openBlock as n, createBlock as p, unref as u, withCtx as l, renderSlot as a, computed as m, createElementBlock as s, normalizeStyle as i, createVNode as c } from "vue";
3
+ import { withInstall as f } from "../_util/vue/install.js";
4
+ import { ElButton as _ } from "element-plus";
5
+ import { S as d } from "../../index-BbsXWo7C.js";
6
+ const g = /* @__PURE__ */ r({
6
7
  name: "OButton",
7
8
  __name: "Button",
8
9
  setup(o) {
9
- return c(() => {
10
- console.log("Button onMounted1");
11
- }), (n, t) => (s(), p(_(d), null, {
12
- default: a(() => t[0] || (t[0] = [
13
- l("XX")
14
- ])),
15
- _: 1
10
+ return (t, e) => (n(), p(u(_), null, {
11
+ default: l(() => [
12
+ a(t.$slots, "default")
13
+ ]),
14
+ _: 3
16
15
  }));
17
16
  }
18
- }), i = (o, n) => {
19
- const t = o.__vccOpts || o;
20
- for (const [e, r] of n)
21
- t[e] = r;
22
- return t;
23
- }, B = /* @__PURE__ */ i(f, [["__scopeId", "data-v-e59d2724"]]), w = m(B);
17
+ }), B = /* @__PURE__ */ r({
18
+ name: "OButtongroup",
19
+ __name: "ButtonGroup",
20
+ props: {
21
+ gutter: { type: [Boolean, String] },
22
+ align: { default: "right" }
23
+ },
24
+ setup(o) {
25
+ const t = m(() => ({
26
+ textAlign: o.align
27
+ }));
28
+ return (e, h) => (n(), s("div", {
29
+ style: i(t.value)
30
+ }, [
31
+ c(u(d), { gutter: e.gutter }, {
32
+ default: l(() => [
33
+ a(e.$slots, "default")
34
+ ]),
35
+ _: 3
36
+ }, 8, ["gutter"])
37
+ ], 4));
38
+ }
39
+ }), v = f(g, {
40
+ ButtonGroup: B
41
+ });
24
42
  export {
25
- w as default
43
+ v as default
26
44
  };
27
45
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Button/Button.vue","../../../src/components/Button/index.ts"],"sourcesContent":["<template>\r\n <el-button>XX</el-button>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { onMounted } from 'vue'\r\n\r\nimport { ElButton } from 'element-plus'\r\n\r\ndefineOptions({ name: 'OButton' })\r\n\r\nonMounted(() => {\r\n console.log('Button onMounted1')\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.app {\r\n p {\r\n font-size: 32px;\r\n color: aqua;\r\n }\r\n button {\r\n color: red;\r\n }\r\n}\r\n</style>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Button from './Button.vue'\r\n\r\nexport default withInstall<typeof Button, {}>(Button)\r\n"],"names":["onMounted","index","withInstall","Button"],"mappings":";;;;;;;;AAUA,WAAAA,EAAU,MAAM;AACd,cAAQ,IAAI,mBAAmB;AAAA,IAAA,CAChC;;;;;;;;;;;;iECRcC,IAAAC,EAA+BC,CAAM;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Button/ButtonGroup/ButtonGroup.vue","../../../src/components/Button/index.ts"],"sourcesContent":["<template>\r\n <div :style=\"style\">\r\n <space :gutter=\"gutter\"> <slot></slot> </space>\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, CSSProperties } from 'vue'\r\nimport type { ButtonGroupProps } from './ButtonGroup'\r\nimport Space from '../../Space'\r\n\r\ndefineOptions({ name: 'OButtongroup' })\r\n\r\nconst { gutter, align = 'right' } = defineProps<ButtonGroupProps>()\r\nconst style = computed<CSSProperties>(() => {\r\n return {\r\n textAlign: align\r\n }\r\n})\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Button from './Button.vue'\r\nimport ButtonGroup from './ButtonGroup/ButtonGroup.vue'\r\n\r\nexport default withInstall<typeof Button, { ButtonGroup: typeof ButtonGroup }>(Button, {\r\n ButtonGroup\r\n})\r\n"],"names":["style","computed","__props","index","withInstall","Button","ButtonGroup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAcM,UAAAA,IAAQC,EAAwB,OAC7B;AAAA,MACL,WAAWC;MAEd;;;;;;;;;;;;ICbcC,IAAAC,EAAgEC,GAAQ;AAAA,EAAA,aACrFC;AACF,CAAC;"}
@@ -4,7 +4,6 @@ export interface CheckboxProps {
4
4
  label?: string;
5
5
  span?: number;
6
6
  labelWidth?: string | number;
7
- required?: boolean;
8
7
  rules?: Arrayable<FormItemRule>;
9
8
  disabled?: boolean;
10
9
  }
@@ -0,0 +1,9 @@
1
+ import { FormItemRule, Arrayable } from '../Form';
2
+ export interface DiyItemProps {
3
+ name: string;
4
+ label?: string;
5
+ span?: number;
6
+ labelWidth?: string | number;
7
+ required?: boolean;
8
+ rules?: Arrayable<FormItemRule>;
9
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=DiyItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiyItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { DiyItemProps } from './DiyItem';
2
+ declare function __VLS_template(): {
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ attrs: Partial<{}>;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<DiyItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DiyItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1 @@
1
+ export * from './DiyItem';
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { FileInputProps } from './FileInput';
2
2
  declare const _default: import('vue').DefineComponent<FileInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FileInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
3
- fileRef: ({
3
+ inputRef: ({
4
4
  $: import('vue').ComponentInternalInstance;
5
5
  $data: {};
6
6
  $props: Partial<{
@@ -164,7 +164,7 @@ declare const _default: import('vue').DefineComponent<FileInputProps, {}, {}, {}
164
164
  $root: import('vue').ComponentPublicInstance | null;
165
165
  $parent: import('vue').ComponentPublicInstance | null;
166
166
  $host: Element | null;
167
- $emit: ((event: "input", value: string) => void) & ((event: "clear") => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void);
167
+ $emit: ((event: "input", value: string) => void) & ((event: "clear") => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "change", value: string) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void);
168
168
  $el: any;
169
169
  $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
170
170
  readonly ariaLabel: StringConstructor;
@@ -9,13 +9,16 @@ export interface FormProps {
9
9
  itemSpan?: number;
10
10
  itemLabelWidth?: string | number;
11
11
  disabled?: boolean;
12
+ modelValue: Record<string, any>;
12
13
  }
13
14
  export interface FormExpose {
14
15
  validate: () => Promise<boolean>;
15
16
  }
16
17
  export interface FormContext {
17
- model: Record<string, any>;
18
+ modelValue: Record<string, any>;
19
+ updateModelValue: (name: string, value: any) => void;
18
20
  rules?: FormRules;
19
21
  itemSpan: number;
22
+ disabled?: boolean;
20
23
  }
21
24
  export declare const formContextKey: InjectionKey<FormContext>;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../src/components/Form/Form.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\r\nimport type { FormRules as ElFormRules, FormItemRule as ElFormItemRule } from 'element-plus'\r\nimport type { Arrayable as ElArrayable } from 'element-plus/es/utils/typescript'\r\n\r\nexport type FormRules = ElFormRules\r\nexport type FormItemRule = ElFormItemRule\r\nexport type Arrayable<T> = ElArrayable<T>\r\n\r\nexport interface FormProps {\r\n rules?: FormRules\r\n itemSpan?: number\r\n itemLabelWidth?: string | number\r\n disabled?: boolean\r\n}\r\n\r\nexport interface FormExpose {\r\n validate: () => Promise<boolean>\r\n}\r\n\r\nexport interface FormContext {\r\n model: Record<string, any>\r\n rules?: FormRules\r\n itemSpan: number\r\n}\r\n\r\nexport const formContextKey: InjectionKey<FormContext> = Symbol('formContextKey')\r\n"],"names":["formContextKey"],"mappings":"AAyBa,MAAAA,IAA4C,OAAO,gBAAgB;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../src/components/Form/Form.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\r\nimport type { FormRules as ElFormRules, FormItemRule as ElFormItemRule } from 'element-plus'\r\nimport type { Arrayable as ElArrayable } from 'element-plus/es/utils/typescript'\r\n\r\nexport type FormRules = ElFormRules\r\nexport type FormItemRule = ElFormItemRule\r\nexport type Arrayable<T> = ElArrayable<T>\r\n\r\nexport interface FormProps {\r\n rules?: FormRules\r\n itemSpan?: number\r\n itemLabelWidth?: string | number\r\n disabled?: boolean\r\n modelValue: Record<string, any>\r\n}\r\n\r\nexport interface FormExpose {\r\n validate: () => Promise<boolean>\r\n}\r\n\r\nexport interface FormContext {\r\n modelValue: Record<string, any>\r\n updateModelValue: (name: string, value: any) => void\r\n rules?: FormRules\r\n itemSpan: number\r\n disabled?: boolean\r\n}\r\n\r\nexport const formContextKey: InjectionKey<FormContext> = Symbol('formContextKey')\r\n"],"names":["formContextKey"],"mappings":"AA4Ba,MAAAA,IAA4C,OAAO,gBAAgB;"}
@@ -1,14 +1,10 @@
1
1
  import { FormProps } from './Form';
2
- declare let __VLS_typeProps: FormProps;
3
- type __VLS_PublicProps = {
4
- modelValue?: Record<string, any>;
5
- } & typeof __VLS_typeProps;
6
2
  declare function __VLS_template(): {
7
3
  slots: {
8
4
  default?(_: {}): any;
9
5
  };
10
6
  refs: {
11
- formRef: ({
7
+ form: ({
12
8
  $: import('vue').ComponentInternalInstance;
13
9
  $data: {};
14
10
  $props: Partial<{
@@ -230,14 +226,14 @@ declare function __VLS_template(): {
230
226
  attrs: Partial<{}>;
231
227
  };
232
228
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
233
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
229
+ declare const __VLS_component: import('vue').DefineComponent<FormProps, {
234
230
  validate: () => Promise<boolean>;
235
231
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
236
- "update:modelValue": (modelValue: Record<string, any>) => any;
237
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
238
- "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
232
+ "update:modelValue": (...args: any[]) => void;
233
+ }, string, import('vue').PublicProps, Readonly<FormProps> & Readonly<{
234
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
239
235
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
240
- formRef: ({
236
+ form: ({
241
237
  $: import('vue').ComponentInternalInstance;
242
238
  $data: {};
243
239
  $props: Partial<{
@@ -4,7 +4,6 @@ export interface SwitchProps {
4
4
  label?: string;
5
5
  span?: number;
6
6
  labelWidth?: string | number;
7
- required?: boolean;
8
7
  rules?: Arrayable<FormItemRule>;
9
8
  disabled?: boolean;
10
9
  }
@@ -1,7 +1,9 @@
1
- import { CodeItem } from '../../../Throne';
2
1
  declare const useFormContext: () => import('..').FormContext | undefined;
3
2
  declare const useFormSpan: () => import('vue').ComputedRef<number>;
4
3
  declare const useFormRules: () => import('vue').ComputedRef<import('element-plus').FormItemRule[]>;
5
4
  declare const useFormDisabled: () => import('vue').ComputedRef<boolean>;
6
5
  declare const useFormCode: () => import('vue').ComputedRef<CodeItem[]>;
7
- export { useFormContext, useFormSpan, useFormRules, useFormDisabled, useFormCode };
6
+ declare const useFormDirectModel: () => import('vue').WritableComputedRef<string, string>;
7
+ declare const useFormMultiModel: () => import('vue').WritableComputedRef<string[], string[]>;
8
+ declare const useFormBooleanModel: () => import('vue').WritableComputedRef<boolean, boolean>;
9
+ export { useFormContext, useFormSpan, useFormRules, useFormDisabled, useFormCode, useFormDirectModel, useFormMultiModel, useFormBooleanModel };
@@ -1,44 +1,81 @@
1
- import { inject as p, getCurrentInstance as s, computed as n } from "vue";
1
+ import { inject as x, getCurrentInstance as s, computed as n } from "vue";
2
2
  import { formContextKey as C } from "../Form.js";
3
- import b from "../../../Throne/index.js";
4
- import { castArray as i, isString as g, isArray as x } from "lodash-es";
5
- import { formContextKey as y } from "element-plus";
6
- import l from "../../../error/OrionError.js";
7
- const f = () => p(C), O = () => {
8
- const e = f(), { props: o } = s();
9
- return n(() => o.span ? o.span : e.itemSpan);
10
- }, R = () => {
11
- const e = f(), { props: o } = s(), { name: r, label: m, required: a } = o;
12
- return n(() => {
13
- const t = [];
14
- let u = !0;
15
- return a && (o.rules && (t.push(...i(o.rules)), u = !t.some((c) => Object.keys(c).includes("required"))), e.rules && e.rules[r] && (u = !i(e.rules[r]).some((d) => Object.keys(d).includes("required")))), u && t.push({
3
+ import M from "../../../Throne/index.js";
4
+ import { castArray as p, isString as V, isArray as F } from "lodash-es";
5
+ import f from "../../../error/OrionError.js";
6
+ const u = () => x(C), q = () => {
7
+ const e = u(), { props: r } = s();
8
+ return n(() => r.span ? r.span : e.itemSpan);
9
+ }, v = () => {
10
+ const e = u(), { props: r, type: t } = s(), { name: o, label: l, required: c } = r;
11
+ let d = "change";
12
+ return t.extendOptions && t.extendOptions.trigger && (d = t.extendOptions.trigger), n(() => {
13
+ const i = [];
14
+ let a = !0;
15
+ return c && (r.rules && (i.push(...p(r.rules)), a = !i.some((m) => Object.keys(m).includes("required"))), e.rules && e.rules[o] && (a = !p(e.rules[o]).some((g) => Object.keys(g).includes("required")))), a && i.push({
16
16
  required: !0,
17
- message: `必填项[${m || r}]不能为空`,
18
- trigger: "blur"
19
- }), t;
17
+ message: `必填项[${l || o}]不能为空`,
18
+ trigger: d
19
+ }), i;
20
20
  });
21
- }, S = () => {
22
- const e = p(y), { props: o } = s(), { disabled: r } = o;
23
- return n(() => e.disabled || r);
24
- }, k = () => {
21
+ }, D = () => {
22
+ const e = u(), { props: r } = s(), { disabled: t } = r;
23
+ return n(() => e.disabled || t);
24
+ }, R = () => {
25
25
  let e;
26
- const { props: o } = s(), { code: r } = o;
27
- if (r)
28
- if (g(r))
29
- e = b.getCode(r).value;
30
- else if (x(r))
31
- e = r;
26
+ const { props: r } = s(), { code: t } = r;
27
+ if (t)
28
+ if (V(t))
29
+ e = M.getCode(t).value;
30
+ else if (F(t))
31
+ e = t;
32
32
  else
33
- throw new l("code类型错误");
34
- else throw new l("code为空");
33
+ throw new f("code类型错误");
34
+ else throw new f("code为空");
35
35
  return n(() => e);
36
+ }, S = () => {
37
+ const e = u(), { props: r } = s(), { name: t } = r;
38
+ return n({
39
+ get: () => {
40
+ const o = e.modelValue[t];
41
+ return o || "";
42
+ },
43
+ set: (o) => {
44
+ o ? e.updateModelValue(t, o) : e.updateModelValue(t, "");
45
+ }
46
+ });
47
+ }, k = () => {
48
+ const e = u(), { props: r } = s(), { name: t } = r;
49
+ return n({
50
+ get: () => {
51
+ const o = e.modelValue[t];
52
+ return o ? o.split(",") : [];
53
+ },
54
+ set: (o) => {
55
+ o ? e.updateModelValue(t, o.join(",")) : e.updateModelValue(t, "");
56
+ }
57
+ });
58
+ }, w = () => {
59
+ const e = u(), { props: r } = s(), { name: t } = r;
60
+ return n({
61
+ get: () => {
62
+ const o = e.modelValue[t];
63
+ return o ? o == "1" : !1;
64
+ },
65
+ set: (o) => {
66
+ const l = e.modelValue[t], c = o ? "1" : "0";
67
+ (l || o) && e.updateModelValue(t, c);
68
+ }
69
+ });
36
70
  };
37
71
  export {
38
- k as useFormCode,
39
- f as useFormContext,
40
- S as useFormDisabled,
41
- R as useFormRules,
42
- O as useFormSpan
72
+ w as useFormBooleanModel,
73
+ R as useFormCode,
74
+ u as useFormContext,
75
+ S as useFormDirectModel,
76
+ D as useFormDisabled,
77
+ k as useFormMultiModel,
78
+ v as useFormRules,
79
+ q as useFormSpan
43
80
  };
44
81
  //# sourceMappingURL=useForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useForm.js","sources":["../../../../src/components/Form/hooks/useForm.ts"],"sourcesContent":["import { inject, getCurrentInstance, computed } from 'vue'\r\nimport { formContextKey, FormItemRule } from '../Form'\r\nimport Throne, { CodeItem } from '../../../Throne'\r\nimport { castArray, isArray, isString } from 'lodash-es'\r\nimport { formContextKey as elFormContextKey } from 'element-plus'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nconst useFormContext = () => {\r\n return inject(formContextKey)\r\n}\r\n\r\nconst useFormSpan = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n\r\n return computed(() => (props.span ? (props.span as number) : formContext.itemSpan))\r\n}\r\n\r\nconst useFormRules = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { name, label, required } = props\r\n\r\n return computed(() => {\r\n const rules: FormItemRule[] = []\r\n let flag = true\r\n\r\n if (required) {\r\n if (props.rules) {\r\n rules.push(...castArray(props.rules))\r\n flag = !rules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n if (formContext.rules && formContext.rules[name as string]) {\r\n const formRules = castArray(formContext.rules[name as string])\r\n flag = !formRules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n }\r\n\r\n if (flag) {\r\n rules.push({\r\n required: true,\r\n message: `必填项[${label ? label : name}]不能为空`,\r\n trigger: 'blur'\r\n })\r\n }\r\n\r\n return rules\r\n })\r\n}\r\n\r\nconst useFormDisabled = () => {\r\n const elForm = inject(elFormContextKey)!\r\n const { props } = getCurrentInstance()!\r\n const { disabled } = props\r\n return computed(() => elForm.disabled || (disabled as boolean))\r\n}\r\n\r\nconst useFormCode = () => {\r\n let codeData: Array<CodeItem>\r\n const { props } = getCurrentInstance()!\r\n const { code } = props\r\n if (!code) {\r\n throw new OrionError('code为空')\r\n } else if (isString(code)) {\r\n codeData = Throne.getCode(code).value\r\n } else if (isArray<CodeItem>(code)) {\r\n codeData = code\r\n } else {\r\n throw new OrionError('code类型错误')\r\n }\r\n return computed(() => codeData)\r\n}\r\n\r\nexport { useFormContext, useFormSpan, useFormRules, useFormDisabled, useFormCode }\r\n"],"names":["useFormContext","inject","formContextKey","useFormSpan","formContext","props","getCurrentInstance","computed","useFormRules","name","label","required","rules","flag","castArray","rule","useFormDisabled","elForm","elFormContextKey","disabled","useFormCode","codeData","code","isString","Throne","isArray","OrionError"],"mappings":";;;;;;AAOA,MAAMA,IAAiB,MACdC,EAAOC,CAAc,GAGxBC,IAAc,MAAM;AACxB,QAAMC,IAAcJ,KACd,EAAE,OAAAK,MAAUC;AAElB,SAAOC,EAAS,MAAOF,EAAM,OAAQA,EAAM,OAAkBD,EAAY,QAAS;AACpF,GAEMI,IAAe,MAAM;AACzB,QAAMJ,IAAcJ,KACd,EAAE,OAAAK,MAAUC,KACZ,EAAE,MAAAG,GAAM,OAAAC,GAAO,UAAAC,EAAA,IAAaN;AAElC,SAAOE,EAAS,MAAM;AACpB,UAAMK,IAAwB,CAAA;AAC9B,QAAIC,IAAO;AAEX,WAAIF,MACEN,EAAM,UACRO,EAAM,KAAK,GAAGE,EAAUT,EAAM,KAAK,CAAC,GAC7BQ,IAAA,CAACD,EAAM,KAAK,CAACG,MAAS,OAAO,KAAKA,CAAI,EAAE,SAAS,UAAU,CAAC,IAEjEX,EAAY,SAASA,EAAY,MAAMK,CAAc,MAEhDI,IAAA,CADWC,EAAUV,EAAY,MAAMK,CAAc,CAAC,EAC3C,KAAK,CAACM,MAAS,OAAO,KAAKA,CAAI,EAAE,SAAS,UAAU,CAAC,KAIvEF,KACFD,EAAM,KAAK;AAAA,MACT,UAAU;AAAA,MACV,SAAS,OAAOF,KAAgBD,CAAI;AAAA,MACpC,SAAS;AAAA,IAAA,CACV,GAGIG;AAAA,EAAA,CACR;AACH,GAEMI,IAAkB,MAAM;AACtB,QAAAC,IAAShB,EAAOiB,CAAgB,GAChC,EAAE,OAAAb,MAAUC,KACZ,EAAE,UAAAa,EAAa,IAAAd;AACrB,SAAOE,EAAS,MAAMU,EAAO,YAAaE,CAAoB;AAChE,GAEMC,IAAc,MAAM;AACpB,MAAAC;AACE,QAAA,EAAE,OAAAhB,MAAUC,KACZ,EAAE,MAAAgB,EAAS,IAAAjB;AACjB,MAAKiB;AAEL,QAAWC,EAASD,CAAI;AACX,MAAAD,IAAAG,EAAO,QAAQF,CAAI,EAAE;AAAA,aACvBG,EAAkBH,CAAI;AACpB,MAAAD,IAAAC;AAAA;AAEL,YAAA,IAAII,EAAW,UAAU;AAAA,MANzB,OAAA,IAAIA,EAAW,QAAQ;AAQxB,SAAAnB,EAAS,MAAMc,CAAQ;AAChC;"}
1
+ {"version":3,"file":"useForm.js","sources":["../../../../src/components/Form/hooks/useForm.ts"],"sourcesContent":["import { inject, getCurrentInstance, computed } from 'vue'\r\nimport { formContextKey, FormItemRule } from '../Form'\r\nimport Throne, { CodeItem } from '../../../Throne'\r\nimport { castArray, isArray, isDate, isString } from 'lodash-es'\r\nimport OrionError from '../../../error/OrionError'\r\nimport dayjs from 'dayjs'\r\n\r\nconst useFormContext = () => {\r\n return inject(formContextKey)\r\n}\r\n\r\nconst useFormSpan = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n\r\n return computed(() => (props.span ? (props.span as number) : formContext.itemSpan))\r\n}\r\n\r\nconst useFormRules = () => {\r\n const formContext = useFormContext()!\r\n const { props, type } = getCurrentInstance()!\r\n const { name, label, required } = props\r\n let trigger = 'change'\r\n if (type['extendOptions'] && type['extendOptions']['trigger']) {\r\n trigger = type['extendOptions']['trigger']\r\n }\r\n\r\n return computed(() => {\r\n const rules: FormItemRule[] = []\r\n let flag = true\r\n\r\n if (required) {\r\n if (props.rules) {\r\n rules.push(...castArray(props.rules))\r\n flag = !rules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n if (formContext.rules && formContext.rules[name as string]) {\r\n const formRules = castArray(formContext.rules[name as string])\r\n flag = !formRules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n }\r\n\r\n if (flag) {\r\n rules.push({\r\n required: true,\r\n message: `必填项[${label ? label : name}]不能为空`,\r\n trigger: trigger\r\n })\r\n }\r\n\r\n return rules\r\n })\r\n}\r\n\r\nconst useFormDisabled = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { disabled } = props\r\n return computed(() => formContext.disabled || (disabled as boolean))\r\n}\r\n\r\nconst useFormCode = () => {\r\n let codeData: Array<CodeItem>\r\n const { props } = getCurrentInstance()!\r\n const { code } = props\r\n if (!code) {\r\n throw new OrionError('code为空')\r\n } else if (isString(code)) {\r\n codeData = Throne.getCode(code).value\r\n } else if (isArray<CodeItem>(code)) {\r\n codeData = code\r\n } else {\r\n throw new OrionError('code类型错误')\r\n }\r\n return computed(() => codeData)\r\n}\r\n\r\nconst useFormDirectModel = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { name } = props\r\n\r\n return computed<string>({\r\n get: () => {\r\n const value = formContext.modelValue[name as string]\r\n if (!value) {\r\n return ''\r\n }\r\n return value as string\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n formContext.updateModelValue(name as string, '')\r\n } else {\r\n formContext.updateModelValue(name as string, newValue)\r\n }\r\n }\r\n })\r\n}\r\n\r\nconst useFormMultiModel = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { name } = props\r\n\r\n return computed<string[]>({\r\n get: () => {\r\n const value = formContext.modelValue[name as string]\r\n if (!value) {\r\n return []\r\n }\r\n return (value as string).split(',')\r\n },\r\n set: (newValue) => {\r\n if (!newValue) {\r\n formContext.updateModelValue(name as string, '')\r\n } else {\r\n formContext.updateModelValue(name as string, newValue.join(','))\r\n }\r\n }\r\n })\r\n}\r\n\r\nconst useFormBooleanModel = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { name } = props\r\n\r\n return computed<boolean>({\r\n get: () => {\r\n const value = formContext.modelValue[name as string]\r\n if (!value) {\r\n return false\r\n }\r\n return (value as string) == '1'\r\n },\r\n set: (_newValue) => {\r\n const oldValue = formContext.modelValue[name as string]\r\n const newValue = _newValue ? '1' : '0'\r\n if (oldValue) {\r\n formContext.updateModelValue(name as string, newValue)\r\n } else {\r\n if (_newValue) {\r\n formContext.updateModelValue(name as string, newValue)\r\n }\r\n }\r\n }\r\n })\r\n}\r\n\r\nexport {\r\n useFormContext,\r\n useFormSpan,\r\n useFormRules,\r\n useFormDisabled,\r\n useFormCode,\r\n useFormDirectModel,\r\n useFormMultiModel,\r\n useFormBooleanModel\r\n}\r\n"],"names":["useFormContext","inject","formContextKey","useFormSpan","formContext","props","getCurrentInstance","computed","useFormRules","type","name","label","required","trigger","rules","flag","castArray","rule","useFormDisabled","disabled","useFormCode","codeData","code","isString","Throne","isArray","OrionError","useFormDirectModel","value","newValue","useFormMultiModel","useFormBooleanModel","_newValue","oldValue"],"mappings":"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"}
@@ -10,21 +10,18 @@ import { default as Switch } from './Switch/Switch.vue';
10
10
  import { default as DateInput } from './DateInput/DateInput.vue';
11
11
  import { default as FileInput } from './FileInput/FileInput.vue';
12
12
  import { default as ButtonGroup } from './ButtonGroup/ButtonGroup.vue';
13
+ import { default as DiyItem } from './DiyItem/DiyItem.vue';
13
14
  declare const _default: import('../_util').SFCWithInstall<{
14
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
15
- modelValue?: Record<string, any>;
16
- } & import('./Form').FormProps> & Readonly<{
17
- "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
15
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./Form').FormProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
18
17
  }>, {
19
18
  validate: () => Promise<boolean>;
20
19
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
- "update:modelValue": (modelValue: Record<string, any>) => any;
22
- }, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{
23
- modelValue?: Record<string, any>;
24
- } & import('./Form').FormProps> & Readonly<{
25
- "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
20
+ "update:modelValue": (...args: any[]) => void;
21
+ }, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('./Form').FormProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
26
23
  }>, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
27
- formRef: ({
24
+ form: ({
28
25
  $: import('vue').ComponentInternalInstance;
29
26
  $data: {};
30
27
  $props: Partial<{
@@ -249,24 +246,20 @@ declare const _default: import('../_util').SFCWithInstall<{
249
246
  C: {};
250
247
  M: {};
251
248
  Defaults: {};
252
- }, Readonly<{
253
- modelValue?: Record<string, any>;
254
- } & import('./Form').FormProps> & Readonly<{
255
- "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
249
+ }, Readonly<import('./Form').FormProps> & Readonly<{
250
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
256
251
  }>, {
257
252
  validate: () => Promise<boolean>;
258
253
  }, {}, {}, {}, {}>;
259
254
  __isFragment?: never;
260
255
  __isTeleport?: never;
261
256
  __isSuspense?: never;
262
- } & import('vue').ComponentOptionsBase<Readonly<{
263
- modelValue?: Record<string, any>;
264
- } & import('./Form').FormProps> & Readonly<{
265
- "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
257
+ } & import('vue').ComponentOptionsBase<Readonly<import('./Form').FormProps> & Readonly<{
258
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
266
259
  }>, {
267
260
  validate: () => Promise<boolean>;
268
261
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
269
- "update:modelValue": (modelValue: Record<string, any>) => any;
262
+ "update:modelValue": (...args: any[]) => void;
270
263
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
271
264
  $slots: {
272
265
  default?(_: {}): any;
@@ -284,6 +277,7 @@ declare const _default: import('../_util').SFCWithInstall<{
284
277
  DateInput: typeof DateInput;
285
278
  FileInput: typeof FileInput;
286
279
  ButtonGroup: typeof ButtonGroup;
280
+ DiyItem: typeof DiyItem;
287
281
  };
288
282
  export default _default;
289
283
  export * from './Form';
@@ -299,3 +293,4 @@ export * from './Switch';
299
293
  export * from './DateInput';
300
294
  export * from './FileInput';
301
295
  export * from './ButtonGroup';
296
+ export * from './DiyItem';