@syncfusion/ej2-inputs 32.2.5 → 32.2.7

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 32.2.5
3
+ * version : 32.2.7
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-inputs",
3
- "version": "32.2.5",
3
+ "version": "32.2.7",
4
4
  "description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,10 +8,10 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-inputs.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~32.2.3",
12
- "@syncfusion/ej2-buttons": "~32.2.3",
13
- "@syncfusion/ej2-popups": "~32.2.5",
14
- "@syncfusion/ej2-splitbuttons": "~32.2.3"
11
+ "@syncfusion/ej2-base": "~32.2.6",
12
+ "@syncfusion/ej2-buttons": "~32.2.7",
13
+ "@syncfusion/ej2-popups": "~32.2.7",
14
+ "@syncfusion/ej2-splitbuttons": "~32.2.7"
15
15
  },
16
16
  "devDependencies": {},
17
17
  "keywords": [
@@ -209,6 +209,7 @@ export declare class ColorPicker extends Component<HTMLInputElement> implements
209
209
  private onOpen;
210
210
  private getPopupInst;
211
211
  private bindCallBackEvent;
212
+ protected getAppendToElement(): HTMLElement;
212
213
  private onPopupClose;
213
214
  private createPalette;
214
215
  private renderRecentColor;
@@ -202,6 +202,9 @@ var ColorPicker = /** @class */ (function (_super) {
202
202
  }
203
203
  });
204
204
  this.splitBtn.createElement = this.createElement;
205
+ if (this.isAngular) {
206
+ this.splitBtn.isAngular = this.isAngular;
207
+ }
205
208
  this.splitBtn.appendTo(splitButton);
206
209
  this.splitBtn.element.setAttribute('aria-label', 'colorpicker');
207
210
  var preview = this.createElement('span', { className: SPLITPREVIEW });
