cnhis-design-vue 3.1.44-beta.5 → 3.1.44-beta.7
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/es/components/base-search/style/index.css +1 -1
- package/es/components/classification/index.d.ts +4 -2
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +4 -2
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +4 -2
- package/es/components/classification/src/index.vue.d.ts +4 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/iho-select-label/index.d.ts +10 -4
- package/es/components/iho-select-label/src/LabelFormContent.vue.d.ts +5 -2
- package/es/components/iho-select-label/src/SelectLabel.vue.d.ts +5 -2
- package/es/components/iho-select-label/src/components/label-classify.vue.d.ts +5 -2
- package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- package/es/components/index.css +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +4 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +4 -2
- package/es/components/table-filter/src/components/render-widget/basicData.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/{DateRange.vue.d.ts → DateRangeInner.vue.d.ts} +1 -14
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +141 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -2
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +28 -7
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -14
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +4 -2
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
form: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => void;
|
|
6
|
+
};
|
|
7
|
+
item: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => void;
|
|
10
|
+
};
|
|
11
|
+
isLock: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => void;
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => void;
|
|
23
|
+
};
|
|
24
|
+
isLock: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
item: Record<string, any>;
|
|
32
|
+
isLock: boolean;
|
|
33
|
+
form: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
form: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
item: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
isLock: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
isLock: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
item: Record<string, any>;
|
|
32
|
+
isLock: boolean;
|
|
33
|
+
form: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
changeSize: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
closable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
modalWidth: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
modalHeight: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
handleOk: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
cancel: {
|
|
28
|
+
type: FunctionConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
visible: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
36
|
+
title: {
|
|
37
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
changeSize: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
closable: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
modalWidth: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
modalHeight: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
handleOk: {
|
|
57
|
+
type: FunctionConstructor;
|
|
58
|
+
default: () => {};
|
|
59
|
+
};
|
|
60
|
+
cancel: {
|
|
61
|
+
type: FunctionConstructor;
|
|
62
|
+
default: () => {};
|
|
63
|
+
};
|
|
64
|
+
visible: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
}>> & {
|
|
69
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
closable: boolean;
|
|
73
|
+
title: string | Function;
|
|
74
|
+
visible: boolean;
|
|
75
|
+
modalWidth: string;
|
|
76
|
+
modalHeight: string;
|
|
77
|
+
handleOk: Function;
|
|
78
|
+
cancel: Function;
|
|
79
|
+
changeSize: boolean;
|
|
80
|
+
}>;
|
|
81
|
+
export default _default;
|
|
82
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -51,8 +51,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
51
|
DATE_TIME: string;
|
|
52
52
|
CHECKBOX_GROUP: string;
|
|
53
53
|
INPUTNUMBER_RANGE: string;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
DATE_RANGE_OUT: string;
|
|
55
|
+
DATE_RANGE_INNER: string;
|
|
56
|
+
DATETIME_RANGE_OUT: string;
|
|
57
|
+
DATETIME_RANGE_INNER: string;
|
|
56
58
|
};
|
|
57
59
|
WidgetValEnums: {
|
|
58
60
|
CUSTOM: string;
|
|
@@ -171,8 +171,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
171
171
|
DATE_TIME: string;
|
|
172
172
|
CHECKBOX_GROUP: string;
|
|
173
173
|
INPUTNUMBER_RANGE: string;
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
DATE_RANGE_OUT: string;
|
|
175
|
+
DATE_RANGE_INNER: string;
|
|
176
|
+
DATETIME_RANGE_OUT: string;
|
|
177
|
+
DATETIME_RANGE_INNER: string;
|
|
176
178
|
};
|
|
177
179
|
WidgetValEnums: {
|
|
178
180
|
CUSTOM: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const l=[{value:"TODAY",label:"今天"},{value:"TOMORROW",label:"明天"},{value:"YESTERDAY",label:"昨天"},{value:"THIS_WEEK",label:"本周"},{value:"NEXT_WEEK",label:"下周"},{value:"
|
|
1
|
+
const l=[{value:"TODAY",label:"今天"},{value:"TOMORROW",label:"明天"},{value:"YESTERDAY",label:"昨天"},{value:"THIS_WEEK",label:"本周"},{value:"NEXT_WEEK",label:"下周"},{value:"LAST_WEEK",label:"上周"},{value:"THIS_MONTH",label:"本月"},{value:"NEXT_MONTH",label:"下月"},{value:"LAST_MONTH",label:"上月"},{value:"THIS_QUARTER",label:"本季度"},{value:"NEXT_QUARTER",label:"下季度"},{value:"LAST_QUARTER",label:"上季度"},{value:"THIS_YEAR",label:"本年"},{value:"NEXT_YEAR",label:"下年"},{value:"LAST_YEAR",label:"上年"}];export{l as DateRangeOptions};
|
|
@@ -5,10 +5,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
type: PropType<ITypeDate>;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
filterExplicit: {
|
|
9
|
-
type: NumberConstructor;
|
|
10
|
-
default: number;
|
|
11
|
-
};
|
|
12
8
|
clearable: {
|
|
13
9
|
type: BooleanConstructor;
|
|
14
10
|
default: boolean;
|
|
@@ -35,10 +31,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
31
|
type: PropType<ITypeDate>;
|
|
36
32
|
default: string;
|
|
37
33
|
};
|
|
38
|
-
filterExplicit: {
|
|
39
|
-
type: NumberConstructor;
|
|
40
|
-
default: number;
|
|
41
|
-
};
|
|
42
34
|
clearable: {
|
|
43
35
|
type: BooleanConstructor;
|
|
44
36
|
default: boolean;
|
|
@@ -64,7 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
56
|
}>>;
|
|
65
57
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
66
58
|
dateList: import("vue").Ref<any[]>;
|
|
67
|
-
|
|
59
|
+
isShowDateRange: import("vue").Ref<boolean>;
|
|
68
60
|
radioValue: import("vue").Ref<string>;
|
|
69
61
|
startDate: import("vue").Ref<any>;
|
|
70
62
|
endDate: import("vue").Ref<any>;
|
|
@@ -120,10 +112,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
112
|
type: PropType<ITypeDate>;
|
|
121
113
|
default: string;
|
|
122
114
|
};
|
|
123
|
-
filterExplicit: {
|
|
124
|
-
type: NumberConstructor;
|
|
125
|
-
default: number;
|
|
126
|
-
};
|
|
127
115
|
clearable: {
|
|
128
116
|
type: BooleanConstructor;
|
|
129
117
|
default: boolean;
|
|
@@ -149,7 +137,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
149
137
|
}, {
|
|
150
138
|
type: ITypeDate;
|
|
151
139
|
value: string;
|
|
152
|
-
filterExplicit: number;
|
|
153
140
|
clearable: boolean;
|
|
154
141
|
startPlaceholder: string;
|
|
155
142
|
endPlaceholder: string;
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as v,renderList as i,normalizeClass as d,toDisplayString as n,createCommentVNode as o,createVNode as s,unref as c,withCtx as p,createTextVNode as m,createElementVNode as f}from"vue";import{NButton as y}from"naive-ui";import h from"../../../../../date-picker/index.js";import b from"moment";import{isString as g}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";import Y from"../../../../../../_virtual/plugin-vue_export-helper.js";const F={class:"render-widget-date-range"},_={key:0,class:"radio-date-group"},D=["onClick"],M={key:1,class:"date-detail-range"},S=f("span",{class:"divider"},null,-1);var w=Y(e({__name:"DateRangeInner",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const Y=e,w=a([]),P=a(!1),j=a(""),x=a(),C=a(),H=l((()=>{let e="";switch(Y.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),I=l((()=>{let e="";switch(Y.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e}));function O(e,a){switch(a){case"start":x.value=e;break;case"end":C.value=e}const l=x.value?b(x.value).format(H.value):null,t=C.value?b(C.value).format(H.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function R(e){return!!C.value&&e>C.value}function T(e){return!!x.value&&e<x.value}return t((()=>Y.value),(e=>{if(e&&g(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(x.value=b(a.trim()).valueOf()),void(l.trim()&&(C.value=b(l.trim()).valueOf()))}x.value=C.value=null,j.value=""}),{immediate:!0}),function(){const e=k(H.value);w.value=e}(),(a,l)=>(u(),r("div",F,[P.value?o("v-if",!0):(u(),r("div",_,[(u(!0),r(v,null,i(w.value,(e=>(u(),r("span",{key:e.value,class:d(["radio-date-item",j.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,j.value===l?j.value="":j.value=l,void(j.value&&f("update:value",j.value));var l}},n(e.label),11,D)))),128))])),s(c(y),{secondary:"",class:d(P.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>P.value=!P.value)},{default:p((()=>[m(n(c(I)),1)])),_:1},8,["class"]),P.value?(u(),r("div",M,[s(c(h),{type:e.type,"default-time":"00:00:00",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:x.value,"is-date-disabled":R,"onUpdate:value":l[1]||(l[1]=e=>O(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),S,s(c(h),{type:e.type,"default-time":"23:59:59",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:C.value,"is-date-disabled":T,"onUpdate:value":l[2]||(l[2]=e=>O(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):o("v-if",!0)]))}}),[["__file","DateRangeInner.vue"]]);export{w as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare type ITypeDate = 'daterange' | 'datetimerange';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
type: {
|
|
5
|
+
type: PropType<ITypeDate>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
clearable: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
startPlaceholder: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
endPlaceholder: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
componentCfg: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
value: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}, {
|
|
29
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
type: {
|
|
31
|
+
type: PropType<ITypeDate>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
clearable: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
startPlaceholder: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
endPlaceholder: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
componentCfg: {
|
|
47
|
+
type: ObjectConstructor;
|
|
48
|
+
default: () => {};
|
|
49
|
+
};
|
|
50
|
+
value: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
}>> & {
|
|
55
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
}>>;
|
|
57
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
58
|
+
valueCp: import("vue").Ref<any>;
|
|
59
|
+
dateFormat: import("vue").ComputedRef<string>;
|
|
60
|
+
rangeShortcuts: {
|
|
61
|
+
今天: number[];
|
|
62
|
+
昨天: number[];
|
|
63
|
+
近一周: number[];
|
|
64
|
+
近一月: number[];
|
|
65
|
+
};
|
|
66
|
+
handleChange: (val: any) => void;
|
|
67
|
+
CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
68
|
+
updateUnchangedValue: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
};
|
|
71
|
+
onConfirm: {
|
|
72
|
+
type: FunctionConstructor;
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
attrs: {
|
|
76
|
+
[x: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
79
|
+
updateUnchangedValue: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
};
|
|
82
|
+
onConfirm: {
|
|
83
|
+
type: FunctionConstructor;
|
|
84
|
+
};
|
|
85
|
+
}>> & {}>>;
|
|
86
|
+
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
87
|
+
panelInstRef: import("vue").Ref<null>;
|
|
88
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
89
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
90
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
91
|
+
focus: () => any;
|
|
92
|
+
blur: () => any;
|
|
93
|
+
onUpdateShow: (show: boolean) => void;
|
|
94
|
+
onConfirm: (...args: any[]) => void;
|
|
95
|
+
NDatePicker: any;
|
|
96
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
97
|
+
updateUnchangedValue: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
};
|
|
100
|
+
onConfirm: {
|
|
101
|
+
type: FunctionConstructor;
|
|
102
|
+
};
|
|
103
|
+
}>>, {
|
|
104
|
+
updateUnchangedValue: boolean;
|
|
105
|
+
}>>;
|
|
106
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
107
|
+
type: {
|
|
108
|
+
type: PropType<ITypeDate>;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
clearable: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
startPlaceholder: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
default: string;
|
|
118
|
+
};
|
|
119
|
+
endPlaceholder: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
componentCfg: {
|
|
124
|
+
type: ObjectConstructor;
|
|
125
|
+
default: () => {};
|
|
126
|
+
};
|
|
127
|
+
value: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
131
|
+
}>> & {
|
|
132
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
type: ITypeDate;
|
|
135
|
+
value: string;
|
|
136
|
+
clearable: boolean;
|
|
137
|
+
startPlaceholder: string;
|
|
138
|
+
endPlaceholder: string;
|
|
139
|
+
componentCfg: Record<string, any>;
|
|
140
|
+
}>;
|
|
141
|
+
export default _default;
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as d}from"vue";import o from"../../../../../date-picker/index.js";import s from"moment";import{isString as n}from"lodash-es";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var p=f(e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const p=e,c=a(),v=t((()=>{let e="";switch(p.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),i={"今天":[s().startOf("day").valueOf(),s().endOf("day").valueOf()],"昨天":[s().subtract(1,"days").startOf("day").valueOf(),s().subtract(1,"days").endOf("day").valueOf()],"近一周":[s().subtract(1,"w").valueOf(),s().valueOf()],"近一月":[s().subtract(1,"months").valueOf(),s().valueOf()]};function m(e){if(e){const[a,t]=e,l=`${s(a).format(v.value)} ~ ${s(t).format(v.value)}`;f("update:value",l)}else f("update:value",e)}return l((()=>p.value),(e=>{if(e&&n(e)&&e.includes("~")){const[a,t]=e.split("~");c.value=[s(a.trim()).valueOf(),s(t.trim()).valueOf()]}else c.value=null}),{immediate:!0}),(a,t)=>(r(),u(d(o),{type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:c.value,shortcuts:i,"onUpdate:value":m},null,8,["type","clearable","startPlaceholder","endPlaceholder","value"]))}}),[["__file","DateRangeOut.vue"]]);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as l,createBlock as i,unref as o,mergeProps as u,isRef as r,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as v}from"@vueuse/core";import d from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var m=f(e({__name:"Select",props:{value:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:f}){const m=e,{handleGetConfigApi:y}=d(),g=a(),h=t([]),b=t(!1),w=t(!1),A=n({set(e){const a=Array.isArray(e)?e:e?[e]:null;f("update:value",a)},get(){if(Array.isArray(m.value)&&m.value.length>0){const{multiple:e}=g;return e||1!=m.value.length?m.value:m.value[0]}return m.value}});async function I(e){try{if(g.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:l,showKeys:i,valueKey:o}=g.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:l,page:1};l.length>0&&(u[l[0]]=e),w.value=!0;let r=await y(u,"requestDynamicSelect",{},m.filterApiConfig);if(r){const{fieldList:e,rows:a}=r,t=a.map((e=>({...e,label:e[i[0]],value:e[o]})));return h.value=t,t}}}catch(e){console.log(e)}finally{w.value=!1}}const S=v((async e=>{await async function(e){const{manualMapping:a}=g;if(!a){const a=e.trim();await I(a)}}(e)}),300);async function C(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=g;if(e&&Array.isArray(t))return b.value=!1,void(h.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&m.filterApiConfig&&(b.value=!0,await I(""))}function O(e){const{manualMapping:a}=g;if(a)return s("div",e.label);const{showKeys:t=[]}=g.dynamicOptionInfo;return g.dynamicOptionInfo&&t.length>0?s("div",{class:"select-widget-dynamic-option"},t.map((a=>s("span",{class:"select-widget-dynamic-item"},e[a])))):s("div",e.label)}function _({option:e,handleClose:a}){const{multiple:t}=g;return t?s(p,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>s("div",e.label)}):s("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:l}=g;await C();const i=Array.isArray(m.value)?m.value.length>0:m.value;if(!l&&!i){if(e)return f("update:value",a),void f("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=h.value[0];f("update:value",[e.value]),f("changeInitState",n,!0);break}}}}(),(e,a)=>(l(),i(o(c),u(o(g),{value:o(A),"onUpdate:value":a[0]||(a[0]=e=>r(A)?A.value=e:null),loading:w.value,options:h.value,remote:b.value,"render-label":O,"render-tag":_,onSearch:o(S),onClear:C}),null,16,["value","loading","options","remote","onSearch"]))}}),[["__file","Select.vue"]]);export{m as default};
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as l,createBlock as i,unref as o,mergeProps as u,isRef as r,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as v}from"@vueuse/core";import d from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var m=f(e({__name:"Select",props:{value:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:f}){const m=e,{handleGetConfigApi:y}=d(),g=a(),h=t([]),b=t(!1),w=t(!1),A=n({set(e){const a=Array.isArray(e)?e:e?[e]:null;f("update:value",a)},get(){var e;if(Array.isArray(m.value)&&m.value.length>0){const{multiple:e}=g;return e||1!=m.value.length?m.value:m.value[0]}return null!=(e=m.value)?e:null}});async function I(e){try{if(g.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:l,showKeys:i,valueKey:o}=g.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:l,page:1};l.length>0&&(u[l[0]]=e),w.value=!0;let r=await y(u,"requestDynamicSelect",{},m.filterApiConfig);if(r){const{fieldList:e=[],rows:a=[]}=r,t=a.map((e=>({...e,label:e[i[0]],value:e[o]})));return h.value=t,t}}}catch(e){console.log(e)}finally{w.value=!1}}const S=v((async e=>{await async function(e){const{manualMapping:a}=g;if(!a){const a=e.trim();await I(a)}}(e)}),300);async function C(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=g;if(e&&Array.isArray(t))return b.value=!1,void(h.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&m.filterApiConfig&&(b.value=!0,await I(""))}function O(e){const{manualMapping:a}=g;if(a)return s("div",e.label);const{showKeys:t=[]}=g.dynamicOptionInfo;return g.dynamicOptionInfo&&t.length>0?s("div",{class:"select-widget-dynamic-option"},t.map((a=>s("span",{class:"select-widget-dynamic-item"},e[a])))):s("div",e.label)}function _({option:e,handleClose:a}){const{multiple:t}=g;return t?s(p,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>s("div",e.label)}):s("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:l}=g;await C();const i=Array.isArray(m.value)?m.value.length>0:m.value;if(!l&&!i){if(e)return f("update:value",a),void f("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=h.value[0];f("update:value",[e.value]),f("changeInitState",n,!0);break}}}}(),(e,a)=>(l(),i(o(c),u(o(g),{value:o(A),"onUpdate:value":a[0]||(a[0]=e=>r(A)?A.value=e:null),loading:w.value,options:h.value,remote:b.value,"render-label":O,"render-tag":_,onSearch:o(S),onClear:C}),null,16,["value","loading","options","remote","onSearch"]))}}),[["__file","Select.vue"]]);export{m as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import CheckboxGroup from './CheckboxGroup.vue';
|
|
2
2
|
import InputNumberGroup from './InputNumberGroup.vue';
|
|
3
3
|
import Date from './Date.vue';
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import DateRangeInner from './DateRangeInner.vue';
|
|
5
|
+
import DateRangeOut from './DateRangeOut.vue';
|
|
6
|
+
export { CheckboxGroup, InputNumberGroup, Date, DateRangeInner, DateRangeOut };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as
|
|
1
|
+
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRangeInner}from"./DateRangeInner.vue.js";export{default as DateRangeOut}from"./DateRangeOut.vue.js";
|
|
@@ -15,20 +15,41 @@ export declare const DatePresetValEnums: {
|
|
|
15
15
|
MONTH_START: string;
|
|
16
16
|
MONTH_END: string;
|
|
17
17
|
};
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const DateRangeInnerValEnums: {
|
|
19
19
|
TODAY: string;
|
|
20
20
|
TOMORROW: string;
|
|
21
21
|
YESTERDAY: string;
|
|
22
22
|
THIS_WEEK: string;
|
|
23
23
|
NEXT_WEEK: string;
|
|
24
|
-
|
|
24
|
+
LAST_WEEK: string;
|
|
25
25
|
THIS_MONTH: string;
|
|
26
|
+
LAST_MONTH: string;
|
|
26
27
|
NEXT_MONTH: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
PREV_QUATER: string;
|
|
28
|
+
THIS_QUARTER: string;
|
|
29
|
+
LAST_QUARTER: string;
|
|
30
|
+
NEXT_QUARTER: string;
|
|
31
31
|
THIS_YEAR: string;
|
|
32
|
+
LAST_YEAR: string;
|
|
32
33
|
NEXT_YEAR: string;
|
|
33
|
-
|
|
34
|
+
};
|
|
35
|
+
export declare const DateRangeOutDefEnums: {
|
|
36
|
+
PAST_WEEK: string;
|
|
37
|
+
PAST_MONTH: string;
|
|
38
|
+
PAST_HALF_YEAR: string;
|
|
39
|
+
TODAY: string;
|
|
40
|
+
TOMORROW: string;
|
|
41
|
+
YESTERDAY: string;
|
|
42
|
+
THIS_WEEK: string;
|
|
43
|
+
NEXT_WEEK: string;
|
|
44
|
+
LAST_WEEK: string;
|
|
45
|
+
THIS_MONTH: string;
|
|
46
|
+
LAST_MONTH: string;
|
|
47
|
+
NEXT_MONTH: string;
|
|
48
|
+
THIS_QUARTER: string;
|
|
49
|
+
LAST_QUARTER: string;
|
|
50
|
+
NEXT_QUARTER: string;
|
|
51
|
+
THIS_YEAR: string;
|
|
52
|
+
LAST_YEAR: string;
|
|
53
|
+
NEXT_YEAR: string;
|
|
54
|
+
CUSTOM: string;
|
|
34
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"},E={TODAY:"TODAY",TOMORROW:"TOMORROW",YESTERDAY:"YESTERDAY",THIS_WEEK:"THIS_WEEK",NEXT_WEEK:"NEXT_WEEK",
|
|
1
|
+
const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"},E={TODAY:"TODAY",TOMORROW:"TOMORROW",YESTERDAY:"YESTERDAY",THIS_WEEK:"THIS_WEEK",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",LAST_MONTH:"LAST_MONTH",NEXT_MONTH:"NEXT_MONTH",THIS_QUARTER:"THIS_QUARTER",LAST_QUARTER:"LAST_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",THIS_YEAR:"THIS_YEAR",LAST_YEAR:"LAST_YEAR",NEXT_YEAR:"NEXT_YEAR"},A={CUSTOM:"CUSTOM",...E,PAST_WEEK:"PAST_WEEK",PAST_MONTH:"PAST_MONTH",PAST_HALF_YEAR:"PAST_HALF_YEAR"};export{T as DatePresetValEnums,E as DateRangeInnerValEnums,A as DateRangeOutDefEnums};
|
package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const getAllDateRangeInfo: (format?: string) => {
|
|
|
4
4
|
value: string | number | never[];
|
|
5
5
|
}[];
|
|
6
6
|
export declare const formatDateRangeInfo: (key: string, format?: string) => string | number | never[];
|
|
7
|
+
export declare const presetValToDateRangestr: (presetVal: string, format?: string) => string | null;
|
package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DateRangeOutDefEnums as t,DatePresetValEnums as a,DateRangeInnerValEnums as r}from"../enums.js";import{DateRangeOptions as d}from"../basicData.js";import e from"moment";const s=new Map([[a.NOW,()=>e()],[a.TODAY,()=>e().startOf("day")],[a.TODAY_START,()=>e().startOf("day")],[a.TODAY_END,()=>e().endOf("day")],[a.TOMORROW,()=>e().add(1,"days").startOf("day")],[a.TOMORROW_START,()=>e().add(1,"days").startOf("day")],[a.TOMORROW_END,()=>e().add(1,"days").endOf("day")],[a.YESTERDAY,()=>e().subtract(1,"days").startOf("day")],[a.YESTERDAY_START,()=>e().subtract(1,"days").startOf("day")],[a.YESTERDAY_END,()=>e().subtract(1,"days").endOf("day")],[a.WEEK_START,()=>e().startOf("week")],[a.WEEK_END,()=>e().endOf("week")],[a.MONTH_START,()=>e().startOf("month")],[a.MONTH_END,()=>e().endOf("month")]]),O=(t,a="x")=>{if(!s.has(t))return;const r=s.get(t)().format(a);return"x"===a||"X"===a?Number(r):r},n=new Map([[r.TODAY,()=>[e().startOf("day"),e().endOf("day")]],[r.TOMORROW,()=>[e().add(1,"days").startOf("day"),e().add(1,"days").endOf("day")]],[r.YESTERDAY,()=>[e().subtract(1,"days").startOf("day"),e().subtract(1,"days").endOf("day")]],[r.THIS_WEEK,()=>[e().startOf("week"),e().endOf("week")]],[r.NEXT_WEEK,()=>[e().add(1,"w").startOf("week"),e().add(1,"w").endOf("week")]],[r.LAST_WEEK,()=>[e().subtract(1,"w").startOf("week"),e().subtract(1,"w").endOf("week")]],[r.THIS_MONTH,()=>[e().startOf("month"),e().endOf("month")]],[r.NEXT_MONTH,()=>[e().add(1,"months").startOf("month"),e().add(1,"months").endOf("month")]],[r.LAST_MONTH,()=>[e().subtract(1,"months").startOf("month"),e().subtract(1,"months").endOf("month")]],[r.THIS_QUARTER,()=>[e().startOf("quarter"),e().endOf("quarter")]],[r.NEXT_QUARTER,()=>[e().add(1,"Q").startOf("quarter"),e().add(1,"Q").endOf("quarter")]],[r.LAST_QUARTER,()=>[e().subtract(1,"Q").startOf("quarter"),e().subtract(1,"Q").endOf("quarter")]],[r.THIS_YEAR,()=>[e().startOf("year"),e().endOf("year")]],[r.NEXT_YEAR,()=>[e().add(1,"y").startOf("year"),e().add(1,"y").endOf("year")]],[r.LAST_YEAR,()=>[e().subtract(1,"y").startOf("year"),e().subtract(1,"y").endOf("year")]]]),f=(t="x")=>d.map((a=>{const r=T(a.value,t);return{label:a.label,value:r}})),T=(t,a="x")=>{const r=n.get(t);if(r){const[t,d]=r(),e=`${t.format(a)} ~ ${d.format(a)}`;return"x"===a||"X"===a?Number(e):e}return[]},u=new Map([...n,[t.PAST_WEEK,()=>[e().subtract(1,"w"),e()]],[t.PAST_MONTH,()=>[e().subtract(1,"months"),e()]],[t.PAST_HALF_YEAR,()=>[e().subtract(6,"months"),e()]]]),E=(t,a="x")=>{if(!u.has(t))return null;const r=u.get(t);if(r){const[t,d]=r();return`${t.format(a)} ~ ${d.format(a)}`}return null};export{T as formatDateRangeInfo,f as getAllDateRangeInfo,E as presetValToDateRangestr,O as presetValToTimestamp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as
|
|
1
|
+
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:r}=e;if(a.includes(t))return;const l=i.SELECT===t&&n.multiple?"200px":"100%";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:r,title:a,placeholder:l,widgetCfg:o,filterExplicit:s}=e,{props:p,handlerProps:h}=n.get(i);let d={...p};h&&(d=h(d,{...o,title:r||a,_frontId:t,filterExplicit:s})),l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:r}=e,{component:a,style:l,eventsBySearch:o=[]}=n.get(i),s={...this.initialProps,value:r,componentCfg:e,filterApiConfig:this.filterApiConfig},p=o.reduce(((e,t)=>{const{name:i,handler:n}=t;let r=this.search;return n&&(r=e=>{n(e,this.search,s)}),{...e,[`on${i}`]:r}}),{});return t(a,{...l,...s,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
|