@uzum-tech/ui 1.1.4 → 1.2.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.md +1 -1
- package/dist/index.js +281 -340
- package/dist/index.prod.js +2 -2
- package/es/_utils/uzum/warn.js +3 -3
- package/es/alert/src/Alert.js +1 -1
- package/es/alert/src/styles/index.cssr.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/DatePicker.js +10 -8
- package/es/date-picker/src/config.d.ts +1 -1
- package/es/date-picker/src/config.js +1 -1
- package/es/date-picker/src/interface.d.ts +7 -5
- package/es/date-picker/src/panel/date.d.ts +10 -7
- package/es/date-picker/src/panel/date.js +38 -18
- package/es/date-picker/src/panel/daterange.d.ts +18 -7
- package/es/date-picker/src/panel/daterange.js +94 -43
- package/es/date-picker/src/panel/datetime.d.ts +3 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +28 -7
- package/es/date-picker/src/panel/panelHeader.js +37 -13
- package/es/date-picker/src/panel/panelMonth.d.ts +16 -8
- package/es/date-picker/src/panel/panelMonth.js +8 -4
- package/es/date-picker/src/panel/panelMonthContent.d.ts +3 -1
- package/es/date-picker/src/panel/panelMonthContent.js +2 -5
- package/es/date-picker/src/panel/panelYear.d.ts +16 -8
- package/es/date-picker/src/panel/panelYear.js +8 -4
- package/es/date-picker/src/panel/panelYearContent.d.ts +3 -1
- package/es/date-picker/src/panel/panelYearContent.js +2 -1
- package/es/date-picker/src/panel/use-calendar.d.ts +4 -3
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/es/date-picker/src/panel/use-panel-common.js +1 -0
- package/es/date-picker/src/styles/index.cssr.js +12 -10
- package/es/date-picker/src/utils.d.ts +1 -0
- package/es/grid/src/Grid.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/preset.d.ts +2 -2
- package/es/preset.js +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_utils/uzum/warn.js +3 -3
- package/lib/alert/src/Alert.js +1 -1
- package/lib/alert/src/styles/index.cssr.js +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.js +9 -7
- package/lib/date-picker/src/config.d.ts +1 -1
- package/lib/date-picker/src/config.js +1 -1
- package/lib/date-picker/src/interface.d.ts +7 -5
- package/lib/date-picker/src/panel/date.d.ts +10 -7
- package/lib/date-picker/src/panel/date.js +37 -17
- package/lib/date-picker/src/panel/daterange.d.ts +18 -7
- package/lib/date-picker/src/panel/daterange.js +93 -42
- package/lib/date-picker/src/panel/datetime.d.ts +3 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +28 -7
- package/lib/date-picker/src/panel/panelHeader.js +37 -13
- package/lib/date-picker/src/panel/panelMonth.d.ts +16 -8
- package/lib/date-picker/src/panel/panelMonth.js +8 -4
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +3 -1
- package/lib/date-picker/src/panel/panelMonthContent.js +2 -5
- package/lib/date-picker/src/panel/panelYear.d.ts +16 -8
- package/lib/date-picker/src/panel/panelYear.js +8 -4
- package/lib/date-picker/src/panel/panelYearContent.d.ts +3 -1
- package/lib/date-picker/src/panel/panelYearContent.js +2 -1
- package/lib/date-picker/src/panel/use-calendar.d.ts +4 -3
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/lib/date-picker/src/panel/use-panel-common.js +1 -0
- package/lib/date-picker/src/styles/index.cssr.js +12 -10
- package/lib/date-picker/src/utils.d.ts +1 -0
- package/lib/grid/src/Grid.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/preset.d.ts +2 -2
- package/lib/preset.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -10
- package/web-types.json +9 -9
- package/es/date-picker/src/panel/monthrange.d.ts +0 -1303
- package/es/date-picker/src/panel/monthrange.js +0 -117
- package/lib/date-picker/src/panel/monthrange.d.ts +0 -1303
- package/lib/date-picker/src/panel/monthrange.js +0 -119
|
@@ -21,14 +21,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
21
21
|
type: String,
|
|
22
22
|
required: true
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
type:
|
|
26
|
-
|
|
27
|
-
}
|
|
24
|
+
isMonth: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
value: false
|
|
27
|
+
},
|
|
28
|
+
isYear: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
value: false
|
|
31
|
+
},
|
|
32
|
+
onUpdateValue: Function,
|
|
33
|
+
onUpdateMonth: Function,
|
|
34
|
+
onUpdateYear: Function
|
|
28
35
|
},
|
|
29
|
-
setup() {
|
|
30
|
-
const monthPanelIsActive = (0, vue_1.ref)(
|
|
31
|
-
const yearPanelIsActive = (0, vue_1.ref)(
|
|
36
|
+
setup(props) {
|
|
37
|
+
const monthPanelIsActive = (0, vue_1.ref)(props.isMonth);
|
|
38
|
+
const yearPanelIsActive = (0, vue_1.ref)(props.isYear);
|
|
32
39
|
function onUpdateMonthPanelIsActive(value) {
|
|
33
40
|
monthPanelIsActive.value = value;
|
|
34
41
|
if (value)
|
|
@@ -36,20 +43,37 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
36
43
|
}
|
|
37
44
|
function onUpdateYearPanelIsActive(value) {
|
|
38
45
|
yearPanelIsActive.value = value;
|
|
39
|
-
if (value)
|
|
46
|
+
if (value && !props.isMonth)
|
|
40
47
|
monthPanelIsActive.value = false;
|
|
41
48
|
}
|
|
49
|
+
function handleUpdateMonth(value, doUpdate, item) {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
(_a = props.onUpdateMonth) === null || _a === void 0 ? void 0 : _a.call(props, value, doUpdate, item);
|
|
52
|
+
(_b = props.onUpdateValue) === null || _b === void 0 ? void 0 : _b.call(props, value, doUpdate, item);
|
|
53
|
+
}
|
|
54
|
+
function handleUpdateYear(value, doUpdate, item) {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
(_a = props.onUpdateYear) === null || _a === void 0 ? void 0 : _a.call(props, value, doUpdate, item);
|
|
57
|
+
(_b = props.onUpdateValue) === null || _b === void 0 ? void 0 : _b.call(props, value, doUpdate, item);
|
|
58
|
+
}
|
|
42
59
|
return {
|
|
43
60
|
monthPanelIsActive,
|
|
44
61
|
yearPanelIsActive,
|
|
45
62
|
onUpdateMonthPanelIsActive,
|
|
46
|
-
onUpdateYearPanelIsActive
|
|
63
|
+
onUpdateYearPanelIsActive,
|
|
64
|
+
handleUpdateMonth,
|
|
65
|
+
handleUpdateYear
|
|
47
66
|
};
|
|
48
67
|
},
|
|
49
68
|
render() {
|
|
50
|
-
const { mergedClsPrefix } = this;
|
|
51
|
-
return ((0, vue_1.h)("div", { class:
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
const { mergedClsPrefix, isYear } = this;
|
|
70
|
+
return ((0, vue_1.h)("div", { class: [
|
|
71
|
+
`${mergedClsPrefix}-date-panel-month`,
|
|
72
|
+
{
|
|
73
|
+
[`${mergedClsPrefix}-date-panel-month--justify-end`]: isYear
|
|
74
|
+
}
|
|
75
|
+
] },
|
|
76
|
+
isYear ? null : ((0, vue_1.h)(panelMonth_1.default, { panelActive: this.monthPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, disabled: this.isMonth, onUpdatePanelActive: this.onUpdateMonthPanelIsActive, onUpdateValue: this.handleUpdateMonth })),
|
|
77
|
+
(0, vue_1.h)(panelYear_1.default, { panelActive: this.yearPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, disabled: this.isYear, onUpdatePanelActive: this.onUpdateYearPanelIsActive, onUpdateValue: this.handleUpdateYear })));
|
|
54
78
|
}
|
|
55
79
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
+
import { OnPanelUpdateValue, PanelValue } from '../interface';
|
|
3
|
+
import { DateCommonItem } from '../utils';
|
|
2
4
|
declare const _default: import("vue").DefineComponent<{
|
|
3
5
|
panelActive: BooleanConstructor;
|
|
4
6
|
mergedClsPrefix: {
|
|
@@ -14,8 +16,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
16
|
type: StringConstructor;
|
|
15
17
|
required: true;
|
|
16
18
|
};
|
|
19
|
+
disabled: BooleanConstructor;
|
|
17
20
|
onUpdateValue: {
|
|
18
|
-
type: PropType<
|
|
21
|
+
type: PropType<OnPanelUpdateValue>;
|
|
19
22
|
required: true;
|
|
20
23
|
};
|
|
21
24
|
onUpdatePanelActive: PropType<(value: boolean) => void>;
|
|
@@ -30,6 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
33
|
actions?: string[] | undefined;
|
|
31
34
|
panel?: boolean | undefined;
|
|
32
35
|
useAsQuickJump?: boolean | undefined;
|
|
36
|
+
readonly type?: import("../config").DatePickerType | undefined;
|
|
33
37
|
key?: string | number | symbol | undefined;
|
|
34
38
|
style?: unknown;
|
|
35
39
|
class?: unknown;
|
|
@@ -80,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
84
|
readonly onTabOut?: Function | undefined;
|
|
81
85
|
readonly onClose?: import("../interface").OnClose | undefined;
|
|
82
86
|
readonly onClear?: Function | undefined;
|
|
83
|
-
readonly onUpdateValue:
|
|
87
|
+
readonly onUpdateValue: OnPanelUpdateValue;
|
|
84
88
|
readonly onConfirm?: ((value: import("../interface").Value | null) => void) | undefined;
|
|
85
89
|
readonly timeFormat?: string | undefined;
|
|
86
90
|
readonly shortcuts?: import("../interface").Shortcuts | undefined;
|
|
@@ -107,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
107
111
|
};
|
|
108
112
|
active: BooleanConstructor;
|
|
109
113
|
dateFormat: StringConstructor;
|
|
114
|
+
type: PropType<import("../config").DatePickerType>;
|
|
110
115
|
timeFormat: {
|
|
111
116
|
readonly type: StringConstructor;
|
|
112
117
|
readonly value: "HH:mm:ss";
|
|
@@ -122,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
127
|
onClose: PropType<import("../interface").OnClose>;
|
|
123
128
|
onTabOut: FunctionConstructor;
|
|
124
129
|
onUpdateValue: {
|
|
125
|
-
readonly type: PropType<
|
|
130
|
+
readonly type: PropType<OnPanelUpdateValue>;
|
|
126
131
|
readonly required: true;
|
|
127
132
|
};
|
|
128
133
|
themeClass: StringConstructor;
|
|
@@ -132,7 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
137
|
renderItem: (item: import("../utils").MonthItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
133
138
|
[key: string]: any;
|
|
134
139
|
}>;
|
|
135
|
-
handleDateClick: (dateItem:
|
|
140
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
136
141
|
handleDateInputBlur: () => void;
|
|
137
142
|
handleDateInput: (value: string) => void;
|
|
138
143
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1350,6 +1355,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1350
1355
|
};
|
|
1351
1356
|
active: BooleanConstructor;
|
|
1352
1357
|
dateFormat: StringConstructor;
|
|
1358
|
+
type: PropType<import("../config").DatePickerType>;
|
|
1353
1359
|
timeFormat: {
|
|
1354
1360
|
readonly type: StringConstructor;
|
|
1355
1361
|
readonly value: "HH:mm:ss";
|
|
@@ -1365,7 +1371,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1365
1371
|
onClose: PropType<import("../interface").OnClose>;
|
|
1366
1372
|
onTabOut: FunctionConstructor;
|
|
1367
1373
|
onUpdateValue: {
|
|
1368
|
-
readonly type: PropType<
|
|
1374
|
+
readonly type: PropType<OnPanelUpdateValue>;
|
|
1369
1375
|
readonly required: true;
|
|
1370
1376
|
};
|
|
1371
1377
|
themeClass: StringConstructor;
|
|
@@ -1375,7 +1381,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1375
1381
|
renderItem: (item: import("../utils").MonthItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1376
1382
|
[key: string]: any;
|
|
1377
1383
|
}>;
|
|
1378
|
-
handleDateClick: (dateItem:
|
|
1384
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
1379
1385
|
handleDateInputBlur: () => void;
|
|
1380
1386
|
handleDateInput: (value: string) => void;
|
|
1381
1387
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -2561,7 +2567,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2561
2567
|
handleSingleShortcutClick: (shortcut: number | [number, number] | (() => number) | readonly [number, number] | (() => [number, number] | readonly [number, number])) => void;
|
|
2562
2568
|
}> & {} & import("vue").ComponentCustomProperties & {}) | null>;
|
|
2563
2569
|
handleHeaderClick: () => void;
|
|
2564
|
-
handleUpdateValue: (value:
|
|
2570
|
+
handleUpdateValue: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
|
|
2565
2571
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2566
2572
|
panelActive: BooleanConstructor;
|
|
2567
2573
|
mergedClsPrefix: {
|
|
@@ -2577,12 +2583,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2577
2583
|
type: StringConstructor;
|
|
2578
2584
|
required: true;
|
|
2579
2585
|
};
|
|
2586
|
+
disabled: BooleanConstructor;
|
|
2580
2587
|
onUpdateValue: {
|
|
2581
|
-
type: PropType<
|
|
2588
|
+
type: PropType<OnPanelUpdateValue>;
|
|
2582
2589
|
required: true;
|
|
2583
2590
|
};
|
|
2584
2591
|
onUpdatePanelActive: PropType<(value: boolean) => void>;
|
|
2585
2592
|
}>>, {
|
|
2593
|
+
disabled: boolean;
|
|
2586
2594
|
panelActive: boolean;
|
|
2587
2595
|
}, {}>;
|
|
2588
2596
|
export default _default;
|
|
@@ -23,6 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
23
23
|
type: String,
|
|
24
24
|
required: true
|
|
25
25
|
},
|
|
26
|
+
disabled: Boolean,
|
|
26
27
|
onUpdateValue: {
|
|
27
28
|
type: Function,
|
|
28
29
|
required: true
|
|
@@ -39,10 +40,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
function handleHeaderClick() {
|
|
43
|
+
if (props.disabled)
|
|
44
|
+
return;
|
|
42
45
|
showRef.value = !showRef.value;
|
|
43
46
|
}
|
|
44
|
-
function handleUpdateValue(value) {
|
|
45
|
-
props.onUpdateValue(value);
|
|
47
|
+
function handleUpdateValue(value, doUpdate, item) {
|
|
48
|
+
props.onUpdateValue(value, doUpdate, item);
|
|
46
49
|
handleHeaderClick();
|
|
47
50
|
}
|
|
48
51
|
return {
|
|
@@ -53,11 +56,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
53
56
|
};
|
|
54
57
|
},
|
|
55
58
|
render() {
|
|
56
|
-
const { mergedClsPrefix } = this;
|
|
59
|
+
const { mergedClsPrefix, disabled } = this;
|
|
57
60
|
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month__month-year` },
|
|
58
61
|
(0, vue_1.h)("div", { class: [
|
|
59
62
|
`${mergedClsPrefix}-date-panel-month__text`,
|
|
60
|
-
this.show && `${mergedClsPrefix}-date-panel-month__text--active
|
|
63
|
+
this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
|
|
64
|
+
disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
|
|
61
65
|
], onClick: this.handleHeaderClick },
|
|
62
66
|
this.calendarMonth,
|
|
63
67
|
(0, vue_1.h)(_internal_1.UBaseIcon, { class: `${mergedClsPrefix}-date-panel-month__icon`, clsPrefix: mergedClsPrefix }, {
|
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
active: BooleanConstructor;
|
|
16
16
|
dateFormat: StringConstructor;
|
|
17
|
+
type: import("vue").PropType<import("../config").DatePickerType>;
|
|
17
18
|
timeFormat: {
|
|
18
19
|
readonly type: StringConstructor;
|
|
19
20
|
readonly value: "HH:mm:ss";
|
|
@@ -37,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
38
|
panel: BooleanConstructor;
|
|
38
39
|
}, {
|
|
39
40
|
renderItem: (item: MonthItem, i: number, mergedClsPrefix: string) => VNode;
|
|
40
|
-
handleDateClick: (dateItem: import("../utils").
|
|
41
|
+
handleDateClick: (dateItem: import("../utils").DateCommonItem) => void;
|
|
41
42
|
handleDateInputBlur: () => void;
|
|
42
43
|
handleDateInput: (value: string) => void;
|
|
43
44
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1235,6 +1236,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1235
1236
|
};
|
|
1236
1237
|
active: BooleanConstructor;
|
|
1237
1238
|
dateFormat: StringConstructor;
|
|
1239
|
+
type: import("vue").PropType<import("../config").DatePickerType>;
|
|
1238
1240
|
timeFormat: {
|
|
1239
1241
|
readonly type: StringConstructor;
|
|
1240
1242
|
readonly value: "HH:mm:ss";
|
|
@@ -32,7 +32,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
32
32
|
useAsQuickJump
|
|
33
33
|
? handleQuickMonthClick(item, (value) => {
|
|
34
34
|
;
|
|
35
|
-
props.onUpdateValue(value, false);
|
|
35
|
+
props.onUpdateValue(value, false, item);
|
|
36
36
|
})
|
|
37
37
|
: handleDateClick(item);
|
|
38
38
|
} }, getRenderContent(item)));
|
|
@@ -51,10 +51,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
51
51
|
this.themeClass
|
|
52
52
|
], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
|
|
53
53
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` }, {
|
|
54
|
-
default: () =>
|
|
55
|
-
this.monthArray.map((item, i) => renderItem(item, i, mergedClsPrefix)),
|
|
56
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month-calendar__padding` })
|
|
57
|
-
]
|
|
54
|
+
default: () => this.monthArray.map((item, i) => renderItem(item, i, mergedClsPrefix))
|
|
58
55
|
}),
|
|
59
56
|
(0, vue_1.h)(_internal_1.UBaseFocusDetector, { onFocus: this.handleFocusDetectorFocus })));
|
|
60
57
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
+
import { OnPanelUpdateValue, PanelValue } from '../interface';
|
|
3
|
+
import { DateCommonItem } from '../utils';
|
|
2
4
|
declare const _default: import("vue").DefineComponent<{
|
|
3
5
|
panelActive: BooleanConstructor;
|
|
4
6
|
mergedClsPrefix: {
|
|
@@ -14,8 +16,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
16
|
type: StringConstructor;
|
|
15
17
|
required: true;
|
|
16
18
|
};
|
|
19
|
+
disabled: BooleanConstructor;
|
|
17
20
|
onUpdateValue: {
|
|
18
|
-
type: PropType<
|
|
21
|
+
type: PropType<OnPanelUpdateValue>;
|
|
19
22
|
required: true;
|
|
20
23
|
};
|
|
21
24
|
onUpdatePanelActive: PropType<(value: boolean) => void>;
|
|
@@ -30,6 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
33
|
actions?: string[] | undefined;
|
|
31
34
|
panel?: boolean | undefined;
|
|
32
35
|
useAsQuickJump?: boolean | undefined;
|
|
36
|
+
readonly type?: import("../config").DatePickerType | undefined;
|
|
33
37
|
key?: string | number | symbol | undefined;
|
|
34
38
|
style?: unknown;
|
|
35
39
|
class?: unknown;
|
|
@@ -80,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
84
|
readonly onTabOut?: Function | undefined;
|
|
81
85
|
readonly onClose?: import("../interface").OnClose | undefined;
|
|
82
86
|
readonly onClear?: Function | undefined;
|
|
83
|
-
readonly onUpdateValue:
|
|
87
|
+
readonly onUpdateValue: OnPanelUpdateValue;
|
|
84
88
|
readonly onConfirm?: ((value: import("../interface").Value | null) => void) | undefined;
|
|
85
89
|
readonly timeFormat?: string | undefined;
|
|
86
90
|
readonly shortcuts?: import("../interface").Shortcuts | undefined;
|
|
@@ -107,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
107
111
|
};
|
|
108
112
|
active: BooleanConstructor;
|
|
109
113
|
dateFormat: StringConstructor;
|
|
114
|
+
type: PropType<import("../config").DatePickerType>;
|
|
110
115
|
timeFormat: {
|
|
111
116
|
readonly type: StringConstructor;
|
|
112
117
|
readonly value: "HH:mm:ss";
|
|
@@ -122,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
127
|
onClose: PropType<import("../interface").OnClose>;
|
|
123
128
|
onTabOut: FunctionConstructor;
|
|
124
129
|
onUpdateValue: {
|
|
125
|
-
readonly type: PropType<
|
|
130
|
+
readonly type: PropType<OnPanelUpdateValue>;
|
|
126
131
|
readonly required: true;
|
|
127
132
|
};
|
|
128
133
|
themeClass: StringConstructor;
|
|
@@ -132,7 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
137
|
renderItem: (item: import("../utils").YearItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
133
138
|
[key: string]: any;
|
|
134
139
|
}>;
|
|
135
|
-
handleDateClick: (dateItem:
|
|
140
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
136
141
|
handleDateInputBlur: () => void;
|
|
137
142
|
handleDateInput: (value: string) => void;
|
|
138
143
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1350,6 +1355,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1350
1355
|
};
|
|
1351
1356
|
active: BooleanConstructor;
|
|
1352
1357
|
dateFormat: StringConstructor;
|
|
1358
|
+
type: PropType<import("../config").DatePickerType>;
|
|
1353
1359
|
timeFormat: {
|
|
1354
1360
|
readonly type: StringConstructor;
|
|
1355
1361
|
readonly value: "HH:mm:ss";
|
|
@@ -1365,7 +1371,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1365
1371
|
onClose: PropType<import("../interface").OnClose>;
|
|
1366
1372
|
onTabOut: FunctionConstructor;
|
|
1367
1373
|
onUpdateValue: {
|
|
1368
|
-
readonly type: PropType<
|
|
1374
|
+
readonly type: PropType<OnPanelUpdateValue>;
|
|
1369
1375
|
readonly required: true;
|
|
1370
1376
|
};
|
|
1371
1377
|
themeClass: StringConstructor;
|
|
@@ -1375,7 +1381,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1375
1381
|
renderItem: (item: import("../utils").YearItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1376
1382
|
[key: string]: any;
|
|
1377
1383
|
}>;
|
|
1378
|
-
handleDateClick: (dateItem:
|
|
1384
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
1379
1385
|
handleDateInputBlur: () => void;
|
|
1380
1386
|
handleDateInput: (value: string) => void;
|
|
1381
1387
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -2561,7 +2567,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2561
2567
|
handleSingleShortcutClick: (shortcut: number | [number, number] | (() => number) | readonly [number, number] | (() => [number, number] | readonly [number, number])) => void;
|
|
2562
2568
|
}> & {} & import("vue").ComponentCustomProperties & {}) | null>;
|
|
2563
2569
|
handleHeaderClick: () => void;
|
|
2564
|
-
handleUpdateValue: (value:
|
|
2570
|
+
handleUpdateValue: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
|
|
2565
2571
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2566
2572
|
panelActive: BooleanConstructor;
|
|
2567
2573
|
mergedClsPrefix: {
|
|
@@ -2577,12 +2583,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2577
2583
|
type: StringConstructor;
|
|
2578
2584
|
required: true;
|
|
2579
2585
|
};
|
|
2586
|
+
disabled: BooleanConstructor;
|
|
2580
2587
|
onUpdateValue: {
|
|
2581
|
-
type: PropType<
|
|
2588
|
+
type: PropType<OnPanelUpdateValue>;
|
|
2582
2589
|
required: true;
|
|
2583
2590
|
};
|
|
2584
2591
|
onUpdatePanelActive: PropType<(value: boolean) => void>;
|
|
2585
2592
|
}>>, {
|
|
2593
|
+
disabled: boolean;
|
|
2586
2594
|
panelActive: boolean;
|
|
2587
2595
|
}, {}>;
|
|
2588
2596
|
export default _default;
|
|
@@ -23,6 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
23
23
|
type: String,
|
|
24
24
|
required: true
|
|
25
25
|
},
|
|
26
|
+
disabled: Boolean,
|
|
26
27
|
onUpdateValue: {
|
|
27
28
|
type: Function,
|
|
28
29
|
required: true
|
|
@@ -39,10 +40,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
function handleHeaderClick() {
|
|
43
|
+
if (props.disabled)
|
|
44
|
+
return;
|
|
42
45
|
showRef.value = !showRef.value;
|
|
43
46
|
}
|
|
44
|
-
function handleUpdateValue(value) {
|
|
45
|
-
props.onUpdateValue(value);
|
|
47
|
+
function handleUpdateValue(value, doUpdate, item) {
|
|
48
|
+
props.onUpdateValue(value, doUpdate, item);
|
|
46
49
|
handleHeaderClick();
|
|
47
50
|
}
|
|
48
51
|
return {
|
|
@@ -53,11 +56,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
53
56
|
};
|
|
54
57
|
},
|
|
55
58
|
render() {
|
|
56
|
-
const { mergedClsPrefix } = this;
|
|
59
|
+
const { mergedClsPrefix, disabled } = this;
|
|
57
60
|
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month__month-year`, ref: "triggerRef" },
|
|
58
61
|
(0, vue_1.h)("div", { class: [
|
|
59
62
|
`${mergedClsPrefix}-date-panel-month__text`,
|
|
60
|
-
this.show && `${mergedClsPrefix}-date-panel-month__text--active
|
|
63
|
+
this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
|
|
64
|
+
disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
|
|
61
65
|
], onClick: this.handleHeaderClick },
|
|
62
66
|
this.calendarYear,
|
|
63
67
|
(0, vue_1.h)(_internal_1.UBaseIcon, { class: `${mergedClsPrefix}-date-panel-month__icon`, clsPrefix: mergedClsPrefix }, {
|
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
active: BooleanConstructor;
|
|
16
16
|
dateFormat: StringConstructor;
|
|
17
|
+
type: import("vue").PropType<import("../config").DatePickerType>;
|
|
17
18
|
timeFormat: {
|
|
18
19
|
readonly type: StringConstructor;
|
|
19
20
|
readonly value: "HH:mm:ss";
|
|
@@ -37,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
38
|
panel: BooleanConstructor;
|
|
38
39
|
}, {
|
|
39
40
|
renderItem: (item: YearItem, i: number, mergedClsPrefix: string) => VNode;
|
|
40
|
-
handleDateClick: (dateItem: import("../utils").
|
|
41
|
+
handleDateClick: (dateItem: import("../utils").DateCommonItem) => void;
|
|
41
42
|
handleDateInputBlur: () => void;
|
|
42
43
|
handleDateInput: (value: string) => void;
|
|
43
44
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1247,6 +1248,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1247
1248
|
};
|
|
1248
1249
|
active: BooleanConstructor;
|
|
1249
1250
|
dateFormat: StringConstructor;
|
|
1251
|
+
type: import("vue").PropType<import("../config").DatePickerType>;
|
|
1250
1252
|
timeFormat: {
|
|
1251
1253
|
readonly type: StringConstructor;
|
|
1252
1254
|
readonly value: "HH:mm:ss";
|
|
@@ -29,7 +29,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
29
29
|
useAsQuickJump
|
|
30
30
|
? handleQuickMonthClick(item, (value) => {
|
|
31
31
|
;
|
|
32
|
-
props.onUpdateValue(value, false);
|
|
32
|
+
props.onUpdateValue(value, false, item);
|
|
33
33
|
})
|
|
34
34
|
: handleDateClick(item);
|
|
35
35
|
} }, getRenderContent(item)));
|
|
@@ -45,6 +45,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
45
45
|
return ((0, vue_1.h)("div", { ref: "selfRef", tabindex: 0, class: [
|
|
46
46
|
`${mergedClsPrefix}-date-panel`,
|
|
47
47
|
`${mergedClsPrefix}-date-panel--month`,
|
|
48
|
+
`${mergedClsPrefix}-date-panel--year`,
|
|
48
49
|
this.themeClass
|
|
49
50
|
], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
|
|
50
51
|
(0, vue_1.h)(_internal_1.UScrollbar, { ref: "yearScrollbarRef", theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, horizontalRailStyle: { zIndex: 1 }, verticalRailStyle: { zIndex: 1 } }, {
|
|
@@ -2,7 +2,7 @@ import { type ExtractPropTypes, type PropType } from 'vue';
|
|
|
2
2
|
import type { VirtualListInst } from 'vueuc';
|
|
3
3
|
import type { ScrollbarInst } from '../../../_internal';
|
|
4
4
|
import type { Shortcuts } from '../interface';
|
|
5
|
-
import type {
|
|
5
|
+
import type { MonthItem, YearItem, QuarterItem, DateCommonItem } from '../utils';
|
|
6
6
|
declare const useCalendarProps: {
|
|
7
7
|
readonly actions: {
|
|
8
8
|
readonly type: PropType<string[]>;
|
|
@@ -10,6 +10,7 @@ declare const useCalendarProps: {
|
|
|
10
10
|
};
|
|
11
11
|
readonly active: BooleanConstructor;
|
|
12
12
|
readonly dateFormat: StringConstructor;
|
|
13
|
+
readonly type: PropType<import("../config").DatePickerType>;
|
|
13
14
|
readonly timeFormat: {
|
|
14
15
|
readonly type: StringConstructor;
|
|
15
16
|
readonly value: "HH:mm:ss";
|
|
@@ -33,7 +34,7 @@ declare const useCalendarProps: {
|
|
|
33
34
|
readonly panel: BooleanConstructor;
|
|
34
35
|
};
|
|
35
36
|
declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, type: 'date' | 'datetime' | 'month' | 'year' | 'quarter'): {
|
|
36
|
-
handleDateClick: (dateItem:
|
|
37
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
37
38
|
handleDateInputBlur: () => void;
|
|
38
39
|
handleDateInput: (value: string) => void;
|
|
39
40
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1201,7 +1202,7 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
|
|
|
1201
1202
|
isHourDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsHourDisabled | undefined>;
|
|
1202
1203
|
isMinuteDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsMinuteDisabled | undefined>;
|
|
1203
1204
|
isSecondDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsSecondDisabled | undefined>;
|
|
1204
|
-
dateArray: import("vue").ComputedRef<DateItem[]>;
|
|
1205
|
+
dateArray: import("vue").ComputedRef<import("../utils").DateItem[]>;
|
|
1205
1206
|
monthArray: import("vue").ComputedRef<MonthItem[]>;
|
|
1206
1207
|
yearArray: import("vue").ComputedRef<YearItem[]>;
|
|
1207
1208
|
quarterArray: import("vue").ComputedRef<QuarterItem[]>;
|
|
@@ -13,6 +13,7 @@ declare const useDualCalendarProps: {
|
|
|
13
13
|
};
|
|
14
14
|
readonly active: BooleanConstructor;
|
|
15
15
|
readonly dateFormat: StringConstructor;
|
|
16
|
+
readonly type: import("vue").PropType<import("../config").DatePickerType>;
|
|
16
17
|
readonly timeFormat: {
|
|
17
18
|
readonly type: StringConstructor;
|
|
18
19
|
readonly value: "HH:mm:ss";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
import { type Value, type OnPanelUpdateValue, type OnClose, type Shortcuts, type DefaultTime } from '../interface';
|
|
3
|
+
import { DatePickerType } from '../config';
|
|
3
4
|
declare const usePanelCommonProps: {
|
|
4
5
|
readonly active: BooleanConstructor;
|
|
5
6
|
readonly dateFormat: StringConstructor;
|
|
7
|
+
readonly type: PropType<DatePickerType>;
|
|
6
8
|
readonly timeFormat: {
|
|
7
9
|
readonly type: StringConstructor;
|
|
8
10
|
readonly value: "HH:mm:ss";
|
|
@@ -173,6 +173,8 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
|
|
|
173
173
|
margin: 0,
|
|
174
174
|
padding: '15px 16px',
|
|
175
175
|
boxSizing: 'border-box'
|
|
176
|
+
}), (0, cssr_1.cM)('year', {
|
|
177
|
+
zIndex: '2'
|
|
176
178
|
}), (0, cssr_1.cB)('date-panel-footer', {
|
|
177
179
|
gridArea: 'footer'
|
|
178
180
|
}), (0, cssr_1.cB)('date-panel-actions', {
|
|
@@ -195,21 +197,20 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
|
|
|
195
197
|
zIndex: 1
|
|
196
198
|
})]), (0, cssr_1.c)('~ .u-date-panel-calendar', {
|
|
197
199
|
paddingTop: '16px'
|
|
198
|
-
})]), (0, cssr_1.cB)('date-panel-
|
|
200
|
+
})]), (0, cssr_1.cB)('date-panel-placeholder', {
|
|
201
|
+
width: '266px',
|
|
202
|
+
height: '250px'
|
|
203
|
+
}), (0, cssr_1.cB)('date-panel-month', {
|
|
199
204
|
boxSizing: 'border-box',
|
|
200
205
|
display: 'flex',
|
|
201
206
|
alignItems: 'center',
|
|
202
207
|
justifyContent: 'space-between',
|
|
203
208
|
padding: 'var(--u-calendar-title-padding)',
|
|
204
209
|
height: 'var(--u-calendar-title-height)'
|
|
205
|
-
}, [(0, cssr_1.
|
|
210
|
+
}, [(0, cssr_1.cM)('justify-end', {
|
|
211
|
+
justifyContent: 'end'
|
|
212
|
+
}), (0, cssr_1.cE)('icon', `
|
|
206
213
|
font-size: var(--u-arrow-size);
|
|
207
|
-
`), (0, cssr_1.cE)('prev, next, fast-prev, fast-next', `
|
|
208
|
-
line-height: 0;
|
|
209
|
-
cursor: pointer;
|
|
210
|
-
width: var(--u-arrow-size);
|
|
211
|
-
height: var(--u-arrow-size);
|
|
212
|
-
color: var(--u-arrow-color);
|
|
213
214
|
`), (0, cssr_1.cE)('month-year', {
|
|
214
215
|
userSelect: 'none',
|
|
215
216
|
'-webkit-user-select': 'none'
|
|
@@ -222,10 +223,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
|
|
|
222
223
|
padding: 6px 8px;
|
|
223
224
|
text-align: center;
|
|
224
225
|
color: var(--u-calendar-title-text-color);
|
|
225
|
-
cursor: pointer;
|
|
226
226
|
transition: .3s var(--u-bezier);
|
|
227
227
|
border-radius: var(--u-panel-border-radius);
|
|
228
|
-
`, [(0, cssr_1.
|
|
228
|
+
`, [(0, cssr_1.cNotM)('disabled', {
|
|
229
|
+
cursor: 'pointer'
|
|
230
|
+
}), (0, cssr_1.c)('.u-icon', {
|
|
229
231
|
width: '24px',
|
|
230
232
|
transition: 'transform .3s var(--u-bezier)'
|
|
231
233
|
}), (0, cssr_1.cM)('active', `
|
|
@@ -45,6 +45,7 @@ export interface QuarterItem {
|
|
|
45
45
|
selected: boolean;
|
|
46
46
|
ts: number;
|
|
47
47
|
}
|
|
48
|
+
export type DateCommonItem = DateItem | MonthItem | YearItem | QuarterItem;
|
|
48
49
|
/**
|
|
49
50
|
* Given time to display calendar, given the selected time, given current time,
|
|
50
51
|
* return the date array of display time's month.
|
package/lib/grid/src/Grid.js
CHANGED
|
@@ -82,7 +82,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
82
82
|
}
|
|
83
83
|
return undefined;
|
|
84
84
|
});
|
|
85
|
-
// for SSR, fix bug https://github.com/tusen-ai/
|
|
85
|
+
// for SSR, fix bug https://github.com/tusen-ai/uzum-ui/issues/2462
|
|
86
86
|
const isSsrRef = (0, vue_1.ref)(false);
|
|
87
87
|
const contentElRef = (0, vue_1.ref)();
|
|
88
88
|
(0, vue_1.onMounted)(() => {
|
package/lib/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export { darkTheme, lightTheme, createTheme } from './themes';
|
|
|
10
10
|
export { c, cE, cM, cB, cNotM } from './_utils/cssr';
|
|
11
11
|
export { default as version } from './version';
|
|
12
12
|
export { UThemeEditor } from './theme-editor';
|
|
13
|
+
export * from './_resolvers/auto-import/auto-import-resolver';
|
package/lib/index.js
CHANGED
|
@@ -47,3 +47,4 @@ var version_1 = require("./version");
|
|
|
47
47
|
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return __importDefault(version_1).default; } });
|
|
48
48
|
var theme_editor_1 = require("./theme-editor");
|
|
49
49
|
Object.defineProperty(exports, "UThemeEditor", { enumerable: true, get: function () { return theme_editor_1.UThemeEditor; } });
|
|
50
|
+
__exportStar(require("./_resolvers/auto-import/auto-import-resolver"), exports);
|
package/lib/preset.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const uzumUi: import("./create").UUiInstance;
|
|
2
|
+
export default uzumUi;
|
|
3
3
|
export declare const install: (app: import("vue").App<any>) => void;
|
package/lib/preset.js
CHANGED
|
@@ -29,8 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.install = void 0;
|
|
30
30
|
const components = __importStar(require("./components"));
|
|
31
31
|
const create_1 = __importDefault(require("./create"));
|
|
32
|
-
const
|
|
32
|
+
const uzumUi = (0, create_1.default)({
|
|
33
33
|
components: Object.keys(components).map((key) => components[key])
|
|
34
34
|
});
|
|
35
|
-
exports.default =
|
|
36
|
-
exports.install =
|
|
35
|
+
exports.default = uzumUi;
|
|
36
|
+
exports.install = uzumUi.install;
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.2.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED