@smartbit4all/ng-client 3.1.86 → 3.1.87
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 +37 -17
- package/esm2020/lib/smart-client/smart.component.mjs +18 -11
- package/esm2020/lib/smart-client/smart.service.mjs +4 -4
- package/esm2020/lib/smart-component-layout/smart-component-layout-utility.mjs +37 -1
- package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +5 -2
- package/fesm2015/smartbit4all-ng-client.mjs +106 -41
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +103 -40
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +10 -4
- package/lib/smart-client/smart.component.d.ts +9 -6
- package/lib/smart-client/smart.service.d.ts +3 -3
- package/lib/smart-component-layout/smart-component-layout-utility.d.ts +7 -0
- package/lib/smart-component-layout/smart-component-layout.component.d.ts +1 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.87.tgz +0 -0
- package/smartbit4all-ng-client-3.1.86.tgz +0 -0
|
@@ -12154,7 +12154,7 @@ class SmartComponentLayoutComponent {
|
|
|
12154
12154
|
}
|
|
12155
12155
|
}
|
|
12156
12156
|
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12157
|
-
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 }], 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 [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\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"] }] });
|
|
12157
|
+
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 [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\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"] }] });
|
|
12158
12158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
12159
12159
|
type: Component,
|
|
12160
12160
|
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 [smartComponentLayout]=\"layout\"\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\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"] }]
|
|
@@ -12169,6 +12169,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
12169
12169
|
}], smartFilterList: [{
|
|
12170
12170
|
type: ViewChildren,
|
|
12171
12171
|
args: ['filter']
|
|
12172
|
+
}], components: [{
|
|
12173
|
+
type: ViewChildren,
|
|
12174
|
+
args: [SmartComponentLayoutComponent]
|
|
12172
12175
|
}] } });
|
|
12173
12176
|
|
|
12174
12177
|
class SmartComponentLayoutModule {
|
|
@@ -13364,6 +13367,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13364
13367
|
* Public API Surface of smarttree
|
|
13365
13368
|
*/
|
|
13366
13369
|
|
|
13370
|
+
class SmartComponentLayoutUtility {
|
|
13371
|
+
static setParent(layout, parent) {
|
|
13372
|
+
layout.parentComponent = parent;
|
|
13373
|
+
layout.components?.forEach((l) => this.setParent(l, parent));
|
|
13374
|
+
}
|
|
13375
|
+
static getForms(comp) {
|
|
13376
|
+
let result = [];
|
|
13377
|
+
if (comp.components) {
|
|
13378
|
+
result = comp.components
|
|
13379
|
+
.map((c) => this.getForms(c))
|
|
13380
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
13381
|
+
}
|
|
13382
|
+
if (comp.smartFormComponent) {
|
|
13383
|
+
result.push(comp.smartFormComponent);
|
|
13384
|
+
}
|
|
13385
|
+
return result;
|
|
13386
|
+
}
|
|
13387
|
+
static getGrids(comp) {
|
|
13388
|
+
let result = [];
|
|
13389
|
+
if (comp.components) {
|
|
13390
|
+
result = comp.components
|
|
13391
|
+
.map((c) => this.getGrids(c))
|
|
13392
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
13393
|
+
}
|
|
13394
|
+
if (comp.smartGridComponent) {
|
|
13395
|
+
result.push(comp.smartGridComponent);
|
|
13396
|
+
}
|
|
13397
|
+
return result;
|
|
13398
|
+
}
|
|
13399
|
+
static getTrees(comp) {
|
|
13400
|
+
let result = [];
|
|
13401
|
+
if (comp.components) {
|
|
13402
|
+
result = comp.components
|
|
13403
|
+
?.map((c) => this.getTrees(c))
|
|
13404
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
13405
|
+
}
|
|
13406
|
+
if (comp.treeService) {
|
|
13407
|
+
result.push(comp.treeService);
|
|
13408
|
+
}
|
|
13409
|
+
return result;
|
|
13410
|
+
}
|
|
13411
|
+
}
|
|
13412
|
+
|
|
13413
|
+
/*
|
|
13414
|
+
* Public API Surface of smart-component-layout
|
|
13415
|
+
*/
|
|
13416
|
+
|
|
13367
13417
|
let SmartComponentApiClient = class SmartComponentApiClient {
|
|
13368
13418
|
constructor(inject, auth, pageName) {
|
|
13369
13419
|
this.inject = inject;
|
|
@@ -13453,16 +13503,12 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13453
13503
|
getWidgets() {
|
|
13454
13504
|
if (this.useQueryLists) {
|
|
13455
13505
|
let widgets = new WidgetMap();
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
this.getAllTreeComponents()
|
|
13463
|
-
.filter((tree) => (tree?.smartTreeModel?.identifier ? true : false))
|
|
13464
|
-
.forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
|
|
13465
|
-
}
|
|
13506
|
+
this.getAllSmartGridComponents()
|
|
13507
|
+
.filter((grid) => (grid?.smartGrid?.gridIdentifier ? true : false))
|
|
13508
|
+
.forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
|
|
13509
|
+
this.getAllSmartTreeComponents()
|
|
13510
|
+
.filter((tree) => (tree?.smartTreeModel?.identifier ? true : false))
|
|
13511
|
+
.forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
|
|
13466
13512
|
return widgets;
|
|
13467
13513
|
}
|
|
13468
13514
|
return this.widgets;
|
|
@@ -13471,14 +13517,36 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13471
13517
|
this.initData();
|
|
13472
13518
|
this.initActions();
|
|
13473
13519
|
if (this.useQueryLists) {
|
|
13474
|
-
this.
|
|
13520
|
+
this.getAllSmartFormComponents()?.forEach((form) => {
|
|
13475
13521
|
if (form.smartForm) {
|
|
13476
13522
|
form.smartForm.componentModel = this.model;
|
|
13523
|
+
// uses data, valueSets, constraints
|
|
13477
13524
|
form.constructForm();
|
|
13478
13525
|
}
|
|
13479
13526
|
});
|
|
13480
13527
|
}
|
|
13481
|
-
// TODO: layout,
|
|
13528
|
+
// TODO: layout, widgets
|
|
13529
|
+
}
|
|
13530
|
+
getAllSmartFormComponents() {
|
|
13531
|
+
let forms = this.getSmartFormsQL()?.toArray() ?? [];
|
|
13532
|
+
this.getSmartComponentLayoutsQL()?.forEach((comp) => {
|
|
13533
|
+
forms.push(...SmartComponentLayoutUtility.getForms(comp));
|
|
13534
|
+
});
|
|
13535
|
+
return forms;
|
|
13536
|
+
}
|
|
13537
|
+
getAllSmartGridComponents() {
|
|
13538
|
+
let grids = this.getSmartGridsQL()?.toArray() ?? [];
|
|
13539
|
+
this.getSmartComponentLayoutsQL()?.forEach((comp) => {
|
|
13540
|
+
grids.push(...SmartComponentLayoutUtility.getGrids(comp));
|
|
13541
|
+
});
|
|
13542
|
+
return grids;
|
|
13543
|
+
}
|
|
13544
|
+
getAllSmartTreeComponents() {
|
|
13545
|
+
let trees = this.getSmartTreesQL()?.toArray() ?? [];
|
|
13546
|
+
this.getSmartComponentLayoutsQL()?.forEach((comp) => {
|
|
13547
|
+
trees.push(...SmartComponentLayoutUtility.getTrees(comp));
|
|
13548
|
+
});
|
|
13549
|
+
return trees;
|
|
13482
13550
|
}
|
|
13483
13551
|
initData() {
|
|
13484
13552
|
if (this.model?.data) {
|
|
@@ -13523,7 +13591,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13523
13591
|
invalidFieldNames: [],
|
|
13524
13592
|
};
|
|
13525
13593
|
if (this.useQueryLists) {
|
|
13526
|
-
this.
|
|
13594
|
+
this.getAllSmartFormComponents()?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
|
|
13527
13595
|
}
|
|
13528
13596
|
else {
|
|
13529
13597
|
this.formWidgets?.widgets?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
|
|
@@ -13596,7 +13664,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13596
13664
|
*/
|
|
13597
13665
|
submitForms(validate) {
|
|
13598
13666
|
if (this.useQueryLists) {
|
|
13599
|
-
this.
|
|
13667
|
+
this.getAllSmartFormComponents()?.forEach((form) => {
|
|
13600
13668
|
form?.submitForm(validate);
|
|
13601
13669
|
});
|
|
13602
13670
|
}
|
|
@@ -13769,7 +13837,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13769
13837
|
handleDataChange(changes, changeKey) {
|
|
13770
13838
|
this.setValueDeeply(this.model, changeKey, changes[changeKey]);
|
|
13771
13839
|
if (this.useQueryLists) {
|
|
13772
|
-
this.
|
|
13840
|
+
this.getAllSmartFormComponents()?.forEach((form) => form.refresh());
|
|
13773
13841
|
}
|
|
13774
13842
|
else {
|
|
13775
13843
|
this.formWidgets.widgets.forEach((formComponent, key) => {
|
|
@@ -13840,18 +13908,21 @@ class SmartComponent extends SmartComponentApiClient {
|
|
|
13840
13908
|
ngOnDestroy() {
|
|
13841
13909
|
this._ngOnDestroy();
|
|
13842
13910
|
}
|
|
13843
|
-
|
|
13844
|
-
return this.
|
|
13911
|
+
getSmartFormsQL() {
|
|
13912
|
+
return this.smartFormsQL;
|
|
13845
13913
|
}
|
|
13846
|
-
|
|
13847
|
-
return this.
|
|
13914
|
+
getSmartGridsQL() {
|
|
13915
|
+
return this.smartGridsQL;
|
|
13848
13916
|
}
|
|
13849
|
-
|
|
13850
|
-
return this.
|
|
13917
|
+
getSmartTreesQL() {
|
|
13918
|
+
return this.smartTreesQL;
|
|
13919
|
+
}
|
|
13920
|
+
getSmartComponentLayoutsQL() {
|
|
13921
|
+
return this.smartComponentLayoutsQL;
|
|
13851
13922
|
}
|
|
13852
13923
|
}
|
|
13853
13924
|
SmartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponent, deps: [{ token: i0.Injector }, { token: SmartAuthService }, { token: 'pageName' }], target: i0.ɵɵFactoryTarget.Component });
|
|
13854
|
-
SmartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponent, selector: "ng-component", viewQueries: [{ propertyName: "
|
|
13925
|
+
SmartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponent, selector: "ng-component", viewQueries: [{ propertyName: "smartFormsQL", predicate: SmartformComponent, descendants: true }, { propertyName: "smartGridsQL", predicate: SmartGridComponent, descendants: true }, { propertyName: "smartTreesQL", predicate: SmarttreeGenericService, descendants: true }, { propertyName: "smartComponentLayoutsQL", predicate: SmartComponentLayoutComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
13855
13926
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponent, decorators: [{
|
|
13856
13927
|
type: Component,
|
|
13857
13928
|
args: [{
|
|
@@ -13863,15 +13934,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13863
13934
|
}] }, { type: undefined, decorators: [{
|
|
13864
13935
|
type: Inject,
|
|
13865
13936
|
args: ['pageName']
|
|
13866
|
-
}] }]; }, propDecorators: {
|
|
13937
|
+
}] }]; }, propDecorators: { smartFormsQL: [{
|
|
13867
13938
|
type: ViewChildren,
|
|
13868
13939
|
args: [SmartformComponent]
|
|
13869
|
-
}],
|
|
13940
|
+
}], smartGridsQL: [{
|
|
13870
13941
|
type: ViewChildren,
|
|
13871
13942
|
args: [SmartGridComponent]
|
|
13872
|
-
}],
|
|
13943
|
+
}], smartTreesQL: [{
|
|
13873
13944
|
type: ViewChildren,
|
|
13874
13945
|
args: [SmarttreeGenericService]
|
|
13946
|
+
}], smartComponentLayoutsQL: [{
|
|
13947
|
+
type: ViewChildren,
|
|
13948
|
+
args: [SmartComponentLayoutComponent]
|
|
13875
13949
|
}] } });
|
|
13876
13950
|
|
|
13877
13951
|
class SmartService extends SmartComponentApiClient {
|
|
@@ -13884,13 +13958,13 @@ class SmartService extends SmartComponentApiClient {
|
|
|
13884
13958
|
ngOnDestroy() {
|
|
13885
13959
|
this._ngOnDestroy();
|
|
13886
13960
|
}
|
|
13887
|
-
|
|
13961
|
+
getSmartFormsQL() {
|
|
13888
13962
|
return this.formComponents;
|
|
13889
13963
|
}
|
|
13890
|
-
|
|
13964
|
+
getSmartGridsQL() {
|
|
13891
13965
|
return this.gridComponents;
|
|
13892
13966
|
}
|
|
13893
|
-
|
|
13967
|
+
getSmartTreesQL() {
|
|
13894
13968
|
return this.treeComponents;
|
|
13895
13969
|
}
|
|
13896
13970
|
}
|
|
@@ -13918,17 +13992,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13918
13992
|
args: [SmarttreeGenericService]
|
|
13919
13993
|
}] } });
|
|
13920
13994
|
|
|
13921
|
-
class SmartComponentLayoutUtility {
|
|
13922
|
-
static setParent(layout, parent) {
|
|
13923
|
-
layout.parentComponent = parent;
|
|
13924
|
-
layout.components?.forEach((l) => this.setParent(l, parent));
|
|
13925
|
-
}
|
|
13926
|
-
}
|
|
13927
|
-
|
|
13928
|
-
/*
|
|
13929
|
-
* Public API Surface of smart-component-layout
|
|
13930
|
-
*/
|
|
13931
|
-
|
|
13932
13995
|
class SmartNavbarService {
|
|
13933
13996
|
constructor() { }
|
|
13934
13997
|
}
|