@smartbit4all/ng-client 3.3.190 → 3.3.191
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/api/api/session.service.mjs +1 -1
- package/esm2020/lib/session/api/encoder.mjs +1 -1
- package/esm2020/lib/session/api/model/accountInfo.mjs +1 -1
- package/esm2020/lib/session/api/model/apiError.mjs +1 -1
- package/esm2020/lib/session/api/model/authenticationProviderData.mjs +1 -1
- package/esm2020/lib/session/api/model/getAuthenticationProvidersResponse.mjs +1 -1
- package/esm2020/lib/session/api/model/models.mjs +1 -1
- package/esm2020/lib/session/api/model/refreshSessionRequest.mjs +1 -1
- package/esm2020/lib/session/api/model/session.mjs +1 -1
- package/esm2020/lib/session/api/model/sessionInfoData.mjs +1 -1
- package/esm2020/lib/session/api/model/userActivityLog.mjs +1 -1
- package/esm2020/lib/session/api/param.mjs +1 -1
- package/esm2020/lib/session/api/variables.mjs +1 -1
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +47 -29
- package/esm2020/lib/smart-component-layout/api/api/api.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/api/default.service.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/api.module.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/index.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/layoutDirection.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/models.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/param.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/variables.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/smartFilterType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/param.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/variables.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/smart-filter-editor.model.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/smart-filter-editor.service.mjs +11 -7
- package/esm2020/lib/smart-form/api/api/api.mjs +1 -1
- package/esm2020/lib/smart-form/api/api/default.service.mjs +1 -1
- package/esm2020/lib/smart-form/api/api.module.mjs +1 -1
- package/esm2020/lib/smart-form/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-form/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-form/api/index.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/models.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/propertyMapping.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartFormWidgetType.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/valueChangeMode.mjs +1 -1
- package/esm2020/lib/smart-form/api/param.mjs +1 -1
- package/esm2020/lib/smart-form/api/variables.mjs +1 -1
- package/esm2020/lib/smart-grid/smart-grid.component.mjs +4 -2
- package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/configuration.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/param.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/variables.mjs +1 -1
- package/esm2020/lib/view-context/api/api/api.mjs +1 -1
- package/esm2020/lib/view-context/api/api/view.service.mjs +1 -1
- package/esm2020/lib/view-context/api/api.module.mjs +1 -1
- package/esm2020/lib/view-context/api/configuration.mjs +1 -1
- package/esm2020/lib/view-context/api/encoder.mjs +1 -1
- package/esm2020/lib/view-context/api/index.mjs +1 -1
- package/esm2020/lib/view-context/api/model/closeResult.mjs +1 -1
- package/esm2020/lib/view-context/api/model/componentConstraint.mjs +1 -1
- package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
- package/esm2020/lib/view-context/api/model/componentModelChange.mjs +1 -1
- package/esm2020/lib/view-context/api/model/dataChange.mjs +1 -1
- package/esm2020/lib/view-context/api/model/dataChangeEvent.mjs +1 -1
- package/esm2020/lib/view-context/api/model/dataChangeKind.mjs +1 -1
- package/esm2020/lib/view-context/api/model/downloadedFile.mjs +1 -1
- package/esm2020/lib/view-context/api/model/iconPosition.mjs +1 -1
- package/esm2020/lib/view-context/api/model/imageResource.mjs +1 -1
- package/esm2020/lib/view-context/api/model/link.mjs +1 -1
- 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/messageOptionType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/messageResult.mjs +1 -1
- package/esm2020/lib/view-context/api/model/messageTextType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/messageType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/models.mjs +1 -1
- package/esm2020/lib/view-context/api/model/openPendingData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/serverRequestExecutionStat.mjs +1 -1
- package/esm2020/lib/view-context/api/model/serverRequestTrack.mjs +1 -1
- package/esm2020/lib/view-context/api/model/serverRequestType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/smartLinkData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/statisticRecord.mjs +1 -1
- package/esm2020/lib/view-context/api/model/style.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionButtonDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionButtonType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionDialogDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionFeedbackType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionRequest.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionTooltip.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +1 -1
- package/esm2020/lib/view-context/api/model/valueSet.mjs +1 -1
- package/esm2020/lib/view-context/api/model/view.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewApiError.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewConstraint.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContext.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextChange.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextUpdate.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewState.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewStateUpdate.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewType.mjs +1 -1
- package/esm2020/lib/view-context/api/param.mjs +1 -1
- package/esm2020/lib/view-context/api/variables.mjs +1 -1
- package/esm2020/lib/view-context/smart-view-context.service.mjs +34 -24
- package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
- package/fesm2015/smartbit4all-ng-client.mjs +95 -62
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +92 -58
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +1 -1
- package/lib/smart-filter-editor/smart-filter-editor.model.d.ts +1 -1
- package/lib/smart-grid/smart-grid.component.d.ts +1 -1
- package/lib/view-context/smart-view-context.service.d.ts +4 -3
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.191.tgz +0 -0
- package/src/lib/session/api/README.md +226 -226
- package/src/lib/smart-component-layout/api/README.md +226 -226
- package/src/lib/smart-filter-editor/api/README.md +226 -226
- package/src/lib/smart-form/api/README.md +226 -226
- package/src/lib/smart-tree/tree-api/README.md +226 -226
- package/src/lib/view-context/api/README.md +226 -226
- package/smartbit4all-ng-client-3.3.190.tgz +0 -0
|
@@ -2704,10 +2704,9 @@ class SmartViewContextService {
|
|
|
2704
2704
|
});
|
|
2705
2705
|
}
|
|
2706
2706
|
openView(view) {
|
|
2707
|
-
var _a;
|
|
2708
2707
|
let alreadyOpened = this.openedViewUuids.some((uuid) => uuid === view.uuid);
|
|
2709
2708
|
if (alreadyOpened)
|
|
2710
|
-
return;
|
|
2709
|
+
return undefined;
|
|
2711
2710
|
let viewHandler = this.viewHandlers.find((handler) => handler.name === view.viewName);
|
|
2712
2711
|
if (!viewHandler) {
|
|
2713
2712
|
throw new Error(`SmartViewHandlerModel was not found by view name: ${view.viewName}`);
|
|
@@ -2740,7 +2739,7 @@ class SmartViewContextService {
|
|
|
2740
2739
|
try {
|
|
2741
2740
|
dialogDisableClose = this.inject.get(DIALOG_DISABLE_CLOSE);
|
|
2742
2741
|
}
|
|
2743
|
-
catch (
|
|
2742
|
+
catch (_a) {
|
|
2744
2743
|
console.error('Error during reading DIALOG_DISABLE_CLOSE');
|
|
2745
2744
|
}
|
|
2746
2745
|
}
|
|
@@ -2777,18 +2776,12 @@ class SmartViewContextService {
|
|
|
2777
2776
|
this.openedViewData.push(view);
|
|
2778
2777
|
this.setUuidOfPage(view.viewName, view.uuid, viewHandler.componentName);
|
|
2779
2778
|
this.uuidOfPageHasBeenChanged.next(view.viewName);
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
uuid: view.uuid,
|
|
2785
|
-
},
|
|
2786
|
-
],
|
|
2787
|
-
uuid: (_a = this.viewContext) === null || _a === void 0 ? void 0 : _a.uuid,
|
|
2788
|
-
});
|
|
2779
|
+
return {
|
|
2780
|
+
state: ViewState.OPENED,
|
|
2781
|
+
uuid: view.uuid,
|
|
2782
|
+
};
|
|
2789
2783
|
}
|
|
2790
2784
|
closeView(view) {
|
|
2791
|
-
var _a;
|
|
2792
2785
|
let viewHandler = this.viewHandlers.find((handler) => handler.name === view.viewName);
|
|
2793
2786
|
if (!viewHandler) {
|
|
2794
2787
|
throw new Error(`SmartViewHandlerModel was not found by view name: ${view.viewName}`);
|
|
@@ -2818,35 +2811,50 @@ class SmartViewContextService {
|
|
|
2818
2811
|
this.openedViewData.splice(index, 1);
|
|
2819
2812
|
this.clearUuidOfPage(view.viewName, viewHandler.componentName);
|
|
2820
2813
|
}
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2814
|
+
return {
|
|
2815
|
+
state: ViewState.CLOSED,
|
|
2816
|
+
uuid: view.uuid,
|
|
2817
|
+
};
|
|
2818
|
+
}
|
|
2819
|
+
sendViewContextUpdates(updatesToSend) {
|
|
2820
|
+
var _a;
|
|
2821
|
+
const updates = [];
|
|
2822
|
+
updatesToSend.forEach((update) => {
|
|
2823
|
+
if (update !== undefined && update !== null)
|
|
2824
|
+
updates.push(update);
|
|
2825
|
+
});
|
|
2826
|
+
if (updates.length > 0) {
|
|
2827
|
+
this.updateViewContext({
|
|
2828
|
+
updates,
|
|
2829
|
+
uuid: (_a = this.viewContext) === null || _a === void 0 ? void 0 : _a.uuid,
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2830
2832
|
}
|
|
2831
2833
|
restoreViews(uuid) {
|
|
2832
2834
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2835
|
+
const updates = [];
|
|
2833
2836
|
if (!this.viewContext) {
|
|
2834
2837
|
yield this.getViewContext(uuid);
|
|
2835
2838
|
}
|
|
2836
|
-
this.viewContext.views.map((view) => {
|
|
2837
|
-
this.openView(view);
|
|
2839
|
+
this.viewContext.views.filter((view) => view.state === ViewState.OPENED || view.state === ViewState.TO_OPEN).map((view) => {
|
|
2840
|
+
const update = this.openView(view);
|
|
2841
|
+
if (update) {
|
|
2842
|
+
updates.push(update);
|
|
2843
|
+
}
|
|
2838
2844
|
});
|
|
2845
|
+
this.sendViewContextUpdates(updates);
|
|
2839
2846
|
});
|
|
2840
2847
|
}
|
|
2841
2848
|
syncView() {
|
|
2842
2849
|
var _a, _b, _c, _d, _e;
|
|
2850
|
+
const updates = [];
|
|
2843
2851
|
(_a = this.viewContext) === null || _a === void 0 ? void 0 : _a.views.map((view) => {
|
|
2844
2852
|
switch (view.state) {
|
|
2845
2853
|
case ViewState.TO_OPEN:
|
|
2846
|
-
this.openView(view);
|
|
2854
|
+
updates.push(this.openView(view));
|
|
2847
2855
|
break;
|
|
2848
2856
|
case ViewState.TO_CLOSE:
|
|
2849
|
-
this.closeView(view);
|
|
2857
|
+
updates.push(this.closeView(view));
|
|
2850
2858
|
break;
|
|
2851
2859
|
}
|
|
2852
2860
|
});
|
|
@@ -2856,9 +2864,10 @@ class SmartViewContextService {
|
|
|
2856
2864
|
});
|
|
2857
2865
|
if (viewDataToClose === null || viewDataToClose === void 0 ? void 0 : viewDataToClose.length) {
|
|
2858
2866
|
viewDataToClose.map((viewData) => {
|
|
2859
|
-
this.closeView(viewData);
|
|
2867
|
+
updates.push(this.closeView(viewData));
|
|
2860
2868
|
});
|
|
2861
2869
|
}
|
|
2870
|
+
this.sendViewContextUpdates(updates);
|
|
2862
2871
|
(_c = (_b = this.viewContext) === null || _b === void 0 ? void 0 : _b.links) === null || _c === void 0 ? void 0 : _c.map((data) => {
|
|
2863
2872
|
var _a, _b;
|
|
2864
2873
|
const link = document.createElement('a');
|
|
@@ -10274,7 +10283,9 @@ class SmartGridComponent {
|
|
|
10274
10283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10275
10284
|
this.setupToolbar();
|
|
10276
10285
|
// will cause this.service.gridModelChanged to fire
|
|
10277
|
-
|
|
10286
|
+
if (this.uuid) {
|
|
10287
|
+
yield this.service.load(this.uuid, this.smartGrid.gridIdentifier);
|
|
10288
|
+
}
|
|
10278
10289
|
});
|
|
10279
10290
|
}
|
|
10280
10291
|
setupToolbar() {
|
|
@@ -15299,16 +15310,20 @@ class SmartFilterEditorService {
|
|
|
15299
15310
|
}
|
|
15300
15311
|
load() {
|
|
15301
15312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15302
|
-
|
|
15303
|
-
|
|
15313
|
+
if (this.config.uuid) {
|
|
15314
|
+
this.model = yield this.service.load(this.config.uuid, this.config.identifier).toPromise();
|
|
15315
|
+
this.modelChanged.next();
|
|
15316
|
+
}
|
|
15304
15317
|
});
|
|
15305
15318
|
}
|
|
15306
15319
|
peformWidgetAction(request) {
|
|
15307
15320
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15308
|
-
this.
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15321
|
+
if (this.config.uuid) {
|
|
15322
|
+
this.model = yield this.service
|
|
15323
|
+
.performWidgetAction(this.config.uuid, this.config.identifier, request)
|
|
15324
|
+
.toPromise();
|
|
15325
|
+
this.modelChanged.next();
|
|
15326
|
+
}
|
|
15312
15327
|
});
|
|
15313
15328
|
}
|
|
15314
15329
|
getModel() {
|
|
@@ -15347,7 +15362,7 @@ class SmartComponentApiClient {
|
|
|
15347
15362
|
this.renderer = renderer;
|
|
15348
15363
|
this._destroy$ = new Subject();
|
|
15349
15364
|
this.detectChange = new SmartSubject(this._destroy$);
|
|
15350
|
-
this.
|
|
15365
|
+
this.componentModelLoaded = false;
|
|
15351
15366
|
this.uiActionModels = [];
|
|
15352
15367
|
this.dataChanged = new SmartSubject(this._destroy$);
|
|
15353
15368
|
// Contained Widgets
|
|
@@ -15391,29 +15406,29 @@ class SmartComponentApiClient {
|
|
|
15391
15406
|
firstUuid = false;
|
|
15392
15407
|
}
|
|
15393
15408
|
this._uuid = uuid;
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15409
|
+
this.getWidgets().forEach((ref, key) => {
|
|
15410
|
+
if (ref instanceof SmartGridComponent) {
|
|
15411
|
+
ref.uuid = this.componentModelLoaded ? uuid : undefined;
|
|
15412
|
+
}
|
|
15413
|
+
else if (ref instanceof SmartFilterEditorService) {
|
|
15414
|
+
ref.config.uuid = this.componentModelLoaded ? uuid : undefined;
|
|
15415
|
+
}
|
|
15416
|
+
else if (!ref && !firstUuid) {
|
|
15417
|
+
console.error(`Provided reference for ${key} is undefined on uuid change.`);
|
|
15418
|
+
}
|
|
15419
|
+
});
|
|
15420
|
+
if (!this.uuidOfPageHasBeenChangedSubscription) {
|
|
15421
|
+
this.uuidOfPageHasBeenChangedSubscription = this.viewContext.uuidOfPageHasBeenChanged
|
|
15422
|
+
.pipe(takeUntil(this._destroy$))
|
|
15423
|
+
.subscribe((pageName) => {
|
|
15424
|
+
if (pageName === this.pageName) {
|
|
15425
|
+
this.run();
|
|
15404
15426
|
}
|
|
15405
15427
|
});
|
|
15406
|
-
if (!this.uuidOfPageHasBeenChangedSubscription) {
|
|
15407
|
-
this.uuidOfPageHasBeenChangedSubscription = this.viewContext.uuidOfPageHasBeenChanged
|
|
15408
|
-
.pipe(takeUntil(this._destroy$))
|
|
15409
|
-
.subscribe((pageName) => {
|
|
15410
|
-
if (pageName === this.pageName) {
|
|
15411
|
-
this.run();
|
|
15412
|
-
}
|
|
15413
|
-
});
|
|
15414
|
-
}
|
|
15415
15428
|
}
|
|
15416
|
-
|
|
15429
|
+
if (uuid) {
|
|
15430
|
+
this.viewContext.follow(this._uuid, this.detectChange);
|
|
15431
|
+
}
|
|
15417
15432
|
}
|
|
15418
15433
|
get model() {
|
|
15419
15434
|
return this._model;
|
|
@@ -15650,9 +15665,17 @@ class SmartComponentApiClient {
|
|
|
15650
15665
|
}
|
|
15651
15666
|
load() {
|
|
15652
15667
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15653
|
-
this.
|
|
15668
|
+
this.componentModelLoaded = false;
|
|
15669
|
+
const uuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
15654
15670
|
// this.model = await this.viewContext.load(this.uuid);
|
|
15655
|
-
yield this.viewContext.load2(
|
|
15671
|
+
const change = yield this.viewContext.load2(uuid);
|
|
15672
|
+
this.componentModelLoaded = true;
|
|
15673
|
+
this.uuid = uuid;
|
|
15674
|
+
this.model = change.result;
|
|
15675
|
+
if (this.model.widgets) {
|
|
15676
|
+
// grids are already loaded in setUuid()
|
|
15677
|
+
this.handleChangeWidgets(this.model.widgets, true);
|
|
15678
|
+
}
|
|
15656
15679
|
});
|
|
15657
15680
|
}
|
|
15658
15681
|
executeUiAction(uiAction, options) {
|
|
@@ -15903,6 +15926,10 @@ class SmartComponentApiClient {
|
|
|
15903
15926
|
}
|
|
15904
15927
|
handleChanges(change) {
|
|
15905
15928
|
try {
|
|
15929
|
+
if (!this.componentModelLoaded) {
|
|
15930
|
+
// initial load
|
|
15931
|
+
return;
|
|
15932
|
+
}
|
|
15906
15933
|
if (change.changedWidgets) {
|
|
15907
15934
|
this.handleChangeWidgets(change.changedWidgets);
|
|
15908
15935
|
}
|
|
@@ -15947,21 +15974,27 @@ class SmartComponentApiClient {
|
|
|
15947
15974
|
this.model = change.value;
|
|
15948
15975
|
}
|
|
15949
15976
|
}
|
|
15950
|
-
handleChangeWidgets(changedWidgets) {
|
|
15977
|
+
handleChangeWidgets(changedWidgets, skipLoad = false) {
|
|
15951
15978
|
let widgets = this.getWidgets();
|
|
15952
15979
|
changedWidgets.forEach((key) => {
|
|
15953
15980
|
const reference = widgets.get(key);
|
|
15954
15981
|
if (reference instanceof SmartGridComponent) {
|
|
15955
15982
|
this.setupGridServices(reference);
|
|
15956
|
-
|
|
15983
|
+
if (!skipLoad) {
|
|
15984
|
+
reference.refresh();
|
|
15985
|
+
}
|
|
15957
15986
|
}
|
|
15958
15987
|
else if (reference instanceof SmarttreeGenericService) {
|
|
15959
|
-
|
|
15988
|
+
if (!skipLoad) {
|
|
15989
|
+
reference.initialize();
|
|
15990
|
+
}
|
|
15960
15991
|
}
|
|
15961
15992
|
else if (reference instanceof SmartFilterEditorService) {
|
|
15962
|
-
|
|
15993
|
+
if (!skipLoad) {
|
|
15994
|
+
reference.load();
|
|
15995
|
+
}
|
|
15963
15996
|
}
|
|
15964
|
-
else if (reference === undefined) {
|
|
15997
|
+
else if (!skipLoad && reference === undefined) {
|
|
15965
15998
|
console.error(`Provided reference for ${key} is undefined.`);
|
|
15966
15999
|
}
|
|
15967
16000
|
});
|