@smartbit4all/ng-client 3.3.56 → 3.3.58
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/smart-component-api-client.mjs +74 -38
- package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +2 -2
- package/esm2020/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +2 -2
- package/esm2020/lib/smart-ng-client.module.mjs +2 -2
- package/fesm2015/smartbit4all-ng-client.mjs +78 -42
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +76 -40
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +11 -14
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.58.tgz +0 -0
- package/smartbit4all-ng-client-3.3.56.tgz +0 -0
|
@@ -17,7 +17,7 @@ import { SmartNgClientService } from './smart-ng-client.service';
|
|
|
17
17
|
import { SmartTabGroupModule } from './smart-tab-group/smart-tab-group.module';
|
|
18
18
|
import { SmarttableModule } from './smart-table/smarttable.module';
|
|
19
19
|
import { SmartViewContextModule } from './view-context/smart-view-context.module';
|
|
20
|
-
import { SmarttreeModule } from '
|
|
20
|
+
import { SmarttreeModule } from './smart-tree/smarttree.module';
|
|
21
21
|
import { SharedModule } from './shared/shared.module';
|
|
22
22
|
import * as i0 from "@angular/core";
|
|
23
23
|
export class SmartNgClientModule {
|
|
@@ -132,4 +132,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
132
132
|
providers: [SmartNgClientService],
|
|
133
133
|
}]
|
|
134
134
|
}] });
|
|
135
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
135
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtbmctY2xpZW50Lm1vZHVsZS5qc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ZSxcclxuICBdLFxyXG4gIGV4cG9ydHM6IFtcclxuICAgIENvbXBvbmVudEZhY3RvcnlTZXJ2aWNlTW9kdWxlLFxyXG4gICAgU21hcnRDb21wb25lbnRMYXlvdXRNb2R1bGUsXHJcbiAgICBTbWFydGRpYWxvZ01vZHVsZSxcclxuICAgIFNtYXJ0RXhwYW5kYWJsZVNlY3Rpb25Nb2R1bGUsXHJcbiAgICBTbWFydEZpbHRlck1vZHVsZSxcclxuICAgIFNtYXJ0Zm9ybU1vZHVsZSxcclxuICAgIFNtYXJ0R3JpZE1vZHVsZSxcclxuICAgIFNtYXJ0SWNvbk1vZHVsZSxcclxuICAgIFNtYXJ0TmF2YmFyTW9kdWxlLFxyXG4gICAgU21hcnRTZXNzaW9uTW9kdWxlLFxyXG4gICAgU21hcnRUYWJHcm91cE1vZHVsZSxcclxuICAgIFNtYXJ0dGFibGVNb2R1bGUsXHJcbiAgICBTbWFydFZpZXdDb250ZXh0TW9kdWxlLFxyXG4gICAgU21hcnRGaWxlVXBsb2FkZXJDb21wb25lbnQsXHJcbiAgICBTbWFydHRyZWVNb2R1bGUsXHJcbiAgICBTaGFyZWRNb2R1bGUsXHJcbiAgXSxcclxuICBwcm92aWRlcnM6IFtTbWFydE5nQ2xpZW50U2VydmljZV0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBTbWFydE5nQ2xpZW50TW9kdWxlIHt9XHJcbiJdfQ==
|
|
@@ -4767,7 +4767,7 @@ class SmartformwidgetComponent {
|
|
|
4767
4767
|
let formControls = Object.keys(this.form.controls).filter((key) => key === this.widgetInstance.key || key.startsWith(`${this.widgetInstance.key}.`));
|
|
4768
4768
|
formControls.map((key) => {
|
|
4769
4769
|
this.form.controls[key].valueChanges
|
|
4770
|
-
.pipe(distinctUntilChanged())
|
|
4770
|
+
.pipe(takeUntil(this._destroy$), distinctUntilChanged())
|
|
4771
4771
|
.subscribe((value) => {
|
|
4772
4772
|
const valueChange = {
|
|
4773
4773
|
key,
|
|
@@ -13546,7 +13546,7 @@ class SmartFilterEditorContentComponent {
|
|
|
13546
13546
|
this.saveFilter();
|
|
13547
13547
|
});
|
|
13548
13548
|
(_a = this.simpleFilterRef.instance.sophisticatedValueChange) === null || _a === void 0 ? void 0 : _a.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13549
|
-
if (change.kind === 'selection') {
|
|
13549
|
+
if (change.kind === 'selection' && !change.key.includes('selectedValues')) {
|
|
13550
13550
|
this.saveFilter();
|
|
13551
13551
|
}
|
|
13552
13552
|
});
|
|
@@ -14631,9 +14631,11 @@ class SmartComponentApiClient {
|
|
|
14631
14631
|
this.uiActionModels = [];
|
|
14632
14632
|
this.dataChanged = new SmartSubject(this._destroy$);
|
|
14633
14633
|
// Contained Widgets
|
|
14634
|
-
this.widgets = new
|
|
14635
|
-
this.formWidgets = new
|
|
14634
|
+
this.widgets = new Map();
|
|
14635
|
+
this.formWidgets = new Map();
|
|
14636
14636
|
this.useQueryLists = false;
|
|
14637
|
+
this.dataChangeKeys = [];
|
|
14638
|
+
this.dataChangeActionHandlers = new Map();
|
|
14637
14639
|
// check and calculate pageName
|
|
14638
14640
|
if (!this.pageName && !this._componentName) {
|
|
14639
14641
|
throw new Error('pageName or componentName must be specified!');
|
|
@@ -14669,7 +14671,7 @@ class SmartComponentApiClient {
|
|
|
14669
14671
|
}
|
|
14670
14672
|
this._uuid = uuid;
|
|
14671
14673
|
if (uuid) {
|
|
14672
|
-
this.getWidgets().
|
|
14674
|
+
this.getWidgets().forEach((ref, key) => {
|
|
14673
14675
|
if (ref instanceof SmartGridComponent) {
|
|
14674
14676
|
ref.uuid = uuid;
|
|
14675
14677
|
}
|
|
@@ -14717,7 +14719,7 @@ class SmartComponentApiClient {
|
|
|
14717
14719
|
}
|
|
14718
14720
|
_ngOnDestroy() {
|
|
14719
14721
|
this.viewContext.unfollow(this.uuid);
|
|
14720
|
-
this.widgets.
|
|
14722
|
+
this.widgets.clear();
|
|
14721
14723
|
this._destroy$.next();
|
|
14722
14724
|
this._destroy$.complete();
|
|
14723
14725
|
}
|
|
@@ -14733,10 +14735,20 @@ class SmartComponentApiClient {
|
|
|
14733
14735
|
SmartComponentLayoutUtility.setParent(comp.smartComponentLayout, this);
|
|
14734
14736
|
this.initActions();
|
|
14735
14737
|
}
|
|
14738
|
+
// for handling embedded forms
|
|
14739
|
+
this.handleDataChangeSubscriptions();
|
|
14736
14740
|
if (this.uuid && this.uuid !== comp.uuid)
|
|
14737
14741
|
comp.uuid = this.uuid;
|
|
14738
14742
|
});
|
|
14739
14743
|
}
|
|
14744
|
+
if (!this.getSmartFormsQL()) {
|
|
14745
|
+
console.warn('getSmartFormsQL not available!');
|
|
14746
|
+
}
|
|
14747
|
+
else {
|
|
14748
|
+
this.handleQueryList(this.getSmartFormsQL(), (form) => {
|
|
14749
|
+
this.handleDataChangeSubscriptions();
|
|
14750
|
+
});
|
|
14751
|
+
}
|
|
14740
14752
|
if (!this.getSmartGridsQL()) {
|
|
14741
14753
|
console.warn('SmartGridsQL not available!');
|
|
14742
14754
|
}
|
|
@@ -14768,6 +14780,10 @@ class SmartComponentApiClient {
|
|
|
14768
14780
|
});
|
|
14769
14781
|
}
|
|
14770
14782
|
}
|
|
14783
|
+
handleQueryListSimple(ql, handler) {
|
|
14784
|
+
handler();
|
|
14785
|
+
ql.changes.pipe(takeUntil(this._destroy$)).subscribe(() => handler());
|
|
14786
|
+
}
|
|
14771
14787
|
handleQueryList(ql, handler) {
|
|
14772
14788
|
ql.forEach((el) => handler(el));
|
|
14773
14789
|
ql.changes
|
|
@@ -14776,16 +14792,16 @@ class SmartComponentApiClient {
|
|
|
14776
14792
|
}
|
|
14777
14793
|
getWidgets() {
|
|
14778
14794
|
if (this.useQueryLists) {
|
|
14779
|
-
let widgets = new
|
|
14795
|
+
let widgets = new Map();
|
|
14780
14796
|
this.getAllSmartGridComponents()
|
|
14781
14797
|
.filter((grid) => { var _a; return (((_a = grid === null || grid === void 0 ? void 0 : grid.smartGrid) === null || _a === void 0 ? void 0 : _a.gridIdentifier) ? true : false); })
|
|
14782
|
-
.forEach((grid) => widgets.
|
|
14798
|
+
.forEach((grid) => widgets.set(grid.smartGrid.gridIdentifier, grid));
|
|
14783
14799
|
this.getAllSmartTreeComponents()
|
|
14784
14800
|
.filter((tree) => { var _a; return (((_a = tree === null || tree === void 0 ? void 0 : tree.smartTreeModel) === null || _a === void 0 ? void 0 : _a.identifier) ? true : false); })
|
|
14785
|
-
.forEach((tree) => widgets.
|
|
14801
|
+
.forEach((tree) => widgets.set(tree.smartTreeModel.identifier, tree));
|
|
14786
14802
|
this.getAllSmartFilterEditorServices()
|
|
14787
14803
|
.filter((filter) => (filter.config.identifier ? true : false))
|
|
14788
|
-
.forEach((filter) => widgets.
|
|
14804
|
+
.forEach((filter) => widgets.set(filter.config.identifier, filter));
|
|
14789
14805
|
return widgets;
|
|
14790
14806
|
}
|
|
14791
14807
|
return this.widgets;
|
|
@@ -14935,8 +14951,51 @@ class SmartComponentApiClient {
|
|
|
14935
14951
|
this.uiActionService.execute(uiAction, options);
|
|
14936
14952
|
});
|
|
14937
14953
|
}
|
|
14954
|
+
addDataChangeActionHandler(key) {
|
|
14955
|
+
if (!this.dataChangeKeys.includes(key)) {
|
|
14956
|
+
this.dataChangeKeys.push(key);
|
|
14957
|
+
}
|
|
14958
|
+
}
|
|
14959
|
+
dataChangeActionHandler(event) {
|
|
14960
|
+
console.log('event received', event);
|
|
14961
|
+
if (this.dataChangeKeys.includes(event.key)) {
|
|
14962
|
+
try {
|
|
14963
|
+
this.executeUiAction({
|
|
14964
|
+
code: event.key,
|
|
14965
|
+
model: true,
|
|
14966
|
+
params: {
|
|
14967
|
+
item: event.value,
|
|
14968
|
+
},
|
|
14969
|
+
});
|
|
14970
|
+
}
|
|
14971
|
+
catch (error) {
|
|
14972
|
+
console.log('error', error);
|
|
14973
|
+
}
|
|
14974
|
+
}
|
|
14975
|
+
}
|
|
14976
|
+
handleDataChangeSubscriptions() {
|
|
14977
|
+
if (this.useQueryLists) {
|
|
14978
|
+
let forms = this.getAllSmartFormComponents();
|
|
14979
|
+
// subscribe to new forms
|
|
14980
|
+
forms.forEach((component) => {
|
|
14981
|
+
if (!this.dataChangeActionHandlers.has(component)) {
|
|
14982
|
+
let subs = component.sophisticatedValueChange
|
|
14983
|
+
.pipe(takeUntil(this._destroy$))
|
|
14984
|
+
.subscribe((event) => this.dataChangeActionHandler(event));
|
|
14985
|
+
this.dataChangeActionHandlers.set(component, subs);
|
|
14986
|
+
}
|
|
14987
|
+
});
|
|
14988
|
+
// unsubscribe from removed forms
|
|
14989
|
+
this.dataChangeActionHandlers.forEach((subs, form) => {
|
|
14990
|
+
if (!forms.find((c) => c === form)) {
|
|
14991
|
+
subs.unsubscribe();
|
|
14992
|
+
this.dataChangeActionHandlers.delete(form);
|
|
14993
|
+
}
|
|
14994
|
+
});
|
|
14995
|
+
}
|
|
14996
|
+
}
|
|
14938
14997
|
getInvalidFields() {
|
|
14939
|
-
var _a, _b
|
|
14998
|
+
var _a, _b;
|
|
14940
14999
|
let aggregatedInvalidFields = {
|
|
14941
15000
|
invalidFieldKeys: [],
|
|
14942
15001
|
invalidFieldNames: [],
|
|
@@ -14945,7 +15004,7 @@ class SmartComponentApiClient {
|
|
|
14945
15004
|
(_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
|
|
14946
15005
|
}
|
|
14947
15006
|
else {
|
|
14948
|
-
(
|
|
15007
|
+
(_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
|
|
14949
15008
|
}
|
|
14950
15009
|
return aggregatedInvalidFields;
|
|
14951
15010
|
}
|
|
@@ -15016,14 +15075,14 @@ class SmartComponentApiClient {
|
|
|
15016
15075
|
* Submits all the registered forms in the SmartComponent
|
|
15017
15076
|
*/
|
|
15018
15077
|
submitForms(validate) {
|
|
15019
|
-
var _a, _b
|
|
15078
|
+
var _a, _b;
|
|
15020
15079
|
if (this.useQueryLists) {
|
|
15021
15080
|
(_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
|
|
15022
15081
|
form === null || form === void 0 ? void 0 : form.submitForm(validate);
|
|
15023
15082
|
});
|
|
15024
15083
|
}
|
|
15025
15084
|
else {
|
|
15026
|
-
(
|
|
15085
|
+
(_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.forEach((form) => {
|
|
15027
15086
|
form === null || form === void 0 ? void 0 : form.submitForm(validate);
|
|
15028
15087
|
});
|
|
15029
15088
|
}
|
|
@@ -15035,7 +15094,7 @@ class SmartComponentApiClient {
|
|
|
15035
15094
|
smartGrid.serviceToUse = this;
|
|
15036
15095
|
smartGrid.viewContextService = this.viewContext;
|
|
15037
15096
|
if (!this.useQueryLists) {
|
|
15038
|
-
this.widgets.
|
|
15097
|
+
this.widgets.set(smartGrid.gridIdentifier, componentReference);
|
|
15039
15098
|
}
|
|
15040
15099
|
else {
|
|
15041
15100
|
console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
|
|
@@ -15048,7 +15107,7 @@ class SmartComponentApiClient {
|
|
|
15048
15107
|
}
|
|
15049
15108
|
addForm(smartFormId, smartForm, componentReference) {
|
|
15050
15109
|
if (!this.useQueryLists) {
|
|
15051
|
-
this.formWidgets.
|
|
15110
|
+
this.formWidgets.set(smartFormId, componentReference);
|
|
15052
15111
|
}
|
|
15053
15112
|
else {
|
|
15054
15113
|
console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
|
|
@@ -15069,7 +15128,7 @@ class SmartComponentApiClient {
|
|
|
15069
15128
|
createTreeService(treeId) {
|
|
15070
15129
|
const treeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
|
|
15071
15130
|
if (!this.useQueryLists) {
|
|
15072
|
-
this.widgets.
|
|
15131
|
+
this.widgets.set(treeId, treeService);
|
|
15073
15132
|
}
|
|
15074
15133
|
else {
|
|
15075
15134
|
console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
|
|
@@ -15199,7 +15258,7 @@ class SmartComponentApiClient {
|
|
|
15199
15258
|
(_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => form.refresh());
|
|
15200
15259
|
}
|
|
15201
15260
|
else {
|
|
15202
|
-
this.formWidgets.
|
|
15261
|
+
this.formWidgets.forEach((formComponent, key) => {
|
|
15203
15262
|
if (formComponent === undefined) {
|
|
15204
15263
|
console.error(`Provided form reference for ${key} is undefined.`);
|
|
15205
15264
|
}
|
|
@@ -15229,29 +15288,6 @@ class SmartComponentApiClient {
|
|
|
15229
15288
|
handleConstraintChange(changes, changeKey) {
|
|
15230
15289
|
this.model.constraints = changes[changeKey];
|
|
15231
15290
|
}
|
|
15232
|
-
}
|
|
15233
|
-
class WidgetMap {
|
|
15234
|
-
constructor() {
|
|
15235
|
-
this._widgets = new Map();
|
|
15236
|
-
}
|
|
15237
|
-
get widgets() {
|
|
15238
|
-
return this._widgets;
|
|
15239
|
-
}
|
|
15240
|
-
set widgets(widgets) {
|
|
15241
|
-
this._widgets = widgets;
|
|
15242
|
-
}
|
|
15243
|
-
addWidget(key, reference, isForm) {
|
|
15244
|
-
this._widgets.set(key, reference);
|
|
15245
|
-
}
|
|
15246
|
-
removeWidget(key) {
|
|
15247
|
-
this._widgets.delete(key);
|
|
15248
|
-
}
|
|
15249
|
-
clearWidgets() {
|
|
15250
|
-
this._widgets.clear();
|
|
15251
|
-
}
|
|
15252
|
-
get(key) {
|
|
15253
|
-
return this.widgets.get(key);
|
|
15254
|
-
}
|
|
15255
15291
|
}
|
|
15256
15292
|
|
|
15257
15293
|
class SmartComponent extends SmartComponentApiClient {
|
|
@@ -15431,5 +15467,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
15431
15467
|
* Generated bundle index. Do not edit.
|
|
15432
15468
|
*/
|
|
15433
15469
|
|
|
15434
|
-
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, 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, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType
|
|
15470
|
+
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, 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, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType };
|
|
15435
15471
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|