@@ -275,8 +278,9 @@ var ColorPicker = /** @class */ (function (_super) {
275
278
  _this.modal = _this.createElement('div');
276
279
  _this.modal.className = 'e-' + _this.getModuleName() + ' e-modal';
277
280
  _this.modal.style.display = 'none';
278
- document.body.insertBefore(_this.modal, popupEle);
279
- document.body.className += ' e-colorpicker-overflow';
281
+ var appendToElement = _this.getAppendToElement();
282
+ appendToElement.insertBefore(_this.modal, popupEle);
283
+ appendToElement.className += ' e-colorpicker-overflow';
280
284
  _this.modal.style.display = 'block';
281
285
  _this.modal.style.zIndex = (Number(popupEle.style.zIndex) - 1).toString();
282
286
  }
@@ -310,6 +314,16 @@ var ColorPicker = /** @class */ (function (_super) {
310
314
  return callBackPromise;
311
315
  };
312
316
  };
317
+ ColorPicker.prototype.getAppendToElement = function () {
318
+ if (this.isAngular) {
319
+ var cdkPane = this.element.closest('.cdk-overlay-pane');
320
+ var popoverEl = this.element.closest('[popover]');
321
+ if (cdkPane && popoverEl) {
322
+ return cdkPane;
323
+ }
324
+ }
325
+ return document.body;
326
+ };
313
327
  ColorPicker.prototype.onPopupClose = function () {
314
328
  this.unWireEvents();
315
329
  this.destroyOtherComp();
@@ -319,7 +333,8 @@ var ColorPicker = /** @class */ (function (_super) {
319
333
  this.container.innerHTML = '';
320
334
  removeClass([this.container], [PICKERCONTENT, PALETTECONTENT]);
321
335
  if (Browser.isDevice && this.modal) {
322
- removeClass([document.body], 'e-colorpicker-overflow');
336
+ var appendToElement = this.getAppendToElement();
337
+ removeClass([appendToElement], 'e-colorpicker-overflow');
323
338
  this.modal.style.display = 'none';
324
339
  this.modal.outerHTML = '';
325
340
  this.modal = null;
@@ -1524,6 +1539,10 @@ var ColorPicker = /** @class */ (function (_super) {
1524
1539
  this.unWireEvents();
1525
1540
  this.destroyOtherComp();
1526
1541
  }
1542
+ this.splitBtn.beforeClose = null;
1543
+ this.splitBtn.beforeOpen = null;
1544
+ this.splitBtn.click = null;
1545
+ this.splitBtn.open = null;
1527
1546
  this.splitBtn.destroy();
1528
1547
  this.splitBtn = null;
1529
1548
  }
@@ -31,6 +31,7 @@ export declare abstract class SignatureBase extends Component<HTMLCanvasElement>
31
31
  private tempCanvas;
32
32
  private tempContext;
33
33
  private canRedraw;
34
+ private boundResizeHandler;
34
35
  /**
35
36
  * Gets or sets the background color of the component.
36
37
  *
@@ -65,7 +65,8 @@ var SignatureBase = /** @class */ (function (_super) {
65
65
  if (isNullOrUndefined(this.pointColl) && !this.isReadOnly && !this.disabled) {
66
66
  EventHandler.add(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler, this);
67
67
  EventHandler.add(this.canvasContext.canvas, 'keydown', this.keyboardHandler, this);
68
- window.addEventListener('resize', this.resizeHandler.bind(this));
68
+ this.boundResizeHandler = this.resizeHandler.bind(this);
69
+ window.addEventListener('resize', this.boundResizeHandler);
69
70
  }
70
71
  else if (this.pointColl) {
71
72
  EventHandler.add(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler, this);
@@ -86,7 +87,10 @@ var SignatureBase = /** @class */ (function (_super) {
86
87
  EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
87
88
  EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
88
89
  }
89
- window.removeEventListener('resize', this.resizeHandler);
90
+ if (this.boundResizeHandler) {
91
+ window.removeEventListener('resize', this.boundResizeHandler);
92
+ this.boundResizeHandler = null;
93
+ }
90
94
  }
91
95
  };
92
96
  SignatureBase.prototype.setHTMLProperties = function () {
@@ -109,8 +109,9 @@ var MaskedTextBox = /** @class */ (function (_super) {
109
109
  this.element.classList.remove('e-control', 'e-maskedtextbox');
110
110
  this.element.classList.add('e-mask-container');
111
111
  this.element.appendChild(input);
112
+ setValue('ej2_instances', ejInstance, input);
113
+ setValue('ej2_instances', null, this.element);
112
114
  this.element = input;
113
- setValue('ej2_instances', ejInstance, this.element);
114
115
  }
115
116
  this.updateHTMLAttrToElement();
116
117
  this.checkHtmlAttributes(false);
@@ -95,8 +95,9 @@ var NumericTextBox = /** @class */ (function (_super) {
95
95
  }
96
96
  this.element.classList.remove('e-control', 'e-numerictextbox');
97
97
  this.element.appendChild(input);
98
+ setValue('ej2_instances', ejInstance, input);
99
+ setValue('ej2_instances', null, this.element);
98
100
  this.element = input;
99
- setValue('ej2_instances', ejInstance, this.element);
100
101
  }
101
102
  attributes(this.element, { 'role': 'spinbutton', 'tabindex': '0', 'autocomplete': 'off' });
102
103
  var localeText = {
@@ -219,8 +219,9 @@ var TextArea = /** @class */ (function (_super) {
219
219
  }
220
220
  }
221
221
  this.element.appendChild(inputElement);
222
+ setValue('ej2_instances', ejInstance, inputElement);
223
+ setValue('ej2_instances', null, this.element);
222
224
  this.element = inputElement;
223
- setValue('ej2_instances', ejInstance, this.element);
224
225
  }
225
226
  this.updateHTMLAttributesToElement();
226
227
  this.checkAttributes(false);
@@ -195,8 +195,9 @@ var TextBox = /** @class */ (function (_super) {
195
195
  }
196
196
  }
197
197
  this.element.appendChild(inputElement);
198
+ setValue('ej2_instances', ejInstance, inputElement);
199
+ setValue('ej2_instances', null, this.element);
198
200
  this.element = inputElement;
199
- setValue('ej2_instances', ejInstance, this.element);
200
201
  }
201
202
  this.updateHTMLAttributesToElement();
202
203
  this.checkAttributes(false);
@@ -525,6 +525,7 @@ export declare class Uploader extends Component<HTMLInputElement> implements INo
525
525
  private isFirstFileOnSelection;
526
526
  private dragCounter;
527
527
  private isPreloadFiles;
528
+ private documentClickHandler;
528
529
  /**
529
530
  * Get the file item(li) which are shown in file list.
530
531
  *
@@ -353,8 +353,10 @@ var Uploader = /** @class */ (function (_super) {
353
353
  inputElement.setAttribute('name', 'UploadFiles');
354
354
  }
355
355
  this.element.appendChild(inputElement);
356
+ setValue('ej2_instances', ejInstance, inputElement);
357
+ // Clear reference from this.element to avoid retaining component instance
358
+ setValue('ej2_instances', null, this.element);
356
359
  this.element = inputElement;
357
- setValue('ej2_instances', ejInstance, this.element);
358
360
  }
359
361
  /* istanbul ignore next */
360
362
  if (ejInstance[0].isPureReactComponent) {
@@ -745,7 +747,8 @@ var Uploader = /** @class */ (function (_super) {
745
747
  Uploader.prototype.wireEvents = function () {
746
748
  EventHandler.add(this.browseButton, 'click', this.browseButtonClick, this);
747
749
  EventHandler.add(this.element, 'change', this.onSelectFiles, this);
748
- EventHandler.add(document, 'click', this.removeFocus, this);
750
+ this.documentClickHandler = this.removeFocus.bind(this);
751
+ EventHandler.add(document, 'click', this.documentClickHandler);
749
752
  this.keyboardModule = new KeyboardEvents(this.uploadWrapper, {
750
753
  keyAction: this.keyActionHandler.bind(this),
751
754
  keyConfigs: this.keyConfigs,
@@ -758,7 +761,10 @@ var Uploader = /** @class */ (function (_super) {
758
761
  Uploader.prototype.unWireEvents = function () {
759
762
  EventHandler.remove(this.browseButton, 'click', this.browseButtonClick);
760
763
  EventHandler.remove(this.element, 'change', this.onSelectFiles);
761
- EventHandler.remove(document, 'click', this.removeFocus);
764
+ if (this.documentClickHandler) {
765
+ EventHandler.remove(document, 'click', this.documentClickHandler);
766
+ this.documentClickHandler = null;
767
+ }
762
768
  if (this.isForm) {
763
769
  EventHandler.remove(this.formElement, 'reset', this.resetForm);
764
770
  }