@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,2427 @@
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 () {
1154
+ return [{ type: undefined, decorators: [{
1155
+ type: Inject,
1156
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1157
+ }, {
1158
+ type: Optional
1159
+ }] }, { type: i1.JsonSchemaFormService }];
1160
+ }, propDecorators: { layoutNode: [{
1161
+ type: Input
1162
+ }], layoutIndex: [{
1163
+ type: Input
1164
+ }], dataIndex: [{
1165
+ type: Input
1166
+ }] } });
1167
+
1168
+ class MaterialDesignFrameworkComponent {
1169
+ constructor(changeDetector, jsf) {
1170
+ this.changeDetector = changeDetector;
1171
+ this.jsf = jsf;
1172
+ this.frameworkInitialized = false;
1173
+ this.formControl = null;
1174
+ this.parentArray = null;
1175
+ this.isOrderable = false;
1176
+ this.dynamicTitle = null;
1177
+ }
1178
+ get showRemoveButton() {
1179
+ if (!this.layoutNode || !this.widgetOptions.removable ||
1180
+ this.widgetOptions.readonly || this.layoutNode.type === '$ref') {
1181
+ return false;
1182
+ }
1183
+ if (this.layoutNode.recursiveReference) {
1184
+ return true;
1185
+ }
1186
+ if (!this.layoutNode.arrayItem || !this.parentArray) {
1187
+ return false;
1188
+ }
1189
+ // If array length <= minItems, don't allow removing any items
1190
+ return this.parentArray.items.length - 1 <= this.parentArray.options.minItems ? false :
1191
+ // For removable list items, allow removing any item
1192
+ this.layoutNode.arrayItemType === 'list' ? true :
1193
+ // For removable tuple items, only allow removing last item in list
1194
+ this.layoutIndex[this.layoutIndex.length - 1] === this.parentArray.items.length - 2;
1195
+ }
1196
+ ngOnInit() {
1197
+ this.initializeFramework();
1198
+ }
1199
+ ngOnChanges() {
1200
+ if (!this.frameworkInitialized) {
1201
+ this.initializeFramework();
1202
+ }
1203
+ if (this.dynamicTitle) {
1204
+ this.updateTitle();
1205
+ }
1206
+ }
1207
+ initializeFramework() {
1208
+ if (this.layoutNode) {
1209
+ this.options = cloneDeep(this.layoutNode.options || {});
1210
+ this.widgetLayoutNode = Object.assign(Object.assign({}, this.layoutNode), { options: cloneDeep(this.layoutNode.options || {}) });
1211
+ this.widgetOptions = this.widgetLayoutNode.options;
1212
+ this.formControl = this.jsf.getFormControl(this);
1213
+ if (isDefined(this.widgetOptions.minimum) &&
1214
+ isDefined(this.widgetOptions.maximum) &&
1215
+ this.widgetOptions.multipleOf >= 1) {
1216
+ this.layoutNode.type = 'range';
1217
+ }
1218
+ if (!['$ref', 'advancedfieldset', 'authfieldset', 'button', 'card',
1219
+ 'checkbox', 'expansion-panel', 'help', 'message', 'msg', 'section',
1220
+ 'submit', 'tabarray', 'tabs'].includes(this.layoutNode.type) &&
1221
+ /{{.+?}}/.test(this.widgetOptions.title || '')) {
1222
+ this.dynamicTitle = this.widgetOptions.title;
1223
+ this.updateTitle();
1224
+ }
1225
+ if (this.layoutNode.arrayItem && this.layoutNode.type !== '$ref') {
1226
+ this.parentArray = this.jsf.getParentNode(this);
1227
+ if (this.parentArray) {
1228
+ this.isOrderable =
1229
+ this.parentArray.type.slice(0, 3) !== 'tab' &&
1230
+ this.layoutNode.arrayItemType === 'list' &&
1231
+ !this.widgetOptions.readonly &&
1232
+ this.parentArray.options.orderable;
1233
+ }
1234
+ }
1235
+ this.frameworkInitialized = true;
1236
+ }
1237
+ else {
1238
+ this.options = {};
1239
+ }
1240
+ }
1241
+ updateTitle() {
1242
+ this.widgetLayoutNode.options.title = this.jsf.parseText(this.dynamicTitle, this.jsf.getFormControlValue(this), this.jsf.getFormControlGroup(this).value, this.dataIndex[this.dataIndex.length - 1]);
1243
+ }
1244
+ removeItem() {
1245
+ this.jsf.removeItem(this);
1246
+ }
1247
+ }
1248
+ 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 });
1249
+ 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"] }] });
1250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFrameworkComponent, decorators: [{
1251
+ type: Component,
1252
+ 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"] }]
1253
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1254
+ type: Input
1255
+ }], layoutIndex: [{
1256
+ type: Input
1257
+ }], dataIndex: [{
1258
+ type: Input
1259
+ }] } });
1260
+
1261
+ // TODO: Add this control
1262
+ class MaterialFileComponent {
1263
+ constructor(jsf) {
1264
+ this.jsf = jsf;
1265
+ this.controlDisabled = false;
1266
+ this.boundControl = false;
1267
+ }
1268
+ ngOnInit() {
1269
+ this.options = this.layoutNode.options || {};
1270
+ this.jsf.initializeControl(this);
1271
+ }
1272
+ updateValue(event) {
1273
+ this.jsf.updateValue(this, event.target.value);
1274
+ }
1275
+ }
1276
+ MaterialFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialFileComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1277
+ 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 });
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialFileComponent, decorators: [{
1279
+ type: Component,
1280
+ args: [{
1281
+ // tslint:disable-next-line:component-selector
1282
+ selector: 'material-file-widget',
1283
+ template: ``,
1284
+ }]
1285
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1286
+ type: Input
1287
+ }], layoutIndex: [{
1288
+ type: Input
1289
+ }], dataIndex: [{
1290
+ type: Input
1291
+ }] } });
1292
+
1293
+ class MaterialInputComponent {
1294
+ constructor(matFormFieldDefaultOptions, jsf) {
1295
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1296
+ this.jsf = jsf;
1297
+ this.controlDisabled = false;
1298
+ this.boundControl = false;
1299
+ this.autoCompleteList = [];
1300
+ }
1301
+ ngOnInit() {
1302
+ this.options = this.layoutNode.options || {};
1303
+ this.jsf.initializeControl(this);
1304
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1305
+ this.options.description = this.options.placeholder;
1306
+ }
1307
+ }
1308
+ updateValue(event) {
1309
+ this.jsf.updateValue(this, event.target.value);
1310
+ }
1311
+ }
1312
+ 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 });
1313
+ 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: `
1314
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1315
+ [class]="options?.htmlClass || ''"
1316
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1317
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1318
+ [style.width]="'100%'">
1319
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1320
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1321
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1322
+ <input matInput *ngIf="boundControl"
1323
+ [formControl]="formControl"
1324
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1325
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1326
+ [attr.maxlength]="options?.maxLength"
1327
+ [attr.minlength]="options?.minLength"
1328
+ [attr.pattern]="options?.pattern"
1329
+ [readonly]="options?.readonly ? 'readonly' : null"
1330
+ [id]="'control' + layoutNode?._id"
1331
+ [name]="controlName"
1332
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1333
+ [required]="options?.required"
1334
+ [style.width]="'100%'"
1335
+ [type]="layoutNode?.type"
1336
+ (blur)="options.showErrors = true">
1337
+ <input matInput *ngIf="!boundControl"
1338
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1339
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1340
+ [attr.maxlength]="options?.maxLength"
1341
+ [attr.minlength]="options?.minLength"
1342
+ [attr.pattern]="options?.pattern"
1343
+ [disabled]="controlDisabled"
1344
+ [id]="'control' + layoutNode?._id"
1345
+ [name]="controlName"
1346
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1347
+ [readonly]="options?.readonly ? 'readonly' : null"
1348
+ [required]="options?.required"
1349
+ [style.width]="'100%'"
1350
+ [type]="layoutNode?.type"
1351
+ [value]="controlValue"
1352
+ (input)="updateValue($event)"
1353
+ (blur)="options.showErrors = true">
1354
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1355
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1356
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1357
+ align="end" [innerHTML]="options?.description"></mat-hint>
1358
+ <mat-autocomplete *ngIf="options?.typeahead?.source">
1359
+ <mat-option *ngFor="let word of options?.typeahead?.source"
1360
+ [value]="word">{{word}}</mat-option>
1361
+ </mat-autocomplete>
1362
+ </mat-form-field>
1363
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1364
+ [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"] }] });
1365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialInputComponent, decorators: [{
1366
+ type: Component,
1367
+ args: [{
1368
+ // tslint:disable-next-line:component-selector
1369
+ selector: 'material-input-widget',
1370
+ template: `
1371
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1372
+ [class]="options?.htmlClass || ''"
1373
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1374
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1375
+ [style.width]="'100%'">
1376
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1377
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1378
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1379
+ <input matInput *ngIf="boundControl"
1380
+ [formControl]="formControl"
1381
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1382
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1383
+ [attr.maxlength]="options?.maxLength"
1384
+ [attr.minlength]="options?.minLength"
1385
+ [attr.pattern]="options?.pattern"
1386
+ [readonly]="options?.readonly ? 'readonly' : null"
1387
+ [id]="'control' + layoutNode?._id"
1388
+ [name]="controlName"
1389
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1390
+ [required]="options?.required"
1391
+ [style.width]="'100%'"
1392
+ [type]="layoutNode?.type"
1393
+ (blur)="options.showErrors = true">
1394
+ <input matInput *ngIf="!boundControl"
1395
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1396
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1397
+ [attr.maxlength]="options?.maxLength"
1398
+ [attr.minlength]="options?.minLength"
1399
+ [attr.pattern]="options?.pattern"
1400
+ [disabled]="controlDisabled"
1401
+ [id]="'control' + layoutNode?._id"
1402
+ [name]="controlName"
1403
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1404
+ [readonly]="options?.readonly ? 'readonly' : null"
1405
+ [required]="options?.required"
1406
+ [style.width]="'100%'"
1407
+ [type]="layoutNode?.type"
1408
+ [value]="controlValue"
1409
+ (input)="updateValue($event)"
1410
+ (blur)="options.showErrors = true">
1411
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1412
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1413
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1414
+ align="end" [innerHTML]="options?.description"></mat-hint>
1415
+ <mat-autocomplete *ngIf="options?.typeahead?.source">
1416
+ <mat-option *ngFor="let word of options?.typeahead?.source"
1417
+ [value]="word">{{word}}</mat-option>
1418
+ </mat-autocomplete>
1419
+ </mat-form-field>
1420
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1421
+ [innerHTML]="options?.errorMessage"></mat-error>`,
1422
+ styles: [`
1423
+ mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }
1424
+ ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex
1425
+ .mat-form-field-infix { width: initial; }
1426
+ `],
1427
+ }]
1428
+ }], ctorParameters: function () {
1429
+ return [{ type: undefined, decorators: [{
1430
+ type: Inject,
1431
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1432
+ }, {
1433
+ type: Optional
1434
+ }] }, { type: i1.JsonSchemaFormService }];
1435
+ }, propDecorators: { layoutNode: [{
1436
+ type: Input
1437
+ }], layoutIndex: [{
1438
+ type: Input
1439
+ }], dataIndex: [{
1440
+ type: Input
1441
+ }] } });
1442
+
1443
+ class MaterialNumberComponent {
1444
+ constructor(matFormFieldDefaultOptions, jsf) {
1445
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1446
+ this.jsf = jsf;
1447
+ this.controlDisabled = false;
1448
+ this.boundControl = false;
1449
+ this.allowNegative = true;
1450
+ this.allowDecimal = true;
1451
+ this.allowExponents = false;
1452
+ this.lastValidNumber = '';
1453
+ }
1454
+ ngOnInit() {
1455
+ this.options = this.layoutNode.options || {};
1456
+ this.jsf.initializeControl(this);
1457
+ if (this.layoutNode.dataType === 'integer') {
1458
+ this.allowDecimal = false;
1459
+ }
1460
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1461
+ this.options.description = this.options.placeholder;
1462
+ }
1463
+ }
1464
+ updateValue(event) {
1465
+ this.jsf.updateValue(this, event.target.value);
1466
+ }
1467
+ }
1468
+ 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 });
1469
+ 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: `
1470
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1471
+ [class]="options?.htmlClass || ''"
1472
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1473
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1474
+ [style.width]="'100%'">
1475
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1476
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1477
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1478
+ <input matInput *ngIf="boundControl"
1479
+ [formControl]="formControl"
1480
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1481
+ [attr.max]="options?.maximum"
1482
+ [attr.min]="options?.minimum"
1483
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1484
+ [id]="'control' + layoutNode?._id"
1485
+ [name]="controlName"
1486
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1487
+ [readonly]="options?.readonly ? 'readonly' : null"
1488
+ [required]="options?.required"
1489
+ [style.width]="'100%'"
1490
+ [type]="'number'"
1491
+ (blur)="options.showErrors = true">
1492
+ <input matInput *ngIf="!boundControl"
1493
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1494
+ [attr.max]="options?.maximum"
1495
+ [attr.min]="options?.minimum"
1496
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1497
+ [disabled]="controlDisabled"
1498
+ [id]="'control' + layoutNode?._id"
1499
+ [name]="controlName"
1500
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1501
+ [readonly]="options?.readonly ? 'readonly' : null"
1502
+ [required]="options?.required"
1503
+ [style.width]="'100%'"
1504
+ [type]="'number'"
1505
+ [value]="controlValue"
1506
+ (input)="updateValue($event)"
1507
+ (blur)="options.showErrors = true">
1508
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1509
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1510
+ <mat-hint *ngIf="layoutNode?.type === 'range'" align="start"
1511
+ [innerHTML]="controlValue"></mat-hint>
1512
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1513
+ align="end" [innerHTML]="options?.description"></mat-hint>
1514
+ </mat-form-field>
1515
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1516
+ [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"] }] });
1517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialNumberComponent, decorators: [{
1518
+ type: Component,
1519
+ args: [{
1520
+ // tslint:disable-next-line:component-selector
1521
+ selector: 'material-number-widget',
1522
+ template: `
1523
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1524
+ [class]="options?.htmlClass || ''"
1525
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1526
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1527
+ [style.width]="'100%'">
1528
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1529
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1530
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1531
+ <input matInput *ngIf="boundControl"
1532
+ [formControl]="formControl"
1533
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1534
+ [attr.max]="options?.maximum"
1535
+ [attr.min]="options?.minimum"
1536
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1537
+ [id]="'control' + layoutNode?._id"
1538
+ [name]="controlName"
1539
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1540
+ [readonly]="options?.readonly ? 'readonly' : null"
1541
+ [required]="options?.required"
1542
+ [style.width]="'100%'"
1543
+ [type]="'number'"
1544
+ (blur)="options.showErrors = true">
1545
+ <input matInput *ngIf="!boundControl"
1546
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1547
+ [attr.max]="options?.maximum"
1548
+ [attr.min]="options?.minimum"
1549
+ [attr.step]="options?.multipleOf || options?.step || 'any'"
1550
+ [disabled]="controlDisabled"
1551
+ [id]="'control' + layoutNode?._id"
1552
+ [name]="controlName"
1553
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1554
+ [readonly]="options?.readonly ? 'readonly' : null"
1555
+ [required]="options?.required"
1556
+ [style.width]="'100%'"
1557
+ [type]="'number'"
1558
+ [value]="controlValue"
1559
+ (input)="updateValue($event)"
1560
+ (blur)="options.showErrors = true">
1561
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1562
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1563
+ <mat-hint *ngIf="layoutNode?.type === 'range'" align="start"
1564
+ [innerHTML]="controlValue"></mat-hint>
1565
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1566
+ align="end" [innerHTML]="options?.description"></mat-hint>
1567
+ </mat-form-field>
1568
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1569
+ [innerHTML]="options?.errorMessage"></mat-error>`,
1570
+ styles: [`
1571
+ mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }
1572
+ ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex
1573
+ .mat-form-field-infix { width: initial; }
1574
+ `],
1575
+ }]
1576
+ }], ctorParameters: function () {
1577
+ return [{ type: undefined, decorators: [{
1578
+ type: Inject,
1579
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1580
+ }, {
1581
+ type: Optional
1582
+ }] }, { type: i1.JsonSchemaFormService }];
1583
+ }, propDecorators: { layoutNode: [{
1584
+ type: Input
1585
+ }], layoutIndex: [{
1586
+ type: Input
1587
+ }], dataIndex: [{
1588
+ type: Input
1589
+ }] } });
1590
+
1591
+ // TODO: Add this control
1592
+ class MaterialOneOfComponent {
1593
+ constructor(jsf) {
1594
+ this.jsf = jsf;
1595
+ this.controlDisabled = false;
1596
+ this.boundControl = false;
1597
+ }
1598
+ ngOnInit() {
1599
+ this.options = this.layoutNode.options || {};
1600
+ this.jsf.initializeControl(this);
1601
+ }
1602
+ updateValue(event) {
1603
+ this.jsf.updateValue(this, event.target.value);
1604
+ }
1605
+ }
1606
+ MaterialOneOfComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialOneOfComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1607
+ 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 });
1608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialOneOfComponent, decorators: [{
1609
+ type: Component,
1610
+ args: [{
1611
+ // tslint:disable-next-line:component-selector
1612
+ selector: 'material-one-of-widget',
1613
+ template: ``,
1614
+ }]
1615
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1616
+ type: Input
1617
+ }], layoutIndex: [{
1618
+ type: Input
1619
+ }], dataIndex: [{
1620
+ type: Input
1621
+ }] } });
1622
+
1623
+ class MaterialRadiosComponent {
1624
+ constructor(jsf) {
1625
+ this.jsf = jsf;
1626
+ this.controlDisabled = false;
1627
+ this.boundControl = false;
1628
+ this.flexDirection = 'column';
1629
+ this.radiosList = [];
1630
+ }
1631
+ ngOnInit() {
1632
+ this.options = this.layoutNode.options || {};
1633
+ if (this.layoutNode.type === 'radios-inline') {
1634
+ this.flexDirection = 'row';
1635
+ }
1636
+ this.radiosList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, true);
1637
+ this.jsf.initializeControl(this, !this.options.readonly);
1638
+ }
1639
+ updateValue(value) {
1640
+ this.options.showErrors = true;
1641
+ this.jsf.updateValue(this, value);
1642
+ }
1643
+ }
1644
+ MaterialRadiosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialRadiosComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1645
+ 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: `
1646
+ <div>
1647
+ <div *ngIf="options?.title">
1648
+ <label
1649
+ [attr.for]="'control' + layoutNode?._id"
1650
+ [class]="options?.labelHtmlClass || ''"
1651
+ [style.display]="options?.notitle ? 'none' : ''"
1652
+ [innerHTML]="options?.title"></label>
1653
+ </div>
1654
+ <mat-radio-group *ngIf="boundControl"
1655
+ [formControl]="formControl"
1656
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1657
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1658
+ [attr.required]="options?.required"
1659
+ [style.flex-direction]="flexDirection"
1660
+ [name]="controlName"
1661
+ (blur)="options.showErrors = true">
1662
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1663
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1664
+ [value]="radioItem?.value">
1665
+ <span [innerHTML]="radioItem?.name"></span>
1666
+ </mat-radio-button>
1667
+ </mat-radio-group>
1668
+ <mat-radio-group *ngIf="!boundControl"
1669
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1670
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1671
+ [attr.required]="options?.required"
1672
+ [style.flex-direction]="flexDirection"
1673
+ [disabled]="controlDisabled || options?.readonly"
1674
+ [name]="controlName"
1675
+ [value]="controlValue">
1676
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1677
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1678
+ [value]="radioItem?.value"
1679
+ (click)="updateValue(radioItem?.value)">
1680
+ <span [innerHTML]="radioItem?.name"></span>
1681
+ </mat-radio-button>
1682
+ </mat-radio-group>
1683
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1684
+ [innerHTML]="options?.errorMessage"></mat-error>
1685
+ </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"] }] });
1686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialRadiosComponent, decorators: [{
1687
+ type: Component,
1688
+ args: [{
1689
+ // tslint:disable-next-line:component-selector
1690
+ selector: 'material-radios-widget',
1691
+ template: `
1692
+ <div>
1693
+ <div *ngIf="options?.title">
1694
+ <label
1695
+ [attr.for]="'control' + layoutNode?._id"
1696
+ [class]="options?.labelHtmlClass || ''"
1697
+ [style.display]="options?.notitle ? 'none' : ''"
1698
+ [innerHTML]="options?.title"></label>
1699
+ </div>
1700
+ <mat-radio-group *ngIf="boundControl"
1701
+ [formControl]="formControl"
1702
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1703
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1704
+ [attr.required]="options?.required"
1705
+ [style.flex-direction]="flexDirection"
1706
+ [name]="controlName"
1707
+ (blur)="options.showErrors = true">
1708
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1709
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1710
+ [value]="radioItem?.value">
1711
+ <span [innerHTML]="radioItem?.name"></span>
1712
+ </mat-radio-button>
1713
+ </mat-radio-group>
1714
+ <mat-radio-group *ngIf="!boundControl"
1715
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1716
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
1717
+ [attr.required]="options?.required"
1718
+ [style.flex-direction]="flexDirection"
1719
+ [disabled]="controlDisabled || options?.readonly"
1720
+ [name]="controlName"
1721
+ [value]="controlValue">
1722
+ <mat-radio-button *ngFor="let radioItem of radiosList"
1723
+ [id]="'control' + layoutNode?._id + '/' + radioItem?.name"
1724
+ [value]="radioItem?.value"
1725
+ (click)="updateValue(radioItem?.value)">
1726
+ <span [innerHTML]="radioItem?.name"></span>
1727
+ </mat-radio-button>
1728
+ </mat-radio-group>
1729
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1730
+ [innerHTML]="options?.errorMessage"></mat-error>
1731
+ </div>`,
1732
+ styles: [`
1733
+ mat-radio-group { display: inline-flex; }
1734
+ mat-radio-button { margin: 2px; }
1735
+ mat-error { font-size: 75%; }
1736
+ `]
1737
+ }]
1738
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
1739
+ type: Input
1740
+ }], layoutIndex: [{
1741
+ type: Input
1742
+ }], dataIndex: [{
1743
+ type: Input
1744
+ }] } });
1745
+
1746
+ class MaterialSelectComponent {
1747
+ constructor(matFormFieldDefaultOptions, jsf) {
1748
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1749
+ this.jsf = jsf;
1750
+ this.controlDisabled = false;
1751
+ this.boundControl = false;
1752
+ this.selectList = [];
1753
+ this.isArray = isArray;
1754
+ }
1755
+ ngOnInit() {
1756
+ this.options = this.layoutNode.options || {};
1757
+ this.selectList = buildTitleMap(this.options.titleMap || this.options.enumNames, this.options.enum, !!this.options.required, !!this.options.flatList);
1758
+ this.jsf.initializeControl(this, !this.options.readonly);
1759
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
1760
+ this.options.description = this.options.placeholder;
1761
+ }
1762
+ }
1763
+ updateValue(event) {
1764
+ this.options.showErrors = true;
1765
+ this.jsf.updateValue(this, event.value);
1766
+ }
1767
+ }
1768
+ 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 });
1769
+ 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: `
1770
+ <mat-form-field
1771
+ [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1772
+ [class]="options?.htmlClass || ''"
1773
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1774
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1775
+ [style.width]="'100%'">
1776
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1777
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1778
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1779
+ <mat-select *ngIf="boundControl"
1780
+ [formControl]="formControl"
1781
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1782
+ [attr.name]="controlName"
1783
+ [id]="'control' + layoutNode?._id"
1784
+ [multiple]="options?.multiple"
1785
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1786
+ [required]="options?.required"
1787
+ [style.width]="'100%'"
1788
+ (blur)="options.showErrors = true">
1789
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1790
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1791
+ [value]="selectItem?.value">
1792
+ <span [innerHTML]="selectItem?.name"></span>
1793
+ </mat-option>
1794
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1795
+ [label]="selectItem?.group">
1796
+ <mat-option *ngFor="let subItem of selectItem.items"
1797
+ [value]="subItem?.value">
1798
+ <span [innerHTML]="subItem?.name"></span>
1799
+ </mat-option>
1800
+ </mat-optgroup>
1801
+ </ng-template>
1802
+ </mat-select>
1803
+ <mat-select *ngIf="!boundControl"
1804
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1805
+ [attr.name]="controlName"
1806
+ [disabled]="controlDisabled || options?.readonly"
1807
+ [id]="'control' + layoutNode?._id"
1808
+ [multiple]="options?.multiple"
1809
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1810
+ [required]="options?.required"
1811
+ [style.width]="'100%'"
1812
+ [value]="controlValue"
1813
+ (blur)="options.showErrors = true"
1814
+ (change)="updateValue($event)">
1815
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1816
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1817
+ [attr.selected]="selectItem?.value === controlValue"
1818
+ [value]="selectItem?.value">
1819
+ <span [innerHTML]="selectItem?.name"></span>
1820
+ </mat-option>
1821
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1822
+ [label]="selectItem?.group">
1823
+ <mat-option *ngFor="let subItem of selectItem.items"
1824
+ [attr.selected]="subItem?.value === controlValue"
1825
+ [value]="subItem?.value">
1826
+ <span [innerHTML]="subItem?.name"></span>
1827
+ </mat-option>
1828
+ </mat-optgroup>
1829
+ </ng-template>
1830
+ </mat-select>
1831
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1832
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1833
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1834
+ align="end" [innerHTML]="options?.description"></mat-hint>
1835
+ </mat-form-field>
1836
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1837
+ [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"] }] });
1838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialSelectComponent, decorators: [{
1839
+ type: Component,
1840
+ args: [{
1841
+ // tslint:disable-next-line:component-selector
1842
+ selector: 'material-select-widget',
1843
+ template: `
1844
+ <mat-form-field
1845
+ [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1846
+ [class]="options?.htmlClass || ''"
1847
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1848
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1849
+ [style.width]="'100%'">
1850
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
1851
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
1852
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
1853
+ <mat-select *ngIf="boundControl"
1854
+ [formControl]="formControl"
1855
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1856
+ [attr.name]="controlName"
1857
+ [id]="'control' + layoutNode?._id"
1858
+ [multiple]="options?.multiple"
1859
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1860
+ [required]="options?.required"
1861
+ [style.width]="'100%'"
1862
+ (blur)="options.showErrors = true">
1863
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1864
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1865
+ [value]="selectItem?.value">
1866
+ <span [innerHTML]="selectItem?.name"></span>
1867
+ </mat-option>
1868
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1869
+ [label]="selectItem?.group">
1870
+ <mat-option *ngFor="let subItem of selectItem.items"
1871
+ [value]="subItem?.value">
1872
+ <span [innerHTML]="subItem?.name"></span>
1873
+ </mat-option>
1874
+ </mat-optgroup>
1875
+ </ng-template>
1876
+ </mat-select>
1877
+ <mat-select *ngIf="!boundControl"
1878
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1879
+ [attr.name]="controlName"
1880
+ [disabled]="controlDisabled || options?.readonly"
1881
+ [id]="'control' + layoutNode?._id"
1882
+ [multiple]="options?.multiple"
1883
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1884
+ [required]="options?.required"
1885
+ [style.width]="'100%'"
1886
+ [value]="controlValue"
1887
+ (blur)="options.showErrors = true"
1888
+ (change)="updateValue($event)">
1889
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
1890
+ <mat-option *ngIf="!isArray(selectItem?.items)"
1891
+ [attr.selected]="selectItem?.value === controlValue"
1892
+ [value]="selectItem?.value">
1893
+ <span [innerHTML]="selectItem?.name"></span>
1894
+ </mat-option>
1895
+ <mat-optgroup *ngIf="isArray(selectItem?.items)"
1896
+ [label]="selectItem?.group">
1897
+ <mat-option *ngFor="let subItem of selectItem.items"
1898
+ [attr.selected]="subItem?.value === controlValue"
1899
+ [value]="subItem?.value">
1900
+ <span [innerHTML]="subItem?.name"></span>
1901
+ </mat-option>
1902
+ </mat-optgroup>
1903
+ </ng-template>
1904
+ </mat-select>
1905
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1906
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1907
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
1908
+ align="end" [innerHTML]="options?.description"></mat-hint>
1909
+ </mat-form-field>
1910
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1911
+ [innerHTML]="options?.errorMessage"></mat-error>`,
1912
+ styles: [`
1913
+ mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }
1914
+ ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex
1915
+ .mat-form-field-infix { width: initial; }
1916
+ `],
1917
+ }]
1918
+ }], ctorParameters: function () {
1919
+ return [{ type: undefined, decorators: [{
1920
+ type: Inject,
1921
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1922
+ }, {
1923
+ type: Optional
1924
+ }] }, { type: i1.JsonSchemaFormService }];
1925
+ }, propDecorators: { layoutNode: [{
1926
+ type: Input
1927
+ }], layoutIndex: [{
1928
+ type: Input
1929
+ }], dataIndex: [{
1930
+ type: Input
1931
+ }] } });
1932
+
1933
+ class MaterialSliderComponent {
1934
+ constructor(jsf) {
1935
+ this.jsf = jsf;
1936
+ this.controlDisabled = false;
1937
+ this.boundControl = false;
1938
+ this.allowNegative = true;
1939
+ this.allowDecimal = true;
1940
+ this.allowExponents = false;
1941
+ this.lastValidNumber = '';
1942
+ }
1943
+ ngOnInit() {
1944
+ this.options = this.layoutNode.options || {};
1945
+ this.jsf.initializeControl(this, !this.options.readonly);
1946
+ }
1947
+ updateValue(event) {
1948
+ this.options.showErrors = true;
1949
+ this.jsf.updateValue(this, event.value);
1950
+ }
1951
+ }
1952
+ MaterialSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialSliderComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
1953
+ 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: `
1954
+ <mat-slider thumbLabel *ngIf="boundControl"
1955
+ [formControl]="formControl"
1956
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1957
+ [id]="'control' + layoutNode?._id"
1958
+ [max]="options?.maximum"
1959
+ [min]="options?.minimum"
1960
+ [step]="options?.multipleOf || options?.step || 'any'"
1961
+ [style.width]="'100%'"
1962
+ (blur)="options.showErrors = true"></mat-slider>
1963
+ <mat-slider thumbLabel *ngIf="!boundControl"
1964
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1965
+ [disabled]="controlDisabled || options?.readonly"
1966
+ [id]="'control' + layoutNode?._id"
1967
+ [max]="options?.maximum"
1968
+ [min]="options?.minimum"
1969
+ [step]="options?.multipleOf || options?.step || 'any'"
1970
+ [style.width]="'100%'"
1971
+ [value]="controlValue"
1972
+ (blur)="options.showErrors = true"
1973
+ (change)="updateValue($event)"></mat-slider>
1974
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1975
+ [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"] }] });
1976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialSliderComponent, decorators: [{
1977
+ type: Component,
1978
+ args: [{
1979
+ // tslint:disable-next-line:component-selector
1980
+ selector: 'material-slider-widget',
1981
+ template: `
1982
+ <mat-slider thumbLabel *ngIf="boundControl"
1983
+ [formControl]="formControl"
1984
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1985
+ [id]="'control' + layoutNode?._id"
1986
+ [max]="options?.maximum"
1987
+ [min]="options?.minimum"
1988
+ [step]="options?.multipleOf || options?.step || 'any'"
1989
+ [style.width]="'100%'"
1990
+ (blur)="options.showErrors = true"></mat-slider>
1991
+ <mat-slider thumbLabel *ngIf="!boundControl"
1992
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1993
+ [disabled]="controlDisabled || options?.readonly"
1994
+ [id]="'control' + layoutNode?._id"
1995
+ [max]="options?.maximum"
1996
+ [min]="options?.minimum"
1997
+ [step]="options?.multipleOf || options?.step || 'any'"
1998
+ [style.width]="'100%'"
1999
+ [value]="controlValue"
2000
+ (blur)="options.showErrors = true"
2001
+ (change)="updateValue($event)"></mat-slider>
2002
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
2003
+ [innerHTML]="options?.errorMessage"></mat-error>`,
2004
+ styles: [` mat-error { font-size: 75%; } `],
2005
+ }]
2006
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
2007
+ type: Input
2008
+ }], layoutIndex: [{
2009
+ type: Input
2010
+ }], dataIndex: [{
2011
+ type: Input
2012
+ }] } });
2013
+
2014
+ // TODO: Add this control
2015
+ class MaterialStepperComponent {
2016
+ constructor(jsf) {
2017
+ this.jsf = jsf;
2018
+ this.controlDisabled = false;
2019
+ this.boundControl = false;
2020
+ }
2021
+ ngOnInit() {
2022
+ this.options = this.layoutNode.options || {};
2023
+ this.jsf.initializeControl(this);
2024
+ }
2025
+ updateValue(event) {
2026
+ this.jsf.updateValue(this, event.target.value);
2027
+ }
2028
+ }
2029
+ MaterialStepperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialStepperComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
2030
+ 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 });
2031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialStepperComponent, decorators: [{
2032
+ type: Component,
2033
+ args: [{
2034
+ // tslint:disable-next-line:component-selector
2035
+ selector: 'material-stepper-widget',
2036
+ template: ``,
2037
+ }]
2038
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
2039
+ type: Input
2040
+ }], layoutIndex: [{
2041
+ type: Input
2042
+ }], dataIndex: [{
2043
+ type: Input
2044
+ }] } });
2045
+
2046
+ class MaterialTabsComponent {
2047
+ constructor(jsf) {
2048
+ this.jsf = jsf;
2049
+ this.selectedItem = 0;
2050
+ this.showAddTab = true;
2051
+ }
2052
+ ngOnInit() {
2053
+ this.options = this.layoutNode.options || {};
2054
+ this.itemCount = this.layoutNode.items.length - 1;
2055
+ this.updateControl();
2056
+ }
2057
+ select(index) {
2058
+ if (this.layoutNode.items[index].type === '$ref') {
2059
+ this.jsf.addItem({
2060
+ layoutNode: this.layoutNode.items[index],
2061
+ layoutIndex: this.layoutIndex.concat(index),
2062
+ dataIndex: this.dataIndex.concat(index)
2063
+ });
2064
+ this.updateControl();
2065
+ }
2066
+ this.selectedItem = index;
2067
+ }
2068
+ updateControl() {
2069
+ this.itemCount = this.layoutNode.items.length - 1;
2070
+ const lastItem = this.layoutNode.items[this.layoutNode.items.length - 1];
2071
+ this.showAddTab = lastItem.type === '$ref' &&
2072
+ this.itemCount < (lastItem.options.maxItems || 1000);
2073
+ }
2074
+ setTabTitle(item, index) {
2075
+ return this.jsf.setArrayItemTitle(this, item, index);
2076
+ }
2077
+ }
2078
+ MaterialTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialTabsComponent, deps: [{ token: i1.JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component });
2079
+ 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: `
2080
+ <nav mat-tab-nav-bar
2081
+ [attr.aria-label]="options?.label || options?.title || ''"
2082
+ [style.width]="'100%'">
2083
+ <a mat-tab-link *ngFor="let item of layoutNode?.items; let i = index"
2084
+ [active]="selectedItem === i"
2085
+ (click)="select(i)">
2086
+ <span *ngIf="showAddTab || item.type !== '$ref'"
2087
+ [innerHTML]="setTabTitle(item, i)"></span>
2088
+ </a>
2089
+ </nav>
2090
+ <div *ngFor="let layoutItem of layoutNode?.items; let i = index"
2091
+ [class]="options?.htmlClass || ''">
2092
+ <select-framework-widget *ngIf="selectedItem === i"
2093
+ [class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '') + ' ' + (options?.style?.selected || '')"
2094
+ [dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
2095
+ [layoutIndex]="(layoutIndex || []).concat(i)"
2096
+ [layoutNode]="layoutItem"></select-framework-widget>
2097
+ </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"] }] });
2098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialTabsComponent, decorators: [{
2099
+ type: Component,
2100
+ args: [{
2101
+ // tslint:disable-next-line:component-selector
2102
+ selector: 'material-tabs-widget',
2103
+ template: `
2104
+ <nav mat-tab-nav-bar
2105
+ [attr.aria-label]="options?.label || options?.title || ''"
2106
+ [style.width]="'100%'">
2107
+ <a mat-tab-link *ngFor="let item of layoutNode?.items; let i = index"
2108
+ [active]="selectedItem === i"
2109
+ (click)="select(i)">
2110
+ <span *ngIf="showAddTab || item.type !== '$ref'"
2111
+ [innerHTML]="setTabTitle(item, i)"></span>
2112
+ </a>
2113
+ </nav>
2114
+ <div *ngFor="let layoutItem of layoutNode?.items; let i = index"
2115
+ [class]="options?.htmlClass || ''">
2116
+ <select-framework-widget *ngIf="selectedItem === i"
2117
+ [class]="(options?.fieldHtmlClass || '') + ' ' + (options?.activeClass || '') + ' ' + (options?.style?.selected || '')"
2118
+ [dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
2119
+ [layoutIndex]="(layoutIndex || []).concat(i)"
2120
+ [layoutNode]="layoutItem"></select-framework-widget>
2121
+ </div>`,
2122
+ styles: [` a { cursor: pointer; } `],
2123
+ }]
2124
+ }], ctorParameters: function () { return [{ type: i1.JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
2125
+ type: Input
2126
+ }], layoutIndex: [{
2127
+ type: Input
2128
+ }], dataIndex: [{
2129
+ type: Input
2130
+ }] } });
2131
+
2132
+ class MaterialTextareaComponent {
2133
+ constructor(matFormFieldDefaultOptions, jsf) {
2134
+ this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
2135
+ this.jsf = jsf;
2136
+ this.controlDisabled = false;
2137
+ this.boundControl = false;
2138
+ }
2139
+ ngOnInit() {
2140
+ this.options = this.layoutNode.options || {};
2141
+ this.jsf.initializeControl(this);
2142
+ if (!this.options.notitle && !this.options.description && this.options.placeholder) {
2143
+ this.options.description = this.options.placeholder;
2144
+ }
2145
+ }
2146
+ updateValue(event) {
2147
+ this.jsf.updateValue(this, event.target.value);
2148
+ }
2149
+ }
2150
+ 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 });
2151
+ 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: `
2152
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
2153
+ [class]="options?.htmlClass || ''"
2154
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
2155
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
2156
+ [style.width]="'100%'">
2157
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
2158
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
2159
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
2160
+ <textarea matInput *ngIf="boundControl"
2161
+ [formControl]="formControl"
2162
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2163
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2164
+ [attr.maxlength]="options?.maxLength"
2165
+ [attr.minlength]="options?.minLength"
2166
+ [attr.pattern]="options?.pattern"
2167
+ [required]="options?.required"
2168
+ [id]="'control' + layoutNode?._id"
2169
+ [name]="controlName"
2170
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2171
+ [readonly]="options?.readonly ? 'readonly' : null"
2172
+ [style.width]="'100%'"
2173
+ (blur)="options.showErrors = true"></textarea>
2174
+ <textarea matInput *ngIf="!boundControl"
2175
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2176
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2177
+ [attr.maxlength]="options?.maxLength"
2178
+ [attr.minlength]="options?.minLength"
2179
+ [attr.pattern]="options?.pattern"
2180
+ [required]="options?.required"
2181
+ [disabled]="controlDisabled"
2182
+ [id]="'control' + layoutNode?._id"
2183
+ [name]="controlName"
2184
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2185
+ [readonly]="options?.readonly ? 'readonly' : null"
2186
+ [style.width]="'100%'"
2187
+ [value]="controlValue"
2188
+ (input)="updateValue($event)"
2189
+ (blur)="options.showErrors = true"></textarea>
2190
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
2191
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
2192
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
2193
+ align="end" [innerHTML]="options?.description"></mat-hint>
2194
+ </mat-form-field>
2195
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
2196
+ [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"] }] });
2197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialTextareaComponent, decorators: [{
2198
+ type: Component,
2199
+ args: [{
2200
+ // tslint:disable-next-line:component-selector
2201
+ selector: 'material-textarea-widget',
2202
+ template: `
2203
+ <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
2204
+ [class]="options?.htmlClass || ''"
2205
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
2206
+ [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
2207
+ [style.width]="'100%'">
2208
+ <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
2209
+ <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"
2210
+ [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>
2211
+ <textarea matInput *ngIf="boundControl"
2212
+ [formControl]="formControl"
2213
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2214
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2215
+ [attr.maxlength]="options?.maxLength"
2216
+ [attr.minlength]="options?.minLength"
2217
+ [attr.pattern]="options?.pattern"
2218
+ [required]="options?.required"
2219
+ [id]="'control' + layoutNode?._id"
2220
+ [name]="controlName"
2221
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2222
+ [readonly]="options?.readonly ? 'readonly' : null"
2223
+ [style.width]="'100%'"
2224
+ (blur)="options.showErrors = true"></textarea>
2225
+ <textarea matInput *ngIf="!boundControl"
2226
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
2227
+ [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
2228
+ [attr.maxlength]="options?.maxLength"
2229
+ [attr.minlength]="options?.minLength"
2230
+ [attr.pattern]="options?.pattern"
2231
+ [required]="options?.required"
2232
+ [disabled]="controlDisabled"
2233
+ [id]="'control' + layoutNode?._id"
2234
+ [name]="controlName"
2235
+ [placeholder]="options?.notitle ? options?.placeholder : options?.title"
2236
+ [readonly]="options?.readonly ? 'readonly' : null"
2237
+ [style.width]="'100%'"
2238
+ [value]="controlValue"
2239
+ (input)="updateValue($event)"
2240
+ (blur)="options.showErrors = true"></textarea>
2241
+ <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
2242
+ [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
2243
+ <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
2244
+ align="end" [innerHTML]="options?.description"></mat-hint>
2245
+ </mat-form-field>
2246
+ <mat-error *ngIf="options?.showErrors && options?.errorMessage"
2247
+ [innerHTML]="options?.errorMessage"></mat-error>`,
2248
+ styles: [`
2249
+ mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }
2250
+ ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex
2251
+ .mat-form-field-infix { width: initial; }
2252
+ `],
2253
+ }]
2254
+ }], ctorParameters: function () {
2255
+ return [{ type: undefined, decorators: [{
2256
+ type: Inject,
2257
+ args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
2258
+ }, {
2259
+ type: Optional
2260
+ }] }, { type: i1.JsonSchemaFormService }];
2261
+ }, propDecorators: { layoutNode: [{
2262
+ type: Input
2263
+ }], layoutIndex: [{
2264
+ type: Input
2265
+ }], dataIndex: [{
2266
+ type: Input
2267
+ }] } });
2268
+
2269
+ const MATERIAL_FRAMEWORK_COMPONENTS = [
2270
+ FlexLayoutRootComponent, FlexLayoutSectionComponent,
2271
+ MaterialAddReferenceComponent, MaterialOneOfComponent,
2272
+ MaterialButtonComponent, MaterialButtonGroupComponent,
2273
+ MaterialCheckboxComponent, MaterialCheckboxesComponent,
2274
+ MaterialChipListComponent, MaterialDatepickerComponent,
2275
+ MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent,
2276
+ MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent,
2277
+ MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent,
2278
+ MaterialDesignFrameworkComponent
2279
+ ];
2280
+
2281
+ // Material Design Framework
2282
+ // https://github.com/angular/material2
2283
+ class MaterialDesignFramework extends Framework {
2284
+ constructor() {
2285
+ super(...arguments);
2286
+ this.name = 'material-design';
2287
+ this.framework = MaterialDesignFrameworkComponent;
2288
+ this.stylesheets = [
2289
+ '//fonts.googleapis.com/icon?family=Material+Icons',
2290
+ '//fonts.googleapis.com/css?family=Roboto:300,400,500,700',
2291
+ ];
2292
+ this.widgets = {
2293
+ 'root': FlexLayoutRootComponent,
2294
+ 'section': FlexLayoutSectionComponent,
2295
+ '$ref': MaterialAddReferenceComponent,
2296
+ 'button': MaterialButtonComponent,
2297
+ 'button-group': MaterialButtonGroupComponent,
2298
+ 'checkbox': MaterialCheckboxComponent,
2299
+ 'checkboxes': MaterialCheckboxesComponent,
2300
+ 'chip-list': MaterialChipListComponent,
2301
+ 'date': MaterialDatepickerComponent,
2302
+ 'file': MaterialFileComponent,
2303
+ 'number': MaterialNumberComponent,
2304
+ 'one-of': MaterialOneOfComponent,
2305
+ 'radios': MaterialRadiosComponent,
2306
+ 'select': MaterialSelectComponent,
2307
+ 'slider': MaterialSliderComponent,
2308
+ 'stepper': MaterialStepperComponent,
2309
+ 'tabs': MaterialTabsComponent,
2310
+ 'text': MaterialInputComponent,
2311
+ 'textarea': MaterialTextareaComponent,
2312
+ 'alt-date': 'date',
2313
+ 'any-of': 'one-of',
2314
+ 'card': 'section',
2315
+ 'color': 'text',
2316
+ 'expansion-panel': 'section',
2317
+ 'hidden': 'none',
2318
+ 'image': 'none',
2319
+ 'integer': 'number',
2320
+ 'radiobuttons': 'button-group',
2321
+ 'range': 'slider',
2322
+ 'submit': 'button',
2323
+ 'tagsinput': 'chip-list',
2324
+ 'wizard': 'stepper',
2325
+ };
2326
+ }
2327
+ }
2328
+ MaterialDesignFramework.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFramework, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2329
+ MaterialDesignFramework.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFramework });
2330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFramework, decorators: [{
2331
+ type: Injectable
2332
+ }] });
2333
+
2334
+ function fixAngularFlex() {
2335
+ // monkey patch based on errors in console - https://github.com/angular/flex-layout/issues/1011
2336
+ const MediaMarshallerUpdateElement = MediaMarshaller.prototype.updateElement;
2337
+ MediaMarshaller.prototype.updateElement = function (element, key, value) {
2338
+ if (key === 'layout-gap' && (value === null || value === undefined)) {
2339
+ value = '0px';
2340
+ }
2341
+ MediaMarshallerUpdateElement.apply(this, [element, key, value]);
2342
+ };
2343
+ }
2344
+
2345
+ /**
2346
+ * unused @angular/material modules:
2347
+ * MatDialogModule, MatGridListModule, MatListModule, MatMenuModule,
2348
+ * MatPaginatorModule, MatProgressBarModule, MatProgressSpinnerModule,
2349
+ * MatSidenavModule, MatSnackBarModule, MatSortModule, MatTableModule,
2350
+ * ,
2351
+ */
2352
+ const ANGULAR_MATERIAL_MODULES = [
2353
+ MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatCardModule,
2354
+ MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule,
2355
+ MatFormFieldModule, MatIconModule, MatInputModule, MatNativeDateModule,
2356
+ MatRadioModule, MatSelectModule, MatSliderModule, MatSlideToggleModule,
2357
+ MatStepperModule, MatTabsModule, MatTooltipModule,
2358
+ MatToolbarModule, MatMenuModule, MatToolbarModule,
2359
+ ];
2360
+ class MaterialDesignFrameworkModule {
2361
+ constructor() {
2362
+ fixAngularFlex();
2363
+ }
2364
+ }
2365
+ MaterialDesignFrameworkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2366
+ 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,
2367
+ FormsModule,
2368
+ ReactiveFormsModule,
2369
+ FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatCardModule,
2370
+ MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule,
2371
+ MatFormFieldModule, MatIconModule, MatInputModule, MatNativeDateModule,
2372
+ MatRadioModule, MatSelectModule, MatSliderModule, MatSlideToggleModule,
2373
+ MatStepperModule, MatTabsModule, MatTooltipModule,
2374
+ MatToolbarModule, MatMenuModule, MatToolbarModule, WidgetLibraryModule,
2375
+ JsonSchemaFormModule], exports: [JsonSchemaFormModule, FlexLayoutRootComponent, FlexLayoutSectionComponent, MaterialAddReferenceComponent, MaterialOneOfComponent, MaterialButtonComponent, MaterialButtonGroupComponent, MaterialCheckboxComponent, MaterialCheckboxesComponent, MaterialChipListComponent, MaterialDatepickerComponent, MaterialFileComponent, MaterialInputComponent, MaterialNumberComponent, MaterialRadiosComponent, MaterialSelectComponent, MaterialSliderComponent, MaterialStepperComponent, MaterialTabsComponent, MaterialTextareaComponent, MaterialDesignFrameworkComponent] });
2376
+ MaterialDesignFrameworkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFrameworkModule, providers: [
2377
+ JsonSchemaFormService,
2378
+ FrameworkLibraryService,
2379
+ WidgetLibraryService,
2380
+ { provide: Framework, useClass: MaterialDesignFramework, multi: true },
2381
+ ], imports: [[
2382
+ CommonModule,
2383
+ FormsModule,
2384
+ ReactiveFormsModule,
2385
+ FlexLayoutModule,
2386
+ ...ANGULAR_MATERIAL_MODULES,
2387
+ WidgetLibraryModule,
2388
+ JsonSchemaFormModule,
2389
+ ], JsonSchemaFormModule] });
2390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: MaterialDesignFrameworkModule, decorators: [{
2391
+ type: NgModule,
2392
+ args: [{
2393
+ imports: [
2394
+ CommonModule,
2395
+ FormsModule,
2396
+ ReactiveFormsModule,
2397
+ FlexLayoutModule,
2398
+ ...ANGULAR_MATERIAL_MODULES,
2399
+ WidgetLibraryModule,
2400
+ JsonSchemaFormModule,
2401
+ ],
2402
+ declarations: [
2403
+ ...MATERIAL_FRAMEWORK_COMPONENTS,
2404
+ ],
2405
+ exports: [
2406
+ JsonSchemaFormModule,
2407
+ ...MATERIAL_FRAMEWORK_COMPONENTS,
2408
+ ],
2409
+ providers: [
2410
+ JsonSchemaFormService,
2411
+ FrameworkLibraryService,
2412
+ WidgetLibraryService,
2413
+ { provide: Framework, useClass: MaterialDesignFramework, multi: true },
2414
+ ]
2415
+ }]
2416
+ }], ctorParameters: function () { return []; } });
2417
+
2418
+ /*
2419
+ * Public API Surface of @ajsf/material-framework
2420
+ */
2421
+
2422
+ /**
2423
+ * Generated bundle index. Do not edit.
2424
+ */
2425
+
2426
+ 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 };
2427
+ //# sourceMappingURL=ajsf-material.mjs.map