@smartbit4all/ng-client 1.1.33 → 1.1.35
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 +9 -1
- package/esm2020/lib/smart-client/smart-component-layout/smart-component-layout.component.mjs +74 -0
- package/esm2020/lib/smart-client/smart-component-layout/smart-component-layout.model.mjs +13 -0
- package/esm2020/lib/smart-client/smart-file-uploader/smart-file-uploader.component.mjs +4 -1
- package/esm2020/lib/smart-ng-client.module.mjs +20 -6
- package/esm2020/projects.mjs +3 -1
- package/fesm2015/smartbit4all-ng-client.mjs +118 -11
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +114 -11
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +4 -0
- package/lib/smart-client/smart-component-layout/smart-component-layout.component.d.ts +21 -0
- package/lib/smart-client/smart-component-layout/smart-component-layout.model.d.ts +30 -0
- package/lib/smart-ng-client.module.d.ts +8 -6
- package/package.json +1 -1
- package/projects.d.ts +2 -0
- package/smartbit4all-ng-client-1.1.35.tgz +0 -0
- package/smartbit4all-ng-client-1.1.33.tgz +0 -0
|
@@ -26,9 +26,10 @@ import { catchError as catchError$1, switchMap } from 'rxjs/operators';
|
|
|
26
26
|
import * as i4$4 from '@angular/material/snack-bar';
|
|
27
27
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
28
28
|
import { Validators } from '@angular/forms';
|
|
29
|
-
import * as
|
|
29
|
+
import * as i1$2 from '@smartbit4all/form';
|
|
30
30
|
import { SmartFormWidgetType, SmartValidatorName, SmartFormWidgetDirection, SmartformModule } from '@smartbit4all/form';
|
|
31
|
-
import
|
|
31
|
+
import * as i2$2 from '@smartbit4all/grid';
|
|
32
|
+
import { SmartLayoutDef, GridUiActionType, SmartGridModule, SmartGridComponent } from '@smartbit4all/grid';
|
|
32
33
|
import { SmarttreeGenericService } from '@smartbit4all/tree';
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -3880,7 +3881,7 @@ class UiActionInputDialogComponent {
|
|
|
3880
3881
|
}
|
|
3881
3882
|
}
|
|
3882
3883
|
UiActionInputDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, deps: [{ token: UiActionInputDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3883
|
-
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<p>\n\t\t{{ getText() }}\n\t</p>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type:
|
|
3884
|
+
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<p>\n\t\t{{ getText() }}\n\t</p>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i1$2.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] });
|
|
3884
3885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
|
|
3885
3886
|
type: Component,
|
|
3886
3887
|
args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<p>\n\t\t{{ getText() }}\n\t</p>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
@@ -3994,7 +3995,7 @@ class UiActionFileUploadDialogComponent {
|
|
|
3994
3995
|
}
|
|
3995
3996
|
}
|
|
3996
3997
|
UiActionFileUploadDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, deps: [{ token: UiActionFileUploadDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3997
|
-
UiActionFileUploadDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type:
|
|
3998
|
+
UiActionFileUploadDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i1$2.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] });
|
|
3998
3999
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
|
|
3999
4000
|
type: Component,
|
|
4000
4001
|
args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\n <div class=\"headerContainer\">\n <h3 class=\"color-accent-700\">\n {{ getTitle() }}\n </h3>\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n </button>\n </div>\n <p>\n {{ getText() }}\n </p>\n <smartfileuploader\n [i18n]=\"i18n\"\n [fileFormats]=\"fileFormats\"\n [maxSizeMb]=\"maxSizeMb\"\n [uploadCallback]=\"upload.bind(this)\"\n [isMultiple]=\"isMultiple\"\n ></smartfileuploader>\n <div class=\"folderNameDialogButtonsContainer\">\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n {{ getCancelButtonLabel() }}\n </button>\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\n {{ getActionButtonLabel() }}\n </button> -->\n </div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
@@ -4418,6 +4419,9 @@ class SmartFileUploaderComponent {
|
|
|
4418
4419
|
}
|
|
4419
4420
|
ngOnChanges(changes) {
|
|
4420
4421
|
this.config = changes['config'].currentValue;
|
|
4422
|
+
if (this.config) {
|
|
4423
|
+
this.setUp();
|
|
4424
|
+
}
|
|
4421
4425
|
}
|
|
4422
4426
|
setUp() {
|
|
4423
4427
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
@@ -4444,7 +4448,7 @@ class SmartFileUploaderComponent {
|
|
|
4444
4448
|
}
|
|
4445
4449
|
}
|
|
4446
4450
|
SmartFileUploaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartFileUploaderComponent, deps: [{ token: UiActionService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4447
|
-
SmartFileUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartFileUploaderComponent, selector: "smart-file-uploader4sc", inputs: { config: "config" }, usesOnChanges: true, ngImport: i0, template: "<smartfileuploader\n *ngIf=\"i18n\"\n [i18n]=\"i18n\"\n [fileFormats]=\"config?.fileFormats\"\n [isMultiple]=\"config?.isMultiple\"\n [maxSizeMb]=\"config?.maxSizeMb\"\n [uploadCallback]=\"executeUpload.bind(this)\"\n></smartfileuploader>\n", styles: [""], components: [{ type:
|
|
4451
|
+
SmartFileUploaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartFileUploaderComponent, selector: "smart-file-uploader4sc", inputs: { config: "config" }, usesOnChanges: true, ngImport: i0, template: "<smartfileuploader\n *ngIf=\"i18n\"\n [i18n]=\"i18n\"\n [fileFormats]=\"config?.fileFormats\"\n [isMultiple]=\"config?.isMultiple\"\n [maxSizeMb]=\"config?.maxSizeMb\"\n [uploadCallback]=\"executeUpload.bind(this)\"\n></smartfileuploader>\n", styles: [""], components: [{ type: i1$2.SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4448
4452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartFileUploaderComponent, decorators: [{
|
|
4449
4453
|
type: Component,
|
|
4450
4454
|
args: [{ selector: 'smart-file-uploader4sc', template: "<smartfileuploader\n *ngIf=\"i18n\"\n [i18n]=\"i18n\"\n [fileFormats]=\"config?.fileFormats\"\n [isMultiple]=\"config?.isMultiple\"\n [maxSizeMb]=\"config?.maxSizeMb\"\n [uploadCallback]=\"executeUpload.bind(this)\"\n></smartfileuploader>\n", styles: [""] }]
|
|
@@ -4452,33 +4456,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4452
4456
|
type: Input
|
|
4453
4457
|
}] } });
|
|
4454
4458
|
|
|
4459
|
+
const LayoutDirection = {
|
|
4460
|
+
Horizontal: 'horizontal',
|
|
4461
|
+
Vertical: 'vertical',
|
|
4462
|
+
};
|
|
4463
|
+
const ComponentType = {
|
|
4464
|
+
Container: 'container',
|
|
4465
|
+
Form: 'form',
|
|
4466
|
+
Widget: 'widget',
|
|
4467
|
+
};
|
|
4468
|
+
const ComponentWidgetType = {
|
|
4469
|
+
Grid: 'grid',
|
|
4470
|
+
};
|
|
4471
|
+
|
|
4472
|
+
class SmartComponentLayoutComponent {
|
|
4473
|
+
constructor(layoutService) {
|
|
4474
|
+
this.layoutService = layoutService;
|
|
4475
|
+
}
|
|
4476
|
+
ngOnChanges(changes) {
|
|
4477
|
+
var _a;
|
|
4478
|
+
this.smartComponentLayout = changes['smartComponentLayout'].currentValue;
|
|
4479
|
+
if (((_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.type) === ComponentType.Form) {
|
|
4480
|
+
this.constructForm();
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4483
|
+
type() {
|
|
4484
|
+
return ComponentType;
|
|
4485
|
+
}
|
|
4486
|
+
constructForm() {
|
|
4487
|
+
var _a, _b, _c, _d, _e;
|
|
4488
|
+
const widgets = this.layoutService.render({
|
|
4489
|
+
layoutDefinitions: (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.form,
|
|
4490
|
+
});
|
|
4491
|
+
this.smartForm = {
|
|
4492
|
+
direction: SmartFormWidgetDirection.COL,
|
|
4493
|
+
model: (_b = this.smartComponentLayout) === null || _b === void 0 ? void 0 : _b.parentComponent.model,
|
|
4494
|
+
constraints: (_d = (_c = this.smartComponentLayout) === null || _c === void 0 ? void 0 : _c.parentComponent.model) === null || _d === void 0 ? void 0 : _d.constraints,
|
|
4495
|
+
widgets,
|
|
4496
|
+
};
|
|
4497
|
+
(_e = this.smartComponentLayout) === null || _e === void 0 ? void 0 : _e.parentComponent.addForm(
|
|
4498
|
+
// unique identifier for the form
|
|
4499
|
+
`form_${this.makeid(5)}`, this.smartForm, this.formChild);
|
|
4500
|
+
}
|
|
4501
|
+
makeid(length) {
|
|
4502
|
+
let result = '';
|
|
4503
|
+
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
4504
|
+
const charactersLength = characters.length;
|
|
4505
|
+
let counter = 0;
|
|
4506
|
+
while (counter < length) {
|
|
4507
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
4508
|
+
counter += 1;
|
|
4509
|
+
}
|
|
4510
|
+
return result;
|
|
4511
|
+
}
|
|
4512
|
+
constructGrid() {
|
|
4513
|
+
var _a, _b, _c;
|
|
4514
|
+
this.smartGrid = {
|
|
4515
|
+
gridIdentifier: (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.gridIdentifier,
|
|
4516
|
+
gridModel: {
|
|
4517
|
+
page: {},
|
|
4518
|
+
},
|
|
4519
|
+
layoutDef: SmartLayoutDef.TABLE,
|
|
4520
|
+
};
|
|
4521
|
+
this.smartGrid = (_c = this.smartComponentLayout) === null || _c === void 0 ? void 0 : _c.parentComponent.addGrid(this.smartGrid, {
|
|
4522
|
+
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
4523
|
+
}, false, this.gridChild);
|
|
4524
|
+
}
|
|
4525
|
+
}
|
|
4526
|
+
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: i1$2.SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4527
|
+
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "formChild", first: true, predicate: ["form"], descendants: true }, { propertyName: "gridChild", first: true, predicate: ["grid"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"smartComponentLayout?.type === type().Container\"\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\n>\n <smart-component-layout\n [smartComponentLayout]=\"layout\"\n *ngFor=\"let layout of smartComponentLayout?.components\"\n ></smart-component-layout>\n</div>\n<smartform #form [smartForm]=\"smartForm\"></smartform>\n<smart-grid\n #grid\n [smartGrid]=\"smartGrid\"\n [uuid]=\"smartComponentLayout?.parentComponent?.uuid!\"\n></smart-grid>\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: i1$2.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: i2$2.SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
4529
|
+
type: Component,
|
|
4530
|
+
args: [{ selector: 'smart-component-layout', template: "<div\n *ngIf=\"smartComponentLayout?.type === type().Container\"\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\n>\n <smart-component-layout\n [smartComponentLayout]=\"layout\"\n *ngFor=\"let layout of smartComponentLayout?.components\"\n ></smart-component-layout>\n</div>\n<smartform #form [smartForm]=\"smartForm\"></smartform>\n<smart-grid\n #grid\n [smartGrid]=\"smartGrid\"\n [uuid]=\"smartComponentLayout?.parentComponent?.uuid!\"\n></smart-grid>\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
4531
|
+
}], ctorParameters: function () { return [{ type: i1$2.SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
|
|
4532
|
+
type: Input
|
|
4533
|
+
}], formChild: [{
|
|
4534
|
+
type: ViewChild,
|
|
4535
|
+
args: ['form']
|
|
4536
|
+
}], gridChild: [{
|
|
4537
|
+
type: ViewChild,
|
|
4538
|
+
args: ['grid']
|
|
4539
|
+
}] } });
|
|
4540
|
+
|
|
4455
4541
|
class SmartNgClientModule {
|
|
4456
4542
|
}
|
|
4457
4543
|
SmartNgClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4458
|
-
SmartNgClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, declarations: [SmartFileUploaderComponent], imports: [BrowserModule,
|
|
4544
|
+
SmartNgClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, declarations: [SmartFileUploaderComponent, SmartComponentLayoutComponent], imports: [BrowserModule,
|
|
4459
4545
|
MatCommonModule,
|
|
4460
4546
|
SmartSessionModule,
|
|
4461
4547
|
SmartViewContextModule,
|
|
4462
|
-
SmartformModule
|
|
4548
|
+
SmartformModule,
|
|
4549
|
+
SmartGridModule], exports: [SmartSessionModule,
|
|
4550
|
+
SmartViewContextModule,
|
|
4551
|
+
SmartFileUploaderComponent,
|
|
4552
|
+
SmartComponentLayoutComponent] });
|
|
4463
4553
|
SmartNgClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, providers: [SmartNgClientService], imports: [[
|
|
4464
4554
|
BrowserModule,
|
|
4465
4555
|
MatCommonModule,
|
|
4466
4556
|
SmartSessionModule,
|
|
4467
4557
|
SmartViewContextModule,
|
|
4468
4558
|
SmartformModule,
|
|
4469
|
-
|
|
4559
|
+
SmartGridModule,
|
|
4560
|
+
], SmartSessionModule,
|
|
4561
|
+
SmartViewContextModule] });
|
|
4470
4562
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartNgClientModule, decorators: [{
|
|
4471
4563
|
type: NgModule,
|
|
4472
4564
|
args: [{
|
|
4473
|
-
declarations: [SmartFileUploaderComponent],
|
|
4565
|
+
declarations: [SmartFileUploaderComponent, SmartComponentLayoutComponent],
|
|
4474
4566
|
imports: [
|
|
4475
4567
|
BrowserModule,
|
|
4476
4568
|
MatCommonModule,
|
|
4477
4569
|
SmartSessionModule,
|
|
4478
4570
|
SmartViewContextModule,
|
|
4479
4571
|
SmartformModule,
|
|
4572
|
+
SmartGridModule,
|
|
4573
|
+
],
|
|
4574
|
+
exports: [
|
|
4575
|
+
SmartSessionModule,
|
|
4576
|
+
SmartViewContextModule,
|
|
4577
|
+
SmartFileUploaderComponent,
|
|
4578
|
+
SmartComponentLayoutComponent,
|
|
4480
4579
|
],
|
|
4481
|
-
exports: [SmartSessionModule, SmartViewContextModule, SmartFileUploaderComponent],
|
|
4482
4580
|
providers: [SmartNgClientService],
|
|
4483
4581
|
}]
|
|
4484
4582
|
}] });
|
|
@@ -4651,6 +4749,15 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
4651
4749
|
throw new Error('handleSpecificDemandsAsynchronously method not implemented.');
|
|
4652
4750
|
}
|
|
4653
4751
|
//#endregion
|
|
4752
|
+
addSmartLayout(layout) {
|
|
4753
|
+
this.smartComponentLayoutDefinition = this.setParentComponent(layout);
|
|
4754
|
+
}
|
|
4755
|
+
setParentComponent(layout) {
|
|
4756
|
+
var _a;
|
|
4757
|
+
layout.parentComponent = this;
|
|
4758
|
+
layout.components = (_a = layout.components) === null || _a === void 0 ? void 0 : _a.map((l) => this.setParentComponent(l));
|
|
4759
|
+
return layout;
|
|
4760
|
+
}
|
|
4654
4761
|
addGrid(smartGrid, options, useAsDefaultGrid, componentReference) {
|
|
4655
4762
|
smartGrid.options = options;
|
|
4656
4763
|
smartGrid.uiActionService = this.uiActionService;
|
|
@@ -4902,5 +5009,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4902
5009
|
* Generated bundle index. Do not edit.
|
|
4903
5010
|
*/
|
|
4904
5011
|
|
|
4905
|
-
export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartFileUploaderComponent, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
5012
|
+
export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, ComponentType, ComponentWidgetType, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, LayoutDirection, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartFileUploaderComponent, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
|
|
4906
5013
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|