@jari-ace/element-plus-component 0.1.0 → 0.1.6

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 (148) hide show
  1. package/README.md +18 -18
  2. package/dist/components/enumPicker/index.d.ts +4 -0
  3. package/dist/components/enumPicker/index.d.ts.map +1 -0
  4. package/dist/components/enumPicker/index.js +4 -0
  5. package/dist/components/enumPicker/index.js.map +1 -0
  6. package/dist/components/enumPicker/src/EnumPicker.vue.d.ts +29 -0
  7. package/dist/components/enumPicker/src/EnumPicker.vue.d.ts.map +1 -0
  8. package/dist/components/enumPicker/src/EnumPicker.vue.js +140 -0
  9. package/dist/components/enumPicker/src/EnumPicker.vue.js.map +1 -0
  10. package/dist/components/form/JaForm.vue.d.ts +23 -126
  11. package/dist/components/form/JaForm.vue.d.ts.map +1 -1
  12. package/dist/components/form/JaForm.vue.js +127 -192
  13. package/dist/components/form/JaForm.vue.js.map +1 -1
  14. package/dist/components/formItem/JaFormItem.vue.d.ts +12 -12
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.d.ts.map +1 -1
  17. package/dist/components/index.js +1 -0
  18. package/dist/components/index.js.map +1 -1
  19. package/dist/components/rolePicker/baseRolePicker.vue.d.ts.map +1 -1
  20. package/dist/components/rolePicker/baseRolePicker.vue.js +1 -0
  21. package/dist/components/rolePicker/baseRolePicker.vue.js.map +1 -1
  22. package/dist/components/userTag/UserInfoTag.vue.d.ts +1 -1
  23. package/dist/hooks/useBackendValidations.d.ts +7 -1
  24. package/dist/hooks/useBackendValidations.d.ts.map +1 -1
  25. package/dist/hooks/useBackendValidations.js +21 -2
  26. package/dist/hooks/useBackendValidations.js.map +1 -1
  27. package/dist/hooks/useBridage.d.ts +3 -3
  28. package/dist/hooks/useBridage.d.ts.map +1 -1
  29. package/dist/hooks/useBridage.js +29 -22
  30. package/dist/hooks/useBridage.js.map +1 -1
  31. package/lib/index.css +1 -1
  32. package/lib/index.js +1437 -1283
  33. package/lib/index.umd.cjs +2 -2
  34. package/package.json +61 -61
  35. package/packages/components/autoComplete/JaAutoComplete.vue +47 -47
  36. package/packages/components/autoComplete/index.ts +5 -5
  37. package/packages/components/avatar/JaAvatar.vue +126 -126
  38. package/packages/components/avatar/avatarToken.ts +11 -11
  39. package/packages/components/avatar/defaultImg.ts +14 -14
  40. package/packages/components/avatar/index.ts +7 -7
  41. package/packages/components/button/JaButton.vue +51 -51
  42. package/packages/components/button/index.ts +4 -4
  43. package/packages/components/channelPicker/index.ts +7 -7
  44. package/packages/components/channelPicker/src/ChannelPicker.vue +43 -43
  45. package/packages/components/channelPicker/src/JaChannelPicker.vue +42 -42
  46. package/packages/components/checkbox/JaCheckbox.vue +73 -73
  47. package/packages/components/checkbox/index.ts +4 -4
  48. package/packages/components/checkboxGroup/JaCheckboxGroup.vue +45 -45
  49. package/packages/components/checkboxGroup/index.ts +4 -4
  50. package/packages/components/customGroupTree/index.ts +10 -10
  51. package/packages/components/customGroupTree/src/customGroupTree.vue +91 -91
  52. package/packages/components/datePicker/JaDatePicker.vue +52 -52
  53. package/packages/components/datePicker/index.ts +4 -4
  54. package/packages/components/departmentPicker/index.ts +4 -4
  55. package/packages/components/departmentPicker/src/DepartmentPicker.vue +107 -107
  56. package/packages/components/departmentPicker/src/consts.ts +2 -2
  57. package/packages/components/departmentTree/index.ts +10 -10
  58. package/packages/components/departmentTree/src/departmentTree.vue +135 -135
  59. package/packages/components/dropdownButton/JaDropdownButton.vue +59 -59
  60. package/packages/components/dropdownButton/index.ts +4 -4
  61. package/packages/components/enumList/EnumListInput.vue +107 -107
  62. package/packages/components/enumList/JaEnumList.vue +39 -39
  63. package/packages/components/enumList/index.ts +7 -7
  64. package/packages/components/enumPicker/index.ts +5 -0
  65. package/packages/components/enumPicker/src/EnumPicker.vue +103 -0
  66. package/packages/components/form/JaForm.vue +186 -126
  67. package/packages/components/form/index.ts +5 -5
  68. package/packages/components/form/types.ts +4 -4
  69. package/packages/components/formItem/JaFormItem.vue +68 -68
  70. package/packages/components/formItem/index.ts +4 -4
  71. package/packages/components/index.ts +34 -33
  72. package/packages/components/input/JaInput.vue +143 -143
  73. package/packages/components/input/index.ts +4 -4
  74. package/packages/components/inputI18n/I18nBundleEditor.vue +76 -76
  75. package/packages/components/inputI18n/InputI18n.vue +142 -142
  76. package/packages/components/inputI18n/JaInputI18n.vue +50 -50
  77. package/packages/components/inputI18n/index.ts +8 -8
  78. package/packages/components/inputNumber/JaInputNumber.vue +98 -98
  79. package/packages/components/inputNumber/index.ts +4 -4
  80. package/packages/components/mapItemList/JaMapItemList.vue +35 -35
  81. package/packages/components/mapItemList/MapItemListInput.vue +191 -191
  82. package/packages/components/mapItemList/index.ts +7 -7
  83. package/packages/components/numberList/JaNumberList.vue +36 -36
  84. package/packages/components/numberList/NumberListInput.vue +111 -111
  85. package/packages/components/numberList/index.ts +7 -7
  86. package/packages/components/properyPicker/JaPropertyPicker.vue +38 -38
  87. package/packages/components/properyPicker/PropertyPicker.vue +314 -314
  88. package/packages/components/properyPicker/index.ts +7 -7
  89. package/packages/components/radioGroup/JaRadioGroup.vue +50 -50
  90. package/packages/components/radioGroup/index.ts +4 -4
  91. package/packages/components/rolePicker/RoleEditor.vue +129 -129
  92. package/packages/components/rolePicker/RolePicker.vue +44 -44
  93. package/packages/components/rolePicker/RolePickerRaw.vue +56 -56
  94. package/packages/components/rolePicker/baseRolePicker.vue +87 -86
  95. package/packages/components/rolePicker/index.ts +10 -10
  96. package/packages/components/scrollbar/Scrollbar.vue +89 -89
  97. package/packages/components/scrollbar/index.ts +5 -5
  98. package/packages/components/scrollbar/utils.ts +17 -17
  99. package/packages/components/select/JaSelect.vue +48 -48
  100. package/packages/components/select/index.ts +4 -4
  101. package/packages/components/stringList/JaStringList.vue +36 -36
  102. package/packages/components/stringList/StringListInput.vue +96 -96
  103. package/packages/components/stringList/index.ts +7 -7
  104. package/packages/components/switch/JaSwitch.vue +50 -50
  105. package/packages/components/switch/index.ts +4 -4
  106. package/packages/components/timePicker/JaTimePicker.vue +52 -52
  107. package/packages/components/timePicker/index.ts +5 -5
  108. package/packages/components/tip/index.ts +4 -4
  109. package/packages/components/tip/src/AceTip.vue +43 -43
  110. package/packages/components/upload/index.ts +6 -6
  111. package/packages/components/upload/src/Upload.vue +25 -25
  112. package/packages/components/upload/src/type.ts +3 -3
  113. package/packages/components/userGroupPicker/index.ts +4 -4
  114. package/packages/components/userGroupPicker/src/UserGroupPicker.vue +94 -94
  115. package/packages/components/userGroupTree/index.ts +10 -10
  116. package/packages/components/userGroupTree/src/userGroupTree.vue +149 -149
  117. package/packages/components/userPicker/index.ts +10 -10
  118. package/packages/components/userPicker/src/CustomGroupManager.vue +189 -189
  119. package/packages/components/userPicker/src/JaUserList.vue +283 -283
  120. package/packages/components/userPicker/src/JaUserPicker.vue +37 -37
  121. package/packages/components/userPicker/src/UserPicker.vue +366 -366
  122. package/packages/components/userSelectDialog/index.ts +6 -6
  123. package/packages/components/userSelectDialog/src/userSelectDialog.vue +447 -447
  124. package/packages/components/userTag/UserInfoTag.vue +397 -397
  125. package/packages/components/userTag/index.ts +6 -6
  126. package/packages/components/userTag/sharedAxios.ts +8 -8
  127. package/packages/directives/auth/index.ts +41 -41
  128. package/packages/directives/autofocus/index.ts +29 -29
  129. package/packages/directives/index.ts +10 -10
  130. package/packages/directives/shortcut/index.ts +192 -192
  131. package/packages/hooks/useAppInstances.ts +34 -34
  132. package/packages/hooks/useBackendValidations.ts +34 -8
  133. package/packages/hooks/useBridage.ts +157 -148
  134. package/packages/hooks/useDateTimeShortCuts.ts +65 -65
  135. package/packages/hooks/useTreeData.ts +45 -45
  136. package/packages/hooks/useUserRefQuery.ts +222 -222
  137. package/packages/index.ts +21 -21
  138. package/packages/list.json +7 -7
  139. package/packages/types/custom.d.ts +13 -13
  140. package/packages/types/window.d.ts +16 -16
  141. package/packages/utils/install.ts +43 -43
  142. package/packages/utils/objectUtils.ts +31 -31
  143. package/theme-style/fonts/iconfont.json +5196 -5196
  144. package/theme-style/index.scss +10 -10
  145. package/theme-style/styles/element-plus-var.scss +1419 -1419
  146. package/theme-style/styles/iconfont.css +2979 -2979
  147. package/theme-style/styles/theme-var.scss +72 -72
  148. package/theme-style/styles/transition.scss +122 -122
