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