@descope/web-components-ui 1.114.0 → 1.116.0

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.esm.js CHANGED
@@ -4800,11 +4800,17 @@ const ComboBoxMixin = (superclass) =>
4800
4800
  return {};
4801
4801
  };
4802
4802
 
4803
- this.setComboBoxDescriptor();
4804
- this.#overrideOverlaySettings();
4805
4803
  this.#overrideRenderer();
4806
4804
  this.#disableDataProviderFilterEventIfNeeded();
4807
4805
 
4806
+ // This is a workaround for a problem we have in Console App, where in ScreenBuilder - the inputElement is not ready when trying to
4807
+ // set the component's descriptor and override the overlay settings.
4808
+ // THIS IS A PROBLEM WITH THE CONSOLE APP THAT NEEDS TO BE RESOLVED. Until then, we use this workaround.
4809
+ setTimeout(() => {
4810
+ this.setComboBoxDescriptor();
4811
+ this.#overrideOverlaySettings();
4812
+ });
4813
+
4808
4814
  // Set up observers - order matters here since renderItems can clear innerHTML
4809
4815
  observeAttributes(this, this.renderItems.bind(this), {
4810
4816
  includeAttrs: ['data'],
@@ -5696,20 +5702,20 @@ const createFormat = (format) => {
5696
5702
 
5697
5703
  const formats = Object.fromEntries(SUPPORTED_FORMATS.map((f) => [f, createFormat(f)]));
5698
5704
 
5699
- const isValidTimestamp = (val) => !Number.isNaN(Number(val));
5705
+ const isValidEpoch = (val) => !Number.isNaN(Number(val));
5700
5706
 
5701
5707
  const isNumber = (val) => !!String(val || '').trim() && !Number.isNaN(Number(val));
5702
5708
 
5703
- const getTimestampParts = (timestamp) => {
5704
- const date = newDate(timestamp);
5709
+ const getPartsFromEpoch = (epoch) => {
5710
+ const date = newDate(epoch);
5705
5711
  const year = date.getFullYear();
5706
5712
  const month = date.getMonth() + 1;
5707
5713
  const day = date.getDate();
5708
5714
  return [year, month, day];
5709
5715
  };
5710
5716
 
5711
- const formatTimestamp = (timestamp, format) => {
5712
- const [year, month, day] = getTimestampParts(timestamp);
5717
+ const formatEpoch = (epoch, format) => {
5718
+ const [year, month, day] = getPartsFromEpoch(epoch);
5713
5719
 
5714
5720
  const parts = {
5715
5721
  DD: String(day).padStart(2, '0'),
@@ -5732,8 +5738,8 @@ const newDate = (date) => {
5732
5738
  };
5733
5739
 
5734
5740
  const getCurrentTime = () => newDate().getTime();
5735
- const getFullYear = (timestamp) => newDate(timestamp).getFullYear().toString();
5736
- const getMonth = (timestamp) => (newDate(timestamp).getMonth() + 1).toString();
5741
+ const getFullYear = (epoch) => newDate(epoch).getFullYear().toString();
5742
+ const getMonth = (epoch) => (newDate(epoch).getMonth() + 1).toString();
5737
5743
  const getCurrentDay = () => newDate().getDate();
5738
5744
 
5739
5745
  // Vaadin uses "constructed stylesheet" to hide the host in dialog components.
@@ -5751,6 +5757,13 @@ const parseDateString = (val, format) => {
5751
5757
  return formats[format].getDate(trimmed);
5752
5758
  };
5753
5759
 
5760
+ const dateToEpoch = (date, isUtc) => {
5761
+ if (isUtc) {
5762
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())).getTime();
5763
+ }
5764
+ return date.getTime();
5765
+ };
5766
+
5754
5767
  const calendarIcon = `
5755
5768
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5756
5769
  <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"/>
@@ -5856,9 +5869,9 @@ const getMonthsOptions = (customMonths = months) =>
5856
5869
  .map((item, index) => comboBoxItemTpl({ label: item, dataId: index + 1, dataName: item }))
5857
5870
  .join('');
5858
5871
 
5859
- const isViewVisible = (selectionTimestamp, previewTimestamp) => {
5860
- const [previewYear, previewMonth] = getTimestampParts(previewTimestamp);
5861
- const [selectedYear, selectedMonth] = getTimestampParts(selectionTimestamp);
5872
+ const isViewVisible = (selectionEpoch, previewEpoch) => {
5873
+ const [previewYear, previewMonth] = getPartsFromEpoch(previewEpoch);
5874
+ const [selectedYear, selectedMonth] = getPartsFromEpoch(selectionEpoch);
5862
5875
  return selectedYear === previewYear && selectedMonth === previewMonth;
5863
5876
  };
5864
5877
 
@@ -5909,8 +5922,8 @@ const ensureWeekdayNamesArr = (attrVal) => {
5909
5922
 
5910
5923
  const truncateWeekdays = (arr) => arr.map((d) => d.substring(0, 3));
5911
5924
 
5912
- const prevMonth = (timestamp) => {
5913
- const date = newDate(timestamp);
5925
+ const prevMonth = (epoch) => {
5926
+ const date = newDate(epoch);
5914
5927
  const month = date.getMonth();
5915
5928
 
5916
5929
  if (month === 0) {
@@ -5924,8 +5937,8 @@ const prevMonth = (timestamp) => {
5924
5937
  return date;
5925
5938
  };
5926
5939
 
5927
- const nextMonth = (timestamp) => {
5928
- const date = newDate(timestamp);
5940
+ const nextMonth = (epoch) => {
5941
+ const date = newDate(epoch);
5929
5942
  const month = date.getMonth();
5930
5943
 
5931
5944
  if (month === 11) {
@@ -5963,11 +5976,11 @@ class RawCalendar extends BaseInputClass$c {
5963
5976
  return [].concat(BaseInputClass$c.observedAttributes || [], observedAttrs$5, calendarUiAttrs);
5964
5977
  }
5965
5978
 
5966
- // preview state timestamp
5979
+ // preview state epoch
5967
5980
  preview;
5968
5981
 
5969
- // value timestamp
5970
- timestamp;
5982
+ // value epoch
5983
+ epoch;
5971
5984
 
5972
5985
  constructor() {
5973
5986
  super();
@@ -6053,23 +6066,23 @@ class RawCalendar extends BaseInputClass$c {
6053
6066
  set value(val) {
6054
6067
  if (!val) return;
6055
6068
 
6056
- const timestamp = newDate(val).getTime();
6069
+ const epoch = newDate(val).getTime();
6057
6070
 
6058
- if (!isValidTimestamp(timestamp) || timestamp === this.timestmap) {
6071
+ if (!isValidEpoch(epoch) || epoch === this.epoch) {
6059
6072
  return;
6060
6073
  }
6061
6074
 
6062
- this.timestamp = timestamp;
6075
+ this.epoch = epoch;
6063
6076
 
6064
6077
  this.renderCalendar();
6065
6078
  }
6066
6079
 
6067
6080
  get value() {
6068
- return this.timestamp ? formatTimestamp(this.timestamp, NATIVE_FORMAT) : '';
6081
+ return this.epoch ? formatEpoch(this.epoch, NATIVE_FORMAT) : '';
6069
6082
  }
6070
6083
 
6071
6084
  get isSelectedView() {
6072
- return isViewVisible(this.preview, this.timestamp);
6085
+ return isViewVisible(this.preview, this.epoch);
6073
6086
  }
6074
6087
 
6075
6088
  get isTodayView() {
@@ -6186,14 +6199,14 @@ class RawCalendar extends BaseInputClass$c {
6186
6199
  clearSelectedDay() {
6187
6200
  this.getSelectedDayEle()?.removeAttribute('data-selected');
6188
6201
  this.submitButton.setAttribute('disabled', 'true');
6189
- this.timestamp = '';
6202
+ this.epoch = '';
6190
6203
  }
6191
6204
 
6192
6205
  updateInputs() {
6193
6206
  if (this.yearInput && this.monthInput) {
6194
- const timestamp = this.preview || getCurrentTime();
6195
- const year = getFullYear(timestamp);
6196
- const month = getMonth(timestamp);
6207
+ const epoch = this.preview || getCurrentTime();
6208
+ const year = getFullYear(epoch);
6209
+ const month = getMonth(epoch);
6197
6210
  this.monthInput.value = month;
6198
6211
  // For the yearInput we update the base element directly to properly trigger the change event
6199
6212
  // since this can be a custom value
@@ -6205,9 +6218,9 @@ class RawCalendar extends BaseInputClass$c {
6205
6218
 
6206
6219
  renderCalendar() {
6207
6220
  const date = newDate(this.preview || getCurrentTime());
6208
- const timestamp = date.getTime();
6221
+ const epoch = date.getTime();
6209
6222
 
6210
- const [year, month] = getTimestampParts(timestamp);
6223
+ const [year, month] = getPartsFromEpoch(epoch);
6211
6224
 
6212
6225
  if (this.calendar) {
6213
6226
  this.calendar.innerHTML = createMonthView(year, month, truncateWeekdays(this.weekdayNames));
@@ -6226,7 +6239,7 @@ class RawCalendar extends BaseInputClass$c {
6226
6239
  if (this.isDisabled) return;
6227
6240
  const date = newDate(this.preview);
6228
6241
  date.setDate(Number(e.target.getAttribute('data-date-day')));
6229
- this.value = formatTimestamp(date.getTime(), NATIVE_FORMAT);
6242
+ this.value = formatEpoch(date.getTime(), NATIVE_FORMAT);
6230
6243
  this.dispatchEvent(new CustomEvent('day-changed', { detail: date }));
6231
6244
  }
6232
6245
 
@@ -6257,7 +6270,7 @@ class RawCalendar extends BaseInputClass$c {
6257
6270
  }
6258
6271
 
6259
6272
  getSelectedDayEle() {
6260
- const day = newDate(this.timestamp).getDate();
6273
+ const day = newDate(this.epoch).getDate();
6261
6274
  return this.calendar?.querySelector(`[data-date-day="${day}"]`);
6262
6275
  }
6263
6276
 
@@ -6282,8 +6295,8 @@ class RawCalendar extends BaseInputClass$c {
6282
6295
  if (this.isTodayView) {
6283
6296
  const ele = this.getCurrentDayEle();
6284
6297
  const title = this.getAttribute('calendar-label-today') || CALENDAR_LABEL_TODAY;
6285
- ele.setAttribute('data-current-day', 'true');
6286
- ele.setAttribute('title', title);
6298
+ ele?.setAttribute('data-current-day', 'true');
6299
+ ele?.setAttribute('title', title);
6287
6300
  }
6288
6301
  }
6289
6302
 
@@ -6306,7 +6319,7 @@ class RawCalendar extends BaseInputClass$c {
6306
6319
  }
6307
6320
 
6308
6321
  clearValue() {
6309
- this.timestamp = '';
6322
+ this.epoch = '';
6310
6323
  this.value = '';
6311
6324
  this.removeAttribute('preview');
6312
6325
  this.submitButton.setAttribute('disabled', 'true');
@@ -6319,11 +6332,11 @@ class RawCalendar extends BaseInputClass$c {
6319
6332
  }
6320
6333
 
6321
6334
  const date = newDate(newValue);
6322
- const timestamp = date.getTime();
6335
+ const epoch = date.getTime();
6323
6336
 
6324
- if (isValidTimestamp(timestamp)) {
6325
- this.timestamp = timestamp;
6326
- this.preview = timestamp;
6337
+ if (isValidEpoch(epoch)) {
6338
+ this.epoch = epoch;
6339
+ this.preview = epoch;
6327
6340
  } else {
6328
6341
  this.clearValue();
6329
6342
  }
@@ -6985,12 +6998,19 @@ const componentName$16 = getComponentName$1('date-field');
6985
6998
  const BASE_SELECTOR = 'vaadin-popover';
6986
6999
  const BaseInputClass$b = createBaseInputClass$1({ componentName: componentName$16, baseSelector: BASE_SELECTOR });
6987
7000
 
6988
- const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly', 'disable-calendar'];
7001
+ const dateFieldAttrs = [
7002
+ 'format',
7003
+ 'opened',
7004
+ 'initial-value',
7005
+ 'readonly',
7006
+ 'disable-calendar',
7007
+ 'utc-time',
7008
+ ];
6989
7009
  const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
6990
7010
  const observedAttrs$3 = [...dateFieldAttrs, ...calendarAttrs];
6991
7011
 
6992
7012
  class RawDateFieldClass extends BaseInputClass$b {
6993
- timestamp = '';
7013
+ epoch = '';
6994
7014
 
6995
7015
  format = DEFAULT_FORMAT;
6996
7016
 
@@ -7002,10 +7022,10 @@ class RawDateFieldClass extends BaseInputClass$b {
7002
7022
 
7003
7023
  updateValue() {
7004
7024
  if (this.isCountersOutOfRange) {
7005
- this.updateTimestamp('');
7025
+ this.updateEpoch('');
7006
7026
  } else {
7007
7027
  const date = formats[this.format].getDate(this.inputElement.value);
7008
- this.updateTimestamp(date.getTime());
7028
+ this.updateEpoch(dateToEpoch(date, this.isUtcTime));
7009
7029
  }
7010
7030
  }
7011
7031
 
@@ -7016,11 +7036,11 @@ class RawDateFieldClass extends BaseInputClass$b {
7016
7036
  this.#dispatchInput();
7017
7037
  };
7018
7038
 
7019
- updateTimestamp(epochOrDate) {
7039
+ updateEpoch(epochOrDate) {
7020
7040
  if (!epochOrDate) {
7021
- this.timestamp = '';
7041
+ this.epoch = '';
7022
7042
  } else {
7023
- this.timestamp = newDate(epochOrDate).getTime();
7043
+ this.epoch = newDate(epochOrDate).getTime();
7024
7044
  }
7025
7045
  }
7026
7046
 
@@ -7093,11 +7113,11 @@ class RawDateFieldClass extends BaseInputClass$b {
7093
7113
  return this.getAttribute('opened') === 'true';
7094
7114
  }
7095
7115
 
7096
- // returns the input's value as a timestamp
7116
+ // returns the input's value as a epoch
7097
7117
  get displayValueEpoch() {
7098
7118
  const date = formats[this.format].getDate(this.inputElement.value);
7099
7119
 
7100
- if (!isValidTimestamp(date?.getTime())) {
7120
+ if (!isValidEpoch(date?.getTime())) {
7101
7121
  return null;
7102
7122
  }
7103
7123
 
@@ -7145,15 +7165,15 @@ class RawDateFieldClass extends BaseInputClass$b {
7145
7165
  if (this.isInvalidDate()) {
7146
7166
  return '';
7147
7167
  }
7148
- return this.timestamp;
7168
+ return this.epoch;
7149
7169
  }
7150
7170
 
7151
7171
  set value(val) {
7152
7172
  if (val) {
7153
- this.updateTimestamp(val);
7173
+ this.updateEpoch(val);
7154
7174
  this.updateDateCounters(newDate(val));
7155
7175
  } else {
7156
- this.updateTimestamp('');
7176
+ this.updateEpoch('');
7157
7177
  }
7158
7178
  }
7159
7179
 
@@ -7169,6 +7189,10 @@ class RawDateFieldClass extends BaseInputClass$b {
7169
7189
  return this.getAttribute('disable-calendar') === 'true';
7170
7190
  }
7171
7191
 
7192
+ get isUtcTime() {
7193
+ return this.getAttribute('utc-time') === 'true';
7194
+ }
7195
+
7172
7196
  get isSelectAll() {
7173
7197
  const inputEle = this.inputElement.baseElement.inputElement;
7174
7198
  return inputEle.value.length === inputEle.selectionStart + inputEle.selectionEnd;
@@ -7183,7 +7207,7 @@ class RawDateFieldClass extends BaseInputClass$b {
7183
7207
  }
7184
7208
 
7185
7209
  updateInputDisplay() {
7186
- this.inputElement.value = formatTimestamp(newDate(this.countersValue).getTime(), this.format);
7210
+ this.inputElement.value = formatEpoch(newDate(this.countersValue).getTime(), this.format);
7187
7211
  }
7188
7212
 
7189
7213
  init() {
@@ -7374,7 +7398,7 @@ class RawDateFieldClass extends BaseInputClass$b {
7374
7398
 
7375
7399
  const calendarDate = newDate(this.calendar.value);
7376
7400
 
7377
- this.value = calendarDate.getTime();
7401
+ this.value = dateToEpoch(calendarDate, this.isUtcTime);
7378
7402
 
7379
7403
  this.getCounterById('year').replaceValue(calendarDate.getFullYear());
7380
7404
  this.getCounterById('month').replaceValue(calendarDate.getMonth() + 1);
@@ -7388,17 +7412,17 @@ class RawDateFieldClass extends BaseInputClass$b {
7388
7412
 
7389
7413
  updateCalendarView() {
7390
7414
  const validInputVal =
7391
- isValidTimestamp(newDate(this.inputElement.value || '').getTime()) &&
7415
+ isValidEpoch(newDate(this.inputElement.value || '').getTime()) &&
7392
7416
  formats[this.format].validate(this.inputElement.value);
7393
7417
 
7394
7418
  if (this.displayValueEpoch || validInputVal) {
7395
7419
  this.calendar.setAttribute(
7396
7420
  'initial-value',
7397
- formatTimestamp(this.displayValueEpoch || this.timestamp, NATIVE_FORMAT)
7421
+ formatEpoch(this.displayValueEpoch || this.epoch, NATIVE_FORMAT)
7398
7422
  );
7399
7423
  } else {
7400
7424
  this.calendar.clearValue();
7401
- this.calendar.setAttribute('preview', formatTimestamp(getCurrentTime(), NATIVE_FORMAT));
7425
+ this.calendar.setAttribute('preview', formatEpoch(getCurrentTime(), NATIVE_FORMAT));
7402
7426
  }
7403
7427
 
7404
7428
  forwardAttrs$1(this, this.calendar, {
@@ -7714,12 +7738,22 @@ class RawDateFieldClass extends BaseInputClass$b {
7714
7738
  year: '',
7715
7739
  };
7716
7740
 
7741
+ if (!this.epoch) {
7742
+ return ret;
7743
+ }
7744
+
7717
7745
  try {
7718
- const date = newDate(this.timestamp);
7746
+ const date = newDate(this.epoch);
7719
7747
 
7720
- ret.month = date.getMonth() + 1;
7721
- ret.day = date.getDate();
7722
- ret.year = date.getFullYear();
7748
+ if (this.isUtcTime) {
7749
+ ret.month = date.getUTCMonth() + 1;
7750
+ ret.day = date.getUTCDate();
7751
+ ret.year = date.getUTCFullYear();
7752
+ } else {
7753
+ ret.month = date.getMonth() + 1;
7754
+ ret.day = date.getDate();
7755
+ ret.year = date.getFullYear();
7756
+ }
7723
7757
  } catch (e) {}
7724
7758
 
7725
7759
  return ret;
@@ -7763,7 +7797,7 @@ class RawDateFieldClass extends BaseInputClass$b {
7763
7797
  const validDate = parseDateString(pastedData, this.format);
7764
7798
 
7765
7799
  if (validDate) {
7766
- this.value = validDate.getTime();
7800
+ this.value = dateToEpoch(validDate, this.isUtcTime);
7767
7801
  this.onDateCounterChange();
7768
7802
 
7769
7803
  // select all
@@ -14658,10 +14692,6 @@ const multiSelectComboBoxMixin = (superclass) =>
14658
14692
 
14659
14693
  this.setGetValidity();
14660
14694
 
14661
- this.setComboBoxDescriptor();
14662
-
14663
- this.#overrideOverlaySettings();
14664
-
14665
14695
  this.#handleCustomValues();
14666
14696
 
14667
14697
  this.renderItems();
@@ -14674,6 +14704,14 @@ const multiSelectComboBoxMixin = (superclass) =>
14674
14704
  // tries to override it, causing us to lose the user set placeholder.
14675
14705
  forwardAttrs$1(this, this.baseElement, { includeAttrs: ['placeholder'] });
14676
14706
 
14707
+ // This is a workaround for a problem we have in Console App, where in ScreenBuilder - the inputElement is not ready when trying to
14708
+ // set the component's descriptor and override the overlay settings.
14709
+ // THIS IS A PROBLEM WITH THE CONSOLE APP THAT NEEDS TO BE RESOLVED. Until then, we use this workaround.
14710
+ setTimeout(() => {
14711
+ this.setComboBoxDescriptor();
14712
+ this.#overrideOverlaySettings();
14713
+ });
14714
+
14677
14715
  this.setDefaultValues();
14678
14716
 
14679
14717
  this.baseElement.addEventListener('selected-items-changed', () => {