@smartbit4all/ng-client 3.3.129 → 3.3.130
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 +1 -3
- 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/smart-component-layout-utility.mjs +1 -13
- package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +26 -17
- package/fesm2015/smartbit4all-ng-client.mjs +33 -39
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +24 -29
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.d.ts +1 -5
- package/lib/smart-component-layout/smart-component-layout-utility.d.ts +0 -3
- package/lib/smart-component-layout/smart-component-layout.component.d.ts +3 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.130.tgz +0 -0
- package/smartbit4all-ng-client-3.3.129.tgz +0 -0
|
@@ -12941,15 +12941,20 @@ class SmartComponentLayoutComponent {
|
|
|
12941
12941
|
this._destroy$.complete();
|
|
12942
12942
|
}
|
|
12943
12943
|
ngOnChanges(changes) {
|
|
12944
|
-
this.smartComponentLayout
|
|
12945
|
-
|
|
12946
|
-
|
|
12944
|
+
if (deepEqual(this.smartComponentLayout, this.currentLayout)) {
|
|
12945
|
+
// no layout change, keep current state
|
|
12946
|
+
}
|
|
12947
|
+
else {
|
|
12948
|
+
// layout changed, render
|
|
12949
|
+
this.currentLayout = JSON.parse(JSON.stringify(this.smartComponentLayout));
|
|
12950
|
+
if (this.smartComponentLayout) {
|
|
12951
|
+
this.setUp();
|
|
12952
|
+
}
|
|
12947
12953
|
}
|
|
12948
12954
|
}
|
|
12949
12955
|
setUp() {
|
|
12950
|
-
this.
|
|
12951
|
-
this.
|
|
12952
|
-
this.treeService = this.parent.smartTreeService;
|
|
12956
|
+
this.uuid = this.parentSmartComponent.uuid;
|
|
12957
|
+
this.treeService = this.parentSmartComponent.smartTreeService;
|
|
12953
12958
|
this.smartComponentLayout?.direction;
|
|
12954
12959
|
if (this.smartComponentLayout?.expandable) {
|
|
12955
12960
|
this.constructExpandableSection();
|
|
@@ -12972,7 +12977,8 @@ class SmartComponentLayoutComponent {
|
|
|
12972
12977
|
this.constructToolbar();
|
|
12973
12978
|
}
|
|
12974
12979
|
if (!this.parentLayoutComponent) {
|
|
12975
|
-
|
|
12980
|
+
// only top level component should call init actions
|
|
12981
|
+
this.parentSmartComponent.initActions();
|
|
12976
12982
|
}
|
|
12977
12983
|
}
|
|
12978
12984
|
}
|
|
@@ -12995,7 +13001,7 @@ class SmartComponentLayoutComponent {
|
|
|
12995
13001
|
});
|
|
12996
13002
|
this.smartForm = {
|
|
12997
13003
|
direction: this.getFormLayout(),
|
|
12998
|
-
componentModel: this.
|
|
13004
|
+
componentModel: this.parentSmartComponent?.model,
|
|
12999
13005
|
widgets,
|
|
13000
13006
|
};
|
|
13001
13007
|
this.bindForm();
|
|
@@ -13015,11 +13021,11 @@ class SmartComponentLayoutComponent {
|
|
|
13015
13021
|
}
|
|
13016
13022
|
}
|
|
13017
13023
|
bindForm() {
|
|
13018
|
-
if (this.
|
|
13024
|
+
if (this.parentSmartComponent?.useQueryLists) {
|
|
13019
13025
|
return;
|
|
13020
13026
|
}
|
|
13021
13027
|
if (this.smartForm && this.smartFormComponent) {
|
|
13022
|
-
this.
|
|
13028
|
+
this.parentSmartComponent?.addForm(
|
|
13023
13029
|
// unique identifier for the form
|
|
13024
13030
|
`form_${this.makeid(5)}`, this.smartForm, this.smartFormComponent);
|
|
13025
13031
|
}
|
|
@@ -13056,11 +13062,11 @@ class SmartComponentLayoutComponent {
|
|
|
13056
13062
|
}
|
|
13057
13063
|
}
|
|
13058
13064
|
bindGrid() {
|
|
13059
|
-
if (this.
|
|
13065
|
+
if (this.parentSmartComponent?.useQueryLists) {
|
|
13060
13066
|
return;
|
|
13061
13067
|
}
|
|
13062
13068
|
if (this.smartGrid && this.smartGridComponent) {
|
|
13063
|
-
this.smartGrid = this.
|
|
13069
|
+
this.smartGrid = this.parentSmartComponent?.addGrid(this.smartGrid, {
|
|
13064
13070
|
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
13065
13071
|
}, false, this.smartGridComponent);
|
|
13066
13072
|
}
|
|
@@ -13081,10 +13087,10 @@ class SmartComponentLayoutComponent {
|
|
|
13081
13087
|
// TODO
|
|
13082
13088
|
}
|
|
13083
13089
|
constructTree() {
|
|
13084
|
-
if (this.
|
|
13090
|
+
if (this.parentSmartComponent?.useQueryLists) {
|
|
13085
13091
|
return;
|
|
13086
13092
|
}
|
|
13087
|
-
this.
|
|
13093
|
+
this.parentSmartComponent.setUpDefaultTree(this.smartComponentLayout?.widget?.identifier);
|
|
13088
13094
|
this.treeService?.initialize();
|
|
13089
13095
|
}
|
|
13090
13096
|
constructToolbar() {
|
|
@@ -13095,14 +13101,16 @@ class SmartComponentLayoutComponent {
|
|
|
13095
13101
|
}
|
|
13096
13102
|
}
|
|
13097
13103
|
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13098
|
-
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout", parentLayoutComponent: "parentLayoutComponent" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "toolbarList", predicate: ["toolbar"], descendants: true }, { propertyName: "expandableComponents", predicate: ExpandableSectionComponent, descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [parentLayoutComponent]=\"this\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform *ngIf=\"smartForm\" #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid *ngIf=\"smartGrid\" #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar *ngIf=\"!!toolbarId\" #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout", "parentLayoutComponent"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13104
|
+
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout", parentLayoutComponent: "parentLayoutComponent", parentSmartComponent: "parentSmartComponent" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "toolbarList", predicate: ["toolbar"], descendants: true }, { propertyName: "expandableComponents", predicate: ExpandableSectionComponent, descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [parentSmartComponent]=\"parentSmartComponent\"\r\n [parentLayoutComponent]=\"this\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform *ngIf=\"smartForm\" #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid *ngIf=\"smartGrid\" #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar *ngIf=\"!!toolbarId\" #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout", "parentLayoutComponent", "parentSmartComponent"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13099
13105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
13100
13106
|
type: Component,
|
|
13101
|
-
args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [parentLayoutComponent]=\"this\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform *ngIf=\"smartForm\" #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid *ngIf=\"smartGrid\" #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar *ngIf=\"!!toolbarId\" #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
13107
|
+
args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [parentSmartComponent]=\"parentSmartComponent\"\r\n [parentLayoutComponent]=\"this\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform *ngIf=\"smartForm\" #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid *ngIf=\"smartGrid\" #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar *ngIf=\"!!toolbarId\" #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
13102
13108
|
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
|
|
13103
13109
|
type: Input
|
|
13104
13110
|
}], parentLayoutComponent: [{
|
|
13105
13111
|
type: Input
|
|
13112
|
+
}], parentSmartComponent: [{
|
|
13113
|
+
type: Input
|
|
13106
13114
|
}], smartFormList: [{
|
|
13107
13115
|
type: ViewChildren,
|
|
13108
13116
|
args: ['form']
|
|
@@ -14456,17 +14464,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
14456
14464
|
*/
|
|
14457
14465
|
|
|
14458
14466
|
class SmartComponentLayoutUtility {
|
|
14459
|
-
static setParent(layout, parent) {
|
|
14460
|
-
layout.parentComponent = parent;
|
|
14461
|
-
layout.components?.forEach((l) => this.setParent(l, parent));
|
|
14462
|
-
}
|
|
14463
|
-
static compare(layout1, layout2) {
|
|
14464
|
-
let l1 = { ...layout1 };
|
|
14465
|
-
this.setParent(l1, null);
|
|
14466
|
-
let l2 = { ...layout2 };
|
|
14467
|
-
this.setParent(l2, null);
|
|
14468
|
-
return deepEqual(l1, l2);
|
|
14469
|
-
}
|
|
14470
14467
|
static getForms(comp) {
|
|
14471
14468
|
let result = [];
|
|
14472
14469
|
if (comp.components) {
|
|
@@ -15006,8 +15003,6 @@ class SmartComponentApiClient {
|
|
|
15006
15003
|
else {
|
|
15007
15004
|
this.handleQueryList(this.getSmartComponentLayoutsQL(), (comp) => {
|
|
15008
15005
|
if (comp.smartComponentLayout) {
|
|
15009
|
-
// TODO maybe we should set comp.parent, not comp.smartComponentLayout.parentComponent..
|
|
15010
|
-
SmartComponentLayoutUtility.setParent(comp.smartComponentLayout, this);
|
|
15011
15006
|
this.initActions();
|
|
15012
15007
|
}
|
|
15013
15008
|
if (this.uuid && this.uuid !== comp.uuid)
|