@ajsf/material 19.0.1 → 19.2.0
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/fesm2022/ajsf-material.mjs +442 -73
- package/fesm2022/ajsf-material.mjs.map +1 -1
- package/lib/widgets/material-chip-list.component.d.ts +5 -1
- package/lib/widgets/material-file.component.d.ts +2 -1
- package/lib/widgets/material-number.component.d.ts +2 -0
- package/lib/widgets/material-one-of.component.d.ts +10 -2
- package/lib/widgets/material-slider.component.d.ts +2 -0
- package/lib/widgets/material-stepper.component.d.ts +7 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Input, ChangeDetectionStrategy, Component, Inject, Optional, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@ajsf/core';
|
|
4
|
-
import { hasOwn, buildTitleMap, cloneDeep, isDefined, isArray, Framework, JsonSchemaFormModule, WidgetLibraryModule, JsonSchemaFormService, FrameworkLibraryService, WidgetLibraryService } from '@ajsf/core';
|
|
4
|
+
import { hasOwn, buildTitleMap, cloneDeep, isDefined, effectiveMinimum, effectiveMaximum, isArray, Framework, JsonSchemaFormModule, WidgetLibraryModule, JsonSchemaFormService, FrameworkLibraryService, WidgetLibraryService } from '@ajsf/core';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i3 from '@angular/material/card';
|
|
@@ -12,33 +12,36 @@ import * as i5 from '@angular/material/form-field';
|
|
|
12
12
|
import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
|
|
13
13
|
import * as i3$1 from '@angular/material/button';
|
|
14
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i5$1 from '@angular/material/icon';
|
|
16
16
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
17
|
import * as i3$2 from '@angular/material/button-toggle';
|
|
18
18
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
19
19
|
import * as i3$3 from '@angular/forms';
|
|
20
20
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
21
|
-
import * as i4$
|
|
21
|
+
import * as i4$1 from '@angular/material/checkbox';
|
|
22
22
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
23
23
|
import * as i6 from '@angular/material/slide-toggle';
|
|
24
24
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
25
|
-
import
|
|
25
|
+
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
26
|
+
import * as i3$4 from '@angular/material/chips';
|
|
27
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
28
|
+
import * as i4$2 from '@angular/material/datepicker';
|
|
26
29
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
27
30
|
import * as i6$1 from '@angular/material/input';
|
|
28
31
|
import { MatInputModule } from '@angular/material/input';
|
|
29
|
-
import * as i4$
|
|
32
|
+
import * as i4$3 from '@angular/material/autocomplete';
|
|
30
33
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
31
|
-
import * as i5$1 from '@angular/material/radio';
|
|
32
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
33
34
|
import * as i6$2 from '@angular/material/select';
|
|
34
35
|
import { MatSelectModule } from '@angular/material/select';
|
|
35
|
-
import * as i5$2 from '@angular/material/
|
|
36
|
+
import * as i5$2 from '@angular/material/radio';
|
|
37
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
38
|
+
import * as i5$3 from '@angular/material/slider';
|
|
36
39
|
import { MatSliderModule } from '@angular/material/slider';
|
|
37
|
-
import * as
|
|
40
|
+
import * as i4$4 from '@angular/material/stepper';
|
|
41
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
42
|
+
import * as i3$5 from '@angular/material/tabs';
|
|
38
43
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
39
|
-
import { MatChipsModule } from '@angular/material/chips';
|
|
40
44
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
41
|
-
import { MatStepperModule } from '@angular/material/stepper';
|
|
42
45
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
43
46
|
import { MatMenuModule } from '@angular/material/menu';
|
|
44
47
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
@@ -588,7 +591,7 @@ class MaterialButtonComponent {
|
|
|
588
591
|
<mat-icon *ngIf="options?.icon" class="mat-24">{{options?.icon}}</mat-icon>
|
|
589
592
|
<span *ngIf="options?.title" [innerHTML]="options?.title"></span>
|
|
590
593
|
</button>
|
|
591
|
-
</div>`, isInline: true, styles: ["button{margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type:
|
|
594
|
+
</div>`, isInline: true, styles: ["button{margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
592
595
|
}
|
|
593
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialButtonComponent, decorators: [{
|
|
594
597
|
type: Component,
|
|
@@ -786,7 +789,7 @@ class MaterialCheckboxComponent {
|
|
|
786
789
|
[innerHTML]="options?.title"></span>
|
|
787
790
|
</mat-slide-toggle>
|
|
788
791
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
789
|
-
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: [".checkbox-name{white-space:nowrap}mat-error{font-size:75%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$
|
|
792
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: [".checkbox-name{white-space:nowrap}mat-error{font-size:75%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
790
793
|
}
|
|
791
794
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialCheckboxComponent, decorators: [{
|
|
792
795
|
type: Component,
|
|
@@ -932,7 +935,7 @@ class MaterialCheckboxesComponent {
|
|
|
932
935
|
</ul>
|
|
933
936
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
934
937
|
[innerHTML]="options?.errorMessage"></mat-error>
|
|
935
|
-
</div>`, isInline: true, styles: [".title{font-weight:700}.checkbox-list{list-style-type:none}.horizontal-list>li{display:inline-block;margin-right:10px;zoom:1}.checkbox-name{white-space:nowrap}mat-error{font-size:75%}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$
|
|
938
|
+
</div>`, isInline: true, styles: [".title{font-weight:700}.checkbox-list{list-style-type:none}.horizontal-list>li{display:inline-block;margin-right:10px;zoom:1}.checkbox-name{white-space:nowrap}mat-error{font-size:75%}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }] }); }
|
|
936
939
|
}
|
|
937
940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialCheckboxesComponent, decorators: [{
|
|
938
941
|
type: Component,
|
|
@@ -978,30 +981,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
978
981
|
type: Input
|
|
979
982
|
}] } });
|
|
980
983
|
|
|
981
|
-
// TODO: Add this control
|
|
982
984
|
class MaterialChipListComponent {
|
|
983
985
|
constructor(jsf) {
|
|
984
986
|
this.jsf = jsf;
|
|
985
987
|
this.controlDisabled = false;
|
|
986
988
|
this.boundControl = false;
|
|
989
|
+
this.tags = [];
|
|
990
|
+
this.separatorKeyCodes = [ENTER, COMMA];
|
|
987
991
|
}
|
|
988
992
|
ngOnInit() {
|
|
989
993
|
this.options = this.layoutNode.options || {};
|
|
990
|
-
this.jsf.initializeControl(this);
|
|
994
|
+
this.jsf.initializeControl(this, false);
|
|
995
|
+
this.tags = Array.isArray(this.controlValue) ? [...this.controlValue] : [];
|
|
996
|
+
}
|
|
997
|
+
add(event) {
|
|
998
|
+
const value = (event.value || '').trim();
|
|
999
|
+
if (value) {
|
|
1000
|
+
this.tags.push(value);
|
|
1001
|
+
this.syncFormArray();
|
|
1002
|
+
}
|
|
1003
|
+
event.chipInput.clear();
|
|
991
1004
|
}
|
|
992
|
-
|
|
993
|
-
this.
|
|
1005
|
+
remove(index) {
|
|
1006
|
+
this.tags.splice(index, 1);
|
|
1007
|
+
this.syncFormArray();
|
|
1008
|
+
}
|
|
1009
|
+
syncFormArray() {
|
|
1010
|
+
this.jsf.updateArrayCheckboxList(this, this.tags.map(value => ({ checked: true, value })));
|
|
994
1011
|
}
|
|
995
1012
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialChipListComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
996
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialChipListComponent, isStandalone: false, selector: "material-chip-list-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template:
|
|
1013
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialChipListComponent, isStandalone: false, selector: "material-chip-list-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
1014
|
+
<mat-form-field
|
|
1015
|
+
[appearance]="options?.appearance || 'fill'"
|
|
1016
|
+
[class]="options?.htmlClass || ''"
|
|
1017
|
+
[floatLabel]="options?.floatLabel || 'auto'"
|
|
1018
|
+
[style.width]="'100%'">
|
|
1019
|
+
<mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
|
|
1020
|
+
<mat-chip-grid #chipGrid
|
|
1021
|
+
[attr.aria-label]="options?.title"
|
|
1022
|
+
[disabled]="controlDisabled || options?.readonly">
|
|
1023
|
+
<mat-chip-row *ngFor="let tag of tags; let i = index"
|
|
1024
|
+
(removed)="remove(i)">
|
|
1025
|
+
{{tag}}
|
|
1026
|
+
<button matChipRemove aria-label="Remove">
|
|
1027
|
+
<mat-icon>cancel</mat-icon>
|
|
1028
|
+
</button>
|
|
1029
|
+
</mat-chip-row>
|
|
1030
|
+
</mat-chip-grid>
|
|
1031
|
+
<input [matChipInputFor]="chipGrid"
|
|
1032
|
+
[matChipInputSeparatorKeyCodes]="separatorKeyCodes"
|
|
1033
|
+
[matChipInputAddOnBlur]="true"
|
|
1034
|
+
[placeholder]="options?.placeholder || ''"
|
|
1035
|
+
(matChipInputTokenEnd)="add($event)">
|
|
1036
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1037
|
+
align="end" [innerHTML]="options?.description"></mat-hint>
|
|
1038
|
+
</mat-form-field>
|
|
1039
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1040
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"], 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: "component", type: i3$4.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i3$4.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i3$4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i3$4.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
997
1041
|
}
|
|
998
1042
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialChipListComponent, decorators: [{
|
|
999
1043
|
type: Component,
|
|
1000
|
-
args: [{
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1044
|
+
args: [{ selector: 'material-chip-list-widget', template: `
|
|
1045
|
+
<mat-form-field
|
|
1046
|
+
[appearance]="options?.appearance || 'fill'"
|
|
1047
|
+
[class]="options?.htmlClass || ''"
|
|
1048
|
+
[floatLabel]="options?.floatLabel || 'auto'"
|
|
1049
|
+
[style.width]="'100%'">
|
|
1050
|
+
<mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
|
|
1051
|
+
<mat-chip-grid #chipGrid
|
|
1052
|
+
[attr.aria-label]="options?.title"
|
|
1053
|
+
[disabled]="controlDisabled || options?.readonly">
|
|
1054
|
+
<mat-chip-row *ngFor="let tag of tags; let i = index"
|
|
1055
|
+
(removed)="remove(i)">
|
|
1056
|
+
{{tag}}
|
|
1057
|
+
<button matChipRemove aria-label="Remove">
|
|
1058
|
+
<mat-icon>cancel</mat-icon>
|
|
1059
|
+
</button>
|
|
1060
|
+
</mat-chip-row>
|
|
1061
|
+
</mat-chip-grid>
|
|
1062
|
+
<input [matChipInputFor]="chipGrid"
|
|
1063
|
+
[matChipInputSeparatorKeyCodes]="separatorKeyCodes"
|
|
1064
|
+
[matChipInputAddOnBlur]="true"
|
|
1065
|
+
[placeholder]="options?.placeholder || ''"
|
|
1066
|
+
(matChipInputTokenEnd)="add($event)">
|
|
1067
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1068
|
+
align="end" [innerHTML]="options?.description"></mat-hint>
|
|
1069
|
+
</mat-form-field>
|
|
1070
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1071
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, standalone: false, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"] }]
|
|
1005
1072
|
}], ctorParameters: () => [{ type: i1.JsonSchemaFormService }], propDecorators: { layoutNode: [{
|
|
1006
1073
|
type: Input
|
|
1007
1074
|
}], layoutIndex: [{
|
|
@@ -1075,7 +1142,7 @@ class MaterialDatepickerComponent {
|
|
|
1075
1142
|
</mat-form-field>
|
|
1076
1143
|
<mat-datepicker #picker ></mat-datepicker>
|
|
1077
1144
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1078
|
-
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$
|
|
1145
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
|
1079
1146
|
}
|
|
1080
1147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialDatepickerComponent, decorators: [{
|
|
1081
1148
|
type: Component,
|
|
@@ -1238,30 +1305,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1238
1305
|
type: Input
|
|
1239
1306
|
}] } });
|
|
1240
1307
|
|
|
1241
|
-
// TODO: Add this control
|
|
1242
1308
|
class MaterialFileComponent {
|
|
1243
1309
|
constructor(jsf) {
|
|
1244
1310
|
this.jsf = jsf;
|
|
1245
1311
|
this.controlDisabled = false;
|
|
1246
1312
|
this.boundControl = false;
|
|
1313
|
+
this.fileName = '';
|
|
1247
1314
|
}
|
|
1248
1315
|
ngOnInit() {
|
|
1249
1316
|
this.options = this.layoutNode.options || {};
|
|
1250
1317
|
this.jsf.initializeControl(this);
|
|
1251
1318
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1319
|
+
onFileSelect(event) {
|
|
1320
|
+
const file = event.target?.files?.[0];
|
|
1321
|
+
if (!file) {
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
this.fileName = file.name;
|
|
1325
|
+
const reader = new FileReader();
|
|
1326
|
+
reader.onload = () => {
|
|
1327
|
+
this.jsf.updateValue(this, reader.result);
|
|
1328
|
+
};
|
|
1329
|
+
reader.readAsDataURL(file);
|
|
1254
1330
|
}
|
|
1255
1331
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialFileComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1256
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialFileComponent, isStandalone: false, selector: "material-file-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template:
|
|
1332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialFileComponent, isStandalone: false, selector: "material-file-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
1333
|
+
<div [class]="options?.htmlClass || ''" [style.width]="'100%'">
|
|
1334
|
+
<label *ngIf="!options?.notitle"
|
|
1335
|
+
[class]="options?.labelHtmlClass || ''">{{options?.title}}</label>
|
|
1336
|
+
<div>
|
|
1337
|
+
<button mat-raised-button type="button"
|
|
1338
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1339
|
+
(click)="fileInput.click()">
|
|
1340
|
+
<mat-icon>upload_file</mat-icon>
|
|
1341
|
+
{{options?.buttonLabel || 'Choose File'}}
|
|
1342
|
+
</button>
|
|
1343
|
+
<span style="margin-left: 8px">{{fileName || 'No file chosen'}}</span>
|
|
1344
|
+
<input #fileInput type="file"
|
|
1345
|
+
[attr.accept]="options?.accept || null"
|
|
1346
|
+
[hidden]="true"
|
|
1347
|
+
(change)="onFileSelect($event)">
|
|
1348
|
+
</div>
|
|
1349
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1350
|
+
[innerHTML]="options?.description"
|
|
1351
|
+
style="display:block; font-size:75%; color:rgba(0,0,0,.6); margin-top:4px;"></mat-hint>
|
|
1352
|
+
</div>
|
|
1353
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1354
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
1257
1355
|
}
|
|
1258
1356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialFileComponent, decorators: [{
|
|
1259
1357
|
type: Component,
|
|
1260
|
-
args: [{
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1358
|
+
args: [{ selector: 'material-file-widget', template: `
|
|
1359
|
+
<div [class]="options?.htmlClass || ''" [style.width]="'100%'">
|
|
1360
|
+
<label *ngIf="!options?.notitle"
|
|
1361
|
+
[class]="options?.labelHtmlClass || ''">{{options?.title}}</label>
|
|
1362
|
+
<div>
|
|
1363
|
+
<button mat-raised-button type="button"
|
|
1364
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1365
|
+
(click)="fileInput.click()">
|
|
1366
|
+
<mat-icon>upload_file</mat-icon>
|
|
1367
|
+
{{options?.buttonLabel || 'Choose File'}}
|
|
1368
|
+
</button>
|
|
1369
|
+
<span style="margin-left: 8px">{{fileName || 'No file chosen'}}</span>
|
|
1370
|
+
<input #fileInput type="file"
|
|
1371
|
+
[attr.accept]="options?.accept || null"
|
|
1372
|
+
[hidden]="true"
|
|
1373
|
+
(change)="onFileSelect($event)">
|
|
1374
|
+
</div>
|
|
1375
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1376
|
+
[innerHTML]="options?.description"
|
|
1377
|
+
style="display:block; font-size:75%; color:rgba(0,0,0,.6); margin-top:4px;"></mat-hint>
|
|
1378
|
+
</div>
|
|
1379
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1380
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, standalone: false, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"] }]
|
|
1265
1381
|
}], ctorParameters: () => [{ type: i1.JsonSchemaFormService }], propDecorators: { layoutNode: [{
|
|
1266
1382
|
type: Input
|
|
1267
1383
|
}], layoutIndex: [{
|
|
@@ -1340,7 +1456,7 @@ class MaterialInputComponent {
|
|
|
1340
1456
|
</mat-autocomplete>
|
|
1341
1457
|
</mat-form-field>
|
|
1342
1458
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1343
|
-
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], 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$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$
|
|
1459
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], 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$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
|
1344
1460
|
}
|
|
1345
1461
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialInputComponent, decorators: [{
|
|
1346
1462
|
type: Component,
|
|
@@ -1410,6 +1526,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1410
1526
|
}] } });
|
|
1411
1527
|
|
|
1412
1528
|
class MaterialNumberComponent {
|
|
1529
|
+
get minValue() { return effectiveMinimum(this.options?.minimum, this.options?.exclusiveMinimum); }
|
|
1530
|
+
get maxValue() { return effectiveMaximum(this.options?.maximum, this.options?.exclusiveMaximum); }
|
|
1413
1531
|
constructor(matFormFieldDefaultOptions, jsf) {
|
|
1414
1532
|
this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
|
|
1415
1533
|
this.jsf = jsf;
|
|
@@ -1446,8 +1564,8 @@ class MaterialNumberComponent {
|
|
|
1446
1564
|
<input matInput *ngIf="boundControl"
|
|
1447
1565
|
[formControl]="formControl"
|
|
1448
1566
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1449
|
-
[attr.max]="
|
|
1450
|
-
[attr.min]="
|
|
1567
|
+
[attr.max]="maxValue"
|
|
1568
|
+
[attr.min]="minValue"
|
|
1451
1569
|
[attr.step]="options?.multipleOf || options?.step || 'any'"
|
|
1452
1570
|
[id]="'control' + layoutNode?._id"
|
|
1453
1571
|
[name]="controlName"
|
|
@@ -1459,8 +1577,8 @@ class MaterialNumberComponent {
|
|
|
1459
1577
|
(blur)="options.showErrors = true">
|
|
1460
1578
|
<input matInput *ngIf="!boundControl"
|
|
1461
1579
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1462
|
-
[attr.max]="
|
|
1463
|
-
[attr.min]="
|
|
1580
|
+
[attr.max]="maxValue"
|
|
1581
|
+
[attr.min]="minValue"
|
|
1464
1582
|
[attr.step]="options?.multipleOf || options?.step || 'any'"
|
|
1465
1583
|
[disabled]="controlDisabled"
|
|
1466
1584
|
[id]="'control' + layoutNode?._id"
|
|
@@ -1497,8 +1615,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1497
1615
|
<input matInput *ngIf="boundControl"
|
|
1498
1616
|
[formControl]="formControl"
|
|
1499
1617
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1500
|
-
[attr.max]="
|
|
1501
|
-
[attr.min]="
|
|
1618
|
+
[attr.max]="maxValue"
|
|
1619
|
+
[attr.min]="minValue"
|
|
1502
1620
|
[attr.step]="options?.multipleOf || options?.step || 'any'"
|
|
1503
1621
|
[id]="'control' + layoutNode?._id"
|
|
1504
1622
|
[name]="controlName"
|
|
@@ -1510,8 +1628,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1510
1628
|
(blur)="options.showErrors = true">
|
|
1511
1629
|
<input matInput *ngIf="!boundControl"
|
|
1512
1630
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1513
|
-
[attr.max]="
|
|
1514
|
-
[attr.min]="
|
|
1631
|
+
[attr.max]="maxValue"
|
|
1632
|
+
[attr.min]="minValue"
|
|
1515
1633
|
[attr.step]="options?.multipleOf || options?.step || 'any'"
|
|
1516
1634
|
[disabled]="controlDisabled"
|
|
1517
1635
|
[id]="'control' + layoutNode?._id"
|
|
@@ -1546,31 +1664,198 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1546
1664
|
type: Input
|
|
1547
1665
|
}] } });
|
|
1548
1666
|
|
|
1549
|
-
// TODO: Add this control
|
|
1550
1667
|
class MaterialOneOfComponent {
|
|
1551
|
-
constructor(jsf) {
|
|
1668
|
+
constructor(matFormFieldDefaultOptions, jsf) {
|
|
1669
|
+
this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
|
|
1552
1670
|
this.jsf = jsf;
|
|
1553
1671
|
this.controlDisabled = false;
|
|
1554
1672
|
this.boundControl = false;
|
|
1673
|
+
this.selectList = [];
|
|
1674
|
+
this.isFieldset = false;
|
|
1675
|
+
this.selectedValue = 0;
|
|
1676
|
+
this._selectedItem = 0;
|
|
1677
|
+
this.fieldsetValueMap = new Map();
|
|
1678
|
+
}
|
|
1679
|
+
get selectedItem() {
|
|
1680
|
+
if (this.isFieldset && this.formControl) {
|
|
1681
|
+
const val = this.formControl.value ?? this.controlValue;
|
|
1682
|
+
return this.fieldsetValueMap.get(val) ?? this._selectedItem;
|
|
1683
|
+
}
|
|
1684
|
+
return this._selectedItem;
|
|
1555
1685
|
}
|
|
1556
1686
|
ngOnInit() {
|
|
1557
1687
|
this.options = this.layoutNode.options || {};
|
|
1558
|
-
this.
|
|
1688
|
+
const type = this.layoutNode.type;
|
|
1689
|
+
this.isFieldset = (type === 'selectfieldset' || type === 'optionfieldset')
|
|
1690
|
+
&& Array.isArray(this.layoutNode.items) && this.layoutNode.items.length > 0;
|
|
1691
|
+
if (this.isFieldset && !this.options.titleMap && !this.options.enum) {
|
|
1692
|
+
this.selectList = this.layoutNode.items.map((item, i) => ({
|
|
1693
|
+
name: item.options?.legend || item.options?.title || item.name || `Option ${i + 1}`,
|
|
1694
|
+
value: i
|
|
1695
|
+
}));
|
|
1696
|
+
}
|
|
1697
|
+
else {
|
|
1698
|
+
this.selectList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, !!this.options.required, !!this.options.flatList);
|
|
1699
|
+
}
|
|
1700
|
+
if (this.isFieldset && (this.options.titleMap || this.options.enum)) {
|
|
1701
|
+
let idx = 0;
|
|
1702
|
+
for (const entry of this.selectList) {
|
|
1703
|
+
if (entry.value != null && entry.value !== '') {
|
|
1704
|
+
if (idx === 0) {
|
|
1705
|
+
this.selectedValue = entry.value;
|
|
1706
|
+
}
|
|
1707
|
+
this.fieldsetValueMap.set(entry.value, idx++);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
if (!this.isFieldset || this.options.titleMap || this.options.enum) {
|
|
1712
|
+
this.jsf.initializeControl(this, !this.options.readonly);
|
|
1713
|
+
}
|
|
1714
|
+
if (this.isFieldset && this.controlValue != null) {
|
|
1715
|
+
this.selectedValue = this.controlValue;
|
|
1716
|
+
this._selectedItem = this.fieldsetValueMap.get(this.controlValue)
|
|
1717
|
+
?? (typeof this.controlValue === 'number' ? this.controlValue : 0);
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
selectChild(event) {
|
|
1721
|
+
this.selectedValue = event.value;
|
|
1722
|
+
this._selectedItem =
|
|
1723
|
+
this.fieldsetValueMap.get(event.value) ?? event.value;
|
|
1559
1724
|
}
|
|
1560
1725
|
updateValue(event) {
|
|
1561
|
-
this.
|
|
1726
|
+
this.options.showErrors = true;
|
|
1727
|
+
this.jsf.updateValue(this, event.value);
|
|
1562
1728
|
}
|
|
1563
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialOneOfComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1564
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialOneOfComponent, isStandalone: false, selector: "material-one-of-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template:
|
|
1729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialOneOfComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1730
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialOneOfComponent, isStandalone: false, selector: "material-one-of-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
1731
|
+
<mat-form-field
|
|
1732
|
+
[appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'fill'"
|
|
1733
|
+
[class]="options?.htmlClass || ''"
|
|
1734
|
+
[floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || 'auto'"
|
|
1735
|
+
[style.width]="'100%'">
|
|
1736
|
+
<mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
|
|
1737
|
+
|
|
1738
|
+
<mat-select *ngIf="boundControl"
|
|
1739
|
+
[formControl]="formControl"
|
|
1740
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1741
|
+
[id]="'control' + layoutNode?._id"
|
|
1742
|
+
[placeholder]="options?.notitle ? options?.placeholder : options?.title"
|
|
1743
|
+
[required]="options?.required"
|
|
1744
|
+
[style.width]="'100%'"
|
|
1745
|
+
(blur)="options.showErrors = true">
|
|
1746
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1747
|
+
<span [innerHTML]="item?.name"></span>
|
|
1748
|
+
</mat-option>
|
|
1749
|
+
</mat-select>
|
|
1750
|
+
|
|
1751
|
+
<mat-select *ngIf="!boundControl && !isFieldset"
|
|
1752
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1753
|
+
[id]="'control' + layoutNode?._id"
|
|
1754
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1755
|
+
[placeholder]="options?.notitle ? options?.placeholder : options?.title"
|
|
1756
|
+
[required]="options?.required"
|
|
1757
|
+
[style.width]="'100%'"
|
|
1758
|
+
[value]="controlValue"
|
|
1759
|
+
(selectionChange)="updateValue($event)"
|
|
1760
|
+
(blur)="options.showErrors = true">
|
|
1761
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1762
|
+
<span [innerHTML]="item?.name"></span>
|
|
1763
|
+
</mat-option>
|
|
1764
|
+
</mat-select>
|
|
1765
|
+
|
|
1766
|
+
<mat-select *ngIf="!boundControl && isFieldset"
|
|
1767
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1768
|
+
[id]="'control' + layoutNode?._id"
|
|
1769
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1770
|
+
[style.width]="'100%'"
|
|
1771
|
+
[value]="selectedValue"
|
|
1772
|
+
(selectionChange)="selectChild($event)">
|
|
1773
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1774
|
+
<span [innerHTML]="item?.name"></span>
|
|
1775
|
+
</mat-option>
|
|
1776
|
+
</mat-select>
|
|
1777
|
+
|
|
1778
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1779
|
+
align="end" [innerHTML]="options?.description"></mat-hint>
|
|
1780
|
+
</mat-form-field>
|
|
1781
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1782
|
+
[innerHTML]="options?.errorMessage"></mat-error>
|
|
1783
|
+
|
|
1784
|
+
<div *ngFor="let layoutItem of layoutNode?.items; let i = index">
|
|
1785
|
+
<select-framework-widget *ngIf="isFieldset && selectedItem === i"
|
|
1786
|
+
[dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
|
|
1787
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
1788
|
+
[layoutNode]="layoutItem"></select-framework-widget>
|
|
1789
|
+
</div>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i1.SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
1565
1790
|
}
|
|
1566
1791
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialOneOfComponent, decorators: [{
|
|
1567
1792
|
type: Component,
|
|
1568
|
-
args: [{
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1793
|
+
args: [{ selector: 'material-one-of-widget', template: `
|
|
1794
|
+
<mat-form-field
|
|
1795
|
+
[appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'fill'"
|
|
1796
|
+
[class]="options?.htmlClass || ''"
|
|
1797
|
+
[floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || 'auto'"
|
|
1798
|
+
[style.width]="'100%'">
|
|
1799
|
+
<mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
|
|
1800
|
+
|
|
1801
|
+
<mat-select *ngIf="boundControl"
|
|
1802
|
+
[formControl]="formControl"
|
|
1803
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1804
|
+
[id]="'control' + layoutNode?._id"
|
|
1805
|
+
[placeholder]="options?.notitle ? options?.placeholder : options?.title"
|
|
1806
|
+
[required]="options?.required"
|
|
1807
|
+
[style.width]="'100%'"
|
|
1808
|
+
(blur)="options.showErrors = true">
|
|
1809
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1810
|
+
<span [innerHTML]="item?.name"></span>
|
|
1811
|
+
</mat-option>
|
|
1812
|
+
</mat-select>
|
|
1813
|
+
|
|
1814
|
+
<mat-select *ngIf="!boundControl && !isFieldset"
|
|
1815
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1816
|
+
[id]="'control' + layoutNode?._id"
|
|
1817
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1818
|
+
[placeholder]="options?.notitle ? options?.placeholder : options?.title"
|
|
1819
|
+
[required]="options?.required"
|
|
1820
|
+
[style.width]="'100%'"
|
|
1821
|
+
[value]="controlValue"
|
|
1822
|
+
(selectionChange)="updateValue($event)"
|
|
1823
|
+
(blur)="options.showErrors = true">
|
|
1824
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1825
|
+
<span [innerHTML]="item?.name"></span>
|
|
1826
|
+
</mat-option>
|
|
1827
|
+
</mat-select>
|
|
1828
|
+
|
|
1829
|
+
<mat-select *ngIf="!boundControl && isFieldset"
|
|
1830
|
+
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1831
|
+
[id]="'control' + layoutNode?._id"
|
|
1832
|
+
[disabled]="controlDisabled || options?.readonly"
|
|
1833
|
+
[style.width]="'100%'"
|
|
1834
|
+
[value]="selectedValue"
|
|
1835
|
+
(selectionChange)="selectChild($event)">
|
|
1836
|
+
<mat-option *ngFor="let item of selectList" [value]="item?.value">
|
|
1837
|
+
<span [innerHTML]="item?.name"></span>
|
|
1838
|
+
</mat-option>
|
|
1839
|
+
</mat-select>
|
|
1840
|
+
|
|
1841
|
+
<mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
|
|
1842
|
+
align="end" [innerHTML]="options?.description"></mat-hint>
|
|
1843
|
+
</mat-form-field>
|
|
1844
|
+
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1845
|
+
[innerHTML]="options?.errorMessage"></mat-error>
|
|
1846
|
+
|
|
1847
|
+
<div *ngFor="let layoutItem of layoutNode?.items; let i = index">
|
|
1848
|
+
<select-framework-widget *ngIf="isFieldset && selectedItem === i"
|
|
1849
|
+
[dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
|
|
1850
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
1851
|
+
[layoutNode]="layoutItem"></select-framework-widget>
|
|
1852
|
+
</div>`, standalone: false, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}\n"] }]
|
|
1853
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1854
|
+
type: Inject,
|
|
1855
|
+
args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
|
|
1856
|
+
}, {
|
|
1857
|
+
type: Optional
|
|
1858
|
+
}] }, { type: i1.JsonSchemaFormService }], propDecorators: { layoutNode: [{
|
|
1574
1859
|
type: Input
|
|
1575
1860
|
}], layoutIndex: [{
|
|
1576
1861
|
type: Input
|
|
@@ -1639,7 +1924,7 @@ class MaterialRadiosComponent {
|
|
|
1639
1924
|
</mat-radio-group>
|
|
1640
1925
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1641
1926
|
[innerHTML]="options?.errorMessage"></mat-error>
|
|
1642
|
-
</div>`, isInline: true, styles: ["mat-radio-group{display:inline-flex}mat-radio-button{margin:2px}mat-error{font-size:75%}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$
|
|
1927
|
+
</div>`, isInline: true, styles: ["mat-radio-group{display:inline-flex}mat-radio-button{margin:2px}mat-error{font-size:75%}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i5$2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }] }); }
|
|
1643
1928
|
}
|
|
1644
1929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialRadiosComponent, decorators: [{
|
|
1645
1930
|
type: Component,
|
|
@@ -1782,7 +2067,7 @@ class MaterialSelectComponent {
|
|
|
1782
2067
|
align="end" [innerHTML]="options?.description"></mat-hint>
|
|
1783
2068
|
</mat-form-field>
|
|
1784
2069
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1785
|
-
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$
|
|
2070
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}\n"], 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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4$3.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }] }); }
|
|
1786
2071
|
}
|
|
1787
2072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialSelectComponent, decorators: [{
|
|
1788
2073
|
type: Component,
|
|
@@ -1869,6 +2154,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1869
2154
|
}] } });
|
|
1870
2155
|
|
|
1871
2156
|
class MaterialSliderComponent {
|
|
2157
|
+
get minValue() { return effectiveMinimum(this.options?.minimum, this.options?.exclusiveMinimum); }
|
|
2158
|
+
get maxValue() { return effectiveMaximum(this.options?.maximum, this.options?.exclusiveMaximum); }
|
|
1872
2159
|
constructor(jsf) {
|
|
1873
2160
|
this.jsf = jsf;
|
|
1874
2161
|
this.controlDisabled = false;
|
|
@@ -1891,8 +2178,8 @@ class MaterialSliderComponent {
|
|
|
1891
2178
|
<mat-slider discrete *ngIf="boundControl"
|
|
1892
2179
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1893
2180
|
[id]="'control' + layoutNode?._id"
|
|
1894
|
-
[max]="
|
|
1895
|
-
[min]="
|
|
2181
|
+
[max]="maxValue"
|
|
2182
|
+
[min]="minValue"
|
|
1896
2183
|
[step]="options?.multipleOf || options?.step || 'any'"
|
|
1897
2184
|
[style.width]="'100%'"
|
|
1898
2185
|
><input matSliderThumb [formControl]="formControl" (blur)="options.showErrors = true" /></mat-slider>
|
|
@@ -1900,13 +2187,13 @@ class MaterialSliderComponent {
|
|
|
1900
2187
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1901
2188
|
[disabled]="controlDisabled || options?.readonly"
|
|
1902
2189
|
[id]="'control' + layoutNode?._id"
|
|
1903
|
-
[max]="
|
|
1904
|
-
[min]="
|
|
2190
|
+
[max]="maxValue"
|
|
2191
|
+
[min]="minValue"
|
|
1905
2192
|
[step]="options?.multipleOf || options?.step || 'any'"
|
|
1906
2193
|
[style.width]="'100%'"
|
|
1907
2194
|
(blur)="options.showErrors = true" #ngSlider><input matSliderThumb [value]="controlValue" (change)="updateValue({source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value})" #ngSliderThumb="matSliderThumb" /></mat-slider>
|
|
1908
2195
|
<mat-error *ngIf="options?.showErrors && options?.errorMessage"
|
|
1909
|
-
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$
|
|
2196
|
+
[innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$3.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i5$3.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }] }); }
|
|
1910
2197
|
}
|
|
1911
2198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialSliderComponent, decorators: [{
|
|
1912
2199
|
type: Component,
|
|
@@ -1914,8 +2201,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1914
2201
|
<mat-slider discrete *ngIf="boundControl"
|
|
1915
2202
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1916
2203
|
[id]="'control' + layoutNode?._id"
|
|
1917
|
-
[max]="
|
|
1918
|
-
[min]="
|
|
2204
|
+
[max]="maxValue"
|
|
2205
|
+
[min]="minValue"
|
|
1919
2206
|
[step]="options?.multipleOf || options?.step || 'any'"
|
|
1920
2207
|
[style.width]="'100%'"
|
|
1921
2208
|
><input matSliderThumb [formControl]="formControl" (blur)="options.showErrors = true" /></mat-slider>
|
|
@@ -1923,8 +2210,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1923
2210
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
1924
2211
|
[disabled]="controlDisabled || options?.readonly"
|
|
1925
2212
|
[id]="'control' + layoutNode?._id"
|
|
1926
|
-
[max]="
|
|
1927
|
-
[min]="
|
|
2213
|
+
[max]="maxValue"
|
|
2214
|
+
[min]="minValue"
|
|
1928
2215
|
[step]="options?.multipleOf || options?.step || 'any'"
|
|
1929
2216
|
[style.width]="'100%'"
|
|
1930
2217
|
(blur)="options.showErrors = true" #ngSlider><input matSliderThumb [value]="controlValue" (change)="updateValue({source: ngSliderThumb, parent: ngSlider, value: ngSliderThumb.value})" #ngSliderThumb="matSliderThumb" /></mat-slider>
|
|
@@ -1938,28 +2225,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1938
2225
|
type: Input
|
|
1939
2226
|
}] } });
|
|
1940
2227
|
|
|
1941
|
-
// TODO: Add this control
|
|
1942
2228
|
class MaterialStepperComponent {
|
|
1943
2229
|
constructor(jsf) {
|
|
1944
2230
|
this.jsf = jsf;
|
|
1945
2231
|
this.controlDisabled = false;
|
|
1946
2232
|
this.boundControl = false;
|
|
2233
|
+
this.selectedItem = 0;
|
|
2234
|
+
this.showAddTab = true;
|
|
1947
2235
|
}
|
|
1948
2236
|
ngOnInit() {
|
|
1949
2237
|
this.options = this.layoutNode.options || {};
|
|
1950
|
-
this.
|
|
2238
|
+
this.itemCount = this.layoutNode.items.length - 1;
|
|
2239
|
+
this.updateControl();
|
|
1951
2240
|
}
|
|
1952
|
-
|
|
1953
|
-
this.
|
|
2241
|
+
select(index) {
|
|
2242
|
+
if (index >= this.layoutNode.items.length) {
|
|
2243
|
+
return;
|
|
2244
|
+
}
|
|
2245
|
+
if (this.layoutNode.items[index].type === '$ref') {
|
|
2246
|
+
if (!this.showAddTab) {
|
|
2247
|
+
return;
|
|
2248
|
+
}
|
|
2249
|
+
this.jsf.addItem({
|
|
2250
|
+
layoutNode: this.layoutNode.items[index],
|
|
2251
|
+
layoutIndex: this.layoutIndex.concat(index),
|
|
2252
|
+
dataIndex: this.dataIndex.concat(index)
|
|
2253
|
+
});
|
|
2254
|
+
this.updateControl();
|
|
2255
|
+
}
|
|
2256
|
+
this.selectedItem = index;
|
|
2257
|
+
}
|
|
2258
|
+
updateControl() {
|
|
2259
|
+
this.itemCount = this.layoutNode.items.length - 1;
|
|
2260
|
+
const lastItem = this.layoutNode.items[this.layoutNode.items.length - 1];
|
|
2261
|
+
this.showAddTab = lastItem.type === '$ref' &&
|
|
2262
|
+
this.itemCount < (lastItem.options.maxItems || 1000);
|
|
2263
|
+
}
|
|
2264
|
+
hasNextVisible(currentIndex) {
|
|
2265
|
+
const next = currentIndex + 1;
|
|
2266
|
+
if (next > this.itemCount) {
|
|
2267
|
+
return false;
|
|
2268
|
+
}
|
|
2269
|
+
const nextItem = this.layoutNode.items[next];
|
|
2270
|
+
if (nextItem?.type === '$ref' && !this.showAddTab) {
|
|
2271
|
+
return false;
|
|
2272
|
+
}
|
|
2273
|
+
return true;
|
|
2274
|
+
}
|
|
2275
|
+
setStepTitle(item, index) {
|
|
2276
|
+
return this.jsf.setArrayItemTitle(this, item, index);
|
|
1954
2277
|
}
|
|
1955
2278
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialStepperComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1956
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialStepperComponent, isStandalone: false, selector: "material-stepper-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template:
|
|
2279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: MaterialStepperComponent, isStandalone: false, selector: "material-stepper-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
2280
|
+
<mat-stepper
|
|
2281
|
+
[selectedIndex]="selectedItem"
|
|
2282
|
+
[linear]="options?.linear || false"
|
|
2283
|
+
(selectionChange)="select($event.selectedIndex)">
|
|
2284
|
+
<ng-container *ngFor="let item of layoutNode?.items; let i = index">
|
|
2285
|
+
<mat-step *ngIf="showAddTab || item.type !== '$ref'">
|
|
2286
|
+
<ng-template matStepLabel>
|
|
2287
|
+
<span [innerHTML]="setStepTitle(item, i)"></span>
|
|
2288
|
+
</ng-template>
|
|
2289
|
+
<ng-template matStepContent>
|
|
2290
|
+
<select-framework-widget
|
|
2291
|
+
[class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '')"
|
|
2292
|
+
[dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
|
|
2293
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
2294
|
+
[layoutNode]="item"></select-framework-widget>
|
|
2295
|
+
<div style="margin-top: 16px">
|
|
2296
|
+
<button mat-button matStepperPrevious *ngIf="i > 0" type="button">Back</button>
|
|
2297
|
+
<button mat-button matStepperNext *ngIf="hasNextVisible(i)" type="button">Next</button>
|
|
2298
|
+
</div>
|
|
2299
|
+
</ng-template>
|
|
2300
|
+
</mat-step>
|
|
2301
|
+
</ng-container>
|
|
2302
|
+
</mat-stepper>`, isInline: true, 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: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4$4.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$4.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$4.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i4$4.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i4$4.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i4$4.MatStepContent, selector: "ng-template[matStepContent]" }, { kind: "component", type: i1.SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
1957
2303
|
}
|
|
1958
2304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialStepperComponent, decorators: [{
|
|
1959
2305
|
type: Component,
|
|
1960
2306
|
args: [{
|
|
1961
2307
|
selector: 'material-stepper-widget',
|
|
1962
|
-
template:
|
|
2308
|
+
template: `
|
|
2309
|
+
<mat-stepper
|
|
2310
|
+
[selectedIndex]="selectedItem"
|
|
2311
|
+
[linear]="options?.linear || false"
|
|
2312
|
+
(selectionChange)="select($event.selectedIndex)">
|
|
2313
|
+
<ng-container *ngFor="let item of layoutNode?.items; let i = index">
|
|
2314
|
+
<mat-step *ngIf="showAddTab || item.type !== '$ref'">
|
|
2315
|
+
<ng-template matStepLabel>
|
|
2316
|
+
<span [innerHTML]="setStepTitle(item, i)"></span>
|
|
2317
|
+
</ng-template>
|
|
2318
|
+
<ng-template matStepContent>
|
|
2319
|
+
<select-framework-widget
|
|
2320
|
+
[class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '')"
|
|
2321
|
+
[dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
|
|
2322
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
2323
|
+
[layoutNode]="item"></select-framework-widget>
|
|
2324
|
+
<div style="margin-top: 16px">
|
|
2325
|
+
<button mat-button matStepperPrevious *ngIf="i > 0" type="button">Back</button>
|
|
2326
|
+
<button mat-button matStepperNext *ngIf="hasNextVisible(i)" type="button">Next</button>
|
|
2327
|
+
</div>
|
|
2328
|
+
</ng-template>
|
|
2329
|
+
</mat-step>
|
|
2330
|
+
</ng-container>
|
|
2331
|
+
</mat-stepper>`,
|
|
1963
2332
|
standalone: false
|
|
1964
2333
|
}]
|
|
1965
2334
|
}], ctorParameters: () => [{ type: i1.JsonSchemaFormService }], propDecorators: { layoutNode: [{
|
|
@@ -2025,7 +2394,7 @@ class MaterialTabsComponent {
|
|
|
2025
2394
|
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
2026
2395
|
[layoutNode]="layoutItem"></select-framework-widget>
|
|
2027
2396
|
</div>
|
|
2028
|
-
</div>`, isInline: true, styles: ["a{cursor:pointer}\n"], 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: "component", type: i3$
|
|
2397
|
+
</div>`, isInline: true, styles: ["a{cursor:pointer}\n"], 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: "component", type: i3$5.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i3$5.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "component", type: i1.SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
2029
2398
|
}
|
|
2030
2399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MaterialTabsComponent, decorators: [{
|
|
2031
2400
|
type: Component,
|