@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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ElColorPickerPanel } from 'element-plus';
|
|
2
|
+
export type ColorPickerPanelProps = typeof ElColorPickerPanel;
|
|
3
|
+
export declare const ColorPickerPanel: import('element-plus/es/utils/index.mjs').SFCWithInstall<{
|
|
4
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
5
|
+
border: {
|
|
6
|
+
type: import('vue').PropType<boolean>;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
disabled: {
|
|
10
|
+
type: import('vue').PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: import('vue').PropType<string>;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
validateEvent: {
|
|
17
|
+
type: import('vue').PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
showAlpha: {
|
|
21
|
+
type: import('vue').PropType<boolean>;
|
|
22
|
+
};
|
|
23
|
+
colorFormat: {
|
|
24
|
+
type: import('vue').PropType<string>;
|
|
25
|
+
};
|
|
26
|
+
predefine: {
|
|
27
|
+
type: import('vue').PropType<string[]>;
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
color: import('element-plus/es/components/color-picker-panel/src/utils/color.mjs').default;
|
|
33
|
+
inputRef: import('vue').Ref<import('element-plus').InputInstance | undefined>;
|
|
34
|
+
update: () => void;
|
|
35
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
"update:modelValue": (val: string | null) => void;
|
|
37
|
+
}, import('vue').PublicProps, {
|
|
38
|
+
border: boolean;
|
|
39
|
+
modelValue: string | null;
|
|
40
|
+
validateEvent: boolean;
|
|
41
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
42
|
+
P: {};
|
|
43
|
+
B: {};
|
|
44
|
+
D: {};
|
|
45
|
+
C: {};
|
|
46
|
+
M: {};
|
|
47
|
+
Defaults: {};
|
|
48
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
49
|
+
border: {
|
|
50
|
+
type: import('vue').PropType<boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
disabled: {
|
|
54
|
+
type: import('vue').PropType<boolean>;
|
|
55
|
+
};
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: import('vue').PropType<string>;
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
validateEvent: {
|
|
61
|
+
type: import('vue').PropType<boolean>;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
showAlpha: {
|
|
65
|
+
type: import('vue').PropType<boolean>;
|
|
66
|
+
};
|
|
67
|
+
colorFormat: {
|
|
68
|
+
type: import('vue').PropType<string>;
|
|
69
|
+
};
|
|
70
|
+
predefine: {
|
|
71
|
+
type: import('vue').PropType<string[]>;
|
|
72
|
+
};
|
|
73
|
+
}>> & {
|
|
74
|
+
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
color: import('element-plus/es/components/color-picker-panel/src/utils/color.mjs').default;
|
|
77
|
+
inputRef: import('vue').Ref<import('element-plus').InputInstance | undefined>;
|
|
78
|
+
update: () => void;
|
|
79
|
+
}, {}, {}, {}, {
|
|
80
|
+
border: boolean;
|
|
81
|
+
modelValue: string | null;
|
|
82
|
+
validateEvent: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
__isFragment?: never;
|
|
85
|
+
__isTeleport?: never;
|
|
86
|
+
__isSuspense?: never;
|
|
87
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
88
|
+
border: {
|
|
89
|
+
type: import('vue').PropType<boolean>;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
disabled: {
|
|
93
|
+
type: import('vue').PropType<boolean>;
|
|
94
|
+
};
|
|
95
|
+
modelValue: {
|
|
96
|
+
type: import('vue').PropType<string>;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
validateEvent: {
|
|
100
|
+
type: import('vue').PropType<boolean>;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
showAlpha: {
|
|
104
|
+
type: import('vue').PropType<boolean>;
|
|
105
|
+
};
|
|
106
|
+
colorFormat: {
|
|
107
|
+
type: import('vue').PropType<string>;
|
|
108
|
+
};
|
|
109
|
+
predefine: {
|
|
110
|
+
type: import('vue').PropType<string[]>;
|
|
111
|
+
};
|
|
112
|
+
}>> & {
|
|
113
|
+
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
color: import('element-plus/es/components/color-picker-panel/src/utils/color.mjs').default;
|
|
116
|
+
inputRef: import('vue').Ref<import('element-plus').InputInstance | undefined>;
|
|
117
|
+
update: () => void;
|
|
118
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
119
|
+
"update:modelValue": (val: string | null) => void;
|
|
120
|
+
}, string, {
|
|
121
|
+
border: boolean;
|
|
122
|
+
modelValue: string | null;
|
|
123
|
+
validateEvent: boolean;
|
|
124
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
125
|
+
$slots: {
|
|
126
|
+
footer?: (props: {}) => any;
|
|
127
|
+
};
|
|
128
|
+
})>;
|
|
129
|
+
export default ColorPickerPanel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { connect as e, mapProps as o } from "@silver-formily/vue";
|
|
2
|
+
import { ElColorPickerPanel as t } from "element-plus";
|
|
3
|
+
import { PreviewText as i } from "../preview-text/index.mjs";
|
|
4
|
+
import { mapReadPretty as a } from "../__builtins__/shared/transform-component.mjs";
|
|
5
|
+
const d = e(
|
|
6
|
+
t,
|
|
7
|
+
o(
|
|
8
|
+
{
|
|
9
|
+
disabled: !0
|
|
10
|
+
},
|
|
11
|
+
(r) => r.readOnly ? {
|
|
12
|
+
...r,
|
|
13
|
+
disabled: !0
|
|
14
|
+
} : r
|
|
15
|
+
),
|
|
16
|
+
a(i.ColorPicker)
|
|
17
|
+
);
|
|
18
|
+
export {
|
|
19
|
+
d as ColorPickerPanel,
|
|
20
|
+
d as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/color-picker-panel/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElColorPickerPanel } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nexport type ColorPickerPanelProps = typeof ElColorPickerPanel\r\n\r\nexport const ColorPickerPanel = connect<typeof ElColorPickerPanel>(\r\n ElColorPickerPanel,\r\n mapProps(\r\n {\r\n disabled: true,\r\n },\r\n (props: any) => {\r\n if (!props.readOnly) {\r\n return props\r\n }\r\n\r\n return {\r\n ...props,\r\n disabled: true,\r\n }\r\n },\r\n ),\r\n mapReadPretty(PreviewText.ColorPicker),\r\n)\r\n\r\nexport default ColorPickerPanel\r\n"],"names":["ColorPickerPanel","connect","ElColorPickerPanel","mapProps","props","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAAmBC;AAAA,EAC9BC;AAAA,EACAC;AAAA,IACE;AAAA,MACE,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACC,MACMA,EAAM,WAIJ;AAAA,MACL,GAAGA;AAAA,MACH,UAAU;AAAA,IAAA,IALHA;AAAA,EAOX;AAAA,EAEFC,EAAcC,EAAY,WAAW;AACvC;"}
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import { connect as r, mapProps as
|
|
2
|
-
import { ElDatePicker as
|
|
1
|
+
import { connect as r, mapProps as a } from "@silver-formily/vue";
|
|
2
|
+
import { ElDatePicker as m } from "element-plus";
|
|
3
3
|
import { PreviewText as o } from "../preview-text/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
case "year":
|
|
10
|
-
case "years":
|
|
11
|
-
case "yearrange":
|
|
12
|
-
return "YYYY";
|
|
13
|
-
case "month":
|
|
14
|
-
case "months":
|
|
15
|
-
case "monthrange":
|
|
16
|
-
return "YYYY-MM";
|
|
17
|
-
case "week":
|
|
18
|
-
return "ww";
|
|
19
|
-
case "date":
|
|
20
|
-
case "dates":
|
|
21
|
-
case "daterange":
|
|
22
|
-
return "YYYY-MM-DD";
|
|
23
|
-
case "datetime":
|
|
24
|
-
case "datetimerange":
|
|
25
|
-
return "YYYY-MM-DD HH:mm:ss";
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const d = r(
|
|
29
|
-
n,
|
|
30
|
-
m(
|
|
4
|
+
import { getDefaultFormat as t } from "./utils.mjs";
|
|
5
|
+
import { mapReadPretty as i } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
+
const n = r(
|
|
7
|
+
m,
|
|
8
|
+
a(
|
|
31
9
|
{
|
|
32
10
|
readOnly: "readonly",
|
|
33
11
|
disabled: !0,
|
|
@@ -35,14 +13,14 @@ const d = r(
|
|
|
35
13
|
},
|
|
36
14
|
(e) => ({
|
|
37
15
|
...e,
|
|
38
|
-
format: e.format ||
|
|
39
|
-
valueFormat: e.valueFormat ||
|
|
16
|
+
format: e.format || t(e.type),
|
|
17
|
+
valueFormat: e.valueFormat || t(e.type, "valueFormat")
|
|
40
18
|
})
|
|
41
19
|
),
|
|
42
|
-
|
|
20
|
+
i(o.DatePicker)
|
|
43
21
|
);
|
|
44
22
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
23
|
+
n as DatePicker,
|
|
24
|
+
n as default
|
|
47
25
|
};
|
|
48
26
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/date-picker/index.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/date-picker/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElDatePicker } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport { getDefaultFormat } from './utils'\r\n\r\nexport const DatePicker = connect<typeof ElDatePicker>(\r\n ElDatePicker,\r\n mapProps(\r\n {\r\n readOnly: 'readonly',\r\n disabled: true,\r\n editable: true,\r\n },\r\n (props: any) => {\r\n return {\r\n ...props,\r\n format: props.format || getDefaultFormat(props.type),\r\n valueFormat:\r\n props.valueFormat || getDefaultFormat(props.type, 'valueFormat'),\r\n }\r\n },\r\n ),\r\n mapReadPretty(PreviewText.DatePicker),\r\n)\r\n\r\nexport default DatePicker\r\n"],"names":["DatePicker","connect","ElDatePicker","mapProps","props","getDefaultFormat","mapReadPretty","PreviewText"],"mappings":";;;;;AAMO,MAAMA,IAAaC;AAAA,EACxBC;AAAA,EACAC;AAAA,IACE;AAAA,MACE,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACC,OACQ;AAAA,MACL,GAAGA;AAAA,MACH,QAAQA,EAAM,UAAUC,EAAiBD,EAAM,IAAI;AAAA,MACnD,aACEA,EAAM,eAAeC,EAAiBD,EAAM,MAAM,aAAa;AAAA,IAAA;AAAA,EAErE;AAAA,EAEFE,EAAcC,EAAY,UAAU;AACtC;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DatePickerProps } from 'element-plus';
|
|
2
|
+
type FormatType = 'format' | 'valueFormat';
|
|
3
|
+
export declare function getDefaultFormat(type?: DatePickerProps['type'], formatType?: FormatType): "YYYY" | "YYYY-MM" | "[Week] ww" | "YYYY-MM-DD" | "YYYY-MM-DD HH:mm:ss" | "ww";
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function t(e = "date", a = "format") {
|
|
2
|
+
if (e === "week" && a === "format")
|
|
3
|
+
return "[Week] ww";
|
|
4
|
+
switch (e) {
|
|
5
|
+
case "year":
|
|
6
|
+
case "years":
|
|
7
|
+
case "yearrange":
|
|
8
|
+
return "YYYY";
|
|
9
|
+
case "month":
|
|
10
|
+
case "months":
|
|
11
|
+
case "monthrange":
|
|
12
|
+
return "YYYY-MM";
|
|
13
|
+
case "week":
|
|
14
|
+
return "ww";
|
|
15
|
+
case "date":
|
|
16
|
+
case "dates":
|
|
17
|
+
case "daterange":
|
|
18
|
+
return "YYYY-MM-DD";
|
|
19
|
+
case "datetime":
|
|
20
|
+
case "datetimerange":
|
|
21
|
+
return "YYYY-MM-DD HH:mm:ss";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
t as getDefaultFormat
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/date-picker/utils.ts"],"sourcesContent":["import type { DatePickerProps } from 'element-plus'\r\n\r\ntype FormatType = 'format' | 'valueFormat'\r\n\r\nexport function getDefaultFormat(type: DatePickerProps['type'] = 'date', formatType: FormatType = 'format') {\r\n if (type === 'week' && formatType === 'format') {\r\n return '[Week] ww'\r\n }\r\n else {\r\n switch (type) {\r\n case 'year':\r\n case 'years':\r\n case 'yearrange': {\r\n return 'YYYY'\r\n }\r\n case 'month':\r\n case 'months':\r\n case 'monthrange': {\r\n return 'YYYY-MM'\r\n }\r\n case 'week': {\r\n return 'ww'\r\n }\r\n case 'date':\r\n case 'dates':\r\n case 'daterange': {\r\n return 'YYYY-MM-DD'\r\n }\r\n case 'datetime':\r\n case 'datetimerange': {\r\n return 'YYYY-MM-DD HH:mm:ss'\r\n }\r\n }\r\n }\r\n}\r\n"],"names":["getDefaultFormat","type","formatType"],"mappings":"AAIO,SAASA,EAAiBC,IAAgC,QAAQC,IAAyB,UAAU;AAC1G,MAAID,MAAS,UAAUC,MAAe;AACpC,WAAO;AAGP,UAAQD,GAAA;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,EACT;AAGN;"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare const DatePickerPanel: import('element-plus/es/utils/index.mjs').SFCWithInstall<import('vue').DefineComponent<{
|
|
2
|
+
readonly disabledDate: {
|
|
3
|
+
readonly type: import('vue').PropType<Function>;
|
|
4
|
+
readonly required: false;
|
|
5
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
6
|
+
__epPropKey: true;
|
|
7
|
+
};
|
|
8
|
+
readonly cellClassName: {
|
|
9
|
+
readonly type: import('vue').PropType<Function>;
|
|
10
|
+
readonly required: false;
|
|
11
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
12
|
+
__epPropKey: true;
|
|
13
|
+
};
|
|
14
|
+
readonly shortcuts: import('element-plus/es/utils/index.mjs').EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
15
|
+
readonly arrowControl: BooleanConstructor;
|
|
16
|
+
readonly unlinkPanels: BooleanConstructor;
|
|
17
|
+
readonly showNow: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
18
|
+
readonly showConfirm: BooleanConstructor;
|
|
19
|
+
readonly showFooter: BooleanConstructor;
|
|
20
|
+
readonly showWeekNumber: BooleanConstructor;
|
|
21
|
+
readonly type: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType))[], unknown, unknown, "date", boolean>;
|
|
22
|
+
readonly clearable: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
23
|
+
readonly border: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
24
|
+
readonly editable: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
25
|
+
readonly disabledHours: {
|
|
26
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledHours>;
|
|
27
|
+
readonly required: false;
|
|
28
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
|
+
__epPropKey: true;
|
|
30
|
+
};
|
|
31
|
+
readonly disabledMinutes: {
|
|
32
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledMinutes>;
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
|
+
__epPropKey: true;
|
|
36
|
+
};
|
|
37
|
+
readonly disabledSeconds: {
|
|
38
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledSeconds>;
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
|
+
__epPropKey: true;
|
|
42
|
+
};
|
|
43
|
+
readonly valueFormat: StringConstructor;
|
|
44
|
+
readonly dateFormat: StringConstructor;
|
|
45
|
+
readonly timeFormat: StringConstructor;
|
|
46
|
+
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
47
|
+
readonly modelValue: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType))[], unknown, unknown, "", boolean>;
|
|
48
|
+
readonly defaultValue: {
|
|
49
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>))[], unknown, unknown>>;
|
|
50
|
+
readonly required: false;
|
|
51
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
52
|
+
__epPropKey: true;
|
|
53
|
+
};
|
|
54
|
+
readonly defaultTime: {
|
|
55
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>))[], unknown, unknown>>;
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
58
|
+
__epPropKey: true;
|
|
59
|
+
};
|
|
60
|
+
readonly isRange: BooleanConstructor;
|
|
61
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("clear" | "update:modelValue" | "visible-change" | "calendar-change" | "panel-change")[], "clear" | "update:modelValue" | "visible-change" | "calendar-change" | "panel-change", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
62
|
+
readonly disabledDate: {
|
|
63
|
+
readonly type: import('vue').PropType<Function>;
|
|
64
|
+
readonly required: false;
|
|
65
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
66
|
+
__epPropKey: true;
|
|
67
|
+
};
|
|
68
|
+
readonly cellClassName: {
|
|
69
|
+
readonly type: import('vue').PropType<Function>;
|
|
70
|
+
readonly required: false;
|
|
71
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
72
|
+
__epPropKey: true;
|
|
73
|
+
};
|
|
74
|
+
readonly shortcuts: import('element-plus/es/utils/index.mjs').EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
75
|
+
readonly arrowControl: BooleanConstructor;
|
|
76
|
+
readonly unlinkPanels: BooleanConstructor;
|
|
77
|
+
readonly showNow: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
78
|
+
readonly showConfirm: BooleanConstructor;
|
|
79
|
+
readonly showFooter: BooleanConstructor;
|
|
80
|
+
readonly showWeekNumber: BooleanConstructor;
|
|
81
|
+
readonly type: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType))[], unknown, unknown, "date", boolean>;
|
|
82
|
+
readonly clearable: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
83
|
+
readonly border: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
84
|
+
readonly editable: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
85
|
+
readonly disabledHours: {
|
|
86
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledHours>;
|
|
87
|
+
readonly required: false;
|
|
88
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
|
+
__epPropKey: true;
|
|
90
|
+
};
|
|
91
|
+
readonly disabledMinutes: {
|
|
92
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledMinutes>;
|
|
93
|
+
readonly required: false;
|
|
94
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
95
|
+
__epPropKey: true;
|
|
96
|
+
};
|
|
97
|
+
readonly disabledSeconds: {
|
|
98
|
+
readonly type: import('vue').PropType<import('element-plus').GetDisabledSeconds>;
|
|
99
|
+
readonly required: false;
|
|
100
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
101
|
+
__epPropKey: true;
|
|
102
|
+
};
|
|
103
|
+
readonly valueFormat: StringConstructor;
|
|
104
|
+
readonly dateFormat: StringConstructor;
|
|
105
|
+
readonly timeFormat: StringConstructor;
|
|
106
|
+
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
107
|
+
readonly modelValue: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType))[], unknown, unknown, "", boolean>;
|
|
108
|
+
readonly defaultValue: {
|
|
109
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>))[], unknown, unknown>>;
|
|
110
|
+
readonly required: false;
|
|
111
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
112
|
+
__epPropKey: true;
|
|
113
|
+
};
|
|
114
|
+
readonly defaultTime: {
|
|
115
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import('element-plus').SingleOrRange<Date>))[], unknown, unknown>>;
|
|
116
|
+
readonly required: false;
|
|
117
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
118
|
+
__epPropKey: true;
|
|
119
|
+
};
|
|
120
|
+
readonly isRange: BooleanConstructor;
|
|
121
|
+
}>> & {
|
|
122
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
123
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
124
|
+
"onCalendar-change"?: ((...args: any[]) => any) | undefined;
|
|
125
|
+
"onPanel-change"?: ((...args: any[]) => any) | undefined;
|
|
126
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
129
|
+
readonly border: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
130
|
+
readonly type: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import('element-plus').DatePickerType))[], unknown, unknown>;
|
|
131
|
+
readonly modelValue: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => import('element-plus').ModelValueType))[], unknown, unknown>;
|
|
132
|
+
readonly clearable: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
133
|
+
readonly editable: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
134
|
+
readonly shortcuts: unknown[];
|
|
135
|
+
readonly showNow: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
136
|
+
readonly showConfirm: boolean;
|
|
137
|
+
readonly showFooter: boolean;
|
|
138
|
+
readonly showWeekNumber: boolean;
|
|
139
|
+
readonly arrowControl: boolean;
|
|
140
|
+
readonly unlinkPanels: boolean;
|
|
141
|
+
readonly isRange: boolean;
|
|
142
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
143
|
+
export default DatePickerPanel;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { connect as r, mapProps as m } from "@silver-formily/vue";
|
|
2
|
+
import { ElDatePickerPanel as o } from "element-plus";
|
|
3
|
+
import { getDefaultFormat as a } from "../date-picker/utils.mjs";
|
|
4
|
+
import { PreviewText as i } from "../preview-text/index.mjs";
|
|
5
|
+
import { mapReadPretty as l } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
+
const c = r(
|
|
7
|
+
o,
|
|
8
|
+
m(
|
|
9
|
+
{
|
|
10
|
+
disabled: !0,
|
|
11
|
+
editable: !0
|
|
12
|
+
},
|
|
13
|
+
(e) => {
|
|
14
|
+
const t = {};
|
|
15
|
+
return e.readOnly && (t.editable = !1), e.valueFormat || (t.valueFormat = a(e.type, "valueFormat")), e.dateFormat || (t.dateFormat = a(e.type)), {
|
|
16
|
+
...e,
|
|
17
|
+
...t
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
l(i.DatePicker)
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
c as DatePickerPanel,
|
|
25
|
+
c as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/date-picker-panel/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElDatePickerPanel } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { getDefaultFormat } from '../date-picker/utils'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nexport const DatePickerPanel = connect<typeof ElDatePickerPanel>(\r\n ElDatePickerPanel,\r\n mapProps(\r\n {\r\n disabled: true,\r\n editable: true,\r\n },\r\n (props: any) => {\r\n const next: Record<string, any> = {}\r\n\r\n if (props.readOnly) {\r\n next.editable = false\r\n }\r\n\r\n if (!props.valueFormat) {\r\n next.valueFormat = getDefaultFormat(props.type, 'valueFormat')\r\n }\r\n\r\n if (!props.dateFormat) {\r\n next.dateFormat = getDefaultFormat(props.type)\r\n }\r\n\r\n return {\r\n ...props,\r\n ...next,\r\n }\r\n },\r\n ),\r\n mapReadPretty(PreviewText.DatePicker),\r\n)\r\n\r\nexport default DatePickerPanel\r\n"],"names":["DatePickerPanel","connect","ElDatePickerPanel","mapProps","props","next","getDefaultFormat","mapReadPretty","PreviewText"],"mappings":";;;;;AAMO,MAAMA,IAAkBC;AAAA,EAC7BC;AAAA,EACAC;AAAA,IACE;AAAA,MACE,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACC,MAAe;AACd,YAAMC,IAA4B,CAAA;AAElC,aAAID,EAAM,aACRC,EAAK,WAAW,KAGbD,EAAM,gBACTC,EAAK,cAAcC,EAAiBF,EAAM,MAAM,aAAa,IAG1DA,EAAM,eACTC,EAAK,aAAaC,EAAiBF,EAAM,IAAI,IAGxC;AAAA,QACL,GAAGA;AAAA,QACH,GAAGC;AAAA,MAAA;AAAA,IAEP;AAAA,EAAA;AAAA,EAEFE,EAAcC,EAAY,UAAU;AACtC;"}
|
package/esm/env.d.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -35,8 +35,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
35
35
|
default: boolean;
|
|
36
36
|
};
|
|
37
37
|
}>> & Readonly<{}>, {
|
|
38
|
-
gutter: number;
|
|
39
38
|
align: string;
|
|
39
|
+
gutter: number;
|
|
40
40
|
alignFormItem: boolean;
|
|
41
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
42
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -13,8 +13,8 @@ export declare const FormButtonGroup: {
|
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
15
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
16
|
-
gutter: number;
|
|
17
16
|
align: string;
|
|
17
|
+
gutter: number;
|
|
18
18
|
alignFormItem: boolean;
|
|
19
19
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
20
20
|
P: {};
|
|
@@ -37,8 +37,8 @@ export declare const FormButtonGroup: {
|
|
|
37
37
|
default: boolean;
|
|
38
38
|
};
|
|
39
39
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
40
|
-
gutter: number;
|
|
41
40
|
align: string;
|
|
41
|
+
gutter: number;
|
|
42
42
|
alignFormItem: boolean;
|
|
43
43
|
}>;
|
|
44
44
|
__isFragment?: never;
|
|
@@ -58,8 +58,8 @@ export declare const FormButtonGroup: {
|
|
|
58
58
|
default: boolean;
|
|
59
59
|
};
|
|
60
60
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
61
|
-
gutter: number;
|
|
62
61
|
align: string;
|
|
62
|
+
gutter: number;
|
|
63
63
|
alignFormItem: boolean;
|
|
64
64
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
65
65
|
$slots: {
|