@syncfusion/ej2-inplace-editor 20.4.42 → 20.4.54
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/.eslintrc.json +25 -2
- package/CHANGELOG.md +16 -0
- package/dist/ej2-inplace-editor.min.js +2 -2
- package/dist/ej2-inplace-editor.umd.min.js +2 -2
- package/dist/ej2-inplace-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es2015.js +63 -52
- package/dist/es6/ej2-inplace-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es5.js +64 -53
- package/dist/es6/ej2-inplace-editor.es5.js.map +1 -1
- package/dist/global/ej2-inplace-editor.min.js +2 -2
- package/dist/global/ej2-inplace-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/inplace-editor/base/inplace-editor-model.d.ts +1 -1
- package/src/inplace-editor/base/inplace-editor.js +64 -53
- package/tslint.json +111 -0
|
@@ -918,7 +918,7 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
918
918
|
this.submitBtn = undefined;
|
|
919
919
|
}
|
|
920
920
|
if (!isNullOrUndefined(this.cancelBtn)) {
|
|
921
|
-
EventHandler.remove(this.cancelBtn.element, '
|
|
921
|
+
EventHandler.remove(this.cancelBtn.element, 'mouseup', this.cancelBtnClick);
|
|
922
922
|
EventHandler.remove(this.cancelBtn.element, 'keydown', this.btnKeyDownHandler);
|
|
923
923
|
this.cancelBtn.destroy();
|
|
924
924
|
this.cancelBtn = undefined;
|
|
@@ -1061,6 +1061,13 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1061
1061
|
var count_1 = 0;
|
|
1062
1062
|
this.formValidate = new FormValidator(this.formEle, {
|
|
1063
1063
|
rules: this.validationRules,
|
|
1064
|
+
validationBegin: function (e) {
|
|
1065
|
+
if (_this.type === 'RTE') {
|
|
1066
|
+
var ele = document.createElement('div');
|
|
1067
|
+
ele.innerHTML = e.value;
|
|
1068
|
+
e.value = ele.innerText;
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1064
1071
|
validationComplete: function (e) {
|
|
1065
1072
|
count_1 = count_1 + 1;
|
|
1066
1073
|
args = {
|
|
@@ -1206,7 +1213,7 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1206
1213
|
EventHandler.add(this.submitBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1207
1214
|
}
|
|
1208
1215
|
if (!isNullOrUndefined(this.cancelBtn)) {
|
|
1209
|
-
EventHandler.add(this.cancelBtn.element, '
|
|
1216
|
+
EventHandler.add(this.cancelBtn.element, 'mouseup', this.cancelBtnClick, this);
|
|
1210
1217
|
EventHandler.add(this.cancelBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1211
1218
|
}
|
|
1212
1219
|
};
|
|
@@ -1515,58 +1522,62 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1515
1522
|
* @private
|
|
1516
1523
|
*/
|
|
1517
1524
|
InPlaceEditor.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
+
var checkValidation = this.validationRules ? !isNullOrUndefined(this.element.querySelectorAll('.' + ERROR)) &&
|
|
1526
|
+
this.element.querySelectorAll('.' + ERROR).length > 0 ? false : true : true;
|
|
1527
|
+
if (checkValidation) {
|
|
1528
|
+
if (this.isEditorOpen()) {
|
|
1529
|
+
var editModeChanged = 'enableEditMode' in newProp;
|
|
1530
|
+
if ((editModeChanged && oldProp.enableEditMode && !newProp.enableEditMode) || (!editModeChanged && this.enableEditMode)) {
|
|
1531
|
+
this.triggerEndEdit('cancel');
|
|
1532
|
+
}
|
|
1533
|
+
else {
|
|
1534
|
+
this.removeEditor();
|
|
1535
|
+
}
|
|
1525
1536
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1537
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
1538
|
+
var prop = _a[_i];
|
|
1539
|
+
switch (prop) {
|
|
1540
|
+
case 'showButtons':
|
|
1541
|
+
// eslint-disable-next-line
|
|
1542
|
+
(newProp.showButtons) ? this.appendButtons(this.formEle) : this.destroyButtons();
|
|
1543
|
+
break;
|
|
1544
|
+
case 'value':
|
|
1545
|
+
this.updateValue();
|
|
1546
|
+
// eslint-disable-next-line
|
|
1547
|
+
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1548
|
+
: this.renderInitialValue();
|
|
1549
|
+
break;
|
|
1550
|
+
case 'emptyText':
|
|
1551
|
+
// eslint-disable-next-line
|
|
1552
|
+
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1553
|
+
: this.renderInitialValue();
|
|
1554
|
+
break;
|
|
1555
|
+
case 'template':
|
|
1556
|
+
this.checkIsTemplate();
|
|
1557
|
+
break;
|
|
1558
|
+
case 'disabled':
|
|
1559
|
+
this.disable(newProp.disabled);
|
|
1560
|
+
break;
|
|
1561
|
+
case 'enableRtl':
|
|
1562
|
+
this.setRtl(newProp.enableRtl);
|
|
1563
|
+
break;
|
|
1564
|
+
case 'cssClass':
|
|
1565
|
+
this.setClass('remove', oldProp.cssClass);
|
|
1566
|
+
this.setClass('add', newProp.cssClass);
|
|
1567
|
+
break;
|
|
1568
|
+
case 'mode':
|
|
1569
|
+
this.enableEditor(this.enableEditMode);
|
|
1570
|
+
break;
|
|
1571
|
+
case 'enableEditMode':
|
|
1572
|
+
this.enableEditor(newProp.enableEditMode);
|
|
1573
|
+
break;
|
|
1574
|
+
case 'editableOn':
|
|
1575
|
+
this.unWireEditEvent(oldProp.editableOn);
|
|
1576
|
+
if (newProp.editableOn !== 'EditIconClick') {
|
|
1577
|
+
this.wireEditEvent(newProp.editableOn);
|
|
1578
|
+
}
|
|
1579
|
+
break;
|
|
1580
|
+
}
|
|
1570
1581
|
}
|
|
1571
1582
|
}
|
|
1572
1583
|
};
|