@descope/flow-components 2.0.607 → 2.0.609
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/fm/575.js +1 -1
- package/dist/fm/598.js +1 -1
- package/dist/fm/84.js +2 -2
- package/dist/fm/@mf-types.zip +0 -0
- package/dist/fm/__federation_expose_componentClasses.js +1 -1
- package/dist/fm/__federation_expose_components.js +1 -1
- package/dist/fm/__federation_expose_theme.js +1 -1
- package/dist/fm/flowComponents.js +1 -1
- package/dist/fm/main.js +1 -1
- package/dist/fm/mf-manifest.json +1 -1
- package/dist/fm/mf-stats.json +1 -1
- package/dist/index.cjs.js +90 -63
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -93335,20 +93335,20 @@ descope-boolean-field-internal {
|
|
|
93335
93335
|
|
|
93336
93336
|
const formats = Object.fromEntries(SUPPORTED_FORMATS.map((f) => [f, createFormat(f)]));
|
|
93337
93337
|
|
|
93338
|
-
const
|
|
93338
|
+
const isValidEpoch = (val) => !Number.isNaN(Number(val));
|
|
93339
93339
|
|
|
93340
93340
|
const isNumber = (val) => !!String(val || '').trim() && !Number.isNaN(Number(val));
|
|
93341
93341
|
|
|
93342
|
-
const
|
|
93343
|
-
const date = newDate(
|
|
93342
|
+
const getPartsFromEpoch = (epoch) => {
|
|
93343
|
+
const date = newDate(epoch);
|
|
93344
93344
|
const year = date.getFullYear();
|
|
93345
93345
|
const month = date.getMonth() + 1;
|
|
93346
93346
|
const day = date.getDate();
|
|
93347
93347
|
return [year, month, day];
|
|
93348
93348
|
};
|
|
93349
93349
|
|
|
93350
|
-
const
|
|
93351
|
-
const [year, month, day] =
|
|
93350
|
+
const formatEpoch = (epoch, format) => {
|
|
93351
|
+
const [year, month, day] = getPartsFromEpoch(epoch);
|
|
93352
93352
|
|
|
93353
93353
|
const parts = {
|
|
93354
93354
|
DD: String(day).padStart(2, '0'),
|
|
@@ -93371,8 +93371,8 @@ descope-boolean-field-internal {
|
|
|
93371
93371
|
};
|
|
93372
93372
|
|
|
93373
93373
|
const getCurrentTime = () => newDate().getTime();
|
|
93374
|
-
const getFullYear = (
|
|
93375
|
-
const getMonth = (
|
|
93374
|
+
const getFullYear = (epoch) => newDate(epoch).getFullYear().toString();
|
|
93375
|
+
const getMonth = (epoch) => (newDate(epoch).getMonth() + 1).toString();
|
|
93376
93376
|
const getCurrentDay = () => newDate().getDate();
|
|
93377
93377
|
|
|
93378
93378
|
// Vaadin uses "constructed stylesheet" to hide the host in dialog components.
|
|
@@ -93390,6 +93390,13 @@ descope-boolean-field-internal {
|
|
|
93390
93390
|
return formats[format].getDate(trimmed);
|
|
93391
93391
|
};
|
|
93392
93392
|
|
|
93393
|
+
const dateToEpoch = (date, isUtc) => {
|
|
93394
|
+
if (isUtc) {
|
|
93395
|
+
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())).getTime();
|
|
93396
|
+
}
|
|
93397
|
+
return date.getTime();
|
|
93398
|
+
};
|
|
93399
|
+
|
|
93393
93400
|
const calendarIcon = `
|
|
93394
93401
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
93395
93402
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>
|
|
@@ -93495,9 +93502,9 @@ descope-boolean-field-internal {
|
|
|
93495
93502
|
.map((item, index) => comboBoxItemTpl({ label: item, dataId: index + 1, dataName: item }))
|
|
93496
93503
|
.join('');
|
|
93497
93504
|
|
|
93498
|
-
const isViewVisible = (
|
|
93499
|
-
const [previewYear, previewMonth] =
|
|
93500
|
-
const [selectedYear, selectedMonth] =
|
|
93505
|
+
const isViewVisible = (selectionEpoch, previewEpoch) => {
|
|
93506
|
+
const [previewYear, previewMonth] = getPartsFromEpoch(previewEpoch);
|
|
93507
|
+
const [selectedYear, selectedMonth] = getPartsFromEpoch(selectionEpoch);
|
|
93501
93508
|
return selectedYear === previewYear && selectedMonth === previewMonth;
|
|
93502
93509
|
};
|
|
93503
93510
|
|
|
@@ -93548,8 +93555,8 @@ descope-boolean-field-internal {
|
|
|
93548
93555
|
|
|
93549
93556
|
const truncateWeekdays = (arr) => arr.map((d) => d.substring(0, 3));
|
|
93550
93557
|
|
|
93551
|
-
const prevMonth = (
|
|
93552
|
-
const date = newDate(
|
|
93558
|
+
const prevMonth = (epoch) => {
|
|
93559
|
+
const date = newDate(epoch);
|
|
93553
93560
|
const month = date.getMonth();
|
|
93554
93561
|
|
|
93555
93562
|
if (month === 0) {
|
|
@@ -93563,8 +93570,8 @@ descope-boolean-field-internal {
|
|
|
93563
93570
|
return date;
|
|
93564
93571
|
};
|
|
93565
93572
|
|
|
93566
|
-
const nextMonth = (
|
|
93567
|
-
const date = newDate(
|
|
93573
|
+
const nextMonth = (epoch) => {
|
|
93574
|
+
const date = newDate(epoch);
|
|
93568
93575
|
const month = date.getMonth();
|
|
93569
93576
|
|
|
93570
93577
|
if (month === 11) {
|
|
@@ -93602,11 +93609,11 @@ descope-boolean-field-internal {
|
|
|
93602
93609
|
return [].concat(BaseInputClass$3.observedAttributes || [], observedAttrs$2, calendarUiAttrs);
|
|
93603
93610
|
}
|
|
93604
93611
|
|
|
93605
|
-
// preview state
|
|
93612
|
+
// preview state epoch
|
|
93606
93613
|
preview;
|
|
93607
93614
|
|
|
93608
|
-
// value
|
|
93609
|
-
|
|
93615
|
+
// value epoch
|
|
93616
|
+
epoch;
|
|
93610
93617
|
|
|
93611
93618
|
constructor() {
|
|
93612
93619
|
super();
|
|
@@ -93692,23 +93699,23 @@ descope-boolean-field-internal {
|
|
|
93692
93699
|
set value(val) {
|
|
93693
93700
|
if (!val) return;
|
|
93694
93701
|
|
|
93695
|
-
const
|
|
93702
|
+
const epoch = newDate(val).getTime();
|
|
93696
93703
|
|
|
93697
|
-
if (!
|
|
93704
|
+
if (!isValidEpoch(epoch) || epoch === this.epoch) {
|
|
93698
93705
|
return;
|
|
93699
93706
|
}
|
|
93700
93707
|
|
|
93701
|
-
this.
|
|
93708
|
+
this.epoch = epoch;
|
|
93702
93709
|
|
|
93703
93710
|
this.renderCalendar();
|
|
93704
93711
|
}
|
|
93705
93712
|
|
|
93706
93713
|
get value() {
|
|
93707
|
-
return this.
|
|
93714
|
+
return this.epoch ? formatEpoch(this.epoch, NATIVE_FORMAT) : '';
|
|
93708
93715
|
}
|
|
93709
93716
|
|
|
93710
93717
|
get isSelectedView() {
|
|
93711
|
-
return isViewVisible(this.preview, this.
|
|
93718
|
+
return isViewVisible(this.preview, this.epoch);
|
|
93712
93719
|
}
|
|
93713
93720
|
|
|
93714
93721
|
get isTodayView() {
|
|
@@ -93825,14 +93832,14 @@ descope-boolean-field-internal {
|
|
|
93825
93832
|
clearSelectedDay() {
|
|
93826
93833
|
this.getSelectedDayEle()?.removeAttribute('data-selected');
|
|
93827
93834
|
this.submitButton.setAttribute('disabled', 'true');
|
|
93828
|
-
this.
|
|
93835
|
+
this.epoch = '';
|
|
93829
93836
|
}
|
|
93830
93837
|
|
|
93831
93838
|
updateInputs() {
|
|
93832
93839
|
if (this.yearInput && this.monthInput) {
|
|
93833
|
-
const
|
|
93834
|
-
const year = getFullYear(
|
|
93835
|
-
const month = getMonth(
|
|
93840
|
+
const epoch = this.preview || getCurrentTime();
|
|
93841
|
+
const year = getFullYear(epoch);
|
|
93842
|
+
const month = getMonth(epoch);
|
|
93836
93843
|
this.monthInput.value = month;
|
|
93837
93844
|
// For the yearInput we update the base element directly to properly trigger the change event
|
|
93838
93845
|
// since this can be a custom value
|
|
@@ -93844,9 +93851,9 @@ descope-boolean-field-internal {
|
|
|
93844
93851
|
|
|
93845
93852
|
renderCalendar() {
|
|
93846
93853
|
const date = newDate(this.preview || getCurrentTime());
|
|
93847
|
-
const
|
|
93854
|
+
const epoch = date.getTime();
|
|
93848
93855
|
|
|
93849
|
-
const [year, month] =
|
|
93856
|
+
const [year, month] = getPartsFromEpoch(epoch);
|
|
93850
93857
|
|
|
93851
93858
|
if (this.calendar) {
|
|
93852
93859
|
this.calendar.innerHTML = createMonthView(year, month, truncateWeekdays(this.weekdayNames));
|
|
@@ -93865,7 +93872,7 @@ descope-boolean-field-internal {
|
|
|
93865
93872
|
if (this.isDisabled) return;
|
|
93866
93873
|
const date = newDate(this.preview);
|
|
93867
93874
|
date.setDate(Number(e.target.getAttribute('data-date-day')));
|
|
93868
|
-
this.value =
|
|
93875
|
+
this.value = formatEpoch(date.getTime(), NATIVE_FORMAT);
|
|
93869
93876
|
this.dispatchEvent(new CustomEvent('day-changed', { detail: date }));
|
|
93870
93877
|
}
|
|
93871
93878
|
|
|
@@ -93896,7 +93903,7 @@ descope-boolean-field-internal {
|
|
|
93896
93903
|
}
|
|
93897
93904
|
|
|
93898
93905
|
getSelectedDayEle() {
|
|
93899
|
-
const day = newDate(this.
|
|
93906
|
+
const day = newDate(this.epoch).getDate();
|
|
93900
93907
|
return this.calendar?.querySelector(`[data-date-day="${day}"]`);
|
|
93901
93908
|
}
|
|
93902
93909
|
|
|
@@ -93921,8 +93928,8 @@ descope-boolean-field-internal {
|
|
|
93921
93928
|
if (this.isTodayView) {
|
|
93922
93929
|
const ele = this.getCurrentDayEle();
|
|
93923
93930
|
const title = this.getAttribute('calendar-label-today') || CALENDAR_LABEL_TODAY;
|
|
93924
|
-
ele
|
|
93925
|
-
ele
|
|
93931
|
+
ele?.setAttribute('data-current-day', 'true');
|
|
93932
|
+
ele?.setAttribute('title', title);
|
|
93926
93933
|
}
|
|
93927
93934
|
}
|
|
93928
93935
|
|
|
@@ -93945,7 +93952,7 @@ descope-boolean-field-internal {
|
|
|
93945
93952
|
}
|
|
93946
93953
|
|
|
93947
93954
|
clearValue() {
|
|
93948
|
-
this.
|
|
93955
|
+
this.epoch = '';
|
|
93949
93956
|
this.value = '';
|
|
93950
93957
|
this.removeAttribute('preview');
|
|
93951
93958
|
this.submitButton.setAttribute('disabled', 'true');
|
|
@@ -93958,11 +93965,11 @@ descope-boolean-field-internal {
|
|
|
93958
93965
|
}
|
|
93959
93966
|
|
|
93960
93967
|
const date = newDate(newValue);
|
|
93961
|
-
const
|
|
93968
|
+
const epoch = date.getTime();
|
|
93962
93969
|
|
|
93963
|
-
if (
|
|
93964
|
-
this.
|
|
93965
|
-
this.preview =
|
|
93970
|
+
if (isValidEpoch(epoch)) {
|
|
93971
|
+
this.epoch = epoch;
|
|
93972
|
+
this.preview = epoch;
|
|
93966
93973
|
} else {
|
|
93967
93974
|
this.clearValue();
|
|
93968
93975
|
}
|
|
@@ -94431,12 +94438,19 @@ descope-boolean-field-internal {
|
|
|
94431
94438
|
const BASE_SELECTOR = 'vaadin-popover';
|
|
94432
94439
|
const BaseInputClass$2 = createBaseInputClass({ componentName: componentName$m, baseSelector: BASE_SELECTOR });
|
|
94433
94440
|
|
|
94434
|
-
const dateFieldAttrs = [
|
|
94441
|
+
const dateFieldAttrs = [
|
|
94442
|
+
'format',
|
|
94443
|
+
'opened',
|
|
94444
|
+
'initial-value',
|
|
94445
|
+
'readonly',
|
|
94446
|
+
'disable-calendar',
|
|
94447
|
+
'utc-time',
|
|
94448
|
+
];
|
|
94435
94449
|
const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
|
|
94436
94450
|
const observedAttrs$1 = [...dateFieldAttrs, ...calendarAttrs];
|
|
94437
94451
|
|
|
94438
94452
|
class RawDateFieldClass extends BaseInputClass$2 {
|
|
94439
|
-
|
|
94453
|
+
epoch = '';
|
|
94440
94454
|
|
|
94441
94455
|
format = DEFAULT_FORMAT;
|
|
94442
94456
|
|
|
@@ -94448,10 +94462,10 @@ descope-boolean-field-internal {
|
|
|
94448
94462
|
|
|
94449
94463
|
updateValue() {
|
|
94450
94464
|
if (this.isCountersOutOfRange) {
|
|
94451
|
-
this.
|
|
94465
|
+
this.updateEpoch('');
|
|
94452
94466
|
} else {
|
|
94453
94467
|
const date = formats[this.format].getDate(this.inputElement.value);
|
|
94454
|
-
this.
|
|
94468
|
+
this.updateEpoch(dateToEpoch(date, this.isUtcTime));
|
|
94455
94469
|
}
|
|
94456
94470
|
}
|
|
94457
94471
|
|
|
@@ -94462,11 +94476,11 @@ descope-boolean-field-internal {
|
|
|
94462
94476
|
this.#dispatchInput();
|
|
94463
94477
|
};
|
|
94464
94478
|
|
|
94465
|
-
|
|
94479
|
+
updateEpoch(epochOrDate) {
|
|
94466
94480
|
if (!epochOrDate) {
|
|
94467
|
-
this.
|
|
94481
|
+
this.epoch = '';
|
|
94468
94482
|
} else {
|
|
94469
|
-
this.
|
|
94483
|
+
this.epoch = dateToEpoch(newDate(epochOrDate), this.isUtcTime);
|
|
94470
94484
|
}
|
|
94471
94485
|
}
|
|
94472
94486
|
|
|
@@ -94539,11 +94553,11 @@ descope-boolean-field-internal {
|
|
|
94539
94553
|
return this.getAttribute('opened') === 'true';
|
|
94540
94554
|
}
|
|
94541
94555
|
|
|
94542
|
-
// returns the input's value as a
|
|
94556
|
+
// returns the input's value as a epoch
|
|
94543
94557
|
get displayValueEpoch() {
|
|
94544
94558
|
const date = formats[this.format].getDate(this.inputElement.value);
|
|
94545
94559
|
|
|
94546
|
-
if (!
|
|
94560
|
+
if (!isValidEpoch(date?.getTime())) {
|
|
94547
94561
|
return null;
|
|
94548
94562
|
}
|
|
94549
94563
|
|
|
@@ -94591,15 +94605,15 @@ descope-boolean-field-internal {
|
|
|
94591
94605
|
if (this.isInvalidDate()) {
|
|
94592
94606
|
return '';
|
|
94593
94607
|
}
|
|
94594
|
-
return this.
|
|
94608
|
+
return this.epoch;
|
|
94595
94609
|
}
|
|
94596
94610
|
|
|
94597
94611
|
set value(val) {
|
|
94598
94612
|
if (val) {
|
|
94599
|
-
this.
|
|
94613
|
+
this.updateEpoch(val);
|
|
94600
94614
|
this.updateDateCounters(newDate(val));
|
|
94601
94615
|
} else {
|
|
94602
|
-
this.
|
|
94616
|
+
this.updateEpoch('');
|
|
94603
94617
|
}
|
|
94604
94618
|
}
|
|
94605
94619
|
|
|
@@ -94615,6 +94629,10 @@ descope-boolean-field-internal {
|
|
|
94615
94629
|
return this.getAttribute('disable-calendar') === 'true';
|
|
94616
94630
|
}
|
|
94617
94631
|
|
|
94632
|
+
get isUtcTime() {
|
|
94633
|
+
return this.getAttribute('utc-time') === 'true';
|
|
94634
|
+
}
|
|
94635
|
+
|
|
94618
94636
|
get isSelectAll() {
|
|
94619
94637
|
const inputEle = this.inputElement.baseElement.inputElement;
|
|
94620
94638
|
return inputEle.value.length === inputEle.selectionStart + inputEle.selectionEnd;
|
|
@@ -94629,7 +94647,7 @@ descope-boolean-field-internal {
|
|
|
94629
94647
|
}
|
|
94630
94648
|
|
|
94631
94649
|
updateInputDisplay() {
|
|
94632
|
-
this.inputElement.value =
|
|
94650
|
+
this.inputElement.value = formatEpoch(newDate(this.countersValue).getTime(), this.format);
|
|
94633
94651
|
}
|
|
94634
94652
|
|
|
94635
94653
|
init() {
|
|
@@ -94820,7 +94838,7 @@ descope-boolean-field-internal {
|
|
|
94820
94838
|
|
|
94821
94839
|
const calendarDate = newDate(this.calendar.value);
|
|
94822
94840
|
|
|
94823
|
-
this.value = calendarDate.
|
|
94841
|
+
this.value = dateToEpoch(calendarDate, this.isUtcTime);
|
|
94824
94842
|
|
|
94825
94843
|
this.getCounterById('year').replaceValue(calendarDate.getFullYear());
|
|
94826
94844
|
this.getCounterById('month').replaceValue(calendarDate.getMonth() + 1);
|
|
@@ -94834,17 +94852,17 @@ descope-boolean-field-internal {
|
|
|
94834
94852
|
|
|
94835
94853
|
updateCalendarView() {
|
|
94836
94854
|
const validInputVal =
|
|
94837
|
-
|
|
94855
|
+
isValidEpoch(newDate(this.inputElement.value || '').getTime()) &&
|
|
94838
94856
|
formats[this.format].validate(this.inputElement.value);
|
|
94839
94857
|
|
|
94840
94858
|
if (this.displayValueEpoch || validInputVal) {
|
|
94841
94859
|
this.calendar.setAttribute(
|
|
94842
94860
|
'initial-value',
|
|
94843
|
-
|
|
94861
|
+
formatEpoch(this.displayValueEpoch || this.epoch, NATIVE_FORMAT)
|
|
94844
94862
|
);
|
|
94845
94863
|
} else {
|
|
94846
94864
|
this.calendar.clearValue();
|
|
94847
|
-
this.calendar.setAttribute('preview',
|
|
94865
|
+
this.calendar.setAttribute('preview', formatEpoch(getCurrentTime(), NATIVE_FORMAT));
|
|
94848
94866
|
}
|
|
94849
94867
|
|
|
94850
94868
|
forwardAttrs$1(this, this.calendar, {
|
|
@@ -94993,13 +95011,13 @@ descope-boolean-field-internal {
|
|
|
94993
95011
|
this.dateCounters.forEach((dc) => {
|
|
94994
95012
|
switch (dc.id) {
|
|
94995
95013
|
case counterConfig.MONTH.id:
|
|
94996
|
-
dc.set(date.getMonth() + 1);
|
|
95014
|
+
dc.set(this.isUtcTime ? date.getUTCMonth() + 1 : date.getMonth() + 1);
|
|
94997
95015
|
break;
|
|
94998
95016
|
case counterConfig.YEAR.id:
|
|
94999
|
-
dc.set(date.getFullYear());
|
|
95017
|
+
dc.set(this.isUtcTime ? date.getUTCFullYear() : date.getFullYear());
|
|
95000
95018
|
break;
|
|
95001
95019
|
case counterConfig.DAY.id:
|
|
95002
|
-
dc.set(date.getDate());
|
|
95020
|
+
dc.set(this.isUtcTime ? date.getUTCDate() : date.getDate());
|
|
95003
95021
|
break;
|
|
95004
95022
|
}
|
|
95005
95023
|
});
|
|
@@ -95160,12 +95178,22 @@ descope-boolean-field-internal {
|
|
|
95160
95178
|
year: '',
|
|
95161
95179
|
};
|
|
95162
95180
|
|
|
95181
|
+
if (!this.epoch) {
|
|
95182
|
+
return ret;
|
|
95183
|
+
}
|
|
95184
|
+
|
|
95163
95185
|
try {
|
|
95164
|
-
const date = newDate(this.
|
|
95186
|
+
const date = newDate(this.epoch);
|
|
95165
95187
|
|
|
95166
|
-
|
|
95167
|
-
|
|
95168
|
-
|
|
95188
|
+
if (this.isUtcTime) {
|
|
95189
|
+
ret.month = date.getUTCMonth() + 1;
|
|
95190
|
+
ret.day = date.getUTCDate();
|
|
95191
|
+
ret.year = date.getUTCFullYear();
|
|
95192
|
+
} else {
|
|
95193
|
+
ret.month = date.getMonth() + 1;
|
|
95194
|
+
ret.day = date.getDate();
|
|
95195
|
+
ret.year = date.getFullYear();
|
|
95196
|
+
}
|
|
95169
95197
|
} catch (e) {}
|
|
95170
95198
|
|
|
95171
95199
|
return ret;
|
|
@@ -95209,7 +95237,7 @@ descope-boolean-field-internal {
|
|
|
95209
95237
|
const validDate = parseDateString(pastedData, this.format);
|
|
95210
95238
|
|
|
95211
95239
|
if (validDate) {
|
|
95212
|
-
this.value = validDate.
|
|
95240
|
+
this.value = dateToEpoch(validDate, this.isUtcTime);
|
|
95213
95241
|
this.onDateCounterChange();
|
|
95214
95242
|
|
|
95215
95243
|
// select all
|
|
@@ -99441,7 +99469,6 @@ descope-boolean-field-internal {
|
|
|
99441
99469
|
[vars$1.iconColor]: globals.colors.primary.main,
|
|
99442
99470
|
[vars$1.errorIconColor]: globals.colors.error.main,
|
|
99443
99471
|
|
|
99444
|
-
[vars$1.appLogoBackgroundColor]: 'none',
|
|
99445
99472
|
[vars$1.appLogoGap]: globals.spacing.md,
|
|
99446
99473
|
[vars$1.contentGap]: globals.spacing.xs,
|
|
99447
99474
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.609",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"webpack-dev-server": "5.0.4"
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@descope/web-components-ui": "1.
|
|
115
|
+
"@descope/web-components-ui": "1.118.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"react": ">= 18"
|