@syncfusion/ej2-inputs 26.1.39 → 26.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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.1.39
3
+ * version : 26.1.41
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-inputs@*",
3
- "_id": "@syncfusion/ej2-inputs@26.1.38",
3
+ "_id": "@syncfusion/ej2-inputs@26.1.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-CzxeAQnytAW+YbMVo82W8Ew9Z2f7Cx7k5p4DSvdUUnX42ELTiDHJAgmWBvbiKd/N8TLZjIyARWVlkuAKDPb6Iw==",
5
+ "_integrity": "sha512-KaNx6fmmtXQCaVBAO/gkzVBI6GFjrKVk2yJTT9+QGP6r94OSVNhhgqrgSfOCPU/ifrD3FoSa2NSCysPwsvefUg==",
6
6
  "_location": "/@syncfusion/ej2-inputs",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -39,8 +39,8 @@
39
39
  "/@syncfusion/ej2-schedule",
40
40
  "/@syncfusion/ej2-vue-inputs"
41
41
  ],
42
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-26.1.38.tgz",
43
- "_shasum": "09672591ff610b232b0ea3140db081747ff8ccf2",
42
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-26.1.40.tgz",
43
+ "_shasum": "212812143e561c5383ba6a4f1afb31ab106b1979",
44
44
  "_spec": "@syncfusion/ej2-inputs@*",
45
45
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
46
46
  "author": {
@@ -49,8 +49,8 @@
49
49
  "bundleDependencies": false,
50
50
  "dependencies": {
51
51
  "@syncfusion/ej2-base": "~26.1.37",
52
- "@syncfusion/ej2-buttons": "~26.1.35",
53
- "@syncfusion/ej2-popups": "~26.1.38",
52
+ "@syncfusion/ej2-buttons": "~26.1.40",
53
+ "@syncfusion/ej2-popups": "~26.1.41",
54
54
  "@syncfusion/ej2-splitbuttons": "~26.1.35"
55
55
  },
56
56
  "deprecated": false,
@@ -119,7 +119,7 @@
119
119
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/inputs"
120
120
  },
121
121
  "typings": "index.d.ts",
122
- "version": "26.1.39",
122
+ "version": "26.1.41",
123
123
  "sideEffects": false,
124
124
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
125
125
  }
@@ -279,6 +279,10 @@ export interface ValidArgs {
279
279
  * Returns the current form element.
280
280
  */
281
281
  formElement?: HTMLFormElement;
282
+ /**
283
+ * Returns the date format mapped for the input.
284
+ */
285
+ format?: string;
282
286
  }
