@uzum-tech/ui 1.1.5 → 1.2.1
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 +310 -353
- 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 +23 -8
- package/es/date-picker/src/panel/date.js +43 -18
- package/es/date-picker/src/panel/daterange.d.ts +18 -7
- package/es/date-picker/src/panel/daterange.js +95 -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 +3 -1
- package/es/date-picker/src/utils.js +13 -1
- package/es/grid/src/Grid.js +1 -1
- 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 +23 -8
- package/lib/date-picker/src/panel/date.js +42 -17
- package/lib/date-picker/src/panel/daterange.d.ts +18 -7
- package/lib/date-picker/src/panel/daterange.js +94 -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 +3 -1
- package/lib/date-picker/src/utils.js +14 -1
- package/lib/grid/src/Grid.js +1 -1
- 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 -6
- 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
|
@@ -188,4 +188,16 @@ function getDefaultTime(timeValue) {
|
|
|
188
188
|
function pluckValueFromRange(value, type) {
|
|
189
189
|
return Array.isArray(value) ? value[type === 'start' ? 0 : 1] : null;
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
function isDateItem(item) {
|
|
192
|
+
return !!item;
|
|
193
|
+
}
|
|
194
|
+
function getMsByDateCommonItem(item) {
|
|
195
|
+
if (!isDateItem(item))
|
|
196
|
+
return 0;
|
|
197
|
+
const { dateObject: { year, month, date } } = item;
|
|
198
|
+
const resultDate = new Date();
|
|
199
|
+
resultDate.setFullYear(year, month || 0, date || 1);
|
|
200
|
+
resultDate.setHours(0, 0, 0);
|
|
201
|
+
return resultDate.getTime();
|
|
202
|
+
}
|
|
203
|
+
export { dateArray, monthArray, yearArray, quarterArray, strictParse, getDerivedTimeFromKeyboardEvent, getDefaultTime, getMsByDateCommonItem, pluckValueFromRange };
|
package/es/grid/src/Grid.js
CHANGED
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
}
|
|
80
80
|
return undefined;
|
|
81
81
|
});
|
|
82
|
-
// for SSR, fix bug https://github.com/tusen-ai/
|
|
82
|
+
// for SSR, fix bug https://github.com/tusen-ai/uzum-ui/issues/2462
|
|
83
83
|
const isSsrRef = ref(false);
|
|
84
84
|
const contentElRef = ref();
|
|
85
85
|
onMounted(() => {
|
package/es/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/es/preset.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as components from './components';
|
|
2
2
|
import create from './create';
|
|
3
|
-
const
|
|
3
|
+
const uzumUi = create({
|
|
4
4
|
components: Object.keys(components).map((key) => components[key])
|
|
5
5
|
});
|
|
6
|
-
export default
|
|
7
|
-
export const install =
|
|
6
|
+
export default uzumUi;
|
|
7
|
+
export const install = uzumUi.install;
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.1
|
|
1
|
+
declare const _default: "1.2.1";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.1
|
|
1
|
+
export default '1.2.1';
|
package/lib/_utils/uzum/warn.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.throwError = exports.warn = exports.warnOnce = void 0;
|
|
4
4
|
const warnedMessages = new Set();
|
|
5
5
|
function warnOnce(location, message) {
|
|
6
|
-
const mergedMessage = `[
|
|
6
|
+
const mergedMessage = `[uzum-ui/${location}]: ${message}`;
|
|
7
7
|
if (warnedMessages.has(mergedMessage))
|
|
8
8
|
return;
|
|
9
9
|
warnedMessages.add(mergedMessage);
|
|
@@ -11,10 +11,10 @@ function warnOnce(location, message) {
|
|
|
11
11
|
}
|
|
12
12
|
exports.warnOnce = warnOnce;
|
|
13
13
|
function warn(location, message) {
|
|
14
|
-
console.error(`[
|
|
14
|
+
console.error(`[uzum-ui/${location}]: ${message}`);
|
|
15
15
|
}
|
|
16
16
|
exports.warn = warn;
|
|
17
17
|
function throwError(location, message) {
|
|
18
|
-
throw new Error(`[
|
|
18
|
+
throw new Error(`[uzum-ui/${location}]: ${message}`);
|
|
19
19
|
}
|
|
20
20
|
exports.throwError = throwError;
|
package/lib/alert/src/Alert.js
CHANGED
|
@@ -134,7 +134,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
134
134
|
this.actionsHorizontal &&
|
|
135
135
|
`${mergedClsPrefix}-alert--horizontal`,
|
|
136
136
|
this.showIcon && `${mergedClsPrefix}-alert--show-icon`,
|
|
137
|
-
// fix: https://github.com/tusen-ai/
|
|
137
|
+
// fix: https://github.com/tusen-ai/uzum-ui/issues/4588
|
|
138
138
|
!this.title &&
|
|
139
139
|
this.closable &&
|
|
140
140
|
`${mergedClsPrefix}-alert--right-adjust`,
|
|
@@ -65,7 +65,7 @@ exports.default = (0, cssr_1.cB)('alert', `
|
|
|
65
65
|
width: var(--u-close-icon-size);
|
|
66
66
|
height: var(--u-close-icon-size);
|
|
67
67
|
`),
|
|
68
|
-
// fix: https://github.com/tusen-ai/
|
|
68
|
+
// fix: https://github.com/tusen-ai/uzum-ui/issues/4588
|
|
69
69
|
(0, cssr_1.cM)('right-adjust', [(0, cssr_1.cB)('alert-body', `
|
|
70
70
|
padding-right: calc(var(--u-close-size) + var(--u-padding) + 2px);
|
|
71
71
|
`)]), (0, cssr_1.cM)('show-icon', [(0, cssr_1.cB)('alert-body', [(0, cssr_1.cE)('content, title', `
|
|
@@ -4206,6 +4206,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4206
4206
|
}, any>;
|
|
4207
4207
|
}>>>;
|
|
4208
4208
|
}, {
|
|
4209
|
+
rangeTypes: DatePickerType[];
|
|
4209
4210
|
mergedStatus: import("vue").ComputedRef<FormValidationStatus | undefined>;
|
|
4210
4211
|
mergedClsPrefix: Ref<string>;
|
|
4211
4212
|
mergedBordered: import("vue").ComputedRef<boolean>;
|
|
@@ -23,7 +23,6 @@ const datetime_1 = __importDefault(require("./panel/datetime"));
|
|
|
23
23
|
const datetimerange_1 = __importDefault(require("./panel/datetimerange"));
|
|
24
24
|
const date_1 = __importDefault(require("./panel/date"));
|
|
25
25
|
const daterange_1 = __importDefault(require("./panel/daterange"));
|
|
26
|
-
const monthrange_1 = __importDefault(require("./panel/monthrange"));
|
|
27
26
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
28
27
|
exports.datePickerProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { to: _utils_1.useAdjustedTo.propTo, bordered: {
|
|
29
28
|
type: Boolean,
|
|
@@ -55,6 +54,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
}
|
|
57
|
+
const rangeTypes = [
|
|
58
|
+
'daterange',
|
|
59
|
+
'monthrange',
|
|
60
|
+
'yearrange',
|
|
61
|
+
'quarterrange'
|
|
62
|
+
];
|
|
58
63
|
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('DatePicker');
|
|
59
64
|
const formItem = (0, _mixins_1.useFormItem)(props);
|
|
60
65
|
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
|
|
@@ -689,7 +694,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
689
694
|
return props.type;
|
|
690
695
|
}), cssVarsRef, props)
|
|
691
696
|
: undefined;
|
|
692
|
-
return Object.assign(Object.assign({}, exposedMethods), { mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, uncontrolledValue: uncontrolledValueRef, pendingValue: pendingValueRef, panelInstRef,
|
|
697
|
+
return Object.assign(Object.assign({}, exposedMethods), { rangeTypes, mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, uncontrolledValue: uncontrolledValueRef, pendingValue: pendingValueRef, panelInstRef,
|
|
693
698
|
triggerElRef,
|
|
694
699
|
inputInstRef, isMounted: (0, vooks_1.useIsMounted)(), displayTime: singleInputValueRef, displayStartTime: rangeStartInputValueRef, displayEndTime: rangeEndInputValueRef, mergedShow: mergedShowRef, adjustedTo: (0, _utils_1.useAdjustedTo)(props), isRange: isRangeRef, localizedStartPlaceholder: localizedStartPlaceholderRef, localizedEndPlaceholder: localizedEndPlaceholderRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, localizedPlacehoder: localizedPlacehoderRef, isValueInvalid: uniVaidation.isValueInvalidRef, isStartValueInvalid: dualValidation.isStartValueInvalidRef, isEndValueInvalid: dualValidation.isEndValueInvalidRef, handleInputKeydown,
|
|
695
700
|
handleClickOutside,
|
|
@@ -732,11 +737,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
732
737
|
onRender: this.onRender
|
|
733
738
|
};
|
|
734
739
|
const renderPanel = () => {
|
|
735
|
-
const { type } = this;
|
|
736
|
-
return type === 'datetime' ? ((0, vue_1.h)(datetime_1.default, Object.assign({}, commonPanelProps), $slots)) : type
|
|
737
|
-
: type === 'monthrange' ||
|
|
738
|
-
type === 'yearrange' ||
|
|
739
|
-
type === 'quarterrange' ? ((0, vue_1.h)(monthrange_1.default, Object.assign({}, commonPanelProps, { type: type }))) : ((0, vue_1.h)(date_1.default, Object.assign({}, commonPanelProps), $slots));
|
|
740
|
+
const { type, rangeTypes } = this;
|
|
741
|
+
return type === 'datetime' ? ((0, vue_1.h)(datetime_1.default, Object.assign({}, commonPanelProps), $slots)) : rangeTypes.includes(type) ? ((0, vue_1.h)(daterange_1.default, Object.assign({}, commonPanelProps, { type: type, defaultCalendarStartTime: this.defaultCalendarStartTime, defaultCalendarEndTime: this.defaultCalendarEndTime, bindCalendarMonths: this.bindCalendarMonths }), $slots)) : type === 'datetimerange' ? ((0, vue_1.h)(datetimerange_1.default, Object.assign({}, commonPanelProps, { defaultCalendarStartTime: this.defaultCalendarStartTime, defaultCalendarEndTime: this.defaultCalendarEndTime, bindCalendarMonths: this.bindCalendarMonths }), $slots)) : ((0, vue_1.h)(date_1.default, Object.assign({}, commonPanelProps, { type: type }), $slots));
|
|
740
742
|
};
|
|
741
743
|
if (this.panel) {
|
|
742
744
|
return renderPanel();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MONTH_ITEM_GAP = exports.MONTH_ITEM_HEIGHT = exports.END_YEAR = exports.START_YEAR = void 0;
|
|
4
|
-
exports.START_YEAR =
|
|
4
|
+
exports.START_YEAR = 1924;
|
|
5
5
|
exports.END_YEAR = new Date().getFullYear();
|
|
6
6
|
exports.MONTH_ITEM_HEIGHT = 50;
|
|
7
7
|
exports.MONTH_ITEM_GAP = 8;
|
|
@@ -7,7 +7,12 @@ import type { TimePickerProps } from '../../time-picker/src/TimePicker';
|
|
|
7
7
|
import type { MergedTheme } from '../../_mixins';
|
|
8
8
|
import type { DatePickerTheme } from '../styles/light';
|
|
9
9
|
import type { uniCalendarValidation, dualCalendarValidation } from './validation-utils';
|
|
10
|
+
import { DateCommonItem } from './utils';
|
|
10
11
|
export type Value = number | [number, number];
|
|
12
|
+
export type PanelValue = number & (number | null) & [
|
|
13
|
+
number,
|
|
14
|
+
number
|
|
15
|
+
] & ([number, number] | null);
|
|
11
16
|
export type DefaultTime = string | [string | undefined, string | undefined];
|
|
12
17
|
export type FormattedValue = string | [string, string];
|
|
13
18
|
export type Shortcuts = Record<string, number | (() => number)> | Record<string, [number, number] | readonly [number, number] | (() => [number, number] | readonly [number, number])>;
|
|
@@ -29,11 +34,8 @@ export type OnUpdateFormattedValue = (value: string & (string | null) & [
|
|
|
29
34
|
] & ([number, number] | null)) => void;
|
|
30
35
|
export type OnUpdateFormattedValueImpl = (value: string | [string, string] | null, timestampValue: number | [number, number] | null) => void;
|
|
31
36
|
export type OnUpdateValueImpl = (value: Value | null, formattedValue: string | [string, string] | null) => void;
|
|
32
|
-
export type OnPanelUpdateValue = (value:
|
|
33
|
-
|
|
34
|
-
number
|
|
35
|
-
] & ([number, number] | null), doUpdate: boolean) => void;
|
|
36
|
-
export type OnPanelUpdateValueImpl = (value: Value | null, doUpdate: boolean) => void;
|
|
37
|
+
export type OnPanelUpdateValue = (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
|
|
38
|
+
export type OnPanelUpdateValueImpl = (value: Value | null, doUpdate: boolean, item?: DateCommonItem) => void;
|
|
37
39
|
export type OnClose = (disableUpdateOnClose: boolean) => void;
|
|
38
40
|
export interface RangePanelChildComponentRefs {
|
|
39
41
|
startYearScrollbarRef: Ref<ScrollbarInst | null>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DatePickerType } from '../config';
|
|
2
|
+
import { DateCommonItem, DateItem } from '../utils';
|
|
1
3
|
/**
|
|
2
4
|
* Date Panel
|
|
3
5
|
* Update picker value on:
|
|
@@ -10,7 +12,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
12
|
readonly default: () => string[];
|
|
11
13
|
};
|
|
12
14
|
readonly active: BooleanConstructor;
|
|
15
|
+
/**
|
|
16
|
+
* Date Panel
|
|
17
|
+
* Update picker value on:
|
|
18
|
+
* 1. item click
|
|
19
|
+
* 2. clear click
|
|
20
|
+
*/
|
|
13
21
|
readonly dateFormat: StringConstructor;
|
|
22
|
+
readonly type: import("vue").PropType<DatePickerType>;
|
|
14
23
|
readonly timeFormat: {
|
|
15
24
|
readonly type: StringConstructor;
|
|
16
25
|
readonly value: "HH:mm:ss";
|
|
@@ -33,7 +42,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
42
|
readonly onRender: import("vue").PropType<(() => void) | undefined>;
|
|
34
43
|
readonly panel: BooleanConstructor;
|
|
35
44
|
}, {
|
|
36
|
-
|
|
45
|
+
isWithoutDay: import("vue").ComputedRef<boolean>;
|
|
46
|
+
isMonth: import("vue").ComputedRef<boolean>;
|
|
47
|
+
isYear: import("vue").ComputedRef<boolean>;
|
|
48
|
+
handleMonthClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
49
|
+
handleYearClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
50
|
+
handleDateClick: (dateItem: DateCommonItem) => void;
|
|
37
51
|
handleDateInputBlur: () => void;
|
|
38
52
|
handleDateInput: (value: string) => void;
|
|
39
53
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -114,12 +128,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
128
|
fontFamily: string;
|
|
115
129
|
fontFamilyMono: string;
|
|
116
130
|
cubicBezierEaseInOut: string;
|
|
117
|
-
/**
|
|
118
|
-
* Date Panel
|
|
119
|
-
* Update picker value on:
|
|
120
|
-
* 1. item click
|
|
121
|
-
* 2. clear click
|
|
122
|
-
*/
|
|
123
131
|
cubicBezierEaseOut: string;
|
|
124
132
|
cubicBezierEaseIn: string;
|
|
125
133
|
borderRadiusLarge: string;
|
|
@@ -1207,7 +1215,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1207
1215
|
isHourDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsHourDisabled | undefined>;
|
|
1208
1216
|
isMinuteDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsMinuteDisabled | undefined>;
|
|
1209
1217
|
isSecondDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsSecondDisabled | undefined>;
|
|
1210
|
-
dateArray: import("vue").ComputedRef<
|
|
1218
|
+
dateArray: import("vue").ComputedRef<DateItem[]>;
|
|
1211
1219
|
monthArray: import("vue").ComputedRef<import("../utils").MonthItem[]>;
|
|
1212
1220
|
yearArray: import("vue").ComputedRef<import("../utils").YearItem[]>;
|
|
1213
1221
|
quarterArray: import("vue").ComputedRef<import("../utils").QuarterItem[]>;
|
|
@@ -1229,7 +1237,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1229
1237
|
readonly default: () => string[];
|
|
1230
1238
|
};
|
|
1231
1239
|
readonly active: BooleanConstructor;
|
|
1240
|
+
/**
|
|
1241
|
+
* Date Panel
|
|
1242
|
+
* Update picker value on:
|
|
1243
|
+
* 1. item click
|
|
1244
|
+
* 2. clear click
|
|
1245
|
+
*/
|
|
1232
1246
|
readonly dateFormat: StringConstructor;
|
|
1247
|
+
readonly type: import("vue").PropType<DatePickerType>;
|
|
1233
1248
|
readonly timeFormat: {
|
|
1234
1249
|
readonly type: StringConstructor;
|
|
1235
1250
|
readonly value: "HH:mm:ss";
|
|
@@ -9,6 +9,7 @@ const _internal_1 = require("../../../_internal");
|
|
|
9
9
|
const _utils_1 = require("../../../_utils");
|
|
10
10
|
const use_calendar_1 = require("./use-calendar");
|
|
11
11
|
const panelHeader_1 = __importDefault(require("./panelHeader"));
|
|
12
|
+
const utils_1 = require("../utils");
|
|
12
13
|
/**
|
|
13
14
|
* Date Panel
|
|
14
15
|
* Update picker value on:
|
|
@@ -27,11 +28,34 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
const calendar = (0, use_calendar_1.useCalendar)(props, 'date');
|
|
32
|
+
const type = props.type;
|
|
33
|
+
const monthTypes = ['month', 'quarter'];
|
|
34
|
+
const withoutDayTypes = [...monthTypes, 'year'];
|
|
35
|
+
const isWithoutDay = (0, vue_1.computed)(() => withoutDayTypes.includes(type));
|
|
36
|
+
const isMonth = (0, vue_1.computed)(() => monthTypes.includes(type));
|
|
37
|
+
const isYear = (0, vue_1.computed)(() => type === 'year');
|
|
38
|
+
const updateMonth = (item) => {
|
|
39
|
+
const dateItem = item;
|
|
40
|
+
calendar.handleDateClick(Object.assign(Object.assign({}, dateItem), { dateObject: Object.assign(Object.assign({}, dateItem.dateObject), { month: dateItem.dateObject.month || 0, date: 1 }), ts: (0, utils_1.getMsByDateCommonItem)(dateItem) }));
|
|
41
|
+
};
|
|
42
|
+
const handleMonthClick = (value, _doUpdate, item) => {
|
|
43
|
+
calendar.onUpdateCalendarValue(value);
|
|
44
|
+
isMonth.value && updateMonth(item);
|
|
45
|
+
};
|
|
46
|
+
const handleYearClick = (value, _doUpdate, item) => {
|
|
47
|
+
calendar.onUpdateCalendarValue(value);
|
|
48
|
+
isYear.value && updateMonth(item);
|
|
49
|
+
};
|
|
50
|
+
return Object.assign(Object.assign({}, calendar), { isWithoutDay,
|
|
51
|
+
isMonth,
|
|
52
|
+
isYear,
|
|
53
|
+
handleMonthClick,
|
|
54
|
+
handleYearClick });
|
|
31
55
|
},
|
|
32
56
|
render() {
|
|
33
57
|
var _a, _b, _c;
|
|
34
|
-
const { mergedClsPrefix, shortcuts, onRender } = this;
|
|
58
|
+
const { mergedClsPrefix, shortcuts, onRender, isWithoutDay, isYear, isMonth, handleMonthClick, handleYearClick } = this;
|
|
35
59
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
36
60
|
return ((0, vue_1.h)("div", { ref: "selfRef", tabindex: 0, class: [
|
|
37
61
|
`${mergedClsPrefix}-date-panel`,
|
|
@@ -40,21 +64,22 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
40
64
|
this.themeClass
|
|
41
65
|
], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
|
|
42
66
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-calendar` },
|
|
43
|
-
(0, vue_1.h)(panelHeader_1.default, { value: this.calendarValue, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear,
|
|
44
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
(0, vue_1.h)(panelHeader_1.default, { value: this.calendarValue, isMonth: isMonth, isYear: isYear, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, onUpdateMonth: handleMonthClick, onUpdateYear: handleYearClick }),
|
|
68
|
+
isWithoutDay ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-placeholder` })) : ((0, vue_1.h)(vue_1.Fragment, null,
|
|
69
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => ((0, vue_1.h)("div", { key: weekday, class: `${mergedClsPrefix}-date-panel-weekdays__day` }, weekday)))),
|
|
70
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.dateArray.map((dateItem, i) => ((0, vue_1.h)("div", { "data-u-date": true, key: i, class: [
|
|
71
|
+
`${mergedClsPrefix}-date-panel-date`,
|
|
72
|
+
{
|
|
73
|
+
[`${mergedClsPrefix}-date-panel-date--current`]: dateItem.isCurrentDate,
|
|
74
|
+
[`${mergedClsPrefix}-date-panel-date--selected`]: dateItem.selected,
|
|
75
|
+
[`${mergedClsPrefix}-date-panel-date--excluded`]: !dateItem.inCurrentMonth,
|
|
76
|
+
[`${mergedClsPrefix}-date-panel-date--disabled`]: this.mergedIsDateDisabled(dateItem.ts)
|
|
77
|
+
}
|
|
78
|
+
], onClick: () => {
|
|
79
|
+
this.handleDateClick(dateItem);
|
|
80
|
+
} },
|
|
81
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-date__trigger` }),
|
|
82
|
+
dateItem.dateObject.date))))))),
|
|
58
83
|
this.datePickerSlots.footer ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-footer` }, this.datePickerSlots.footer())) : null,
|
|
59
84
|
((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) || shortcuts ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-actions` },
|
|
60
85
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-actions__prefix` }, shortcuts &&
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DatePickerType } from '../config';
|
|
2
|
+
import { DateCommonItem, DateItem, MonthItem } from '../utils';
|
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
|
2
4
|
readonly defaultCalendarStartTime: NumberConstructor;
|
|
3
5
|
readonly defaultCalendarEndTime: NumberConstructor;
|
|
@@ -8,6 +10,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
10
|
};
|
|
9
11
|
readonly active: BooleanConstructor;
|
|
10
12
|
readonly dateFormat: StringConstructor;
|
|
13
|
+
readonly type: import("vue").PropType<DatePickerType>;
|
|
11
14
|
readonly timeFormat: {
|
|
12
15
|
readonly type: StringConstructor;
|
|
13
16
|
readonly value: "HH:mm:ss";
|
|
@@ -30,6 +33,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
33
|
readonly onRender: import("vue").PropType<(() => void) | undefined>;
|
|
31
34
|
readonly panel: BooleanConstructor;
|
|
32
35
|
}, {
|
|
36
|
+
isMonthRange: import("vue").ComputedRef<boolean>;
|
|
37
|
+
isYearRange: import("vue").ComputedRef<boolean>;
|
|
38
|
+
isWithoutDay: import("vue").ComputedRef<boolean>;
|
|
39
|
+
handleMonthStartClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
40
|
+
handleMonthEndClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
41
|
+
handleYearStartClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
42
|
+
handleYearEndClick: (value: number, _doUpdate: boolean, item?: DateCommonItem) => void;
|
|
33
43
|
startDateDisplayString: import("vue").Ref<string>;
|
|
34
44
|
endDateInput: import("vue").Ref<string>;
|
|
35
45
|
timePickerSize: import("vue").Ref<import("../../..").InputSize>;
|
|
@@ -1220,9 +1230,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1220
1230
|
handleOpenQuickSelectMonthPanel: () => void;
|
|
1221
1231
|
startDatesElRef: import("vue").Ref<HTMLElement | null>;
|
|
1222
1232
|
endDatesElRef: import("vue").Ref<HTMLElement | null>;
|
|
1223
|
-
handleDateClick: (dateItem:
|
|
1224
|
-
handleColItemClick: (dateItem:
|
|
1225
|
-
handleDateMouseEnter: (dateItem:
|
|
1233
|
+
handleDateClick: (dateItem: DateItem) => void;
|
|
1234
|
+
handleColItemClick: (dateItem: MonthItem | import("../utils").YearItem | import("../utils").QuarterItem, clickType: "start" | "end") => void;
|
|
1235
|
+
handleDateMouseEnter: (dateItem: DateItem) => void;
|
|
1226
1236
|
handleConfirmClick: () => void;
|
|
1227
1237
|
startCalendarPrevYear: () => void;
|
|
1228
1238
|
startCalendarPrevMonth: () => void;
|
|
@@ -1240,13 +1250,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1240
1250
|
endCalendarMonth: import("vue").ComputedRef<string>;
|
|
1241
1251
|
endCalendarYear: import("vue").ComputedRef<string>;
|
|
1242
1252
|
weekdays: import("vue").ComputedRef<string[]>;
|
|
1243
|
-
startDateArray: import("vue").ComputedRef<
|
|
1244
|
-
endDateArray: import("vue").ComputedRef<
|
|
1253
|
+
startDateArray: import("vue").ComputedRef<DateItem[]>;
|
|
1254
|
+
endDateArray: import("vue").ComputedRef<DateItem[]>;
|
|
1245
1255
|
startYearArray: import("vue").ComputedRef<import("../utils").YearItem[]>;
|
|
1246
|
-
startMonthArray: import("vue").ComputedRef<
|
|
1256
|
+
startMonthArray: import("vue").ComputedRef<MonthItem[]>;
|
|
1247
1257
|
startQuarterArray: import("vue").ComputedRef<import("../utils").QuarterItem[]>;
|
|
1248
1258
|
endYearArray: import("vue").ComputedRef<import("../utils").YearItem[]>;
|
|
1249
|
-
endMonthArray: import("vue").ComputedRef<
|
|
1259
|
+
endMonthArray: import("vue").ComputedRef<MonthItem[]>;
|
|
1250
1260
|
endQuarterArray: import("vue").ComputedRef<import("../utils").QuarterItem[]>;
|
|
1251
1261
|
isSelecting: import("vue").Ref<boolean>;
|
|
1252
1262
|
handleRangeShortcutMouseenter: (shortcut: number | [number, number] | (() => number) | readonly [number, number] | (() => [number, number] | readonly [number, number])) => void;
|
|
@@ -1261,6 +1271,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1261
1271
|
};
|
|
1262
1272
|
readonly active: BooleanConstructor;
|
|
1263
1273
|
readonly dateFormat: StringConstructor;
|
|
1274
|
+
readonly type: import("vue").PropType<DatePickerType>;
|
|
1264
1275
|
readonly timeFormat: {
|
|
1265
1276
|
readonly type: StringConstructor;
|
|
1266
1277
|
readonly value: "HH:mm:ss";
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -9,6 +20,7 @@ const _internal_1 = require("../../../_internal");
|
|
|
9
20
|
const _utils_1 = require("../../../_utils");
|
|
10
21
|
const use_dual_calendar_1 = require("./use-dual-calendar");
|
|
11
22
|
const panelHeader_1 = __importDefault(require("./panelHeader"));
|
|
23
|
+
const utils_1 = require("../utils");
|
|
12
24
|
exports.default = (0, vue_1.defineComponent)({
|
|
13
25
|
name: 'DateRangePanel',
|
|
14
26
|
props: use_dual_calendar_1.useDualCalendarProps,
|
|
@@ -21,11 +33,49 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
21
33
|
}
|
|
22
34
|
});
|
|
23
35
|
}
|
|
24
|
-
|
|
36
|
+
const calendar = (0, use_dual_calendar_1.useDualCalendar)(props, 'daterange');
|
|
37
|
+
const type = props.type;
|
|
38
|
+
const monthRanges = ['monthrange', 'quarterrange'];
|
|
39
|
+
const withoutDayTypes = [...monthRanges, 'yearrange'];
|
|
40
|
+
const isWithoutDay = (0, vue_1.computed)(() => withoutDayTypes.includes(type));
|
|
41
|
+
const isMonthRange = (0, vue_1.computed)(() => monthRanges.includes(type));
|
|
42
|
+
const isYearRange = (0, vue_1.computed)(() => type === 'yearrange');
|
|
43
|
+
const monthToDateItem = (item, isEnd = false) => {
|
|
44
|
+
const _a = item, { dateObject } = _a, monthItem = __rest(_a, ["dateObject"]);
|
|
45
|
+
return Object.assign(Object.assign({}, monthItem), { dateObject: Object.assign(Object.assign({}, dateObject), { date: 1 }), inCurrentMonth: false, isCurrentDate: false, inSpan: false, startOfSpan: false, endOfSpan: isEnd, selected: isEnd, ts: (0, utils_1.getMsByDateCommonItem)(item), type: 'date' });
|
|
46
|
+
};
|
|
47
|
+
const setMonthRange = (item, isEnd = false) => {
|
|
48
|
+
const monthItem = monthToDateItem(item, isEnd);
|
|
49
|
+
calendar.handleDateMouseEnter(monthItem);
|
|
50
|
+
calendar.handleDateClick(monthItem);
|
|
51
|
+
};
|
|
52
|
+
const handleMonthStartClick = (value, _doUpdate, item) => {
|
|
53
|
+
calendar.onUpdateStartCalendarValue(value);
|
|
54
|
+
isMonthRange.value && setMonthRange(item);
|
|
55
|
+
};
|
|
56
|
+
const handleMonthEndClick = (value, _doUpdate, item) => {
|
|
57
|
+
calendar.onUpdateEndCalendarValue(value);
|
|
58
|
+
isMonthRange.value && setMonthRange(item, true);
|
|
59
|
+
};
|
|
60
|
+
const handleYearStartClick = (value, _doUpdate, item) => {
|
|
61
|
+
calendar.onUpdateStartCalendarValue(value);
|
|
62
|
+
isYearRange.value && setMonthRange(item);
|
|
63
|
+
};
|
|
64
|
+
const handleYearEndClick = (value, _doUpdate, item) => {
|
|
65
|
+
calendar.onUpdateEndCalendarValue(value);
|
|
66
|
+
isYearRange.value && setMonthRange(item, true);
|
|
67
|
+
};
|
|
68
|
+
return Object.assign(Object.assign({}, calendar), { isMonthRange,
|
|
69
|
+
isYearRange,
|
|
70
|
+
isWithoutDay,
|
|
71
|
+
handleMonthStartClick,
|
|
72
|
+
handleMonthEndClick,
|
|
73
|
+
handleYearStartClick,
|
|
74
|
+
handleYearEndClick });
|
|
25
75
|
},
|
|
26
76
|
render() {
|
|
27
77
|
var _a, _b, _c;
|
|
28
|
-
const { mergedClsPrefix, shortcuts, onRender } = this;
|
|
78
|
+
const { mergedClsPrefix, shortcuts, onRender, isMonthRange, isYearRange, isWithoutDay, handleMonthStartClick, handleMonthEndClick, handleYearStartClick, handleYearEndClick } = this;
|
|
29
79
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
30
80
|
return ((0, vue_1.h)("div", { ref: "selfRef", tabindex: 0, class: [
|
|
31
81
|
`${mergedClsPrefix}-date-panel`,
|
|
@@ -34,47 +84,49 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
34
84
|
this.themeClass
|
|
35
85
|
], onKeydown: this.handlePanelKeyDown, onFocus: this.handlePanelFocus },
|
|
36
86
|
(0, vue_1.h)("div", { ref: "startDatesElRef", class: `${mergedClsPrefix}-date-panel-calendar ${mergedClsPrefix}-date-panel-calendar--start` },
|
|
37
|
-
(0, vue_1.h)(panelHeader_1.default, { value: this.startCalendarDateTime, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.startCalendarMonth, calendarYear: this.startCalendarYear,
|
|
38
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
87
|
+
(0, vue_1.h)(panelHeader_1.default, { value: this.startCalendarDateTime, mergedClsPrefix: mergedClsPrefix, isMonth: isMonthRange, isYear: isYearRange, calendarMonth: this.startCalendarMonth, calendarYear: this.startCalendarYear, onUpdateMonth: handleMonthStartClick, onUpdateYear: handleYearStartClick }),
|
|
88
|
+
isWithoutDay ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-placeholder` })) : ((0, vue_1.h)(vue_1.Fragment, null,
|
|
89
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => ((0, vue_1.h)("div", { key: weekday, class: `${mergedClsPrefix}-date-panel-weekdays__day` }, weekday)))),
|
|
90
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.startDateArray.map((dateItem, i) => ((0, vue_1.h)("div", { "data-u-date": true, key: i, class: [
|
|
91
|
+
`${mergedClsPrefix}-date-panel-date`,
|
|
92
|
+
{
|
|
93
|
+
[`${mergedClsPrefix}-date-panel-date--excluded`]: !dateItem.inCurrentMonth,
|
|
94
|
+
[`${mergedClsPrefix}-date-panel-date--current`]: dateItem.isCurrentDate,
|
|
95
|
+
[`${mergedClsPrefix}-date-panel-date--selected`]: dateItem.selected,
|
|
96
|
+
[`${mergedClsPrefix}-date-panel-date--covered`]: dateItem.inSpan,
|
|
97
|
+
[`${mergedClsPrefix}-date-panel-date--start`]: dateItem.startOfSpan,
|
|
98
|
+
[`${mergedClsPrefix}-date-panel-date--end`]: dateItem.endOfSpan,
|
|
99
|
+
[`${mergedClsPrefix}-date-panel-date--disabled`]: this.mergedIsDateDisabled(dateItem.ts)
|
|
100
|
+
}
|
|
101
|
+
], onClick: () => {
|
|
102
|
+
this.handleDateClick(dateItem);
|
|
103
|
+
}, onMouseenter: () => {
|
|
104
|
+
this.handleDateMouseEnter(dateItem);
|
|
105
|
+
} },
|
|
106
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-date__trigger` }),
|
|
107
|
+
dateItem.dateObject.date))))))),
|
|
57
108
|
(0, vue_1.h)("div", { ref: "endDatesElRef", class: `${mergedClsPrefix}-date-panel-calendar ${mergedClsPrefix}-date-panel-calendar--end` },
|
|
58
|
-
(0, vue_1.h)(panelHeader_1.default, { value: this.endCalendarDateTime, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.endCalendarMonth, calendarYear: this.endCalendarYear,
|
|
59
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
109
|
+
(0, vue_1.h)(panelHeader_1.default, { value: this.endCalendarDateTime, mergedClsPrefix: mergedClsPrefix, isMonth: isMonthRange, isYear: isYearRange, calendarMonth: this.endCalendarMonth, calendarYear: this.endCalendarYear, onUpdateMonth: handleMonthEndClick, onUpdateYear: handleYearEndClick }),
|
|
110
|
+
isWithoutDay ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-placeholder` })) : ((0, vue_1.h)(vue_1.Fragment, null,
|
|
111
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => ((0, vue_1.h)("div", { key: weekday, class: `${mergedClsPrefix}-date-panel-weekdays__day` }, weekday)))),
|
|
112
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.endDateArray.map((dateItem, i) => ((0, vue_1.h)("div", { "data-u-date": true, key: i, class: [
|
|
113
|
+
`${mergedClsPrefix}-date-panel-date`,
|
|
114
|
+
{
|
|
115
|
+
[`${mergedClsPrefix}-date-panel-date--excluded`]: !dateItem.inCurrentMonth,
|
|
116
|
+
[`${mergedClsPrefix}-date-panel-date--current`]: dateItem.isCurrentDate,
|
|
117
|
+
[`${mergedClsPrefix}-date-panel-date--selected`]: dateItem.selected,
|
|
118
|
+
[`${mergedClsPrefix}-date-panel-date--covered`]: dateItem.inSpan,
|
|
119
|
+
[`${mergedClsPrefix}-date-panel-date--start`]: dateItem.startOfSpan,
|
|
120
|
+
[`${mergedClsPrefix}-date-panel-date--end`]: dateItem.endOfSpan,
|
|
121
|
+
[`${mergedClsPrefix}-date-panel-date--disabled`]: this.mergedIsDateDisabled(dateItem.ts)
|
|
122
|
+
}
|
|
123
|
+
], onClick: () => {
|
|
124
|
+
this.handleDateClick(dateItem);
|
|
125
|
+
}, onMouseenter: () => {
|
|
126
|
+
this.handleDateMouseEnter(dateItem);
|
|
127
|
+
} },
|
|
128
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-date__trigger` }),
|
|
129
|
+
dateItem.dateObject.date))))))),
|
|
78
130
|
this.datePickerSlots.footer ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-footer` }, this.datePickerSlots.footer())) : null,
|
|
79
131
|
((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) || shortcuts ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-actions` },
|
|
80
132
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-actions__prefix` }, shortcuts &&
|
|
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
readonly active: BooleanConstructor;
|
|
13
13
|
readonly dateFormat: StringConstructor;
|
|
14
|
+
readonly type: import("vue").PropType<import("../config").DatePickerType>;
|
|
14
15
|
readonly timeFormat: {
|
|
15
16
|
readonly type: StringConstructor;
|
|
16
17
|
readonly value: "HH:mm:ss";
|
|
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
34
|
readonly onRender: import("vue").PropType<(() => void) | undefined>;
|
|
34
35
|
readonly panel: BooleanConstructor;
|
|
35
36
|
}, {
|
|
36
|
-
handleDateClick: (dateItem: import("../utils").
|
|
37
|
+
handleDateClick: (dateItem: import("../utils").DateCommonItem) => void;
|
|
37
38
|
handleDateInputBlur: () => void;
|
|
38
39
|
handleDateInput: (value: string) => void;
|
|
39
40
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -1224,6 +1225,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1224
1225
|
};
|
|
1225
1226
|
readonly active: BooleanConstructor;
|
|
1226
1227
|
readonly dateFormat: StringConstructor;
|
|
1228
|
+
readonly type: import("vue").PropType<import("../config").DatePickerType>;
|
|
1227
1229
|
readonly timeFormat: {
|
|
1228
1230
|
readonly type: StringConstructor;
|
|
1229
1231
|
readonly value: "HH:mm:ss";
|