@ajsf/material 0.5.1 → 0.8.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.
Files changed (80) hide show
  1. package/{esm2015/ajsf-material.js → esm2020/ajsf-material.mjs} +0 -0
  2. package/{esm2015/lib/angular-flex-monkey-patch.js → esm2020/lib/angular-flex-monkey-patch.mjs} +0 -0
  3. package/esm2020/lib/material-design-framework.component.mjs +102 -0
  4. package/esm2020/lib/material-design-framework.module.mjs +119 -0
  5. package/esm2020/lib/material-design.framework.mjs +57 -0
  6. package/esm2020/lib/widgets/flex-layout-root.component.mjs +76 -0
  7. package/esm2020/lib/widgets/flex-layout-section.component.mjs +349 -0
  8. package/esm2020/lib/widgets/material-add-reference.component.mjs +66 -0
  9. package/esm2020/lib/widgets/material-button-group.component.mjs +90 -0
  10. package/esm2020/lib/widgets/material-button.component.mjs +76 -0
  11. package/esm2020/lib/widgets/material-checkbox.component.mjs +166 -0
  12. package/esm2020/lib/widgets/material-checkboxes.component.mjs +129 -0
  13. package/esm2020/lib/widgets/material-chip-list.component.mjs +35 -0
  14. package/{esm2015/lib/widgets/material-datepicker.component.js → esm2020/lib/widgets/material-datepicker.component.mjs} +75 -24
  15. package/esm2020/lib/widgets/material-file.component.mjs +35 -0
  16. package/esm2020/lib/widgets/material-input.component.mjs +149 -0
  17. package/esm2020/lib/widgets/material-number.component.mjs +145 -0
  18. package/esm2020/lib/widgets/material-one-of.component.mjs +35 -0
  19. package/esm2020/lib/widgets/material-radios.component.mjs +122 -0
  20. package/esm2020/lib/widgets/material-select.component.mjs +186 -0
  21. package/esm2020/lib/widgets/material-slider.component.mjs +83 -0
  22. package/esm2020/lib/widgets/material-stepper.component.mjs +35 -0
  23. package/esm2020/lib/widgets/material-tabs.component.mjs +86 -0
  24. package/esm2020/lib/widgets/material-textarea.component.mjs +134 -0
  25. package/{esm2015/lib/widgets/public_api.js → esm2020/lib/widgets/public_api.mjs} +0 -0
  26. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  27. package/fesm2015/ajsf-material.mjs +2320 -0
  28. package/fesm2015/ajsf-material.mjs.map +1 -0
  29. package/fesm2020/ajsf-material.mjs +2313 -0
  30. package/fesm2020/ajsf-material.mjs.map +1 -0
  31. package/{ajsf-material.d.ts → index.d.ts} +1 -0
  32. package/lib/material-design-framework.component.d.ts +3 -0
  33. package/lib/material-design-framework.module.d.ts +51 -2
  34. package/lib/material-design.framework.d.ts +3 -0
  35. package/lib/widgets/flex-layout-root.component.d.ts +3 -0
  36. package/lib/widgets/flex-layout-section.component.d.ts +3 -0
  37. package/lib/widgets/material-add-reference.component.d.ts +3 -0
  38. package/lib/widgets/material-button-group.component.d.ts +3 -0
  39. package/lib/widgets/material-button.component.d.ts +3 -0
  40. package/lib/widgets/material-checkbox.component.d.ts +3 -0
  41. package/lib/widgets/material-checkboxes.component.d.ts +3 -0
  42. package/lib/widgets/material-chip-list.component.d.ts +3 -0
  43. package/lib/widgets/material-datepicker.component.d.ts +3 -0
  44. package/lib/widgets/material-file.component.d.ts +3 -0
  45. package/lib/widgets/material-input.component.d.ts +3 -0
  46. package/lib/widgets/material-number.component.d.ts +3 -0
  47. package/lib/widgets/material-one-of.component.d.ts +3 -0
  48. package/lib/widgets/material-radios.component.d.ts +3 -0
  49. package/lib/widgets/material-select.component.d.ts +3 -0
  50. package/lib/widgets/material-slider.component.d.ts +3 -0
  51. package/lib/widgets/material-stepper.component.d.ts +3 -0
  52. package/lib/widgets/material-tabs.component.d.ts +3 -0
  53. package/lib/widgets/material-textarea.component.d.ts +3 -0
  54. package/package.json +27 -15
  55. package/ajsf-material.metadata.json +0 -1
  56. package/bundles/ajsf-material.umd.js +0 -1422
  57. package/bundles/ajsf-material.umd.js.map +0 -1
  58. package/esm2015/lib/material-design-framework.component.js +0 -101
  59. package/esm2015/lib/material-design-framework.module.js +0 -80
  60. package/esm2015/lib/material-design.framework.js +0 -54
  61. package/esm2015/lib/widgets/flex-layout-root.component.js +0 -55
  62. package/esm2015/lib/widgets/flex-layout-section.component.js +0 -221
  63. package/esm2015/lib/widgets/material-add-reference.component.js +0 -53
  64. package/esm2015/lib/widgets/material-button-group.component.js +0 -63
  65. package/esm2015/lib/widgets/material-button.component.js +0 -60
  66. package/esm2015/lib/widgets/material-checkbox.component.js +0 -109
  67. package/esm2015/lib/widgets/material-checkboxes.component.js +0 -101
  68. package/esm2015/lib/widgets/material-chip-list.component.js +0 -33
  69. package/esm2015/lib/widgets/material-file.component.js +0 -33
  70. package/esm2015/lib/widgets/material-input.component.js +0 -95
  71. package/esm2015/lib/widgets/material-number.component.js +0 -97
  72. package/esm2015/lib/widgets/material-one-of.component.js +0 -33
  73. package/esm2015/lib/widgets/material-radios.component.js +0 -84
  74. package/esm2015/lib/widgets/material-select.component.js +0 -115
  75. package/esm2015/lib/widgets/material-slider.component.js +0 -60
  76. package/esm2015/lib/widgets/material-stepper.component.js +0 -33
  77. package/esm2015/lib/widgets/material-tabs.component.js +0 -69
  78. package/esm2015/lib/widgets/material-textarea.component.js +0 -88
  79. package/fesm2015/ajsf-material.js +0 -1710
  80. package/fesm2015/ajsf-material.js.map +0 -1
