@syncfusion/ej2-inplace-editor 20.4.48 → 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/CHANGELOG.md +10 -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 +56 -52
- package/dist/es6/ej2-inplace-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es5.js +57 -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 +15 -15
- package/src/inplace-editor/base/inplace-editor.js +57 -53
|
@@ -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;
|
|
@@ -1213,7 +1213,7 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1213
1213
|
EventHandler.add(this.submitBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1214
1214
|
}
|
|
1215
1215
|
if (!isNullOrUndefined(this.cancelBtn)) {
|
|
1216
|
-
EventHandler.add(this.cancelBtn.element, '
|
|
1216
|
+
EventHandler.add(this.cancelBtn.element, 'mouseup', this.cancelBtnClick, this);
|
|
1217
1217
|
EventHandler.add(this.cancelBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1218
1218
|
}
|
|
1219
1219
|
};
|
|
@@ -1522,58 +1522,62 @@ var InPlaceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1522
1522
|
* @private
|
|
1523
1523
|
*/
|
|
1524
1524
|
InPlaceEditor.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
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
|
+
}
|
|
1532
1536
|
}
|
|
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
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
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
|
+
}
|
|
1577
1581
|
}
|
|
1578
1582
|
}
|
|
1579
1583
|
};
|