@smartbit4all/ng-client 3.3.38 → 3.3.40
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 +4 -1
- package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +2 -1
- package/esm2020/lib/smart-component-layout/api/model/layoutDirection.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/smart-component-layout-utility.mjs +13 -1
- package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +28 -6
- package/esm2020/lib/smart-component-layout/smart-component-layout.module.mjs +6 -2
- package/fesm2015/smartbit4all-ng-client.mjs +49 -8
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +45 -5
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-component-layout/api/model/componentWidgetType.d.ts +2 -1
- package/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.d.ts +1 -2
- package/lib/smart-component-layout/smart-component-layout-utility.d.ts +2 -0
- package/lib/smart-component-layout/smart-component-layout.component.d.ts +6 -0
- package/lib/smart-component-layout/smart-component-layout.module.d.ts +2 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.40.tgz +0 -0
- package/smartbit4all-ng-client-3.3.38.tgz +0 -0
|
@@ -12873,6 +12873,7 @@ var ComponentWidgetType;
|
|
|
12873
12873
|
ComponentWidgetType["GRID"] = "grid";
|
|
12874
12874
|
ComponentWidgetType["FILTER"] = "filter";
|
|
12875
12875
|
ComponentWidgetType["TREE"] = "tree";
|
|
12876
|
+
ComponentWidgetType["TOOLBAR"] = "toolbar";
|
|
12876
12877
|
})(ComponentWidgetType || (ComponentWidgetType = {}));
|
|
12877
12878
|
|
|
12878
12879
|
/**
|
|
@@ -12936,6 +12937,7 @@ class SmartComponentLayoutComponent {
|
|
|
12936
12937
|
constructor(layoutService) {
|
|
12937
12938
|
this.layoutService = layoutService;
|
|
12938
12939
|
this._destroy$ = new Subject();
|
|
12940
|
+
this.toolbarId = 'not_initialized_yet';
|
|
12939
12941
|
}
|
|
12940
12942
|
ngAfterViewInit() {
|
|
12941
12943
|
if (this.smartFormList?.first) {
|
|
@@ -12962,6 +12964,14 @@ class SmartComponentLayoutComponent {
|
|
|
12962
12964
|
this.bindFilter();
|
|
12963
12965
|
}
|
|
12964
12966
|
});
|
|
12967
|
+
if (this.toolbarList?.first) {
|
|
12968
|
+
this.setToolbarComponent(this.toolbarList?.first);
|
|
12969
|
+
}
|
|
12970
|
+
this.toolbarList.changes
|
|
12971
|
+
.pipe(takeUntil(this._destroy$))
|
|
12972
|
+
.subscribe((list) => {
|
|
12973
|
+
this.setToolbarComponent(list.first);
|
|
12974
|
+
});
|
|
12965
12975
|
if (this.smartComponentLayout) {
|
|
12966
12976
|
this.setUp();
|
|
12967
12977
|
}
|
|
@@ -12996,6 +13006,9 @@ class SmartComponentLayoutComponent {
|
|
|
12996
13006
|
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TREE) {
|
|
12997
13007
|
this.constructTree();
|
|
12998
13008
|
}
|
|
13009
|
+
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TOOLBAR) {
|
|
13010
|
+
this.constructToolbar();
|
|
13011
|
+
}
|
|
12999
13012
|
}
|
|
13000
13013
|
}
|
|
13001
13014
|
type() {
|
|
@@ -13048,7 +13061,7 @@ class SmartComponentLayoutComponent {
|
|
|
13048
13061
|
}
|
|
13049
13062
|
constructGrid() {
|
|
13050
13063
|
this.smartGrid = {
|
|
13051
|
-
gridIdentifier: this.smartComponentLayout?.widget?.
|
|
13064
|
+
gridIdentifier: this.smartComponentLayout?.widget?.identifier,
|
|
13052
13065
|
gridModel: {
|
|
13053
13066
|
page: {},
|
|
13054
13067
|
},
|
|
@@ -13073,6 +13086,9 @@ class SmartComponentLayoutComponent {
|
|
|
13073
13086
|
}, false, this.smartGridComponent);
|
|
13074
13087
|
}
|
|
13075
13088
|
}
|
|
13089
|
+
setToolbarComponent(comp) {
|
|
13090
|
+
this.toolbar = comp;
|
|
13091
|
+
}
|
|
13076
13092
|
constructFilter() {
|
|
13077
13093
|
this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.smartFilterComponent);
|
|
13078
13094
|
}
|
|
@@ -13080,15 +13096,18 @@ class SmartComponentLayoutComponent {
|
|
|
13080
13096
|
// TODO
|
|
13081
13097
|
}
|
|
13082
13098
|
constructTree() {
|
|
13083
|
-
this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.
|
|
13099
|
+
this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.identifier);
|
|
13084
13100
|
this.treeService?.initialize();
|
|
13085
13101
|
}
|
|
13102
|
+
constructToolbar() {
|
|
13103
|
+
this.toolbarId = this.smartComponentLayout?.widget?.identifier;
|
|
13104
|
+
}
|
|
13086
13105
|
}
|
|
13087
13106
|
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13088
|
-
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], 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 [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #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</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"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13107
|
+
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, 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: "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 [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #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 #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"] }, { 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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13089
13108
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
13090
13109
|
type: Component,
|
|
13091
|
-
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 [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #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</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
13110
|
+
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 [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #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 #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"] }]
|
|
13092
13111
|
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
|
|
13093
13112
|
type: Input
|
|
13094
13113
|
}], smartFormList: [{
|
|
@@ -13100,6 +13119,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13100
13119
|
}], smartFilterList: [{
|
|
13101
13120
|
type: ViewChildren,
|
|
13102
13121
|
args: ['filter']
|
|
13122
|
+
}], toolbarList: [{
|
|
13123
|
+
type: ViewChildren,
|
|
13124
|
+
args: ['toolbar']
|
|
13103
13125
|
}], components: [{
|
|
13104
13126
|
type: ViewChildren,
|
|
13105
13127
|
args: [SmartComponentLayoutComponent]
|
|
@@ -13113,7 +13135,8 @@ SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.
|
|
|
13113
13135
|
SmartformModule,
|
|
13114
13136
|
SmartGridModule,
|
|
13115
13137
|
SmartExpandableSectionModule,
|
|
13116
|
-
SmarttreeModule
|
|
13138
|
+
SmarttreeModule,
|
|
13139
|
+
SmartViewContextModule], exports: [SmartComponentLayoutComponent] });
|
|
13117
13140
|
SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
|
|
13118
13141
|
BrowserModule,
|
|
13119
13142
|
MatCommonModule,
|
|
@@ -13121,6 +13144,7 @@ SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
13121
13144
|
SmartGridModule,
|
|
13122
13145
|
SmartExpandableSectionModule,
|
|
13123
13146
|
SmarttreeModule,
|
|
13147
|
+
SmartViewContextModule,
|
|
13124
13148
|
]] });
|
|
13125
13149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
|
|
13126
13150
|
type: NgModule,
|
|
@@ -13133,6 +13157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13133
13157
|
SmartGridModule,
|
|
13134
13158
|
SmartExpandableSectionModule,
|
|
13135
13159
|
SmarttreeModule,
|
|
13160
|
+
SmartViewContextModule,
|
|
13136
13161
|
],
|
|
13137
13162
|
exports: [SmartComponentLayoutComponent],
|
|
13138
13163
|
providers: [],
|
|
@@ -14044,6 +14069,18 @@ class SmartComponentLayoutUtility {
|
|
|
14044
14069
|
}
|
|
14045
14070
|
return result;
|
|
14046
14071
|
}
|
|
14072
|
+
static getToolbars(comp) {
|
|
14073
|
+
let result = [];
|
|
14074
|
+
if (comp.components) {
|
|
14075
|
+
result = comp.components
|
|
14076
|
+
.map((c) => this.getToolbars(c))
|
|
14077
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
14078
|
+
}
|
|
14079
|
+
if (comp.toolbar) {
|
|
14080
|
+
result.push(comp.toolbar);
|
|
14081
|
+
}
|
|
14082
|
+
return result;
|
|
14083
|
+
}
|
|
14047
14084
|
}
|
|
14048
14085
|
|
|
14049
14086
|
/*
|
|
@@ -14634,6 +14671,9 @@ class SmartComponentApiClient {
|
|
|
14634
14671
|
toolbars.push(grid.toolbar);
|
|
14635
14672
|
}
|
|
14636
14673
|
});
|
|
14674
|
+
this.getSmartComponentLayoutsQL()?.forEach((comp) => {
|
|
14675
|
+
toolbars.push(...SmartComponentLayoutUtility.getToolbars(comp));
|
|
14676
|
+
});
|
|
14637
14677
|
return toolbars;
|
|
14638
14678
|
}
|
|
14639
14679
|
initData() {
|