package/README.md CHANGED
@@ -1,18 +1,18 @@
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
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
-
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
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
+ ## Recommended IDE Setup
6
+
7
+ - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
+
9
+ ## Type Support For `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
+
15
+ 1. Disable the built-in TypeScript Extension
16
+ 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
+ 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
+ 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
@@ -0,0 +1,4 @@
1
+ import { type SFCWithInstall } from "../../utils/install";
2
+ import EnumPicker from "./src/EnumPicker.vue";
3
+ export declare const JaEnumPicker: SFCWithInstall<typeof EnumPicker>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/enumPicker/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,cAAc,EAAc,MAAM,qBAAqB,CAAC;AACrE,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,OAAO,UAAU,CAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { withInstall } from "../../utils/install";
2
+ import EnumPicker from "./src/EnumPicker.vue";
3
+ export const JaEnumPicker = withInstall(EnumPicker);
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/components/enumPicker/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,WAAW,EAAC,MAAM,qBAAqB,CAAC;AACrE,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,YAAY,GAAsC,WAAW,CAAC,UAAU,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ type KeyFields = 'id' | 'text' | 'value';
2
+ interface ModelValue {
3
+ value?: string;
4
+ text?: string;
5
+ id?: string;
6
+ }
7
+ type __VLS_Props = {
8
+ clearable?: boolean;
9
+ filterable?: boolean;
10
+ keyField?: KeyFields;
11
+ multiple?: boolean;
12
+ name: string;
13
+ serviceName: string;
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & {
16
+ modelValue?: ModelValue[];
17
+ };
18
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: ModelValue[]) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: (value: ModelValue[]) => any;
22
+ }>, {
23
+ multiple: boolean;
24
+ clearable: boolean;
25
+ filterable: boolean;
26
+ keyField: KeyFields;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ export default _default;
29
+ //# sourceMappingURL=EnumPicker.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumPicker.vue.d.ts","sourceRoot":"","sources":["../../../../packages/components/enumPicker/src/EnumPicker.vue"],"names":[],"mappings":"AAiHA,KAAK,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,UAAU,UAAU;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AACD,KAAK,WAAW,GAAG;IACX,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAwEN,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB,CAAC;;;;;;;;;;;AAiFF,wBAQG"}
@@ -0,0 +1,140 @@
1
+ import { computed, ref, watch } from 'vue';
2
+ import { createAxiosWithoutCache } from '@jari-ace/app-bolts';
3
+ import { useEnumApi } from '@jari-ace/app-bolts/src/api/domainModel/enum';
4
+ import { ElOption, ElSelect } from 'element-plus';
5
+ const props = withDefaults(defineProps(), {
6
+ multiple: false,
7
+ clearable: true,
8
+ filterable: true,
9
+ keyField: 'value',
10
+ });
11
+ const enums = ref([]);
12
+ const loading = ref(false);
13
+ const model = defineModel({
14
+ default: () => [],
15
+ });
16
+ const axios = createAxiosWithoutCache();
17
+ const api = useEnumApi(axios);
18
+ async function loadData() {
19
+ if (!props.name || !props.serviceName)
20
+ return;
21
+ loading.value = true;
22
+ api
23
+ .queryByName(props.serviceName, props.name)
24
+ .then((res) => {
25
+ enums.value = res.values;
26
+ })
27
+ .finally(() => {
28
+ loading.value = false;
29
+ });
30
+ }
31
+ const modelValue = computed(() => {
32
+ if (props.multiple) {
33
+ return model.value.map((m) => m[props.keyField]) || [];
34
+ }
35
+ else {
36
+ if (model.value[0] !== undefined) {
37
+ return model.value[0][props.keyField];
38
+ }
39
+ }
40
+ return '';
41
+ });
42
+ const handleChange = (value) => {
43
+ if (typeof value === 'string') {
44
+ const obj = enums.value.find((e) => e[props.keyField] === value);
45
+ model.value = obj ? [obj] : [];
46
+ }
47
+ else {
48
+ model.value = enums.value.filter((e) => value.includes(e[props.keyField]));
49
+ }
50
+ };
51
+ // function filter(queryName: string) {
52
+ // bindingChannels.value = channels.value?.filter(c => c.name.indexOf(queryName) > -1) ?? [];
53
+ // }
54
+ loadData();
55
+ watch(() => props.name, loadData);
56
+ watch(() => props.serviceName, loadData);
57
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
58
+ const __VLS_withDefaultsArg = (function (t) { return t; })({
59
+ multiple: false,
60
+ clearable: true,
61
+ filterable: true,
62
+ keyField: 'value',
63
+ });
64
+ const __VLS_defaults = {
65
+ 'modelValue': () => [],
66
+ };
67
+ const __VLS_modelEmit = defineEmits();
68
+ const __VLS_ctx = {};
69
+ let __VLS_components;
70
+ let __VLS_directives;
71
+ // CSS variable injection
72
+ // CSS variable injection end
73
+ const __VLS_0 = {}.ElSelect;
74
+ /** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.ElSelect, ]} */ ;
75
+ // @ts-ignore
76
+ const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
77
+ ...{ 'onChange': {} },
78
+ modelValue: (__VLS_ctx.modelValue),
79
+ filterable: (props.filterable),
80
+ multiple: (props.multiple),
81
+ clearable: (props.clearable),
82
+ }));
83
+ const __VLS_2 = __VLS_1({
84
+ ...{ 'onChange': {} },
85
+ modelValue: (__VLS_ctx.modelValue),
86
+ filterable: (props.filterable),
87
+ multiple: (props.multiple),
88
+ clearable: (props.clearable),
89
+ }, ...__VLS_functionalComponentArgsRest(__VLS_1));
90
+ let __VLS_4;
91
+ let __VLS_5;
92
+ let __VLS_6;
93
+ const __VLS_7 = {
94
+ onChange: (__VLS_ctx.handleChange)
95
+ };
96
+ __VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.loading) }, null, null);
97
+ var __VLS_8 = {};
98
+ __VLS_3.slots.default;
99
+ for (const [item] of __VLS_getVForSourceType((__VLS_ctx.enums))) {
100
+ const __VLS_9 = {}.ElOption;
101
+ /** @type {[typeof __VLS_components.ElOption, ]} */ ;
102
+ // @ts-ignore
103
+ const __VLS_10 = __VLS_asFunctionalComponent(__VLS_9, new __VLS_9({
104
+ key: (item.id),
105
+ value: (item[props.keyField]),
106
+ label: (item.text),
107
+ }));
108
+ const __VLS_11 = __VLS_10({
109
+ key: (item.id),
110
+ value: (item[props.keyField]),
111
+ label: (item.text),
112
+ }, ...__VLS_functionalComponentArgsRest(__VLS_10));
113
+ }
114
+ var __VLS_3;
115
+ var __VLS_dollars;
116
+ const __VLS_self = (await import('vue')).defineComponent({
117
+ setup() {
118
+ return {
119
+ ElOption: ElOption,
120
+ ElSelect: ElSelect,
121
+ enums: enums,
122
+ loading: loading,
123
+ modelValue: modelValue,
124
+ handleChange: handleChange,
125
+ };
126
+ },
127
+ __typeEmits: {},
128
+ __typeProps: {},
129
+ props: {},
130
+ });
131
+ export default (await import('vue')).defineComponent({
132
+ setup() {
133
+ return {};
134
+ },
135
+ __typeEmits: {},
136
+ __typeProps: {},
137
+ props: {},
138
+ });
139
+ ; /* PartiallyEnd: #4569/main.vue */
140
+ //# sourceMappingURL=EnumPicker.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumPicker.vue.js","sourceRoot":"","sources":["../../../../packages/components/enumPicker/src/EnumPicker.vue"],"names":[],"mappings":"AA2GA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiBlD,MAAM,KAAK,GAAG,YAAY,CACtB,WAAW,EAAe,EAC1B;IACI,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,OAAO;CACpB,CACJ,CAAC;AAEF,MAAM,KAAK,GAAG,GAAG,CAAwB,EAAE,CAAC,CAAC;AAC7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WAAW,EAAE,EAAqB;IAClC,WAAW,EAAE,EAAuB;IACpC,KAAK,EAAE,EAAkG;CACxG,CAAC,CAAC;AACH,CAAC,CAAA,kCAAkC"}
@@ -1,139 +1,36 @@
1
- import { type PropType } from "vue";
2
- import { type FormInstance } from "element-plus";
1
+ import { type FormInstance, type FormRules } from "element-plus";
3
2
  import { type ValidationInstance } from "../../hooks/useBackendValidations";
