@smartbit4all/ng-client 3.1.48 → 3.1.50
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-component-layout/smart-component-layout.component.mjs +62 -16
- package/fesm2015/smartbit4all-ng-client.mjs +63 -16
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +59 -14
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-component-layout/smart-component-layout.component.d.ts +14 -5
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.50.tgz +0 -0
- package/smartbit4all-ng-client-3.1.48.tgz +0 -0
|
@@ -11822,12 +11822,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11822
11822
|
class SmartComponentLayoutComponent {
|
|
11823
11823
|
constructor(layoutService) {
|
|
11824
11824
|
this.layoutService = layoutService;
|
|
11825
|
+
this._destroy$ = new Subject();
|
|
11826
|
+
this.smartFormList.changes
|
|
11827
|
+
.pipe(takeUntil(this._destroy$))
|
|
11828
|
+
.subscribe((list) => {
|
|
11829
|
+
if (!this.smartFormComponent) {
|
|
11830
|
+
this.smartFormComponent = list.first;
|
|
11831
|
+
this.bindForm();
|
|
11832
|
+
}
|
|
11833
|
+
});
|
|
11834
|
+
this.smartGridList.changes
|
|
11835
|
+
.pipe(takeUntil(this._destroy$))
|
|
11836
|
+
.subscribe((list) => {
|
|
11837
|
+
if (!this.smartGridComponent) {
|
|
11838
|
+
this.smartGridComponent = list.first;
|
|
11839
|
+
this.bindGrid();
|
|
11840
|
+
}
|
|
11841
|
+
});
|
|
11842
|
+
this.smartFilterList.changes
|
|
11843
|
+
.pipe(takeUntil(this._destroy$))
|
|
11844
|
+
.subscribe((list) => {
|
|
11845
|
+
if (!this.smartFilterComponent) {
|
|
11846
|
+
this.smartFilterComponent = list.first;
|
|
11847
|
+
this.bindFilter();
|
|
11848
|
+
}
|
|
11849
|
+
});
|
|
11825
11850
|
}
|
|
11826
11851
|
ngOnInit() {
|
|
11827
11852
|
if (this.smartComponentLayout) {
|
|
11828
11853
|
this.setUp();
|
|
11829
11854
|
}
|
|
11830
11855
|
}
|
|
11856
|
+
ngOnDestroy() {
|
|
11857
|
+
this._destroy$.next();
|
|
11858
|
+
this._destroy$.complete();
|
|
11859
|
+
}
|
|
11831
11860
|
ngOnChanges(changes) {
|
|
11832
11861
|
this.smartComponentLayout = changes['smartComponentLayout'].currentValue;
|
|
11833
11862
|
if (this.smartComponentLayout) {
|
|
@@ -11878,9 +11907,14 @@ class SmartComponentLayoutComponent {
|
|
|
11878
11907
|
componentModel: this.parent?.model,
|
|
11879
11908
|
widgets,
|
|
11880
11909
|
};
|
|
11881
|
-
this.
|
|
11882
|
-
|
|
11883
|
-
|
|
11910
|
+
this.bindForm();
|
|
11911
|
+
}
|
|
11912
|
+
bindForm() {
|
|
11913
|
+
if (this.smartForm && this.smartFormComponent) {
|
|
11914
|
+
this.parent?.addForm(
|
|
11915
|
+
// unique identifier for the form
|
|
11916
|
+
`form_${this.makeid(5)}`, this.smartForm, this.smartFormComponent);
|
|
11917
|
+
}
|
|
11884
11918
|
}
|
|
11885
11919
|
makeid(length) {
|
|
11886
11920
|
let result = '';
|
|
@@ -11899,14 +11933,25 @@ class SmartComponentLayoutComponent {
|
|
|
11899
11933
|
gridModel: {
|
|
11900
11934
|
page: {},
|
|
11901
11935
|
},
|
|
11936
|
+
options: {
|
|
11937
|
+
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
11938
|
+
},
|
|
11902
11939
|
layoutDef: SmartLayoutDef.TABLE,
|
|
11903
11940
|
};
|
|
11904
|
-
this.
|
|
11905
|
-
|
|
11906
|
-
|
|
11941
|
+
this.bindGrid();
|
|
11942
|
+
}
|
|
11943
|
+
bindGrid() {
|
|
11944
|
+
if (this.smartGrid && this.smartGridComponent) {
|
|
11945
|
+
this.smartGrid = this.parent?.addGrid(this.smartGrid, {
|
|
11946
|
+
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
11947
|
+
}, false, this.smartGridComponent);
|
|
11948
|
+
}
|
|
11907
11949
|
}
|
|
11908
11950
|
constructFilter() {
|
|
11909
|
-
this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.
|
|
11951
|
+
this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.smartFilterComponent);
|
|
11952
|
+
}
|
|
11953
|
+
bindFilter() {
|
|
11954
|
+
// TODO
|
|
11910
11955
|
}
|
|
11911
11956
|
constructTree() {
|
|
11912
11957
|
this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.treeIdentifier);
|
|
@@ -11914,20 +11959,20 @@ class SmartComponentLayoutComponent {
|
|
|
11914
11959
|
}
|
|
11915
11960
|
}
|
|
11916
11961
|
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11917
|
-
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "
|
|
11962
|
+
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 [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"] }] });
|
|
11918
11963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
11919
11964
|
type: Component,
|
|
11920
11965
|
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 [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
11921
11966
|
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
|
|
11922
11967
|
type: Input
|
|
11923
|
-
}],
|
|
11924
|
-
type:
|
|
11968
|
+
}], smartFormList: [{
|
|
11969
|
+
type: ViewChildren,
|
|
11925
11970
|
args: ['form']
|
|
11926
|
-
}],
|
|
11927
|
-
type:
|
|
11971
|
+
}], smartGridList: [{
|
|
11972
|
+
type: ViewChildren,
|
|
11928
11973
|
args: ['grid']
|
|
11929
|
-
}],
|
|
11930
|
-
type:
|
|
11974
|
+
}], smartFilterList: [{
|
|
11975
|
+
type: ViewChildren,
|
|
11931
11976
|
args: ['filter']
|
|
11932
11977
|
}] } });
|
|
11933
11978
|
|