@@ -0,0 +1,2320 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, Inject, Optional, Injectable, NgModule } from '@angular/core';
3
+ import * as i1 from '@ajsf/core';
4
+ import { hasOwn, buildTitleMap, isDefined, isArray, Framework, WidgetLibraryModule, JsonSchemaFormModule, JsonSchemaFormService, FrameworkLibraryService, WidgetLibraryService } from '@ajsf/core';
5
+ import * as i2 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import * as i3 from '@angular/flex-layout/flex';
8
+ import * as i4 from '@angular/flex-layout/extended';
9
+ import * as i5 from '@angular/material/card';
10
+ import { MatCardModule } from '@angular/material/card';
11
+ import * as i6 from '@angular/material/expansion';
12
+ import { MatExpansionModule } from '@angular/material/expansion';
13
+ import * as i4$1 from '@angular/material/form-field';
14
+ import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
15
+ import * as i3$1 from '@angular/material/button';
16
+ import { MatButtonModule } from '@angular/material/button';
17
+ import * as i4$2 from '@angular/material/icon';
18
+ import { MatIconModule } from '@angular/material/icon';
19
+ import * as i3$2 from '@angular/material/button-toggle';
20
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
21
+ import * as i3$3 from '@angular/forms';
22
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
23
+ import * as i4$3 from '@angular/material/checkbox';
24
+ import { MatCheckboxModule } from '@angular/material/checkbox';
25
+ import * as i6$1 from '@angular/material/slide-toggle';
26
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
27
+ import * as i4$4 from '@angular/material/datepicker';
28
+ import { MatDatepickerModule } from '@angular/material/datepicker';
29
+ import * as i5$1 from '@angular/material/input';
30
+ import { MatInputModule } from '@angular/material/input';
31
+ import cloneDeep from 'lodash/cloneDeep';
32
+ import * as i4$5 from '@angular/material/autocomplete';
33
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
34
+ import * as i4$6 from '@angular/material/core';
35
+ import { MatNativeDateModule } from '@angular/material/core';
36
+ import * as i5$2 from '@angular/material/radio';
37
+ import { MatRadioModule } from '@angular/material/radio';
38
+ import * as i6$2 from '@angular/material/select';
39
+ import { MatSelectModule } from '@angular/material/select';
40
+ import * as i5$3 from '@angular/material/slider';
41
+ import { MatSliderModule } from '@angular/material/slider';
42
+ import * as i3$4 from '@angular/material/tabs';
43
+ import { MatTabsModule } from '@angular/material/tabs';
44
+ import { FlexLayoutModule } from '@angular/flex-layout';
45
+ import { MatChipsModule } from '@angular/material/chips';
46
+ import { MatStepperModule } from '@angular/material/stepper';
47
+ import { MatTooltipModule } from '@angular/material/tooltip';
48
+ import { MatMenuModule } from '@angular/material/menu';
49
+ import { MatToolbarModule } from '@angular/material/toolbar';
50
+ import { MediaMarshaller } from '@angular/flex-layout/core';
51
+
52
+ class FlexLayoutRootComponent {
53
+ constructor(jsf) {
54
+ this.jsf = jsf;
55
+ this.isFlexItem = false;
56
+ }
57
+ removeItem(item) {
58
+ this.jsf.removeItem(item);
59
+ }
60
+ // Set attributes for flexbox child
61
+ // (container attributes are set in flex-layout-section.component)
62
+ getFlexAttribute(node, attribute) {
63
+ const index = ['flex-grow', 'flex-shrink', 'flex-basis'].indexOf(attribute);
64
+ return ((node.options || {}).flex || '').split(/\s+/)[index] ||
65
+ (node.options || {})[attribute] || ['1', '1', 'auto'][index];
66
+ }
67
+ showWidget(layoutNode) {
68
+ return this.jsf.evaluateCondition(layoutNode, this.dataIndex);
69
+ }
70
+ }
71
+ FlexLayoutRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FlexLayoutRootComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
72
+ FlexLayoutRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: FlexLayoutRootComponent, selector: "flex-layout-root-widget", inputs: { dataIndex: "dataIndex", layoutIndex: "layoutIndex", layout: "layout", isFlexItem: "isFlexItem" }, ngImport: i0, template: `
73
+ <div *ngFor="let layoutNode of layout; let i = index"
74
+ [class.form-flex-item]="isFlexItem"
75
+ [style.flex-grow]="getFlexAttribute(layoutNode, 'flex-grow')"
76
+ [style.flex-shrink]="getFlexAttribute(layoutNode, 'flex-shrink')"
77
+ [style.flex-basis]="getFlexAttribute(layoutNode, 'flex-basis')"
78
+ [style.align-self]="(layoutNode?.options || {})['align-self']"
79
+ [style.order]="layoutNode?.options?.order"
80
+ [fxFlex]="layoutNode?.options?.fxFlex"
81
+ [fxFlexOrder]="layoutNode?.options?.fxFlexOrder"
82
+ [fxFlexOffset]="layoutNode?.options?.fxFlexOffset"
83
+ [fxFlexAlign]="layoutNode?.options?.fxFlexAlign">
84
+ <select-framework-widget *ngIf="showWidget(layoutNode)"
85
+ [dataIndex]="layoutNode?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
86
+ [layoutIndex]="(layoutIndex || []).concat(i)"
87
+ [layoutNode]="layoutNode"></select-framework-widget>
88
+ <div>`, 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: "directive", type: i3.DefaultFlexOrderDirective, selector: " [fxFlexOrder], [fxFlexOrder.xs], [fxFlexOrder.sm], [fxFlexOrder.md], [fxFlexOrder.lg], [fxFlexOrder.xl], [fxFlexOrder.lt-sm], [fxFlexOrder.lt-md], [fxFlexOrder.lt-lg], [fxFlexOrder.lt-xl], [fxFlexOrder.gt-xs], [fxFlexOrder.gt-sm], [fxFlexOrder.gt-md], [fxFlexOrder.gt-lg]", inputs: ["fxFlexOrder", "fxFlexOrder.xs", "fxFlexOrder.sm", "fxFlexOrder.md", "fxFlexOrder.lg", "fxFlexOrder.xl", "fxFlexOrder.lt-sm", "fxFlexOrder.lt-md", "fxFlexOrder.lt-lg", "fxFlexOrder.lt-xl", "fxFlexOrder.gt-xs", "fxFlexOrder.gt-sm", "fxFlexOrder.gt-md", "fxFlexOrder.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i1.SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FlexLayoutRootComponent, decorators: [{
90
+ type: Component,
91
+ args: [{
92
+ // tslint:disable-next-line:component-selector
93
+ selector: 'flex-layout-root-widget',
94
+ template: `
95
+ <div *ngFor="let layoutNode of layout; let i = index"
96
+ [class.form-flex-item]="isFlexItem"
97
+ [style.flex-grow]="getFlexAttribute(layoutNode, 'flex-grow')"
98
+ [style.flex-shrink]="getFlexAttribute(layoutNode, 'flex-shrink')"
99
+ [style.flex-basis]="getFlexAttribute(layoutNode, 'flex-basis')"
100
+ [style.align-self]="(layoutNode?.options || {})['align-self']"
101
+ [style.order]="layoutNode?.options?.order"
102
+ [fxFlex]="layoutNode?.options?.fxFlex"
103
+ [fxFlexOrder]="layoutNode?.options?.fxFlexOrder"
104
+ [fxFlexOffset]="layoutNode?.options?.fxFlexOffset"
105
+ [fxFlexAlign]="layoutNode?.options?.fxFlexAlign">
106
+ <select-framework-widget *ngIf="showWidget(layoutNode)"
107
+ [dataIndex]="layoutNode?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
108
+ [layoutIndex]="(layoutIndex || []).concat(i)"
109
+ [layoutNode]="layoutNode"></select-framework-widget>
110
+ <div>`,
111
+ changeDetection: ChangeDetectionStrategy.Default,
112
+ }]
113
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { dataIndex: [{
114
+ type: Input
115
+ }], layoutIndex: [{
116
+ type: Input
117
+ }], layout: [{
118
+ type: Input
119
+ }], isFlexItem: [{
120
+ type: Input
121
+ }] } });
122
+
123
+ class FlexLayoutSectionComponent {
124
+ constructor(jsf) {
125
+ this.jsf = jsf;
126
+ this.controlDisabled = false;
127
+ this.boundControl = false;
128
+ this.expanded = true;
129
+ this.containerType = 'div';
130
+ }
131
+ get sectionTitle() {
132
+ return this.options.notitle ? null : this.jsf.setItemTitle(this);
133
+ }
134
+ ngOnInit() {
135
+ this.jsf.initializeControl(this);
136
+ this.options = this.layoutNode.options || {};
137
+ this.expanded = typeof this.options.expanded === 'boolean' ?
138
+ this.options.expanded : !this.options.expandable;
139
+ switch (this.layoutNode.type) {
140
+ case 'section':
141
+ case 'array':
142
+ case 'fieldset':
143
+ case 'advancedfieldset':
144
+ case 'authfieldset':
145
+ case 'optionfieldset':
146
+ case 'selectfieldset':
147
+ this.containerType = 'fieldset';
148
+ break;
149
+ case 'card':
150
+ this.containerType = 'card';
151
+ break;
152
+ case 'expansion-panel':
153
+ this.containerType = 'expansion-panel';
154
+ break;
155
+ default: // 'div', 'flex', 'tab', 'conditional', 'actions'
156
+ this.containerType = 'div';
157
+ }
158
+ }
159
+ toggleExpanded() {
160
+ if (this.options.expandable) {
161
+ this.expanded = !this.expanded;
162
+ }
163
+ }
164
+ // Set attributes for flexbox container
165
+ // (child attributes are set in flex-layout-root.component)
166
+ getFlexAttribute(attribute) {
167
+ const flexActive = this.layoutNode.type === 'flex' ||
168
+ !!this.options.displayFlex ||
169
+ this.options.display === 'flex';
170
+ // if (attribute !== 'flex' && !flexActive) { return null; }
171
+ switch (attribute) {
172
+ case 'is-flex':
173
+ return flexActive;
174
+ case 'display':
175
+ return flexActive ? 'flex' : 'initial';
176
+ case 'flex-direction':
177
+ case 'flex-wrap':
178
+ const index = ['flex-direction', 'flex-wrap'].indexOf(attribute);
179
+ return (this.options['flex-flow'] || '').split(/\s+/)[index] ||
180
+ this.options[attribute] || ['column', 'nowrap'][index];
181
+ case 'justify-content':
182
+ case 'align-items':
183
+ case 'align-content':
184
+ return this.options[attribute];
185
+ case 'layout':
186
+ return (this.options.fxLayout || 'row') +
187
+ this.options.fxLayoutWrap ? ' ' + this.options.fxLayoutWrap : '';
188
+ }
189
+ }
190
+ }
191
+ FlexLayoutSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FlexLayoutSectionComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
192
+ FlexLayoutSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: FlexLayoutSectionComponent, selector: "flex-layout-section-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
193
+ <div *ngIf="containerType === 'div'"
194
+ [class]="options?.htmlClass || ''"
195
+ [class.expandable]="options?.expandable && !expanded"
196
+ [class.expanded]="options?.expandable && expanded">
197
+ <label *ngIf="sectionTitle"
198
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
199
+ [innerHTML]="sectionTitle"
200
+ (click)="toggleExpanded()"></label>
201
+ <flex-layout-root-widget *ngIf="expanded"
202
+ [layout]="layoutNode.items"
203
+ [dataIndex]="dataIndex"
204
+ [layoutIndex]="layoutIndex"
205
+ [isFlexItem]="getFlexAttribute('is-flex')"
206
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
207
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
208
+ [style.display]="getFlexAttribute('display')"
209
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
210
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
211
+ [style.justify-content]="getFlexAttribute('justify-content')"
212
+ [style.align-items]="getFlexAttribute('align-items')"
213
+ [style.align-content]="getFlexAttribute('align-content')"
214
+ [fxLayout]="getFlexAttribute('layout')"
215
+ [fxLayoutGap]="options?.fxLayoutGap"
216
+ [fxLayoutAlign]="options?.fxLayoutAlign"
217
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
218
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
219
+ [innerHTML]="options?.errorMessage"></mat-error>
220
+ </div>
221
+
222
+ <fieldset *ngIf="containerType === 'fieldset'"
223
+ [class]="options?.htmlClass || ''"
224
+ [class.expandable]="options?.expandable && !expanded"
225
+ [class.expanded]="options?.expandable && expanded"
226
+ [disabled]="options?.readonly">
227
+ <legend *ngIf="sectionTitle"
228
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
229
+ [innerHTML]="sectionTitle"
230
+ (click)="toggleExpanded()"></legend>
231
+ <flex-layout-root-widget *ngIf="expanded"
232
+ [layout]="layoutNode.items"
233
+ [dataIndex]="dataIndex"
234
+ [layoutIndex]="layoutIndex"
235
+ [isFlexItem]="getFlexAttribute('is-flex')"
236
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
237
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
238
+ [style.display]="getFlexAttribute('display')"
239
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
240
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
241
+ [style.justify-content]="getFlexAttribute('justify-content')"
242
+ [style.align-items]="getFlexAttribute('align-items')"
243
+ [style.align-content]="getFlexAttribute('align-content')"
244
+ [fxLayout]="getFlexAttribute('layout')"
245
+ [fxLayoutGap]="options?.fxLayoutGap"
246
+ [fxLayoutAlign]="options?.fxLayoutAlign"
247
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
248
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
249
+ [innerHTML]="options?.errorMessage"></mat-error>
250
+ </fieldset>
251
+
252
+ <mat-card *ngIf="containerType === 'card'"
253
+ [ngClass]="options?.htmlClass || ''"
254
+ [class.expandable]="options?.expandable && !expanded"
255
+ [class.expanded]="options?.expandable && expanded">
256
+ <mat-card-header *ngIf="sectionTitle">
257
+ <legend
258
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
259
+ [innerHTML]="sectionTitle"
260
+ (click)="toggleExpanded()"></legend>
261
+ </mat-card-header>
262
+ <mat-card-content *ngIf="expanded">
263
+ <fieldset [disabled]="options?.readonly">
264
+ <flex-layout-root-widget *ngIf="expanded"
265
+ [layout]="layoutNode.items"
266
+ [dataIndex]="dataIndex"
267
+ [layoutIndex]="layoutIndex"
268
+ [isFlexItem]="getFlexAttribute('is-flex')"
269
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
270
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
271
+ [style.display]="getFlexAttribute('display')"
272
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
273
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
274
+ [style.justify-content]="getFlexAttribute('justify-content')"
275
+ [style.align-items]="getFlexAttribute('align-items')"
276
+ [style.align-content]="getFlexAttribute('align-content')"
277
+ [fxLayout]="getFlexAttribute('layout')"
278
+ [fxLayoutGap]="options?.fxLayoutGap"
279
+ [fxLayoutAlign]="options?.fxLayoutAlign"
280
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
281
+ </fieldset>
282
+ </mat-card-content>
283
+ <mat-card-footer>
284
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
285
+ [innerHTML]="options?.errorMessage"></mat-error>
286
+ </mat-card-footer>
287
+ </mat-card>
288
+
289
+ <mat-expansion-panel *ngIf="containerType === 'expansion-panel'"
290
+ [expanded]="expanded"
291
+ [hideToggle]="!options?.expandable">
292
+ <mat-expansion-panel-header>
293
+ <mat-panel-title>
294
+ <legend *ngIf="sectionTitle"
295
+ [class]="options?.labelHtmlClass"
296
+ [innerHTML]="sectionTitle"
297
+ (click)="toggleExpanded()"></legend>
298
+ </mat-panel-title>
299
+ </mat-expansion-panel-header>
300
+ <fieldset [disabled]="options?.readonly">
301
+ <flex-layout-root-widget *ngIf="expanded"
302
+ [layout]="layoutNode.items"
303
+ [dataIndex]="dataIndex"
304
+ [layoutIndex]="layoutIndex"
305
+ [isFlexItem]="getFlexAttribute('is-flex')"
306
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
307
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
308
+ [style.display]="getFlexAttribute('display')"
309
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
310
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
311
+ [style.justify-content]="getFlexAttribute('justify-content')"
312
+ [style.align-items]="getFlexAttribute('align-items')"
313
+ [style.align-content]="getFlexAttribute('align-content')"
314
+ [fxLayout]="getFlexAttribute('layout')"
315
+ [fxLayoutGap]="options?.fxLayoutGap"
316
+ [fxLayoutAlign]="options?.fxLayoutAlign"
317
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
318
+ </fieldset>
319
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
320
+ [innerHTML]="options?.errorMessage"></mat-error>
321
+ </mat-expansion-panel>`, isInline: true, styles: ["fieldset{border:0;margin:0;padding:0}.legend{font-weight:700}.expandable>.legend:before{content:\"\\25b6\";padding-right:.3em}.expanded>.legend:before{content:\"\\25bc\";padding-right:.2em}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i4.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i5.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i5.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i5.MatCardFooter, selector: "mat-card-footer" }, { kind: "component", type: i6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i6.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: FlexLayoutRootComponent, selector: "flex-layout-root-widget", inputs: ["dataIndex", "layoutIndex", "layout", "isFlexItem"] }] });
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FlexLayoutSectionComponent, decorators: [{
323
+ type: Component,
324
+ args: [{ selector: 'flex-layout-section-widget', template: `
325
+ <div *ngIf="containerType === 'div'"
326
+ [class]="options?.htmlClass || ''"
327
+ [class.expandable]="options?.expandable && !expanded"
328
+ [class.expanded]="options?.expandable && expanded">
329
+ <label *ngIf="sectionTitle"
330
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
331
+ [innerHTML]="sectionTitle"
332
+ (click)="toggleExpanded()"></label>
333
+ <flex-layout-root-widget *ngIf="expanded"
334
+ [layout]="layoutNode.items"
335
+ [dataIndex]="dataIndex"
336
+ [layoutIndex]="layoutIndex"
337
+ [isFlexItem]="getFlexAttribute('is-flex')"
338
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
339
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
340
+ [style.display]="getFlexAttribute('display')"
341
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
342
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
343
+ [style.justify-content]="getFlexAttribute('justify-content')"
344
+ [style.align-items]="getFlexAttribute('align-items')"
345
+ [style.align-content]="getFlexAttribute('align-content')"
346
+ [fxLayout]="getFlexAttribute('layout')"
347
+ [fxLayoutGap]="options?.fxLayoutGap"
348
+ [fxLayoutAlign]="options?.fxLayoutAlign"
349
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
350
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
351
+ [innerHTML]="options?.errorMessage"></mat-error>
352
+ </div>
353
+
354
+ <fieldset *ngIf="containerType === 'fieldset'"
355
+ [class]="options?.htmlClass || ''"
356
+ [class.expandable]="options?.expandable && !expanded"
357
+ [class.expanded]="options?.expandable && expanded"
358
+ [disabled]="options?.readonly">
359
+ <legend *ngIf="sectionTitle"
360
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
361
+ [innerHTML]="sectionTitle"
362
+ (click)="toggleExpanded()"></legend>
363
+ <flex-layout-root-widget *ngIf="expanded"
364
+ [layout]="layoutNode.items"
365
+ [dataIndex]="dataIndex"
366
+ [layoutIndex]="layoutIndex"
367
+ [isFlexItem]="getFlexAttribute('is-flex')"
368
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
369
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
370
+ [style.display]="getFlexAttribute('display')"
371
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
372
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
373
+ [style.justify-content]="getFlexAttribute('justify-content')"
374
+ [style.align-items]="getFlexAttribute('align-items')"
375
+ [style.align-content]="getFlexAttribute('align-content')"
376
+ [fxLayout]="getFlexAttribute('layout')"
377
+ [fxLayoutGap]="options?.fxLayoutGap"
378
+ [fxLayoutAlign]="options?.fxLayoutAlign"
379
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
380
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
381
+ [innerHTML]="options?.errorMessage"></mat-error>
382
+ </fieldset>
383
+
384
+ <mat-card *ngIf="containerType === 'card'"
385
+ [ngClass]="options?.htmlClass || ''"
386
+ [class.expandable]="options?.expandable && !expanded"
387
+ [class.expanded]="options?.expandable && expanded">
388
+ <mat-card-header *ngIf="sectionTitle">
389
+ <legend
390
+ [class]="'legend ' + (options?.labelHtmlClass || '')"
391
+ [innerHTML]="sectionTitle"
392
+ (click)="toggleExpanded()"></legend>
393
+ </mat-card-header>
394
+ <mat-card-content *ngIf="expanded">
395
+ <fieldset [disabled]="options?.readonly">
396
+ <flex-layout-root-widget *ngIf="expanded"
397
+ [layout]="layoutNode.items"
398
+ [dataIndex]="dataIndex"
399
+ [layoutIndex]="layoutIndex"
400
+ [isFlexItem]="getFlexAttribute('is-flex')"
401
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
402
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
403
+ [style.display]="getFlexAttribute('display')"
404
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
405
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
406
+ [style.justify-content]="getFlexAttribute('justify-content')"
407
+ [style.align-items]="getFlexAttribute('align-items')"
408
+ [style.align-content]="getFlexAttribute('align-content')"
409
+ [fxLayout]="getFlexAttribute('layout')"
410
+ [fxLayoutGap]="options?.fxLayoutGap"
411
+ [fxLayoutAlign]="options?.fxLayoutAlign"
412
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
413
+ </fieldset>
414
+ </mat-card-content>
415
+ <mat-card-footer>
416
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
417
+ [innerHTML]="options?.errorMessage"></mat-error>
418
+ </mat-card-footer>
419
+ </mat-card>
420
+
421
+ <mat-expansion-panel *ngIf="containerType === 'expansion-panel'"
422
+ [expanded]="expanded"
423
+ [hideToggle]="!options?.expandable">
424
+ <mat-expansion-panel-header>
425
+ <mat-panel-title>
426
+ <legend *ngIf="sectionTitle"
427
+ [class]="options?.labelHtmlClass"
428
+ [innerHTML]="sectionTitle"
429
+ (click)="toggleExpanded()"></legend>
430
+ </mat-panel-title>
431
+ </mat-expansion-panel-header>
432
+ <fieldset [disabled]="options?.readonly">
433
+ <flex-layout-root-widget *ngIf="expanded"
434
+ [layout]="layoutNode.items"
435
+ [dataIndex]="dataIndex"
436
+ [layoutIndex]="layoutIndex"
437
+ [isFlexItem]="getFlexAttribute('is-flex')"
438
+ [class.form-flex-column]="getFlexAttribute('flex-direction') === 'column'"
439
+ [class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
440
+ [style.display]="getFlexAttribute('display')"
441
+ [style.flex-direction]="getFlexAttribute('flex-direction')"
442
+ [style.flex-wrap]="getFlexAttribute('flex-wrap')"
443
+ [style.justify-content]="getFlexAttribute('justify-content')"
444
+ [style.align-items]="getFlexAttribute('align-items')"
445
+ [style.align-content]="getFlexAttribute('align-content')"
446
+ [fxLayout]="getFlexAttribute('layout')"
447
+ [fxLayoutGap]="options?.fxLayoutGap"
448
+ [fxLayoutAlign]="options?.fxLayoutAlign"
449
+ [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>
450
+ </fieldset>
451
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
452
+ [innerHTML]="options?.errorMessage"></mat-error>
453
+ </mat-expansion-panel>`, styles: ["fieldset{border:0;margin:0;padding:0}.legend{font-weight:700}.expandable>.legend:before{content:\"\\25b6\";padding-right:.3em}.expanded>.legend:before{content:\"\\25bc\";padding-right:.2em}\n"] }]
454
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
455
+ type: Input
456
+ }], layoutIndex: [{
457
+ type: Input
458
+ }], dataIndex: [{
459
+ type: Input
460
+ }] } });
461
+
462
+ class MaterialAddReferenceComponent {
463
+ constructor(jsf) {
464
+ this.jsf = jsf;
465
+ }
466
+ ngOnInit() {
467
+ this.options = this.layoutNode.options || {};
468
+ }
469
+ get showAddButton() {
470
+ return !this.layoutNode.arrayItem ||
471
+ this.layoutIndex[this.layoutIndex.length - 1] < this.options.maxItems;
472
+ }
473
+ addItem(event) {
474
+ event.preventDefault();
475
+ this.jsf.addItem(this);
476
+ }
477
+ get buttonText() {
478
+ const parent = {
479
+ dataIndex: this.dataIndex.slice(0, -1),
480
+ layoutIndex: this.layoutIndex.slice(0, -1),
481
+ layoutNode: this.jsf.getParentNode(this),
482
+ };
483
+ return parent.layoutNode.add ||
484
+ this.jsf.setArrayItemTitle(parent, this.layoutNode, this.itemCount);
485
+ }
486
+ }
487
+ MaterialAddReferenceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialAddReferenceComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
488
+ MaterialAddReferenceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialAddReferenceComponent, selector: "material-add-reference-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
489
+ <section [class]="options?.htmlClass || ''" align="end">
490
+ <button mat-raised-button *ngIf="showAddButton"
491
+ [color]="options?.color || 'accent'"
492
+ [disabled]="options?.readonly"
493
+ (click)="addItem($event)">
494
+ <span *ngIf="options?.icon" [class]="options?.icon"></span>
495
+ <span *ngIf="options?.title" [innerHTML]="buttonText"></span>
496
+ </button>
497
+ </section>`, isInline: true, 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-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialAddReferenceComponent, decorators: [{
499
+ type: Component,
500
+ args: [{
501
+ // tslint:disable-next-line:component-selector
502
+ selector: 'material-add-reference-widget',
503
+ template: `
504
+ <section [class]="options?.htmlClass || ''" align="end">
505
+ <button mat-raised-button *ngIf="showAddButton"
506
+ [color]="options?.color || 'accent'"
507
+ [disabled]="options?.readonly"
508
+ (click)="addItem($event)">
509
+ <span *ngIf="options?.icon" [class]="options?.icon"></span>
510
+ <span *ngIf="options?.title" [innerHTML]="buttonText"></span>
511
+ </button>
512
+ </section>`,
513
+ changeDetection: ChangeDetectionStrategy.Default,
514
+ }]
515
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
516
+ type: Input
517
+ }], layoutIndex: [{
518
+ type: Input
519
+ }], dataIndex: [{
520
+ type: Input
521
+ }] } });
522
+
523
+ class MaterialButtonComponent {
524
+ constructor(jsf) {
525
+ this.jsf = jsf;
526
+ this.controlDisabled = false;
527
+ this.boundControl = false;
528
+ }
529
+ ngOnInit() {
530
+ this.options = this.layoutNode.options || {};
531
+ this.jsf.initializeControl(this);
532
+ if (hasOwn(this.options, 'disabled')) {
533
+ this.controlDisabled = this.options.disabled;
534
+ }
535
+ else if (this.jsf.formOptions.disableInvalidSubmit) {
536
+ this.controlDisabled = !this.jsf.isValid;
537
+ this.jsf.isValidChanges.subscribe(isValid => this.controlDisabled = !isValid);
538
+ }
539
+ }
540
+ updateValue(event) {
541
+ if (typeof this.options.onClick === 'function') {
542
+ this.options.onClick(event);
543
+ }
544
+ else {
545
+ this.jsf.updateValue(this, event.target.value);
546
+ }
547
+ }
548
+ }
549
+ MaterialButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialButtonComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
550
+ MaterialButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialButtonComponent, selector: "material-button-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
551
+ <div class="button-row" [class]="options?.htmlClass || ''">
552
+ <button mat-raised-button
553
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
554
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
555
+ [color]="options?.color || 'primary'"
556
+ [disabled]="controlDisabled || options?.readonly"
557
+ [id]="'control' + layoutNode?._id"
558
+ [name]="controlName"
559
+ [type]="layoutNode?.type"
560
+ [value]="controlValue"
561
+ (click)="updateValue($event)">
562
+ <mat-icon *ngIf="options?.icon" class="mat-24">{{options?.icon}}</mat-icon>
563
+ <span *ngIf="options?.title" [innerHTML]="options?.title"></span>
564
+ </button>
565
+ </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-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialButtonComponent, decorators: [{
567
+ type: Component,
568
+ args: [{ selector: 'material-button-widget', template: `
569
+ <div class="button-row" [class]="options?.htmlClass || ''">
570
+ <button mat-raised-button
571
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
572
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
573
+ [color]="options?.color || 'primary'"
574
+ [disabled]="controlDisabled || options?.readonly"
575
+ [id]="'control' + layoutNode?._id"
576
+ [name]="controlName"
577
+ [type]="layoutNode?.type"
578
+ [value]="controlValue"
579
+ (click)="updateValue($event)">
580
+ <mat-icon *ngIf="options?.icon" class="mat-24">{{options?.icon}}</mat-icon>
581
+ <span *ngIf="options?.title" [innerHTML]="options?.title"></span>
582
+ </button>
583
+ </div>`, styles: ["button{margin-top:10px}\n"] }]
584
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
585
+ type: Input
586
+ }], layoutIndex: [{
587
+ type: Input
588
+ }], dataIndex: [{
589
+ type: Input
590
+ }] } });
591
+
592
+ class MaterialButtonGroupComponent {
593
+ constructor(jsf) {
594
+ this.jsf = jsf;
595
+ this.controlDisabled = false;
596
+ this.boundControl = false;
597
+ this.radiosList = [];
598
+ this.vertical = false;
599
+ }
600
+ ngOnInit() {
601
+ this.options = this.layoutNode.options || {};
602
+ this.radiosList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, true);
603
+ this.jsf.initializeControl(this);
604
+ }
605
+ updateValue(value) {
606
+ this.options.showErrors = true;
607
+ this.jsf.updateValue(this, value);
608
+ }
609
+ }
610
+ MaterialButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialButtonGroupComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
611
+ MaterialButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialButtonGroupComponent, selector: "material-button-group-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
612
+ <div>
613
+ <div *ngIf="options?.title">
614
+ <label
615
+ [attr.for]="'control' + layoutNode?._id"
616
+ [class]="options?.labelHtmlClass || ''"
617
+ [style.display]="options?.notitle ? 'none' : ''"
618
+ [innerHTML]="options?.title"></label>
619
+ </div>
620
+ <mat-button-toggle-group
621
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
622
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
623
+ [attr.required]="options?.required"
624
+ [disabled]="controlDisabled || options?.readonly"
625
+ [name]="controlName"
626
+ [value]="controlValue"
627
+ [vertical]="!!options.vertical">
628
+ <mat-button-toggle *ngFor="let radioItem of radiosList"
629
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
630
+ [value]="radioItem?.value"
631
+ (click)="updateValue(radioItem?.value)">
632
+ <span [innerHTML]="radioItem?.name"></span>
633
+ </mat-button-toggle>
634
+ </mat-button-toggle-group>
635
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
636
+ [innerHTML]="options?.errorMessage"></mat-error>
637
+ </div>`, isInline: true, styles: ["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$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$2.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }] });
638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialButtonGroupComponent, decorators: [{
639
+ type: Component,
640
+ args: [{ selector: 'material-button-group-widget', template: `
641
+ <div>
642
+ <div *ngIf="options?.title">
643
+ <label
644
+ [attr.for]="'control' + layoutNode?._id"
645
+ [class]="options?.labelHtmlClass || ''"
646
+ [style.display]="options?.notitle ? 'none' : ''"
647
+ [innerHTML]="options?.title"></label>
648
+ </div>
649
+ <mat-button-toggle-group
650
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
651
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
652
+ [attr.required]="options?.required"
653
+ [disabled]="controlDisabled || options?.readonly"
654
+ [name]="controlName"
655
+ [value]="controlValue"
656
+ [vertical]="!!options.vertical">
657
+ <mat-button-toggle *ngFor="let radioItem of radiosList"
658
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
659
+ [value]="radioItem?.value"
660
+ (click)="updateValue(radioItem?.value)">
661
+ <span [innerHTML]="radioItem?.name"></span>
662
+ </mat-button-toggle>
663
+ </mat-button-toggle-group>
664
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
665
+ [innerHTML]="options?.errorMessage"></mat-error>
666
+ </div>`, styles: ["mat-error{font-size:75%}\n"] }]
667
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
668
+ type: Input
669
+ }], layoutIndex: [{
670
+ type: Input
671
+ }], dataIndex: [{
672
+ type: Input
673
+ }] } });
674
+
675
+ class MaterialCheckboxComponent {
676
+ constructor(jsf) {
677
+ this.jsf = jsf;
678
+ this.controlDisabled = false;
679
+ this.boundControl = false;
680
+ this.trueValue = true;
681
+ this.falseValue = false;
682
+ this.showSlideToggle = false;
683
+ }
684
+ ngOnInit() {
685
+ this.options = this.layoutNode.options || {};
686
+ this.jsf.initializeControl(this, !this.options.readonly);
687
+ if (this.controlValue === null || this.controlValue === undefined) {
688
+ this.controlValue = false;
689
+ this.jsf.updateValue(this, this.falseValue);
690
+ }
691
+ if (this.layoutNode.type === 'slide-toggle' ||
692
+ this.layoutNode.format === 'slide-toggle') {
693
+ this.showSlideToggle = true;
694
+ }
695
+ }
696
+ updateValue(event) {
697
+ this.options.showErrors = true;
698
+ this.jsf.updateValue(this, event.checked ? this.trueValue : this.falseValue);
699
+ }
700
+ get isChecked() {
701
+ return this.jsf.getFormControlValue(this) === this.trueValue;
702
+ }
703
+ }
704
+ MaterialCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialCheckboxComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
705
+ MaterialCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialCheckboxComponent, selector: "material-checkbox-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
706
+ <mat-checkbox *ngIf="boundControl && !showSlideToggle"
707
+ [formControl]="formControl"
708
+ align="left"
709
+ [color]="options?.color || 'primary'"
710
+ [id]="'control' + layoutNode?._id"
711
+ labelPosition="after"
712
+ [name]="controlName"
713
+ (blur)="options.showErrors = true">
714
+ <span *ngIf="options?.title"
715
+ class="checkbox-name"
716
+ [style.display]="options?.notitle ? 'none' : ''"
717
+ [innerHTML]="options?.title"></span>
718
+ </mat-checkbox>
719
+ <mat-checkbox *ngIf="!boundControl && !showSlideToggle"
720
+ align="left"
721
+ [color]="options?.color || 'primary'"
722
+ [disabled]="controlDisabled || options?.readonly"
723
+ [id]="'control' + layoutNode?._id"
724
+ labelPosition="after"
725
+ [name]="controlName"
726
+ [checked]="isChecked"
727
+ (blur)="options.showErrors = true"
728
+ (change)="updateValue($event)">
729
+ <span *ngIf="options?.title"
730
+ class="checkbox-name"
731
+ [style.display]="options?.notitle ? 'none' : ''"
732
+ [innerHTML]="options?.title"></span>
733
+ </mat-checkbox>
734
+ <mat-slide-toggle *ngIf="boundControl && showSlideToggle"
735
+ [formControl]="formControl"
736
+ align="left"
737
+ [color]="options?.color || 'primary'"
738
+ [id]="'control' + layoutNode?._id"
739
+ labelPosition="after"
740
+ [name]="controlName"
741
+ (blur)="options.showErrors = true">
742
+ <span *ngIf="options?.title"
743
+ class="checkbox-name"
744
+ [style.display]="options?.notitle ? 'none' : ''"
745
+ [innerHTML]="options?.title"></span>
746
+ </mat-slide-toggle>
747
+ <mat-slide-toggle *ngIf="!boundControl && showSlideToggle"
748
+ align="left"
749
+ [color]="options?.color || 'primary'"
750
+ [disabled]="controlDisabled || options?.readonly"
751
+ [id]="'control' + layoutNode?._id"
752
+ labelPosition="after"
753
+ [name]="controlName"
754
+ [checked]="isChecked"
755
+ (blur)="options.showErrors = true"
756
+ (change)="updateValue($event)">
757
+ <span *ngIf="options?.title"
758
+ class="checkbox-name"
759
+ [style.display]="options?.notitle ? 'none' : ''"
760
+ [innerHTML]="options?.title"></span>
761
+ </mat-slide-toggle>
762
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
763
+ [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$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialCheckboxComponent, decorators: [{
765
+ type: Component,
766
+ args: [{ selector: 'material-checkbox-widget', template: `
767
+ <mat-checkbox *ngIf="boundControl && !showSlideToggle"
768
+ [formControl]="formControl"
769
+ align="left"
770
+ [color]="options?.color || 'primary'"
771
+ [id]="'control' + layoutNode?._id"
772
+ labelPosition="after"
773
+ [name]="controlName"
774
+ (blur)="options.showErrors = true">
775
+ <span *ngIf="options?.title"
776
+ class="checkbox-name"
777
+ [style.display]="options?.notitle ? 'none' : ''"
778
+ [innerHTML]="options?.title"></span>
779
+ </mat-checkbox>
780
+ <mat-checkbox *ngIf="!boundControl && !showSlideToggle"
781
+ align="left"
782
+ [color]="options?.color || 'primary'"
783
+ [disabled]="controlDisabled || options?.readonly"
784
+ [id]="'control' + layoutNode?._id"
785
+ labelPosition="after"
786
+ [name]="controlName"
787
+ [checked]="isChecked"
788
+ (blur)="options.showErrors = true"
789
+ (change)="updateValue($event)">
790
+ <span *ngIf="options?.title"
791
+ class="checkbox-name"
792
+ [style.display]="options?.notitle ? 'none' : ''"
793
+ [innerHTML]="options?.title"></span>
794
+ </mat-checkbox>
795
+ <mat-slide-toggle *ngIf="boundControl && showSlideToggle"
796
+ [formControl]="formControl"
797
+ align="left"
798
+ [color]="options?.color || 'primary'"
799
+ [id]="'control' + layoutNode?._id"
800
+ labelPosition="after"
801
+ [name]="controlName"
802
+ (blur)="options.showErrors = true">
803
+ <span *ngIf="options?.title"
804
+ class="checkbox-name"
805
+ [style.display]="options?.notitle ? 'none' : ''"
806
+ [innerHTML]="options?.title"></span>
807
+ </mat-slide-toggle>
808
+ <mat-slide-toggle *ngIf="!boundControl && showSlideToggle"
809
+ align="left"
810
+ [color]="options?.color || 'primary'"
811
+ [disabled]="controlDisabled || options?.readonly"
812
+ [id]="'control' + layoutNode?._id"
813
+ labelPosition="after"
814
+ [name]="controlName"
815
+ [checked]="isChecked"
816
+ (blur)="options.showErrors = true"
817
+ (change)="updateValue($event)">
818
+ <span *ngIf="options?.title"
819
+ class="checkbox-name"
820
+ [style.display]="options?.notitle ? 'none' : ''"
821
+ [innerHTML]="options?.title"></span>
822
+ </mat-slide-toggle>
823
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
824
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: [".checkbox-name{white-space:nowrap}mat-error{font-size:75%}\n"] }]
825
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
826
+ type: Input
827
+ }], layoutIndex: [{
828
+ type: Input
829
+ }], dataIndex: [{
830
+ type: Input
831
+ }] } });
832
+
833
+ // TODO: Change this to use a Selection List instead?
834
+ // https://material.angular.io/components/list/overview
835
+ class MaterialCheckboxesComponent {
836
+ constructor(jsf) {
837
+ this.jsf = jsf;
838
+ this.controlDisabled = false;
839
+ this.boundControl = false;
840
+ this.horizontalList = false;
841
+ this.checkboxList = [];
842
+ }
843
+ ngOnInit() {
844
+ this.options = this.layoutNode.options || {};
845
+ this.horizontalList = this.layoutNode.type === 'checkboxes-inline' ||
846
+ this.layoutNode.type === 'checkboxbuttons';
847
+ this.jsf.initializeControl(this);
848
+ this.checkboxList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, true);
849
+ if (this.boundControl) {
850
+ const formArray = this.jsf.getFormControl(this);
851
+ for (const checkboxItem of this.checkboxList) {
852
+ checkboxItem.checked = formArray.value.includes(checkboxItem.value);
853
+ }
854
+ }
855
+ }
856
+ get allChecked() {
857
+ return this.checkboxList.filter(t => t.checked).length === this.checkboxList.length;
858
+ }
859
+ get someChecked() {
860
+ const checkedItems = this.checkboxList.filter(t => t.checked).length;
861
+ return checkedItems > 0 && checkedItems < this.checkboxList.length;
862
+ }
863
+ updateValue() {
864
+ this.options.showErrors = true;
865
+ if (this.boundControl) {
866
+ this.jsf.updateArrayCheckboxList(this, this.checkboxList);
867
+ }
868
+ }
869
+ updateAllValues(event) {
870
+ this.options.showErrors = true;
871
+ this.checkboxList.forEach(t => t.checked = event.checked);
872
+ this.updateValue();
873
+ }
874
+ }
875
+ MaterialCheckboxesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialCheckboxesComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
876
+ MaterialCheckboxesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialCheckboxesComponent, selector: "material-checkboxes-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
877
+ <div>
878
+ <mat-checkbox type="checkbox"
879
+ [checked]="allChecked"
880
+ [color]="options?.color || 'primary'"
881
+ [disabled]="controlDisabled || options?.readonly"
882
+ [indeterminate]="someChecked"
883
+ [name]="options?.name"
884
+ (blur)="options.showErrors = true"
885
+ (change)="updateAllValues($event)">
886
+ <span class="checkbox-name" [innerHTML]="options?.name"></span>
887
+ </mat-checkbox>
888
+ <label *ngIf="options?.title"
889
+ class="title"
890
+ [class]="options?.labelHtmlClass || ''"
891
+ [style.display]="options?.notitle ? 'none' : ''"
892
+ [innerHTML]="options?.title"></label>
893
+ <ul class="checkbox-list" [class.horizontal-list]="horizontalList">
894
+ <li *ngFor="let checkboxItem of checkboxList"
895
+ [class]="options?.htmlClass || ''">
896
+ <mat-checkbox type="checkbox"
897
+ [(ngModel)]="checkboxItem.checked"
898
+ [color]="options?.color || 'primary'"
899
+ [disabled]="controlDisabled || options?.readonly"
900
+ [name]="checkboxItem?.name"
901
+ (blur)="options.showErrors = true"
902
+ (change)="updateValue()">
903
+ <span class="checkbox-name" [innerHTML]="checkboxItem?.name"></span>
904
+ </mat-checkbox>
905
+ </li>
906
+ </ul>
907
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
908
+ [innerHTML]="options?.errorMessage"></mat-error>
909
+ </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$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }] });
910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialCheckboxesComponent, decorators: [{
911
+ type: Component,
912
+ args: [{ selector: 'material-checkboxes-widget', template: `
913
+ <div>
914
+ <mat-checkbox type="checkbox"
915
+ [checked]="allChecked"
916
+ [color]="options?.color || 'primary'"
917
+ [disabled]="controlDisabled || options?.readonly"
918
+ [indeterminate]="someChecked"
919
+ [name]="options?.name"
920
+ (blur)="options.showErrors = true"
921
+ (change)="updateAllValues($event)">
922
+ <span class="checkbox-name" [innerHTML]="options?.name"></span>
923
+ </mat-checkbox>
924
+ <label *ngIf="options?.title"
925
+ class="title"
926
+ [class]="options?.labelHtmlClass || ''"
927
+ [style.display]="options?.notitle ? 'none' : ''"
928
+ [innerHTML]="options?.title"></label>
929
+ <ul class="checkbox-list" [class.horizontal-list]="horizontalList">
930
+ <li *ngFor="let checkboxItem of checkboxList"
931
+ [class]="options?.htmlClass || ''">
932
+ <mat-checkbox type="checkbox"
933
+ [(ngModel)]="checkboxItem.checked"
934
+ [color]="options?.color || 'primary'"
935
+ [disabled]="controlDisabled || options?.readonly"
936
+ [name]="checkboxItem?.name"
937
+ (blur)="options.showErrors = true"
938
+ (change)="updateValue()">
939
+ <span class="checkbox-name" [innerHTML]="checkboxItem?.name"></span>
940
+ </mat-checkbox>
941
+ </li>
942
+ </ul>
943
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
944
+ [innerHTML]="options?.errorMessage"></mat-error>
945
+ </div>`, 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"] }]
946
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
947
+ type: Input
948
+ }], layoutIndex: [{
949
+ type: Input
950
+ }], dataIndex: [{
951
+ type: Input
952
+ }] } });
953
+
954
+ // TODO: Add this control
955
+ class MaterialChipListComponent {
956
+ constructor(jsf) {
957
+ this.jsf = jsf;
958
+ this.controlDisabled = false;
959
+ this.boundControl = false;
960
+ }
961
+ ngOnInit() {
962
+ this.options = this.layoutNode.options || {};
963
+ this.jsf.initializeControl(this);
964
+ }
965
+ updateValue(event) {
966
+ this.jsf.updateValue(this, event.target.value);
967
+ }
968
+ }
969
+ MaterialChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialChipListComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
970
+ MaterialChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialChipListComponent, selector: "material-chip-list-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: ``, isInline: true });
971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialChipListComponent, decorators: [{
972
+ type: Component,
973
+ args: [{
974
+ // tslint:disable-next-line:component-selector
975
+ selector: 'material-chip-list-widget',
976
+ template: ``,
977
+ }]
978
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
979
+ type: Input
980
+ }], layoutIndex: [{
981
+ type: Input
982
+ }], dataIndex: [{
983
+ type: Input
984
+ }] } });
985
+
986
+ class MaterialDatepickerComponent {
987
+ constructor(matFormFieldDefaultOptions, jsf) {
988
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
989
+ this.jsf = jsf;
990
+ this.controlDisabled = false;
991
+ this.boundControl = false;
992
+ this.autoCompleteList = [];
993
+ }
994
+ ngOnInit() {
995
+ this.options = this.layoutNode.options || {};
996
+ this.jsf.initializeControl(this, !this.options.readonly);
997
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
998
+ this.options.description = this.options.placeholder;
999
+ }
1000
+ }
1001
+ }
1002
+ MaterialDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDatepickerComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1003
+ MaterialDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialDatepickerComponent, selector: "material-datepicker-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1004
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1005
+ [class]="options?.htmlClass || ''"
1006
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1007
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1008
+ [style.width]="'100%'">
1009
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1010
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1011
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1012
+ <input matInput *ngIf="boundControl"
1013
+ [formControl]="formControl"
1014
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1015
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1016
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1017
+ [id]="'control' + layoutNode?._id"
1018
+ [max]="options?.maximum"
1019
+ [matDatepicker]="picker"
1020
+ [min]="options?.minimum"
1021
+ [name]="controlName"
1022
+ [placeholder]="options?.title"
1023
+ [readonly]="options?.readonly"
1024
+ [required]="options?.required"
1025
+ [style.width]="'100%'"
1026
+ (blur)="options.showErrors = true"
1027
+ >
1028
+ <input matInput *ngIf="!boundControl"
1029
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1030
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1031
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1032
+ [disabled]="controlDisabled || options?.readonly"
1033
+ [id]="'control' + layoutNode?._id"
1034
+ [max]="options?.maximum"
1035
+ [matDatepicker]="picker"
1036
+ [min]="options?.minimum"
1037
+ [name]="controlName"
1038
+ [placeholder]="options?.title"
1039
+ [required]="options?.required"
1040
+ [style.width]="'100%'"
1041
+ [readonly]="options?.readonly"
1042
+ (blur)="options.showErrors = true"
1043
+ >
1044
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1045
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1046
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1047
+ align="end" [innerHTML]="options?.description"></mat-hint>
1048
+ <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
1049
+ </mat-form-field>
1050
+ <mat-datepicker #picker ></mat-datepicker>
1051
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1052
+ [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-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;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$4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$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"], exportAs: ["matInput"] }] });
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDatepickerComponent, decorators: [{
1054
+ type: Component,
1055
+ args: [{ selector: 'material-datepicker-widget', template: `
1056
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1057
+ [class]="options?.htmlClass || ''"
1058
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1059
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1060
+ [style.width]="'100%'">
1061
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1062
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1063
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1064
+ <input matInput *ngIf="boundControl"
1065
+ [formControl]="formControl"
1066
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1067
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1068
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1069
+ [id]="'control' + layoutNode?._id"
1070
+ [max]="options?.maximum"
1071
+ [matDatepicker]="picker"
1072
+ [min]="options?.minimum"
1073
+ [name]="controlName"
1074
+ [placeholder]="options?.title"
1075
+ [readonly]="options?.readonly"
1076
+ [required]="options?.required"
1077
+ [style.width]="'100%'"
1078
+ (blur)="options.showErrors = true"
1079
+ >
1080
+ <input matInput *ngIf="!boundControl"
1081
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1082
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1083
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1084
+ [disabled]="controlDisabled || options?.readonly"
1085
+ [id]="'control' + layoutNode?._id"
1086
+ [max]="options?.maximum"
1087
+ [matDatepicker]="picker"
1088
+ [min]="options?.minimum"
1089
+ [name]="controlName"
1090
+ [placeholder]="options?.title"
1091
+ [required]="options?.required"
1092
+ [style.width]="'100%'"
1093
+ [readonly]="options?.readonly"
1094
+ (blur)="options.showErrors = true"
1095
+ >
1096
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1097
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1098
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1099
+ align="end" [innerHTML]="options?.description"></mat-hint>
1100
+ <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
1101
+ </mat-form-field>
1102
+ <mat-datepicker #picker ></mat-datepicker>
1103
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1104
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;width:initial}\n"] }]
1105
+ }], ctorParameters: function () {
1106
+ return [{ type: undefined, decorators: [{
1107
+ type: Inject,
1108
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1109
+ }, {
1110
+ type: Optional
1111
+ }] }, { type: i1.JsonSchemaFormService }];
1112
+ }, propDecorators: { layoutNode: [{
1113
+ type: Input
1114
+ }], layoutIndex: [{
1115
+ type: Input
1116
+ }], dataIndex: [{
1117
+ type: Input
1118
+ }] } });
1119
+
1120
+ class MaterialDesignFrameworkComponent {
1121
+ constructor(changeDetector, jsf) {
1122
+ this.changeDetector = changeDetector;
1123
+ this.jsf = jsf;
1124
+ this.frameworkInitialized = false;
1125
+ this.formControl = null;
1126
+ this.parentArray = null;
1127
+ this.isOrderable = false;
1128
+ this.dynamicTitle = null;
1129
+ }
1130
+ get showRemoveButton() {
1131
+ if (!this.layoutNode || !this.widgetOptions.removable ||
1132
+ this.widgetOptions.readonly || this.layoutNode.type === '$ref') {
1133
+ return false;
1134
+ }
1135
+ if (this.layoutNode.recursiveReference) {
1136
+ return true;
1137
+ }
1138
+ if (!this.layoutNode.arrayItem || !this.parentArray) {
1139
+ return false;
1140
+ }
1141
+ // If array length <= minItems, don't allow removing any items
1142
+ return this.parentArray.items.length - 1 <= this.parentArray.options.minItems ? false :
1143
+ // For removable list items, allow removing any item
1144
+ this.layoutNode.arrayItemType === 'list' ? true :
1145
+ // For removable tuple items, only allow removing last item in list
1146
+ this.layoutIndex[this.layoutIndex.length - 1] === this.parentArray.items.length - 2;
1147
+ }
1148
+ ngOnInit() {
1149
+ this.initializeFramework();
1150
+ }
1151
+ ngOnChanges() {
1152
+ if (!this.frameworkInitialized) {
1153
+ this.initializeFramework();
1154
+ }
1155
+ if (this.dynamicTitle) {
1156
+ this.updateTitle();
1157
+ }
1158
+ }
1159
+ initializeFramework() {
1160
+ if (this.layoutNode) {
1161
+ this.options = cloneDeep(this.layoutNode.options || {});
1162
+ this.widgetLayoutNode = Object.assign(Object.assign({}, this.layoutNode), { options: cloneDeep(this.layoutNode.options || {}) });
1163
+ this.widgetOptions = this.widgetLayoutNode.options;
1164
+ this.formControl = this.jsf.getFormControl(this);
1165
+ if (isDefined(this.widgetOptions.minimum) &&
1166
+ isDefined(this.widgetOptions.maximum) &&
1167
+ this.widgetOptions.multipleOf >= 1) {
1168
+ this.layoutNode.type = 'range';
1169
+ }
1170
+ if (!['$ref', 'advancedfieldset', 'authfieldset', 'button', 'card',
1171
+ 'checkbox', 'expansion-panel', 'help', 'message', 'msg', 'section',
1172
+ 'submit', 'tabarray', 'tabs'].includes(this.layoutNode.type) &&
1173
+ /{{.+?}}/.test(this.widgetOptions.title || '')) {
1174
+ this.dynamicTitle = this.widgetOptions.title;
1175
+ this.updateTitle();
1176
+ }
1177
+ if (this.layoutNode.arrayItem && this.layoutNode.type !== '$ref') {
1178
+ this.parentArray = this.jsf.getParentNode(this);
1179
+ if (this.parentArray) {
1180
+ this.isOrderable =
1181
+ this.parentArray.type.slice(0, 3) !== 'tab' &&
1182
+ this.layoutNode.arrayItemType === 'list' &&
1183
+ !this.widgetOptions.readonly &&
1184
+ this.parentArray.options.orderable;
1185
+ }
1186
+ }
1187
+ this.frameworkInitialized = true;
1188
+ }
1189
+ else {
1190
+ this.options = {};
1191
+ }
1192
+ }
1193
+ updateTitle() {
1194
+ this.widgetLayoutNode.options.title = this.jsf.parseText(this.dynamicTitle, this.jsf.getFormControlValue(this), this.jsf.getFormControlGroup(this).value, this.dataIndex[this.dataIndex.length - 1]);
1195
+ }
1196
+ removeItem() {
1197
+ this.jsf.removeItem(this);
1198
+ }
1199
+ }
1200
+ MaterialDesignFrameworkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1201
+ MaterialDesignFrameworkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialDesignFrameworkComponent, selector: "material-design-framework", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, usesOnChanges: true, ngImport: i0, template: "<div\n [class.array-item]=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"\n [orderable]=\"isOrderable\"\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\">\n <svg *ngIf=\"showRemoveButton\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"18\" width=\"18\" viewBox=\"0 0 24 24\"\n class=\"close-button\"\n (click)=\"removeItem()\">\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"/>\n </svg>\n <select-widget-widget\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\"></select-widget-widget>\n</div>\n<div class=\"spacer\" *ngIf=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"></div>\n", styles: [".array-item{border-radius:2px;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;padding:6px;position:relative;transition:all .28s cubic-bezier(.4,0,.2,1)}.close-button{cursor:pointer;position:absolute;top:6px;right:6px;fill:#0006;visibility:hidden;z-index:500}.close-button:hover{fill:#000c}.array-item:hover>.close-button{visibility:visible}.spacer{margin:6px 0}[draggable=true]:hover{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;cursor:move;z-index:10}[draggable=true].drag-target-top{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px #000;position:relative;z-index:20}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SelectWidgetComponent, selector: "select-widget-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }, { kind: "directive", type: i1.OrderableDirective, selector: "[orderable]", inputs: ["orderable", "layoutNode", "layoutIndex", "dataIndex"] }] });
1202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkComponent, decorators: [{
1203
+ type: Component,
1204
+ args: [{ selector: 'material-design-framework', template: "<div\n [class.array-item]=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"\n [orderable]=\"isOrderable\"\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\">\n <svg *ngIf=\"showRemoveButton\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"18\" width=\"18\" viewBox=\"0 0 24 24\"\n class=\"close-button\"\n (click)=\"removeItem()\">\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"/>\n </svg>\n <select-widget-widget\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\"></select-widget-widget>\n</div>\n<div class=\"spacer\" *ngIf=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"></div>\n", styles: [".array-item{border-radius:2px;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;padding:6px;position:relative;transition:all .28s cubic-bezier(.4,0,.2,1)}.close-button{cursor:pointer;position:absolute;top:6px;right:6px;fill:#0006;visibility:hidden;z-index:500}.close-button:hover{fill:#000c}.array-item:hover>.close-button{visibility:visible}.spacer{margin:6px 0}[draggable=true]:hover{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;cursor:move;z-index:10}[draggable=true].drag-target-top{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px #000;position:relative;z-index:20}\n"] }]
1205
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1206
+ type: Input
1207
+ }], layoutIndex: [{
1208
+ type: Input
1209
+ }], dataIndex: [{
1210
+ type: Input
1211
+ }] } });
1212
+
1213
+ // TODO: Add this control
1214
+ class MaterialFileComponent {
1215
+ constructor(jsf) {
1216
+ this.jsf = jsf;
1217
+ this.controlDisabled = false;
1218
+ this.boundControl = false;
1219
+ }
1220
+ ngOnInit() {
1221
+ this.options = this.layoutNode.options || {};
1222
+ this.jsf.initializeControl(this);
1223
+ }
1224
+ updateValue(event) {
1225
+ this.jsf.updateValue(this, event.target.value);
1226
+ }
1227
+ }
1228
+ MaterialFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialFileComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1229
+ MaterialFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialFileComponent, selector: "material-file-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: ``, isInline: true });
1230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialFileComponent, decorators: [{
1231
+ type: Component,
1232
+ args: [{
1233
+ // tslint:disable-next-line:component-selector
1234
+ selector: 'material-file-widget',
1235
+ template: ``,
1236
+ }]
1237
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1238
+ type: Input
1239
+ }], layoutIndex: [{
1240
+ type: Input
1241
+ }], dataIndex: [{
1242
+ type: Input
1243
+ }] } });
1244
+
1245
+ class MaterialInputComponent {
1246
+ constructor(matFormFieldDefaultOptions, jsf) {
1247
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1248
+ this.jsf = jsf;
1249
+ this.controlDisabled = false;
1250
+ this.boundControl = false;
1251
+ this.autoCompleteList = [];
1252
+ }
1253
+ ngOnInit() {
1254
+ this.options = this.layoutNode.options || {};
1255
+ this.jsf.initializeControl(this);
1256
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1257
+ this.options.description = this.options.placeholder;
1258
+ }
1259
+ }
1260
+ updateValue(event) {
1261
+ this.jsf.updateValue(this, event.target.value);
1262
+ }
1263
+ }
1264
+ MaterialInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialInputComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1265
+ MaterialInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialInputComponent, selector: "material-input-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1266
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1267
+ [class]="options?.htmlClass || ''"
1268
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1269
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1270
+ [style.width]="'100%'">
1271
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1272
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1273
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1274
+ <input matInput *ngIf="boundControl"
1275
+ [formControl]="formControl"
1276
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1277
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1278
+ [attr.maxlength]="options?.maxLength"
1279
+ [attr.minlength]="options?.minLength"
1280
+ [attr.pattern]="options?.pattern"
1281
+ [readonly]="options?.readonly ? 'readonly' : null"
1282
+ [id]="'control' + layoutNode?._id"
1283
+ [name]="controlName"
1284
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1285
+ [required]="options?.required"
1286
+ [style.width]="'100%'"
1287
+ [type]="layoutNode?.type"
1288
+ (blur)="options.showErrors = true">
1289
+ <input matInput *ngIf="!boundControl"
1290
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1291
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1292
+ [attr.maxlength]="options?.maxLength"
1293
+ [attr.minlength]="options?.minLength"
1294
+ [attr.pattern]="options?.pattern"
1295
+ [disabled]="controlDisabled"
1296
+ [id]="'control' + layoutNode?._id"
1297
+ [name]="controlName"
1298
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1299
+ [readonly]="options?.readonly ? 'readonly' : null"
1300
+ [required]="options?.required"
1301
+ [style.width]="'100%'"
1302
+ [type]="layoutNode?.type"
1303
+ [value]="controlValue"
1304
+ (input)="updateValue($event)"
1305
+ (blur)="options.showErrors = true">
1306
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1307
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1308
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1309
+ align="end" [innerHTML]="options?.description"></mat-hint>
1310
+ <mat-autocomplete *ngIf="options?.typeahead?.source">
1311
+ <mat-option *ngFor="let word of options?.typeahead?.source"
1312
+ [value]="word">{{word}}</mat-option>
1313
+ </mat-autocomplete>
1314
+ </mat-form-field>
1315
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1316
+ [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-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;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.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$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"], exportAs: ["matInput"] }] });
1317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialInputComponent, decorators: [{
1318
+ type: Component,
1319
+ args: [{ selector: 'material-input-widget', template: `
1320
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1321
+ [class]="options?.htmlClass || ''"
1322
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1323
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1324
+ [style.width]="'100%'">
1325
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1326
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1327
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1328
+ <input matInput *ngIf="boundControl"
1329
+ [formControl]="formControl"
1330
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1331
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1332
+ [attr.maxlength]="options?.maxLength"
1333
+ [attr.minlength]="options?.minLength"
1334
+ [attr.pattern]="options?.pattern"
1335
+ [readonly]="options?.readonly ? 'readonly' : null"
1336
+ [id]="'control' + layoutNode?._id"
1337
+ [name]="controlName"
1338
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1339
+ [required]="options?.required"
1340
+ [style.width]="'100%'"
1341
+ [type]="layoutNode?.type"
1342
+ (blur)="options.showErrors = true">
1343
+ <input matInput *ngIf="!boundControl"
1344
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1345
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1346
+ [attr.maxlength]="options?.maxLength"
1347
+ [attr.minlength]="options?.minLength"
1348
+ [attr.pattern]="options?.pattern"
1349
+ [disabled]="controlDisabled"
1350
+ [id]="'control' + layoutNode?._id"
1351
+ [name]="controlName"
1352
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1353
+ [readonly]="options?.readonly ? 'readonly' : null"
1354
+ [required]="options?.required"
1355
+ [style.width]="'100%'"
1356
+ [type]="layoutNode?.type"
1357
+ [value]="controlValue"
1358
+ (input)="updateValue($event)"
1359
+ (blur)="options.showErrors = true">
1360
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1361
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1362
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1363
+ align="end" [innerHTML]="options?.description"></mat-hint>
1364
+ <mat-autocomplete *ngIf="options?.typeahead?.source">
1365
+ <mat-option *ngFor="let word of options?.typeahead?.source"
1366
+ [value]="word">{{word}}</mat-option>
1367
+ </mat-autocomplete>
1368
+ </mat-form-field>
1369
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1370
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;width:initial}\n"] }]
1371
+ }], ctorParameters: function () {
1372
+ return [{ type: undefined, decorators: [{
1373
+ type: Inject,
1374
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1375
+ }, {
1376
+ type: Optional
1377
+ }] }, { type: i1.JsonSchemaFormService }];
1378
+ }, propDecorators: { layoutNode: [{
1379
+ type: Input
1380
+ }], layoutIndex: [{
1381
+ type: Input
1382
+ }], dataIndex: [{
1383
+ type: Input
1384
+ }] } });
1385
+
1386
+ class MaterialNumberComponent {
1387
+ constructor(matFormFieldDefaultOptions, jsf) {
1388
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1389
+ this.jsf = jsf;
1390
+ this.controlDisabled = false;
1391
+ this.boundControl = false;
1392
+ this.allowNegative = true;
1393
+ this.allowDecimal = true;
1394
+ this.allowExponents = false;
1395
+ this.lastValidNumber = '';
1396
+ }
1397
+ ngOnInit() {
1398
+ this.options = this.layoutNode.options || {};
1399
+ this.jsf.initializeControl(this);
1400
+ if (this.layoutNode.dataType === 'integer') {
1401
+ this.allowDecimal = false;
1402
+ }
1403
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1404
+ this.options.description = this.options.placeholder;
1405
+ }
1406
+ }
1407
+ updateValue(event) {
1408
+ this.jsf.updateValue(this, event.target.value);
1409
+ }
1410
+ }
1411
+ MaterialNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialNumberComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1412
+ MaterialNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialNumberComponent, selector: "material-number-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1413
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1414
+ [class]="options?.htmlClass || ''"
1415
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1416
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1417
+ [style.width]="'100%'">
1418
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1419
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1420
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1421
+ <input matInput *ngIf="boundControl"
1422
+ [formControl]="formControl"
1423
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1424
+ [attr.max]="options?.maximum"
1425
+ [attr.min]="options?.minimum"
1426
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1427
+ [id]="'control' + layoutNode?._id"
1428
+ [name]="controlName"
1429
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1430
+ [readonly]="options?.readonly ? 'readonly' : null"
1431
+ [required]="options?.required"
1432
+ [style.width]="'100%'"
1433
+ [type]="'number'"
1434
+ (blur)="options.showErrors = true">
1435
+ <input matInput *ngIf="!boundControl"
1436
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1437
+ [attr.max]="options?.maximum"
1438
+ [attr.min]="options?.minimum"
1439
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1440
+ [disabled]="controlDisabled"
1441
+ [id]="'control' + layoutNode?._id"
1442
+ [name]="controlName"
1443
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1444
+ [readonly]="options?.readonly ? 'readonly' : null"
1445
+ [required]="options?.required"
1446
+ [style.width]="'100%'"
1447
+ [type]="'number'"
1448
+ [value]="controlValue"
1449
+ (input)="updateValue($event)"
1450
+ (blur)="options.showErrors = true">
1451
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1452
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1453
+ <mat-hint *ngIf="layoutNode?.type === 'range'" align="start"
1454
+ [innerHTML]="controlValue"></mat-hint>
1455
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1456
+ align="end" [innerHTML]="options?.description"></mat-hint>
1457
+ </mat-form-field>
1458
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
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-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;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: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$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"], exportAs: ["matInput"] }] });
1460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialNumberComponent, decorators: [{
1461
+ type: Component,
1462
+ args: [{ selector: 'material-number-widget', template: `
1463
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1464
+ [class]="options?.htmlClass || ''"
1465
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1466
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1467
+ [style.width]="'100%'">
1468
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1469
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1470
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1471
+ <input matInput *ngIf="boundControl"
1472
+ [formControl]="formControl"
1473
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1474
+ [attr.max]="options?.maximum"
1475
+ [attr.min]="options?.minimum"
1476
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1477
+ [id]="'control' + layoutNode?._id"
1478
+ [name]="controlName"
1479
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1480
+ [readonly]="options?.readonly ? 'readonly' : null"
1481
+ [required]="options?.required"
1482
+ [style.width]="'100%'"
1483
+ [type]="'number'"
1484
+ (blur)="options.showErrors = true">
1485
+ <input matInput *ngIf="!boundControl"
1486
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1487
+ [attr.max]="options?.maximum"
1488
+ [attr.min]="options?.minimum"
1489
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1490
+ [disabled]="controlDisabled"
1491
+ [id]="'control' + layoutNode?._id"
1492
+ [name]="controlName"
1493
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1494
+ [readonly]="options?.readonly ? 'readonly' : null"
1495
+ [required]="options?.required"
1496
+ [style.width]="'100%'"
1497
+ [type]="'number'"
1498
+ [value]="controlValue"
1499
+ (input)="updateValue($event)"
1500
+ (blur)="options.showErrors = true">
1501
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1502
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1503
+ <mat-hint *ngIf="layoutNode?.type === 'range'" align="start"
1504
+ [innerHTML]="controlValue"></mat-hint>
1505
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1506
+ align="end" [innerHTML]="options?.description"></mat-hint>
1507
+ </mat-form-field>
1508
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1509
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;width:initial}\n"] }]
1510
+ }], ctorParameters: function () {
1511
+ return [{ type: undefined, decorators: [{
1512
+ type: Inject,
1513
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1514
+ }, {
1515
+ type: Optional
1516
+ }] }, { type: i1.JsonSchemaFormService }];
1517
+ }, propDecorators: { layoutNode: [{
1518
+ type: Input
1519
+ }], layoutIndex: [{
1520
+ type: Input
1521
+ }], dataIndex: [{
1522
+ type: Input
1523
+ }] } });
1524
+
1525
+ // TODO: Add this control
1526
+ class MaterialOneOfComponent {
1527
+ constructor(jsf) {
1528
+ this.jsf = jsf;
1529
+ this.controlDisabled = false;
1530
+ this.boundControl = false;
1531
+ }
1532
+ ngOnInit() {
1533
+ this.options = this.layoutNode.options || {};
1534
+ this.jsf.initializeControl(this);
1535
+ }
1536
+ updateValue(event) {
1537
+ this.jsf.updateValue(this, event.target.value);
1538
+ }
1539
+ }
1540
+ MaterialOneOfComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialOneOfComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1541
+ MaterialOneOfComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialOneOfComponent, selector: "material-one-of-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: ``, isInline: true });
1542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialOneOfComponent, decorators: [{
1543
+ type: Component,
1544
+ args: [{
1545
+ // tslint:disable-next-line:component-selector
1546
+ selector: 'material-one-of-widget',
1547
+ template: ``,
1548
+ }]
1549
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1550
+ type: Input
1551
+ }], layoutIndex: [{
1552
+ type: Input
1553
+ }], dataIndex: [{
1554
+ type: Input
1555
+ }] } });
1556
+
1557
+ class MaterialRadiosComponent {
1558
+ constructor(jsf) {
1559
+ this.jsf = jsf;
1560
+ this.controlDisabled = false;
1561
+ this.boundControl = false;
1562
+ this.flexDirection = 'column';
1563
+ this.radiosList = [];
1564
+ }
1565
+ ngOnInit() {
1566
+ this.options = this.layoutNode.options || {};
1567
+ if (this.layoutNode.type === 'radios-inline') {
1568
+ this.flexDirection = 'row';
1569
+ }
1570
+ this.radiosList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, true);
1571
+ this.jsf.initializeControl(this, !this.options.readonly);
1572
+ }
1573
+ updateValue(value) {
1574
+ this.options.showErrors = true;
1575
+ this.jsf.updateValue(this, value);
1576
+ }
1577
+ }
1578
+ MaterialRadiosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialRadiosComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1579
+ MaterialRadiosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialRadiosComponent, selector: "material-radios-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1580
+ <div>
1581
+ <div *ngIf="options?.title">
1582
+ <label
1583
+ [attr.for]="'control' + layoutNode?._id"
1584
+ [class]="options?.labelHtmlClass || ''"
1585
+ [style.display]="options?.notitle ? 'none' : ''"
1586
+ [innerHTML]="options?.title"></label>
1587
+ </div>
1588
+ <mat-radio-group *ngIf="boundControl"
1589
+ [formControl]="formControl"
1590
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1591
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1592
+ [attr.required]="options?.required"
1593
+ [style.flex-direction]="flexDirection"
1594
+ [name]="controlName"
1595
+ (blur)="options.showErrors = true">
1596
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1597
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1598
+ [value]="radioItem?.value">
1599
+ <span [innerHTML]="radioItem?.name"></span>
1600
+ </mat-radio-button>
1601
+ </mat-radio-group>
1602
+ <mat-radio-group *ngIf="!boundControl"
1603
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1604
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1605
+ [attr.required]="options?.required"
1606
+ [style.flex-direction]="flexDirection"
1607
+ [disabled]="controlDisabled || options?.readonly"
1608
+ [name]="controlName"
1609
+ [value]="controlValue">
1610
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1611
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1612
+ [value]="radioItem?.value"
1613
+ (click)="updateValue(radioItem?.value)">
1614
+ <span [innerHTML]="radioItem?.name"></span>
1615
+ </mat-radio-button>
1616
+ </mat-radio-group>
1617
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1618
+ [innerHTML]="options?.errorMessage"></mat-error>
1619
+ </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.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: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i5$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i5$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }] });
1620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialRadiosComponent, decorators: [{
1621
+ type: Component,
1622
+ args: [{ selector: 'material-radios-widget', template: `
1623
+ <div>
1624
+ <div *ngIf="options?.title">
1625
+ <label
1626
+ [attr.for]="'control' + layoutNode?._id"
1627
+ [class]="options?.labelHtmlClass || ''"
1628
+ [style.display]="options?.notitle ? 'none' : ''"
1629
+ [innerHTML]="options?.title"></label>
1630
+ </div>
1631
+ <mat-radio-group *ngIf="boundControl"
1632
+ [formControl]="formControl"
1633
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1634
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1635
+ [attr.required]="options?.required"
1636
+ [style.flex-direction]="flexDirection"
1637
+ [name]="controlName"
1638
+ (blur)="options.showErrors = true">
1639
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1640
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1641
+ [value]="radioItem?.value">
1642
+ <span [innerHTML]="radioItem?.name"></span>
1643
+ </mat-radio-button>
1644
+ </mat-radio-group>
1645
+ <mat-radio-group *ngIf="!boundControl"
1646
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1647
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1648
+ [attr.required]="options?.required"
1649
+ [style.flex-direction]="flexDirection"
1650
+ [disabled]="controlDisabled || options?.readonly"
1651
+ [name]="controlName"
1652
+ [value]="controlValue">
1653
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1654
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1655
+ [value]="radioItem?.value"
1656
+ (click)="updateValue(radioItem?.value)">
1657
+ <span [innerHTML]="radioItem?.name"></span>
1658
+ </mat-radio-button>
1659
+ </mat-radio-group>
1660
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1661
+ [innerHTML]="options?.errorMessage"></mat-error>
1662
+ </div>`, styles: ["mat-radio-group{display:inline-flex}mat-radio-button{margin:2px}mat-error{font-size:75%}\n"] }]
1663
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1664
+ type: Input
1665
+ }], layoutIndex: [{
1666
+ type: Input
1667
+ }], dataIndex: [{
1668
+ type: Input
1669
+ }] } });
1670
+
1671
+ class MaterialSelectComponent {
1672
+ constructor(matFormFieldDefaultOptions, jsf) {
1673
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1674
+ this.jsf = jsf;
1675
+ this.controlDisabled = false;
1676
+ this.boundControl = false;
1677
+ this.selectList = [];
1678
+ this.isArray = isArray;
1679
+ }
1680
+ ngOnInit() {
1681
+ this.options = this.layoutNode.options || {};
1682
+ this.selectList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, !!this.options.required, !!this.options.flatList);
1683
+ this.jsf.initializeControl(this, !this.options.readonly);
1684
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1685
+ this.options.description = this.options.placeholder;
1686
+ }
1687
+ }
1688
+ updateValue(event) {
1689
+ this.options.showErrors = true;
1690
+ this.jsf.updateValue(this, event.value);
1691
+ }
1692
+ }
1693
+ MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialSelectComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1694
+ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialSelectComponent, selector: "material-select-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1695
+ <mat-form-field
1696
+ [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1697
+ [class]="options?.htmlClass || ''"
1698
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1699
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1700
+ [style.width]="'100%'">
1701
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1702
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1703
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1704
+ <mat-select *ngIf="boundControl"
1705
+ [formControl]="formControl"
1706
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1707
+ [attr.name]="controlName"
1708
+ [id]="'control' + layoutNode?._id"
1709
+ [multiple]="options?.multiple"
1710
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1711
+ [required]="options?.required"
1712
+ [style.width]="'100%'"
1713
+ (blur)="options.showErrors = true">
1714
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1715
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1716
+ [value]="selectItem?.value">
1717
+ <span [innerHTML]="selectItem?.name"></span>
1718
+ </mat-option>
1719
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1720
+ [label]="selectItem?.group">
1721
+ <mat-option *ngFor="let subItem of selectItem.items"
1722
+ [value]="subItem?.value">
1723
+ <span [innerHTML]="subItem?.name"></span>
1724
+ </mat-option>
1725
+ </mat-optgroup>
1726
+ </ng-template>
1727
+ </mat-select>
1728
+ <mat-select *ngIf="!boundControl"
1729
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1730
+ [attr.name]="controlName"
1731
+ [disabled]="controlDisabled || options?.readonly"
1732
+ [id]="'control' + layoutNode?._id"
1733
+ [multiple]="options?.multiple"
1734
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1735
+ [required]="options?.required"
1736
+ [style.width]="'100%'"
1737
+ [value]="controlValue"
1738
+ (blur)="options.showErrors = true"
1739
+ (change)="updateValue($event)">
1740
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1741
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1742
+ [attr.selected]="selectItem?.value === controlValue"
1743
+ [value]="selectItem?.value">
1744
+ <span [innerHTML]="selectItem?.name"></span>
1745
+ </mat-option>
1746
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1747
+ [label]="selectItem?.group">
1748
+ <mat-option *ngFor="let subItem of selectItem.items"
1749
+ [attr.selected]="subItem?.value === controlValue"
1750
+ [value]="subItem?.value">
1751
+ <span [innerHTML]="subItem?.name"></span>
1752
+ </mat-option>
1753
+ </mat-optgroup>
1754
+ </ng-template>
1755
+ </mat-select>
1756
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1757
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1758
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1759
+ align="end" [innerHTML]="options?.description"></mat-hint>
1760
+ </mat-form-field>
1761
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1762
+ [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-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;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$6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$6.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialSelectComponent, decorators: [{
1764
+ type: Component,
1765
+ args: [{ selector: 'material-select-widget', template: `
1766
+ <mat-form-field
1767
+ [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1768
+ [class]="options?.htmlClass || ''"
1769
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1770
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1771
+ [style.width]="'100%'">
1772
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1773
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1774
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1775
+ <mat-select *ngIf="boundControl"
1776
+ [formControl]="formControl"
1777
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1778
+ [attr.name]="controlName"
1779
+ [id]="'control' + layoutNode?._id"
1780
+ [multiple]="options?.multiple"
1781
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1782
+ [required]="options?.required"
1783
+ [style.width]="'100%'"
1784
+ (blur)="options.showErrors = true">
1785
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1786
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1787
+ [value]="selectItem?.value">
1788
+ <span [innerHTML]="selectItem?.name"></span>
1789
+ </mat-option>
1790
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1791
+ [label]="selectItem?.group">
1792
+ <mat-option *ngFor="let subItem of selectItem.items"
1793
+ [value]="subItem?.value">
1794
+ <span [innerHTML]="subItem?.name"></span>
1795
+ </mat-option>
1796
+ </mat-optgroup>
1797
+ </ng-template>
1798
+ </mat-select>
1799
+ <mat-select *ngIf="!boundControl"
1800
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1801
+ [attr.name]="controlName"
1802
+ [disabled]="controlDisabled || options?.readonly"
1803
+ [id]="'control' + layoutNode?._id"
1804
+ [multiple]="options?.multiple"
1805
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1806
+ [required]="options?.required"
1807
+ [style.width]="'100%'"
1808
+ [value]="controlValue"
1809
+ (blur)="options.showErrors = true"
1810
+ (change)="updateValue($event)">
1811
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1812
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1813
+ [attr.selected]="selectItem?.value === controlValue"
1814
+ [value]="selectItem?.value">
1815
+ <span [innerHTML]="selectItem?.name"></span>
1816
+ </mat-option>
1817
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1818
+ [label]="selectItem?.group">
1819
+ <mat-option *ngFor="let subItem of selectItem.items"
1820
+ [attr.selected]="subItem?.value === controlValue"
1821
+ [value]="subItem?.value">
1822
+ <span [innerHTML]="subItem?.name"></span>
1823
+ </mat-option>
1824
+ </mat-optgroup>
1825
+ </ng-template>
1826
+ </mat-select>
1827
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1828
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1829
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1830
+ align="end" [innerHTML]="options?.description"></mat-hint>
1831
+ </mat-form-field>
1832
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1833
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;width:initial}\n"] }]
1834
+ }], ctorParameters: function () {
1835
+ return [{ type: undefined, decorators: [{
1836
+ type: Inject,
1837
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1838
+ }, {
1839
+ type: Optional
1840
+ }] }, { type: i1.JsonSchemaFormService }];
1841
+ }, propDecorators: { layoutNode: [{
1842
+ type: Input
1843
+ }], layoutIndex: [{
1844
+ type: Input
1845
+ }], dataIndex: [{
1846
+ type: Input
1847
+ }] } });
1848
+
1849
+ class MaterialSliderComponent {
1850
+ constructor(jsf) {
1851
+ this.jsf = jsf;
1852
+ this.controlDisabled = false;
1853
+ this.boundControl = false;
1854
+ this.allowNegative = true;
1855
+ this.allowDecimal = true;
1856
+ this.allowExponents = false;
1857
+ this.lastValidNumber = '';
1858
+ }
1859
+ ngOnInit() {
1860
+ this.options = this.layoutNode.options || {};
1861
+ this.jsf.initializeControl(this, !this.options.readonly);
1862
+ }
1863
+ updateValue(event) {
1864
+ this.options.showErrors = true;
1865
+ this.jsf.updateValue(this, event.value);
1866
+ }
1867
+ }
1868
+ MaterialSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialSliderComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1869
+ MaterialSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialSliderComponent, selector: "material-slider-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1870
+ <mat-slider thumbLabel *ngIf="boundControl"
1871
+ [formControl]="formControl"
1872
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1873
+ [id]="'control' + layoutNode?._id"
1874
+ [max]="options?.maximum"
1875
+ [min]="options?.minimum"
1876
+ [step]="options?.multipleOf || options?.step || 'any'"
1877
+ [style.width]="'100%'"
1878
+ (blur)="options.showErrors = true"></mat-slider>
1879
+ <mat-slider thumbLabel *ngIf="!boundControl"
1880
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1881
+ [disabled]="controlDisabled || options?.readonly"
1882
+ [id]="'control' + layoutNode?._id"
1883
+ [max]="options?.maximum"
1884
+ [min]="options?.minimum"
1885
+ [step]="options?.multipleOf || options?.step || 'any'"
1886
+ [style.width]="'100%'"
1887
+ [value]="controlValue"
1888
+ (blur)="options.showErrors = true"
1889
+ (change)="updateValue($event)"></mat-slider>
1890
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1891
+ [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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5$3.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }] });
1892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialSliderComponent, decorators: [{
1893
+ type: Component,
1894
+ args: [{ selector: 'material-slider-widget', template: `
1895
+ <mat-slider thumbLabel *ngIf="boundControl"
1896
+ [formControl]="formControl"
1897
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1898
+ [id]="'control' + layoutNode?._id"
1899
+ [max]="options?.maximum"
1900
+ [min]="options?.minimum"
1901
+ [step]="options?.multipleOf || options?.step || 'any'"
1902
+ [style.width]="'100%'"
1903
+ (blur)="options.showErrors = true"></mat-slider>
1904
+ <mat-slider thumbLabel *ngIf="!boundControl"
1905
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1906
+ [disabled]="controlDisabled || options?.readonly"
1907
+ [id]="'control' + layoutNode?._id"
1908
+ [max]="options?.maximum"
1909
+ [min]="options?.minimum"
1910
+ [step]="options?.multipleOf || options?.step || 'any'"
1911
+ [style.width]="'100%'"
1912
+ [value]="controlValue"
1913
+ (blur)="options.showErrors = true"
1914
+ (change)="updateValue($event)"></mat-slider>
1915
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1916
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%}\n"] }]
1917
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1918
+ type: Input
1919
+ }], layoutIndex: [{
1920
+ type: Input
1921
+ }], dataIndex: [{
1922
+ type: Input
1923
+ }] } });
1924
+
1925
+ // TODO: Add this control
1926
+ class MaterialStepperComponent {
1927
+ constructor(jsf) {
1928
+ this.jsf = jsf;
1929
+ this.controlDisabled = false;
1930
+ this.boundControl = false;
1931
+ }
1932
+ ngOnInit() {
1933
+ this.options = this.layoutNode.options || {};
1934
+ this.jsf.initializeControl(this);
1935
+ }
1936
+ updateValue(event) {
1937
+ this.jsf.updateValue(this, event.target.value);
1938
+ }
1939
+ }
1940
+ MaterialStepperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialStepperComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1941
+ MaterialStepperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialStepperComponent, selector: "material-stepper-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: ``, isInline: true });
1942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialStepperComponent, decorators: [{
1943
+ type: Component,
1944
+ args: [{
1945
+ // tslint:disable-next-line:component-selector
1946
+ selector: 'material-stepper-widget',
1947
+ template: ``,
1948
+ }]
1949
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1950
+ type: Input
1951
+ }], layoutIndex: [{
1952
+ type: Input
1953
+ }], dataIndex: [{
1954
+ type: Input
1955
+ }] } });
1956
+
1957
+ class MaterialTabsComponent {
1958
+ constructor(jsf) {
1959
+ this.jsf = jsf;
1960
+ this.selectedItem = 0;
1961
+ this.showAddTab = true;
1962
+ }
1963
+ ngOnInit() {
1964
+ this.options = this.layoutNode.options || {};
1965
+ this.itemCount = this.layoutNode.items.length - 1;
1966
+ this.updateControl();
1967
+ }
1968
+ select(index) {
1969
+ if (this.layoutNode.items[index].type === '$ref') {
1970
+ this.jsf.addItem({
1971
+ layoutNode: this.layoutNode.items[index],
1972
+ layoutIndex: this.layoutIndex.concat(index),
1973
+ dataIndex: this.dataIndex.concat(index)
1974
+ });
1975
+ this.updateControl();
1976
+ }
1977
+ this.selectedItem = index;
1978
+ }
1979
+ updateControl() {
1980
+ this.itemCount = this.layoutNode.items.length - 1;
1981
+ const lastItem = this.layoutNode.items[this.layoutNode.items.length - 1];
1982
+ this.showAddTab = lastItem.type === '$ref' &&
1983
+ this.itemCount < (lastItem.options.maxItems || 1000);
1984
+ }
1985
+ setTabTitle(item, index) {
1986
+ return this.jsf.setArrayItemTitle(this, item, index);
1987
+ }
1988
+ }
1989
+ MaterialTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialTabsComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1990
+ MaterialTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialTabsComponent, selector: "material-tabs-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
1991
+ <nav mat-tab-nav-bar
1992
+ [attr.aria-label]="options?.label || options?.title || ''"
1993
+ [style.width]="'100%'">
1994
+ <a mat-tab-link *ngFor="let item of layoutNode?.items; let i = index"
1995
+ [active]="selectedItem === i"
1996
+ (click)="select(i)">
1997
+ <span *ngIf="showAddTab || item.type !== '$ref'"
1998
+ [innerHTML]="setTabTitle(item, i)"></span>
1999
+ </a>
2000
+ </nav>
2001
+ <div *ngFor="let layoutItem of layoutNode?.items; let i = index"
2002
+ [class]="options?.htmlClass || ''">
2003
+ <select-framework-widget *ngIf="selectedItem === i"
2004
+ [class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '') + ' ' + (options?.style?.selected || '')"
2005
+ [dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
2006
+ [layoutIndex]="(layoutIndex || []).concat(i)"
2007
+ [layoutNode]="layoutItem"></select-framework-widget>
2008
+ </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$4.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["color"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "directive", type: i3$4.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matTabLink"] }, { kind: "component", type: i1.SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] });
2009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialTabsComponent, decorators: [{
2010
+ type: Component,
2011
+ args: [{ selector: 'material-tabs-widget', template: `
2012
+ <nav mat-tab-nav-bar
2013
+ [attr.aria-label]="options?.label || options?.title || ''"
2014
+ [style.width]="'100%'">
2015
+ <a mat-tab-link *ngFor="let item of layoutNode?.items; let i = index"
2016
+ [active]="selectedItem === i"
2017
+ (click)="select(i)">
2018
+ <span *ngIf="showAddTab || item.type !== '$ref'"
2019
+ [innerHTML]="setTabTitle(item, i)"></span>
2020
+ </a>
2021
+ </nav>
2022
+ <div *ngFor="let layoutItem of layoutNode?.items; let i = index"
2023
+ [class]="options?.htmlClass || ''">
2024
+ <select-framework-widget *ngIf="selectedItem === i"
2025
+ [class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '') + ' ' + (options?.style?.selected || '')"
2026
+ [dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
2027
+ [layoutIndex]="(layoutIndex || []).concat(i)"
2028
+ [layoutNode]="layoutItem"></select-framework-widget>
2029
+ </div>`, styles: ["a{cursor:pointer}\n"] }]
2030
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
2031
+ type: Input
2032
+ }], layoutIndex: [{
2033
+ type: Input
2034
+ }], dataIndex: [{
2035
+ type: Input
2036
+ }] } });
2037
+
2038
+ class MaterialTextareaComponent {
2039
+ constructor(matFormFieldDefaultOptions, jsf) {
2040
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
2041
+ this.jsf = jsf;
2042
+ this.controlDisabled = false;
2043
+ this.boundControl = false;
2044
+ }
2045
+ ngOnInit() {
2046
+ this.options = this.layoutNode.options || {};
2047
+ this.jsf.initializeControl(this);
2048
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
2049
+ this.options.description = this.options.placeholder;
2050
+ }
2051
+ }
2052
+ updateValue(event) {
2053
+ this.jsf.updateValue(this, event.target.value);
2054
+ }
2055
+ }
2056
+ MaterialTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialTextareaComponent, deps: [{ token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
2057
+ MaterialTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: MaterialTextareaComponent, selector: "material-textarea-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
2058
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
2059
+ [class]="options?.htmlClass || ''"
2060
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
2061
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
2062
+ [style.width]="'100%'">
2063
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
2064
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
2065
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
2066
+ <textarea matInput *ngIf="boundControl"
2067
+ [formControl]="formControl"
2068
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2069
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2070
+ [attr.maxlength]="options?.maxLength"
2071
+ [attr.minlength]="options?.minLength"
2072
+ [attr.pattern]="options?.pattern"
2073
+ [required]="options?.required"
2074
+ [id]="'control' + layoutNode?._id"
2075
+ [name]="controlName"
2076
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2077
+ [readonly]="options?.readonly ? 'readonly' : null"
2078
+ [style.width]="'100%'"
2079
+ (blur)="options.showErrors = true"></textarea>
2080
+ <textarea matInput *ngIf="!boundControl"
2081
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2082
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2083
+ [attr.maxlength]="options?.maxLength"
2084
+ [attr.minlength]="options?.minLength"
2085
+ [attr.pattern]="options?.pattern"
2086
+ [required]="options?.required"
2087
+ [disabled]="controlDisabled"
2088
+ [id]="'control' + layoutNode?._id"
2089
+ [name]="controlName"
2090
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2091
+ [readonly]="options?.readonly ? 'readonly' : null"
2092
+ [style.width]="'100%'"
2093
+ [value]="controlValue"
2094
+ (input)="updateValue($event)"
2095
+ (blur)="options.showErrors = true"></textarea>
2096
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
2097
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
2098
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
2099
+ align="end" [innerHTML]="options?.description"></mat-hint>
2100
+ </mat-form-field>
2101
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
2102
+ [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-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;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.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$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"], exportAs: ["matInput"] }] });
2103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialTextareaComponent, decorators: [{
2104
+ type: Component,
2105
+ args: [{ selector: 'material-textarea-widget', template: `
2106
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
2107
+ [class]="options?.htmlClass || ''"
2108
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
2109
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
2110
+ [style.width]="'100%'">
2111
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
2112
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
2113
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
2114
+ <textarea matInput *ngIf="boundControl"
2115
+ [formControl]="formControl"
2116
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2117
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2118
+ [attr.maxlength]="options?.maxLength"
2119
+ [attr.minlength]="options?.minLength"
2120
+ [attr.pattern]="options?.pattern"
2121
+ [required]="options?.required"
2122
+ [id]="'control' + layoutNode?._id"
2123
+ [name]="controlName"
2124
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2125
+ [readonly]="options?.readonly ? 'readonly' : null"
2126
+ [style.width]="'100%'"
2127
+ (blur)="options.showErrors = true"></textarea>
2128
+ <textarea matInput *ngIf="!boundControl"
2129
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2130
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2131
+ [attr.maxlength]="options?.maxLength"
2132
+ [attr.minlength]="options?.minLength"
2133
+ [attr.pattern]="options?.pattern"
2134
+ [required]="options?.required"
2135
+ [disabled]="controlDisabled"
2136
+ [id]="'control' + layoutNode?._id"
2137
+ [name]="controlName"
2138
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2139
+ [readonly]="options?.readonly ? 'readonly' : null"
2140
+ [style.width]="'100%'"
2141
+ [value]="controlValue"
2142
+ (input)="updateValue($event)"
2143
+ (blur)="options.showErrors = true"></textarea>
2144
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
2145
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
2146
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
2147
+ align="end" [innerHTML]="options?.description"></mat-hint>
2148
+ </mat-form-field>
2149
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
2150
+ [innerHTML]="options?.errorMessage"></mat-error>`, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:auto;width:initial}\n"] }]
2151
+ }], ctorParameters: function () {
2152
+ return [{ type: undefined, decorators: [{
2153
+ type: Inject,
2154
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
2155
+ }, {
2156
+ type: Optional
2157
+ }] }, { type: i1.JsonSchemaFormService }];
2158
+ }, propDecorators: { layoutNode: [{
2159
+ type: Input
2160
+ }], layoutIndex: [{
2161
+ type: Input
2162
+ }], dataIndex: [{
2163
+ type: Input
2164
+ }] } });
2165
+
2166
+ const MATERIAL_FRAMEWORK_COMPONENTS = [
2167
+ FlexLayoutRootComponent, FlexLayoutSectionComponent,
2168
+ MaterialAddReferenceComponent, MaterialOneOfComponent,
2169
+ MaterialButtonComponent, MaterialButtonGroupComponent,
2170
+ MaterialCheckboxComponent, MaterialCheckboxesComponent,
2171
+ MaterialChipListComponent, MaterialDatepickerComponent,
2172
+ MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent,
2173
+ MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent,
2174
+ MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent,
2175
+ MaterialDesignFrameworkComponent
2176
+ ];
2177
+
2178
+ // Material Design Framework
2179
+ // https://github.com/angular/material2
2180
+ class MaterialDesignFramework extends Framework {
2181
+ constructor() {
2182
+ super(...arguments);
2183
+ this.name = 'material-design';
2184
+ this.framework = MaterialDesignFrameworkComponent;
2185
+ this.stylesheets = [
2186
+ '//fonts.googleapis.com/icon?family=Material+Icons',
2187
+ '//fonts.googleapis.com/css?family=Roboto:300,400,500,700',
2188
+ ];
2189
+ this.widgets = {
2190
+ 'root': FlexLayoutRootComponent,
2191
+ 'section': FlexLayoutSectionComponent,
2192
+ '$ref': MaterialAddReferenceComponent,
2193
+ 'button': MaterialButtonComponent,
2194
+ 'button-group': MaterialButtonGroupComponent,
2195
+ 'checkbox': MaterialCheckboxComponent,
2196
+ 'checkboxes': MaterialCheckboxesComponent,
2197
+ 'chip-list': MaterialChipListComponent,
2198
+ 'date': MaterialDatepickerComponent,
2199
+ 'file': MaterialFileComponent,
2200
+ 'number': MaterialNumberComponent,
2201
+ 'one-of': MaterialOneOfComponent,
2202
+ 'radios': MaterialRadiosComponent,
2203
+ 'select': MaterialSelectComponent,
2204
+ 'slider': MaterialSliderComponent,
2205
+ 'stepper': MaterialStepperComponent,
2206
+ 'tabs': MaterialTabsComponent,
2207
+ 'text': MaterialInputComponent,
2208
+ 'textarea': MaterialTextareaComponent,
2209
+ 'alt-date': 'date',
2210
+ 'any-of': 'one-of',
2211
+ 'card': 'section',
2212
+ 'color': 'text',
2213
+ 'expansion-panel': 'section',
2214
+ 'hidden': 'none',
2215
+ 'image': 'none',
2216
+ 'integer': 'number',
2217
+ 'radiobuttons': 'button-group',
2218
+ 'range': 'slider',
2219
+ 'submit': 'button',
2220
+ 'tagsinput': 'chip-list',
2221
+ 'wizard': 'stepper',
2222
+ };
2223
+ }
2224
+ }
2225
+ MaterialDesignFramework.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFramework, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2226
+ MaterialDesignFramework.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFramework });
2227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFramework, decorators: [{
2228
+ type: Injectable
2229
+ }] });
2230
+
2231
+ function fixAngularFlex() {
2232
+ // monkey patch based on errors in console - https://github.com/angular/flex-layout/issues/1011
2233
+ const MediaMarshallerUpdateElement = MediaMarshaller.prototype.updateElement;
2234
+ MediaMarshaller.prototype.updateElement = function (element, key, value) {
2235
+ if (key === 'layout-gap' && (value === null || value === undefined)) {
2236
+ value = '0px';
2237
+ }
2238
+ MediaMarshallerUpdateElement.apply(this, [element, key, value]);
2239
+ };
2240
+ }
2241
+
2242
+ /**
2243
+ * unused @angular/material modules:
2244
+ * MatDialogModule, MatGridListModule, MatListModule, MatMenuModule,
2245
+ * MatPaginatorModule, MatProgressBarModule, MatProgressSpinnerModule,
2246
+ * MatSidenavModule, MatSnackBarModule, MatSortModule, MatTableModule,
2247
+ * ,
2248
+ */
2249
+ const ANGULAR_MATERIAL_MODULES = [
2250
+ MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatCardModule,
2251
+ MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule,
2252
+ MatFormFieldModule, MatIconModule, MatInputModule, MatNativeDateModule,
2253
+ MatRadioModule, MatSelectModule, MatSliderModule, MatSlideToggleModule,
2254
+ MatStepperModule, MatTabsModule, MatTooltipModule,
2255
+ MatToolbarModule, MatMenuModule, MatToolbarModule,
2256
+ ];
2257
+ class MaterialDesignFrameworkModule {
2258
+ constructor() {
2259
+ fixAngularFlex();
2260
+ }
2261
+ }
2262
+ MaterialDesignFrameworkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2263
+ MaterialDesignFrameworkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkModule, declarations: [FlexLayoutRootComponent, FlexLayoutSectionComponent, MaterialAddReferenceComponent, MaterialOneOfComponent, MaterialButtonComponent, MaterialButtonGroupComponent, MaterialCheckboxComponent, MaterialCheckboxesComponent, MaterialChipListComponent, MaterialDatepickerComponent, MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent, MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent, MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent, MaterialDesignFrameworkComponent], imports: [CommonModule,
2264
+ FormsModule,
2265
+ ReactiveFormsModule,
2266
+ FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatCardModule,
2267
+ MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule,
2268
+ MatFormFieldModule, MatIconModule, MatInputModule, MatNativeDateModule,
2269
+ MatRadioModule, MatSelectModule, MatSliderModule, MatSlideToggleModule,
2270
+ MatStepperModule, MatTabsModule, MatTooltipModule,
2271
+ MatToolbarModule, MatMenuModule, MatToolbarModule, WidgetLibraryModule,
2272
+ JsonSchemaFormModule], exports: [JsonSchemaFormModule, FlexLayoutRootComponent, FlexLayoutSectionComponent, MaterialAddReferenceComponent, MaterialOneOfComponent, MaterialButtonComponent, MaterialButtonGroupComponent, MaterialCheckboxComponent, MaterialCheckboxesComponent, MaterialChipListComponent, MaterialDatepickerComponent, MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent, MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent, MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent, MaterialDesignFrameworkComponent] });
2273
+ MaterialDesignFrameworkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkModule, providers: [
2274
+ JsonSchemaFormService,
2275
+ FrameworkLibraryService,
2276
+ WidgetLibraryService,
2277
+ { provide: Framework, useClass: MaterialDesignFramework, multi: true },
2278
+ ], imports: [CommonModule,
2279
+ FormsModule,
2280
+ ReactiveFormsModule,
2281
+ FlexLayoutModule, ANGULAR_MATERIAL_MODULES, WidgetLibraryModule,
2282
+ JsonSchemaFormModule, JsonSchemaFormModule] });
2283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: MaterialDesignFrameworkModule, decorators: [{
2284
+ type: NgModule,
2285
+ args: [{
2286
+ imports: [
2287
+ CommonModule,
2288
+ FormsModule,
2289
+ ReactiveFormsModule,
2290
+ FlexLayoutModule,
2291
+ ...ANGULAR_MATERIAL_MODULES,
2292
+ WidgetLibraryModule,
2293
+ JsonSchemaFormModule,
2294
+ ],
2295
+ declarations: [
2296
+ ...MATERIAL_FRAMEWORK_COMPONENTS,
2297
+ ],
2298
+ exports: [
2299
+ JsonSchemaFormModule,
2300
+ ...MATERIAL_FRAMEWORK_COMPONENTS,
2301
+ ],
2302
+ providers: [
2303
+ JsonSchemaFormService,
2304
+ FrameworkLibraryService,
2305
+ WidgetLibraryService,
2306
+ { provide: Framework, useClass: MaterialDesignFramework, multi: true },
2307
+ ]
2308
+ }]
2309
+ }], ctorParameters: function () { return []; } });
2310
+
2311
+ /*
2312
+ * Public API Surface of @ajsf/material-framework
2313
+ */
2314
+
2315
+ /**
2316
+ * Generated bundle index. Do not edit.
2317
+ */
2318
+
2319
+ export { ANGULAR_MATERIAL_MODULES, FlexLayoutRootComponent, FlexLayoutSectionComponent, MATERIAL_FRAMEWORK_COMPONENTS, MaterialAddReferenceComponent, MaterialButtonComponent, MaterialButtonGroupComponent, MaterialCheckboxComponent, MaterialCheckboxesComponent, MaterialChipListComponent, MaterialDatepickerComponent, MaterialDesignFramework, MaterialDesignFrameworkComponent, MaterialDesignFrameworkModule, MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent, MaterialOneOfComponent, MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent, MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent };
2320
+ //# sourceMappingURL=ajsf-material.mjs.map