@syncfusion/ej2-inplace-editor 20.4.54 → 21.1.37
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
|
@@ -142,7 +142,6 @@ __decorate([
|
|
|
142
142
|
* @hidden
|
|
143
143
|
*/
|
|
144
144
|
const modulesList = {
|
|
145
|
-
/* eslint-disable */
|
|
146
145
|
'AutoComplete': 'auto-complete',
|
|
147
146
|
'Color': 'color-picker',
|
|
148
147
|
'ComboBox': 'combo-box',
|
|
@@ -158,7 +157,6 @@ const modulesList = {
|
|
|
158
157
|
*/
|
|
159
158
|
// eslint-disable-next-line
|
|
160
159
|
let localeConstant = {
|
|
161
|
-
/* eslint-disable */
|
|
162
160
|
'Click': { 'editAreaClick': 'Click to edit' },
|
|
163
161
|
'DblClick': { 'editAreaDoubleClick': 'Double click to edit' },
|
|
164
162
|
'EditIconClick': { 'editAreaClick': 'Click to edit' }
|
|
@@ -309,7 +307,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
309
307
|
this.updateAdaptor();
|
|
310
308
|
this.appendValueElement();
|
|
311
309
|
this.updateValue();
|
|
312
|
-
// eslint-disable-next-line
|
|
313
310
|
this.textOption === 'Never' ?
|
|
314
311
|
this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
315
312
|
: this.renderInitialValue();
|
|
@@ -324,7 +321,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
324
321
|
const allClassName = val.split(' ');
|
|
325
322
|
for (let i = 0; i < allClassName.length; i++) {
|
|
326
323
|
if (allClassName[i].trim() !== '') {
|
|
327
|
-
// eslint-disable-next-line
|
|
328
324
|
action === 'add' ? addClass([this.element], [allClassName[i]]) : removeClass([this.element], [allClassName[i]]);
|
|
329
325
|
}
|
|
330
326
|
}
|
|
@@ -365,14 +361,11 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
365
361
|
const query = isNullOrUndefined(model.query) ? new Query() : model.query;
|
|
366
362
|
if (model.dataSource instanceof DataManager) {
|
|
367
363
|
model.dataSource.executeQuery(this.getInitQuery(model, query)).then((e) => {
|
|
368
|
-
// eslint-disable-next-line
|
|
369
364
|
this.updateInitValue(mText, mVal, e.result);
|
|
370
365
|
});
|
|
371
366
|
}
|
|
372
367
|
else {
|
|
373
|
-
this.updateInitValue(mText, mVal, new DataManager(model.dataSource).executeLocal(
|
|
374
|
-
// eslint-disable-next-line
|
|
375
|
-
this.getInitQuery(model, query)));
|
|
368
|
+
this.updateInitValue(mText, mVal, new DataManager(model.dataSource).executeLocal(this.getInitQuery(model, query)));
|
|
376
369
|
}
|
|
377
370
|
}
|
|
378
371
|
getInitQuery(model, query) {
|
|
@@ -391,7 +384,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
391
384
|
}
|
|
392
385
|
return query.where(predicate);
|
|
393
386
|
}
|
|
394
|
-
// eslint-disable-next-line
|
|
395
387
|
updateInitValue(mText, mVal, result) {
|
|
396
388
|
if (result.length <= 0) {
|
|
397
389
|
return;
|
|
@@ -410,7 +402,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
410
402
|
this.valueWrap.classList.remove(LOAD);
|
|
411
403
|
}
|
|
412
404
|
renderValue(val) {
|
|
413
|
-
// eslint-disable-next-line
|
|
414
405
|
this.enableHtmlSanitizer && this.type !== 'RTE' && this.type !== 'MultiSelect' ? this.valueEle.innerText = val :
|
|
415
406
|
(this.valueEle.innerHTML = this.enableHtmlParse ? val : encode(val));
|
|
416
407
|
if (this.type === 'Color') {
|
|
@@ -438,7 +429,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
438
429
|
if (this.beginEditArgs.cancel) {
|
|
439
430
|
return;
|
|
440
431
|
}
|
|
441
|
-
// eslint-disable-next-line
|
|
442
432
|
let tipOptions = undefined;
|
|
443
433
|
const target = select('.' + VALUE_WRAPPER, this.element);
|
|
444
434
|
if (this.editableOn !== 'EditIconClick') {
|
|
@@ -483,7 +473,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
483
473
|
}
|
|
484
474
|
addClass([this.valueWrap], [OPEN]);
|
|
485
475
|
this.setProperties({ enableEditMode: true }, true);
|
|
486
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
487
476
|
if (this.isReact) {
|
|
488
477
|
this.renderReactTemplates();
|
|
489
478
|
}
|
|
@@ -638,7 +627,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
638
627
|
break;
|
|
639
628
|
case 'Numeric':
|
|
640
629
|
if (this.model.value) {
|
|
641
|
-
// eslint-disable-next-line no-useless-escape
|
|
642
630
|
const expRegex = new RegExp('[eE][\-+]?([0-9]+)');
|
|
643
631
|
if (expRegex.test(this.model.value)) {
|
|
644
632
|
this.model.value = this.model.value;
|
|
@@ -708,7 +696,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
708
696
|
getEditElement() {
|
|
709
697
|
return select('.' + ELEMENTS, this.formEle);
|
|
710
698
|
}
|
|
711
|
-
// eslint-disable-next-line
|
|
712
699
|
getLocale(prop, val) {
|
|
713
700
|
return new L10n('inplace-editor', prop, this.locale).getConstant(val);
|
|
714
701
|
}
|
|
@@ -716,7 +703,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
716
703
|
return (!this.isEmpty(val)) ? val : this.emptyText;
|
|
717
704
|
}
|
|
718
705
|
extendModelValue(val) {
|
|
719
|
-
// eslint-disable-next-line
|
|
720
706
|
const model = this.model;
|
|
721
707
|
extend(model, { value: val });
|
|
722
708
|
this.setProperties({ model: model }, true);
|
|
@@ -795,18 +781,15 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
795
781
|
}
|
|
796
782
|
}
|
|
797
783
|
setRtl(value) {
|
|
798
|
-
// eslint-disable-next-line
|
|
799
784
|
value ? addClass([this.element], [RTL]) : removeClass([this.element], [RTL]);
|
|
800
785
|
}
|
|
801
786
|
setFocus() {
|
|
802
787
|
if (this.isTemplate) {
|
|
803
788
|
return;
|
|
804
789
|
}
|
|
805
|
-
// eslint-disable-next-line
|
|
806
790
|
this.isExtModule ? this.notify(setFocus, {}) : this.componentObj.element.focus();
|
|
807
791
|
}
|
|
808
792
|
removeEditor(isBlazorDestroy) {
|
|
809
|
-
// eslint-disable-next-line
|
|
810
793
|
if (isBlazor() && !this.isStringTemplate) {
|
|
811
794
|
resetBlazorTemplate(this.element.id + 'template', 'Template');
|
|
812
795
|
}
|
|
@@ -842,7 +825,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
842
825
|
this.valueWrap.parentElement.setAttribute('title', this.getLocale(localeConstant[this.editableOn], titleConstant));
|
|
843
826
|
}
|
|
844
827
|
}
|
|
845
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
846
828
|
if (this.isReact) {
|
|
847
829
|
this.clearTemplate();
|
|
848
830
|
}
|
|
@@ -912,7 +894,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
912
894
|
this.dataManager.executeQuery(this.getQuery(actionBeginArgs.data), this.successHandler.bind(this), this.failureHandler.bind(this));
|
|
913
895
|
}
|
|
914
896
|
else {
|
|
915
|
-
// eslint-disable-next-line
|
|
916
897
|
const crud = this.dataManager.insert(actionBeginArgs.data);
|
|
917
898
|
crud.then((e) => this.successHandler(e)).catch((e) => this.failureHandler(e));
|
|
918
899
|
}
|
|
@@ -933,11 +914,9 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
933
914
|
}
|
|
934
915
|
templateCompile(trgEle, tempStr) {
|
|
935
916
|
let tempEle;
|
|
936
|
-
// eslint-disable-next-line
|
|
937
917
|
if (typeof tempStr === 'string') {
|
|
938
918
|
tempStr = tempStr.trim();
|
|
939
919
|
}
|
|
940
|
-
// eslint-disable-next-line
|
|
941
920
|
const compiler = compile(tempStr);
|
|
942
921
|
if (!isNullOrUndefined(compiler)) {
|
|
943
922
|
const isString = (isBlazor() &&
|
|
@@ -967,7 +946,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
967
946
|
helper: null
|
|
968
947
|
};
|
|
969
948
|
extend(item, item, beforeEvent);
|
|
970
|
-
// eslint-disable-next-line
|
|
971
949
|
this.trigger('beforeSanitizeHtml', item, (args) => {
|
|
972
950
|
if (item.cancel && !isNullOrUndefined(item.helper)) {
|
|
973
951
|
value = item.helper(value);
|
|
@@ -1003,14 +981,12 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1003
981
|
}
|
|
1004
982
|
}
|
|
1005
983
|
disable(value) {
|
|
1006
|
-
// eslint-disable-next-line
|
|
1007
984
|
value ? addClass([this.element], [DISABLE]) : removeClass([this.element], [DISABLE]);
|
|
1008
985
|
}
|
|
1009
986
|
enableEditor(val, isInit) {
|
|
1010
987
|
if (isInit && !val) {
|
|
1011
988
|
return;
|
|
1012
989
|
}
|
|
1013
|
-
// eslint-disable-next-line
|
|
1014
990
|
(val) ? this.renderEditor() : this.cancelHandler('cancel');
|
|
1015
991
|
}
|
|
1016
992
|
checkValidation(fromSubmit, isValidate) {
|
|
@@ -1093,11 +1069,9 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1093
1069
|
return;
|
|
1094
1070
|
}
|
|
1095
1071
|
const inputEle = select('.e-input-group', this.formEle);
|
|
1096
|
-
// eslint-disable-next-line
|
|
1097
1072
|
const errorClass = (element, val, action) => {
|
|
1098
1073
|
[].slice.call(element).forEach((ele) => {
|
|
1099
1074
|
if (ele) {
|
|
1100
|
-
// eslint-disable-next-line
|
|
1101
1075
|
action === 'add' ? addClass([ele], [val]) : removeClass([ele], [val]);
|
|
1102
1076
|
}
|
|
1103
1077
|
});
|
|
@@ -1294,16 +1268,13 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1294
1268
|
this.tipObj.refresh(tipTarget);
|
|
1295
1269
|
}
|
|
1296
1270
|
}
|
|
1297
|
-
// eslint-disable-next-line
|
|
1298
1271
|
successHandler(e) {
|
|
1299
1272
|
this.initRender = false;
|
|
1300
1273
|
const eventArgs = { data: e, value: this.getSendValue() };
|
|
1301
1274
|
this.triggerSuccess(eventArgs);
|
|
1302
1275
|
}
|
|
1303
|
-
// eslint-disable-next-line
|
|
1304
1276
|
failureHandler(e) {
|
|
1305
1277
|
const eventArgs = { data: e, value: this.getSendValue() };
|
|
1306
|
-
// eslint-disable-next-line
|
|
1307
1278
|
this.trigger('actionFailure', eventArgs, (args) => {
|
|
1308
1279
|
this.removeSpinner('submit');
|
|
1309
1280
|
if (this.mode === 'Popup') {
|
|
@@ -1403,7 +1374,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1403
1374
|
this.element.focus();
|
|
1404
1375
|
this.editEle = select('.' + INPUT, this.formEle);
|
|
1405
1376
|
let errEle = null;
|
|
1406
|
-
// eslint-disable-next-line
|
|
1407
1377
|
errEle = select('.' + ERROR, this.editEle);
|
|
1408
1378
|
if (!this.isTemplate) {
|
|
1409
1379
|
this.setValue();
|
|
@@ -1436,7 +1406,6 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1436
1406
|
if (!(isBlazor() && this.isServerRendered)) {
|
|
1437
1407
|
super.destroy();
|
|
1438
1408
|
}
|
|
1439
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1440
1409
|
if (this.isReact) {
|
|
1441
1410
|
this.clearTemplate();
|
|
1442
1411
|
}
|
|
@@ -1493,17 +1462,14 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1493
1462
|
for (const prop of Object.keys(newProp)) {
|
|
1494
1463
|
switch (prop) {
|
|
1495
1464
|
case 'showButtons':
|
|
1496
|
-
// eslint-disable-next-line
|
|
1497
1465
|
(newProp.showButtons) ? this.appendButtons(this.formEle) : this.destroyButtons();
|
|
1498
1466
|
break;
|
|
1499
1467
|
case 'value':
|
|
1500
1468
|
this.updateValue();
|
|
1501
|
-
// eslint-disable-next-line
|
|
1502
1469
|
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1503
1470
|
: this.renderInitialValue();
|
|
1504
1471
|
break;
|
|
1505
1472
|
case 'emptyText':
|
|
1506
|
-
// eslint-disable-next-line
|
|
1507
1473
|
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1508
1474
|
: this.renderInitialValue();
|
|
1509
1475
|
break;
|
|
@@ -1835,6 +1801,7 @@ class ComboBox$1 {
|
|
|
1835
1801
|
}
|
|
1836
1802
|
/**
|
|
1837
1803
|
* Destroys the module.
|
|
1804
|
+
*
|
|
1838
1805
|
* @function destroy
|
|
1839
1806
|
* @returns {void}
|
|
1840
1807
|
* @hidden
|
|
@@ -1850,6 +1817,7 @@ class ComboBox$1 {
|
|
|
1850
1817
|
}
|
|
1851
1818
|
/**
|
|
1852
1819
|
* For internal use only - Get the module name.
|
|
1820
|
+
*
|
|
1853
1821
|
* @returns {string} - returns the string
|
|
1854
1822
|
*/
|
|
1855
1823
|
getModuleName() {
|
|
@@ -1876,6 +1844,7 @@ class DateRangePicker$1 {
|
|
|
1876
1844
|
}
|
|
1877
1845
|
/**
|
|
1878
1846
|
* For internal use only - Get the module name.
|
|
1847
|
+
*
|
|
1879
1848
|
* @returns {string} - returns the string
|
|
1880
1849
|
*/
|
|
1881
1850
|
getModuleName() {
|