@syncfusion/ej2-splitbuttons 23.1.43 → 24.1.41

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.
@@ -346,6 +346,8 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
346
346
  content: this.target ? this.getTargetElement() : '',
347
347
  enableRtl: this.enableRtl
348
348
  });
349
+ this.dropDown.element.setAttribute('role', 'dialog');
350
+ this.dropDown.element.setAttribute('aria-label', 'dropdown menu');
349
351
  if (!isNullOrUndefined(this.popupContent)) {
350
352
  this.popupContent.style.display = '';
351
353
  }
@@ -387,7 +389,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
387
389
  li = this.createElement('li', {
388
390
  innerHTML: item.url ? '' : tempItem,
389
391
  className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
390
- attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
392
+ attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1', 'aria-label': 'separator', 'aria-hidden': 'true' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
391
393
  id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
392
394
  });
393
395
  if (this.enableHtmlSanitizer) {
@@ -579,6 +581,12 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
579
581
  }
580
582
  EventHandler.add(this.element, 'click', this.clickHandler, this);
581
583
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
584
+ EventHandler.add(window, 'resize', this.windowResize, this);
585
+ };
586
+ DropDownButton.prototype.windowResize = function () {
587
+ if (!this.canOpen() && this.dropDown) {
588
+ this.dropDown.refreshPosition(this.element);
589
+ }
582
590
  };
583
591
  DropDownButton.prototype.popupWireEvents = function () {
584
592
  if (!this.delegateMousedownHandler) {
@@ -848,6 +856,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
848
856
  EventHandler.remove(this.getPopUpElement(), 'click', this.clickHandler);
849
857
  EventHandler.remove(this.getPopUpElement(), 'keydown', this.keyBoardHandler);
850
858
  }
859
+ EventHandler.remove(window, 'resize', this.windowResize);
851
860
  };
852
861
  /**
853
862
  * Called internally if any of the property value changed.
@@ -1252,13 +1261,20 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
1252
1261
  this.unWireEvents();
1253
1262
  }
1254
1263
  }
1255
- this.wrapper = null;
1256
1264
  this.primaryBtnObj.destroy();
1257
1265
  this.secondaryBtnObj.destroy();
1258
1266
  _super.prototype.destroy.call(this);
1259
- if (!this.element.getAttribute('class')) {
1267
+ if (this.element && !this.element.getAttribute('class')) {
1260
1268
  this.element.removeAttribute('class');
1261
1269
  }
1270
+ if (this.refreshing && this.isAngular) {
1271
+ this.element = this.wrapper;
1272
+ ['e-control', 'e-split-btn', 'e-lib'].forEach(function (key) {
1273
+ _this.element.classList.add(key);
1274
+ });
1275
+ setValue('ej2_instances', [this], this.element);
1276
+ }
1277
+ this.wrapper = null;
1262
1278
  };
1263
1279
  SplitButton.prototype.wireEvents = function () {
1264
1280
  EventHandler.add(this.element, 'click', this.primaryBtnClickHandler, this);
@@ -1913,7 +1929,7 @@ var ProgressButton = /** @__PURE__ @class */ (function (_super) {
1913
1929
  };
1914
1930
  ProgressButton.prototype.setAria = function () {
1915
1931
  attributes(this.element, {
1916
- 'aria-label': this.element.textContent + ' progress', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': '0'
1932
+ 'aria-label': this.element.textContent + ' progress'
1917
1933
  });
1918
1934
  };
1919
1935
  ProgressButton.prototype.wireEvents = function () {