@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
package/dist/index.js
CHANGED
|
@@ -597,16 +597,16 @@
|
|
|
597
597
|
|
|
598
598
|
const warnedMessages = /* @__PURE__ */new Set();
|
|
599
599
|
function warnOnce(location, message) {
|
|
600
|
-
const mergedMessage = `[
|
|
600
|
+
const mergedMessage = `[uzum-ui/${location}]: ${message}`;
|
|
601
601
|
if (warnedMessages.has(mergedMessage)) return;
|
|
602
602
|
warnedMessages.add(mergedMessage);
|
|
603
603
|
console.error(mergedMessage);
|
|
604
604
|
}
|
|
605
605
|
function warn$2(location, message) {
|
|
606
|
-
console.error(`[
|
|
606
|
+
console.error(`[uzum-ui/${location}]: ${message}`);
|
|
607
607
|
}
|
|
608
608
|
function throwError(location, message) {
|
|
609
|
-
throw new Error(`[
|
|
609
|
+
throw new Error(`[uzum-ui/${location}]: ${message}`);
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
function smallerSize(size) {
|
|
@@ -21112,7 +21112,7 @@
|
|
|
21112
21112
|
*
|
|
21113
21113
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
21114
21114
|
*/
|
|
21115
|
-
var formatters$
|
|
21115
|
+
var formatters$5 = {
|
|
21116
21116
|
// Year
|
|
21117
21117
|
y: function y(date, token) {
|
|
21118
21118
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
@@ -21271,7 +21271,7 @@
|
|
|
21271
21271
|
unit: 'year'
|
|
21272
21272
|
});
|
|
21273
21273
|
}
|
|
21274
|
-
return formatters$
|
|
21274
|
+
return formatters$5.y(date, token);
|
|
21275
21275
|
},
|
|
21276
21276
|
// Local week-numbering year
|
|
21277
21277
|
Y: function Y(date, token, localize, options) {
|
|
@@ -21393,7 +21393,7 @@
|
|
|
21393
21393
|
switch (token) {
|
|
21394
21394
|
case 'M':
|
|
21395
21395
|
case 'MM':
|
|
21396
|
-
return formatters$
|
|
21396
|
+
return formatters$5.M(date, token);
|
|
21397
21397
|
// 1st, 2nd, ..., 12th
|
|
21398
21398
|
case 'Mo':
|
|
21399
21399
|
return localize.ordinalNumber(month + 1, {
|
|
@@ -21483,7 +21483,7 @@
|
|
|
21483
21483
|
unit: 'date'
|
|
21484
21484
|
});
|
|
21485
21485
|
}
|
|
21486
|
-
return formatters$
|
|
21486
|
+
return formatters$5.d(date, token);
|
|
21487
21487
|
},
|
|
21488
21488
|
// Day of year
|
|
21489
21489
|
D: function D(date, token, localize) {
|
|
@@ -21763,7 +21763,7 @@
|
|
|
21763
21763
|
unit: 'hour'
|
|
21764
21764
|
});
|
|
21765
21765
|
}
|
|
21766
|
-
return formatters$
|
|
21766
|
+
return formatters$5.h(date, token);
|
|
21767
21767
|
},
|
|
21768
21768
|
// Hour [0-23]
|
|
21769
21769
|
H: function H(date, token, localize) {
|
|
@@ -21772,7 +21772,7 @@
|
|
|
21772
21772
|
unit: 'hour'
|
|
21773
21773
|
});
|
|
21774
21774
|
}
|
|
21775
|
-
return formatters$
|
|
21775
|
+
return formatters$5.H(date, token);
|
|
21776
21776
|
},
|
|
21777
21777
|
// Hour [0-11]
|
|
21778
21778
|
K: function K(date, token, localize) {
|
|
@@ -21802,7 +21802,7 @@
|
|
|
21802
21802
|
unit: 'minute'
|
|
21803
21803
|
});
|
|
21804
21804
|
}
|
|
21805
|
-
return formatters$
|
|
21805
|
+
return formatters$5.m(date, token);
|
|
21806
21806
|
},
|
|
21807
21807
|
// Second
|
|
21808
21808
|
s: function s(date, token, localize) {
|
|
@@ -21811,11 +21811,11 @@
|
|
|
21811
21811
|
unit: 'second'
|
|
21812
21812
|
});
|
|
21813
21813
|
}
|
|
21814
|
-
return formatters$
|
|
21814
|
+
return formatters$5.s(date, token);
|
|
21815
21815
|
},
|
|
21816
21816
|
// Fraction of second
|
|
21817
21817
|
S: function S(date, token) {
|
|
21818
|
-
return formatters$
|
|
21818
|
+
return formatters$5.S(date, token);
|
|
21819
21819
|
},
|
|
21820
21820
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
21821
21821
|
X: function X(date, token, _localize, options) {
|
|
@@ -21943,6 +21943,7 @@
|
|
|
21943
21943
|
var minutes = addLeadingZeros$2(absOffset % 60, 2);
|
|
21944
21944
|
return sign + hours + delimiter + minutes;
|
|
21945
21945
|
}
|
|
21946
|
+
var formatters$4 = formatters$3;
|
|
21946
21947
|
|
|
21947
21948
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
21948
21949
|
switch (pattern) {
|
|
@@ -22023,6 +22024,7 @@
|
|
|
22023
22024
|
p: timeLongFormatter,
|
|
22024
22025
|
P: dateTimeLongFormatter
|
|
22025
22026
|
};
|
|
22027
|
+
var longFormatters$2 = longFormatters$1;
|
|
22026
22028
|
|
|
22027
22029
|
var protectedDayOfYearTokens$1 = ['D', 'DD'];
|
|
22028
22030
|
var protectedWeekYearTokens$1 = ['YY', 'YYYY'];
|
|
@@ -22398,7 +22400,7 @@
|
|
|
22398
22400
|
var result = formatStr.match(longFormattingTokensRegExp$1).map(function (substring) {
|
|
22399
22401
|
var firstCharacter = substring[0];
|
|
22400
22402
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
22401
|
-
var longFormatter = longFormatters$
|
|
22403
|
+
var longFormatter = longFormatters$2[firstCharacter];
|
|
22402
22404
|
return longFormatter(substring, locale.formatLong);
|
|
22403
22405
|
}
|
|
22404
22406
|
return substring;
|
|
@@ -22411,7 +22413,7 @@
|
|
|
22411
22413
|
if (firstCharacter === "'") {
|
|
22412
22414
|
return cleanEscapedString$1(substring);
|
|
22413
22415
|
}
|
|
22414
|
-
var formatter = formatters$
|
|
22416
|
+
var formatter = formatters$4[firstCharacter];
|
|
22415
22417
|
if (formatter) {
|
|
22416
22418
|
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken$1(substring)) {
|
|
22417
22419
|
throwProtectedError$1(substring, dirtyFormatStr, String(dirtyDate));
|
|
@@ -25551,8 +25553,8 @@
|
|
|
25551
25553
|
var setters = [new DateToSystemTimezoneSetter()];
|
|
25552
25554
|
var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {
|
|
25553
25555
|
var firstCharacter = substring[0];
|
|
25554
|
-
if (firstCharacter in longFormatters$
|
|
25555
|
-
var longFormatter = longFormatters$
|
|
25556
|
+
if (firstCharacter in longFormatters$2) {
|
|
25557
|
+
var longFormatter = longFormatters$2[firstCharacter];
|
|
25556
25558
|
return longFormatter(substring, locale.formatLong);
|
|
25557
25559
|
}
|
|
25558
25560
|
return substring;
|
|
@@ -42629,7 +42631,7 @@
|
|
|
42629
42631
|
width: var(--u-close-icon-size);
|
|
42630
42632
|
height: var(--u-close-icon-size);
|
|
42631
42633
|
`),
|
|
42632
|
-
// fix: https://github.com/tusen-ai/
|
|
42634
|
+
// fix: https://github.com/tusen-ai/uzum-ui/issues/4588
|
|
42633
42635
|
cM("right-adjust", [cB("alert-body", `
|
|
42634
42636
|
padding-right: calc(var(--u-close-size) + var(--u-padding) + 2px);
|
|
42635
42637
|
`)]), cM("show-icon", [cB("alert-body", [cE("content, title", `
|
|
@@ -42863,7 +42865,7 @@
|
|
|
42863
42865
|
`${mergedClsPrefix}-alert--${this.layoutType}`,
|
|
42864
42866
|
this.actionsHorizontal && `${mergedClsPrefix}-alert--horizontal`,
|
|
42865
42867
|
this.showIcon && `${mergedClsPrefix}-alert--show-icon`,
|
|
42866
|
-
// fix: https://github.com/tusen-ai/
|
|
42868
|
+
// fix: https://github.com/tusen-ai/uzum-ui/issues/4588
|
|
42867
42869
|
!this.title && this.closable && `${mergedClsPrefix}-alert--right-adjust`,
|
|
42868
42870
|
this.rtlEnabled && `${mergedClsPrefix}-alert--rtl`
|
|
42869
42871
|
],
|
|
@@ -48543,7 +48545,7 @@
|
|
|
48543
48545
|
}
|
|
48544
48546
|
});
|
|
48545
48547
|
|
|
48546
|
-
const START_YEAR =
|
|
48548
|
+
const START_YEAR = 1924;
|
|
48547
48549
|
const END_YEAR = /* @__PURE__ */new Date().getFullYear();
|
|
48548
48550
|
const MONTH_ITEM_HEIGHT = 50;
|
|
48549
48551
|
const MONTH_ITEM_GAP = 8;
|
|
@@ -48693,6 +48695,23 @@
|
|
|
48693
48695
|
function pluckValueFromRange(value, type) {
|
|
48694
48696
|
return Array.isArray(value) ? value[type === "start" ? 0 : 1] : null;
|
|
48695
48697
|
}
|
|
48698
|
+
function isDateItem(item) {
|
|
48699
|
+
return !!item;
|
|
48700
|
+
}
|
|
48701
|
+
function getMsByDateCommonItem(item) {
|
|
48702
|
+
if (!isDateItem(item)) return 0;
|
|
48703
|
+
const {
|
|
48704
|
+
dateObject: {
|
|
48705
|
+
year,
|
|
48706
|
+
month,
|
|
48707
|
+
date
|
|
48708
|
+
}
|
|
48709
|
+
} = item;
|
|
48710
|
+
const resultDate = /* @__PURE__ */new Date();
|
|
48711
|
+
resultDate.setFullYear(year, month || 0, date || 1);
|
|
48712
|
+
resultDate.setHours(0, 0, 0);
|
|
48713
|
+
return resultDate.getTime();
|
|
48714
|
+
}
|
|
48696
48715
|
|
|
48697
48716
|
const self$10 = vars => {
|
|
48698
48717
|
const {
|
|
@@ -71854,6 +71873,7 @@
|
|
|
71854
71873
|
const usePanelCommonProps = {
|
|
71855
71874
|
active: Boolean,
|
|
71856
71875
|
dateFormat: String,
|
|
71876
|
+
type: String,
|
|
71857
71877
|
timeFormat: {
|
|
71858
71878
|
type: String,
|
|
71859
71879
|
value: TIME_FORMAT
|
|
@@ -72377,7 +72397,11 @@
|
|
|
72377
72397
|
],
|
|
72378
72398
|
onClick: () => {
|
|
72379
72399
|
useAsQuickJump ? handleQuickMonthClick(item, (value) => {
|
|
72380
|
-
props.onUpdateValue(
|
|
72400
|
+
props.onUpdateValue(
|
|
72401
|
+
value,
|
|
72402
|
+
false,
|
|
72403
|
+
item
|
|
72404
|
+
);
|
|
72381
72405
|
}) : handleDateClick(item);
|
|
72382
72406
|
}
|
|
72383
72407
|
},
|
|
@@ -72406,17 +72430,9 @@
|
|
|
72406
72430
|
onKeydown: this.handlePanelKeyDown
|
|
72407
72431
|
},
|
|
72408
72432
|
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` }, {
|
|
72409
|
-
default: () =>
|
|
72410
|
-
|
|
72411
|
-
|
|
72412
|
-
),
|
|
72413
|
-
/* @__PURE__ */ vue.h(
|
|
72414
|
-
"div",
|
|
72415
|
-
{
|
|
72416
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__padding`
|
|
72417
|
-
}
|
|
72418
|
-
)
|
|
72419
|
-
]
|
|
72433
|
+
default: () => this.monthArray.map(
|
|
72434
|
+
(item, i) => renderItem(item, i, mergedClsPrefix)
|
|
72435
|
+
)
|
|
72420
72436
|
}),
|
|
72421
72437
|
/* @__PURE__ */ vue.h(FocusDetector, { onFocus: this.handleFocusDetectorFocus })
|
|
72422
72438
|
);
|
|
@@ -72439,6 +72455,7 @@
|
|
|
72439
72455
|
type: String,
|
|
72440
72456
|
required: true
|
|
72441
72457
|
},
|
|
72458
|
+
disabled: Boolean,
|
|
72442
72459
|
onUpdateValue: {
|
|
72443
72460
|
type: Function,
|
|
72444
72461
|
required: true
|
|
@@ -72456,10 +72473,12 @@
|
|
|
72456
72473
|
}
|
|
72457
72474
|
});
|
|
72458
72475
|
function handleHeaderClick() {
|
|
72476
|
+
if (props.disabled)
|
|
72477
|
+
return;
|
|
72459
72478
|
showRef.value = !showRef.value;
|
|
72460
72479
|
}
|
|
72461
|
-
function handleUpdateValue(value) {
|
|
72462
|
-
props.onUpdateValue(value);
|
|
72480
|
+
function handleUpdateValue(value, doUpdate, item) {
|
|
72481
|
+
props.onUpdateValue(value, doUpdate, item);
|
|
72463
72482
|
handleHeaderClick();
|
|
72464
72483
|
}
|
|
72465
72484
|
return {
|
|
@@ -72470,13 +72489,14 @@
|
|
|
72470
72489
|
};
|
|
72471
72490
|
},
|
|
72472
72491
|
render() {
|
|
72473
|
-
const { mergedClsPrefix } = this;
|
|
72492
|
+
const { mergedClsPrefix, disabled } = this;
|
|
72474
72493
|
return /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-month__month-year` }, /* @__PURE__ */ vue.h(
|
|
72475
72494
|
"div",
|
|
72476
72495
|
{
|
|
72477
72496
|
class: [
|
|
72478
72497
|
`${mergedClsPrefix}-date-panel-month__text`,
|
|
72479
|
-
this.show && `${mergedClsPrefix}-date-panel-month__text--active
|
|
72498
|
+
this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
|
|
72499
|
+
disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
|
|
72480
72500
|
],
|
|
72481
72501
|
onClick: this.handleHeaderClick
|
|
72482
72502
|
},
|
|
@@ -72533,7 +72553,11 @@
|
|
|
72533
72553
|
],
|
|
72534
72554
|
onClick: () => {
|
|
72535
72555
|
useAsQuickJump ? handleQuickMonthClick(item, (value) => {
|
|
72536
|
-
props.onUpdateValue(
|
|
72556
|
+
props.onUpdateValue(
|
|
72557
|
+
value,
|
|
72558
|
+
false,
|
|
72559
|
+
item
|
|
72560
|
+
);
|
|
72537
72561
|
}) : handleDateClick(item);
|
|
72538
72562
|
}
|
|
72539
72563
|
},
|
|
@@ -72556,6 +72580,7 @@
|
|
|
72556
72580
|
class: [
|
|
72557
72581
|
`${mergedClsPrefix}-date-panel`,
|
|
72558
72582
|
`${mergedClsPrefix}-date-panel--month`,
|
|
72583
|
+
`${mergedClsPrefix}-date-panel--year`,
|
|
72559
72584
|
this.themeClass
|
|
72560
72585
|
],
|
|
72561
72586
|
onFocus: this.handlePanelFocus,
|
|
@@ -72597,6 +72622,7 @@
|
|
|
72597
72622
|
type: String,
|
|
72598
72623
|
required: true
|
|
72599
72624
|
},
|
|
72625
|
+
disabled: Boolean,
|
|
72600
72626
|
onUpdateValue: {
|
|
72601
72627
|
type: Function,
|
|
72602
72628
|
required: true
|
|
@@ -72614,10 +72640,12 @@
|
|
|
72614
72640
|
}
|
|
72615
72641
|
});
|
|
72616
72642
|
function handleHeaderClick() {
|
|
72643
|
+
if (props.disabled)
|
|
72644
|
+
return;
|
|
72617
72645
|
showRef.value = !showRef.value;
|
|
72618
72646
|
}
|
|
72619
|
-
function handleUpdateValue(value) {
|
|
72620
|
-
props.onUpdateValue(value);
|
|
72647
|
+
function handleUpdateValue(value, doUpdate, item) {
|
|
72648
|
+
props.onUpdateValue(value, doUpdate, item);
|
|
72621
72649
|
handleHeaderClick();
|
|
72622
72650
|
}
|
|
72623
72651
|
return {
|
|
@@ -72628,7 +72656,7 @@
|
|
|
72628
72656
|
};
|
|
72629
72657
|
},
|
|
72630
72658
|
render() {
|
|
72631
|
-
const { mergedClsPrefix } = this;
|
|
72659
|
+
const { mergedClsPrefix, disabled } = this;
|
|
72632
72660
|
return /* @__PURE__ */ vue.h(
|
|
72633
72661
|
"div",
|
|
72634
72662
|
{
|
|
@@ -72640,7 +72668,8 @@
|
|
|
72640
72668
|
{
|
|
72641
72669
|
class: [
|
|
72642
72670
|
`${mergedClsPrefix}-date-panel-month__text`,
|
|
72643
|
-
this.show && `${mergedClsPrefix}-date-panel-month__text--active
|
|
72671
|
+
this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
|
|
72672
|
+
disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
|
|
72644
72673
|
],
|
|
72645
72674
|
onClick: this.handleHeaderClick
|
|
72646
72675
|
},
|
|
@@ -72687,14 +72716,21 @@
|
|
|
72687
72716
|
type: String,
|
|
72688
72717
|
required: true
|
|
72689
72718
|
},
|
|
72690
|
-
|
|
72691
|
-
type:
|
|
72692
|
-
|
|
72693
|
-
}
|
|
72719
|
+
isMonth: {
|
|
72720
|
+
type: Boolean,
|
|
72721
|
+
value: false
|
|
72722
|
+
},
|
|
72723
|
+
isYear: {
|
|
72724
|
+
type: Boolean,
|
|
72725
|
+
value: false
|
|
72726
|
+
},
|
|
72727
|
+
onUpdateValue: Function,
|
|
72728
|
+
onUpdateMonth: Function,
|
|
72729
|
+
onUpdateYear: Function
|
|
72694
72730
|
},
|
|
72695
|
-
setup() {
|
|
72696
|
-
const monthPanelIsActive = vue.ref(
|
|
72697
|
-
const yearPanelIsActive = vue.ref(
|
|
72731
|
+
setup(props) {
|
|
72732
|
+
const monthPanelIsActive = vue.ref(props.isMonth);
|
|
72733
|
+
const yearPanelIsActive = vue.ref(props.isYear);
|
|
72698
72734
|
function onUpdateMonthPanelIsActive(value) {
|
|
72699
72735
|
monthPanelIsActive.value = value;
|
|
72700
72736
|
if (value)
|
|
@@ -72702,41 +72738,65 @@
|
|
|
72702
72738
|
}
|
|
72703
72739
|
function onUpdateYearPanelIsActive(value) {
|
|
72704
72740
|
yearPanelIsActive.value = value;
|
|
72705
|
-
if (value)
|
|
72741
|
+
if (value && !props.isMonth)
|
|
72706
72742
|
monthPanelIsActive.value = false;
|
|
72707
72743
|
}
|
|
72744
|
+
function handleUpdateMonth(value, doUpdate, item) {
|
|
72745
|
+
props.onUpdateMonth?.(value, doUpdate, item);
|
|
72746
|
+
props.onUpdateValue?.(value, doUpdate, item);
|
|
72747
|
+
}
|
|
72748
|
+
function handleUpdateYear(value, doUpdate, item) {
|
|
72749
|
+
props.onUpdateYear?.(value, doUpdate, item);
|
|
72750
|
+
props.onUpdateValue?.(value, doUpdate, item);
|
|
72751
|
+
}
|
|
72708
72752
|
return {
|
|
72709
72753
|
monthPanelIsActive,
|
|
72710
72754
|
yearPanelIsActive,
|
|
72711
72755
|
onUpdateMonthPanelIsActive,
|
|
72712
|
-
onUpdateYearPanelIsActive
|
|
72756
|
+
onUpdateYearPanelIsActive,
|
|
72757
|
+
handleUpdateMonth,
|
|
72758
|
+
handleUpdateYear
|
|
72713
72759
|
};
|
|
72714
72760
|
},
|
|
72715
72761
|
render() {
|
|
72716
|
-
const { mergedClsPrefix } = this;
|
|
72717
|
-
return /* @__PURE__ */ vue.h(
|
|
72718
|
-
|
|
72719
|
-
{
|
|
72720
|
-
panelActive: this.monthPanelIsActive,
|
|
72721
|
-
value: this.value,
|
|
72722
|
-
mergedClsPrefix,
|
|
72723
|
-
calendarMonth: this.calendarMonth,
|
|
72724
|
-
calendarYear: this.calendarYear,
|
|
72725
|
-
onUpdatePanelActive: this.onUpdateMonthPanelIsActive,
|
|
72726
|
-
onUpdateValue: this.onUpdateValue
|
|
72727
|
-
}
|
|
72728
|
-
), /* @__PURE__ */ vue.h(
|
|
72729
|
-
PanelYear,
|
|
72762
|
+
const { mergedClsPrefix, isYear } = this;
|
|
72763
|
+
return /* @__PURE__ */ vue.h(
|
|
72764
|
+
"div",
|
|
72730
72765
|
{
|
|
72731
|
-
|
|
72732
|
-
|
|
72733
|
-
|
|
72734
|
-
|
|
72735
|
-
|
|
72736
|
-
|
|
72737
|
-
|
|
72738
|
-
|
|
72739
|
-
|
|
72766
|
+
class: [
|
|
72767
|
+
`${mergedClsPrefix}-date-panel-month`,
|
|
72768
|
+
{
|
|
72769
|
+
[`${mergedClsPrefix}-date-panel-month--justify-end`]: isYear
|
|
72770
|
+
}
|
|
72771
|
+
]
|
|
72772
|
+
},
|
|
72773
|
+
isYear ? null : /* @__PURE__ */ vue.h(
|
|
72774
|
+
PanelMonth,
|
|
72775
|
+
{
|
|
72776
|
+
panelActive: this.monthPanelIsActive,
|
|
72777
|
+
value: this.value,
|
|
72778
|
+
mergedClsPrefix,
|
|
72779
|
+
calendarMonth: this.calendarMonth,
|
|
72780
|
+
calendarYear: this.calendarYear,
|
|
72781
|
+
disabled: this.isMonth,
|
|
72782
|
+
onUpdatePanelActive: this.onUpdateMonthPanelIsActive,
|
|
72783
|
+
onUpdateValue: this.handleUpdateMonth
|
|
72784
|
+
}
|
|
72785
|
+
),
|
|
72786
|
+
/* @__PURE__ */ vue.h(
|
|
72787
|
+
PanelYear,
|
|
72788
|
+
{
|
|
72789
|
+
panelActive: this.yearPanelIsActive,
|
|
72790
|
+
value: this.value,
|
|
72791
|
+
mergedClsPrefix,
|
|
72792
|
+
calendarMonth: this.calendarMonth,
|
|
72793
|
+
calendarYear: this.calendarYear,
|
|
72794
|
+
disabled: this.isYear,
|
|
72795
|
+
onUpdatePanelActive: this.onUpdateYearPanelIsActive,
|
|
72796
|
+
onUpdateValue: this.handleUpdateYear
|
|
72797
|
+
}
|
|
72798
|
+
)
|
|
72799
|
+
);
|
|
72740
72800
|
}
|
|
72741
72801
|
});
|
|
72742
72802
|
|
|
@@ -73796,10 +73856,53 @@
|
|
|
73796
73856
|
}
|
|
73797
73857
|
});
|
|
73798
73858
|
}
|
|
73799
|
-
|
|
73859
|
+
const calendar = useCalendar(props, "date");
|
|
73860
|
+
const type = props.type;
|
|
73861
|
+
const monthTypes = ["month", "quarter"];
|
|
73862
|
+
const withoutDayTypes = [...monthTypes, "year"];
|
|
73863
|
+
const isWithoutDay = vue.computed(() => withoutDayTypes.includes(type));
|
|
73864
|
+
const isMonth = vue.computed(() => monthTypes.includes(type));
|
|
73865
|
+
const isYear = vue.computed(() => type === "year");
|
|
73866
|
+
const updateMonth = (item) => {
|
|
73867
|
+
const dateItem = item;
|
|
73868
|
+
calendar.handleDateClick({
|
|
73869
|
+
...dateItem,
|
|
73870
|
+
dateObject: {
|
|
73871
|
+
...dateItem.dateObject,
|
|
73872
|
+
month: dateItem.dateObject.month || 0,
|
|
73873
|
+
date: 1
|
|
73874
|
+
},
|
|
73875
|
+
ts: getMsByDateCommonItem(dateItem)
|
|
73876
|
+
});
|
|
73877
|
+
};
|
|
73878
|
+
const handleMonthClick = (value, _doUpdate, item) => {
|
|
73879
|
+
calendar.onUpdateCalendarValue(value);
|
|
73880
|
+
isMonth.value && updateMonth(item);
|
|
73881
|
+
};
|
|
73882
|
+
const handleYearClick = (value, _doUpdate, item) => {
|
|
73883
|
+
calendar.onUpdateCalendarValue(value);
|
|
73884
|
+
isYear.value && updateMonth(item);
|
|
73885
|
+
};
|
|
73886
|
+
return {
|
|
73887
|
+
...calendar,
|
|
73888
|
+
isWithoutDay,
|
|
73889
|
+
isMonth,
|
|
73890
|
+
isYear,
|
|
73891
|
+
handleMonthClick,
|
|
73892
|
+
handleYearClick
|
|
73893
|
+
};
|
|
73800
73894
|
},
|
|
73801
73895
|
render() {
|
|
73802
|
-
const {
|
|
73896
|
+
const {
|
|
73897
|
+
mergedClsPrefix,
|
|
73898
|
+
shortcuts,
|
|
73899
|
+
onRender,
|
|
73900
|
+
isWithoutDay,
|
|
73901
|
+
isYear,
|
|
73902
|
+
isMonth,
|
|
73903
|
+
handleMonthClick,
|
|
73904
|
+
handleYearClick
|
|
73905
|
+
} = this;
|
|
73803
73906
|
onRender?.();
|
|
73804
73907
|
return /* @__PURE__ */ vue.h(
|
|
73805
73908
|
"div",
|
|
@@ -73819,12 +73922,15 @@
|
|
|
73819
73922
|
PanelHeader,
|
|
73820
73923
|
{
|
|
73821
73924
|
value: this.calendarValue,
|
|
73925
|
+
isMonth,
|
|
73926
|
+
isYear,
|
|
73822
73927
|
mergedClsPrefix,
|
|
73823
73928
|
calendarMonth: this.calendarMonth,
|
|
73824
73929
|
calendarYear: this.calendarYear,
|
|
73825
|
-
|
|
73930
|
+
onUpdateMonth: handleMonthClick,
|
|
73931
|
+
onUpdateYear: handleYearClick
|
|
73826
73932
|
}
|
|
73827
|
-
), /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
73933
|
+
), isWithoutDay ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-placeholder` }) : /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
73828
73934
|
"div",
|
|
73829
73935
|
{
|
|
73830
73936
|
key: weekday,
|
|
@@ -73849,9 +73955,14 @@
|
|
|
73849
73955
|
this.handleDateClick(dateItem);
|
|
73850
73956
|
}
|
|
73851
73957
|
},
|
|
73852
|
-
/* @__PURE__ */ vue.h(
|
|
73958
|
+
/* @__PURE__ */ vue.h(
|
|
73959
|
+
"div",
|
|
73960
|
+
{
|
|
73961
|
+
class: `${mergedClsPrefix}-date-panel-date__trigger`
|
|
73962
|
+
}
|
|
73963
|
+
),
|
|
73853
73964
|
dateItem.dateObject.date
|
|
73854
|
-
)))),
|
|
73965
|
+
))))),
|
|
73855
73966
|
this.datePickerSlots.footer ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-footer` }, this.datePickerSlots.footer()) : null,
|
|
73856
73967
|
this.actions?.length || shortcuts ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions` }, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions__prefix` }, shortcuts && Object.keys(shortcuts).map((key) => {
|
|
73857
73968
|
const shortcut = shortcuts[key];
|
|
@@ -73893,10 +74004,76 @@
|
|
|
73893
74004
|
}
|
|
73894
74005
|
});
|
|
73895
74006
|
}
|
|
73896
|
-
|
|
74007
|
+
const calendar = useDualCalendar(props, "daterange");
|
|
74008
|
+
const type = props.type;
|
|
74009
|
+
const monthRanges = ["monthrange", "quarterrange"];
|
|
74010
|
+
const withoutDayTypes = [...monthRanges, "yearrange"];
|
|
74011
|
+
const isWithoutDay = vue.computed(() => withoutDayTypes.includes(type));
|
|
74012
|
+
const isMonthRange = vue.computed(() => monthRanges.includes(type));
|
|
74013
|
+
const isYearRange = vue.computed(() => type === "yearrange");
|
|
74014
|
+
const monthToDateItem = (item, isEnd = false) => {
|
|
74015
|
+
const { dateObject, ...monthItem } = item;
|
|
74016
|
+
return {
|
|
74017
|
+
...monthItem,
|
|
74018
|
+
dateObject: {
|
|
74019
|
+
...dateObject,
|
|
74020
|
+
date: 1
|
|
74021
|
+
},
|
|
74022
|
+
inCurrentMonth: false,
|
|
74023
|
+
isCurrentDate: false,
|
|
74024
|
+
inSpan: false,
|
|
74025
|
+
startOfSpan: false,
|
|
74026
|
+
endOfSpan: isEnd,
|
|
74027
|
+
selected: isEnd,
|
|
74028
|
+
ts: getMsByDateCommonItem(item),
|
|
74029
|
+
type: "date"
|
|
74030
|
+
};
|
|
74031
|
+
};
|
|
74032
|
+
const setMonthRange = (item, isEnd = false) => {
|
|
74033
|
+
const monthItem = monthToDateItem(item, isEnd);
|
|
74034
|
+
calendar.handleDateMouseEnter(monthItem);
|
|
74035
|
+
calendar.handleDateClick(monthItem);
|
|
74036
|
+
};
|
|
74037
|
+
const handleMonthStartClick = (value, _doUpdate, item) => {
|
|
74038
|
+
calendar.onUpdateStartCalendarValue(value);
|
|
74039
|
+
isMonthRange.value && setMonthRange(item);
|
|
74040
|
+
};
|
|
74041
|
+
const handleMonthEndClick = (value, _doUpdate, item) => {
|
|
74042
|
+
calendar.onUpdateEndCalendarValue(value);
|
|
74043
|
+
isMonthRange.value && setMonthRange(item, true);
|
|
74044
|
+
};
|
|
74045
|
+
const handleYearStartClick = (value, _doUpdate, item) => {
|
|
74046
|
+
calendar.onUpdateStartCalendarValue(value);
|
|
74047
|
+
isYearRange.value && setMonthRange(item);
|
|
74048
|
+
};
|
|
74049
|
+
const handleYearEndClick = (value, _doUpdate, item) => {
|
|
74050
|
+
calendar.onUpdateEndCalendarValue(value);
|
|
74051
|
+
isYearRange.value && setMonthRange(item, true);
|
|
74052
|
+
};
|
|
74053
|
+
return {
|
|
74054
|
+
...calendar,
|
|
74055
|
+
isMonthRange,
|
|
74056
|
+
isYearRange,
|
|
74057
|
+
isWithoutDay,
|
|
74058
|
+
handleMonthStartClick,
|
|
74059
|
+
handleMonthEndClick,
|
|
74060
|
+
handleYearStartClick,
|
|
74061
|
+
handleYearEndClick
|
|
74062
|
+
};
|
|
73897
74063
|
},
|
|
73898
74064
|
render() {
|
|
73899
|
-
const {
|
|
74065
|
+
const {
|
|
74066
|
+
mergedClsPrefix,
|
|
74067
|
+
shortcuts,
|
|
74068
|
+
onRender,
|
|
74069
|
+
isMonthRange,
|
|
74070
|
+
isYearRange,
|
|
74071
|
+
isWithoutDay,
|
|
74072
|
+
handleMonthStartClick,
|
|
74073
|
+
handleMonthEndClick,
|
|
74074
|
+
handleYearStartClick,
|
|
74075
|
+
handleYearEndClick
|
|
74076
|
+
} = this;
|
|
73900
74077
|
onRender?.();
|
|
73901
74078
|
return /* @__PURE__ */ vue.h(
|
|
73902
74079
|
"div",
|
|
@@ -73923,20 +74100,22 @@
|
|
|
73923
74100
|
{
|
|
73924
74101
|
value: this.startCalendarDateTime,
|
|
73925
74102
|
mergedClsPrefix,
|
|
74103
|
+
isMonth: isMonthRange,
|
|
74104
|
+
isYear: isYearRange,
|
|
73926
74105
|
calendarMonth: this.startCalendarMonth,
|
|
73927
74106
|
calendarYear: this.startCalendarYear,
|
|
73928
|
-
|
|
74107
|
+
onUpdateMonth: handleMonthStartClick,
|
|
74108
|
+
onUpdateYear: handleYearStartClick
|
|
73929
74109
|
}
|
|
73930
74110
|
),
|
|
73931
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
74111
|
+
isWithoutDay ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-placeholder` }) : /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
73932
74112
|
"div",
|
|
73933
74113
|
{
|
|
73934
74114
|
key: weekday,
|
|
73935
74115
|
class: `${mergedClsPrefix}-date-panel-weekdays__day`
|
|
73936
74116
|
},
|
|
73937
74117
|
weekday
|
|
73938
|
-
))),
|
|
73939
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.startDateArray.map((dateItem, i) => /* @__PURE__ */ vue.h(
|
|
74118
|
+
))), /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.startDateArray.map((dateItem, i) => /* @__PURE__ */ vue.h(
|
|
73940
74119
|
"div",
|
|
73941
74120
|
{
|
|
73942
74121
|
"data-u-date": true,
|
|
@@ -73960,9 +74139,14 @@
|
|
|
73960
74139
|
this.handleDateMouseEnter(dateItem);
|
|
73961
74140
|
}
|
|
73962
74141
|
},
|
|
73963
|
-
/* @__PURE__ */ vue.h(
|
|
74142
|
+
/* @__PURE__ */ vue.h(
|
|
74143
|
+
"div",
|
|
74144
|
+
{
|
|
74145
|
+
class: `${mergedClsPrefix}-date-panel-date__trigger`
|
|
74146
|
+
}
|
|
74147
|
+
),
|
|
73964
74148
|
dateItem.dateObject.date
|
|
73965
|
-
)))
|
|
74149
|
+
))))
|
|
73966
74150
|
),
|
|
73967
74151
|
/* @__PURE__ */ vue.h(
|
|
73968
74152
|
"div",
|
|
@@ -73975,20 +74159,22 @@
|
|
|
73975
74159
|
{
|
|
73976
74160
|
value: this.endCalendarDateTime,
|
|
73977
74161
|
mergedClsPrefix,
|
|
74162
|
+
isMonth: isMonthRange,
|
|
74163
|
+
isYear: isYearRange,
|
|
73978
74164
|
calendarMonth: this.endCalendarMonth,
|
|
73979
74165
|
calendarYear: this.endCalendarYear,
|
|
73980
|
-
|
|
74166
|
+
onUpdateMonth: handleMonthEndClick,
|
|
74167
|
+
onUpdateYear: handleYearEndClick
|
|
73981
74168
|
}
|
|
73982
74169
|
),
|
|
73983
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
74170
|
+
isWithoutDay ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-placeholder` }) : /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-weekdays` }, this.weekdays.map((weekday) => /* @__PURE__ */ vue.h(
|
|
73984
74171
|
"div",
|
|
73985
74172
|
{
|
|
73986
74173
|
key: weekday,
|
|
73987
74174
|
class: `${mergedClsPrefix}-date-panel-weekdays__day`
|
|
73988
74175
|
},
|
|
73989
74176
|
weekday
|
|
73990
|
-
))),
|
|
73991
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.endDateArray.map((dateItem, i) => /* @__PURE__ */ vue.h(
|
|
74177
|
+
))), /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-dates` }, this.endDateArray.map((dateItem, i) => /* @__PURE__ */ vue.h(
|
|
73992
74178
|
"div",
|
|
73993
74179
|
{
|
|
73994
74180
|
"data-u-date": true,
|
|
@@ -74012,9 +74198,14 @@
|
|
|
74012
74198
|
this.handleDateMouseEnter(dateItem);
|
|
74013
74199
|
}
|
|
74014
74200
|
},
|
|
74015
|
-
/* @__PURE__ */ vue.h(
|
|
74201
|
+
/* @__PURE__ */ vue.h(
|
|
74202
|
+
"div",
|
|
74203
|
+
{
|
|
74204
|
+
class: `${mergedClsPrefix}-date-panel-date__trigger`
|
|
74205
|
+
}
|
|
74206
|
+
),
|
|
74016
74207
|
dateItem.dateObject.date
|
|
74017
|
-
)))
|
|
74208
|
+
))))
|
|
74018
74209
|
),
|
|
74019
74210
|
this.datePickerSlots.footer ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-footer` }, this.datePickerSlots.footer()) : null,
|
|
74020
74211
|
this.actions?.length || shortcuts ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions` }, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions__prefix` }, shortcuts && Object.keys(shortcuts).map((key) => {
|
|
@@ -74051,250 +74242,6 @@
|
|
|
74051
74242
|
}
|
|
74052
74243
|
});
|
|
74053
74244
|
|
|
74054
|
-
var MonthRangePanel = vue.defineComponent({
|
|
74055
|
-
name: "MonthRangePanel",
|
|
74056
|
-
props: {
|
|
74057
|
-
...useDualCalendarProps,
|
|
74058
|
-
type: {
|
|
74059
|
-
type: String,
|
|
74060
|
-
required: true
|
|
74061
|
-
}
|
|
74062
|
-
},
|
|
74063
|
-
setup(props) {
|
|
74064
|
-
{
|
|
74065
|
-
vue.watchEffect(() => {
|
|
74066
|
-
if (props.actions?.includes("now")) {
|
|
74067
|
-
warnOnce(
|
|
74068
|
-
"date-picker",
|
|
74069
|
-
`The \`now\` action is not supported for u-date-picker of ${props.type}type`
|
|
74070
|
-
);
|
|
74071
|
-
}
|
|
74072
|
-
});
|
|
74073
|
-
}
|
|
74074
|
-
const useCalendarRef = useDualCalendar(props, props.type);
|
|
74075
|
-
const renderItem = (item, i, mergedClsPrefix, type) => {
|
|
74076
|
-
const { handleColItemClick } = useCalendarRef;
|
|
74077
|
-
const disabled = false;
|
|
74078
|
-
return /* @__PURE__ */ vue.h(
|
|
74079
|
-
"div",
|
|
74080
|
-
{
|
|
74081
|
-
"data-u-date": true,
|
|
74082
|
-
key: i,
|
|
74083
|
-
class: [
|
|
74084
|
-
`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item`,
|
|
74085
|
-
{
|
|
74086
|
-
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--current`]: item.isCurrent,
|
|
74087
|
-
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--selected`]: item.selected,
|
|
74088
|
-
[`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--disabled`]: disabled
|
|
74089
|
-
}
|
|
74090
|
-
],
|
|
74091
|
-
onClick: () => {
|
|
74092
|
-
handleColItemClick(item, type);
|
|
74093
|
-
}
|
|
74094
|
-
},
|
|
74095
|
-
item.type === "month" ? item.dateObject.month + 1 : item.type === "quarter" ? `Q${item.dateObject.quarter}` : item.dateObject.year
|
|
74096
|
-
);
|
|
74097
|
-
};
|
|
74098
|
-
vue.onMounted(() => {
|
|
74099
|
-
useCalendarRef.justifyColumnsScrollState();
|
|
74100
|
-
});
|
|
74101
|
-
return { ...useCalendarRef, renderItem };
|
|
74102
|
-
},
|
|
74103
|
-
render() {
|
|
74104
|
-
const {
|
|
74105
|
-
mergedClsPrefix,
|
|
74106
|
-
mergedTheme,
|
|
74107
|
-
shortcuts,
|
|
74108
|
-
type,
|
|
74109
|
-
renderItem,
|
|
74110
|
-
onRender
|
|
74111
|
-
} = this;
|
|
74112
|
-
onRender?.();
|
|
74113
|
-
return /* @__PURE__ */ vue.h(
|
|
74114
|
-
"div",
|
|
74115
|
-
{
|
|
74116
|
-
ref: "selfRef",
|
|
74117
|
-
tabindex: 0,
|
|
74118
|
-
class: [
|
|
74119
|
-
`${mergedClsPrefix}-date-panel`,
|
|
74120
|
-
`${mergedClsPrefix}-date-panel--daterange`,
|
|
74121
|
-
!this.panel && `${mergedClsPrefix}-date-panel--shadow`,
|
|
74122
|
-
this.themeClass
|
|
74123
|
-
],
|
|
74124
|
-
onKeydown: this.handlePanelKeyDown,
|
|
74125
|
-
onFocus: this.handlePanelFocus
|
|
74126
|
-
},
|
|
74127
|
-
/* @__PURE__ */ vue.h(
|
|
74128
|
-
"div",
|
|
74129
|
-
{
|
|
74130
|
-
ref: "startDatesElRef",
|
|
74131
|
-
class: `${mergedClsPrefix}-date-panel-calendar ${mergedClsPrefix}-date-panel-calendar--start`
|
|
74132
|
-
},
|
|
74133
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` }, /* @__PURE__ */ vue.h(
|
|
74134
|
-
Scrollbar$1,
|
|
74135
|
-
{
|
|
74136
|
-
ref: "startYearScrollbarRef",
|
|
74137
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col`,
|
|
74138
|
-
theme: mergedTheme.peers.Scrollbar,
|
|
74139
|
-
themeOverrides: mergedTheme.peerOverrides.Scrollbar,
|
|
74140
|
-
container: () => this.virtualListContainer("start"),
|
|
74141
|
-
content: () => this.virtualListContent("start"),
|
|
74142
|
-
horizontalRailStyle: { zIndex: 1 },
|
|
74143
|
-
verticalRailStyle: { zIndex: 1 }
|
|
74144
|
-
},
|
|
74145
|
-
{
|
|
74146
|
-
default: () => /* @__PURE__ */ vue.h(
|
|
74147
|
-
VVirtualList,
|
|
74148
|
-
{
|
|
74149
|
-
ref: "startYearVlRef",
|
|
74150
|
-
items: this.startYearArray,
|
|
74151
|
-
itemSize: MONTH_ITEM_HEIGHT,
|
|
74152
|
-
showScrollbar: false,
|
|
74153
|
-
keyField: "ts",
|
|
74154
|
-
onScroll: this.handleStartYearVlScroll,
|
|
74155
|
-
paddingBottom: 4
|
|
74156
|
-
},
|
|
74157
|
-
{
|
|
74158
|
-
default: ({
|
|
74159
|
-
item,
|
|
74160
|
-
index
|
|
74161
|
-
}) => {
|
|
74162
|
-
return renderItem(item, index, mergedClsPrefix, "start");
|
|
74163
|
-
}
|
|
74164
|
-
}
|
|
74165
|
-
)
|
|
74166
|
-
}
|
|
74167
|
-
), type === "monthrange" || type === "quarterrange" ? /* @__PURE__ */ vue.h(
|
|
74168
|
-
"div",
|
|
74169
|
-
{
|
|
74170
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col`
|
|
74171
|
-
},
|
|
74172
|
-
/* @__PURE__ */ vue.h(
|
|
74173
|
-
Scrollbar$1,
|
|
74174
|
-
{
|
|
74175
|
-
ref: "startMonthScrollbarRef",
|
|
74176
|
-
theme: mergedTheme.peers.Scrollbar,
|
|
74177
|
-
themeOverrides: mergedTheme.peerOverrides.Scrollbar
|
|
74178
|
-
},
|
|
74179
|
-
{
|
|
74180
|
-
default: () => [
|
|
74181
|
-
(type === "monthrange" ? this.startMonthArray : this.startQuarterArray).map(
|
|
74182
|
-
(item, i) => renderItem(item, i, mergedClsPrefix, "start")
|
|
74183
|
-
),
|
|
74184
|
-
type === "monthrange" && /* @__PURE__ */ vue.h(
|
|
74185
|
-
"div",
|
|
74186
|
-
{
|
|
74187
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__padding`
|
|
74188
|
-
}
|
|
74189
|
-
)
|
|
74190
|
-
]
|
|
74191
|
-
}
|
|
74192
|
-
)
|
|
74193
|
-
) : null)
|
|
74194
|
-
),
|
|
74195
|
-
/* @__PURE__ */ vue.h(
|
|
74196
|
-
"div",
|
|
74197
|
-
{
|
|
74198
|
-
ref: "endDatesElRef",
|
|
74199
|
-
class: `${mergedClsPrefix}-date-panel-calendar ${mergedClsPrefix}-date-panel-calendar--end`
|
|
74200
|
-
},
|
|
74201
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` }, /* @__PURE__ */ vue.h(
|
|
74202
|
-
Scrollbar$1,
|
|
74203
|
-
{
|
|
74204
|
-
ref: "endYearScrollbarRef",
|
|
74205
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col`,
|
|
74206
|
-
theme: mergedTheme.peers.Scrollbar,
|
|
74207
|
-
themeOverrides: mergedTheme.peerOverrides.Scrollbar,
|
|
74208
|
-
container: () => this.virtualListContainer("end"),
|
|
74209
|
-
content: () => this.virtualListContent("end"),
|
|
74210
|
-
horizontalRailStyle: { zIndex: 1 },
|
|
74211
|
-
verticalRailStyle: { zIndex: 1 }
|
|
74212
|
-
},
|
|
74213
|
-
{
|
|
74214
|
-
default: () => /* @__PURE__ */ vue.h(
|
|
74215
|
-
VVirtualList,
|
|
74216
|
-
{
|
|
74217
|
-
ref: "endYearVlRef",
|
|
74218
|
-
items: this.endYearArray,
|
|
74219
|
-
itemSize: MONTH_ITEM_HEIGHT,
|
|
74220
|
-
showScrollbar: false,
|
|
74221
|
-
keyField: "ts",
|
|
74222
|
-
onScroll: this.handleEndYearVlScroll,
|
|
74223
|
-
paddingBottom: 4
|
|
74224
|
-
},
|
|
74225
|
-
{
|
|
74226
|
-
default: ({
|
|
74227
|
-
item,
|
|
74228
|
-
index
|
|
74229
|
-
}) => {
|
|
74230
|
-
return renderItem(item, index, mergedClsPrefix, "end");
|
|
74231
|
-
}
|
|
74232
|
-
}
|
|
74233
|
-
)
|
|
74234
|
-
}
|
|
74235
|
-
), type === "monthrange" || type === "quarterrange" ? /* @__PURE__ */ vue.h(
|
|
74236
|
-
"div",
|
|
74237
|
-
{
|
|
74238
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__picker-col`
|
|
74239
|
-
},
|
|
74240
|
-
/* @__PURE__ */ vue.h(
|
|
74241
|
-
Scrollbar$1,
|
|
74242
|
-
{
|
|
74243
|
-
ref: "endMonthScrollbarRef",
|
|
74244
|
-
theme: mergedTheme.peers.Scrollbar,
|
|
74245
|
-
themeOverrides: mergedTheme.peerOverrides.Scrollbar
|
|
74246
|
-
},
|
|
74247
|
-
{
|
|
74248
|
-
default: () => [
|
|
74249
|
-
(type === "monthrange" ? this.endMonthArray : this.endQuarterArray).map(
|
|
74250
|
-
(item, i) => renderItem(item, i, mergedClsPrefix, "end")
|
|
74251
|
-
),
|
|
74252
|
-
type === "monthrange" && /* @__PURE__ */ vue.h(
|
|
74253
|
-
"div",
|
|
74254
|
-
{
|
|
74255
|
-
class: `${mergedClsPrefix}-date-panel-month-calendar__padding`
|
|
74256
|
-
}
|
|
74257
|
-
)
|
|
74258
|
-
]
|
|
74259
|
-
}
|
|
74260
|
-
)
|
|
74261
|
-
) : null)
|
|
74262
|
-
),
|
|
74263
|
-
this.datePickerSlots.footer ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-footer` }, vue.renderSlot(this.datePickerSlots, "footer")) : null,
|
|
74264
|
-
this.actions?.length || shortcuts ? /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions` }, /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions__prefix` }, shortcuts && Object.keys(shortcuts).map((key) => {
|
|
74265
|
-
const shortcut = shortcuts[key];
|
|
74266
|
-
return Array.isArray(shortcut) || typeof shortcut === "function" ? /* @__PURE__ */ vue.h(
|
|
74267
|
-
XButton,
|
|
74268
|
-
{
|
|
74269
|
-
secondary: true,
|
|
74270
|
-
round: true,
|
|
74271
|
-
size: "small",
|
|
74272
|
-
onMouseenter: () => {
|
|
74273
|
-
this.handleRangeShortcutMouseenter(shortcut);
|
|
74274
|
-
},
|
|
74275
|
-
onClick: () => {
|
|
74276
|
-
this.handleRangeShortcutClick(shortcut);
|
|
74277
|
-
},
|
|
74278
|
-
onMouseleave: () => {
|
|
74279
|
-
this.handleShortcutMouseleave();
|
|
74280
|
-
}
|
|
74281
|
-
},
|
|
74282
|
-
{ default: () => key }
|
|
74283
|
-
) : null;
|
|
74284
|
-
})), /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-date-panel-actions__suffix` }, this.actions?.includes("clear") ? /* @__PURE__ */ vue.h(XButton, { secondary: true, onClick: this.handleClearClick }, { default: () => this.locale.clear }) : null, this.actions?.includes("confirm") ? /* @__PURE__ */ vue.h(
|
|
74285
|
-
XButton,
|
|
74286
|
-
{
|
|
74287
|
-
type: "primary",
|
|
74288
|
-
disabled: this.isRangeInvalid,
|
|
74289
|
-
onClick: this.handleConfirmClick
|
|
74290
|
-
},
|
|
74291
|
-
{ default: () => this.locale.confirm }
|
|
74292
|
-
) : null)) : null,
|
|
74293
|
-
/* @__PURE__ */ vue.h(FocusDetector, { onFocus: this.handleFocusDetectorFocus })
|
|
74294
|
-
);
|
|
74295
|
-
}
|
|
74296
|
-
});
|
|
74297
|
-
|
|
74298
74245
|
var style$S = c$1([cB("date-picker", `
|
|
74299
74246
|
position: relative;
|
|
74300
74247
|
z-index: auto;
|
|
@@ -74417,6 +74364,8 @@
|
|
|
74417
74364
|
margin: 0,
|
|
74418
74365
|
padding: "15px 16px",
|
|
74419
74366
|
boxSizing: "border-box"
|
|
74367
|
+
}), cM("year", {
|
|
74368
|
+
zIndex: "2"
|
|
74420
74369
|
}), cB("date-panel-footer", {
|
|
74421
74370
|
gridArea: "footer"
|
|
74422
74371
|
}), cB("date-panel-actions", {
|
|
@@ -74439,21 +74388,20 @@
|
|
|
74439
74388
|
zIndex: 1
|
|
74440
74389
|
})]), c$1("~ .u-date-panel-calendar", {
|
|
74441
74390
|
paddingTop: "16px"
|
|
74442
|
-
})]), cB("date-panel-
|
|
74391
|
+
})]), cB("date-panel-placeholder", {
|
|
74392
|
+
width: "266px",
|
|
74393
|
+
height: "250px"
|
|
74394
|
+
}), cB("date-panel-month", {
|
|
74443
74395
|
boxSizing: "border-box",
|
|
74444
74396
|
display: "flex",
|
|
74445
74397
|
alignItems: "center",
|
|
74446
74398
|
justifyContent: "space-between",
|
|
74447
74399
|
padding: "var(--u-calendar-title-padding)",
|
|
74448
74400
|
height: "var(--u-calendar-title-height)"
|
|
74449
|
-
}, [
|
|
74401
|
+
}, [cM("justify-end", {
|
|
74402
|
+
justifyContent: "end"
|
|
74403
|
+
}), cE("icon", `
|
|
74450
74404
|
font-size: var(--u-arrow-size);
|
|
74451
|
-
`), cE("prev, next, fast-prev, fast-next", `
|
|
74452
|
-
line-height: 0;
|
|
74453
|
-
cursor: pointer;
|
|
74454
|
-
width: var(--u-arrow-size);
|
|
74455
|
-
height: var(--u-arrow-size);
|
|
74456
|
-
color: var(--u-arrow-color);
|
|
74457
74405
|
`), cE("month-year", {
|
|
74458
74406
|
userSelect: "none",
|
|
74459
74407
|
"-webkit-user-select": "none"
|
|
@@ -74466,10 +74414,11 @@
|
|
|
74466
74414
|
padding: 6px 8px;
|
|
74467
74415
|
text-align: center;
|
|
74468
74416
|
color: var(--u-calendar-title-text-color);
|
|
74469
|
-
cursor: pointer;
|
|
74470
74417
|
transition: .3s var(--u-bezier);
|
|
74471
74418
|
border-radius: var(--u-panel-border-radius);
|
|
74472
|
-
`, [
|
|
74419
|
+
`, [cNotM("disabled", {
|
|
74420
|
+
cursor: "pointer"
|
|
74421
|
+
}), c$1(".u-icon", {
|
|
74473
74422
|
width: "24px",
|
|
74474
74423
|
transition: "transform .3s var(--u-bezier)"
|
|
74475
74424
|
}), cM("active", `
|
|
@@ -74704,6 +74653,12 @@
|
|
|
74704
74653
|
}
|
|
74705
74654
|
});
|
|
74706
74655
|
}
|
|
74656
|
+
const rangeTypes = [
|
|
74657
|
+
"daterange",
|
|
74658
|
+
"monthrange",
|
|
74659
|
+
"yearrange",
|
|
74660
|
+
"quarterrange"
|
|
74661
|
+
];
|
|
74707
74662
|
const { localeRef, dateLocaleRef } = useLocale("DatePicker");
|
|
74708
74663
|
const formItem = useFormItem(props);
|
|
74709
74664
|
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
|
|
@@ -75467,6 +75422,7 @@
|
|
|
75467
75422
|
) : void 0;
|
|
75468
75423
|
return {
|
|
75469
75424
|
...exposedMethods,
|
|
75425
|
+
rangeTypes,
|
|
75470
75426
|
mergedStatus: mergedStatusRef,
|
|
75471
75427
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
75472
75428
|
mergedBordered: mergedBorderedRef,
|
|
@@ -75539,11 +75495,12 @@
|
|
|
75539
75495
|
onRender: this.onRender
|
|
75540
75496
|
};
|
|
75541
75497
|
const renderPanel = () => {
|
|
75542
|
-
const { type } = this;
|
|
75543
|
-
return type === "datetime" ? /* @__PURE__ */ vue.h(DatetimePanel, { ...commonPanelProps }, $slots) : type
|
|
75498
|
+
const { type, rangeTypes } = this;
|
|
75499
|
+
return type === "datetime" ? /* @__PURE__ */ vue.h(DatetimePanel, { ...commonPanelProps }, $slots) : rangeTypes.includes(type) ? /* @__PURE__ */ vue.h(
|
|
75544
75500
|
DateRangePanel,
|
|
75545
75501
|
{
|
|
75546
75502
|
...commonPanelProps,
|
|
75503
|
+
type,
|
|
75547
75504
|
defaultCalendarStartTime: this.defaultCalendarStartTime,
|
|
75548
75505
|
defaultCalendarEndTime: this.defaultCalendarEndTime,
|
|
75549
75506
|
bindCalendarMonths: this.bindCalendarMonths
|
|
@@ -75558,7 +75515,7 @@
|
|
|
75558
75515
|
bindCalendarMonths: this.bindCalendarMonths
|
|
75559
75516
|
},
|
|
75560
75517
|
$slots
|
|
75561
|
-
) :
|
|
75518
|
+
) : /* @__PURE__ */ vue.h(DatePanel, { ...commonPanelProps, type }, $slots);
|
|
75562
75519
|
};
|
|
75563
75520
|
if (this.panel) {
|
|
75564
75521
|
return renderPanel();
|
|
@@ -106796,7 +106753,7 @@
|
|
|
106796
106753
|
watermarkProps: watermarkProps
|
|
106797
106754
|
});
|
|
106798
106755
|
|
|
106799
|
-
var version = "1.1
|
|
106756
|
+
var version = "1.2.1";
|
|
106800
106757
|
|
|
106801
106758
|
function create({
|
|
106802
106759
|
componentPrefix = "U",
|
|
@@ -106832,10 +106789,10 @@
|
|
|
106832
106789
|
};
|
|
106833
106790
|
}
|
|
106834
106791
|
|
|
106835
|
-
const
|
|
106792
|
+
const uzumUi = create({
|
|
106836
106793
|
components: Object.keys(components).map(key => components[key])
|
|
106837
106794
|
});
|
|
106838
|
-
const install =
|
|
106795
|
+
const install = uzumUi.install;
|
|
106839
106796
|
|
|
106840
106797
|
function useThemeVars() {
|
|
106841
106798
|
const configProviderInjection = vue.inject(configProviderInjectionKey, null);
|
|
@@ -107833,7 +107790,7 @@
|
|
|
107833
107790
|
exports.dateZhCN = dateZhCN;
|
|
107834
107791
|
exports.dateZhTW = datezhTW;
|
|
107835
107792
|
exports.deDE = deDE;
|
|
107836
|
-
exports.default =
|
|
107793
|
+
exports.default = uzumUi;
|
|
107837
107794
|
exports.descriptionsDark = descriptionsDark;
|
|
107838
107795
|
exports.descriptionsItemProps = descriptionsItemProps;
|
|
107839
107796
|
exports.descriptionsProps = descriptionsProps;
|