@uzum-tech/ui 1.2.0 → 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/dist/index.js +55 -24
- package/dist/index.prod.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +14 -2
- package/es/date-picker/src/panel/date.js +7 -2
- package/es/date-picker/src/panel/daterange.js +9 -8
- package/es/date-picker/src/utils.d.ts +2 -1
- package/es/date-picker/src/utils.js +13 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +14 -2
- package/lib/date-picker/src/panel/date.js +7 -2
- package/lib/date-picker/src/panel/daterange.js +9 -8
- package/lib/date-picker/src/utils.d.ts +2 -1
- package/lib/date-picker/src/utils.js +14 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -73844,13 +73863,25 @@
|
|
|
73844
73863
|
const isWithoutDay = vue.computed(() => withoutDayTypes.includes(type));
|
|
73845
73864
|
const isMonth = vue.computed(() => monthTypes.includes(type));
|
|
73846
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
|
+
};
|
|
73847
73878
|
const handleMonthClick = (value, _doUpdate, item) => {
|
|
73848
73879
|
calendar.onUpdateCalendarValue(value);
|
|
73849
|
-
isMonth.value &&
|
|
73880
|
+
isMonth.value && updateMonth(item);
|
|
73850
73881
|
};
|
|
73851
73882
|
const handleYearClick = (value, _doUpdate, item) => {
|
|
73852
73883
|
calendar.onUpdateCalendarValue(value);
|
|
73853
|
-
isYear.value &&
|
|
73884
|
+
isYear.value && updateMonth(item);
|
|
73854
73885
|
};
|
|
73855
73886
|
return {
|
|
73856
73887
|
...calendar,
|
|
@@ -73980,7 +74011,7 @@
|
|
|
73980
74011
|
const isWithoutDay = vue.computed(() => withoutDayTypes.includes(type));
|
|
73981
74012
|
const isMonthRange = vue.computed(() => monthRanges.includes(type));
|
|
73982
74013
|
const isYearRange = vue.computed(() => type === "yearrange");
|
|
73983
|
-
const monthToDateItem = (
|
|
74014
|
+
const monthToDateItem = (item, isEnd = false) => {
|
|
73984
74015
|
const { dateObject, ...monthItem } = item;
|
|
73985
74016
|
return {
|
|
73986
74017
|
...monthItem,
|
|
@@ -73994,30 +74025,30 @@
|
|
|
73994
74025
|
startOfSpan: false,
|
|
73995
74026
|
endOfSpan: isEnd,
|
|
73996
74027
|
selected: isEnd,
|
|
73997
|
-
ts:
|
|
74028
|
+
ts: getMsByDateCommonItem(item),
|
|
73998
74029
|
type: "date"
|
|
73999
74030
|
};
|
|
74000
74031
|
};
|
|
74001
|
-
const setMonthRange = (
|
|
74002
|
-
const monthItem = monthToDateItem(
|
|
74032
|
+
const setMonthRange = (item, isEnd = false) => {
|
|
74033
|
+
const monthItem = monthToDateItem(item, isEnd);
|
|
74003
74034
|
calendar.handleDateMouseEnter(monthItem);
|
|
74004
74035
|
calendar.handleDateClick(monthItem);
|
|
74005
74036
|
};
|
|
74006
74037
|
const handleMonthStartClick = (value, _doUpdate, item) => {
|
|
74007
74038
|
calendar.onUpdateStartCalendarValue(value);
|
|
74008
|
-
isMonthRange.value && setMonthRange(
|
|
74039
|
+
isMonthRange.value && setMonthRange(item);
|
|
74009
74040
|
};
|
|
74010
74041
|
const handleMonthEndClick = (value, _doUpdate, item) => {
|
|
74011
74042
|
calendar.onUpdateEndCalendarValue(value);
|
|
74012
|
-
isMonthRange.value && setMonthRange(
|
|
74043
|
+
isMonthRange.value && setMonthRange(item, true);
|
|
74013
74044
|
};
|
|
74014
74045
|
const handleYearStartClick = (value, _doUpdate, item) => {
|
|
74015
74046
|
calendar.onUpdateStartCalendarValue(value);
|
|
74016
|
-
isYearRange.value && setMonthRange(
|
|
74047
|
+
isYearRange.value && setMonthRange(item);
|
|
74017
74048
|
};
|
|
74018
74049
|
const handleYearEndClick = (value, _doUpdate, item) => {
|
|
74019
74050
|
calendar.onUpdateEndCalendarValue(value);
|
|
74020
|
-
isYearRange.value && setMonthRange(
|
|
74051
|
+
isYearRange.value && setMonthRange(item, true);
|
|
74021
74052
|
};
|
|
74022
74053
|
return {
|
|
74023
74054
|
...calendar,
|
|
@@ -106722,7 +106753,7 @@
|
|
|
106722
106753
|
watermarkProps: watermarkProps
|
|
106723
106754
|
});
|
|
106724
106755
|
|
|
106725
|
-
var version = "1.2.
|
|
106756
|
+
var version = "1.2.1";
|
|
106726
106757
|
|
|
106727
106758
|
function create({
|
|
106728
106759
|
componentPrefix = "U",
|