@smartbit4all/ng-client 3.0.6 → 3.0.8
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/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.service.mjs +2 -2
- package/esm2020/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/api/grid.service.mjs +49 -27
- package/esm2020/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/configuration.mjs +20 -1
- package/esm2020/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/index.mjs +2 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridRow.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridViewDescriptor.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/param.mjs +2 -0
- package/esm2020/lib/smart-grid/api/grid-api/variables.mjs +1 -1
- package/esm2020/lib/smart-grid/smart-grid.component.mjs +25 -11
- package/esm2020/lib/smart-grid/smart-grid.service.mjs +16 -15
- package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
- package/esm2020/lib/view-context/api/model/link.mjs +21 -0
- package/esm2020/lib/view-context/api/model/models.mjs +2 -1
- package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -1
- package/esm2020/lib/view-context/api/model/view.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContext.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextData.mjs +1 -1
- package/esm2020/lib/view-context/projects.mjs +14 -14
- package/esm2020/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.mjs +2 -2
- package/esm2020/lib/view-context/smart-view-context.module.mjs +4 -2
- package/esm2020/lib/view-context/smart-view-context.service.mjs +43 -7
- package/fesm2015/smartbit4all-ng-client.mjs +172 -56
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +169 -54
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.service.d.ts +1 -1
- package/lib/smart-grid/api/grid-api/api/grid.service.d.ts +1 -1
- package/lib/smart-grid/api/grid-api/configuration.d.ts +24 -0
- package/lib/smart-grid/api/grid-api/index.d.ts +1 -0
- package/lib/smart-grid/api/grid-api/model/gridViewDescriptor.d.ts +1 -0
- package/lib/smart-grid/api/grid-api/param.d.ts +37 -0
- package/lib/smart-grid/smart-grid.component.d.ts +2 -0
- package/lib/smart-grid/smart-grid.service.d.ts +1 -2
- package/lib/view-context/api/model/link.d.ts +38 -0
- package/lib/view-context/api/model/models.d.ts +1 -0
- package/lib/view-context/api/model/viewContext.d.ts +2 -0
- package/lib/view-context/api/model/viewContextData.d.ts +2 -0
- package/lib/view-context/projects.d.ts +13 -13
- package/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.d.ts +1 -1
- package/lib/view-context/smart-view-context.service.d.ts +6 -3
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.0.8.tgz +0 -0
- package/src/lib/smart-grid/api/grid-api/README.md +226 -203
- package/smartbit4all-ng-client-3.0.6.tgz +0 -0
|
@@ -2068,6 +2068,27 @@ const DataChangeKind = {
|
|
|
2068
2068
|
Lookup: 'LOOKUP'
|
|
2069
2069
|
};
|
|
2070
2070
|
|
|
2071
|
+
/**
|
|
2072
|
+
* View API
|
|
2073
|
+
* View API
|
|
2074
|
+
*
|
|
2075
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2076
|
+
* Contact: info@it4all.hu
|
|
2077
|
+
*
|
|
2078
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2079
|
+
* https://openapi-generator.tech
|
|
2080
|
+
* Do not edit the class manually.
|
|
2081
|
+
*/
|
|
2082
|
+
var Link;
|
|
2083
|
+
(function (Link) {
|
|
2084
|
+
Link.TargetEnum = {
|
|
2085
|
+
Self: 'SELF',
|
|
2086
|
+
Blank: 'BLANK',
|
|
2087
|
+
Parent: 'PARENT',
|
|
2088
|
+
Top: 'TOP'
|
|
2089
|
+
};
|
|
2090
|
+
})(Link || (Link = {}));
|
|
2091
|
+
|
|
2071
2092
|
/**
|
|
2072
2093
|
* View API
|
|
2073
2094
|
* View API
|
|
@@ -5899,13 +5920,15 @@ var SmartActionType;
|
|
|
5899
5920
|
const SmartViewContextErrorDialogButtonLabel = 'SmartViewContextErrorDialogButtonLabel';
|
|
5900
5921
|
const SmartViewContextErrorDialogTitle = 'SmartViewContextErrorDialogTitle';
|
|
5901
5922
|
const SmartViewContextErrorDialogMessage = 'SmartViewContextErrorDialogMessage';
|
|
5923
|
+
const DIALOG_DISABLE_CLOSE = new InjectionToken('dialogDisableClose');
|
|
5902
5924
|
class SmartViewContextService {
|
|
5903
|
-
constructor(view, session, navigation, dialog, apiQueueService) {
|
|
5925
|
+
constructor(view, session, navigation, dialog, apiQueueService, inject) {
|
|
5904
5926
|
this.view = view;
|
|
5905
5927
|
this.session = session;
|
|
5906
5928
|
this.navigation = navigation;
|
|
5907
5929
|
this.dialog = dialog;
|
|
5908
5930
|
this.apiQueueService = apiQueueService;
|
|
5931
|
+
this.inject = inject;
|
|
5909
5932
|
this.tabIdName = 'viewContextUuid';
|
|
5910
5933
|
this.tabIdhttpHeaderName = 'viewContextUuid';
|
|
5911
5934
|
this.viewHandlers = new Array();
|
|
@@ -6072,7 +6095,14 @@ class SmartViewContextService {
|
|
|
6072
6095
|
throw new Error(`Component is undefined in SmartViewHandlerModel with name: ${view.viewName}`);
|
|
6073
6096
|
}
|
|
6074
6097
|
let dialogRef = this.dialog.openComponentAsDialog(viewHandler.component, viewHandler.name);
|
|
6075
|
-
|
|
6098
|
+
let dialogDisableClose = true;
|
|
6099
|
+
try {
|
|
6100
|
+
dialogDisableClose = this.inject.get(DIALOG_DISABLE_CLOSE);
|
|
6101
|
+
}
|
|
6102
|
+
catch {
|
|
6103
|
+
console.error('Error during reading DIALOG_DISABLE_CLOSE');
|
|
6104
|
+
}
|
|
6105
|
+
dialogRef.disableClose = dialogDisableClose;
|
|
6076
6106
|
// if (view.viewName === this.messageDialogname) {
|
|
6077
6107
|
// if (view.message?.options && view.message.options.length) {
|
|
6078
6108
|
// }
|
|
@@ -6173,8 +6203,35 @@ class SmartViewContextService {
|
|
|
6173
6203
|
this.closeView(viewData);
|
|
6174
6204
|
});
|
|
6175
6205
|
}
|
|
6206
|
+
this.viewContext?.links?.map((data) => {
|
|
6207
|
+
const link = document.createElement('a');
|
|
6208
|
+
let target = '_blank'; // default
|
|
6209
|
+
switch (data.target ?? Link.TargetEnum.Blank) {
|
|
6210
|
+
case 'SELF':
|
|
6211
|
+
target = '_self';
|
|
6212
|
+
break;
|
|
6213
|
+
case 'BLANK':
|
|
6214
|
+
target = '_blank';
|
|
6215
|
+
break;
|
|
6216
|
+
case 'PARENT':
|
|
6217
|
+
target = '_parent';
|
|
6218
|
+
break;
|
|
6219
|
+
case 'TOP':
|
|
6220
|
+
target = '_top';
|
|
6221
|
+
break;
|
|
6222
|
+
}
|
|
6223
|
+
link.setAttribute('target', target);
|
|
6224
|
+
link.setAttribute('href', data.url);
|
|
6225
|
+
if (data.download) {
|
|
6226
|
+
link.setAttribute('download', data.filename ?? '');
|
|
6227
|
+
}
|
|
6228
|
+
document.body.appendChild(link);
|
|
6229
|
+
link.click();
|
|
6230
|
+
link.remove();
|
|
6231
|
+
});
|
|
6176
6232
|
this.viewContextHasBeenSynced.next();
|
|
6177
6233
|
}
|
|
6234
|
+
createLink(linkData) { }
|
|
6178
6235
|
getUuidOfPage(pageName) {
|
|
6179
6236
|
let uuid = sessionStorage.getItem(pageName);
|
|
6180
6237
|
if (!uuid) {
|
|
@@ -6371,14 +6428,14 @@ class SmartViewContextService {
|
|
|
6371
6428
|
return await this.view.getComponentModel2(uuid).toPromise();
|
|
6372
6429
|
}
|
|
6373
6430
|
}
|
|
6374
|
-
SmartViewContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, deps: [{ token: ViewService }, { token: SmartSessionService }, { token: SmartNavigationService }, { token: SmartdialogService }, { token: ApiQueueService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6431
|
+
SmartViewContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, deps: [{ token: ViewService }, { token: SmartSessionService }, { token: SmartNavigationService }, { token: SmartdialogService }, { token: ApiQueueService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6375
6432
|
SmartViewContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, providedIn: 'root' });
|
|
6376
6433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, decorators: [{
|
|
6377
6434
|
type: Injectable,
|
|
6378
6435
|
args: [{
|
|
6379
6436
|
providedIn: 'root',
|
|
6380
6437
|
}]
|
|
6381
|
-
}], ctorParameters: function () { return [{ type: ViewService }, { type: SmartSessionService }, { type: SmartNavigationService }, { type: SmartdialogService }, { type: ApiQueueService }]; } });
|
|
6438
|
+
}], ctorParameters: function () { return [{ type: ViewService }, { type: SmartSessionService }, { type: SmartNavigationService }, { type: SmartdialogService }, { type: ApiQueueService }, { type: i0.Injector }]; } });
|
|
6382
6439
|
const IS_ASYNC_PARAM_NAME = 'isAsync';
|
|
6383
6440
|
class ApiQueueService {
|
|
6384
6441
|
constructor() {
|
|
@@ -7990,6 +8047,7 @@ SmartViewContextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
7990
8047
|
useClass: SmartViewContextInterceptor,
|
|
7991
8048
|
multi: true,
|
|
7992
8049
|
},
|
|
8050
|
+
{ provide: DIALOG_DISABLE_CLOSE, useValue: true },
|
|
7993
8051
|
], imports: [[
|
|
7994
8052
|
CommonModule,
|
|
7995
8053
|
HttpClientModule,
|
|
@@ -8030,6 +8088,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
8030
8088
|
useClass: SmartViewContextInterceptor,
|
|
8031
8089
|
multi: true,
|
|
8032
8090
|
},
|
|
8091
|
+
{ provide: DIALOG_DISABLE_CLOSE, useValue: true },
|
|
8033
8092
|
],
|
|
8034
8093
|
}]
|
|
8035
8094
|
}] });
|
|
@@ -9640,6 +9699,12 @@ class Configuration$1 {
|
|
|
9640
9699
|
this.basePath = configurationParameters.basePath;
|
|
9641
9700
|
this.withCredentials = configurationParameters.withCredentials;
|
|
9642
9701
|
this.encoder = configurationParameters.encoder;
|
|
9702
|
+
if (configurationParameters.encodeParam) {
|
|
9703
|
+
this.encodeParam = configurationParameters.encodeParam;
|
|
9704
|
+
}
|
|
9705
|
+
else {
|
|
9706
|
+
this.encodeParam = param => this.defaultEncodeParam(param);
|
|
9707
|
+
}
|
|
9643
9708
|
if (configurationParameters.credentials) {
|
|
9644
9709
|
this.credentials = configurationParameters.credentials;
|
|
9645
9710
|
}
|
|
@@ -9701,6 +9766,19 @@ class Configuration$1 {
|
|
|
9701
9766
|
? value()
|
|
9702
9767
|
: value;
|
|
9703
9768
|
}
|
|
9769
|
+
defaultEncodeParam(param) {
|
|
9770
|
+
// This implementation exists as fallback for missing configuration
|
|
9771
|
+
// and for backwards compatibility to older typescript-angular generator versions.
|
|
9772
|
+
// It only works for the 'simple' parameter style.
|
|
9773
|
+
// Date-handling only works for the 'date-time' format.
|
|
9774
|
+
// All other styles and Date-formats are probably handled incorrectly.
|
|
9775
|
+
//
|
|
9776
|
+
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
9777
|
+
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
9778
|
+
? param.value.toISOString()
|
|
9779
|
+
: param.value;
|
|
9780
|
+
return encodeURIComponent(String(value));
|
|
9781
|
+
}
|
|
9704
9782
|
}
|
|
9705
9783
|
|
|
9706
9784
|
/**
|
|
@@ -9724,6 +9802,9 @@ class GridService {
|
|
|
9724
9802
|
this.configuration = configuration;
|
|
9725
9803
|
}
|
|
9726
9804
|
if (typeof this.configuration.basePath !== 'string') {
|
|
9805
|
+
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
9806
|
+
basePath = basePath[0];
|
|
9807
|
+
}
|
|
9727
9808
|
if (typeof basePath !== 'string') {
|
|
9728
9809
|
basePath = this.basePath;
|
|
9729
9810
|
}
|
|
@@ -9733,7 +9814,7 @@ class GridService {
|
|
|
9733
9814
|
}
|
|
9734
9815
|
// @ts-ignore
|
|
9735
9816
|
addToHttpParams(httpParams, value, key) {
|
|
9736
|
-
if (typeof value ===
|
|
9817
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
9737
9818
|
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
9738
9819
|
}
|
|
9739
9820
|
else {
|
|
@@ -9745,27 +9826,27 @@ class GridService {
|
|
|
9745
9826
|
if (value == null) {
|
|
9746
9827
|
return httpParams;
|
|
9747
9828
|
}
|
|
9748
|
-
if (typeof value ===
|
|
9829
|
+
if (typeof value === "object") {
|
|
9749
9830
|
if (Array.isArray(value)) {
|
|
9750
|
-
value.forEach(
|
|
9831
|
+
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
9751
9832
|
}
|
|
9752
9833
|
else if (value instanceof Date) {
|
|
9753
9834
|
if (key != null) {
|
|
9754
9835
|
httpParams = httpParams.append(key, value.toISOString().substr(0, 10));
|
|
9755
9836
|
}
|
|
9756
9837
|
else {
|
|
9757
|
-
throw Error(
|
|
9838
|
+
throw Error("key may not be null if value is Date");
|
|
9758
9839
|
}
|
|
9759
9840
|
}
|
|
9760
9841
|
else {
|
|
9761
|
-
Object.keys(value).forEach(
|
|
9842
|
+
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
9762
9843
|
}
|
|
9763
9844
|
}
|
|
9764
9845
|
else if (key != null) {
|
|
9765
9846
|
httpParams = httpParams.append(key, value);
|
|
9766
9847
|
}
|
|
9767
9848
|
else {
|
|
9768
|
-
throw Error(
|
|
9849
|
+
throw Error("key may not be null if value is not object or array");
|
|
9769
9850
|
}
|
|
9770
9851
|
return httpParams;
|
|
9771
9852
|
}
|
|
@@ -9783,7 +9864,9 @@ class GridService {
|
|
|
9783
9864
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
9784
9865
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
9785
9866
|
// to determine the Accept header
|
|
9786
|
-
const httpHeaderAccepts = [
|
|
9867
|
+
const httpHeaderAccepts = [
|
|
9868
|
+
'application/json'
|
|
9869
|
+
];
|
|
9787
9870
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
9788
9871
|
}
|
|
9789
9872
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
@@ -9805,13 +9888,14 @@ class GridService {
|
|
|
9805
9888
|
responseType_ = 'blob';
|
|
9806
9889
|
}
|
|
9807
9890
|
}
|
|
9808
|
-
|
|
9891
|
+
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 })}/${this.configuration.encodeParam({ name: "rowId", value: rowId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/expand`;
|
|
9892
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9809
9893
|
context: localVarHttpContext,
|
|
9810
9894
|
responseType: responseType_,
|
|
9811
9895
|
withCredentials: this.configuration.withCredentials,
|
|
9812
9896
|
headers: localVarHeaders,
|
|
9813
9897
|
observe: observe,
|
|
9814
|
-
reportProgress: reportProgress
|
|
9898
|
+
reportProgress: reportProgress
|
|
9815
9899
|
});
|
|
9816
9900
|
}
|
|
9817
9901
|
load(uuid, gridIdentifier, observe = 'body', reportProgress = false, options) {
|
|
@@ -9825,7 +9909,9 @@ class GridService {
|
|
|
9825
9909
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
9826
9910
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
9827
9911
|
// to determine the Accept header
|
|
9828
|
-
const httpHeaderAccepts = [
|
|
9912
|
+
const httpHeaderAccepts = [
|
|
9913
|
+
'application/json'
|
|
9914
|
+
];
|
|
9829
9915
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
9830
9916
|
}
|
|
9831
9917
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
@@ -9847,13 +9933,14 @@ class GridService {
|
|
|
9847
9933
|
responseType_ = 'blob';
|
|
9848
9934
|
}
|
|
9849
9935
|
}
|
|
9850
|
-
|
|
9936
|
+
let localVarPath = `/grid/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "gridIdentifier", value: gridIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/load`;
|
|
9937
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9851
9938
|
context: localVarHttpContext,
|
|
9852
9939
|
responseType: responseType_,
|
|
9853
9940
|
withCredentials: this.configuration.withCredentials,
|
|
9854
9941
|
headers: localVarHeaders,
|
|
9855
9942
|
observe: observe,
|
|
9856
|
-
reportProgress: reportProgress
|
|
9943
|
+
reportProgress: reportProgress
|
|
9857
9944
|
});
|
|
9858
9945
|
}
|
|
9859
9946
|
select(uuid, gridId, rowId, selected, observe = 'body', reportProgress = false, options) {
|
|
@@ -9873,7 +9960,9 @@ class GridService {
|
|
|
9873
9960
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
9874
9961
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
9875
9962
|
// to determine the Accept header
|
|
9876
|
-
const httpHeaderAccepts = [
|
|
9963
|
+
const httpHeaderAccepts = [
|
|
9964
|
+
'application/json'
|
|
9965
|
+
];
|
|
9877
9966
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
9878
9967
|
}
|
|
9879
9968
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
@@ -9895,13 +9984,14 @@ class GridService {
|
|
|
9895
9984
|
responseType_ = 'blob';
|
|
9896
9985
|
}
|
|
9897
9986
|
}
|
|
9898
|
-
|
|
9987
|
+
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 })}/${this.configuration.encodeParam({ name: "rowId", value: rowId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/select`;
|
|
9988
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9899
9989
|
context: localVarHttpContext,
|
|
9900
9990
|
responseType: responseType_,
|
|
9901
9991
|
withCredentials: this.configuration.withCredentials,
|
|
9902
9992
|
headers: localVarHeaders,
|
|
9903
9993
|
observe: observe,
|
|
9904
|
-
reportProgress: reportProgress
|
|
9994
|
+
reportProgress: reportProgress
|
|
9905
9995
|
});
|
|
9906
9996
|
}
|
|
9907
9997
|
selectAll(uuid, gridId, selected, observe = 'body', reportProgress = false, options) {
|
|
@@ -9918,7 +10008,9 @@ class GridService {
|
|
|
9918
10008
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
9919
10009
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
9920
10010
|
// to determine the Accept header
|
|
9921
|
-
const httpHeaderAccepts = [
|
|
10011
|
+
const httpHeaderAccepts = [
|
|
10012
|
+
'application/json'
|
|
10013
|
+
];
|
|
9922
10014
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
9923
10015
|
}
|
|
9924
10016
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
@@ -9940,13 +10032,14 @@ class GridService {
|
|
|
9940
10032
|
responseType_ = 'blob';
|
|
9941
10033
|
}
|
|
9942
10034
|
}
|
|
9943
|
-
|
|
10035
|
+
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 })}/select`;
|
|
10036
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9944
10037
|
context: localVarHttpContext,
|
|
9945
10038
|
responseType: responseType_,
|
|
9946
10039
|
withCredentials: this.configuration.withCredentials,
|
|
9947
10040
|
headers: localVarHeaders,
|
|
9948
10041
|
observe: observe,
|
|
9949
|
-
reportProgress: reportProgress
|
|
10042
|
+
reportProgress: reportProgress
|
|
9950
10043
|
});
|
|
9951
10044
|
}
|
|
9952
10045
|
setPage(uuid, gridIdentifier, offset, limit, observe = 'body', reportProgress = false, options) {
|
|
@@ -9988,13 +10081,14 @@ class GridService {
|
|
|
9988
10081
|
responseType_ = 'blob';
|
|
9989
10082
|
}
|
|
9990
10083
|
}
|
|
9991
|
-
|
|
10084
|
+
let localVarPath = `/grid/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "gridIdentifier", value: gridIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/page/${this.configuration.encodeParam({ name: "offset", value: offset, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "limit", value: limit, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
10085
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
9992
10086
|
context: localVarHttpContext,
|
|
9993
10087
|
responseType: responseType_,
|
|
9994
10088
|
withCredentials: this.configuration.withCredentials,
|
|
9995
10089
|
headers: localVarHeaders,
|
|
9996
10090
|
observe: observe,
|
|
9997
|
-
reportProgress: reportProgress
|
|
10091
|
+
reportProgress: reportProgress
|
|
9998
10092
|
});
|
|
9999
10093
|
}
|
|
10000
10094
|
update(uuid, gridIdentifier, gridUpdateData, observe = 'body', reportProgress = false, options) {
|
|
@@ -10011,7 +10105,9 @@ class GridService {
|
|
|
10011
10105
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
10012
10106
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
10013
10107
|
// to determine the Accept header
|
|
10014
|
-
const httpHeaderAccepts = [
|
|
10108
|
+
const httpHeaderAccepts = [
|
|
10109
|
+
'application/json'
|
|
10110
|
+
];
|
|
10015
10111
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
10016
10112
|
}
|
|
10017
10113
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
@@ -10022,7 +10118,9 @@ class GridService {
|
|
|
10022
10118
|
localVarHttpContext = new HttpContext();
|
|
10023
10119
|
}
|
|
10024
10120
|
// to determine the Content-Type header
|
|
10025
|
-
const consumes = [
|
|
10121
|
+
const consumes = [
|
|
10122
|
+
'application/json'
|
|
10123
|
+
];
|
|
10026
10124
|
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
10027
10125
|
if (httpContentTypeSelected !== undefined) {
|
|
10028
10126
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
@@ -10039,13 +10137,15 @@ class GridService {
|
|
|
10039
10137
|
responseType_ = 'blob';
|
|
10040
10138
|
}
|
|
10041
10139
|
}
|
|
10042
|
-
|
|
10140
|
+
let localVarPath = `/grid/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "gridIdentifier", value: gridIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/update`;
|
|
10141
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
10043
10142
|
context: localVarHttpContext,
|
|
10143
|
+
body: gridUpdateData,
|
|
10044
10144
|
responseType: responseType_,
|
|
10045
10145
|
withCredentials: this.configuration.withCredentials,
|
|
10046
10146
|
headers: localVarHeaders,
|
|
10047
10147
|
observe: observe,
|
|
10048
|
-
reportProgress: reportProgress
|
|
10148
|
+
reportProgress: reportProgress
|
|
10049
10149
|
});
|
|
10050
10150
|
}
|
|
10051
10151
|
}
|
|
@@ -10054,7 +10154,7 @@ GridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version:
|
|
|
10054
10154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: GridService, decorators: [{
|
|
10055
10155
|
type: Injectable,
|
|
10056
10156
|
args: [{
|
|
10057
|
-
providedIn: 'root'
|
|
10157
|
+
providedIn: 'root'
|
|
10058
10158
|
}]
|
|
10059
10159
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
10060
10160
|
type: Optional
|
|
@@ -10184,23 +10284,18 @@ class SmartGridService extends SmartdialogService {
|
|
|
10184
10284
|
this.gridModelChanged = new Subject();
|
|
10185
10285
|
}
|
|
10186
10286
|
async load(uuid, gridIdentifier) {
|
|
10187
|
-
|
|
10188
|
-
this.
|
|
10189
|
-
this.pageSize = this.gridModel.pageSize;
|
|
10190
|
-
this.gridModelChanged.next();
|
|
10287
|
+
let gridModelResult = await lastValueFrom(this.api.load(uuid, gridIdentifier));
|
|
10288
|
+
this.updateGrid(gridModelResult, 'load');
|
|
10191
10289
|
}
|
|
10192
10290
|
async setPage(uuid, gridIdentifier, offset, limit) {
|
|
10193
10291
|
await lastValueFrom(this.api.setPage(uuid, gridIdentifier, offset, limit));
|
|
10194
10292
|
await this.load(uuid, gridIdentifier);
|
|
10195
10293
|
}
|
|
10196
10294
|
async sort(smartGrid, gridUpdateData) {
|
|
10197
|
-
let
|
|
10295
|
+
let gridModelResult = await this.api
|
|
10198
10296
|
.update(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, gridUpdateData)
|
|
10199
10297
|
.toPromise();
|
|
10200
|
-
|
|
10201
|
-
this.gridModel = gridModel;
|
|
10202
|
-
this.gridModelChanged.next();
|
|
10203
|
-
}
|
|
10298
|
+
this.updateGrid(gridModelResult, 'sort');
|
|
10204
10299
|
}
|
|
10205
10300
|
async expand(smartGrid, rowId) {
|
|
10206
10301
|
return await this.api
|
|
@@ -10219,11 +10314,8 @@ class SmartGridService extends SmartdialogService {
|
|
|
10219
10314
|
.toPromise();
|
|
10220
10315
|
}
|
|
10221
10316
|
async update(uuid, identifier, updateData) {
|
|
10222
|
-
let
|
|
10223
|
-
|
|
10224
|
-
this.gridModel = res;
|
|
10225
|
-
this.gridModelChanged.next();
|
|
10226
|
-
}
|
|
10317
|
+
let gridModelResult = await this.api.update(uuid, identifier, updateData).toPromise();
|
|
10318
|
+
this.updateGrid(gridModelResult, 'update');
|
|
10227
10319
|
}
|
|
10228
10320
|
async closeDialog() {
|
|
10229
10321
|
this.dialog.closeAll();
|
|
@@ -10231,6 +10323,15 @@ class SmartGridService extends SmartdialogService {
|
|
|
10231
10323
|
handleAfterClosed() {
|
|
10232
10324
|
this.gridModelChanged.next();
|
|
10233
10325
|
}
|
|
10326
|
+
updateGrid(gridModel, method) {
|
|
10327
|
+
if (gridModel) {
|
|
10328
|
+
this.gridModel = gridModel;
|
|
10329
|
+
this.gridModelChanged.next();
|
|
10330
|
+
}
|
|
10331
|
+
else {
|
|
10332
|
+
console.error(`GridModel is undefined in service after ${method}!`);
|
|
10333
|
+
}
|
|
10334
|
+
}
|
|
10234
10335
|
}
|
|
10235
10336
|
SmartGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartGridService, deps: [{ token: GridService }, { token: i1$2.MatDialog }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10236
10337
|
SmartGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartGridService, providedIn: 'root' });
|
|
@@ -10825,18 +10926,18 @@ class SmartGridComponent {
|
|
|
10825
10926
|
constructor(service, cfService) {
|
|
10826
10927
|
this.service = service;
|
|
10827
10928
|
this.cfService = cfService;
|
|
10929
|
+
this.defaultPageSize = 10;
|
|
10930
|
+
this.defaultPageSizeOptions = [5, 10, 25, 50];
|
|
10828
10931
|
this._destroy$ = new Subject();
|
|
10829
10932
|
this.dev = false;
|
|
10830
|
-
this.pageSizeOptions =
|
|
10933
|
+
this.pageSizeOptions = this.defaultPageSizeOptions;
|
|
10831
10934
|
this.selectionChanges = new Subject();
|
|
10832
10935
|
this.uiActionDescriptors = new Map();
|
|
10833
10936
|
this.afterViewInitExecuted = false;
|
|
10834
10937
|
this.isBlocked = true;
|
|
10835
10938
|
this.service.gridModelChanged.subscribe(() => {
|
|
10939
|
+
// called after every service call (load, save, refresh, etc.)
|
|
10836
10940
|
this.smartGrid.gridModel = this.service.gridModel;
|
|
10837
|
-
if (this.service.gridModel.pageSizeOptions) {
|
|
10838
|
-
this.pageSizeOptions = this.service.gridModel.pageSizeOptions;
|
|
10839
|
-
}
|
|
10840
10941
|
this.render();
|
|
10841
10942
|
});
|
|
10842
10943
|
}
|
|
@@ -10857,6 +10958,8 @@ class SmartGridComponent {
|
|
|
10857
10958
|
}
|
|
10858
10959
|
ngAfterViewInit() {
|
|
10859
10960
|
if (this.dev) {
|
|
10961
|
+
// for dev purposes
|
|
10962
|
+
this.service.gridModel = this.smartGrid.gridModel;
|
|
10860
10963
|
this.render();
|
|
10861
10964
|
}
|
|
10862
10965
|
if (this.uuid && this.smartGrid && !this.dev) {
|
|
@@ -10878,15 +10981,27 @@ class SmartGridComponent {
|
|
|
10878
10981
|
* grid with the newest one.
|
|
10879
10982
|
*/
|
|
10880
10983
|
async refresh() {
|
|
10984
|
+
// will cause this.service.gridModelChanged to fire
|
|
10881
10985
|
await this.service.load(this.uuid, this.smartGrid.gridIdentifier);
|
|
10882
|
-
this.length = this.service.gridModel.totalRowCount;
|
|
10883
|
-
this.pageSize = this.service.gridModel.pageSize ?? 5;
|
|
10884
10986
|
}
|
|
10885
10987
|
async render() {
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10988
|
+
const gridModel = this.smartGrid?.gridModel;
|
|
10989
|
+
if (gridModel) {
|
|
10990
|
+
this.length = gridModel.totalRowCount;
|
|
10991
|
+
this.pageSize = gridModel.pageSize ?? this.defaultPageSize;
|
|
10992
|
+
if (gridModel.pageSizeOptions && gridModel.pageSizeOptions.length > 0) {
|
|
10993
|
+
this.pageSizeOptions = gridModel.pageSizeOptions;
|
|
10994
|
+
}
|
|
10995
|
+
else {
|
|
10996
|
+
this.pageSizeOptions = this.defaultPageSizeOptions;
|
|
10997
|
+
}
|
|
10998
|
+
if (gridModel?.view?.descriptor?.showEditColumns) {
|
|
10999
|
+
this.smartGrid.showEditColumns = gridModel?.view?.descriptor?.showEditColumns;
|
|
11000
|
+
}
|
|
11001
|
+
}
|
|
11002
|
+
else {
|
|
11003
|
+
console.error('GridModel is undefined in component!');
|
|
11004
|
+
}
|
|
10890
11005
|
if (this.smartGrid.layoutDef === SmartLayoutDef.TABLE) {
|
|
10891
11006
|
this.renderTable();
|
|
10892
11007
|
}
|
|
@@ -12669,5 +12784,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
12669
12784
|
* Generated bundle index. Do not edit.
|
|
12670
12785
|
*/
|
|
12671
12786
|
|
|
12672
|
-
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$4 as BASE_PATH, COLLECTION_FORMATS$4 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$4 as Configuration, DataChangeKind, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator, FilterExpressionBuilderGroup, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderBy, GridDataAccessConfig, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptor, IS_ASYNC_PARAM_NAME, LayoutDirection, MessageOptionType, MessageType, SelectionDefinition, SessionAPIS, SessionErrorBehaviour, SessionService, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterModule, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
12787
|
+
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$4 as BASE_PATH, COLLECTION_FORMATS$4 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$4 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator, FilterExpressionBuilderGroup, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderBy, GridDataAccessConfig, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptor, IS_ASYNC_PARAM_NAME, LayoutDirection, Link, MessageOptionType, MessageType, SelectionDefinition, SessionAPIS, SessionErrorBehaviour, SessionService, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterModule, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
12673
12788
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|