@smartbit4all/ng-client 3.3.71 → 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 +18 -12
- package/esm2020/lib/smart-grid/smart-grid.service.mjs +6 -1
- package/fesm2015/smartbit4all-ng-client.mjs +83 -15
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +91 -11
- 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.71.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
|
|
@@ -10064,8 +10128,7 @@ class SmartGridComponent {
|
|
|
10064
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));
|
|
10065
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));
|
|
10066
10130
|
}
|
|
10067
|
-
|
|
10068
|
-
this.onSelectList(union);
|
|
10131
|
+
this.onSelectRows(selectedIds, unselectedIds);
|
|
10069
10132
|
}
|
|
10070
10133
|
checkAllParentsSelection(node) {
|
|
10071
10134
|
let parent = this.getParentNode(node);
|
|
@@ -10315,26 +10378,16 @@ class SmartGridComponent {
|
|
|
10315
10378
|
}
|
|
10316
10379
|
}
|
|
10317
10380
|
onSelect(rowId) {
|
|
10318
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10319
|
-
this.onSelectList([rowId]);
|
|
10320
|
-
});
|
|
10321
|
-
}
|
|
10322
|
-
selectRowInternal(rowId) {
|
|
10323
10381
|
var _a;
|
|
10324
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10325
|
-
const row = (_a = this.service.gridModel.page.rows) === null || _a === void 0 ? void 0 : _a.find((gridRow) => gridRow.id === rowId);
|
|
10326
|
-
const viewContextChange = yield this.service.select(this.smartGrid, row);
|
|
10327
|
-
this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
|
|
10328
|
-
});
|
|
10329
|
-
}
|
|
10330
|
-
onSelectList(rowIds) {
|
|
10331
10382
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10332
10383
|
this.isBlocked = true;
|
|
10333
10384
|
if (this.dev) {
|
|
10334
10385
|
this.render();
|
|
10335
10386
|
}
|
|
10336
10387
|
else {
|
|
10337
|
-
|
|
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);
|
|
10338
10391
|
this.refresh();
|
|
10339
10392
|
}
|
|
10340
10393
|
});
|
|
@@ -10347,6 +10400,21 @@ class SmartGridComponent {
|
|
|
10347
10400
|
this.refresh();
|
|
10348
10401
|
});
|
|
10349
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
|
+
}
|
|
10350
10418
|
editColumns() {
|
|
10351
10419
|
let dialogData = {
|
|
10352
10420
|
content: {
|