@smartbit4all/ng-client 3.3.37 → 3.3.39

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 (21) hide show
  1. package/esm2020/lib/smart-client/smart-component-api-client.mjs +6 -3
  2. package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
  3. package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +2 -1
  4. package/esm2020/lib/smart-component-layout/api/model/layoutDirection.mjs +1 -1
  5. package/esm2020/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.mjs +1 -1
  6. package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
  7. package/esm2020/lib/smart-component-layout/smart-component-layout-utility.mjs +13 -1
  8. package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +27 -6
  9. package/esm2020/lib/smart-component-layout/smart-component-layout.module.mjs +6 -2
  10. package/fesm2015/smartbit4all-ng-client.mjs +50 -10
  11. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  12. package/fesm2020/smartbit4all-ng-client.mjs +46 -7
  13. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  14. package/lib/smart-component-layout/api/model/componentWidgetType.d.ts +2 -1
  15. package/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.d.ts +1 -2
  16. package/lib/smart-component-layout/smart-component-layout-utility.d.ts +2 -0
  17. package/lib/smart-component-layout/smart-component-layout.component.d.ts +6 -0
  18. package/lib/smart-component-layout/smart-component-layout.module.d.ts +2 -1
  19. package/package.json +1 -1
  20. package/smartbit4all-ng-client-3.3.39.tgz +0 -0
  21. package/smartbit4all-ng-client-3.3.37.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
  /**
@@ -12962,6 +12963,14 @@ class SmartComponentLayoutComponent {
12962
12963
  this.bindFilter();
12963
12964
  }
12964
12965
  });
12966
+ if (this.toolbarList?.first) {
12967
+ this.setToolbarComponent(this.toolbarList?.first);
12968
+ }
12969
+ this.toolbarList.changes
12970
+ .pipe(takeUntil(this._destroy$))
12971
+ .subscribe((list) => {
12972
+ this.setToolbarComponent(list.first);
12973
+ });
12965
12974
  if (this.smartComponentLayout) {
12966
12975
  this.setUp();
12967
12976
  }
@@ -12996,6 +13005,9 @@ class SmartComponentLayoutComponent {
12996
13005
  else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TREE) {
12997
13006
  this.constructTree();
12998
13007
  }
13008
+ else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TOOLBAR) {
13009
+ this.constructToolbar();
13010
+ }
12999
13011
  }
13000
13012
  }
13001
13013
  type() {
@@ -13048,7 +13060,7 @@ class SmartComponentLayoutComponent {
13048
13060
  }
13049
13061
  constructGrid() {
13050
13062
  this.smartGrid = {
13051
- gridIdentifier: this.smartComponentLayout?.widget?.gridIdentifier,
13063
+ gridIdentifier: this.smartComponentLayout?.widget?.identifier,
13052
13064
  gridModel: {
13053
13065
  page: {},
13054
13066
  },
@@ -13073,6 +13085,9 @@ class SmartComponentLayoutComponent {
13073
13085
  }, false, this.smartGridComponent);
13074
13086
  }
13075
13087
  }
13088
+ setToolbarComponent(comp) {
13089
+ this.toolbar = comp;
13090
+ }
13076
13091
  constructFilter() {
13077
13092
  this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.smartFilterComponent);
13078
13093
  }
@@ -13080,15 +13095,18 @@ class SmartComponentLayoutComponent {
13080
13095
  // TODO
13081
13096
  }
13082
13097
  constructTree() {
13083
- this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.treeIdentifier);
13098
+ this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.identifier);
13084
13099
  this.treeService?.initialize();
13085
13100
  }
13101
+ constructToolbar() {
13102
+ this.toolbarId = this.smartComponentLayout?.widget?.identifier;
13103
+ }
13086
13104
  }
13087
13105
  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"] }] });
13106
+ 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 *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"] }, { 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
13107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
13090
13108
  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"] }]
13109
+ 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 *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"] }]
13092
13110
  }], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
13093
13111
  type: Input
13094
13112
  }], smartFormList: [{
@@ -13100,6 +13118,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13100
13118
  }], smartFilterList: [{
13101
13119
  type: ViewChildren,
13102
13120
  args: ['filter']
13121
+ }], toolbarList: [{
13122
+ type: ViewChildren,
13123
+ args: ['toolbar']
13103
13124
  }], components: [{
13104
13125
  type: ViewChildren,
13105
13126
  args: [SmartComponentLayoutComponent]
@@ -13113,7 +13134,8 @@ SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.
13113
13134
  SmartformModule,
13114
13135
  SmartGridModule,
13115
13136
  SmartExpandableSectionModule,
13116
- SmarttreeModule], exports: [SmartComponentLayoutComponent] });
13137
+ SmarttreeModule,
13138
+ SmartViewContextModule], exports: [SmartComponentLayoutComponent] });
13117
13139
  SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
13118
13140
  BrowserModule,
13119
13141
  MatCommonModule,
@@ -13121,6 +13143,7 @@ SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
13121
13143
  SmartGridModule,
13122
13144
  SmartExpandableSectionModule,
13123
13145
  SmarttreeModule,
13146
+ SmartViewContextModule,
13124
13147
  ]] });
13125
13148
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
13126
13149
  type: NgModule,
@@ -13133,6 +13156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
13133
13156
  SmartGridModule,
13134
13157
  SmartExpandableSectionModule,
13135
13158
  SmarttreeModule,
13159
+ SmartViewContextModule,
13136
13160
  ],
13137
13161
  exports: [SmartComponentLayoutComponent],
13138
13162
  providers: [],
@@ -14044,6 +14068,18 @@ class SmartComponentLayoutUtility {
14044
14068
  }
14045
14069
  return result;
14046
14070
  }
14071
+ static getToolbars(comp) {
14072
+ let result = [];
14073
+ if (comp.components) {
14074
+ result = comp.components
14075
+ .map((c) => this.getToolbars(c))
14076
+ .reduce((acc, value) => acc.concat(value), []);
14077
+ }
14078
+ if (comp.toolbar) {
14079
+ result.push(comp.toolbar);
14080
+ }
14081
+ return result;
14082
+ }
14047
14083
  }
14048
14084
 
14049
14085
  /*
@@ -14546,8 +14582,8 @@ class SmartComponentApiClient {
14546
14582
  }
14547
14583
  handleQueryList(ql, handler) {
14548
14584
  ql.forEach((el) => handler(el));
14549
- this.getSmartComponentLayoutsQL()
14550
- .changes.pipe(takeUntil(this._destroy$))
14585
+ ql.changes
14586
+ .pipe(takeUntil(this._destroy$))
14551
14587
  .subscribe((list) => list.forEach((el) => handler(el)));
14552
14588
  }
14553
14589
  getWidgets() {
@@ -14634,6 +14670,9 @@ class SmartComponentApiClient {
14634
14670
  toolbars.push(grid.toolbar);
14635
14671
  }
14636
14672
  });
14673
+ this.getSmartComponentLayoutsQL()?.forEach((comp) => {
14674
+ toolbars.push(...SmartComponentLayoutUtility.getToolbars(comp));
14675
+ });
14637
14676
  return toolbars;
14638
14677
  }
14639
14678
  initData() {