283
287
  export interface FormEventArgs {
284
288
  /**
@@ -649,7 +649,8 @@ var FormValidator = /** @class */ (function (_super) {
649
649
  var params = this.rules["" + name]["" + rule];
650
650
  var param = (params instanceof Array && typeof params[1] === 'string') ? params[0] : params;
651
651
  var currentRule = this.rules["" + name]["" + rule];
652
- var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element };
652
+ var dateFormat = ((rule === 'min' || rule === 'max') && this.rules["" + name].date && typeof (this.rules["" + name].date) === 'string') ? this.rules["" + name].date : null;
653
+ var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
653
654
  this.trigger('validationBegin', args);
654
655
  if (!args.param && rule === 'required') {
655
656
  return true;
@@ -846,7 +847,16 @@ var FormValidator = /** @class */ (function (_super) {
846
847
  return +option.value <= +option.param;
847
848
  }
848
849
  // Maximum rule validation for date
849
- return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
850
+ if (option.format && option.format !== '') {
851
+ var globalize = new Internationalization;
852
+ var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
853
+ var dateValue = globalize.parseDate(option.value, dateOptions);
854
+ var maxValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
855
+ return new Date(dateValue).getTime() <= new Date(maxValue).getTime();
856
+ }
857
+ else {
858
+ return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
859
+ }
850
860
  },
851
861
  min: function (option) {
852
862
  if (!isNaN(Number(option.value))) {
@@ -859,7 +869,16 @@ var FormValidator = /** @class */ (function (_super) {
859
869
  }
860
870
  else {
861
871
  // Minimum rule validation for date
862
- return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
872
+ if (option.format && option.format !== '') {
873
+ var globalize = new Internationalization;
874
+ var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
875
+ var dateValue = globalize.parseDate(option.value, dateOptions);
876
+ var minValue = (typeof (option.param) === 'string') ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
877
+ return new Date(dateValue).getTime() >= new Date(minValue).getTime();
878
+ }
879
+ else {
880
+ return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
881
+ }
863
882
  }
864
883
  },
865
884
  regex: function (option) {
@@ -147,7 +147,7 @@ export var Input;
147
147
  function checkInputValue(floatLabelType, inputElement) {
148
148
  var inputValue = inputElement.value;
149
149
  var inputParent = inputElement.parentElement;
150
- var grandParent = inputParent.parentElement;
150
+ var grandParent = inputParent && inputParent.parentElement;
151
151
  if (inputValue !== '' && !isNullOrUndefined(inputValue)) {
152
152
  if (inputParent && inputParent.classList.contains('e-input-group')) {
153
153
  inputParent.classList.add('e-valid-input');
@@ -572,7 +572,7 @@ export var Input;
572
572
  return;
573
573
  }
574
574
  var elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'), 10);
575
- if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
575
+ if (!isNullOrUndefined(container) && !isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
576
576
  if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
577
577
  container.getElementsByClassName('e-float-text-content')[0].classList.remove('e-float-text-overflow');
578
578
  }
@@ -616,7 +616,7 @@ export var Input;
616
616
  if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
617
617
  if (!isNullOrUndefined(placeholder) && placeholder !== '') {
618
618
  var floatTextContent = parentElement.getElementsByClassName('e-float-text-content')[0];
619
- if (floatTextContent) {
619
+ if (floatTextContent && floatTextContent.children[0]) {
620
620
  floatTextContent.children[0].textContent = placeholder;
621
621
  }
622
622
  else {
@@ -453,9 +453,9 @@ var Uploader = /** @class */ (function (_super) {
453
453
  this.element.setAttribute('tabindex', '-1');
454
454
  this.actionButtons = this.createElement('div', { className: ACTION_BUTTONS });
455
455
  this.uploadButton = this.createElement('button', { className: UPLOAD_BUTTONS,
456
- attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
456
+ attrs: { 'type': 'button', 'tabindex': this.btnTabIndex, 'aria-label': this.localizedTexts('Upload') } });
457
457
  this.clearButton = this.createElement('button', { className: CLEAR_BUTTONS,
458
- attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
458
+ attrs: { 'type': 'button', 'tabindex': this.btnTabIndex, 'aria-label': this.localizedTexts('Clear') } });
459
459
  this.actionButtons.appendChild(this.clearButton);
460
460
  this.actionButtons.appendChild(this.uploadButton);
461
461
  this.renderButtonTemplates();
@@ -970,6 +970,9 @@ var Uploader = /** @class */ (function (_super) {
970
970
  else if (!closest(args.target, '.' + SPINNER_PANE)) {
971
971
  this.remove(fileData, false, false, true, args);
972
972
  }
973
+ if (this.isForm && liElement && liElement.classList.contains(INVALID_FILE)) {
974
+ this.element.value = '';
975
+ }
973
976
  this.checkActionButtonStatus();
974
977
  };
975
978
  Uploader.prototype.removeFilesData = function (file, customTemplate) {
@@ -1824,6 +1827,7 @@ var Uploader = /** @class */ (function (_super) {
1824
1827
  }
1825
1828
  if (!iconElement.classList.contains(DELETE_ICON)) {
1826
1829
  iconElement.classList.add(REMOVE_ICON);
1830
+ iconElement.setAttribute('aria-label', this.localizedTexts('remove'));
1827
1831
  }
1828
1832
  var index = fileData.indexOf(listItem);
1829
1833
  var eventArgs = {
@@ -2081,6 +2085,7 @@ var Uploader = /** @class */ (function (_super) {
2081
2085
  this.pauseButton = this.createElement('span', { className: 'e-icons e-file-reload-btn', attrs: { 'tabindex': this.btnTabIndex } });
2082
2086
  deleteIcon.parentElement.insertBefore(this.pauseButton, deleteIcon);
2083
2087
  this.pauseButton.setAttribute('title', this.localizedTexts('retry'));
2088
+ this.pauseButton.setAttribute('aria-label', this.localizedTexts('retry'));
2084
2089
  var retryElement = liElement.querySelector('.' + RETRY_ICON);
2085
2090
  /* istanbul ignore next */
2086
2091
  retryElement.addEventListener('click', function (e) {
@@ -2120,6 +2125,7 @@ var Uploader = /** @class */ (function (_super) {
2120
2125
  if (!isNullOrUndefined(iconEle)) {
2121
2126
  iconEle.classList.add(DELETE_ICON);
2122
2127
  iconEle.setAttribute('title', this.localizedTexts('delete'));
2128
+ iconEle.setAttribute('aria-label', this.localizedTexts('delete'));
2123
2129
  iconEle.classList.remove(ABORT_ICON);
2124
2130
  iconEle.classList.remove(UPLOAD_INPROGRESS);
2125
2131
  }
@@ -2158,7 +2164,7 @@ var Uploader = /** @class */ (function (_super) {
2158
2164
  }
2159
2165
  this.trigger('success', args, function (args) {
2160
2166
  _this.updateStatus(file, args.statusText, '2');
2161
- _this.uploadedFilesData.push(file);
2167
+ _this.multiple ? _this.uploadedFilesData.push(file) : _this.uploadedFilesData = [file];
2162
2168
  _this.trigger('change', { file: _this.uploadedFilesData });
2163
2169
  _this.checkActionButtonStatus();
2164
2170
  if (_this.fileList.length > 0) {
@@ -238,7 +238,7 @@ $float-label-disbale-font-color: $input-disable-font-color !default;
238
238
  $input-placeholder-color: $placeholder-text-color !default;
239
239
  $input-group-disabled-color: $icon-color-disabled !default;
240
240
  $input-group-hovered-color: $icon-color-hover !default;
241
- $input-readonly-bg-color: none !default;
241
+ $input-readonly-bg-color: $content-bg-color-alt1 !default;
242
242
  $input-readonly-color: $cool-gray-600 !default;
243
243
  $input-icon-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) !default;
244
244
  $input-border-shadow: 0 0 0 3px rgba($primary, .25) !default;
@@ -3620,7 +3620,7 @@ textarea.e-input,
3620
3620
  .e-float-input.e-control-wrapper input[readonly],
3621
3621
  .e-float-input textarea[readonly],
3622
3622
  .e-float-input.e-control-wrapper textarea[readonly] {
3623
- background: none;
3623
+ background: #232e3e;
3624
3624
  color: inherit;
3625
3625
  }
3626
3626
 
@@ -3620,7 +3620,7 @@ textarea.e-input,
3620
3620
  .e-float-input.e-control-wrapper input[readonly],
3621
3621
  .e-float-input textarea[readonly],
3622
3622
  .e-float-input.e-control-wrapper textarea[readonly] {
3623
- background: none;
3623
+ background: #f9fafb;
3624
3624
  color: inherit;
3625
3625
  }
3626
3626
 
@@ -3630,7 +3630,7 @@ textarea.e-input,
3630
3630
  .e-float-input.e-control-wrapper input[readonly],
3631
3631
  .e-float-input textarea[readonly],
3632
3632
  .e-float-input.e-control-wrapper textarea[readonly] {
3633
- background: none;
3633
+ background: #232e3e;
3634
3634
  color: inherit;
3635
3635
  }
3636
3636
 
@@ -3630,7 +3630,7 @@ textarea.e-input,
3630
3630
  .e-float-input.e-control-wrapper input[readonly],
3631
3631
  .e-float-input textarea[readonly],
3632
3632
  .e-float-input.e-control-wrapper textarea[readonly] {
3633
- background: none;
3633
+ background: #f9fafb;
3634
3634
  color: inherit;
3635
3635
  }
3636
3636