@smartbit4all/ng-client 1.0.29 → 1.1.0

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.
Files changed (27) hide show
  1. package/esm2020/lib/smart-client/smart-component-api-client.mjs +131 -7
  2. package/esm2020/lib/view-context/api/api/view.service.mjs +55 -1
  3. package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
  4. package/esm2020/lib/view-context/api/model/componentModelChange.mjs +1 -1
  5. package/esm2020/lib/view-context/api/model/dataChange.mjs +2 -0
  6. package/esm2020/lib/view-context/api/model/dataChangeEvent.mjs +2 -0
  7. package/esm2020/lib/view-context/api/model/dataChangeKind.mjs +17 -0
  8. package/esm2020/lib/view-context/api/model/models.mjs +5 -1
  9. package/esm2020/lib/view-context/api/model/view.mjs +1 -1
  10. package/esm2020/lib/view-context/api/model/viewEventHandler.mjs +20 -0
  11. package/fesm2015/smartbit4all-ng-client.mjs +222 -6
  12. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  13. package/fesm2020/smartbit4all-ng-client.mjs +221 -6
  14. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  15. package/lib/smart-client/smart-component-api-client.d.ts +24 -3
  16. package/lib/view-context/api/api/view.service.d.ts +20 -0
  17. package/lib/view-context/api/model/componentModel.d.ts +0 -6
  18. package/lib/view-context/api/model/componentModelChange.d.ts +10 -0
  19. package/lib/view-context/api/model/dataChange.d.ts +27 -0
  20. package/lib/view-context/api/model/dataChangeEvent.d.ts +33 -0
  21. package/lib/view-context/api/model/dataChangeKind.d.ts +20 -0
  22. package/lib/view-context/api/model/models.d.ts +4 -0
  23. package/lib/view-context/api/model/view.d.ts +22 -1
  24. package/lib/view-context/api/model/viewEventHandler.d.ts +30 -0
  25. package/package.json +1 -1
  26. package/smartbit4all-ng-client-1.1.0.tgz +0 -0
  27. package/smartbit4all-ng-client-1.0.29.tgz +0 -0
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMapp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biAgICB2aWV3TmFtZTogc3RyaW5nO1xuICAgIG9iamVjdFVyaT86IHN0cmluZztcbiAgICBicmFuY2hVcmk/OiBzdHJpbmc7XG4gICAgcGFyYW1ldGVyczogeyBba2V5OiBzdHJpbmddOiBhbnk7IH07XG4gICAgc3RhdGU6IFZpZXdTdGF0ZTtcbiAgICB0eXBlOiBWaWV3VHlwZTtcbiAgICBjb250YWluZXJVdWlkPzogc3RyaW5nO1xuICAgIG1vZGVsPzogb2JqZWN0O1xuICAgIGNvbnN0cmFpbnQ/OiBWaWV3Q29uc3RyYWludDtcbiAgICBjbG9zZWRDaGlsZHJlblZpZXdzOiBBcnJheTxWaWV3PjtcbiAgICBkb3dubG9hZGFibGVJdGVtczogeyBba2V5OiBzdHJpbmddOiBzdHJpbmc7IH07XG4gICAgYWN0aW9uczogQXJyYXk8VWlBY3Rpb24+O1xuICAgIHdpZGdldE1vZGVsczogeyBba2V5OiBzdHJpbmddOiBvYmplY3Q7IH07XG4gICAgdmFsdWVTZXRzPzogeyBba2V5OiBzdHJpbmddOiBWYWx1ZVNldDsgfTtcbiAgICBrZWVwTW9kZWxPbkltcGxpY2l0Q2xvc2U/OiBib29sZWFuO1xufVxuZXhwb3J0IG5hbWVzcGFjZSBWaWV3IHtcbn1cblxuXG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NtYXJ0LW5nLWNsaWVudC9zcmMvbGliL3ZpZXctY29udGV4dC9hcGkvbW9kZWwvdmlldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBWaWV3IEFQSVxuICogVmlldyBBUElcbiAqXG4gKiBUaGUgdmVyc2lvbiBvZiB0aGUgT3BlbkFQSSBkb2N1bWVudDog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ZGVyXG4gICAgICovXG4gICAgbGF5b3V0czogeyBba2V5OiBzdHJpbmddOiBTbWFydExheW91dERlZmluaXRpb247IH07XG59XG5leHBvcnQgbmFtZXNwYWNlIFZpZXcge1xufVxuXG5cbiJdfQ==
@@ -0,0 +1,20 @@
1
+ /**
2
+ * View API
3
+ * View API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export var ViewEventHandler;
13
+ (function (ViewEventHandler) {
14
+ ViewEventHandler.ViewEventTypeEnum = {
15
+ Before: 'before',
16
+ Instead: 'instead',
17
+ After: 'after',
18
+ };
19
+ })(ViewEventHandler || (ViewEventHandler = {}));
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlld0V2ZW50SGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NtYXJ0LW5nLWNsaWVudC9zcmMvbGliL3ZpZXctY29udGV4dC9hcGkvbW9kZWwvdmlld0V2ZW50SGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHO0FBYUgsTUFBTSxLQUFXLGdCQUFnQixDQU9oQztBQVBELFdBQWlCLGdCQUFnQjtJQUVsQixrQ0FBaUIsR0FBRztRQUMvQixNQUFNLEVBQUUsUUFBNkI7UUFDckMsT0FBTyxFQUFFLFNBQThCO1FBQ3ZDLEtBQUssRUFBRSxPQUE0QjtLQUNwQyxDQUFDO0FBQ0osQ0FBQyxFQVBnQixnQkFBZ0IsS0FBaEIsZ0JBQWdCLFFBT2hDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBWaWV3IEFQSVxuICogVmlldy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sZi5cbiAgICovXG4gIHBhdGg/OiBBcnJheTxzdHJpbmc+O1xuICB2aWV3RXZlbnRUeXBlPzogVmlld0V2ZW50SGFuZGxlci5WaWV3RXZlbnRUeXBlRW51bTtcbiAgaW52b2NhdGlvblJlcXVlc3REZWZpbml0aW9uPzogYW55O1xufVxuZXhwb3J0IG5hbWVzcGFjZSBWaWV3RXZlbnRIYW5kbGVyIHtcbiAgZXhwb3J0IHR5cGUgVmlld0V2ZW50VHlwZUVudW0gPSAnYmVmb3JlJyB8ICdpbnN0ZWFkJyB8ICdhZnRlcic7XG4gIGV4cG9ydCBjb25zdCBWaWV3RXZlbnRUeXBlRW51bSA9IHtcbiAgICBCZWZvcmU6ICdiZWZvcmUnIGFzIFZpZXdFdmVudFR5cGVFbnVtLFxuICAgIEluc3RlYWQ6ICdpbnN0ZWFkJyBhcyBWaWV3RXZlbnRUeXBlRW51bSxcbiAgICBBZnRlcjogJ2FmdGVyJyBhcyBWaWV3RXZlbnRUeXBlRW51bSxcbiAgfTtcbn1cbiJdfQ==
@@ -27,6 +27,7 @@ import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-b
27
27
  import { Validators } from '@angular/forms';
28
28
  import * as i5$1 from '@smartbit4all/form';
29
29
  import { SmartFormWidgetType, SmartValidatorName, SmartFormWidgetDirection, SmartformModule } from '@smartbit4all/form';
30
+ import { SmartGridComponent } from '@smartbit4all/grid';
30
31
  import { SmarttreeGenericService } from '@smartbit4all/tree';
31
32
 
32
33
  /**
@@ -1113,6 +1114,60 @@ class ViewService {
1113
1114
  reportProgress: reportProgress
1114
1115
  });
1115
1116
  }
1117
+ dataChanged(uuid, dataChange, observe = 'body', reportProgress = false, options) {
1118
+ if (uuid === null || uuid === undefined) {
1119
+ throw new Error('Required parameter uuid was null or undefined when calling dataChanged.');
1120
+ }
1121
+ if (dataChange === null || dataChange === undefined) {
1122
+ throw new Error('Required parameter dataChange was null or undefined when calling dataChanged.');
1123
+ }
1124
+ let localVarHeaders = this.defaultHeaders;
1125
+ let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1126
+ if (localVarHttpHeaderAcceptSelected === undefined) {
1127
+ // to determine the Accept header
1128
+ const httpHeaderAccepts = [
1129
+ 'application/json'
1130
+ ];
1131
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1132
+ }
1133
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1134
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1135
+ }
1136
+ let localVarHttpContext = options && options.context;
1137
+ if (localVarHttpContext === undefined) {
1138
+ localVarHttpContext = new HttpContext();
1139
+ }
1140
+ // to determine the Content-Type header
1141
+ const consumes = [
1142
+ 'application/json'
1143
+ ];
1144
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1145
+ if (httpContentTypeSelected !== undefined) {
1146
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1147
+ }
1148
+ let responseType_ = 'json';
1149
+ if (localVarHttpHeaderAcceptSelected) {
1150
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1151
+ responseType_ = 'text';
1152
+ }
1153
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1154
+ responseType_ = 'json';
1155
+ }
1156
+ else {
1157
+ responseType_ = 'blob';
1158
+ }
1159
+ }
1160
+ let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/data`;
1161
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
1162
+ context: localVarHttpContext,
1163
+ body: dataChange,
1164
+ responseType: responseType_,
1165
+ withCredentials: this.configuration.withCredentials,
1166
+ headers: localVarHeaders,
1167
+ observe: observe,
1168
+ reportProgress: reportProgress
1169
+ });
1170
+ }
1116
1171
  downloadItem(uuid, item, observe = 'body', reportProgress = false, options) {
1117
1172
  if (uuid === null || uuid === undefined) {
1118
1173
  throw new Error('Required parameter uuid was null or undefined when calling downloadItem.');
@@ -1663,6 +1718,23 @@ const CloseResult = {
1663
1718
  Rejected: 'rejected'
1664
1719
  };
1665
1720
 
1721
+ /**
1722
+ * View API
1723
+ * View API
1724
+ *
1725
+ * The version of the OpenAPI document: 1.0.0
1726
+ * Contact: info@it4all.hu
1727
+ *
1728
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1729
+ * https://openapi-generator.tech
1730
+ * Do not edit the class manually.
1731
+ */
1732
+ const DataChangeKind = {
1733
+ Widget: 'WIDGET',
1734
+ Selection: 'SELECTION',
1735
+ Lookup: 'LOOKUP'
1736
+ };
1737
+
1666
1738
  /**
1667
1739
  * View API
1668
1740
  * View API
@@ -1769,6 +1841,26 @@ const UiActionInputType = {
1769
1841
  UserSelect: 'user_select'
1770
1842
  };
1771
1843
 
1844
+ /**
1845
+ * View API
1846
+ * View API
1847
+ *
1848
+ * The version of the OpenAPI document: 1.0.0
1849
+ * Contact: info@it4all.hu
1850
+ *
1851
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1852
+ * https://openapi-generator.tech
1853
+ * Do not edit the class manually.
1854
+ */
1855
+ var ViewEventHandler;
1856
+ (function (ViewEventHandler) {
1857
+ ViewEventHandler.ViewEventTypeEnum = {
1858
+ Before: 'before',
1859
+ Instead: 'instead',
1860
+ After: 'after',
1861
+ };
1862
+ })(ViewEventHandler || (ViewEventHandler = {}));
1863
+
1772
1864
  /**
1773
1865
  * View API
1774
1866
  * View API
@@ -3782,9 +3874,11 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3782
3874
  // UseUiAction
3783
3875
  this.submit = new SmartSubject(this._destroy$);
3784
3876
  this.reSubscribeToChange = new SmartSubject(this._destroy$);
3785
- this.detectChange.subscribe((model) => {
3786
- this.model = model;
3787
- // this.data = model.data as any;
3877
+ // Contained Widgets
3878
+ this.widgets = new WidgetMap();
3879
+ this.formWidgets = new WidgetMap();
3880
+ this.detectChange.subscribe((change) => {
3881
+ this.handleChanges(change);
3788
3882
  });
3789
3883
  this.viewContext = inject.get(SmartViewContextService);
3790
3884
  this.uiActionService = inject.get(UiActionService);
@@ -3828,6 +3922,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3828
3922
  }
3829
3923
  _ngOnDestroy() {
3830
3924
  this.viewContext.unfollow(this.uuid);
3925
+ this.widgets.clearWidgets();
3831
3926
  this._destroy$.next();
3832
3927
  this._destroy$.complete();
3833
3928
  }
@@ -3896,7 +3991,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3896
3991
  throw new Error('handleSpecificDemandsAsynchronously method not implemented.');
3897
3992
  }
3898
3993
  //#endregion
3899
- addGrid(smartGrid, options, useAsDefaultGrid) {
3994
+ addGrid(smartGrid, options, useAsDefaultGrid, componentReference) {
3900
3995
  smartGrid.options = options;
3901
3996
  smartGrid.uiActionService = this.uiActionService;
3902
3997
  smartGrid.uiActionDescriptorService = this.uiActionDescriptorService;
@@ -3906,18 +4001,139 @@ let SmartComponentApiClient = class SmartComponentApiClient {
3906
4001
  this.smartGrid = smartGrid;
3907
4002
  return this.smartGrid;
3908
4003
  }
4004
+ this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
3909
4005
  return smartGrid;
3910
4006
  }
4007
+ addForm(smartFormId, smartForm, componentReference) {
4008
+ this.formWidgets.addWidget(smartFormId, componentReference);
4009
+ // TODO form value changes
4010
+ return smartForm;
4011
+ }
3911
4012
  setUpDefaultTree(treeId) {
3912
4013
  this.smartTreeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
4014
+ this.widgets.addWidget(treeId, this.smartTreeService);
3913
4015
  }
3914
4016
  createTreeService(treeId) {
3915
- return new SmarttreeGenericService(this.inject, this.pageName, treeId);
4017
+ const treeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
4018
+ this.widgets.addWidget(treeId, treeService);
4019
+ return treeService;
4020
+ }
4021
+ // #region handle changes
4022
+ handleChanges(change) {
4023
+ if (change.changedWidgets) {
4024
+ this.handleChangeWidgets(change.changedWidgets);
4025
+ }
4026
+ if (change.changes) {
4027
+ const changes = change.changes;
4028
+ Object.keys(changes).map((changeKey) => {
4029
+ var _a, _b;
4030
+ if (changeKey.startsWith('data.')) {
4031
+ this.handleDataChange(changes, changeKey);
4032
+ }
4033
+ else if (changeKey.startsWith('layouts.') && ((_a = this.model) === null || _a === void 0 ? void 0 : _a.layouts)) {
4034
+ this.handleLayoutChange(changes, changeKey);
4035
+ }
4036
+ else if (changeKey.startsWith('valueSets.') && ((_b = this.model) === null || _b === void 0 ? void 0 : _b.valueSets)) {
4037
+ this.handleValueSetChange(changes, changeKey);
4038
+ }
4039
+ else if (changeKey === 'actions') {
4040
+ this.handleActionChange(changes, changeKey);
4041
+ }
4042
+ else if (changeKey === 'constraints') {
4043
+ this.handleConstraintChange(changes, changeKey);
4044
+ }
4045
+ });
4046
+ }
4047
+ if (!change.changedWidgets && !change.changes && change.value) {
4048
+ this.model = change.value;
4049
+ }
4050
+ }
4051
+ handleChangeWidgets(changedWidgets) {
4052
+ changedWidgets.forEach((key) => {
4053
+ const reference = this.widgets.get(key);
4054
+ if (reference instanceof SmartGridComponent) {
4055
+ reference.refresh();
4056
+ }
4057
+ else if (reference instanceof SmarttreeGenericService) {
4058
+ reference.initialize();
4059
+ }
4060
+ else if (reference === undefined) {
4061
+ console.error(`Provided reference for ${key} is undefined.`);
4062
+ }
4063
+ });
4064
+ }
4065
+ setValueDeeply(model, key, value) {
4066
+ let splittedKeys = key.split('.');
4067
+ let deepModel = [model];
4068
+ let tempModel;
4069
+ for (let index = 0; index < splittedKeys.length; index++) {
4070
+ tempModel = deepModel[index];
4071
+ if (typeof tempModel[splittedKeys[index]] !== 'string' &&
4072
+ typeof tempModel[splittedKeys[index]] !== 'boolean' &&
4073
+ typeof tempModel[splittedKeys[index]] !== 'number' &&
4074
+ tempModel[splittedKeys[index]] !== undefined) {
4075
+ deepModel.push(tempModel[splittedKeys[index]]);
4076
+ }
4077
+ if (index === splittedKeys.length - 1) {
4078
+ tempModel[splittedKeys[index]] = value;
4079
+ break;
4080
+ }
4081
+ }
4082
+ return model;
4083
+ }
4084
+ handleDataChange(changes, changeKey) {
4085
+ this.setValueDeeply(this.data, changeKey, changes[changeKey]);
4086
+ this.formWidgets.widgets.forEach((formComponent, key) => {
4087
+ if (formComponent === undefined) {
4088
+ console.error(`Provided form reference for ${key} is undefined.`);
4089
+ }
4090
+ else {
4091
+ formComponent.refresh();
4092
+ }
4093
+ });
4094
+ }
4095
+ handleLayoutChange(changes, changeKey) {
4096
+ let layoutKey = changeKey.split('.')[1];
4097
+ this.model.layouts[layoutKey] = changes[changeKey];
4098
+ }
4099
+ handleValueSetChange(changes, changeKey) {
4100
+ let valueSetKey = changeKey.split('.')[1];
4101
+ this.model.valueSets[valueSetKey] = changes[changeKey];
4102
+ }
4103
+ handleActionChange(changes, changeKey) {
4104
+ this.model.actions = changes[changeKey];
4105
+ this.initActions();
4106
+ }
4107
+ handleConstraintChange(changes, changeKey) {
4108
+ this.model.constraints = changes[changeKey];
3916
4109
  }
3917
4110
  };
3918
4111
  SmartComponentApiClient = __decorate([
3919
4112
  __param(2, Inject('pageName'))
3920
4113
  ], SmartComponentApiClient);
4114
+ class WidgetMap {
4115
+ constructor() {
4116
+ this._widgets = new Map();
4117
+ }
4118
+ get widgets() {
4119
+ return this._widgets;
4120
+ }
4121
+ set widgets(widgets) {
4122
+ this._widgets = widgets;
4123
+ }
4124
+ addWidget(key, reference, isForm) {
4125
+ this._widgets.set(key, reference);
4126
+ }
4127
+ removeWidget(key) {
4128
+ this._widgets.delete(key);
4129
+ }
4130
+ clearWidgets() {
4131
+ this._widgets.clear();
4132
+ }
4133
+ get(key) {
4134
+ return this.widgets.get(key);
4135
+ }
4136
+ }
3921
4137
 
3922
4138
  class SmartComponent extends SmartComponentApiClient {
3923
4139
  constructor(inject, auth, pageName) {
@@ -3983,5 +4199,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3983
4199
  * Generated bundle index. Do not edit.
3984
4200
  */
3985
4201
 
3986
- export { APIS, ApiModule, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, 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 };
4202
+ export { APIS, ApiModule, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, 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, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
3987
4203
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map