@smartbit4all/ng-client 1.0.0 → 1.0.1
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-client/projects.mjs +6 -0
- package/esm2020/lib/smart-client/smart-authentication.service.mjs +15 -0
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +87 -0
- package/esm2020/lib/smart-client/smart.component.mjs +31 -0
- package/esm2020/lib/smart-client/smart.service.mjs +31 -0
- package/esm2020/lib/smart-client/smart.subject.mjs +13 -0
- package/esm2020/lib/smart-ng-client.module.mjs +2 -2
- package/esm2020/lib/view-context/api/api/view.service.mjs +130 -1
- package/esm2020/lib/view-context/api/api.module.mjs +15 -15
- package/esm2020/lib/view-context/api/configuration.mjs +2 -2
- package/esm2020/lib/view-context/api/model/componentModel.mjs +13 -0
- package/esm2020/lib/view-context/api/model/componentModelChange.mjs +13 -0
- package/esm2020/lib/view-context/api/model/messageData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/messageOption.mjs +1 -1
- package/esm2020/lib/view-context/api/model/models.mjs +4 -1
- package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/view.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextChange.mjs +2 -0
- package/esm2020/lib/view-context/api/model/viewData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewStateUpdate.mjs +1 -1
- package/esm2020/lib/view-context/smart-view-context.service.mjs +26 -1
- package/esm2020/projects.mjs +2 -1
- package/fesm2015/smartbit4all-ng-client.mjs +339 -15
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +351 -14
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/projects.d.ts +5 -0
- package/lib/smart-client/smart-authentication.service.d.ts +12 -0
- package/lib/smart-client/smart-component-api-client.d.ts +31 -0
- package/lib/smart-client/smart.component.d.ts +12 -0
- package/lib/smart-client/smart.service.d.ts +12 -0
- package/lib/smart-client/smart.subject.d.ts +6 -0
- package/lib/view-context/api/api/view.service.d.ts +58 -0
- package/lib/view-context/api/api.module.d.ts +9 -9
- package/lib/view-context/api/model/componentModel.d.ts +33 -0
- package/lib/view-context/api/model/componentModelChange.d.ts +19 -0
- package/lib/view-context/api/model/messageData.d.ts +2 -0
- package/lib/view-context/api/model/messageOption.d.ts +2 -0
- package/lib/view-context/api/model/models.d.ts +3 -0
- package/lib/view-context/api/model/uiAction.d.ts +3 -0
- package/lib/view-context/api/model/uiActionDescriptor.d.ts +2 -0
- package/lib/view-context/api/model/view.d.ts +7 -0
- package/lib/view-context/api/model/viewContextChange.d.ts +20 -0
- package/lib/view-context/api/model/viewData.d.ts +2 -0
- package/lib/view-context/api/model/viewStateUpdate.d.ts +2 -0
- package/lib/view-context/smart-view-context.service.d.ts +8 -1
- package/package.json +1 -1
- package/projects.d.ts +1 -0
- package/smartbit4all-ng-client-1.0.1.tgz +0 -0
- package/smartbit4all-ng-client-1.0.0.tgz +0 -0
|
@@ -26,6 +26,7 @@ import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-b
|
|
|
26
26
|
import { Validators } from '@angular/forms';
|
|
27
27
|
import * as i5$1 from '@smartbit4all/form';
|
|
28
28
|
import { SmartFormWidgetType, SmartFormWidgetDirection, SmartValidatorName, SmartformModule } from '@smartbit4all/form';
|
|
29
|
+
import { __decorate, __param } from 'tslib';
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* Custom HttpParameterCodec
|
|
@@ -1033,7 +1034,7 @@ class Configuration {
|
|
|
1033
1034
|
// All other styles and Date-formats are probably handled incorrectly.
|
|
1034
1035
|
//
|
|
1035
1036
|
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
1036
|
-
const value = param.dataFormat === 'date-time'
|
|
1037
|
+
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
1037
1038
|
? param.value.toISOString()
|
|
1038
1039
|
: param.value;
|
|
1039
1040
|
return encodeURIComponent(String(value));
|
|
@@ -1171,6 +1172,39 @@ class ViewService {
|
|
|
1171
1172
|
if (localVarHttpContext === undefined) {
|
|
1172
1173
|
localVarHttpContext = new HttpContext();
|
|
1173
1174
|
}
|
|
1175
|
+
let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/download/${this.configuration.encodeParam({ name: "item", value: item, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
1176
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
1177
|
+
context: localVarHttpContext,
|
|
1178
|
+
responseType: "blob",
|
|
1179
|
+
withCredentials: this.configuration.withCredentials,
|
|
1180
|
+
headers: localVarHeaders,
|
|
1181
|
+
observe: observe,
|
|
1182
|
+
reportProgress: reportProgress
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
downloadItemDeprecated(uuid, item, observe = 'body', reportProgress = false, options) {
|
|
1186
|
+
if (uuid === null || uuid === undefined) {
|
|
1187
|
+
throw new Error('Required parameter uuid was null or undefined when calling downloadItemDeprecated.');
|
|
1188
|
+
}
|
|
1189
|
+
if (item === null || item === undefined) {
|
|
1190
|
+
throw new Error('Required parameter item was null or undefined when calling downloadItemDeprecated.');
|
|
1191
|
+
}
|
|
1192
|
+
let localVarHeaders = this.defaultHeaders;
|
|
1193
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
1194
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
1195
|
+
// to determine the Accept header
|
|
1196
|
+
const httpHeaderAccepts = [
|
|
1197
|
+
'application/octet-stream'
|
|
1198
|
+
];
|
|
1199
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
1200
|
+
}
|
|
1201
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
1202
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
1203
|
+
}
|
|
1204
|
+
let localVarHttpContext = options && options.context;
|
|
1205
|
+
if (localVarHttpContext === undefined) {
|
|
1206
|
+
localVarHttpContext = new HttpContext();
|
|
1207
|
+
}
|
|
1174
1208
|
let localVarPath = `/view/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/download/${this.configuration.encodeParam({ name: "item", value: item, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
1175
1209
|
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
1176
1210
|
context: localVarHttpContext,
|
|
@@ -1181,6 +1215,48 @@ class ViewService {
|
|
|
1181
1215
|
reportProgress: reportProgress
|
|
1182
1216
|
});
|
|
1183
1217
|
}
|
|
1218
|
+
getComponentModel(uuid, observe = 'body', reportProgress = false, options) {
|
|
1219
|
+
if (uuid === null || uuid === undefined) {
|
|
1220
|
+
throw new Error('Required parameter uuid was null or undefined when calling getComponentModel.');
|
|
1221
|
+
}
|
|
1222
|
+
let localVarHeaders = this.defaultHeaders;
|
|
1223
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
1224
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
1225
|
+
// to determine the Accept header
|
|
1226
|
+
const httpHeaderAccepts = [
|
|
1227
|
+
'application/json'
|
|
1228
|
+
];
|
|
1229
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
1230
|
+
}
|
|
1231
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
1232
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
1233
|
+
}
|
|
1234
|
+
let localVarHttpContext = options && options.context;
|
|
1235
|
+
if (localVarHttpContext === undefined) {
|
|
1236
|
+
localVarHttpContext = new HttpContext();
|
|
1237
|
+
}
|
|
1238
|
+
let responseType_ = 'json';
|
|
1239
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
1240
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
1241
|
+
responseType_ = 'text';
|
|
1242
|
+
}
|
|
1243
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
1244
|
+
responseType_ = 'json';
|
|
1245
|
+
}
|
|
1246
|
+
else {
|
|
1247
|
+
responseType_ = 'blob';
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}`;
|
|
1251
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
1252
|
+
context: localVarHttpContext,
|
|
1253
|
+
responseType: responseType_,
|
|
1254
|
+
withCredentials: this.configuration.withCredentials,
|
|
1255
|
+
headers: localVarHeaders,
|
|
1256
|
+
observe: observe,
|
|
1257
|
+
reportProgress: reportProgress
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1184
1260
|
getViewConstraint(uuid, observe = 'body', reportProgress = false, options) {
|
|
1185
1261
|
if (uuid === null || uuid === undefined) {
|
|
1186
1262
|
throw new Error('Required parameter uuid was null or undefined when calling getViewConstraint.');
|
|
@@ -1320,6 +1396,60 @@ class ViewService {
|
|
|
1320
1396
|
reportProgress: reportProgress
|
|
1321
1397
|
});
|
|
1322
1398
|
}
|
|
1399
|
+
performAction(uuid, body, observe = 'body', reportProgress = false, options) {
|
|
1400
|
+
if (uuid === null || uuid === undefined) {
|
|
1401
|
+
throw new Error('Required parameter uuid was null or undefined when calling performAction.');
|
|
1402
|
+
}
|
|
1403
|
+
if (body === null || body === undefined) {
|
|
1404
|
+
throw new Error('Required parameter body was null or undefined when calling performAction.');
|
|
1405
|
+
}
|
|
1406
|
+
let localVarHeaders = this.defaultHeaders;
|
|
1407
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
1408
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
1409
|
+
// to determine the Accept header
|
|
1410
|
+
const httpHeaderAccepts = [
|
|
1411
|
+
'application/json'
|
|
1412
|
+
];
|
|
1413
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
1414
|
+
}
|
|
1415
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
1416
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
1417
|
+
}
|
|
1418
|
+
let localVarHttpContext = options && options.context;
|
|
1419
|
+
if (localVarHttpContext === undefined) {
|
|
1420
|
+
localVarHttpContext = new HttpContext();
|
|
1421
|
+
}
|
|
1422
|
+
// to determine the Content-Type header
|
|
1423
|
+
const consumes = [
|
|
1424
|
+
'application/json'
|
|
1425
|
+
];
|
|
1426
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
1427
|
+
if (httpContentTypeSelected !== undefined) {
|
|
1428
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
1429
|
+
}
|
|
1430
|
+
let responseType_ = 'json';
|
|
1431
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
1432
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
1433
|
+
responseType_ = 'text';
|
|
1434
|
+
}
|
|
1435
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
1436
|
+
responseType_ = 'json';
|
|
1437
|
+
}
|
|
1438
|
+
else {
|
|
1439
|
+
responseType_ = 'blob';
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/action`;
|
|
1443
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
1444
|
+
context: localVarHttpContext,
|
|
1445
|
+
body: body,
|
|
1446
|
+
responseType: responseType_,
|
|
1447
|
+
withCredentials: this.configuration.withCredentials,
|
|
1448
|
+
headers: localVarHeaders,
|
|
1449
|
+
observe: observe,
|
|
1450
|
+
reportProgress: reportProgress
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1323
1453
|
showPublishedView(channel, uuid, observe = 'body', reportProgress = false, options) {
|
|
1324
1454
|
if (channel === null || channel === undefined) {
|
|
1325
1455
|
throw new Error('Required parameter channel was null or undefined when calling showPublishedView.');
|
|
@@ -1450,6 +1580,30 @@ const CloseResult = {
|
|
|
1450
1580
|
Rejected: 'rejected'
|
|
1451
1581
|
};
|
|
1452
1582
|
|
|
1583
|
+
/**
|
|
1584
|
+
* View API
|
|
1585
|
+
* View API
|
|
1586
|
+
*
|
|
1587
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1588
|
+
* Contact: info@it4all.hu
|
|
1589
|
+
*
|
|
1590
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1591
|
+
* https://openapi-generator.tech
|
|
1592
|
+
* Do not edit the class manually.
|
|
1593
|
+
*/
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* View API
|
|
1597
|
+
* View API
|
|
1598
|
+
*
|
|
1599
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1600
|
+
* Contact: info@it4all.hu
|
|
1601
|
+
*
|
|
1602
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1603
|
+
* https://openapi-generator.tech
|
|
1604
|
+
* Do not edit the class manually.
|
|
1605
|
+
*/
|
|
1606
|
+
|
|
1453
1607
|
/**
|
|
1454
1608
|
* View API
|
|
1455
1609
|
* View API
|
|
@@ -1630,35 +1784,35 @@ const ViewType = {
|
|
|
1630
1784
|
Embedded: 'embedded'
|
|
1631
1785
|
};
|
|
1632
1786
|
|
|
1633
|
-
class
|
|
1787
|
+
class ApiModule {
|
|
1634
1788
|
constructor(parentModule, http) {
|
|
1635
1789
|
if (parentModule) {
|
|
1636
|
-
throw new Error(
|
|
1790
|
+
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
|
|
1637
1791
|
}
|
|
1638
1792
|
if (!http) {
|
|
1639
|
-
throw new Error(
|
|
1640
|
-
|
|
1793
|
+
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
|
|
1794
|
+
'See also https://github.com/angular/angular/issues/20575');
|
|
1641
1795
|
}
|
|
1642
1796
|
}
|
|
1643
1797
|
static forRoot(configurationFactory) {
|
|
1644
1798
|
return {
|
|
1645
|
-
ngModule:
|
|
1646
|
-
providers: [{ provide: Configuration, useFactory: configurationFactory }]
|
|
1799
|
+
ngModule: ApiModule,
|
|
1800
|
+
providers: [{ provide: Configuration, useFactory: configurationFactory }]
|
|
1647
1801
|
};
|
|
1648
1802
|
}
|
|
1649
1803
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type:
|
|
1804
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1805
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ApiModule });
|
|
1806
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ApiModule, providers: [], imports: [[]] });
|
|
1807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ApiModule, decorators: [{
|
|
1654
1808
|
type: NgModule,
|
|
1655
1809
|
args: [{
|
|
1656
1810
|
imports: [],
|
|
1657
1811
|
declarations: [],
|
|
1658
1812
|
exports: [],
|
|
1659
|
-
providers: []
|
|
1813
|
+
providers: []
|
|
1660
1814
|
}]
|
|
1661
|
-
}], ctorParameters: function () { return [{ type:
|
|
1815
|
+
}], ctorParameters: function () { return [{ type: ApiModule, decorators: [{
|
|
1662
1816
|
type: Optional
|
|
1663
1817
|
}, {
|
|
1664
1818
|
type: SkipSelf
|
|
@@ -1737,6 +1891,7 @@ class SmartViewContextService {
|
|
|
1737
1891
|
this.openSmartLink = new Subject();
|
|
1738
1892
|
this.isOpeningSmartLink = false;
|
|
1739
1893
|
this.dialogRefs = [];
|
|
1894
|
+
this.smartApiClients = new Map();
|
|
1740
1895
|
this.translateServiceChanged = new Subject();
|
|
1741
1896
|
}
|
|
1742
1897
|
set translateService(translateService) {
|
|
@@ -1750,6 +1905,12 @@ class SmartViewContextService {
|
|
|
1750
1905
|
}
|
|
1751
1906
|
return undefined;
|
|
1752
1907
|
}
|
|
1908
|
+
follow(uuid, detectChange) {
|
|
1909
|
+
this.smartApiClients.set(uuid, detectChange);
|
|
1910
|
+
}
|
|
1911
|
+
unfollow(uuid) {
|
|
1912
|
+
this.smartApiClients.delete(uuid);
|
|
1913
|
+
}
|
|
1753
1914
|
setActionDescriptors(actionDescriptors) {
|
|
1754
1915
|
this.actionDescriptors = actionDescriptors;
|
|
1755
1916
|
}
|
|
@@ -2013,6 +2174,24 @@ class SmartViewContextService {
|
|
|
2013
2174
|
async downloadResource(uuid, item) {
|
|
2014
2175
|
return await this.view.downloadItem(uuid, item).toPromise();
|
|
2015
2176
|
}
|
|
2177
|
+
async performAction(uuid, uiActionRequest) {
|
|
2178
|
+
let viewContextChange = await this.view.performAction(uuid, uiActionRequest).toPromise();
|
|
2179
|
+
this.viewContext = viewContextChange?.viewContext;
|
|
2180
|
+
if (viewContextChange?.changes) {
|
|
2181
|
+
this.handleChanges(viewContextChange.changes);
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
handleChanges(changes) {
|
|
2185
|
+
changes.forEach((componentModelChange) => {
|
|
2186
|
+
let detectChange = this.smartApiClients.get(componentModelChange.uuid);
|
|
2187
|
+
if (detectChange) {
|
|
2188
|
+
detectChange.next(componentModelChange.value);
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2192
|
+
async load(uuid) {
|
|
2193
|
+
return await this.view.getComponentModel(uuid).toPromise();
|
|
2194
|
+
}
|
|
2016
2195
|
}
|
|
2017
2196
|
SmartViewContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartViewContextService, deps: [{ token: ViewService }, { token: SmartSessionService }, { token: i3$1.SmartNavigationService }, { token: i4.SmartdialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2018
2197
|
SmartViewContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartViewContextService, providedIn: "root" });
|
|
@@ -3411,6 +3590,164 @@ var UiActionDialogType;
|
|
|
3411
3590
|
* Public API Surface of smart-view-context
|
|
3412
3591
|
*/
|
|
3413
3592
|
|
|
3593
|
+
class SmartAuthenticationService {
|
|
3594
|
+
constructor() {
|
|
3595
|
+
this.bffApisHaveBeenSetUp = false;
|
|
3596
|
+
this.headersUpdated = new Subject();
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
SmartAuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthenticationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3600
|
+
SmartAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthenticationService });
|
|
3601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthenticationService, decorators: [{
|
|
3602
|
+
type: Injectable
|
|
3603
|
+
}] });
|
|
3604
|
+
|
|
3605
|
+
class SmartSubject extends Subject {
|
|
3606
|
+
constructor(unsubscribe$) {
|
|
3607
|
+
super();
|
|
3608
|
+
this.unsubscribe$ = unsubscribe$;
|
|
3609
|
+
}
|
|
3610
|
+
subscribe(next, error, complete) {
|
|
3611
|
+
const subscription = super.subscribe(next, error, complete);
|
|
3612
|
+
subscription.add(this.unsubscribe$.subscribe());
|
|
3613
|
+
return subscription;
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
let SmartComponentApiClient = class SmartComponentApiClient {
|
|
3618
|
+
constructor(auth, viewContext, pageName) {
|
|
3619
|
+
this.auth = auth;
|
|
3620
|
+
this.viewContext = viewContext;
|
|
3621
|
+
this.pageName = pageName;
|
|
3622
|
+
this._destroy$ = new Subject();
|
|
3623
|
+
this.detectChange = new SmartSubject(this._destroy$);
|
|
3624
|
+
this.modelChanged = new SmartSubject(this._destroy$);
|
|
3625
|
+
// UseUiAction
|
|
3626
|
+
this.submit = new SmartSubject(this._destroy$);
|
|
3627
|
+
this.reSubscribeToChange = new SmartSubject(this._destroy$);
|
|
3628
|
+
this.detectChange.subscribe((data) => {
|
|
3629
|
+
this.data = data;
|
|
3630
|
+
});
|
|
3631
|
+
}
|
|
3632
|
+
get uuid() {
|
|
3633
|
+
return this._uuid;
|
|
3634
|
+
}
|
|
3635
|
+
set uuid(uuid) {
|
|
3636
|
+
this._uuid = uuid;
|
|
3637
|
+
this.viewContext.follow(this._uuid, this.detectChange);
|
|
3638
|
+
}
|
|
3639
|
+
get model() {
|
|
3640
|
+
return this._model;
|
|
3641
|
+
}
|
|
3642
|
+
set model(model) {
|
|
3643
|
+
this._model = model;
|
|
3644
|
+
if (model?.data) {
|
|
3645
|
+
this.data = model?.data;
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
get data() {
|
|
3649
|
+
return this._data;
|
|
3650
|
+
}
|
|
3651
|
+
set data(model) {
|
|
3652
|
+
this._data = model;
|
|
3653
|
+
this.modelChanged.next();
|
|
3654
|
+
}
|
|
3655
|
+
_ngOnInit() {
|
|
3656
|
+
this.run();
|
|
3657
|
+
}
|
|
3658
|
+
_ngOnDestroy() {
|
|
3659
|
+
this.viewContext.unfollow(this.uuid);
|
|
3660
|
+
this._destroy$.next();
|
|
3661
|
+
this._destroy$.complete();
|
|
3662
|
+
}
|
|
3663
|
+
run() {
|
|
3664
|
+
if (this.auth.bffApisHaveBeenSetUp) {
|
|
3665
|
+
this.load();
|
|
3666
|
+
}
|
|
3667
|
+
else {
|
|
3668
|
+
this.auth.headersUpdated.subscribe(() => {
|
|
3669
|
+
this.load();
|
|
3670
|
+
});
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
getAdditionalParams(uiAction) {
|
|
3674
|
+
return {
|
|
3675
|
+
forTextArea: "",
|
|
3676
|
+
forTextField: "",
|
|
3677
|
+
};
|
|
3678
|
+
}
|
|
3679
|
+
getModel() {
|
|
3680
|
+
return this.data;
|
|
3681
|
+
}
|
|
3682
|
+
// this should not be abstract
|
|
3683
|
+
async performUiActionRequest(uiActionRequest) {
|
|
3684
|
+
await this.viewContext.performAction(this.uuid, uiActionRequest);
|
|
3685
|
+
}
|
|
3686
|
+
handleSpecificDemandsAsynchronously(uiAction, uiActionRequest) {
|
|
3687
|
+
throw new Error("handleSpecificDemandsAsynchronously method not implemented.");
|
|
3688
|
+
}
|
|
3689
|
+
// this should not be abstract
|
|
3690
|
+
async load() {
|
|
3691
|
+
this.uuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
3692
|
+
this.model = await this.viewContext.load(this.uuid);
|
|
3693
|
+
}
|
|
3694
|
+
};
|
|
3695
|
+
SmartComponentApiClient = __decorate([
|
|
3696
|
+
__param(2, Inject("pageName"))
|
|
3697
|
+
], SmartComponentApiClient);
|
|
3698
|
+
|
|
3699
|
+
class SmartComponent extends SmartComponentApiClient {
|
|
3700
|
+
constructor(auth, viewContext, pageName) {
|
|
3701
|
+
super(auth, viewContext, pageName);
|
|
3702
|
+
}
|
|
3703
|
+
ngOnInit() {
|
|
3704
|
+
this._ngOnInit();
|
|
3705
|
+
}
|
|
3706
|
+
ngOnDestroy() {
|
|
3707
|
+
this._ngOnDestroy();
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
SmartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartComponent, deps: [{ token: SmartAuthenticationService }, { token: SmartViewContextService }, { token: "pageName" }], target: i0.ɵɵFactoryTarget.Component });
|
|
3711
|
+
SmartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "", isInline: true });
|
|
3712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartComponent, decorators: [{
|
|
3713
|
+
type: Component,
|
|
3714
|
+
args: [{
|
|
3715
|
+
template: "",
|
|
3716
|
+
}]
|
|
3717
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3718
|
+
type: Inject,
|
|
3719
|
+
args: [SmartAuthenticationService]
|
|
3720
|
+
}] }, { type: SmartViewContextService }, { type: undefined, decorators: [{
|
|
3721
|
+
type: Inject,
|
|
3722
|
+
args: ["pageName"]
|
|
3723
|
+
}] }]; } });
|
|
3724
|
+
|
|
3725
|
+
class SmartService extends SmartComponentApiClient {
|
|
3726
|
+
constructor(auth, viewContext, pageName) {
|
|
3727
|
+
super(auth, viewContext, pageName);
|
|
3728
|
+
}
|
|
3729
|
+
ngOnInit() {
|
|
3730
|
+
this._ngOnInit();
|
|
3731
|
+
}
|
|
3732
|
+
ngOnDestroy() {
|
|
3733
|
+
this._ngOnDestroy();
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
SmartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartService, deps: [{ token: SmartAuthenticationService }, { token: SmartViewContextService }, { token: "pageName" }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3737
|
+
SmartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartService, providedIn: "root" });
|
|
3738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartService, decorators: [{
|
|
3739
|
+
type: Injectable,
|
|
3740
|
+
args: [{
|
|
3741
|
+
providedIn: "root",
|
|
3742
|
+
}]
|
|
3743
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3744
|
+
type: Inject,
|
|
3745
|
+
args: [SmartAuthenticationService]
|
|
3746
|
+
}] }, { type: SmartViewContextService }, { type: undefined, decorators: [{
|
|
3747
|
+
type: Inject,
|
|
3748
|
+
args: ["pageName"]
|
|
3749
|
+
}] }]; } });
|
|
3750
|
+
|
|
3414
3751
|
/*
|
|
3415
3752
|
* Public API Surface of smart-ng-client
|
|
3416
3753
|
*/
|
|
@@ -3419,5 +3756,5 @@ var UiActionDialogType;
|
|
|
3419
3756
|
* Generated bundle index. Do not edit.
|
|
3420
3757
|
*/
|
|
3421
3758
|
|
|
3422
|
-
export { APIS, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent,
|
|
3759
|
+
export { APIS, ApiModule, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthenticationService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewService, ViewState, ViewType };
|
|
3423
3760
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|