@silver-formily/element-plus 2.2.0 → 2.3.0
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.
- package/README.en-US.md +32 -32
- package/README.md +32 -32
- package/esm/__builtins__/index.mjs +19 -23
- package/esm/__builtins__/index.mjs.map +1 -1
- package/esm/__builtins__/shared/index.d.ts +0 -1
- package/esm/__builtins__/shared/index.mjs +17 -21
- package/esm/__builtins__/shared/index.mjs.map +1 -1
- package/esm/__builtins__/shared/loading.mjs +5 -5
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/use-enter-submit.d.ts +9 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs +25 -0
- package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -0
- package/esm/autocomplete/autocomplete.d.ts +1222 -0
- package/esm/autocomplete/index.d.ts +639 -0
- package/esm/autocomplete/index.mjs +110 -0
- package/esm/autocomplete/index.mjs.map +1 -0
- package/esm/checkbox/index.d.ts +42 -42
- package/esm/color-picker/index.d.ts +210 -0
- package/esm/color-picker/index.mjs +14 -0
- package/esm/color-picker/index.mjs.map +1 -0
- package/esm/color-picker-panel/index.d.ts +129 -0
- package/esm/color-picker-panel/index.mjs +22 -0
- package/esm/color-picker-panel/index.mjs.map +1 -0
- package/esm/date-picker/index.mjs +12 -34
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/date-picker/utils.d.ts +4 -0
- package/esm/date-picker/utils.mjs +27 -0
- package/esm/date-picker/utils.mjs.map +1 -0
- package/esm/date-picker-panel/index.d.ts +143 -0
- package/esm/date-picker-panel/index.mjs +27 -0
- package/esm/date-picker-panel/index.mjs.map +1 -0
- package/esm/env.d.mjs +2 -0
- package/esm/env.d.mjs.map +1 -0
- package/esm/form-button-group/form-button-group.d.ts +1 -1
- package/esm/form-button-group/index.d.ts +3 -3
- package/esm/form-dialog/dialog-content.d.ts +789 -3
- package/esm/form-dialog/index.mjs +98 -87
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +1 -0
- package/esm/form-drawer/drawer-content.d.ts +919 -3
- package/esm/form-drawer/index.mjs +91 -81
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +1 -0
- package/esm/form-item/index.mjs +17 -17
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +10 -10
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/utils.mjs +1 -1
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/index.d.ts +6 -0
- package/esm/index.mjs +90 -78
- package/esm/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +21 -21
- package/esm/input-tag/index.d.ts +32 -0
- package/esm/input-tag/index.mjs +46 -0
- package/esm/input-tag/index.mjs.map +1 -0
- package/esm/input-tag/input-tag.d.ts +32 -0
- package/esm/mention/index.d.ts +50 -0
- package/esm/mention/index.mjs +93 -0
- package/esm/mention/index.mjs.map +1 -0
- package/esm/mention/mention.d.ts +51 -0
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/preview-text/color-picker.d.ts +5 -0
- package/esm/preview-text/index.d.ts +5 -0
- package/esm/preview-text/index.mjs +180 -145
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/radio/index.d.ts +36 -36
- package/esm/rate/index.mjs.map +1 -1
- package/esm/segmented/index.mjs.map +1 -1
- package/esm/shared/overlay-elements.d.ts +6 -0
- package/esm/shared/overlay-elements.mjs +16 -0
- package/esm/shared/overlay-elements.mjs.map +1 -0
- package/esm/slider/index.mjs.map +1 -1
- package/esm/styles/preview-text/index.css +1 -1
- package/esm/switch/index.d.ts +12 -12
- package/esm/upload/index.d.ts +1 -1
- package/esm/upload/upload.d.ts +2 -2
- package/package.json +3 -1
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
package/esm/radio/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export declare const Radio: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
-
value: {
|
|
4
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
5
|
-
default: undefined;
|
|
6
|
-
};
|
|
7
3
|
size: {
|
|
8
4
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
9
5
|
};
|
|
@@ -11,10 +7,18 @@ export declare const Radio: {
|
|
|
11
7
|
type: import('vue').PropType<string | number | boolean>;
|
|
12
8
|
default: undefined;
|
|
13
9
|
};
|
|
10
|
+
border: {
|
|
11
|
+
type: import('vue').PropType<boolean>;
|
|
12
|
+
default: false;
|
|
13
|
+
};
|
|
14
14
|
name: {
|
|
15
15
|
type: import('vue').PropType<string>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
+
value: {
|
|
19
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
18
22
|
disabled: {
|
|
19
23
|
type: import('vue').PropType<boolean>;
|
|
20
24
|
default: undefined;
|
|
@@ -23,10 +27,6 @@ export declare const Radio: {
|
|
|
23
27
|
type: import('vue').PropType<string | number | boolean>;
|
|
24
28
|
default: undefined;
|
|
25
29
|
};
|
|
26
|
-
border: {
|
|
27
|
-
type: import('vue').PropType<boolean>;
|
|
28
|
-
default: false;
|
|
29
|
-
};
|
|
30
30
|
}>> & {
|
|
31
31
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
32
32
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -48,10 +48,6 @@ export declare const Radio: {
|
|
|
48
48
|
M: {};
|
|
49
49
|
Defaults: {};
|
|
50
50
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
51
|
-
value: {
|
|
52
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
53
|
-
default: undefined;
|
|
54
|
-
};
|
|
55
51
|
size: {
|
|
56
52
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
57
53
|
};
|
|
@@ -59,10 +55,18 @@ export declare const Radio: {
|
|
|
59
55
|
type: import('vue').PropType<string | number | boolean>;
|
|
60
56
|
default: undefined;
|
|
61
57
|
};
|
|
58
|
+
border: {
|
|
59
|
+
type: import('vue').PropType<boolean>;
|
|
60
|
+
default: false;
|
|
61
|
+
};
|
|
62
62
|
name: {
|
|
63
63
|
type: import('vue').PropType<string>;
|
|
64
64
|
default: undefined;
|
|
65
65
|
};
|
|
66
|
+
value: {
|
|
67
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
66
70
|
disabled: {
|
|
67
71
|
type: import('vue').PropType<boolean>;
|
|
68
72
|
default: undefined;
|
|
@@ -71,10 +75,6 @@ export declare const Radio: {
|
|
|
71
75
|
type: import('vue').PropType<string | number | boolean>;
|
|
72
76
|
default: undefined;
|
|
73
77
|
};
|
|
74
|
-
border: {
|
|
75
|
-
type: import('vue').PropType<boolean>;
|
|
76
|
-
default: false;
|
|
77
|
-
};
|
|
78
78
|
}>> & {
|
|
79
79
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
80
80
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -90,10 +90,6 @@ export declare const Radio: {
|
|
|
90
90
|
__isTeleport?: never;
|
|
91
91
|
__isSuspense?: never;
|
|
92
92
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
93
|
-
value: {
|
|
94
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
95
|
-
default: undefined;
|
|
96
|
-
};
|
|
97
93
|
size: {
|
|
98
94
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
99
95
|
};
|
|
@@ -101,10 +97,18 @@ export declare const Radio: {
|
|
|
101
97
|
type: import('vue').PropType<string | number | boolean>;
|
|
102
98
|
default: undefined;
|
|
103
99
|
};
|
|
100
|
+
border: {
|
|
101
|
+
type: import('vue').PropType<boolean>;
|
|
102
|
+
default: false;
|
|
103
|
+
};
|
|
104
104
|
name: {
|
|
105
105
|
type: import('vue').PropType<string>;
|
|
106
106
|
default: undefined;
|
|
107
107
|
};
|
|
108
|
+
value: {
|
|
109
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
110
|
+
default: undefined;
|
|
111
|
+
};
|
|
108
112
|
disabled: {
|
|
109
113
|
type: import('vue').PropType<boolean>;
|
|
110
114
|
default: undefined;
|
|
@@ -113,10 +117,6 @@ export declare const Radio: {
|
|
|
113
117
|
type: import('vue').PropType<string | number | boolean>;
|
|
114
118
|
default: undefined;
|
|
115
119
|
};
|
|
116
|
-
border: {
|
|
117
|
-
type: import('vue').PropType<boolean>;
|
|
118
|
-
default: false;
|
|
119
|
-
};
|
|
120
120
|
}>> & {
|
|
121
121
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
122
122
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -137,10 +137,6 @@ export declare const Radio: {
|
|
|
137
137
|
}) & import('vue').ObjectPlugin & {
|
|
138
138
|
RadioButton: {
|
|
139
139
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
140
|
-
value: {
|
|
141
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
142
|
-
default: undefined;
|
|
143
|
-
};
|
|
144
140
|
size: {
|
|
145
141
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
146
142
|
};
|
|
@@ -152,6 +148,10 @@ export declare const Radio: {
|
|
|
152
148
|
type: import('vue').PropType<string>;
|
|
153
149
|
default: undefined;
|
|
154
150
|
};
|
|
151
|
+
value: {
|
|
152
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
153
|
+
default: undefined;
|
|
154
|
+
};
|
|
155
155
|
disabled: {
|
|
156
156
|
type: import('vue').PropType<boolean>;
|
|
157
157
|
default: undefined;
|
|
@@ -174,10 +174,6 @@ export declare const Radio: {
|
|
|
174
174
|
M: {};
|
|
175
175
|
Defaults: {};
|
|
176
176
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
177
|
-
value: {
|
|
178
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
179
|
-
default: undefined;
|
|
180
|
-
};
|
|
181
177
|
size: {
|
|
182
178
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
183
179
|
};
|
|
@@ -189,6 +185,10 @@ export declare const Radio: {
|
|
|
189
185
|
type: import('vue').PropType<string>;
|
|
190
186
|
default: undefined;
|
|
191
187
|
};
|
|
188
|
+
value: {
|
|
189
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
192
|
disabled: {
|
|
193
193
|
type: import('vue').PropType<boolean>;
|
|
194
194
|
default: undefined;
|
|
@@ -208,10 +208,6 @@ export declare const Radio: {
|
|
|
208
208
|
__isTeleport?: never;
|
|
209
209
|
__isSuspense?: never;
|
|
210
210
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
211
|
-
value: {
|
|
212
|
-
type: import('vue').PropType<string | number | boolean>;
|
|
213
|
-
default: undefined;
|
|
214
|
-
};
|
|
215
211
|
size: {
|
|
216
212
|
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
|
217
213
|
};
|
|
@@ -223,6 +219,10 @@ export declare const Radio: {
|
|
|
223
219
|
type: import('vue').PropType<string>;
|
|
224
220
|
default: undefined;
|
|
225
221
|
};
|
|
222
|
+
value: {
|
|
223
|
+
type: import('vue').PropType<string | number | boolean>;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
226
|
disabled: {
|
|
227
227
|
type: import('vue').PropType<boolean>;
|
|
228
228
|
default: undefined;
|
package/esm/rate/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRate } from 'element-plus'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type RateProps = typeof ElRate\n\nexport const Rate = connect<typeof ElRate>(\n ElRate,\n mapProps({ readOnly: 'readonly', disabled: true }),\n mapReadPretty(PreviewText.Rate),\n)\n\nexport default Rate\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAAOC;AAAA,EAClBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,IAAI;AAChC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElRate } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nexport type RateProps = typeof ElRate\r\n\r\nexport const Rate = connect<typeof ElRate>(\r\n ElRate,\r\n mapProps({ readOnly: 'readonly', disabled: true }),\r\n mapReadPretty(PreviewText.Rate),\r\n)\r\n\r\nexport default Rate\r\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAAOC;AAAA,EAClBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,IAAI;AAChC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElSegmented } from 'element-plus'\nimport { useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSegmented',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: SegmentedOptions\n}>()\n\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\n\ntype SegmentedOptions = SegmentedOption[]\n\nconst slots = useSlots()\nconst { props: segmentedProps } = useCleanAttrs()\n</script>\n\n<template>\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\n <template v-if=\"slots.default\" #default=\"slotData\">\n <slot v-bind=\"slotData\" />\n </template>\n </ElSegmented>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSegmented from './segmented.vue'\n\nexport const Segmented = connect<typeof FSegmented>(\n FSegmented,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Segmented\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAQRC,IAAQC,EAAA,GACR,EAAE,OAAOC,EAAA,IAAmBC,EAAA;2BAIhCC,EAIcC,EAAAC,CAAA,GAJdC,EAIcF,EAAAH,CAAA,GAJqB;AAAA,MAAG,SAASJ,EAAM;AAAA,IAAA;MACnCO,EAAAL,CAAA,EAAM;cAAU;AAAA,QAC9B,IAAAQ,EAAA,CADuCC,MAAQ;AAAA,UAC/CC,EAA0BC,yBAAZF,CAAQ,CAAA,CAAA;AAAA,QAAA;;;;;ICpBfG,IAAYC;AAAA,EACvBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { ElSegmented } from 'element-plus'\r\nimport { useSlots } from 'vue'\r\nimport { useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FSegmented',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps<{\r\n options?: SegmentedOptions\r\n}>()\r\n\r\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\r\n\r\ntype SegmentedOptions = SegmentedOption[]\r\n\r\nconst slots = useSlots()\r\nconst { props: segmentedProps } = useCleanAttrs()\r\n</script>\r\n\r\n<template>\r\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\r\n <template v-if=\"slots.default\" #default=\"slotData\">\r\n <slot v-bind=\"slotData\" />\r\n </template>\r\n </ElSegmented>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FSegmented from './segmented.vue'\r\n\r\nexport const Segmented = connect<typeof FSegmented>(\r\n FSegmented,\r\n mapProps({ dataSource: 'options', disabled: true }),\r\n mapReadPretty(PreviewText.Select),\r\n)\r\n\r\nexport default Segmented\r\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAQRC,IAAQC,EAAA,GACR,EAAE,OAAOC,EAAA,IAAmBC,EAAA;2BAIhCC,EAIcC,EAAAC,CAAA,GAJdC,EAIcF,EAAAH,CAAA,GAJqB;AAAA,MAAG,SAASJ,EAAM;AAAA,IAAA;MACnCO,EAAAL,CAAA,EAAM;cAAU;AAAA,QAC9B,IAAAQ,EAAA,CADuCC,MAAQ;AAAA,UAC/CC,EAA0BC,yBAAZF,CAAQ,CAAA,CAAA;AAAA,QAAA;;;;;ICpBfG,IAAYC;AAAA,EACvBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
export type DialogLikeInstance = ComponentPublicInstance<{
|
|
3
|
+
dialogContentRef?: ComponentPublicInstance | null;
|
|
4
|
+
}> | null;
|
|
5
|
+
export declare function resolveDialogElement(instance: DialogLikeInstance): HTMLElement | null;
|
|
6
|
+
export declare function resolveDrawerElement(instance: ComponentPublicInstance | null): HTMLElement | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function l(e) {
|
|
2
|
+
const o = (e?.dialogContentRef ?? e?.exposed?.dialogContentRef)?.$el;
|
|
3
|
+
return o || (e?.$el ?? null);
|
|
4
|
+
}
|
|
5
|
+
function n(e) {
|
|
6
|
+
const r = e?.exposed?.drawerRef;
|
|
7
|
+
if (r instanceof HTMLElement)
|
|
8
|
+
return r;
|
|
9
|
+
const o = e?.$refs?.drawerRef;
|
|
10
|
+
return o instanceof HTMLElement ? o : e?.$el ?? null;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
l as resolveDialogElement,
|
|
14
|
+
n as resolveDrawerElement
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=overlay-elements.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-elements.mjs","sources":["../../src/shared/overlay-elements.ts"],"sourcesContent":["import type { ComponentPublicInstance } from 'vue'\r\n\r\nexport type DialogLikeInstance = ComponentPublicInstance<{ dialogContentRef?: ComponentPublicInstance | null }> | null\r\n\r\nexport function resolveDialogElement(instance: DialogLikeInstance): HTMLElement | null {\r\n const exposedDialogRef = (instance as ComponentPublicInstance & { dialogContentRef?: ComponentPublicInstance | null } | null)?.dialogContentRef\r\n ?? (instance as ComponentPublicInstance & { exposed?: Record<string, any> } | null)?.exposed?.dialogContentRef\r\n const dialogElement = exposedDialogRef?.$el as HTMLElement | undefined\r\n if (dialogElement)\r\n return dialogElement\r\n\r\n return (instance?.$el as HTMLElement | undefined) ?? null\r\n}\r\n\r\nexport function resolveDrawerElement(instance: ComponentPublicInstance | null): HTMLElement | null {\r\n const exposedDrawer = (instance as ComponentPublicInstance & { exposed?: Record<string, any> } | null)?.exposed?.drawerRef\r\n if (exposedDrawer instanceof HTMLElement)\r\n return exposedDrawer\r\n\r\n const drawerFromRefs = (instance as ComponentPublicInstance & { $refs?: Record<string, any> } | null)?.$refs?.drawerRef\r\n if (drawerFromRefs instanceof HTMLElement)\r\n return drawerFromRefs\r\n\r\n return (instance?.$el as HTMLElement | undefined) ?? null\r\n}\r\n"],"names":["resolveDialogElement","instance","dialogElement","resolveDrawerElement","exposedDrawer","drawerFromRefs"],"mappings":"AAIO,SAASA,EAAqBC,GAAkD;AAGrF,QAAMC,KAFoBD,GAAqG,oBACzHA,GAAiF,SAAS,mBACxD;AACxC,SAAIC,MAGID,GAAU,OAAmC;AACvD;AAEO,SAASE,EAAqBF,GAA8D;AACjG,QAAMG,IAAiBH,GAAiF,SAAS;AACjH,MAAIG,aAAyB;AAC3B,WAAOA;AAET,QAAMC,IAAkBJ,GAA+E,OAAO;AAC9G,SAAII,aAA0B,cACrBA,IAEDJ,GAAU,OAAmC;AACvD;"}
|
package/esm/slider/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/slider/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\nimport { ElSlider } from 'element-plus'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type SliderProps = typeof ElSlider\n\nexport const Slider = connect<typeof ElSlider>(\n ElSlider,\n mapProps({ readOnly: 'readonly', disabled: true }),\n mapReadPretty(PreviewText.Input),\n)\n\nexport default Slider\n"],"names":["Slider","connect","ElSlider","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAASC;AAAA,EACpBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,KAAK;AACjC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/slider/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElSlider } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nexport type SliderProps = typeof ElSlider\r\n\r\nexport const Slider = connect<typeof ElSlider>(\r\n ElSlider,\r\n mapProps({ readOnly: 'readonly', disabled: true }),\r\n mapReadPretty(PreviewText.Input),\r\n)\r\n\r\nexport default Slider\r\n"],"names":["Slider","connect","ElSlider","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAASC;AAAA,EACpBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,KAAK;AACjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.formily-element-plus-preview-text{display:flex;align-items:center;height:100%}
|
|
1
|
+
.formily-element-plus-preview-text{display:flex;align-items:center;height:100%}.formily-element-plus-preview-text__color{gap:8px}.formily-element-plus-preview-text__color-swatch{width:20px;height:20px;border-radius:4px;border:1px solid var(--el-border-color-light, #ebeef5);box-shadow:inset 0 0 0 1px var(--el-color-white, #fff)}
|
package/esm/switch/index.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
9
9
|
type: import('vue').PropType<string>;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
+
width: {
|
|
13
|
+
type: import('vue').PropType<string | number>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
12
16
|
disabled: {
|
|
13
17
|
type: import('vue').PropType<boolean>;
|
|
14
18
|
default: undefined;
|
|
@@ -33,10 +37,6 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
33
37
|
type: import('vue').PropType<boolean>;
|
|
34
38
|
default: boolean;
|
|
35
39
|
};
|
|
36
|
-
width: {
|
|
37
|
-
type: import('vue').PropType<string | number>;
|
|
38
|
-
default: string;
|
|
39
|
-
};
|
|
40
40
|
inlinePrompt: {
|
|
41
41
|
type: import('vue').PropType<boolean>;
|
|
42
42
|
};
|
|
@@ -107,6 +107,10 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
107
107
|
type: import('vue').PropType<string>;
|
|
108
108
|
default: string;
|
|
109
109
|
};
|
|
110
|
+
width: {
|
|
111
|
+
type: import('vue').PropType<string | number>;
|
|
112
|
+
default: string;
|
|
113
|
+
};
|
|
110
114
|
disabled: {
|
|
111
115
|
type: import('vue').PropType<boolean>;
|
|
112
116
|
default: undefined;
|
|
@@ -131,10 +135,6 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
131
135
|
type: import('vue').PropType<boolean>;
|
|
132
136
|
default: boolean;
|
|
133
137
|
};
|
|
134
|
-
width: {
|
|
135
|
-
type: import('vue').PropType<string | number>;
|
|
136
|
-
default: string;
|
|
137
|
-
};
|
|
138
138
|
inlinePrompt: {
|
|
139
139
|
type: import('vue').PropType<boolean>;
|
|
140
140
|
};
|
|
@@ -198,6 +198,10 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
198
198
|
type: import('vue').PropType<string>;
|
|
199
199
|
default: string;
|
|
200
200
|
};
|
|
201
|
+
width: {
|
|
202
|
+
type: import('vue').PropType<string | number>;
|
|
203
|
+
default: string;
|
|
204
|
+
};
|
|
201
205
|
disabled: {
|
|
202
206
|
type: import('vue').PropType<boolean>;
|
|
203
207
|
default: undefined;
|
|
@@ -222,10 +226,6 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
|
|
|
222
226
|
type: import('vue').PropType<boolean>;
|
|
223
227
|
default: boolean;
|
|
224
228
|
};
|
|
225
|
-
width: {
|
|
226
|
-
type: import('vue').PropType<string | number>;
|
|
227
|
-
default: string;
|
|
228
|
-
};
|
|
229
229
|
inlinePrompt: {
|
|
230
230
|
type: import('vue').PropType<boolean>;
|
|
231
231
|
};
|
package/esm/upload/index.d.ts
CHANGED
|
@@ -368,7 +368,7 @@ export declare const Upload: {
|
|
|
368
368
|
directory: {
|
|
369
369
|
type: import('vue').PropType<boolean>;
|
|
370
370
|
};
|
|
371
|
-
}>>, "data" | "name" | "
|
|
371
|
+
}>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
|
|
372
372
|
abort: (file?: import('element-plus').UploadFile) => void;
|
|
373
373
|
submit: () => void;
|
|
374
374
|
clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
|
package/esm/upload/upload.d.ts
CHANGED
|
@@ -346,7 +346,7 @@ declare function __VLS_template(): {
|
|
|
346
346
|
directory: {
|
|
347
347
|
type: PropType<boolean>;
|
|
348
348
|
};
|
|
349
|
-
}>>, "data" | "name" | "
|
|
349
|
+
}>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
|
|
350
350
|
abort: (file?: import('element-plus/es/components/upload/src/upload.mjs').UploadFile) => void;
|
|
351
351
|
submit: () => void;
|
|
352
352
|
clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
|
|
@@ -996,7 +996,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
996
996
|
directory: {
|
|
997
997
|
type: PropType<boolean>;
|
|
998
998
|
};
|
|
999
|
-
}>>, "data" | "name" | "
|
|
999
|
+
}>>, "data" | "name" | "submit" | "disabled" | "abort" | "onProgress" | "onChange" | "onError" | "method" | "onRemove" | "fileList" | "beforeUpload" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "autoUpload" | "listType" | "httpRequest" | "clearFiles" | "handleStart" | "handleRemove"> & import('vue').ShallowUnwrapRef<{
|
|
1000
1000
|
abort: (file?: import('element-plus/es/components/upload/src/upload.mjs').UploadFile) => void;
|
|
1001
1001
|
submit: () => void;
|
|
1002
1002
|
clearFiles: (states?: import('element-plus').UploadStatus[]) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silver-formily/element-plus",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"description": "Formily 的 Element Plus 封装",
|
|
6
6
|
"author": "hezhengxu",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@formily/shared": "^2.0.8",
|
|
39
39
|
"@silver-formily/reactive-vue": "^1",
|
|
40
40
|
"@silver-formily/vue": "^2.2.1",
|
|
41
|
+
"@vueuse/core": "*",
|
|
41
42
|
"element-plus": "^2.1.8",
|
|
42
43
|
"vue": "^3.3.0"
|
|
43
44
|
},
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"cz-git": "^1.12.0",
|
|
70
71
|
"czg": "^1.12.0",
|
|
71
72
|
"eslint": "^9.36.0",
|
|
73
|
+
"eslint-plugin-format": "^1.4.0",
|
|
72
74
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
73
75
|
"eslint-plugin-vue": "^10.5.0",
|
|
74
76
|
"execa": "^9.6.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export declare function useDebounceFn<T extends (...args: any[]) => any>(fn: T, delay: number | (() => number)): T;
|
|
3
|
-
export declare function useThrottleFn<T extends (...args: any[]) => any>(fn: T, delay: number, trailing?: boolean, leading?: boolean): T;
|
|
4
|
-
export declare function useResizeObserver(target: Ref<Element | null> | Element | null, callback: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void, options?: ResizeObserverOptions): {
|
|
5
|
-
isSupported: boolean;
|
|
6
|
-
stop: () => void;
|
|
7
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { watch as f, onUnmounted as m } from "vue";
|
|
2
|
-
function T(e, o) {
|
|
3
|
-
let u = null;
|
|
4
|
-
return ((...l) => {
|
|
5
|
-
u !== null && clearTimeout(u);
|
|
6
|
-
const t = typeof o == "function" ? o() : o;
|
|
7
|
-
u = setTimeout(() => {
|
|
8
|
-
e(...l), u = null;
|
|
9
|
-
}, t);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function b(e, o, u = !0, l = !0) {
|
|
13
|
-
let t = null, n = 0, s = null;
|
|
14
|
-
return ((...r) => {
|
|
15
|
-
const i = Date.now();
|
|
16
|
-
if (n === 0 && l) {
|
|
17
|
-
n = i, e(...r);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
n === 0 && !l && (n = i);
|
|
21
|
-
const c = o - (i - n);
|
|
22
|
-
s = r, t !== null && clearTimeout(t), c <= 0 && n !== i ? (n = i, e(...r), s = null) : u && (t = setTimeout(() => {
|
|
23
|
-
n = Date.now(), s !== null && (e(...s), s = null), t = null;
|
|
24
|
-
}, c));
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function p(e, o, u) {
|
|
28
|
-
let l = null;
|
|
29
|
-
const t = globalThis.window !== void 0 && "ResizeObserver" in globalThis, n = () => {
|
|
30
|
-
l && (l.disconnect(), l = null);
|
|
31
|
-
}, s = () => {
|
|
32
|
-
n();
|
|
33
|
-
}, r = () => {
|
|
34
|
-
n();
|
|
35
|
-
/* istanbul ignore if @preserve */
|
|
36
|
-
if (!t)
|
|
37
|
-
return;
|
|
38
|
-
const i = e && "value" in e ? e.value : e;
|
|
39
|
-
i && (l = new ResizeObserver(o), l.observe(i, u));
|
|
40
|
-
};
|
|
41
|
-
return e && "value" in e ? f(
|
|
42
|
-
e,
|
|
43
|
-
() => {
|
|
44
|
-
r();
|
|
45
|
-
},
|
|
46
|
-
{ immediate: !0, flush: "post" }
|
|
47
|
-
) : r(), m(() => {
|
|
48
|
-
n();
|
|
49
|
-
}), {
|
|
50
|
-
isSupported: t,
|
|
51
|
-
stop: s
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
T as useDebounceFn,
|
|
56
|
-
p as useResizeObserver,
|
|
57
|
-
b as useThrottleFn
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=hooks.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.mjs","sources":["../../../src/__builtins__/shared/hooks.ts"],"sourcesContent":["import type { Ref } from 'vue'\r\nimport { onUnmounted, watch } from 'vue'\r\n\r\nexport function useDebounceFn<T extends (...args: any[]) => any>(\r\n fn: T,\r\n delay: number | (() => number),\r\n): T {\r\n let timeoutId: ReturnType<typeof setTimeout> | null = null\r\n\r\n return ((...args: Parameters<T>) => {\r\n if (timeoutId !== null) {\r\n clearTimeout(timeoutId)\r\n }\r\n\r\n const delayMs = typeof delay === 'function' ? delay() : delay\r\n\r\n timeoutId = setTimeout(() => {\r\n fn(...args)\r\n timeoutId = null\r\n }, delayMs)\r\n }) as T\r\n}\r\n\r\nexport function useThrottleFn<T extends (...args: any[]) => any>(\r\n fn: T,\r\n delay: number,\r\n trailing = true,\r\n leading = true,\r\n): T {\r\n let timeoutId: ReturnType<typeof setTimeout> | null = null\r\n let lastCallTime = 0\r\n let lastArgs: Parameters<T> | null = null\r\n\r\n return ((...args: Parameters<T>) => {\r\n const now = Date.now()\r\n if (lastCallTime === 0 && leading) {\r\n lastCallTime = now\r\n fn(...args)\r\n return\r\n }\r\n if (lastCallTime === 0 && !leading) {\r\n lastCallTime = now\r\n }\r\n\r\n const remainingTime = delay - (now - lastCallTime)\r\n\r\n lastArgs = args\r\n\r\n if (timeoutId !== null) {\r\n clearTimeout(timeoutId)\r\n }\r\n\r\n if (remainingTime <= 0 && lastCallTime !== now) {\r\n lastCallTime = now\r\n fn(...args)\r\n lastArgs = null\r\n }\r\n else if (trailing) {\r\n timeoutId = setTimeout(() => {\r\n lastCallTime = Date.now()\r\n if (lastArgs !== null) {\r\n fn(...lastArgs)\r\n lastArgs = null\r\n }\r\n timeoutId = null\r\n }, remainingTime)\r\n }\r\n }) as T\r\n}\r\n\r\nexport function useResizeObserver(\r\n target: Ref<Element | null> | Element | null,\r\n callback: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void,\r\n options?: ResizeObserverOptions,\r\n): {\r\n isSupported: boolean\r\n stop: () => void\r\n} {\r\n let observer: ResizeObserver | null = null\r\n const isSupported = globalThis.window !== undefined && 'ResizeObserver' in globalThis\r\n\r\n const cleanup = () => {\r\n if (observer) {\r\n observer.disconnect()\r\n observer = null\r\n }\r\n }\r\n\r\n const stop = () => {\r\n cleanup()\r\n }\r\n\r\n const start = () => {\r\n cleanup()\r\n\r\n /* istanbul ignore if @preserve */\r\n if (!isSupported) {\r\n return\r\n }\r\n\r\n const element = (target && 'value' in target ? target.value : target) as Element\r\n\r\n if (!element) {\r\n return\r\n }\r\n\r\n observer = new ResizeObserver(callback)\r\n observer.observe(element, options)\r\n }\r\n\r\n if (target && 'value' in target) {\r\n watch(\r\n target,\r\n () => {\r\n start()\r\n },\r\n { immediate: true, flush: 'post' },\r\n )\r\n }\r\n else {\r\n start()\r\n }\r\n onUnmounted(() => {\r\n cleanup()\r\n })\r\n\r\n return {\r\n isSupported,\r\n stop,\r\n }\r\n}\r\n"],"names":["useDebounceFn","fn","delay","timeoutId","args","delayMs","useThrottleFn","trailing","leading","lastCallTime","lastArgs","now","remainingTime","useResizeObserver","target","callback","options","observer","isSupported","cleanup","stop","start","element","watch","onUnmounted"],"mappings":";AAGO,SAASA,EACdC,GACAC,GACG;AACH,MAAIC,IAAkD;AAEtD,UAAQ,IAAIC,MAAwB;AAClC,IAAID,MAAc,QAChB,aAAaA,CAAS;AAGxB,UAAME,IAAU,OAAOH,KAAU,aAAaA,MAAUA;AAExD,IAAAC,IAAY,WAAW,MAAM;AAC3B,MAAAF,EAAG,GAAGG,CAAI,GACVD,IAAY;AAAA,IACd,GAAGE,CAAO;AAAA,EACZ;AACF;AAEO,SAASC,EACdL,GACAC,GACAK,IAAW,IACXC,IAAU,IACP;AACH,MAAIL,IAAkD,MAClDM,IAAe,GACfC,IAAiC;AAErC,UAAQ,IAAIN,MAAwB;AAClC,UAAMO,IAAM,KAAK,IAAA;AACjB,QAAIF,MAAiB,KAAKD,GAAS;AACjC,MAAAC,IAAeE,GACfV,EAAG,GAAGG,CAAI;AACV;AAAA,IACF;AACA,IAAIK,MAAiB,KAAK,CAACD,MACzBC,IAAeE;AAGjB,UAAMC,IAAgBV,KAASS,IAAMF;AAErC,IAAAC,IAAWN,GAEPD,MAAc,QAChB,aAAaA,CAAS,GAGpBS,KAAiB,KAAKH,MAAiBE,KACzCF,IAAeE,GACfV,EAAG,GAAGG,CAAI,GACVM,IAAW,QAEJH,MACPJ,IAAY,WAAW,MAAM;AAC3B,MAAAM,IAAe,KAAK,IAAA,GAChBC,MAAa,SACfT,EAAG,GAAGS,CAAQ,GACdA,IAAW,OAEbP,IAAY;AAAA,IACd,GAAGS,CAAa;AAAA,EAEpB;AACF;AAEO,SAASC,EACdC,GACAC,GACAC,GAIA;AACA,MAAIC,IAAkC;AACtC,QAAMC,IAAc,WAAW,WAAW,UAAa,oBAAoB,YAErEC,IAAU,MAAM;AACpB,IAAIF,MACFA,EAAS,WAAA,GACTA,IAAW;AAAA,EAEf,GAEMG,IAAO,MAAM;AACjB,IAAAD,EAAA;AAAA,EACF,GAEME,IAAQ,MAAM;AAClB,IAAAF,EAAA;AAAA,IAAQ;AAGR,QAAI,CAACD;AACH;AAGF,UAAMI,IAAWR,KAAU,WAAWA,IAASA,EAAO,QAAQA;AAE9D,IAAKQ,MAILL,IAAW,IAAI,eAAeF,CAAQ,GACtCE,EAAS,QAAQK,GAASN,CAAO;AAAA,EACnC;AAEA,SAAIF,KAAU,WAAWA,IACvBS;AAAA,IACET;AAAA,IACA,MAAM;AACJ,MAAAO,EAAA;AAAA,IACF;AAAA,IACA,EAAE,WAAW,IAAM,OAAO,OAAA;AAAA,EAAO,IAInCA,EAAA,GAEFG,EAAY,MAAM;AAChB,IAAAL,EAAA;AAAA,EACF,CAAC,GAEM;AAAA,IACL,aAAAD;AAAA,IACA,MAAAE;AAAA,EAAA;AAEJ;"}
|