@ajf/material 15.3.9 → 15.3.12
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/form-builder/form-builder.mjs +2 -2
- package/esm2020/form-builder/node-entry.mjs +3 -3
- package/esm2020/forms/form.mjs +3 -3
- package/esm2020/forms/forms-module.mjs +7 -3
- package/esm2020/forms/multiple-choice-field.mjs +25 -6
- package/esm2020/forms/single-choice-field.mjs +25 -6
- package/fesm2015/ajf-material-form-builder.mjs +4 -4
- package/fesm2015/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2015/ajf-material-forms.mjs +51 -10
- package/fesm2015/ajf-material-forms.mjs.map +1 -1
- package/fesm2020/ajf-material-form-builder.mjs +4 -4
- package/fesm2020/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2020/ajf-material-forms.mjs +49 -10
- package/fesm2020/ajf-material-forms.mjs.map +1 -1
- package/forms/forms-module.d.ts +2 -1
- package/forms/multiple-choice-field.d.ts +8 -3
- package/forms/single-choice-field.d.ts +8 -3
- package/package.json +2 -2
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { AJF_SEARCH_ALERT_THRESHOLD, AJF_WARNING_ALERT_SERVICE, AjfFieldWithChoicesComponent, } from '@ajf/core/forms';
|
|
23
23
|
import { ChangeDetectionStrategy, Component, Inject, Optional, ViewEncapsulation, } from '@angular/core';
|
|
24
|
+
import { FormControl } from '@angular/forms';
|
|
24
25
|
import * as i0 from "@angular/core";
|
|
25
26
|
import * as i1 from "@ajf/core/forms";
|
|
26
27
|
import * as i2 from "@ajf/material/checkbox-group";
|
|
@@ -29,19 +30,37 @@ import * as i4 from "@angular/common";
|
|
|
29
30
|
import * as i5 from "@angular/material/select";
|
|
30
31
|
import * as i6 from "@angular/material/core";
|
|
31
32
|
import * as i7 from "@angular/forms";
|
|
32
|
-
import * as i8 from "
|
|
33
|
-
import * as i9 from "
|
|
33
|
+
import * as i8 from "ngx-mat-select-search";
|
|
34
|
+
import * as i9 from "@ngneat/transloco";
|
|
35
|
+
import * as i10 from "./warning-alert-service";
|
|
34
36
|
export class AjfMultipleChoiceFieldComponent extends AjfFieldWithChoicesComponent {
|
|
35
37
|
constructor(cdr, service, was, searchThreshold) {
|
|
36
38
|
super(cdr, service, was, searchThreshold);
|
|
39
|
+
this.searchFilterCtrl = new FormControl('');
|
|
40
|
+
this.searchFilterSub = this.searchFilterCtrl.valueChanges.subscribe(() => {
|
|
41
|
+
cdr.markForCheck();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
filteredChoices() {
|
|
45
|
+
const choices = this.instance?.filteredChoices || [];
|
|
46
|
+
let search = this.searchFilterCtrl.value;
|
|
47
|
+
if (!search) {
|
|
48
|
+
return choices;
|
|
49
|
+
}
|
|
50
|
+
search = search.toLowerCase();
|
|
51
|
+
return choices.filter(c => c.label.toLowerCase().includes(search));
|
|
52
|
+
}
|
|
53
|
+
ngOnDestroy() {
|
|
54
|
+
super.ngOnDestroy();
|
|
55
|
+
this.searchFilterSub.unsubscribe();
|
|
37
56
|
}
|
|
38
57
|
}
|
|
39
58
|
AjfMultipleChoiceFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfMultipleChoiceFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AjfFormRendererService }, { token: AJF_WARNING_ALERT_SERVICE }, { token: AJF_SEARCH_ALERT_THRESHOLD, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
AjfMultipleChoiceFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfMultipleChoiceFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold); else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\" [multiple]=\"true\">\n <mat-option [value]=\"choice.value\"
|
|
59
|
+
AjfMultipleChoiceFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfMultipleChoiceFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold); else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\" [multiple]=\"true\">\n <mat-option [style.backgroundColor]=\"'white'\">\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option [value]=\"choice.value\" *ngFor=\"let choice of filteredChoices()\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n </ng-container>\n</ng-container>\n<ng-template #expanded>\n <ajf-checkbox-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [formControl]=\"ctrl!\">\n <ajf-checkbox-group-item [value]=\"choice.value\" *ngFor=\"let choice of instance!.filteredChoices\">\n {{ choice.label | transloco }}\n </ajf-checkbox-group-item>\n </ajf-checkbox-group>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i2.CheckboxGroupItem, selector: "ajf-checkbox-group-item" }, { kind: "directive", type: i3.AjfCheckboxGroup, selector: "ajf-checkbox-group,[ajf-checkbox-group]", inputs: ["value", "name", "disabled"], outputs: ["change"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i8.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i9.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.AjfExpandFieldWithChoicesPipe, name: "ajfExpandFieldWithChoices" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfMultipleChoiceFieldComponent, decorators: [{
|
|
42
61
|
type: Component,
|
|
43
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold); else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\" [multiple]=\"true\">\n <mat-option [value]=\"choice.value\"
|
|
44
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AjfFormRendererService }, { type:
|
|
62
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold); else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\" [multiple]=\"true\">\n <mat-option [style.backgroundColor]=\"'white'\">\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option [value]=\"choice.value\" *ngFor=\"let choice of filteredChoices()\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n </ng-container>\n</ng-container>\n<ng-template #expanded>\n <ajf-checkbox-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [formControl]=\"ctrl!\">\n <ajf-checkbox-group-item [value]=\"choice.value\" *ngFor=\"let choice of instance!.filteredChoices\">\n {{ choice.label | transloco }}\n </ajf-checkbox-group-item>\n </ajf-checkbox-group>\n</ng-template>\n" }]
|
|
63
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AjfFormRendererService }, { type: i10.AjfWarningAlertService, decorators: [{
|
|
45
64
|
type: Inject,
|
|
46
65
|
args: [AJF_WARNING_ALERT_SERVICE]
|
|
47
66
|
}] }, { type: undefined, decorators: [{
|
|
@@ -50,4 +69,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
50
69
|
type: Inject,
|
|
51
70
|
args: [AJF_SEARCH_ALERT_THRESHOLD]
|
|
52
71
|
}] }]; } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGlwbGUtY2hvaWNlLWZpZWxkLmpzIiwic291cmNlUm9vdCI6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nLWNvbnRhaW5lcj5cbjxuZy10ZW1wbGF0ZSAjZXhwYW5kZWQ+XG4gIDxhamYtY2hlY2tib3gtZ3JvdXAgKm5nSWY9XCJjb250cm9sfGFzeW5jIGFzIGN0cmxcIiBjbGFzcz1cImFqZi1jaG9pY2VzLWNvbnRhaW5lclwiXG4gICAgICBbZm9ybUNvbnRyb2xdPVwiY3RybCFcIj5cbiAgICA8YWpmLWNoZWNrYm94LWdyb3VwLWl0ZW0gW3ZhbHVlXT1cImNob2ljZS52YWx1ZVwiICpuZ0Zvcj1cImxldCBjaG9pY2Ugb2YgaW5zdGFuY2UhLmZpbHRlcmVkQ2hvaWNlc1wiPlxuICAgICAge3sgY2hvaWNlLmxhYmVsIHwgdHJhbnNsb2NvIH19XG4gICAgPC9hamYtY2hlY2tib3gtZ3JvdXAtaXRlbT5cbiAgPC9hamYtY2hlY2tib3gtZ3JvdXA+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { AJF_SEARCH_ALERT_THRESHOLD, AJF_WARNING_ALERT_SERVICE, AjfFieldWithChoicesComponent, } from '@ajf/core/forms';
|
|
23
23
|
import { ChangeDetectionStrategy, Component, Inject, Optional, ViewEncapsulation, } from '@angular/core';
|
|
24
|
+
import { FormControl } from '@angular/forms';
|
|
24
25
|
import * as i0 from "@angular/core";
|
|
25
26
|
import * as i1 from "@ajf/core/forms";
|
|
26
27
|
import * as i2 from "@angular/common";
|
|
@@ -28,19 +29,37 @@ import * as i3 from "@angular/material/radio";
|
|
|
28
29
|
import * as i4 from "@angular/material/select";
|
|
29
30
|
import * as i5 from "@angular/material/core";
|
|
30
31
|
import * as i6 from "@angular/forms";
|
|
31
|
-
import * as i7 from "
|
|
32
|
-
import * as i8 from "
|
|
32
|
+
import * as i7 from "ngx-mat-select-search";
|
|
33
|
+
import * as i8 from "@ngneat/transloco";
|
|
34
|
+
import * as i9 from "./warning-alert-service";
|
|
33
35
|
export class AjfSingleChoiceFieldComponent extends AjfFieldWithChoicesComponent {
|
|
34
36
|
constructor(cdr, service, was, searchThreshold) {
|
|
35
37
|
super(cdr, service, was, searchThreshold);
|
|
38
|
+
this.searchFilterCtrl = new FormControl('');
|
|
39
|
+
this.searchFilterSub = this.searchFilterCtrl.valueChanges.subscribe(() => {
|
|
40
|
+
cdr.markForCheck();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
filteredChoices() {
|
|
44
|
+
const choices = this.instance?.filteredChoices || [];
|
|
45
|
+
let search = this.searchFilterCtrl.value;
|
|
46
|
+
if (!search) {
|
|
47
|
+
return choices;
|
|
48
|
+
}
|
|
49
|
+
search = search.toLowerCase();
|
|
50
|
+
return choices.filter(c => c.label.toLowerCase().includes(search));
|
|
51
|
+
}
|
|
52
|
+
ngOnDestroy() {
|
|
53
|
+
super.ngOnDestroy();
|
|
54
|
+
this.searchFilterSub.unsubscribe();
|
|
36
55
|
}
|
|
37
56
|
}
|
|
38
57
|
AjfSingleChoiceFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfSingleChoiceFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AjfFormRendererService }, { token: AJF_WARNING_ALERT_SERVICE }, { token: AJF_SEARCH_ALERT_THRESHOLD, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
AjfSingleChoiceFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfSingleChoiceFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold) ; else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\">\n <mat-option [value]=\"choice.value\"
|
|
58
|
+
AjfSingleChoiceFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfSingleChoiceFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold) ; else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\">\n <mat-option [style.backgroundColor]=\"'white'\">\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option [value]=\"choice.value\" *ngFor=\"let choice of filteredChoices()\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n </ng-container>\n</ng-container>\n<ng-template #expanded>\n <mat-radio-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [attr.aria-labelledby]=\"instance!.node.name\"\n [formControl]=\"ctrl!\">\n <mat-radio-button [value]=\"choice.value\" *ngFor=\"let choice of instance!.filteredChoices\">\n {{ choice.label | transloco }}\n </mat-radio-button>\n </mat-radio-group>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.AjfExpandFieldWithChoicesPipe, name: "ajfExpandFieldWithChoices" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
40
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfSingleChoiceFieldComponent, decorators: [{
|
|
41
60
|
type: Component,
|
|
42
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold) ; else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\">\n <mat-option [value]=\"choice.value\"
|
|
43
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AjfFormRendererService }, { type:
|
|
61
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"instance\">\n <ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold) ; else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\">\n <mat-option [style.backgroundColor]=\"'white'\">\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option [value]=\"choice.value\" *ngFor=\"let choice of filteredChoices()\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n </ng-container>\n</ng-container>\n<ng-template #expanded>\n <mat-radio-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [attr.aria-labelledby]=\"instance!.node.name\"\n [formControl]=\"ctrl!\">\n <mat-radio-button [value]=\"choice.value\" *ngFor=\"let choice of instance!.filteredChoices\">\n {{ choice.label | transloco }}\n </mat-radio-button>\n </mat-radio-group>\n</ng-template>\n" }]
|
|
62
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AjfFormRendererService }, { type: i9.AjfWarningAlertService, decorators: [{
|
|
44
63
|
type: Inject,
|
|
45
64
|
args: [AJF_WARNING_ALERT_SERVICE]
|
|
46
65
|
}] }, { type: undefined, decorators: [{
|
|
@@ -49,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
49
68
|
type: Inject,
|
|
50
69
|
args: [AJF_SEARCH_ALERT_THRESHOLD]
|
|
51
70
|
}] }]; } });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2luZ2xlLWNob2ljZS1maWVsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21hdGVyaWFsL2Zvcm1zL3NyYy9zaW5nbGUtY2hvaWNlLWZpZWxkLnRzI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b250YWluZXJcIlxuICAgICAgW2F0dHIuYXJpYS1sYWJlbGxlZGJ5XT1cImluc3RhbmNlIS5ub2RlLm5hbWVcIlxuICAgICAgW2Zvcm1Db250cm9sXT1cImN0cmwhXCI+XG4gICAgPG1hdC1yYWRpby1idXR0b24gW3ZhbHVlXT1cImNob2ljZS52YWx1ZVwiICpuZ0Zvcj1cImxldCBjaG9pY2Ugb2YgaW5zdGFuY2UhLmZpbHRlcmVkQ2hvaWNlc1wiPlxuICAgICAge3sgY2hvaWNlLmxhYmVsIHwgdHJhbnNsb2NvIH19XG4gICAgPC9tYXQtcmFkaW8tYnV0dG9uPlxuICA8L21hdC1yYWRpby1ncm91cD5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -1599,10 +1599,10 @@ class AjfFbNodeEntry {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
1601
|
AjfFbNodeEntry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeEntry, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1602
|
-
AjfFbNodeEntry.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: AjfFbNodeEntry, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999;max-height:100px;max-width:500px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1602
|
+
AjfFbNodeEntry.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: AjfFbNodeEntry, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999;max-height:100px;max-width:500px;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1603
1603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeEntry, decorators: [{
|
|
1604
1604
|
type: Component,
|
|
1605
|
-
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999;max-height:100px;max-width:500px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
1605
|
+
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999;max-height:100px;max-width:500px;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
1606
1606
|
}], ctorParameters: function () { return [{ type: AjfFormBuilderService }]; }, propDecorators: { branchLines: [{
|
|
1607
1607
|
type: ViewChildren,
|
|
1608
1608
|
args: [AjfFbBranchLine]
|
|
@@ -2945,10 +2945,10 @@ class AjfFormBuilder {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
AjfFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilder, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
2948
|
-
AjfFormBuilder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form" }, viewQueries: [{ propertyName: "designerCont", first: true, predicate: ["designer"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20
|
|
2948
|
+
AjfFormBuilder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form" }, viewQueries: [{ propertyName: "designerCont", first: true, predicate: ["designer"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20%;max-height:60vh;overflow-y:auto;position:sticky;top:32px}ajf-form-builder mat-toolbar .ajf-spacer{flex:1 1 auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i7$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i7$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i8$3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i8$3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i9$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "component", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties" }, { kind: "component", type: AjfFbNodeTypeEntry, selector: "ajf-fb-node-type-entry", inputs: ["nodeType"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2949
2949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilder, decorators: [{
|
|
2950
2950
|
type: Component,
|
|
2951
|
-
args: [{ selector: 'ajf-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20
|
|
2951
|
+
args: [{ selector: 'ajf-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20%;max-height:60vh;overflow-y:auto;position:sticky;top:32px}ajf-form-builder mat-toolbar .ajf-spacer{flex:1 1 auto}\n"] }]
|
|
2952
2952
|
}], ctorParameters: function () { return [{ type: AjfFormBuilderService }, { type: i2.MatDialog }]; }, propDecorators: { designerCont: [{
|
|
2953
2953
|
type: ViewChild,
|
|
2954
2954
|
args: ['designer', { static: true }]
|