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