@smartbit4all/ng-client 3.3.70 → 3.3.72
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/esm2020/lib/smart-grid/api/grid-api/api/grid.service.mjs +58 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionChange.mjs +13 -0
- package/esm2020/lib/smart-grid/api/grid-api/model/models.mjs +2 -1
- package/esm2020/lib/smart-grid/smart-grid.component.mjs +24 -16
- package/esm2020/lib/smart-grid/smart-grid.service.mjs +6 -1
- package/fesm2015/smartbit4all-ng-client.mjs +89 -19
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +97 -15
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-grid/api/grid-api/api/grid.service.d.ts +21 -0
- package/lib/smart-grid/api/grid-api/model/gridSelectionChange.d.ts +18 -0
- package/lib/smart-grid/api/grid-api/model/models.d.ts +1 -0
- package/lib/smart-grid/smart-grid.component.d.ts +1 -2
- package/lib/smart-grid/smart-grid.service.d.ts +1 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.72.tgz +0 -0
- package/smartbit4all-ng-client-3.3.70.tgz +0 -0
|
@@ -9043,6 +9043,63 @@ class GridService {
|
|
|
9043
9043
|
reportProgress: reportProgress
|
|
9044
9044
|
});
|
|
9045
9045
|
}
|
|
9046
|
+
selectRows(uuid, gridId, gridSelectionChange, observe = 'body', reportProgress = false, options) {
|
|
9047
|
+
if (uuid === null || uuid === undefined) {
|
|
9048
|
+
throw new Error('Required parameter uuid was null or undefined when calling selectRows.');
|
|
9049
|
+
}
|
|
9050
|
+
if (gridId === null || gridId === undefined) {
|
|
9051
|
+
throw new Error('Required parameter gridId was null or undefined when calling selectRows.');
|
|
9052
|
+
}
|
|
9053
|
+
if (gridSelectionChange === null || gridSelectionChange === undefined) {
|
|
9054
|
+
throw new Error('Required parameter gridSelectionChange was null or undefined when calling selectRows.');
|
|
9055
|
+
}
|
|
9056
|
+
let localVarHeaders = this.defaultHeaders;
|
|
9057
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
9058
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
9059
|
+
// to determine the Accept header
|
|
9060
|
+
const httpHeaderAccepts = [
|
|
9061
|
+
'application/json'
|
|
9062
|
+
];
|
|
9063
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
9064
|
+
}
|
|
9065
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
9066
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
9067
|
+
}
|
|
9068
|
+
let localVarHttpContext = options && options.context;
|
|
9069
|
+
if (localVarHttpContext === undefined) {
|
|
9070
|
+
localVarHttpContext = new HttpContext();
|
|
9071
|
+
}
|
|
9072
|
+
// to determine the Content-Type header
|
|
9073
|
+
const consumes = [
|
|
9074
|
+
'application/json'
|
|
9075
|
+
];
|
|
9076
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
9077
|
+
if (httpContentTypeSelected !== undefined) {
|
|
9078
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
9079
|
+
}
|
|
9080
|
+
let responseType_ = 'json';
|
|
9081
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
9082
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
9083
|
+
responseType_ = 'text';
|
|
9084
|
+
}
|
|
9085
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
9086
|
+
responseType_ = 'json';
|
|
9087
|
+
}
|
|
9088
|
+
else {
|
|
9089
|
+
responseType_ = 'blob';
|
|
9090
|
+
}
|
|
9091
|
+
}
|
|
9092
|
+
let localVarPath = `/grid/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "gridId", value: gridId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/selects`;
|
|
9093
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9094
|
+
context: localVarHttpContext,
|
|
9095
|
+
body: gridSelectionChange,
|
|
9096
|
+
responseType: responseType_,
|
|
9097
|
+
withCredentials: this.configuration.withCredentials,
|
|
9098
|
+
headers: localVarHeaders,
|
|
9099
|
+
observe: observe,
|
|
9100
|
+
reportProgress: reportProgress
|
|
9101
|
+
});
|
|
9102
|
+
}
|
|
9046
9103
|
setPage(uuid, gridIdentifier, offset, limit, observe = 'body', reportProgress = false, options) {
|
|
9047
9104
|
if (uuid === null || uuid === undefined) {
|
|
9048
9105
|
throw new Error('Required parameter uuid was null or undefined when calling setPage.');
|
|
@@ -9336,6 +9393,13 @@ class SmartGridService {
|
|
|
9336
9393
|
.toPromise();
|
|
9337
9394
|
});
|
|
9338
9395
|
}
|
|
9396
|
+
selectRows(smartGrid, selected, unselected) {
|
|
9397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9398
|
+
return yield this.api
|
|
9399
|
+
.selectRows(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, { selected, unselected })
|
|
9400
|
+
.toPromise();
|
|
9401
|
+
});
|
|
9402
|
+
}
|
|
9339
9403
|
selectAll(smartGrid, selected) {
|
|
9340
9404
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9341
9405
|
return yield this.api
|
|
@@ -9786,11 +9850,9 @@ class SmartGridComponent {
|
|
|
9786
9850
|
else if (kind === GridViewDescriptorKindEnum.CARDS) {
|
|
9787
9851
|
layoutDef = SmartLayoutDef.CARD;
|
|
9788
9852
|
}
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
layoutDef = SmartLayoutDef.TABLE;
|
|
9853
|
+
if (layoutDef) {
|
|
9854
|
+
this.smartGrid.layoutDef = layoutDef;
|
|
9792
9855
|
}
|
|
9793
|
-
this.smartGrid.layoutDef = layoutDef;
|
|
9794
9856
|
}
|
|
9795
9857
|
if ((gridModel === null || gridModel === void 0 ? void 0 : gridModel.paginator) !== undefined) {
|
|
9796
9858
|
this.smartGrid.paginator = gridModel.paginator;
|
|
@@ -9800,6 +9862,10 @@ class SmartGridComponent {
|
|
|
9800
9862
|
else {
|
|
9801
9863
|
console.error('GridModel is undefined in component!');
|
|
9802
9864
|
}
|
|
9865
|
+
if (!this.smartGrid.layoutDef) {
|
|
9866
|
+
// fallback, default TABLE
|
|
9867
|
+
this.smartGrid.layoutDef = SmartLayoutDef.TABLE;
|
|
9868
|
+
}
|
|
9803
9869
|
if (this.smartGrid.layoutDef === SmartLayoutDef.TABLE) {
|
|
9804
9870
|
this.renderTable();
|
|
9805
9871
|
}
|
|
@@ -10062,8 +10128,7 @@ class SmartGridComponent {
|
|
|
10062
10128
|
(_a = this.service.gridModel.page.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => selectedIds.includes(row.id)).forEach((row) => (row.selected = true));
|
|
10063
10129
|
(_b = this.service.gridModel.page.rows) === null || _b === void 0 ? void 0 : _b.filter((row) => unselectedIds.includes(row.id)).forEach((row) => (row.selected = false));
|
|
10064
10130
|
}
|
|
10065
|
-
|
|
10066
|
-
this.onSelectList(union);
|
|
10131
|
+
this.onSelectRows(selectedIds, unselectedIds);
|
|
10067
10132
|
}
|
|
10068
10133
|
checkAllParentsSelection(node) {
|
|
10069
10134
|
let parent = this.getParentNode(node);
|
|
@@ -10313,26 +10378,16 @@ class SmartGridComponent {
|
|
|
10313
10378
|
}
|
|
10314
10379
|
}
|
|
10315
10380
|
onSelect(rowId) {
|
|
10316
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10317
|
-
this.onSelectList([rowId]);
|
|
10318
|
-
});
|
|
10319
|
-
}
|
|
10320
|
-
selectRowInternal(rowId) {
|
|
10321
10381
|
var _a;
|
|
10322
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10323
|
-
const row = (_a = this.service.gridModel.page.rows) === null || _a === void 0 ? void 0 : _a.find((gridRow) => gridRow.id === rowId);
|
|
10324
|
-
const viewContextChange = yield this.service.select(this.smartGrid, row);
|
|
10325
|
-
this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
|
|
10326
|
-
});
|
|
10327
|
-
}
|
|
10328
|
-
onSelectList(rowIds) {
|
|
10329
10382
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10330
10383
|
this.isBlocked = true;
|
|
10331
10384
|
if (this.dev) {
|
|
10332
10385
|
this.render();
|
|
10333
10386
|
}
|
|
10334
10387
|
else {
|
|
10335
|
-
|
|
10388
|
+
const row = (_a = this.service.gridModel.page.rows) === null || _a === void 0 ? void 0 : _a.find((gridRow) => gridRow.id === rowId);
|
|
10389
|
+
const viewContextChange = yield this.service.select(this.smartGrid, row);
|
|
10390
|
+
this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
|
|
10336
10391
|
this.refresh();
|
|
10337
10392
|
}
|
|
10338
10393
|
});
|
|
@@ -10345,6 +10400,21 @@ class SmartGridComponent {
|
|
|
10345
10400
|
this.refresh();
|
|
10346
10401
|
});
|
|
10347
10402
|
}
|
|
10403
|
+
onSelectRows(selectedIds, unselectedIds) {
|
|
10404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10405
|
+
this.isBlocked = true;
|
|
10406
|
+
if (this.dev) {
|
|
10407
|
+
this.render();
|
|
10408
|
+
}
|
|
10409
|
+
else {
|
|
10410
|
+
let selected = selectedIds.filter((item) => item !== undefined);
|
|
10411
|
+
let unselected = unselectedIds.filter((item) => item !== undefined);
|
|
10412
|
+
const viewContextChange = yield this.service.selectRows(this.smartGrid, selected, unselected);
|
|
10413
|
+
this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
|
|
10414
|
+
this.refresh();
|
|
10415
|
+
}
|
|
10416
|
+
});
|
|
10417
|
+
}
|
|
10348
10418
|
editColumns() {
|
|
10349
10419
|
let dialogData = {
|
|
10350
10420
|
content: {
|