4
3
  import type { JaFormModel } from "./types";
5
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
- model: {
7
- type: PropType<JaFormModel>;
8
- required: true;
9
- };
10
- inline: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- labelPosition: {
15
- type: PropType<"top" | "left" | "right">;
16
- default: string;
17
- };
18
- labelWidth: {
19
- type: (StringConstructor | NumberConstructor)[];
20
- };
21
- labelSuffix: {
22
- type: StringConstructor;
23
- };
24
- hideRequiredAsterisk: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- showMessage: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- inlineMessage: {
33
- type: BooleanConstructor;
34
- default: boolean;
35
- };
36
- statusIcon: {
37
- type: BooleanConstructor;
38
- default: boolean;
39
- };
40
- validateOnRuleChange: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
- rules: {
45
- type: PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
46
- default: {};
47
- };
48
- size: {
49
- type: PropType<"default" | "small" | "large">;
50
- default: string;
51
- };
52
- disabled: {
53
- type: BooleanConstructor;
54
- default: boolean;
55
- };
56
- scrollToError: {
57
- type: BooleanConstructor;
58
- default: boolean;
59
- };
60
- validator: {
61
- type: PropType<ValidationInstance>;
62
- required: true;
63
- };
64
- }>, {
4
+ interface Props {
5
+ model: JaFormModel;
6
+ inline?: boolean;
7
+ labelPosition?: "left" | "top" | "right";
8
+ labelWidth?: string | number;
9
+ labelSuffix?: string;
10
+ hideRequiredAsterisk?: boolean;
11
+ showMessage?: boolean;
12
+ inlineMessage?: boolean;
13
+ statusIcon?: boolean;
14
+ validateOnRuleChange?: boolean;
15
+ rules?: FormRules;
16
+ size?: "small" | "default" | "large";
17
+ disabled?: boolean;
18
+ scrollToError?: boolean;
19
+ validator: ValidationInstance;
20
+ }
21
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
65
22
  elForm: import("vue").Ref<FormInstance, FormInstance>;
23
+ getElForm: () => FormInstance;
66
24
  validate: (submit: () => Promise<any>, onFail?: () => void) => Promise<void>;
67
25
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
68
26
  click: (...args: any[]) => void;
69
27
  validate: (...args: any[]) => void;
70
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
71
- model: {
72
- type: PropType<JaFormModel>;
73
- required: true;
74
- };
75
- inline: {
76
- type: BooleanConstructor;
77
- default: boolean;
78
- };
79
- labelPosition: {
80
- type: PropType<"top" | "left" | "right">;
81
- default: string;
82
- };
83
- labelWidth: {
84
- type: (StringConstructor | NumberConstructor)[];
85
- };
86
- labelSuffix: {
87
- type: StringConstructor;
88
- };
89
- hideRequiredAsterisk: {
90
- type: BooleanConstructor;
91
- default: boolean;
92
- };
93
- showMessage: {
94
- type: BooleanConstructor;
95
- default: boolean;
96
- };
97
- inlineMessage: {
98
- type: BooleanConstructor;
99
- default: boolean;
100
- };
101
- statusIcon: {
102
- type: BooleanConstructor;
103
- default: boolean;
104
- };
105
- validateOnRuleChange: {
106
- type: BooleanConstructor;
107
- default: boolean;
108
- };
109
- rules: {
110
- type: PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
111
- default: {};
112
- };
113
- size: {
114
- type: PropType<"default" | "small" | "large">;
115
- default: string;
116
- };
117
- disabled: {
118
- type: BooleanConstructor;
119
- default: boolean;
120
- };
121
- scrollToError: {
122
- type: BooleanConstructor;
123
- default: boolean;
124
- };
125
- validator: {
126
- type: PropType<ValidationInstance>;
127
- required: true;
128
- };
129
- }>> & Readonly<{
28
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
130
29
  onClick?: (...args: any[]) => any;
131
30
  onValidate?: (...args: any[]) => any;
132
31
  }>, {
133
- disabled: boolean;
134
32
  size: "default" | "small" | "large";
135
- rules: Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>;
136
- labelPosition: "top" | "left" | "right";
33
+ labelPosition: "left" | "top" | "right";
137
34
  inline: boolean;
138
35
  inlineMessage: boolean;
139
36
  statusIcon: boolean;
@@ -141,7 +38,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
141
38
  validateOnRuleChange: boolean;
142
39
  hideRequiredAsterisk: boolean;
143
40
  scrollToError: boolean;
144
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
145
42
  default?: (props: {}) => any;
146
43
  }>;
147
44
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"JaForm.vue.d.ts","sourceRoot":"","sources":["../../../packages/components/form/JaForm.vue"],"names":[],"mappings":"AAAA,OAgIO,EAAC,KAAK,QAAQ,EAAgC,MAAM,KAAK,CAAC;AACjE,OAAO,EAAS,KAAK,YAAY,EAAiB,MAAM,cAAc,CAAC;AACvE,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4TzC,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAA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