@beweco/aurora-ui 0.6.34 → 0.6.36
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.cjs.js
CHANGED
|
@@ -4079,18 +4079,410 @@ var RowSteps = React.forwardRef(function (_a, ref) {
|
|
|
4079
4079
|
});
|
|
4080
4080
|
RowSteps.displayName = "RowSteps";
|
|
4081
4081
|
|
|
4082
|
+
/*
|
|
4083
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
4084
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4085
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
4086
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4087
|
+
*
|
|
4088
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
4089
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
4090
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
4091
|
+
* governing permissions and limitations under the License.
|
|
4092
|
+
*/ function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
|
|
4093
|
+
return amount - numerator * Math.floor(amount / numerator);
|
|
4094
|
+
}
|
|
4095
|
+
|
|
4096
|
+
/*
|
|
4097
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
4098
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4099
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
4100
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4101
|
+
*
|
|
4102
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
4103
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
4104
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
4105
|
+
* governing permissions and limitations under the License.
|
|
4106
|
+
*/ // Portions of the code in this file are based on code from ICU.
|
|
4107
|
+
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
4108
|
+
|
|
4109
|
+
|
|
4110
|
+
const $3b62074eb05584b2$var$EPOCH = 1721426; // 001/01/03 Julian C.E.
|
|
4111
|
+
function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
|
|
4112
|
+
year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
|
|
4113
|
+
let y1 = year - 1;
|
|
4114
|
+
let monthOffset = -2;
|
|
4115
|
+
if (month <= 2) monthOffset = 0;
|
|
4116
|
+
else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) monthOffset = -1;
|
|
4117
|
+
return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
|
|
4118
|
+
}
|
|
4119
|
+
function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
|
|
4120
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
4121
|
+
}
|
|
4122
|
+
function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
|
|
4123
|
+
return era === 'BC' ? 1 - year : year;
|
|
4124
|
+
}
|
|
4125
|
+
function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
|
|
4126
|
+
let era = 'AD';
|
|
4127
|
+
if (year <= 0) {
|
|
4128
|
+
era = 'BC';
|
|
4129
|
+
year = 1 - year;
|
|
4130
|
+
}
|
|
4131
|
+
return [
|
|
4132
|
+
era,
|
|
4133
|
+
year
|
|
4134
|
+
];
|
|
4135
|
+
}
|
|
4136
|
+
const $3b62074eb05584b2$var$daysInMonth = {
|
|
4137
|
+
standard: [
|
|
4138
|
+
31,
|
|
4139
|
+
28,
|
|
4140
|
+
31,
|
|
4141
|
+
30,
|
|
4142
|
+
31,
|
|
4143
|
+
30,
|
|
4144
|
+
31,
|
|
4145
|
+
31,
|
|
4146
|
+
30,
|
|
4147
|
+
31,
|
|
4148
|
+
30,
|
|
4149
|
+
31
|
|
4150
|
+
],
|
|
4151
|
+
leapyear: [
|
|
4152
|
+
31,
|
|
4153
|
+
29,
|
|
4154
|
+
31,
|
|
4155
|
+
30,
|
|
4156
|
+
31,
|
|
4157
|
+
30,
|
|
4158
|
+
31,
|
|
4159
|
+
31,
|
|
4160
|
+
30,
|
|
4161
|
+
31,
|
|
4162
|
+
30,
|
|
4163
|
+
31
|
|
4164
|
+
]
|
|
4165
|
+
};
|
|
4166
|
+
class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
4167
|
+
fromJulianDay(jd) {
|
|
4168
|
+
let jd0 = jd;
|
|
4169
|
+
let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
|
|
4170
|
+
let quadricent = Math.floor(depoch / 146097);
|
|
4171
|
+
let dqc = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);
|
|
4172
|
+
let cent = Math.floor(dqc / 36524);
|
|
4173
|
+
let dcent = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);
|
|
4174
|
+
let quad = Math.floor(dcent / 1461);
|
|
4175
|
+
let dquad = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);
|
|
4176
|
+
let yindex = Math.floor(dquad / 365);
|
|
4177
|
+
let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
|
|
4178
|
+
let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
|
|
4179
|
+
let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
|
|
4180
|
+
let leapAdj = 2;
|
|
4181
|
+
if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
|
|
4182
|
+
else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1;
|
|
4183
|
+
let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
|
|
4184
|
+
let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
|
|
4185
|
+
return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);
|
|
4186
|
+
}
|
|
4187
|
+
toJulianDay(date) {
|
|
4188
|
+
return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
|
|
4189
|
+
}
|
|
4190
|
+
getDaysInMonth(date) {
|
|
4191
|
+
return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 'leapyear' : 'standard'][date.month - 1];
|
|
4192
|
+
}
|
|
4193
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4194
|
+
getMonthsInYear(date) {
|
|
4195
|
+
return 12;
|
|
4196
|
+
}
|
|
4197
|
+
getDaysInYear(date) {
|
|
4198
|
+
return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
|
|
4199
|
+
}
|
|
4200
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4201
|
+
getYearsInEra(date) {
|
|
4202
|
+
return 9999;
|
|
4203
|
+
}
|
|
4204
|
+
getEras() {
|
|
4205
|
+
return [
|
|
4206
|
+
'BC',
|
|
4207
|
+
'AD'
|
|
4208
|
+
];
|
|
4209
|
+
}
|
|
4210
|
+
isInverseEra(date) {
|
|
4211
|
+
return date.era === 'BC';
|
|
4212
|
+
}
|
|
4213
|
+
balanceDate(date) {
|
|
4214
|
+
if (date.year <= 0) {
|
|
4215
|
+
date.era = date.era === 'BC' ? 'AD' : 'BC';
|
|
4216
|
+
date.year = 1 - date.year;
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
constructor(){
|
|
4220
|
+
this.identifier = 'gregory';
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
|
|
4225
|
+
var _a_isEqual, _b_isEqual;
|
|
4226
|
+
var _a_isEqual1, _ref;
|
|
4227
|
+
return (_ref = (_a_isEqual1 = (_a_isEqual = a.isEqual) === null || _a_isEqual === void 0 ? void 0 : _a_isEqual.call(a, b)) !== null && _a_isEqual1 !== void 0 ? _a_isEqual1 : (_b_isEqual = b.isEqual) === null || _b_isEqual === void 0 ? void 0 : _b_isEqual.call(b, a)) !== null && _ref !== void 0 ? _ref : a.identifier === b.identifier;
|
|
4228
|
+
}
|
|
4229
|
+
function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
|
|
4230
|
+
return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
|
|
4231
|
+
}
|
|
4082
4232
|
function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
|
|
4083
4233
|
return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
|
|
4084
4234
|
}
|
|
4085
4235
|
function $14e0f24ef4ac5c92$var$timeToMs(a) {
|
|
4086
4236
|
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
|
|
4087
4237
|
}
|
|
4238
|
+
let $14e0f24ef4ac5c92$var$localTimeZone = null;
|
|
4239
|
+
function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
|
|
4240
|
+
// TODO: invalidate this somehow?
|
|
4241
|
+
if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
4242
|
+
return $14e0f24ef4ac5c92$var$localTimeZone;
|
|
4243
|
+
}
|
|
4244
|
+
|
|
4245
|
+
/*
|
|
4246
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
4247
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4248
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
4249
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4250
|
+
*
|
|
4251
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
4252
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
4253
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
4254
|
+
* governing permissions and limitations under the License.
|
|
4255
|
+
*/ // Portions of the code in this file are based on code from the TC39 Temporal proposal.
|
|
4256
|
+
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
|
|
4257
|
+
|
|
4258
|
+
|
|
4259
|
+
|
|
4260
|
+
|
|
4261
|
+
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
|
|
4262
|
+
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
4263
|
+
let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
|
|
4264
|
+
return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
|
|
4265
|
+
}
|
|
4266
|
+
function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
|
|
4267
|
+
// Note: Date.UTC() interprets one and two-digit years as being in the
|
|
4268
|
+
// 20th century, so don't use it
|
|
4269
|
+
let date = new Date();
|
|
4270
|
+
date.setUTCHours(hour, minute, second, millisecond);
|
|
4271
|
+
date.setUTCFullYear(year, month - 1, day);
|
|
4272
|
+
return date.getTime();
|
|
4273
|
+
}
|
|
4274
|
+
function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
|
|
4275
|
+
// Fast path for UTC.
|
|
4276
|
+
if (timeZone === 'UTC') return 0;
|
|
4277
|
+
// Fast path: for local timezone after 1970, use native Date.
|
|
4278
|
+
if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -6e4;
|
|
4279
|
+
let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
|
|
4280
|
+
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
|
|
4281
|
+
return utc - Math.floor(ms / 1000) * 1000;
|
|
4282
|
+
}
|
|
4283
|
+
const $11d87f3f76e88657$var$formattersByTimeZone = new Map();
|
|
4284
|
+
function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
|
|
4285
|
+
let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
|
|
4286
|
+
if (!formatter) {
|
|
4287
|
+
formatter = new Intl.DateTimeFormat('en-US', {
|
|
4288
|
+
timeZone: timeZone,
|
|
4289
|
+
hour12: false,
|
|
4290
|
+
era: 'short',
|
|
4291
|
+
year: 'numeric',
|
|
4292
|
+
month: 'numeric',
|
|
4293
|
+
day: 'numeric',
|
|
4294
|
+
hour: 'numeric',
|
|
4295
|
+
minute: 'numeric',
|
|
4296
|
+
second: 'numeric'
|
|
4297
|
+
});
|
|
4298
|
+
$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
|
|
4299
|
+
}
|
|
4300
|
+
let parts = formatter.formatToParts(new Date(ms));
|
|
4301
|
+
let namedParts = {};
|
|
4302
|
+
for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value;
|
|
4303
|
+
return {
|
|
4304
|
+
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
|
|
4305
|
+
year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,
|
|
4306
|
+
month: +namedParts.month,
|
|
4307
|
+
day: +namedParts.day,
|
|
4308
|
+
hour: namedParts.hour === '24' ? 0 : +namedParts.hour,
|
|
4309
|
+
minute: +namedParts.minute,
|
|
4310
|
+
second: +namedParts.second
|
|
4311
|
+
};
|
|
4312
|
+
}
|
|
4313
|
+
const $11d87f3f76e88657$var$DAYMILLIS = 86400000;
|
|
4314
|
+
function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
|
|
4315
|
+
let found = earlier === later ? [
|
|
4316
|
+
earlier
|
|
4317
|
+
] : [
|
|
4318
|
+
earlier,
|
|
4319
|
+
later
|
|
4320
|
+
];
|
|
4321
|
+
return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
|
|
4322
|
+
}
|
|
4323
|
+
function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
|
|
4324
|
+
let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
|
|
4325
|
+
return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
|
|
4326
|
+
}
|
|
4327
|
+
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') {
|
|
4328
|
+
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
|
|
4329
|
+
// Fast path: if the time zone is UTC, use native Date.
|
|
4330
|
+
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
4331
|
+
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
|
|
4332
|
+
if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') {
|
|
4333
|
+
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
4334
|
+
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
|
|
4335
|
+
let date = new Date();
|
|
4336
|
+
let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
|
|
4337
|
+
date.setFullYear(year, dateTime.month - 1, dateTime.day);
|
|
4338
|
+
date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
|
|
4339
|
+
return date.getTime();
|
|
4340
|
+
}
|
|
4341
|
+
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
4342
|
+
let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
|
|
4343
|
+
let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
|
|
4344
|
+
let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
|
|
4345
|
+
if (valid.length === 1) return valid[0];
|
|
4346
|
+
if (valid.length > 1) switch(disambiguation){
|
|
4347
|
+
// 'compatible' means 'earlier' for "fall back" transitions
|
|
4348
|
+
case 'compatible':
|
|
4349
|
+
case 'earlier':
|
|
4350
|
+
return valid[0];
|
|
4351
|
+
case 'later':
|
|
4352
|
+
return valid[valid.length - 1];
|
|
4353
|
+
case 'reject':
|
|
4354
|
+
throw new RangeError('Multiple possible absolute times found');
|
|
4355
|
+
}
|
|
4356
|
+
switch(disambiguation){
|
|
4357
|
+
case 'earlier':
|
|
4358
|
+
return Math.min(ms - offsetBefore, ms - offsetAfter);
|
|
4359
|
+
// 'compatible' means 'later' for "spring forward" transitions
|
|
4360
|
+
case 'compatible':
|
|
4361
|
+
case 'later':
|
|
4362
|
+
return Math.max(ms - offsetBefore, ms - offsetAfter);
|
|
4363
|
+
case 'reject':
|
|
4364
|
+
throw new RangeError('No such absolute time found');
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
|
|
4368
|
+
return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
|
|
4369
|
+
}
|
|
4370
|
+
function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
4371
|
+
let hour = 0, minute = 0, second = 0, millisecond = 0;
|
|
4372
|
+
if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
|
|
4373
|
+
else if ('hour' in date && !time) return date;
|
|
4374
|
+
if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time);
|
|
4375
|
+
return new ($35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
4376
|
+
}
|
|
4377
|
+
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
4378
|
+
if (($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
|
|
4379
|
+
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
4380
|
+
let copy = date.copy();
|
|
4381
|
+
copy.calendar = calendar;
|
|
4382
|
+
copy.era = calendarDate.era;
|
|
4383
|
+
copy.year = calendarDate.year;
|
|
4384
|
+
copy.month = calendarDate.month;
|
|
4385
|
+
copy.day = calendarDate.day;
|
|
4386
|
+
($735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
|
|
4387
|
+
return copy;
|
|
4388
|
+
}
|
|
4088
4389
|
|
|
4390
|
+
function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
4391
|
+
let mutableDate = date.copy();
|
|
4392
|
+
let days = 'hour' in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
|
|
4393
|
+
$735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
|
|
4394
|
+
if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
|
|
4395
|
+
mutableDate.month += duration.months || 0;
|
|
4396
|
+
$735220c2d4774dd3$var$balanceYearMonth(mutableDate);
|
|
4397
|
+
$735220c2d4774dd3$var$constrainMonthDay(mutableDate);
|
|
4398
|
+
mutableDate.day += (duration.weeks || 0) * 7;
|
|
4399
|
+
mutableDate.day += duration.days || 0;
|
|
4400
|
+
mutableDate.day += days;
|
|
4401
|
+
$735220c2d4774dd3$var$balanceDay(mutableDate);
|
|
4402
|
+
if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
|
|
4403
|
+
// Constrain in case adding ended up with a date outside the valid range for the calendar system.
|
|
4404
|
+
// The behavior here is slightly different than when constraining in the `set` function in that
|
|
4405
|
+
// we adjust smaller fields to their minimum/maximum values rather than constraining each field
|
|
4406
|
+
// individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.
|
|
4407
|
+
if (mutableDate.year < 1) {
|
|
4408
|
+
mutableDate.year = 1;
|
|
4409
|
+
mutableDate.month = 1;
|
|
4410
|
+
mutableDate.day = 1;
|
|
4411
|
+
}
|
|
4412
|
+
let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
|
|
4413
|
+
if (mutableDate.year > maxYear) {
|
|
4414
|
+
var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
|
|
4415
|
+
let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
|
|
4416
|
+
mutableDate.year = maxYear;
|
|
4417
|
+
mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
|
|
4418
|
+
mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
|
|
4419
|
+
}
|
|
4420
|
+
if (mutableDate.month < 1) {
|
|
4421
|
+
mutableDate.month = 1;
|
|
4422
|
+
mutableDate.day = 1;
|
|
4423
|
+
}
|
|
4424
|
+
let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
|
|
4425
|
+
if (mutableDate.month > maxMonth) {
|
|
4426
|
+
mutableDate.month = maxMonth;
|
|
4427
|
+
mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
|
|
4428
|
+
}
|
|
4429
|
+
mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
|
|
4430
|
+
return mutableDate;
|
|
4431
|
+
}
|
|
4432
|
+
function $735220c2d4774dd3$var$addYears(date, years) {
|
|
4433
|
+
var _date_calendar_isInverseEra, _date_calendar;
|
|
4434
|
+
if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
|
|
4435
|
+
date.year += years;
|
|
4436
|
+
}
|
|
4437
|
+
function $735220c2d4774dd3$var$balanceYearMonth(date) {
|
|
4438
|
+
while(date.month < 1){
|
|
4439
|
+
$735220c2d4774dd3$var$addYears(date, -1);
|
|
4440
|
+
date.month += date.calendar.getMonthsInYear(date);
|
|
4441
|
+
}
|
|
4442
|
+
let monthsInYear = 0;
|
|
4443
|
+
while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){
|
|
4444
|
+
date.month -= monthsInYear;
|
|
4445
|
+
$735220c2d4774dd3$var$addYears(date, 1);
|
|
4446
|
+
}
|
|
4447
|
+
}
|
|
4448
|
+
function $735220c2d4774dd3$var$balanceDay(date) {
|
|
4449
|
+
while(date.day < 1){
|
|
4450
|
+
date.month--;
|
|
4451
|
+
$735220c2d4774dd3$var$balanceYearMonth(date);
|
|
4452
|
+
date.day += date.calendar.getDaysInMonth(date);
|
|
4453
|
+
}
|
|
4454
|
+
while(date.day > date.calendar.getDaysInMonth(date)){
|
|
4455
|
+
date.day -= date.calendar.getDaysInMonth(date);
|
|
4456
|
+
date.month++;
|
|
4457
|
+
$735220c2d4774dd3$var$balanceYearMonth(date);
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
function $735220c2d4774dd3$var$constrainMonthDay(date) {
|
|
4461
|
+
date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
|
|
4462
|
+
date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
|
|
4463
|
+
}
|
|
4464
|
+
function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
|
|
4465
|
+
if (date.calendar.constrainDate) date.calendar.constrainDate(date);
|
|
4466
|
+
date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
|
|
4467
|
+
$735220c2d4774dd3$var$constrainMonthDay(date);
|
|
4468
|
+
}
|
|
4089
4469
|
function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
|
|
4090
4470
|
let inverseDuration = {};
|
|
4091
4471
|
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
|
|
4092
4472
|
return inverseDuration;
|
|
4093
4473
|
}
|
|
4474
|
+
function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
|
|
4475
|
+
return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
4476
|
+
}
|
|
4477
|
+
function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
|
|
4478
|
+
let mutableDate = date.copy();
|
|
4479
|
+
if (fields.era != null) mutableDate.era = fields.era;
|
|
4480
|
+
if (fields.year != null) mutableDate.year = fields.year;
|
|
4481
|
+
if (fields.month != null) mutableDate.month = fields.month;
|
|
4482
|
+
if (fields.day != null) mutableDate.day = fields.day;
|
|
4483
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
|
|
4484
|
+
return mutableDate;
|
|
4485
|
+
}
|
|
4094
4486
|
function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
|
|
4095
4487
|
let mutableValue = value.copy();
|
|
4096
4488
|
if (fields.hour != null) mutableValue.hour = fields.hour;
|
|
@@ -4137,6 +4529,43 @@ function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
|
|
|
4137
4529
|
function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
|
|
4138
4530
|
return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
4139
4531
|
}
|
|
4532
|
+
function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
|
|
4533
|
+
let mutable = value.copy();
|
|
4534
|
+
switch(field){
|
|
4535
|
+
case 'era':
|
|
4536
|
+
{
|
|
4537
|
+
let eras = value.calendar.getEras();
|
|
4538
|
+
let eraIndex = eras.indexOf(value.era);
|
|
4539
|
+
if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);
|
|
4540
|
+
eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
|
|
4541
|
+
mutable.era = eras[eraIndex];
|
|
4542
|
+
// Constrain the year and other fields within the era, so the era doesn't change when we balance below.
|
|
4543
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
|
|
4544
|
+
break;
|
|
4545
|
+
}
|
|
4546
|
+
case 'year':
|
|
4547
|
+
var _mutable_calendar_isInverseEra, _mutable_calendar;
|
|
4548
|
+
if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
|
|
4549
|
+
// The year field should not cycle within the era as that can cause weird behavior affecting other fields.
|
|
4550
|
+
// We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
|
|
4551
|
+
// we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.
|
|
4552
|
+
mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
|
|
4553
|
+
if (mutable.year === -Infinity) mutable.year = 1;
|
|
4554
|
+
if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
|
|
4555
|
+
break;
|
|
4556
|
+
case 'month':
|
|
4557
|
+
mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
|
|
4558
|
+
break;
|
|
4559
|
+
case 'day':
|
|
4560
|
+
mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
|
|
4561
|
+
break;
|
|
4562
|
+
default:
|
|
4563
|
+
throw new Error('Unsupported field ' + field);
|
|
4564
|
+
}
|
|
4565
|
+
if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
|
|
4566
|
+
$735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
|
|
4567
|
+
return mutable;
|
|
4568
|
+
}
|
|
4140
4569
|
function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
|
|
4141
4570
|
let mutable = value.copy();
|
|
4142
4571
|
switch(field){
|
|
@@ -4183,9 +4612,33 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
|
|
|
4183
4612
|
return value;
|
|
4184
4613
|
}
|
|
4185
4614
|
|
|
4615
|
+
const $fae977aafc393c5c$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
|
|
4616
|
+
function $fae977aafc393c5c$export$6b862160d295c8e(value) {
|
|
4617
|
+
let m = value.match($fae977aafc393c5c$var$DATE_RE);
|
|
4618
|
+
if (!m) throw new Error('Invalid ISO 8601 date string: ' + value);
|
|
4619
|
+
let date = new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1);
|
|
4620
|
+
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
|
|
4621
|
+
return date;
|
|
4622
|
+
}
|
|
4623
|
+
function $fae977aafc393c5c$var$parseNumber(value, min, max) {
|
|
4624
|
+
let val = Number(value);
|
|
4625
|
+
if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
|
|
4626
|
+
return val;
|
|
4627
|
+
}
|
|
4186
4628
|
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
|
|
4187
4629
|
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
|
|
4188
4630
|
}
|
|
4631
|
+
function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
|
|
4632
|
+
let gregorianDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
4633
|
+
let year;
|
|
4634
|
+
if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
|
|
4635
|
+
else year = String(gregorianDate.year).padStart(4, '0');
|
|
4636
|
+
return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
|
|
4637
|
+
}
|
|
4638
|
+
function $fae977aafc393c5c$export$4223de14708adc63(date) {
|
|
4639
|
+
// @ts-ignore
|
|
4640
|
+
return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
|
|
4641
|
+
}
|
|
4189
4642
|
|
|
4190
4643
|
function _check_private_redeclaration(obj, privateCollection) {
|
|
4191
4644
|
if (privateCollection.has(obj)) {
|
|
@@ -4198,6 +4651,89 @@ function _class_private_field_init(obj, privateMap, value) {
|
|
|
4198
4651
|
privateMap.set(obj, value);
|
|
4199
4652
|
}
|
|
4200
4653
|
|
|
4654
|
+
/*
|
|
4655
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
4656
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4657
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
4658
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4659
|
+
*
|
|
4660
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
4661
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
4662
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
4663
|
+
* governing permissions and limitations under the License.
|
|
4664
|
+
*/
|
|
4665
|
+
|
|
4666
|
+
|
|
4667
|
+
|
|
4668
|
+
|
|
4669
|
+
|
|
4670
|
+
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
4671
|
+
let calendar = typeof args[0] === 'object' ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
4672
|
+
let era;
|
|
4673
|
+
if (typeof args[0] === 'string') era = args.shift();
|
|
4674
|
+
else {
|
|
4675
|
+
let eras = calendar.getEras();
|
|
4676
|
+
era = eras[eras.length - 1];
|
|
4677
|
+
}
|
|
4678
|
+
let year = args.shift();
|
|
4679
|
+
let month = args.shift();
|
|
4680
|
+
let day = args.shift();
|
|
4681
|
+
return [
|
|
4682
|
+
calendar,
|
|
4683
|
+
era,
|
|
4684
|
+
year,
|
|
4685
|
+
month,
|
|
4686
|
+
day
|
|
4687
|
+
];
|
|
4688
|
+
}
|
|
4689
|
+
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
4690
|
+
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
|
|
4691
|
+
// If that behavior is desired, use the AnyCalendarDate interface instead.
|
|
4692
|
+
// @ts-ignore
|
|
4693
|
+
$35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();
|
|
4694
|
+
class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
|
|
4695
|
+
/** Returns a copy of this date. */ copy() {
|
|
4696
|
+
if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
|
|
4697
|
+
else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
|
|
4698
|
+
}
|
|
4699
|
+
/** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
|
|
4700
|
+
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
4701
|
+
}
|
|
4702
|
+
/** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
|
|
4703
|
+
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
4704
|
+
}
|
|
4705
|
+
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
4706
|
+
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
|
|
4707
|
+
}
|
|
4708
|
+
/**
|
|
4709
|
+
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
4710
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
4711
|
+
*/ cycle(field, amount, options) {
|
|
4712
|
+
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
4713
|
+
}
|
|
4714
|
+
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
|
|
4715
|
+
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
|
|
4716
|
+
}
|
|
4717
|
+
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
4718
|
+
return ($fae977aafc393c5c$export$60dfd74aa96791bd)(this);
|
|
4719
|
+
}
|
|
4720
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
4721
|
+
return ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
4722
|
+
}
|
|
4723
|
+
constructor(...args){
|
|
4724
|
+
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
|
|
4725
|
+
writable: true,
|
|
4726
|
+
value: void 0
|
|
4727
|
+
});
|
|
4728
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
4729
|
+
this.calendar = calendar;
|
|
4730
|
+
this.era = era;
|
|
4731
|
+
this.year = year;
|
|
4732
|
+
this.month = month;
|
|
4733
|
+
this.day = day;
|
|
4734
|
+
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
4735
|
+
}
|
|
4736
|
+
}
|
|
4201
4737
|
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
4202
4738
|
// @ts-ignore
|
|
4203
4739
|
$35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
|
|
@@ -4238,6 +4774,66 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
|
|
|
4238
4774
|
($735220c2d4774dd3$export$7555de1e070510cb)(this);
|
|
4239
4775
|
}
|
|
4240
4776
|
}
|
|
4777
|
+
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
4778
|
+
// @ts-ignore
|
|
4779
|
+
$35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
|
|
4780
|
+
class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
4781
|
+
/** Returns a copy of this date. */ copy() {
|
|
4782
|
+
if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
4783
|
+
else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
4784
|
+
}
|
|
4785
|
+
/** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
|
|
4786
|
+
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
4787
|
+
}
|
|
4788
|
+
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
|
|
4789
|
+
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
4790
|
+
}
|
|
4791
|
+
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
4792
|
+
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
|
|
4793
|
+
}
|
|
4794
|
+
/**
|
|
4795
|
+
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
4796
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
4797
|
+
*/ cycle(field, amount, options) {
|
|
4798
|
+
switch(field){
|
|
4799
|
+
case 'era':
|
|
4800
|
+
case 'year':
|
|
4801
|
+
case 'month':
|
|
4802
|
+
case 'day':
|
|
4803
|
+
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
4804
|
+
default:
|
|
4805
|
+
return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
/** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
|
|
4809
|
+
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
|
|
4810
|
+
}
|
|
4811
|
+
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
4812
|
+
return ($fae977aafc393c5c$export$4223de14708adc63)(this);
|
|
4813
|
+
}
|
|
4814
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
4815
|
+
let res = ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
4816
|
+
if (res === 0) return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, ($11d87f3f76e88657$export$b21e0b124e224484)(b));
|
|
4817
|
+
return res;
|
|
4818
|
+
}
|
|
4819
|
+
constructor(...args){
|
|
4820
|
+
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
4821
|
+
writable: true,
|
|
4822
|
+
value: void 0
|
|
4823
|
+
});
|
|
4824
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
4825
|
+
this.calendar = calendar;
|
|
4826
|
+
this.era = era;
|
|
4827
|
+
this.year = year;
|
|
4828
|
+
this.month = month;
|
|
4829
|
+
this.day = day;
|
|
4830
|
+
this.hour = args.shift() || 0;
|
|
4831
|
+
this.minute = args.shift() || 0;
|
|
4832
|
+
this.second = args.shift() || 0;
|
|
4833
|
+
this.millisecond = args.shift() || 0;
|
|
4834
|
+
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
4835
|
+
}
|
|
4836
|
+
}
|
|
4241
4837
|
|
|
4242
4838
|
var Switch = function (_a) {
|
|
4243
4839
|
var id = _a.id, props = __rest(_a, ["id"]);
|
|
@@ -6548,7 +7144,35 @@ var DateFilter = function (_a) {
|
|
|
6548
7144
|
}
|
|
6549
7145
|
return exports.HolidayType.SingleDay;
|
|
6550
7146
|
};
|
|
6551
|
-
|
|
7147
|
+
var getInitialDate = function () {
|
|
7148
|
+
if ((value === null || value === void 0 ? void 0 : value.type) === "singleDay" && value.date) {
|
|
7149
|
+
try {
|
|
7150
|
+
return $fae977aafc393c5c$export$6b862160d295c8e(value.date);
|
|
7151
|
+
}
|
|
7152
|
+
catch (_a) {
|
|
7153
|
+
return undefined;
|
|
7154
|
+
}
|
|
7155
|
+
}
|
|
7156
|
+
return undefined;
|
|
7157
|
+
};
|
|
7158
|
+
var getInitialDateRange = function () {
|
|
7159
|
+
var _a, _b;
|
|
7160
|
+
if ((value === null || value === void 0 ? void 0 : value.type) === "dateRange" &&
|
|
7161
|
+
((_a = value.dateRange) === null || _a === void 0 ? void 0 : _a.start) &&
|
|
7162
|
+
((_b = value.dateRange) === null || _b === void 0 ? void 0 : _b.end)) {
|
|
7163
|
+
try {
|
|
7164
|
+
return {
|
|
7165
|
+
start: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.start),
|
|
7166
|
+
end: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.end),
|
|
7167
|
+
};
|
|
7168
|
+
}
|
|
7169
|
+
catch (_c) {
|
|
7170
|
+
return undefined;
|
|
7171
|
+
}
|
|
7172
|
+
}
|
|
7173
|
+
return undefined;
|
|
7174
|
+
};
|
|
7175
|
+
return (jsxRuntime.jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, className: "w-full" }));
|
|
6552
7176
|
};
|
|
6553
7177
|
// =========================================================================
|
|
6554
7178
|
// TEXT FILTER
|
|
@@ -7394,9 +8018,10 @@ function TagsFilter(_a) {
|
|
|
7394
8018
|
menuTrigger: "input",
|
|
7395
8019
|
// When the filtered list is empty, avoid keeping an open overlay that blocks the modal.
|
|
7396
8020
|
allowsEmptyCollection: false, shouldCloseOnBlur: true, popoverProps: {
|
|
7397
|
-
isNonModal: false
|
|
7398
|
-
//
|
|
7399
|
-
//
|
|
8021
|
+
// isNonModal: false would render a full-screen invisible backdrop that
|
|
8022
|
+
// intercepts pointer events, blocking the parent modal's close button.
|
|
8023
|
+
// shouldCloseOnInteractOutside already handles closing on outside clicks.
|
|
8024
|
+
isNonModal: true,
|
|
7400
8025
|
shouldCloseOnInteractOutside: function () { return true; },
|
|
7401
8026
|
}, listboxProps: {
|
|
7402
8027
|
className: "max-h-[200px] overflow-y-auto",
|