@syncfusion/ej2-schedule 22.2.5 → 22.2.11

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.
@@ -361,7 +361,7 @@ function getDateFromString(date) {
361
361
  /** @private */
362
362
  let scrollWidth = null;
363
363
  /** @private */
364
- let pixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
364
+ let pixelRatio = null;
365
365
  /**
366
366
  * Method to get scrollbar width
367
367
  *
@@ -372,6 +372,9 @@ function getScrollBarWidth() {
372
372
  if (scrollWidth !== null) {
373
373
  return scrollWidth;
374
374
  }
375
+ if (pixelRatio === null) {
376
+ pixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
377
+ }
375
378
  const divNode = createElement('div');
376
379
  let value = 0;
377
380
  divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';
@@ -389,7 +392,7 @@ function getScrollBarWidth() {
389
392
  */
390
393
  function resetScrollbarWidth() {
391
394
  const zoomPixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
392
- if (pixelRatio != zoomPixelRatio) {
395
+ if (pixelRatio && pixelRatio !== zoomPixelRatio) {
393
396
  scrollWidth = null;
394
397
  pixelRatio = zoomPixelRatio;
395
398
  }
@@ -8873,7 +8876,7 @@ class QuickPopups {
8873
8876
  this.renderQuickDialog();
8874
8877
  }
8875
8878
  renderQuickPopup() {
8876
- const quickPopupWrapper = createElement('div', { className: POPUP_WRAPPER_CLASS + ' e-popup-close' });
8879
+ const quickPopupWrapper = createElement('div', { className: POPUP_WRAPPER_CLASS + ' e-popup-close', attrs: { role: 'dialog' } });
8877
8880
  if (this.parent.isAdaptive) {
8878
8881
  document.body.appendChild(quickPopupWrapper);
8879
8882
  addClass([quickPopupWrapper], DEVICE_CLASS);
@@ -9289,6 +9292,7 @@ class QuickPopups {
9289
9292
  quickCellPopup.appendChild(this.getPopupHeader('Cell', temp));
9290
9293
  quickCellPopup.appendChild(this.getPopupContent('Cell', args, temp));
9291
9294
  quickCellPopup.appendChild(this.getPopupFooter('Cell', temp));
9295
+ this.quickPopup.element.setAttribute('aria-label', this.l10n.getConstant('newEvent'));
9292
9296
  const subjectElement = quickCellPopup.querySelector('.' + SUBJECT_CLASS);
9293
9297
  if (subjectElement) {
9294
9298
  Input.createInput({ element: subjectElement, properties: { placeholder: this.l10n.getConstant('addTitle') } });
@@ -9360,6 +9364,7 @@ class QuickPopups {
9360
9364
  quickEventPopup.appendChild(this.getPopupHeader('Event', eventData));
9361
9365
  quickEventPopup.appendChild(this.getPopupContent('Event', events, eventData));
9362
9366
  quickEventPopup.appendChild(this.getPopupFooter('Event', eventData));
9367
+ this.quickPopup.element.setAttribute('aria-label', this.l10n.getConstant('editEvent'));
9363
9368
  const readonly = this.parent.activeViewOptions.readonly || eventData[this.parent.eventFields.isReadonly];
9364
9369
  const editAction = !this.parent.eventSettings.allowEditing || readonly;
9365
9370
  const deleteAction = !this.parent.eventSettings.allowDeleting || readonly;
@@ -26485,6 +26490,19 @@ class ICalendarImport {
26485
26490
  const events = [];
26486
26491
  const uId = 'UID';
26487
26492
  const calArray = iCalString.replace(new RegExp('\\r', 'g'), '').split('\n');
26493
+ const descriptionIndex = calArray.findIndex((line) => line.startsWith('DESCRIPTION:'));
26494
+ if (descriptionIndex !== -1) {
26495
+ let description = calArray[descriptionIndex].substring('DESCRIPTION:'.length);
26496
+ for (let i = descriptionIndex + 1; i < calArray.length; i++) {
26497
+ if (calArray[i].startsWith(' ') || !(/[A-Z]{3}:/.test(calArray[i]))) {
26498
+ description += calArray[i];
26499
+ }
26500
+ else {
26501
+ calArray[descriptionIndex] = 'DESCRIPTION:' + description;
26502
+ break;
26503
+ }
26504
+ }
26505
+ }
26488
26506
  let isEvent = false;
26489
26507
  let curEvent;
26490
26508
  // eslint-disable-next-line prefer-const
@@ -26552,7 +26570,10 @@ class ICalendarImport {
26552
26570
  curEvent[fields.location] = value;
26553
26571
  break;
26554
26572
  case 'DESCRIPTION':
26555
- curEvent[fields.description] = value;
26573
+ if (!(curEvent[fields.description])) {
26574
+ curEvent[fields.description] = value.replace(/\\,/g, ',')
26575
+ .replace(/\\n/g, '\n');
26576
+ }
26556
26577
  break;
26557
26578
  case 'ISREADONLY':
26558
26579
  curEvent[fields.isReadonly] = (value.indexOf('true') > -1);