@syncfusion/ej2-inplace-editor 20.4.54 → 21.1.35
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/CHANGELOG.md +2 -0
- package/dist/ej2-inplace-editor.min.js +1 -1
- package/dist/ej2-inplace-editor.umd.min.js +1 -1
- package/dist/ej2-inplace-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es2015.js +4 -35
- package/dist/es6/ej2-inplace-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es5.js +4 -35
- package/dist/es6/ej2-inplace-editor.es5.js.map +1 -1
- package/dist/global/ej2-inplace-editor.min.js +1 -1
- package/dist/global/ej2-inplace-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +17 -17
- package/src/inplace-editor/base/inplace-editor-model.d.ts +1 -2
- package/src/inplace-editor/base/inplace-editor.js +1 -33
- package/src/inplace-editor/base/interface.d.ts +1 -0
- package/src/inplace-editor/base/models-model.d.ts +2 -0
- package/src/inplace-editor/base/models.d.ts +2 -0
- package/src/inplace-editor/base/models.js +0 -2
- package/src/inplace-editor/modules/combo-box.d.ts +2 -0
- package/src/inplace-editor/modules/combo-box.js +2 -0
- package/src/inplace-editor/modules/date-range-picker.d.ts +1 -0
- package/src/inplace-editor/modules/date-range-picker.js +1 -0
- package/styles/inplace-editor/_bootstrap-dark-definition.scss +0 -1
- package/styles/inplace-editor/_bootstrap-definition.scss +0 -1
- package/styles/inplace-editor/_bootstrap4-definition.scss +0 -1
- package/styles/inplace-editor/_bootstrap5-definition.scss +0 -2
- package/styles/inplace-editor/_fabric-dark-definition.scss +0 -1
- package/styles/inplace-editor/_fabric-definition.scss +0 -1
- package/styles/inplace-editor/_fluent-definition.scss +0 -2
- package/styles/inplace-editor/_fusionnew-definition.scss +0 -2
- package/styles/inplace-editor/_highcontrast-definition.scss +0 -1
- package/styles/inplace-editor/_highcontrast-light-definition.scss +0 -1
- package/styles/inplace-editor/_layout.scss +9 -9
- package/styles/inplace-editor/_material-dark-definition.scss +0 -1
- package/styles/inplace-editor/_material-definition.scss +0 -1
- package/styles/inplace-editor/_tailwind-definition.scss +0 -2
- package/styles/inplace-editor/_theme.scss +12 -12
- package/styles/inplace-editor/_material3-definition.scss +0 -71
|
@@ -160,7 +160,6 @@ var PopupSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
160
160
|
* @hidden
|
|
161
161
|
*/
|
|
162
162
|
var modulesList = {
|
|
163
|
-
/* eslint-disable */
|
|
164
163
|
'AutoComplete': 'auto-complete',
|
|
165
164
|
'Color': 'color-picker',
|
|
166
165
|
'ComboBox': 'combo-box',
|
|
@@ -176,7 +175,6 @@ var modulesList = {
|
|
|
176
175
|
*/
|
|
177
176
|
// eslint-disable-next-line
|
|
178
177
|
var localeConstant = {
|
|
179
|
-
/* eslint-disable */
|
|
180
178
|
'Click': { 'editAreaClick': 'Click to edit' },
|
|
181
179
|
'DblClick': { 'editAreaDoubleClick': 'Double click to edit' },
|
|
182
180
|
'EditIconClick': { 'editAreaClick': 'Click to edit' }
|
|
@@ -342,7 +340,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
342
340
|
this.updateAdaptor();
|
|
343
341
|
this.appendValueElement();
|
|
344
342
|
this.updateValue();
|
|
345
|
-
// eslint-disable-next-line
|
|
346
343
|
this.textOption === 'Never' ?
|
|
347
344
|
this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
348
345
|
: this.renderInitialValue();
|
|
@@ -357,7 +354,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
357
354
|
var allClassName = val.split(' ');
|
|
358
355
|
for (var i = 0; i < allClassName.length; i++) {
|
|
359
356
|
if (allClassName[i].trim() !== '') {
|
|
360
|
-
// eslint-disable-next-line
|
|
361
357
|
action === 'add' ? addClass([this.element], [allClassName[i]]) : removeClass([this.element], [allClassName[i]]);
|
|
362
358
|
}
|
|
363
359
|
}
|
|
@@ -399,14 +395,11 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
399
395
|
var query = isNullOrUndefined(model.query) ? new Query() : model.query;
|
|
400
396
|
if (model.dataSource instanceof DataManager) {
|
|
401
397
|
model.dataSource.executeQuery(this.getInitQuery(model, query)).then(function (e) {
|
|
402
|
-
// eslint-disable-next-line
|
|
403
398
|
_this.updateInitValue(mText, mVal, e.result);
|
|
404
399
|
});
|
|
405
400
|
}
|
|
406
401
|
else {
|
|
407
|
-
this.updateInitValue(mText, mVal, new DataManager(model.dataSource).executeLocal(
|
|
408
|
-
// eslint-disable-next-line
|
|
409
|
-
this.getInitQuery(model, query)));
|
|
402
|
+
this.updateInitValue(mText, mVal, new DataManager(model.dataSource).executeLocal(this.getInitQuery(model, query)));
|
|
410
403
|
}
|
|
411
404
|
};
|
|
412
405
|
InPlaceEditor.prototype.getInitQuery = function (model, query) {
|
|
@@ -426,7 +419,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
426
419
|
}
|
|
427
420
|
return query.where(predicate);
|
|
428
421
|
};
|
|
429
|
-
// eslint-disable-next-line
|
|
430
422
|
InPlaceEditor.prototype.updateInitValue = function (mText, mVal, result) {
|
|
431
423
|
if (result.length <= 0) {
|
|
432
424
|
return;
|
|
@@ -446,7 +438,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
446
438
|
this.valueWrap.classList.remove(LOAD);
|
|
447
439
|
};
|
|
448
440
|
InPlaceEditor.prototype.renderValue = function (val) {
|
|
449
|
-
// eslint-disable-next-line
|
|
450
441
|
this.enableHtmlSanitizer && this.type !== 'RTE' && this.type !== 'MultiSelect' ? this.valueEle.innerText = val :
|
|
451
442
|
(this.valueEle.innerHTML = this.enableHtmlParse ? val : encode(val));
|
|
452
443
|
if (this.type === 'Color') {
|
|
@@ -474,7 +465,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
474
465
|
if (this.beginEditArgs.cancel) {
|
|
475
466
|
return;
|
|
476
467
|
}
|
|
477
|
-
// eslint-disable-next-line
|
|
478
468
|
var tipOptions = undefined;
|
|
479
469
|
var target = select('.' + VALUE_WRAPPER, this.element);
|
|
480
470
|
if (this.editableOn !== 'EditIconClick') {
|
|
@@ -519,7 +509,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
519
509
|
}
|
|
520
510
|
addClass([this.valueWrap], [OPEN]);
|
|
521
511
|
this.setProperties({ enableEditMode: true }, true);
|
|
522
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
523
512
|
if (this.isReact) {
|
|
524
513
|
this.renderReactTemplates();
|
|
525
514
|
}
|
|
@@ -675,7 +664,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
675
664
|
break;
|
|
676
665
|
case 'Numeric':
|
|
677
666
|
if (this.model.value) {
|
|
678
|
-
// eslint-disable-next-line no-useless-escape
|
|
679
667
|
var expRegex = new RegExp('[eE][\-+]?([0-9]+)');
|
|
680
668
|
if (expRegex.test(this.model.value)) {
|
|
681
669
|
this.model.value = this.model.value;
|
|
@@ -745,7 +733,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
745
733
|
InPlaceEditor.prototype.getEditElement = function () {
|
|
746
734
|
return select('.' + ELEMENTS, this.formEle);
|
|
747
735
|
};
|
|
748
|
-
// eslint-disable-next-line
|
|
749
736
|
InPlaceEditor.prototype.getLocale = function (prop, val) {
|
|
750
737
|
return new L10n('inplace-editor', prop, this.locale).getConstant(val);
|
|
751
738
|
};
|
|
@@ -753,7 +740,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
753
740
|
return (!this.isEmpty(val)) ? val : this.emptyText;
|
|
754
741
|
};
|
|
755
742
|
InPlaceEditor.prototype.extendModelValue = function (val) {
|
|
756
|
-
// eslint-disable-next-line
|
|
757
743
|
var model = this.model;
|
|
758
744
|
extend(model, { value: val });
|
|
759
745
|
this.setProperties({ model: model }, true);
|
|
@@ -832,18 +818,15 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
832
818
|
}
|
|
833
819
|
};
|
|
834
820
|
InPlaceEditor.prototype.setRtl = function (value) {
|
|
835
|
-
// eslint-disable-next-line
|
|
836
821
|
value ? addClass([this.element], [RTL]) : removeClass([this.element], [RTL]);
|
|
837
822
|
};
|
|
838
823
|
InPlaceEditor.prototype.setFocus = function () {
|
|
839
824
|
if (this.isTemplate) {
|
|
840
825
|
return;
|
|
841
826
|
}
|
|
842
|
-
// eslint-disable-next-line
|
|
843
827
|
this.isExtModule ? this.notify(setFocus, {}) : this.componentObj.element.focus();
|
|
844
828
|
};
|
|
845
829
|
InPlaceEditor.prototype.removeEditor = function (isBlazorDestroy) {
|
|
846
|
-
// eslint-disable-next-line
|
|
847
830
|
if (isBlazor() && !this.isStringTemplate) {
|
|
848
831
|
resetBlazorTemplate(this.element.id + 'template', 'Template');
|
|
849
832
|
}
|
|
@@ -879,7 +862,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
879
862
|
this.valueWrap.parentElement.setAttribute('title', this.getLocale(localeConstant[this.editableOn], titleConstant));
|
|
880
863
|
}
|
|
881
864
|
}
|
|
882
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
883
865
|
if (this.isReact) {
|
|
884
866
|
this.clearTemplate();
|
|
885
867
|
}
|
|
@@ -950,7 +932,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
950
932
|
_this.dataManager.executeQuery(_this.getQuery(actionBeginArgs.data), _this.successHandler.bind(_this), _this.failureHandler.bind(_this));
|
|
951
933
|
}
|
|
952
934
|
else {
|
|
953
|
-
// eslint-disable-next-line
|
|
954
935
|
var crud = _this.dataManager.insert(actionBeginArgs.data);
|
|
955
936
|
crud.then(function (e) { return _this.successHandler(e); }).catch(function (e) { return _this.failureHandler(e); });
|
|
956
937
|
}
|
|
@@ -971,11 +952,9 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
971
952
|
};
|
|
972
953
|
InPlaceEditor.prototype.templateCompile = function (trgEle, tempStr) {
|
|
973
954
|
var tempEle;
|
|
974
|
-
// eslint-disable-next-line
|
|
975
955
|
if (typeof tempStr === 'string') {
|
|
976
956
|
tempStr = tempStr.trim();
|
|
977
957
|
}
|
|
978
|
-
// eslint-disable-next-line
|
|
979
958
|
var compiler = compile(tempStr);
|
|
980
959
|
if (!isNullOrUndefined(compiler)) {
|
|
981
960
|
var isString = (isBlazor() &&
|
|
@@ -1005,7 +984,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1005
984
|
helper: null
|
|
1006
985
|
};
|
|
1007
986
|
extend(item_1, item_1, beforeEvent);
|
|
1008
|
-
// eslint-disable-next-line
|
|
1009
987
|
this.trigger('beforeSanitizeHtml', item_1, function (args) {
|
|
1010
988
|
if (item_1.cancel && !isNullOrUndefined(item_1.helper)) {
|
|
1011
989
|
value = item_1.helper(value);
|
|
@@ -1041,14 +1019,12 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1041
1019
|
}
|
|
1042
1020
|
};
|
|
1043
1021
|
InPlaceEditor.prototype.disable = function (value) {
|
|
1044
|
-
// eslint-disable-next-line
|
|
1045
1022
|
value ? addClass([this.element], [DISABLE]) : removeClass([this.element], [DISABLE]);
|
|
1046
1023
|
};
|
|
1047
1024
|
InPlaceEditor.prototype.enableEditor = function (val, isInit) {
|
|
1048
1025
|
if (isInit && !val) {
|
|
1049
1026
|
return;
|
|
1050
1027
|
}
|
|
1051
|
-
// eslint-disable-next-line
|
|
1052
1028
|
(val) ? this.renderEditor() : this.cancelHandler('cancel');
|
|
1053
1029
|
};
|
|
1054
1030
|
InPlaceEditor.prototype.checkValidation = function (fromSubmit, isValidate) {
|
|
@@ -1132,11 +1108,9 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1132
1108
|
return;
|
|
1133
1109
|
}
|
|
1134
1110
|
var inputEle = select('.e-input-group', this.formEle);
|
|
1135
|
-
// eslint-disable-next-line
|
|
1136
1111
|
var errorClass = function (element, val, action) {
|
|
1137
1112
|
[].slice.call(element).forEach(function (ele) {
|
|
1138
1113
|
if (ele) {
|
|
1139
|
-
// eslint-disable-next-line
|
|
1140
1114
|
action === 'add' ? addClass([ele], [val]) : removeClass([ele], [val]);
|
|
1141
1115
|
}
|
|
1142
1116
|
});
|
|
@@ -1335,17 +1309,14 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1335
1309
|
this.tipObj.refresh(tipTarget);
|
|
1336
1310
|
}
|
|
1337
1311
|
};
|
|
1338
|
-
// eslint-disable-next-line
|
|
1339
1312
|
InPlaceEditor.prototype.successHandler = function (e) {
|
|
1340
1313
|
this.initRender = false;
|
|
1341
1314
|
var eventArgs = { data: e, value: this.getSendValue() };
|
|
1342
1315
|
this.triggerSuccess(eventArgs);
|
|
1343
1316
|
};
|
|
1344
|
-
// eslint-disable-next-line
|
|
1345
1317
|
InPlaceEditor.prototype.failureHandler = function (e) {
|
|
1346
1318
|
var _this = this;
|
|
1347
1319
|
var eventArgs = { data: e, value: this.getSendValue() };
|
|
1348
|
-
// eslint-disable-next-line
|
|
1349
1320
|
this.trigger('actionFailure', eventArgs, function (args) {
|
|
1350
1321
|
_this.removeSpinner('submit');
|
|
1351
1322
|
if (_this.mode === 'Popup') {
|
|
@@ -1446,7 +1417,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1446
1417
|
this.element.focus();
|
|
1447
1418
|
this.editEle = select('.' + INPUT, this.formEle);
|
|
1448
1419
|
var errEle = null;
|
|
1449
|
-
// eslint-disable-next-line
|
|
1450
1420
|
errEle = select('.' + ERROR, this.editEle);
|
|
1451
1421
|
if (!this.isTemplate) {
|
|
1452
1422
|
this.setValue();
|
|
@@ -1480,7 +1450,6 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1480
1450
|
if (!(isBlazor() && this.isServerRendered)) {
|
|
1481
1451
|
_super.prototype.destroy.call(this);
|
|
1482
1452
|
}
|
|
1483
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1484
1453
|
if (this.isReact) {
|
|
1485
1454
|
this.clearTemplate();
|
|
1486
1455
|
}
|
|
@@ -1538,17 +1507,14 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1538
1507
|
var prop = _a[_i];
|
|
1539
1508
|
switch (prop) {
|
|
1540
1509
|
case 'showButtons':
|
|
1541
|
-
// eslint-disable-next-line
|
|
1542
1510
|
(newProp.showButtons) ? this.appendButtons(this.formEle) : this.destroyButtons();
|
|
1543
1511
|
break;
|
|
1544
1512
|
case 'value':
|
|
1545
1513
|
this.updateValue();
|
|
1546
|
-
// eslint-disable-next-line
|
|
1547
1514
|
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1548
1515
|
: this.renderInitialValue();
|
|
1549
1516
|
break;
|
|
1550
1517
|
case 'emptyText':
|
|
1551
|
-
// eslint-disable-next-line
|
|
1552
1518
|
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1553
1519
|
: this.renderInitialValue();
|
|
1554
1520
|
break;
|
|
@@ -1884,6 +1850,7 @@ var ComboBox$1 = /** @__PURE__ @class */ (function () {
|
|
|
1884
1850
|
};
|
|
1885
1851
|
/**
|
|
1886
1852
|
* Destroys the module.
|
|
1853
|
+
*
|
|
1887
1854
|
* @function destroy
|
|
1888
1855
|
* @returns {void}
|
|
1889
1856
|
* @hidden
|
|
@@ -1899,6 +1866,7 @@ var ComboBox$1 = /** @__PURE__ @class */ (function () {
|
|
|
1899
1866
|
};
|
|
1900
1867
|
/**
|
|
1901
1868
|
* For internal use only - Get the module name.
|
|
1869
|
+
*
|
|
1902
1870
|
* @returns {string} - returns the string
|
|
1903
1871
|
*/
|
|
1904
1872
|
ComboBox$$1.prototype.getModuleName = function () {
|
|
@@ -1926,6 +1894,7 @@ var DateRangePicker$1 = /** @__PURE__ @class */ (function () {
|
|
|
1926
1894
|
};
|
|
1927
1895
|
/**
|
|
1928
1896
|
* For internal use only - Get the module name.
|
|
1897
|
+
*
|
|
1929
1898
|
* @returns {string} - returns the string
|
|
1930
1899
|
*/
|
|
1931
1900
|
DateRangePicker$$1.prototype.getModuleName = function () {
|