@wavemaker-ai/app-ng-runtime 12.1.0-rc.647821 → 12.1.1-rc.352
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/build-task/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/base/bundles/index.umd.js +0 -6
- package/components/base/fesm2022/index.mjs +0 -6
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/bundles/index.umd.js +1 -1
- package/components/basic/label/fesm2022/index.mjs +2 -2
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/picture/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/video/fesm2022/index.mjs.map +1 -1
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/list/bundles/index.umd.js +5 -5
- package/components/data/list/fesm2022/index.mjs +5 -5
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/bundles/index.umd.js +2 -1
- package/components/data/pagination/fesm2022/index.mjs +2 -1
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/table/bundles/index.umd.js +73 -7
- package/components/data/table/fesm2022/index.mjs +73 -7
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/types/index.d.ts +10 -0
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button-group/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/core/fesm2022/index.mjs.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +44 -22
- package/runtime/base/fesm2022/index.mjs +44 -22
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +7 -4
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +237 -21
- package/security/fesm2022/index.mjs.map +1 -1
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -223,7 +223,8 @@
|
|
|
223
223
|
".dropdown-menu",
|
|
224
224
|
".uib-typeahead-match",
|
|
225
225
|
".modal-dialog",
|
|
226
|
-
".toast"
|
|
226
|
+
".toast",
|
|
227
|
+
".bs-datepicker-container"
|
|
227
228
|
];
|
|
228
229
|
let isInput = false;
|
|
229
230
|
classes.forEach((cls) => {
|
|
@@ -245,6 +246,14 @@
|
|
|
245
246
|
static {
|
|
246
247
|
this.initializeProps = registerProps$5();
|
|
247
248
|
}
|
|
249
|
+
isModelVariableInlineOrQuickEdit() {
|
|
250
|
+
if (lodashEs.get(this.datasource, "category") !== "wm.Variable") return false;
|
|
251
|
+
const em = String(this.editmode || "").toLowerCase();
|
|
252
|
+
return em === "quickedit" || em === "inline";
|
|
253
|
+
}
|
|
254
|
+
shouldSoftRefreshAfterModelVarRowSave() {
|
|
255
|
+
return this.isModelVariableInlineOrQuickEdit() && (this._isInlineEditSave || this._modelVarEditSoftRefreshActiveUntil > Date.now());
|
|
256
|
+
}
|
|
248
257
|
set gridData(newValue) {
|
|
249
258
|
this.isDataLoading = false;
|
|
250
259
|
if (this.variableInflight && lodashEs.isEmpty(newValue)) return;
|
|
@@ -284,7 +293,11 @@
|
|
|
284
293
|
} catch (error) {
|
|
285
294
|
console.warn("Error in beforedatarender event callback, continuing with table rendering:", error);
|
|
286
295
|
}
|
|
287
|
-
|
|
296
|
+
if (this.shouldSoftRefreshAfterModelVarRowSave()) {
|
|
297
|
+
const clonedData = i2.getClonedObject(this._gridData);
|
|
298
|
+
this.gridOptions.data = clonedData;
|
|
299
|
+
this.callDataGridMethod("softRefreshData", clonedData);
|
|
300
|
+
} else this.setDataGridOption("data", i2.getClonedObject(this._gridData));
|
|
288
301
|
}
|
|
289
302
|
}
|
|
290
303
|
get gridData() {
|
|
@@ -334,6 +347,7 @@
|
|
|
334
347
|
this.formfields = {};
|
|
335
348
|
this.enablesort = true;
|
|
336
349
|
this.showviewlessbutton = false;
|
|
350
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
337
351
|
this.primaryKey = [];
|
|
338
352
|
this.selectedItems = [];
|
|
339
353
|
this.selectedItemChange = new rxjs.Subject();
|
|
@@ -678,6 +692,11 @@
|
|
|
678
692
|
this.prevData = i2.getClonedObject(row);
|
|
679
693
|
},
|
|
680
694
|
afterRowUpdate: (row, e, callBack, options) => {
|
|
695
|
+
const isModelVarInlineOrQuick = this.isModelVariableInlineOrQuickEdit();
|
|
696
|
+
if (isModelVarInlineOrQuick) {
|
|
697
|
+
this._isInlineEditSave = true;
|
|
698
|
+
this._modelVarEditSoftRefreshActiveUntil = Date.now() + 550;
|
|
699
|
+
}
|
|
681
700
|
i2.muteWatchers();
|
|
682
701
|
const v = lodashEs.get(this.datasource, "category") === "wm.Variable" && options?.rowindex != null;
|
|
683
702
|
this.updateRecord(lodashEs.extend({}, options, {
|
|
@@ -688,6 +707,10 @@
|
|
|
688
707
|
}));
|
|
689
708
|
setTimeout(() => {
|
|
690
709
|
i2.unMuteWatchers();
|
|
710
|
+
if (isModelVarInlineOrQuick) setTimeout(() => {
|
|
711
|
+
this._isInlineEditSave = false;
|
|
712
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
713
|
+
}, 520);
|
|
691
714
|
}, 10);
|
|
692
715
|
},
|
|
693
716
|
onBeforeRowUpdate: (row, e, options) => {
|
|
@@ -772,11 +795,51 @@
|
|
|
772
795
|
this.customExprCompiledTl = {};
|
|
773
796
|
this.customExprCompiledSummaryTl = {};
|
|
774
797
|
},
|
|
798
|
+
updateCustomExpressionContexts: (preparedData) => {
|
|
799
|
+
const viewCount = this.customExprViewRef.length;
|
|
800
|
+
for (let i = 0; i < viewCount; i++) {
|
|
801
|
+
const viewRef = this.customExprViewRef.get(i);
|
|
802
|
+
if (!viewRef || !viewRef.context || !viewRef.context.row || viewRef.context.row.$index === void 0) continue;
|
|
803
|
+
const existingRow = viewRef.context.row;
|
|
804
|
+
const dataRow = preparedData[existingRow.$index - 1];
|
|
805
|
+
if (!dataRow) continue;
|
|
806
|
+
Object.keys(dataRow).forEach((key) => {
|
|
807
|
+
if (key !== "$$index" && key !== "$$pk") existingRow[key] = dataRow[key];
|
|
808
|
+
});
|
|
809
|
+
existingRow.$isFirst = existingRow.$index === 1;
|
|
810
|
+
existingRow.$isLast = this.gridData.length === existingRow.$index;
|
|
811
|
+
viewRef.markForCheck();
|
|
812
|
+
}
|
|
813
|
+
},
|
|
775
814
|
clearRowDetailExpression: () => {
|
|
776
815
|
this.rowDetailViewRef.clear();
|
|
777
816
|
this.rowDefMap = {};
|
|
778
817
|
this.rowDefInstances = {};
|
|
779
818
|
},
|
|
819
|
+
invalidateRowDetailCache: (preparedData) => {
|
|
820
|
+
this.rowDefMap = {};
|
|
821
|
+
this.rowDefInstances = {};
|
|
822
|
+
const viewCount = this.rowDetailViewRef.length;
|
|
823
|
+
for (let i = 0; i < viewCount; i++) {
|
|
824
|
+
const viewRef = this.rowDetailViewRef.get(i);
|
|
825
|
+
if (!viewRef || !viewRef.context || !viewRef.context.row) continue;
|
|
826
|
+
const existingRow = viewRef.context.row;
|
|
827
|
+
const dataRow = preparedData[existingRow.$index - 1];
|
|
828
|
+
if (!dataRow) continue;
|
|
829
|
+
Object.keys(dataRow).forEach((key) => {
|
|
830
|
+
if (key !== "$$index" && key !== "$$pk") existingRow[key] = dataRow[key];
|
|
831
|
+
});
|
|
832
|
+
viewRef.markForCheck();
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
refreshSelectedItems: () => {
|
|
836
|
+
const selectedRows = this.callDataGridMethod("getSelectedRows");
|
|
837
|
+
if (selectedRows.length) {
|
|
838
|
+
this.items.length = 0;
|
|
839
|
+
selectedRows.forEach((row) => this.items.push(row));
|
|
840
|
+
this.selectedItemChange.next(selectedRows);
|
|
841
|
+
}
|
|
842
|
+
},
|
|
780
843
|
generateCustomExpressions: (rowData, index, summaryRow) => {
|
|
781
844
|
const row = this.getClonedRowObject(rowData);
|
|
782
845
|
const compileTemplate = (tmpl) => {
|
|
@@ -1158,7 +1221,7 @@
|
|
|
1158
1221
|
this.applyProps.forEach((args) => this.callDataGridMethod(...args));
|
|
1159
1222
|
if (this.editmode === i4.EDIT_MODE.QUICK_EDIT) {
|
|
1160
1223
|
this.documentClickBind = this._documentClickBind.bind(this);
|
|
1161
|
-
document.addEventListener("click", this.documentClickBind);
|
|
1224
|
+
document.addEventListener("click", this.documentClickBind, true);
|
|
1162
1225
|
}
|
|
1163
1226
|
}
|
|
1164
1227
|
getConfiguredState() {
|
|
@@ -1321,7 +1384,9 @@
|
|
|
1321
1384
|
}
|
|
1322
1385
|
}
|
|
1323
1386
|
ngOnDestroy() {
|
|
1324
|
-
|
|
1387
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
1388
|
+
this._isInlineEditSave = false;
|
|
1389
|
+
document.removeEventListener("click", this.documentClickBind, true);
|
|
1325
1390
|
if (this.navigatorResultWatch) {
|
|
1326
1391
|
this.navigatorResultWatch.unsubscribe();
|
|
1327
1392
|
this.navigatorResultWatch = null;
|
|
@@ -2081,7 +2146,8 @@
|
|
|
2081
2146
|
_documentClickBind(event) {
|
|
2082
2147
|
const $target = event.target;
|
|
2083
2148
|
if (this.$element[0].contains($target) || event.target.doctype || isInputBodyWrapper($($target))) return;
|
|
2084
|
-
|
|
2149
|
+
if ($($target).closest(".app-datagrid").length) return;
|
|
2150
|
+
this.callDataGridMethod("saveRow", void 0, true);
|
|
2085
2151
|
}
|
|
2086
2152
|
_redraw(forceRender) {
|
|
2087
2153
|
if (forceRender) this.datagridElement.datatable(this.gridOptions);
|
|
@@ -2718,9 +2784,9 @@
|
|
|
2718
2784
|
}
|
|
2719
2785
|
if (!this.table.onRowupdate) this.table.toggleMessage(true, "success", this.table.updatemessage);
|
|
2720
2786
|
if (this.table.datasource.execute(i2.DataSource.Operation.SUPPORTS_CRUD)) {
|
|
2721
|
-
this.table.initiateSelectItem("current", response,
|
|
2787
|
+
this.table.initiateSelectItem("current", response, options.skipFocus, false, options.callBack);
|
|
2722
2788
|
this.updateVariable(response, options.callBack);
|
|
2723
|
-
} else if (!this.table.datasource.execute(i2.DataSource.Operation.IS_API_AWARE)) this.table.initiateSelectItem("current", response,
|
|
2789
|
+
} else if (!this.table.datasource.execute(i2.DataSource.Operation.IS_API_AWARE)) this.table.initiateSelectItem("current", response, options.skipFocus, this.table.datasource.category === "wm.Variable", options.callBack);
|
|
2724
2790
|
i2.triggerFn(options.success, response);
|
|
2725
2791
|
this.table.invokeEventCallback("rowupdate", {
|
|
2726
2792
|
$event: options.event,
|
|
@@ -212,7 +212,8 @@ const isInputBodyWrapper = (target) => {
|
|
|
212
212
|
".dropdown-menu",
|
|
213
213
|
".uib-typeahead-match",
|
|
214
214
|
".modal-dialog",
|
|
215
|
-
".toast"
|
|
215
|
+
".toast",
|
|
216
|
+
".bs-datepicker-container"
|
|
216
217
|
];
|
|
217
218
|
let isInput = false;
|
|
218
219
|
classes.forEach((cls) => {
|
|
@@ -234,6 +235,14 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
234
235
|
static {
|
|
235
236
|
this.initializeProps = registerProps$5();
|
|
236
237
|
}
|
|
238
|
+
isModelVariableInlineOrQuickEdit() {
|
|
239
|
+
if (get(this.datasource, "category") !== "wm.Variable") return false;
|
|
240
|
+
const em = String(this.editmode || "").toLowerCase();
|
|
241
|
+
return em === "quickedit" || em === "inline";
|
|
242
|
+
}
|
|
243
|
+
shouldSoftRefreshAfterModelVarRowSave() {
|
|
244
|
+
return this.isModelVariableInlineOrQuickEdit() && (this._isInlineEditSave || this._modelVarEditSoftRefreshActiveUntil > Date.now());
|
|
245
|
+
}
|
|
237
246
|
set gridData(newValue) {
|
|
238
247
|
this.isDataLoading = false;
|
|
239
248
|
if (this.variableInflight && isEmpty(newValue)) return;
|
|
@@ -273,7 +282,11 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
273
282
|
} catch (error) {
|
|
274
283
|
console.warn("Error in beforedatarender event callback, continuing with table rendering:", error);
|
|
275
284
|
}
|
|
276
|
-
|
|
285
|
+
if (this.shouldSoftRefreshAfterModelVarRowSave()) {
|
|
286
|
+
const clonedData = getClonedObject(this._gridData);
|
|
287
|
+
this.gridOptions.data = clonedData;
|
|
288
|
+
this.callDataGridMethod("softRefreshData", clonedData);
|
|
289
|
+
} else this.setDataGridOption("data", getClonedObject(this._gridData));
|
|
277
290
|
}
|
|
278
291
|
}
|
|
279
292
|
get gridData() {
|
|
@@ -323,6 +336,7 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
323
336
|
this.formfields = {};
|
|
324
337
|
this.enablesort = true;
|
|
325
338
|
this.showviewlessbutton = false;
|
|
339
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
326
340
|
this.primaryKey = [];
|
|
327
341
|
this.selectedItems = [];
|
|
328
342
|
this.selectedItemChange = new Subject();
|
|
@@ -667,6 +681,11 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
667
681
|
this.prevData = getClonedObject(row);
|
|
668
682
|
},
|
|
669
683
|
afterRowUpdate: (row, e, callBack, options) => {
|
|
684
|
+
const isModelVarInlineOrQuick = this.isModelVariableInlineOrQuickEdit();
|
|
685
|
+
if (isModelVarInlineOrQuick) {
|
|
686
|
+
this._isInlineEditSave = true;
|
|
687
|
+
this._modelVarEditSoftRefreshActiveUntil = Date.now() + 550;
|
|
688
|
+
}
|
|
670
689
|
muteWatchers();
|
|
671
690
|
const v = get(this.datasource, "category") === "wm.Variable" && options?.rowindex != null;
|
|
672
691
|
this.updateRecord(extend({}, options, {
|
|
@@ -677,6 +696,10 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
677
696
|
}));
|
|
678
697
|
setTimeout(() => {
|
|
679
698
|
unMuteWatchers();
|
|
699
|
+
if (isModelVarInlineOrQuick) setTimeout(() => {
|
|
700
|
+
this._isInlineEditSave = false;
|
|
701
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
702
|
+
}, 520);
|
|
680
703
|
}, 10);
|
|
681
704
|
},
|
|
682
705
|
onBeforeRowUpdate: (row, e, options) => {
|
|
@@ -761,11 +784,51 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
761
784
|
this.customExprCompiledTl = {};
|
|
762
785
|
this.customExprCompiledSummaryTl = {};
|
|
763
786
|
},
|
|
787
|
+
updateCustomExpressionContexts: (preparedData) => {
|
|
788
|
+
const viewCount = this.customExprViewRef.length;
|
|
789
|
+
for (let i = 0; i < viewCount; i++) {
|
|
790
|
+
const viewRef = this.customExprViewRef.get(i);
|
|
791
|
+
if (!viewRef || !viewRef.context || !viewRef.context.row || viewRef.context.row.$index === void 0) continue;
|
|
792
|
+
const existingRow = viewRef.context.row;
|
|
793
|
+
const dataRow = preparedData[existingRow.$index - 1];
|
|
794
|
+
if (!dataRow) continue;
|
|
795
|
+
Object.keys(dataRow).forEach((key) => {
|
|
796
|
+
if (key !== "$$index" && key !== "$$pk") existingRow[key] = dataRow[key];
|
|
797
|
+
});
|
|
798
|
+
existingRow.$isFirst = existingRow.$index === 1;
|
|
799
|
+
existingRow.$isLast = this.gridData.length === existingRow.$index;
|
|
800
|
+
viewRef.markForCheck();
|
|
801
|
+
}
|
|
802
|
+
},
|
|
764
803
|
clearRowDetailExpression: () => {
|
|
765
804
|
this.rowDetailViewRef.clear();
|
|
766
805
|
this.rowDefMap = {};
|
|
767
806
|
this.rowDefInstances = {};
|
|
768
807
|
},
|
|
808
|
+
invalidateRowDetailCache: (preparedData) => {
|
|
809
|
+
this.rowDefMap = {};
|
|
810
|
+
this.rowDefInstances = {};
|
|
811
|
+
const viewCount = this.rowDetailViewRef.length;
|
|
812
|
+
for (let i = 0; i < viewCount; i++) {
|
|
813
|
+
const viewRef = this.rowDetailViewRef.get(i);
|
|
814
|
+
if (!viewRef || !viewRef.context || !viewRef.context.row) continue;
|
|
815
|
+
const existingRow = viewRef.context.row;
|
|
816
|
+
const dataRow = preparedData[existingRow.$index - 1];
|
|
817
|
+
if (!dataRow) continue;
|
|
818
|
+
Object.keys(dataRow).forEach((key) => {
|
|
819
|
+
if (key !== "$$index" && key !== "$$pk") existingRow[key] = dataRow[key];
|
|
820
|
+
});
|
|
821
|
+
viewRef.markForCheck();
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
refreshSelectedItems: () => {
|
|
825
|
+
const selectedRows = this.callDataGridMethod("getSelectedRows");
|
|
826
|
+
if (selectedRows.length) {
|
|
827
|
+
this.items.length = 0;
|
|
828
|
+
selectedRows.forEach((row) => this.items.push(row));
|
|
829
|
+
this.selectedItemChange.next(selectedRows);
|
|
830
|
+
}
|
|
831
|
+
},
|
|
769
832
|
generateCustomExpressions: (rowData, index, summaryRow) => {
|
|
770
833
|
const row = this.getClonedRowObject(rowData);
|
|
771
834
|
const compileTemplate = (tmpl) => {
|
|
@@ -1147,7 +1210,7 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
1147
1210
|
this.applyProps.forEach((args) => this.callDataGridMethod(...args));
|
|
1148
1211
|
if (this.editmode === EDIT_MODE.QUICK_EDIT) {
|
|
1149
1212
|
this.documentClickBind = this._documentClickBind.bind(this);
|
|
1150
|
-
document.addEventListener("click", this.documentClickBind);
|
|
1213
|
+
document.addEventListener("click", this.documentClickBind, true);
|
|
1151
1214
|
}
|
|
1152
1215
|
}
|
|
1153
1216
|
getConfiguredState() {
|
|
@@ -1310,7 +1373,9 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
1310
1373
|
}
|
|
1311
1374
|
}
|
|
1312
1375
|
ngOnDestroy() {
|
|
1313
|
-
|
|
1376
|
+
this._modelVarEditSoftRefreshActiveUntil = 0;
|
|
1377
|
+
this._isInlineEditSave = false;
|
|
1378
|
+
document.removeEventListener("click", this.documentClickBind, true);
|
|
1314
1379
|
if (this.navigatorResultWatch) {
|
|
1315
1380
|
this.navigatorResultWatch.unsubscribe();
|
|
1316
1381
|
this.navigatorResultWatch = null;
|
|
@@ -2070,7 +2135,8 @@ var TableComponent = class TableComponent extends StylableComponent {
|
|
|
2070
2135
|
_documentClickBind(event) {
|
|
2071
2136
|
const $target = event.target;
|
|
2072
2137
|
if (this.$element[0].contains($target) || event.target.doctype || isInputBodyWrapper($($target))) return;
|
|
2073
|
-
|
|
2138
|
+
if ($($target).closest(".app-datagrid").length) return;
|
|
2139
|
+
this.callDataGridMethod("saveRow", void 0, true);
|
|
2074
2140
|
}
|
|
2075
2141
|
_redraw(forceRender) {
|
|
2076
2142
|
if (forceRender) this.datagridElement.datatable(this.gridOptions);
|
|
@@ -2707,9 +2773,9 @@ var TableCUDDirective = class TableCUDDirective {
|
|
|
2707
2773
|
}
|
|
2708
2774
|
if (!this.table.onRowupdate) this.table.toggleMessage(true, "success", this.table.updatemessage);
|
|
2709
2775
|
if (this.table.datasource.execute(DataSource.Operation.SUPPORTS_CRUD)) {
|
|
2710
|
-
this.table.initiateSelectItem("current", response,
|
|
2776
|
+
this.table.initiateSelectItem("current", response, options.skipFocus, false, options.callBack);
|
|
2711
2777
|
this.updateVariable(response, options.callBack);
|
|
2712
|
-
} else if (!this.table.datasource.execute(DataSource.Operation.IS_API_AWARE)) this.table.initiateSelectItem("current", response,
|
|
2778
|
+
} else if (!this.table.datasource.execute(DataSource.Operation.IS_API_AWARE)) this.table.initiateSelectItem("current", response, options.skipFocus, this.table.datasource.category === "wm.Variable", options.callBack);
|
|
2713
2779
|
triggerFn(options.success, response);
|
|
2714
2780
|
this.table.invokeEventCallback("rowupdate", {
|
|
2715
2781
|
$event: options.event,
|