ngx-render-material-forms 0.0.1 → 0.0.3
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.
|
@@ -1,3787 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Input, ViewChild, ViewContainerRef, ViewChildren, EventEmitter, Output, forwardRef, Directive, Optional, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
6
|
-
import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as i4$3 from '@angular/material/input';
|
|
8
|
-
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from '@angular/material/input';
|
|
9
|
-
import * as i2$1 from '@angular/material/button';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as i3 from '@angular/material/form-field';
|
|
12
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
|
-
import * as i4$6 from '@angular/material/checkbox';
|
|
14
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
|
-
import * as i4$7 from '@angular/material/radio';
|
|
16
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
17
|
-
import * as i4$4 from '@angular/material/select';
|
|
18
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
19
|
-
import { MatListModule } from '@angular/material/list';
|
|
20
|
-
import * as i4$5 from '@angular/material/chips';
|
|
21
|
-
import { MatChipsModule } from '@angular/material/chips';
|
|
22
|
-
import * as i2$2 from '@angular/material/expansion';
|
|
23
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
24
|
-
import * as i4 from '@angular/material/card';
|
|
25
|
-
import { MatCardModule } from '@angular/material/card';
|
|
26
|
-
import * as i2$3 from '@angular/material/tabs';
|
|
27
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
28
|
-
import * as i3$2 from '@angular/material/table';
|
|
29
|
-
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
30
|
-
import * as i5$2 from '@angular/material/datepicker';
|
|
31
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
32
|
-
import * as i3$4 from '@angular/material/progress-spinner';
|
|
33
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
34
|
-
import * as i4$1 from '@angular/material/icon';
|
|
35
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
36
|
-
import * as i3$1 from '@angular/material/tooltip';
|
|
37
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
38
|
-
import * as i5$1 from '@angular/material/core';
|
|
39
|
-
import { MatNativeDateModule } from '@angular/material/core';
|
|
40
|
-
import Webform from 'formiojs/Webform.js';
|
|
41
|
-
import FormioComponent$2 from 'formiojs/components/_classes/component/Component.js';
|
|
42
|
-
import TextFieldComponent from 'formiojs/components/textfield/TextField.js';
|
|
43
|
-
import Validator from 'formiojs/validator/Validator.js';
|
|
44
|
-
import unescape from 'lodash/unescape';
|
|
45
|
-
import get from 'lodash/get';
|
|
46
|
-
import * as i5 from '@angular/flex-layout/flex';
|
|
47
|
-
import * as i4$2 from '@angular/flex-layout/extended';
|
|
48
|
-
import PasswordComponent from 'formiojs/components/password/Password.js';
|
|
49
|
-
import EmailComponent from 'formiojs/components/email/Email.js';
|
|
50
|
-
import UrlComponent from 'formiojs/components/url/Url.js';
|
|
51
|
-
import PhoneNumberComponent from 'formiojs/components/phonenumber/PhoneNumber.js';
|
|
52
|
-
import NumberComponent from 'formiojs/components/number/Number.js';
|
|
53
|
-
import _, { get as get$1 } from 'lodash';
|
|
54
|
-
import CurrencyComponent from 'formiojs/components/currency/Currency.js';
|
|
55
|
-
import DayComponent from 'formiojs/components/day/Day.js';
|
|
56
|
-
import { momentDate } from 'formiojs/utils/utils.js';
|
|
57
|
-
import HiddenComponent from 'formiojs/components/hidden/Hidden.js';
|
|
58
|
-
import HtmlComponent from 'formiojs/components/html/HTML.js';
|
|
59
|
-
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
60
|
-
import TagsComponent from 'formiojs/components/tags/Tags.js';
|
|
61
|
-
import ButtonComponent from 'formiojs/components/button/Button.js';
|
|
62
|
-
import TextAreaComponent from 'formiojs/components/textarea/TextArea.js';
|
|
63
|
-
import isNil from 'lodash/isNil';
|
|
64
|
-
import PanelComponent from 'formiojs/components/panel/Panel.js';
|
|
65
|
-
import ColumnsComponent from 'formiojs/components/columns/Columns.js';
|
|
66
|
-
import ContainerComponent from 'formiojs/components/container/Container.js';
|
|
67
|
-
import TabsComponent from 'formiojs/components/tabs/Tabs.js';
|
|
68
|
-
import DateTimeComponent from 'formiojs/components/datetime/DateTime.js';
|
|
69
|
-
import TimeComponent from 'formiojs/components/time/Time.js';
|
|
70
|
-
import * as moment_ from 'moment';
|
|
71
|
-
import CheckboxComponent from 'formiojs/components/checkbox/Checkbox.js';
|
|
72
|
-
import FieldsetComponent from 'formiojs/components/fieldset/Fieldset.js';
|
|
73
|
-
import ContentComponent from 'formiojs/components/content/Content.js';
|
|
74
|
-
import SignatureComponent from 'formiojs/components/signature/Signature.js';
|
|
75
|
-
import SurveyComponent from 'formiojs/components/survey/Survey.js';
|
|
76
|
-
import RadioComponent from 'formiojs/components/radio/Radio.js';
|
|
77
|
-
import SelectBoxesComponent from 'formiojs/components/selectboxes/SelectBoxes.js';
|
|
78
|
-
import SelectComponent from 'formiojs/components/select/Select.js';
|
|
79
|
-
import { Subject, takeUntil } from 'rxjs';
|
|
80
|
-
import * as i7 from 'ngx-mat-select-search';
|
|
81
|
-
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
82
|
-
import WellComponent from 'formiojs/components/well/Well.js';
|
|
83
|
-
import DataGridComponent from 'formiojs/components/datagrid/DataGrid.js';
|
|
84
|
-
import * as i7$1 from '@angular/cdk/drag-drop';
|
|
85
|
-
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
86
|
-
import EditGridComponent from 'formiojs/components/editgrid/EditGrid.js';
|
|
87
|
-
import Components$2 from 'formiojs/components/Components';
|
|
88
|
-
import isString from 'lodash/isString';
|
|
89
|
-
import TableComponent from 'formiojs/components/table/Table.js';
|
|
90
|
-
import Wizard from 'formiojs/Wizard';
|
|
91
|
-
import Displays from 'formiojs/displays/Displays';
|
|
92
|
-
import * as i3$3 from '@angular/material/stepper';
|
|
93
|
-
import { MatStepperModule } from '@angular/material/stepper';
|
|
94
|
-
import * as i1$1 from '@formio/angular';
|
|
95
|
-
import { FormioBaseComponent } from '@formio/angular';
|
|
96
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
97
|
-
|
|
98
|
-
class NgxRenderMaterialFormsService {
|
|
99
|
-
constructor() { }
|
|
100
|
-
}
|
|
101
|
-
NgxRenderMaterialFormsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
102
|
-
NgxRenderMaterialFormsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsService, providedIn: 'root' });
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsService, decorators: [{
|
|
104
|
-
type: Injectable,
|
|
105
|
-
args: [{
|
|
106
|
-
providedIn: 'root'
|
|
107
|
-
}]
|
|
108
|
-
}], ctorParameters: function () { return []; } });
|
|
109
|
-
|
|
110
|
-
class NgxRenderMaterialFormsComponent {
|
|
111
|
-
constructor() { }
|
|
112
|
-
ngOnInit() {
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
NgxRenderMaterialFormsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
116
|
-
NgxRenderMaterialFormsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: NgxRenderMaterialFormsComponent, selector: "NgxMat-NgxRenderMaterialForms", ngImport: i0, template: `
|
|
117
|
-
<p>
|
|
118
|
-
ngx-render-material-forms works!
|
|
119
|
-
</p>
|
|
120
|
-
`, isInline: true });
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsComponent, decorators: [{
|
|
122
|
-
type: Component,
|
|
123
|
-
args: [{ selector: 'NgxMat-NgxRenderMaterialForms', template: `
|
|
124
|
-
<p>
|
|
125
|
-
ngx-render-material-forms works!
|
|
126
|
-
</p>
|
|
127
|
-
` }]
|
|
128
|
-
}], ctorParameters: function () { return []; } });
|
|
129
|
-
|
|
130
|
-
console.log('Webform=>', Webform);
|
|
131
|
-
Webform.prototype.redraw = function () {
|
|
132
|
-
return this.render();
|
|
133
|
-
};
|
|
134
|
-
Webform.prototype.clear = function () {
|
|
135
|
-
const viewContainer = this.viewContainer ? this.viewContainer() : null;
|
|
136
|
-
if (viewContainer) {
|
|
137
|
-
viewContainer.clear();
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
Webform.prototype.render = function () {
|
|
141
|
-
if (this.viewContainer && this.viewContainer()) {
|
|
142
|
-
this.clear();
|
|
143
|
-
this.renderComponents();
|
|
144
|
-
this.setValue(this._submission);
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
var FormioComponent$1 = (() => {
|
|
149
|
-
const beforeSubmit = FormioComponent$2.prototype.beforeSubmit;
|
|
150
|
-
FormioComponent$2.prototype.beforeSubmit = function (...args) {
|
|
151
|
-
if (this.materialComponent) {
|
|
152
|
-
this.materialComponent.beforeSubmit();
|
|
153
|
-
}
|
|
154
|
-
return beforeSubmit.call(this, ...args);
|
|
155
|
-
};
|
|
156
|
-
Object.defineProperty(FormioComponent$2.prototype, 'disabled', {
|
|
157
|
-
set(disabled) {
|
|
158
|
-
this._disabled = disabled;
|
|
159
|
-
if (this.materialComponent) {
|
|
160
|
-
this.materialComponent.setDisabled(disabled);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
Object.defineProperty(FormioComponent$2.prototype, 'visible', {
|
|
165
|
-
set(visible) {
|
|
166
|
-
if (this._visible !== visible) {
|
|
167
|
-
this._visible = visible;
|
|
168
|
-
this.clearOnHide();
|
|
169
|
-
this.redraw();
|
|
170
|
-
}
|
|
171
|
-
if (this.materialComponent) {
|
|
172
|
-
this.materialComponent.setVisible(visible);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
return FormioComponent$2;
|
|
177
|
-
})();
|
|
178
|
-
|
|
179
|
-
// @dynamic
|
|
180
|
-
class FormioControl extends FormControl {
|
|
181
|
-
constructor(...args) {
|
|
182
|
-
super(args[0], [], [FormioControl.customValidator.bind(FormioControl)]);
|
|
183
|
-
}
|
|
184
|
-
static customValidator(control) {
|
|
185
|
-
return new Promise((resolve) => {
|
|
186
|
-
if (control.instance) {
|
|
187
|
-
control.instance.validateResolve = resolve;
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
resolve(null);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
setInstance(instance) {
|
|
195
|
-
this.instance = instance;
|
|
196
|
-
const setCustomValidity = instance.setCustomValidity;
|
|
197
|
-
instance.setCustomValidity = (message, dirty, external, isWarning = false) => {
|
|
198
|
-
let decodedMessage = message;
|
|
199
|
-
if (Array.isArray(message)) {
|
|
200
|
-
decodedMessage = message.map(msg => Object.assign(msg, { message: unescape(msg.message) }));
|
|
201
|
-
}
|
|
202
|
-
else if (message) {
|
|
203
|
-
decodedMessage = unescape(message);
|
|
204
|
-
}
|
|
205
|
-
setCustomValidity.call(instance, decodedMessage, dirty, external, isWarning);
|
|
206
|
-
if (instance.validateResolve) {
|
|
207
|
-
instance.validateResolve(decodedMessage ? { custom: true } : null);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
class MaterialComponent {
|
|
214
|
-
constructor(element, ref) {
|
|
215
|
-
this.element = element;
|
|
216
|
-
this.ref = ref;
|
|
217
|
-
this.control = new FormioControl();
|
|
218
|
-
}
|
|
219
|
-
setInstance(instance) {
|
|
220
|
-
this.control.setInstance(instance);
|
|
221
|
-
instance.materialComponent = this;
|
|
222
|
-
this.instance = instance;
|
|
223
|
-
this.instance.disabled = this.instance.shouldDisabled;
|
|
224
|
-
this.setVisible(this.instance.visible);
|
|
225
|
-
this.renderComponents();
|
|
226
|
-
}
|
|
227
|
-
ngOnInit() {
|
|
228
|
-
if (this.instance) {
|
|
229
|
-
if (this.shouldValidateOnInit()) {
|
|
230
|
-
this.storeFormData();
|
|
231
|
-
this.validateOnInit();
|
|
232
|
-
}
|
|
233
|
-
this.instance.component.defaultValue ? this.setValue(this.instance.component.defaultValue) : '';
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
validateOnInit() {
|
|
237
|
-
const { key } = this.instance.component;
|
|
238
|
-
const validationValue = this.getFormValue(this.instance.path);
|
|
239
|
-
if (validationValue === null) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
this.instance.setPristine(false);
|
|
243
|
-
const validationResult = Validator.checkComponent(this.instance, { [key]: validationValue }, { [key]: validationValue });
|
|
244
|
-
if (validationResult.length) {
|
|
245
|
-
this.instance.setCustomValidity(validationResult, false);
|
|
246
|
-
if (!!validationValue) {
|
|
247
|
-
this.control.markAsTouched();
|
|
248
|
-
}
|
|
249
|
-
this.ref.detectChanges();
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
storeFormData() {
|
|
253
|
-
if (this.instance.parent && this.instance.parent.submission && this.instance.parent.submission.data) {
|
|
254
|
-
sessionStorage.setItem('formData', JSON.stringify(this.instance.parent.submission.data));
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
getFormValue(path) {
|
|
258
|
-
const formData = JSON.parse(sessionStorage.getItem('formData'));
|
|
259
|
-
if (!formData) {
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
return get(formData, path);
|
|
263
|
-
}
|
|
264
|
-
renderComponents() { }
|
|
265
|
-
onChange(keepInputRaw) {
|
|
266
|
-
let value = this.getValue();
|
|
267
|
-
if (value === undefined || value === null) {
|
|
268
|
-
value = this.instance.emptyValue;
|
|
269
|
-
}
|
|
270
|
-
if (this.input && this.input.nativeElement.mask && value && !keepInputRaw) {
|
|
271
|
-
this.input.nativeElement.mask.textMaskInputElement.update(value);
|
|
272
|
-
this.control.setValue(this.input.nativeElement.value);
|
|
273
|
-
value = this.getValue();
|
|
274
|
-
}
|
|
275
|
-
this.instance.updateValue(value, { modified: true });
|
|
276
|
-
}
|
|
277
|
-
getValue() {
|
|
278
|
-
return this.control.value;
|
|
279
|
-
}
|
|
280
|
-
setValue(value) {
|
|
281
|
-
this.control.setValue(value);
|
|
282
|
-
}
|
|
283
|
-
beforeSubmit() {
|
|
284
|
-
this.control.markAsTouched();
|
|
285
|
-
}
|
|
286
|
-
hasError() {
|
|
287
|
-
return !!this.instance && !!this.instance.error;
|
|
288
|
-
}
|
|
289
|
-
shouldValidateOnInit() {
|
|
290
|
-
if (!this.instance) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
return this.instance.options.validateOnInit
|
|
294
|
-
|| this.instance.parent.options.validateOnInit;
|
|
295
|
-
}
|
|
296
|
-
setDisabled(disabled) {
|
|
297
|
-
if (disabled) {
|
|
298
|
-
this.control.disable();
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
this.control.enable();
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
setVisible(visible) {
|
|
305
|
-
if (this.element && this.element.nativeElement) {
|
|
306
|
-
if (visible) {
|
|
307
|
-
this.element.nativeElement.removeAttribute('hidden');
|
|
308
|
-
this.element.nativeElement.style.visibility = 'visible';
|
|
309
|
-
this.element.nativeElement.style.position = 'relative';
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
this.element.nativeElement.setAttribute('hidden', true);
|
|
313
|
-
this.element.nativeElement.style.visibility = 'hidden';
|
|
314
|
-
this.element.nativeElement.style.position = 'absolute';
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
ngAfterViewInit() {
|
|
319
|
-
if (this.element && this.element.nativeElement && this.instance) {
|
|
320
|
-
// Add custom classes to elements.
|
|
321
|
-
if (this.instance.component.customClass) {
|
|
322
|
-
this.element.nativeElement.classList.add(this.instance.component.customClass);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (this.input) {
|
|
326
|
-
// Set the input masks.
|
|
327
|
-
this.instance.setInputMask(this.input.nativeElement);
|
|
328
|
-
this.instance.addFocusBlurEvents(this.input.nativeElement);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
MaterialComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
333
|
-
MaterialComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialComponent, selector: "mat-formio-comp", inputs: { instance: "instance", control: "control" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: '<mat-card>Unknown Component: {{ instance.component.type }}</mat-card>', isInline: true, dependencies: [{ kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }] });
|
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialComponent, decorators: [{
|
|
335
|
-
type: Component,
|
|
336
|
-
args: [{
|
|
337
|
-
selector: 'mat-formio-comp',
|
|
338
|
-
template: '<mat-card>Unknown Component: {{ instance.component.type }}</mat-card>'
|
|
339
|
-
}]
|
|
340
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { instance: [{
|
|
341
|
-
type: Input
|
|
342
|
-
}], input: [{
|
|
343
|
-
type: ViewChild,
|
|
344
|
-
args: ['input']
|
|
345
|
-
}], control: [{
|
|
346
|
-
type: Input
|
|
347
|
-
}] } });
|
|
348
|
-
FormioComponent$1.MaterialComponent = MaterialComponent;
|
|
349
|
-
|
|
350
|
-
var LabelPositions;
|
|
351
|
-
(function (LabelPositions) {
|
|
352
|
-
LabelPositions["RIGHT_RIGHT"] = "right-right";
|
|
353
|
-
LabelPositions["RIGHT_LEFT"] = "right-left";
|
|
354
|
-
LabelPositions["LEFT_LEFT"] = "left-left";
|
|
355
|
-
LabelPositions["LEFT_RIGHT"] = "left-right";
|
|
356
|
-
LabelPositions["BOTTOM"] = "bottom";
|
|
357
|
-
LabelPositions["TOP"] = "top";
|
|
358
|
-
})(LabelPositions || (LabelPositions = {}));
|
|
359
|
-
|
|
360
|
-
class LabelComponent {
|
|
361
|
-
}
|
|
362
|
-
LabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
363
|
-
LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: LabelComponent, selector: "span[matFormioLabel]", inputs: { instance: "instance" }, ngImport: i0, template: "<ng-container *ngIf=\"instance\">\n {{ instance.component.label }}<span class=\"required-star\" *ngIf=\"instance.component.validate.required\">*</span>\n <mat-icon *ngIf=\"instance.component.tooltip\" style=\"font-size: 1rem;\"\n matTooltip=\"{{ instance.component.tooltip }}\" matSuffix\n >\n info\n </mat-icon>\n</ng-container>\n", styles: [":host{pointer-events:all;display:block}.required-star{margin-left:.2rem;color:red;font-size:.8rem;vertical-align:top}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LabelComponent, decorators: [{
|
|
365
|
-
type: Component,
|
|
366
|
-
args: [{ selector: 'span[matFormioLabel]', template: "<ng-container *ngIf=\"instance\">\n {{ instance.component.label }}<span class=\"required-star\" *ngIf=\"instance.component.validate.required\">*</span>\n <mat-icon *ngIf=\"instance.component.tooltip\" style=\"font-size: 1rem;\"\n matTooltip=\"{{ instance.component.tooltip }}\" matSuffix\n >\n info\n </mat-icon>\n</ng-container>\n", styles: [":host{pointer-events:all;display:block}.required-star{margin-left:.2rem;color:red;font-size:.8rem;vertical-align:top}\n"] }]
|
|
367
|
-
}], propDecorators: { instance: [{
|
|
368
|
-
type: Input
|
|
369
|
-
}] } });
|
|
370
|
-
|
|
371
|
-
class FormioFormFieldComponent {
|
|
372
|
-
constructor() {
|
|
373
|
-
this.labelPositions = LabelPositions;
|
|
374
|
-
this.renderTopLabel = false;
|
|
375
|
-
this.showDescription = true;
|
|
376
|
-
this.renderElementOnly = false;
|
|
377
|
-
}
|
|
378
|
-
set instance(instance) {
|
|
379
|
-
this._instance = instance;
|
|
380
|
-
if (instance) {
|
|
381
|
-
this.componentTemplateContext = { $implicit: this.hasLabel(['top']) };
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
get instance() {
|
|
385
|
-
return this._instance;
|
|
386
|
-
}
|
|
387
|
-
hasLabel(labelPositions) {
|
|
388
|
-
const { component } = this.instance;
|
|
389
|
-
const hasNoLabel = !component.label || component.hideLabel;
|
|
390
|
-
const labelPositionIsNotSpecified = !labelPositions ||
|
|
391
|
-
!labelPositions.length ||
|
|
392
|
-
!component.labelPosition;
|
|
393
|
-
if (hasNoLabel || labelPositionIsNotSpecified || this.renderElementOnly) {
|
|
394
|
-
return false;
|
|
395
|
-
}
|
|
396
|
-
if (labelPositions.includes(component.labelPosition)) {
|
|
397
|
-
return true;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
FormioFormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: FormioFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
402
|
-
FormioFormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: { labelTemplate: "labelTemplate", renderTopLabel: "renderTopLabel", showDescription: "showDescription", renderElementOnly: "renderElementOnly", instance: "instance", componentTemplate: "componentTemplate" }, ngImport: i0, template: "<div class=\"mat-formio-component-wrapper\" *ngIf=\"instance && !renderElementOnly\"\n [ngClass]=\"{\n 'mat-formio-label-right': hasLabel([labelPositions.RIGHT_RIGHT, labelPositions.RIGHT_LEFT]),\n 'mat-formio-label-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.LEFT_RIGHT])\n }\"\n>\n <span *ngIf=\"renderTopLabel && hasLabel([labelPositions.TOP])\"\n class=\"mat-formio-label\"\n [ngClass]=\"{\n 'mat-formio-label-align-right': hasLabel([labelPositions.LEFT_RIGHT, labelPositions.RIGHT_RIGHT]),\n 'mat-formio-label-align-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.RIGHT_LEFT])\n }\"\n >\n <ng-container *ngTemplateOutlet=\"labelTemplate || defaultLabel\"></ng-container>\n </span>\n\n <div class=\"mat-formio-component\" *ngTemplateOutlet=\"componentTemplate; context: componentTemplateContext\"></div>\n\n <span *ngIf=\"hasLabel([\n labelPositions.BOTTOM,\n labelPositions.RIGHT_RIGHT,\n labelPositions.RIGHT_LEFT,\n labelPositions.LEFT_LEFT,\n labelPositions.LEFT_RIGHT\n ])\"\n class=\"mat-formio-label\"\n [ngClass]=\"{\n 'mat-formio-label-align-right': hasLabel([labelPositions.LEFT_RIGHT, labelPositions.RIGHT_RIGHT]),\n 'mat-formio-label-align-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.RIGHT_LEFT])\n }\"\n >\n <ng-container *ngTemplateOutlet=\"labelTemplate || defaultLabel\"></ng-container>\n </span>\n\n <mat-hint *ngIf=\"showDescription && instance.component.description\" class=\"mat-formio-component-description\">\n {{ instance.component.description }}\n </mat-hint>\n</div>\n\n<div class=\"mat-formio-component-wrapper\" *ngIf=\"renderElementOnly\">\n <div class=\"mat-formio-component\" *ngTemplateOutlet=\"componentTemplate; context: componentTemplateContext\"></div>\n</div>\n\n<ng-template #defaultLabel>\n <mat-label>\n <span style=\"display: block;\"\n [instance]=\"instance\" matFormioLabel>\n </span>\n </mat-label>\n</ng-template>\n", styles: [".mat-formio-component-description{display:block;grid-area:description}.mat-formio-component{grid-area:component}.mat-formio-label{grid-area:label}.mat-formio-label.mat-formio-label-align-right{margin-left:auto}.mat-formio-label.mat-formio-label-align-left{margin-right:auto}.mat-formio-component-wrapper.mat-formio-label-left,.mat-formio-component-wrapper.mat-formio-label-right{display:grid;grid-template-columns:auto auto;grid-column-gap:1em}.mat-formio-component-wrapper.mat-formio-label-right{grid-template-areas:\"component label\" \"description label\"}.mat-formio-component-wrapper.mat-formio-label-left{grid-template-areas:\"label component\" \"label description\"}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: FormioFormFieldComponent, decorators: [{
|
|
404
|
-
type: Component,
|
|
405
|
-
args: [{ selector: 'mat-formio-form-field', template: "<div class=\"mat-formio-component-wrapper\" *ngIf=\"instance && !renderElementOnly\"\n [ngClass]=\"{\n 'mat-formio-label-right': hasLabel([labelPositions.RIGHT_RIGHT, labelPositions.RIGHT_LEFT]),\n 'mat-formio-label-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.LEFT_RIGHT])\n }\"\n>\n <span *ngIf=\"renderTopLabel && hasLabel([labelPositions.TOP])\"\n class=\"mat-formio-label\"\n [ngClass]=\"{\n 'mat-formio-label-align-right': hasLabel([labelPositions.LEFT_RIGHT, labelPositions.RIGHT_RIGHT]),\n 'mat-formio-label-align-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.RIGHT_LEFT])\n }\"\n >\n <ng-container *ngTemplateOutlet=\"labelTemplate || defaultLabel\"></ng-container>\n </span>\n\n <div class=\"mat-formio-component\" *ngTemplateOutlet=\"componentTemplate; context: componentTemplateContext\"></div>\n\n <span *ngIf=\"hasLabel([\n labelPositions.BOTTOM,\n labelPositions.RIGHT_RIGHT,\n labelPositions.RIGHT_LEFT,\n labelPositions.LEFT_LEFT,\n labelPositions.LEFT_RIGHT\n ])\"\n class=\"mat-formio-label\"\n [ngClass]=\"{\n 'mat-formio-label-align-right': hasLabel([labelPositions.LEFT_RIGHT, labelPositions.RIGHT_RIGHT]),\n 'mat-formio-label-align-left': hasLabel([labelPositions.LEFT_LEFT, labelPositions.RIGHT_LEFT])\n }\"\n >\n <ng-container *ngTemplateOutlet=\"labelTemplate || defaultLabel\"></ng-container>\n </span>\n\n <mat-hint *ngIf=\"showDescription && instance.component.description\" class=\"mat-formio-component-description\">\n {{ instance.component.description }}\n </mat-hint>\n</div>\n\n<div class=\"mat-formio-component-wrapper\" *ngIf=\"renderElementOnly\">\n <div class=\"mat-formio-component\" *ngTemplateOutlet=\"componentTemplate; context: componentTemplateContext\"></div>\n</div>\n\n<ng-template #defaultLabel>\n <mat-label>\n <span style=\"display: block;\"\n [instance]=\"instance\" matFormioLabel>\n </span>\n </mat-label>\n</ng-template>\n", styles: [".mat-formio-component-description{display:block;grid-area:description}.mat-formio-component{grid-area:component}.mat-formio-label{grid-area:label}.mat-formio-label.mat-formio-label-align-right{margin-left:auto}.mat-formio-label.mat-formio-label-align-left{margin-right:auto}.mat-formio-component-wrapper.mat-formio-label-left,.mat-formio-component-wrapper.mat-formio-label-right{display:grid;grid-template-columns:auto auto;grid-column-gap:1em}.mat-formio-component-wrapper.mat-formio-label-right{grid-template-areas:\"component label\" \"description label\"}.mat-formio-component-wrapper.mat-formio-label-left{grid-template-areas:\"label component\" \"label description\"}\n"] }]
|
|
406
|
-
}], propDecorators: { labelTemplate: [{
|
|
407
|
-
type: Input
|
|
408
|
-
}], renderTopLabel: [{
|
|
409
|
-
type: Input
|
|
410
|
-
}], showDescription: [{
|
|
411
|
-
type: Input
|
|
412
|
-
}], renderElementOnly: [{
|
|
413
|
-
type: Input
|
|
414
|
-
}], instance: [{
|
|
415
|
-
type: Input,
|
|
416
|
-
args: ['instance']
|
|
417
|
-
}], componentTemplate: [{
|
|
418
|
-
type: Input
|
|
419
|
-
}] } });
|
|
420
|
-
|
|
421
|
-
const TEXTFIELD_TEMPLATE = `
|
|
422
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
423
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
424
|
-
<mat-form-field [appearance]="getFormFieldAppearance()" fxFill>
|
|
425
|
-
|
|
426
|
-
<mat-label *ngIf="hasLabel">
|
|
427
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
428
|
-
</mat-label>
|
|
429
|
-
|
|
430
|
-
<span *ngIf="instance.component.prefix && instance.type !== 'currency'"
|
|
431
|
-
matPrefix
|
|
432
|
-
>
|
|
433
|
-
{{ instance.component.prefix }}
|
|
434
|
-
</span>
|
|
435
|
-
<input matInput
|
|
436
|
-
type="{{ inputType }}"
|
|
437
|
-
[formControl]="control"
|
|
438
|
-
[placeholder]="instance.component.placeholder"
|
|
439
|
-
(input)="onChange()" #input
|
|
440
|
-
>
|
|
441
|
-
<span *ngIf="instance.component.suffix" matSuffix>{{ instance.component.suffix }}</span>
|
|
442
|
-
|
|
443
|
-
<mat-hint *ngIf="instance.component.showWordCount || instance.component.showCharCount">
|
|
444
|
-
{{ getHint() }}
|
|
445
|
-
</mat-hint>
|
|
446
|
-
|
|
447
|
-
<br/>
|
|
448
|
-
<mat-error *ngIf="isError()" >{{ getErrorMessage() }}</mat-error>
|
|
449
|
-
</mat-form-field>
|
|
450
|
-
</ng-template>
|
|
451
|
-
`;
|
|
452
|
-
class MaterialTextfieldComponent extends MaterialComponent {
|
|
453
|
-
constructor() {
|
|
454
|
-
super(...arguments);
|
|
455
|
-
this.inputType = 'text';
|
|
456
|
-
}
|
|
457
|
-
ngAfterContentInit() {
|
|
458
|
-
if (this.instance && this.control && this.instance.component.disabled) {
|
|
459
|
-
this.control.disable();
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
getHint() {
|
|
463
|
-
if (!this.instance || !this.control || !this.control.value) {
|
|
464
|
-
return '';
|
|
465
|
-
}
|
|
466
|
-
const { showWordCount, showCharCount } = this.instance.component;
|
|
467
|
-
if (showWordCount && showCharCount) {
|
|
468
|
-
return `${this.getWordsCount()} words, ${this.control.value.length} characters`;
|
|
469
|
-
}
|
|
470
|
-
else if (showWordCount) {
|
|
471
|
-
return `${this.getWordsCount()} words`;
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
return `${this.control.value.length} characters`;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
getWordsCount() {
|
|
478
|
-
const matches = this.control.value ? this.control.value.match(/[\w\d’'-]+/gi) : [];
|
|
479
|
-
return matches ? matches.length : 0;
|
|
480
|
-
}
|
|
481
|
-
getFormFieldAppearance() {
|
|
482
|
-
const appearances = ['legacy', 'standard', 'fill', 'outline'];
|
|
483
|
-
const appearance = this.instance.component.appearance ? this.instance.component.appearance.toLowerCase() : '';
|
|
484
|
-
return appearances.includes(appearance) ? appearance : undefined;
|
|
485
|
-
}
|
|
486
|
-
isError() {
|
|
487
|
-
if (this.instance.error) {
|
|
488
|
-
this.control.setErrors(this.instance.component.validate);
|
|
489
|
-
return true;
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
return false;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
getErrorMessage() {
|
|
496
|
-
if (this.instance.error && this.instance.error.messages) {
|
|
497
|
-
const { messages } = this.instance.error;
|
|
498
|
-
for (const msg of messages) {
|
|
499
|
-
if (msg.context && this.control.hasError(msg.context.validator)) {
|
|
500
|
-
return this.instance.error.message;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
MaterialTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTextfieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
507
|
-
MaterialTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTextfieldComponent, selector: "mat-formio-textfield", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTextfieldComponent, decorators: [{
|
|
509
|
-
type: Component,
|
|
510
|
-
args: [{
|
|
511
|
-
selector: 'mat-formio-textfield',
|
|
512
|
-
template: TEXTFIELD_TEMPLATE
|
|
513
|
-
}]
|
|
514
|
-
}] });
|
|
515
|
-
TextFieldComponent.MaterialComponent = MaterialTextfieldComponent;
|
|
516
|
-
|
|
517
|
-
class MaterialPasswordComponent extends MaterialTextfieldComponent {
|
|
518
|
-
constructor() {
|
|
519
|
-
super(...arguments);
|
|
520
|
-
this.inputType = 'password';
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
MaterialPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
524
|
-
MaterialPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialPasswordComponent, selector: "mat-formio-password", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPasswordComponent, decorators: [{
|
|
526
|
-
type: Component,
|
|
527
|
-
args: [{
|
|
528
|
-
selector: 'mat-formio-password',
|
|
529
|
-
template: TEXTFIELD_TEMPLATE
|
|
530
|
-
}]
|
|
531
|
-
}] });
|
|
532
|
-
PasswordComponent.MaterialComponent = MaterialPasswordComponent;
|
|
533
|
-
|
|
534
|
-
class MaterialEmailComponent extends MaterialTextfieldComponent {
|
|
535
|
-
constructor() {
|
|
536
|
-
super(...arguments);
|
|
537
|
-
this.inputType = 'email';
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
MaterialEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
541
|
-
MaterialEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialEmailComponent, selector: "mat-formio-email", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialEmailComponent, decorators: [{
|
|
543
|
-
type: Component,
|
|
544
|
-
args: [{
|
|
545
|
-
selector: 'mat-formio-email',
|
|
546
|
-
template: TEXTFIELD_TEMPLATE
|
|
547
|
-
}]
|
|
548
|
-
}] });
|
|
549
|
-
EmailComponent.MaterialComponent = MaterialEmailComponent;
|
|
550
|
-
|
|
551
|
-
class MaterialUrlComponent extends MaterialTextfieldComponent {
|
|
552
|
-
constructor() {
|
|
553
|
-
super(...arguments);
|
|
554
|
-
this.inputType = 'url';
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
MaterialUrlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialUrlComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
558
|
-
MaterialUrlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialUrlComponent, selector: "mat-formio-url", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialUrlComponent, decorators: [{
|
|
560
|
-
type: Component,
|
|
561
|
-
args: [{
|
|
562
|
-
selector: 'mat-formio-url',
|
|
563
|
-
template: TEXTFIELD_TEMPLATE
|
|
564
|
-
}]
|
|
565
|
-
}] });
|
|
566
|
-
UrlComponent.MaterialComponent = MaterialUrlComponent;
|
|
567
|
-
|
|
568
|
-
class MaterialPhoneNumberComponent extends MaterialTextfieldComponent {
|
|
569
|
-
constructor() {
|
|
570
|
-
super(...arguments);
|
|
571
|
-
this.inputType = 'text';
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
MaterialPhoneNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPhoneNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
575
|
-
MaterialPhoneNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialPhoneNumberComponent, selector: "mat-formio-phonenumber", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPhoneNumberComponent, decorators: [{
|
|
577
|
-
type: Component,
|
|
578
|
-
args: [{
|
|
579
|
-
selector: 'mat-formio-phonenumber',
|
|
580
|
-
template: TEXTFIELD_TEMPLATE
|
|
581
|
-
}]
|
|
582
|
-
}] });
|
|
583
|
-
PhoneNumberComponent.MaterialComponent = MaterialPhoneNumberComponent;
|
|
584
|
-
|
|
585
|
-
class MaterialNumberComponent extends MaterialTextfieldComponent {
|
|
586
|
-
constructor(element, ref, renderer) {
|
|
587
|
-
super(element, ref);
|
|
588
|
-
this.element = element;
|
|
589
|
-
this.ref = ref;
|
|
590
|
-
this.renderer = renderer;
|
|
591
|
-
this.inputType = 'text';
|
|
592
|
-
}
|
|
593
|
-
ngAfterViewInit() {
|
|
594
|
-
super.ngAfterViewInit();
|
|
595
|
-
if (this.instance) {
|
|
596
|
-
const { instance } = this;
|
|
597
|
-
this.renderer.listen(this.input.nativeElement, 'blur', () => {
|
|
598
|
-
let value = instance.parseValue(this.control.value);
|
|
599
|
-
value = instance.formatValue(value);
|
|
600
|
-
value = instance.getValueAsString(value);
|
|
601
|
-
this.control.setValue(value);
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
getValue() {
|
|
606
|
-
let value = this.control.value;
|
|
607
|
-
if (value && this.instance) {
|
|
608
|
-
value = value.replace(this.instance.prefix, '');
|
|
609
|
-
return !_.isNil(value) && value !== '' ? this.instance.parseNumber(value) : value;
|
|
610
|
-
}
|
|
611
|
-
return value;
|
|
612
|
-
}
|
|
613
|
-
setValue(value) {
|
|
614
|
-
if (this.instance) {
|
|
615
|
-
const { instance } = this;
|
|
616
|
-
value = instance.formatValue(instance.parseValue(value));
|
|
617
|
-
}
|
|
618
|
-
else {
|
|
619
|
-
value = value.toString();
|
|
620
|
-
}
|
|
621
|
-
return super.setValue(value);
|
|
622
|
-
}
|
|
623
|
-
onChange() {
|
|
624
|
-
super.onChange(true);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
MaterialNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialNumberComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
628
|
-
MaterialNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialNumberComponent, selector: "mat-formio-number", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialNumberComponent, decorators: [{
|
|
630
|
-
type: Component,
|
|
631
|
-
args: [{
|
|
632
|
-
selector: 'mat-formio-number',
|
|
633
|
-
template: TEXTFIELD_TEMPLATE
|
|
634
|
-
}]
|
|
635
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; } });
|
|
636
|
-
NumberComponent.MaterialComponent = MaterialNumberComponent;
|
|
637
|
-
|
|
638
|
-
class MaterialCurrencyComponent extends MaterialNumberComponent {
|
|
639
|
-
constructor() {
|
|
640
|
-
super(...arguments);
|
|
641
|
-
this.inputType = 'text';
|
|
642
|
-
}
|
|
643
|
-
onChange() {
|
|
644
|
-
const newValue = _.isNil(this.getValue()) ? '' : this.getValue();
|
|
645
|
-
this.instance.updateValue(newValue, { modified: true });
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
MaterialCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCurrencyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
649
|
-
MaterialCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialCurrencyComponent, selector: "mat-formio-currency", usesInheritance: true, ngImport: i0, template: "\n <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\"></mat-formio-form-field>\n <ng-template #componentTemplate let-hasLabel>\n <mat-form-field [appearance]=\"getFormFieldAppearance()\" fxFill>\n\n <mat-label *ngIf=\"hasLabel\">\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-label>\n\n <span *ngIf=\"instance.component.prefix && instance.type !== 'currency'\"\n matPrefix\n >\n {{ instance.component.prefix }} \n </span>\n <input matInput\n type=\"{{ inputType }}\"\n [formControl]=\"control\"\n [placeholder]=\"instance.component.placeholder\"\n (input)=\"onChange()\" #input\n >\n <span *ngIf=\"instance.component.suffix\" matSuffix>{{ instance.component.suffix }}</span>\n\n <mat-hint *ngIf=\"instance.component.showWordCount || instance.component.showCharCount\">\n {{ getHint() }}\n </mat-hint>\n\n <br/>\n <mat-error *ngIf=\"isError()\" >{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n </ng-template>\n", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCurrencyComponent, decorators: [{
|
|
651
|
-
type: Component,
|
|
652
|
-
args: [{
|
|
653
|
-
selector: 'mat-formio-currency',
|
|
654
|
-
template: TEXTFIELD_TEMPLATE
|
|
655
|
-
}]
|
|
656
|
-
}] });
|
|
657
|
-
CurrencyComponent.MaterialComponent = MaterialCurrencyComponent;
|
|
658
|
-
|
|
659
|
-
DayComponent.prototype.getFieldValue = function (name) {
|
|
660
|
-
return this.refs[name] ? this.refs[name].value : '';
|
|
661
|
-
};
|
|
662
|
-
class MaterialDayComponent extends MaterialComponent {
|
|
663
|
-
constructor() {
|
|
664
|
-
super(...arguments);
|
|
665
|
-
this.dayControl = new FormControl();
|
|
666
|
-
this.monthControl = new FormControl();
|
|
667
|
-
this.yearControl = new FormControl();
|
|
668
|
-
}
|
|
669
|
-
setInstance(instance) {
|
|
670
|
-
// Add stub methods to match dom elements.
|
|
671
|
-
this.dayControl.setAttribute = () => { };
|
|
672
|
-
this.dayControl.removeAttribute = () => { };
|
|
673
|
-
this.monthControl.setAttribute = () => { };
|
|
674
|
-
this.monthControl.removeAttribute = () => { };
|
|
675
|
-
this.yearControl.setAttribute = () => { };
|
|
676
|
-
this.yearControl.removeAttribute = () => { };
|
|
677
|
-
instance.refs = {
|
|
678
|
-
day: this.dayControl,
|
|
679
|
-
month: this.monthControl,
|
|
680
|
-
year: this.yearControl
|
|
681
|
-
};
|
|
682
|
-
return super.setInstance(instance);
|
|
683
|
-
}
|
|
684
|
-
setDisabled(disabled) {
|
|
685
|
-
if (disabled) {
|
|
686
|
-
this.dayControl.disable();
|
|
687
|
-
this.monthControl.disable();
|
|
688
|
-
this.yearControl.disable();
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
this.dayControl.enable();
|
|
692
|
-
this.monthControl.enable();
|
|
693
|
-
this.yearControl.enable();
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
getValue() {
|
|
697
|
-
return this.instance.getDate();
|
|
698
|
-
}
|
|
699
|
-
setValue(value) {
|
|
700
|
-
if (value) {
|
|
701
|
-
this.dayControl.setValue(parseInt(momentDate(value).format('D')));
|
|
702
|
-
this.monthControl.setValue(parseInt(momentDate(value).format('M')));
|
|
703
|
-
this.yearControl.setValue(parseInt(momentDate(value).format('YYYY')));
|
|
704
|
-
}
|
|
705
|
-
this.instance.setValueAt(0, value);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
MaterialDayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
709
|
-
MaterialDayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialDayComponent, selector: "mat-formio-day", usesInheritance: true, ngImport: i0, template: `
|
|
710
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
711
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
712
|
-
<mat-label *ngIf="hasLabel">
|
|
713
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
714
|
-
</mat-label>
|
|
715
|
-
<mat-form-field *ngIf="instance.dayFirst && instance.showDay">
|
|
716
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Day</mat-label>
|
|
717
|
-
<mat-select [formControl]="dayControl" (selectionChange)="onChange()" [required]="instance.dayRequired">
|
|
718
|
-
<mat-option *ngFor="let day of instance.days" [value]="day.value">
|
|
719
|
-
{{day.label}}
|
|
720
|
-
</mat-option>
|
|
721
|
-
</mat-select>
|
|
722
|
-
</mat-form-field>
|
|
723
|
-
<mat-form-field *ngIf="instance.showMonth">
|
|
724
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Month</mat-label>
|
|
725
|
-
<mat-select [formControl]="monthControl" (selectionChange)="onChange()" [required]="instance.monthRequired">
|
|
726
|
-
<mat-option *ngFor="let month of instance.months" [value]="month.value">
|
|
727
|
-
{{month.label}}
|
|
728
|
-
</mat-option>
|
|
729
|
-
</mat-select>
|
|
730
|
-
</mat-form-field>
|
|
731
|
-
<mat-form-field *ngIf="!instance.dayFirst && instance.showDay">
|
|
732
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Day</mat-label>
|
|
733
|
-
<mat-select [formControl]="dayControl" (selectionChange)="onChange()" [required]="instance.dayRequired">
|
|
734
|
-
<mat-option *ngFor="let day of instance.days" [value]="day.value">
|
|
735
|
-
{{day.label}}
|
|
736
|
-
</mat-option>
|
|
737
|
-
</mat-select>
|
|
738
|
-
</mat-form-field>
|
|
739
|
-
<mat-form-field *ngIf="instance.showYear">
|
|
740
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Year</mat-label>
|
|
741
|
-
<mat-select [formControl]="yearControl" (selectionChange)="onChange()" [required]="instance.yearRequired">
|
|
742
|
-
<mat-option *ngFor="let year of instance.years" [value]="year.value">
|
|
743
|
-
{{year.label}}
|
|
744
|
-
</mat-option>
|
|
745
|
-
</mat-select>
|
|
746
|
-
</mat-form-field>
|
|
747
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
748
|
-
</ng-template>
|
|
749
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDayComponent, decorators: [{
|
|
751
|
-
type: Component,
|
|
752
|
-
args: [{
|
|
753
|
-
selector: 'mat-formio-day',
|
|
754
|
-
template: `
|
|
755
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
756
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
757
|
-
<mat-label *ngIf="hasLabel">
|
|
758
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
759
|
-
</mat-label>
|
|
760
|
-
<mat-form-field *ngIf="instance.dayFirst && instance.showDay">
|
|
761
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Day</mat-label>
|
|
762
|
-
<mat-select [formControl]="dayControl" (selectionChange)="onChange()" [required]="instance.dayRequired">
|
|
763
|
-
<mat-option *ngFor="let day of instance.days" [value]="day.value">
|
|
764
|
-
{{day.label}}
|
|
765
|
-
</mat-option>
|
|
766
|
-
</mat-select>
|
|
767
|
-
</mat-form-field>
|
|
768
|
-
<mat-form-field *ngIf="instance.showMonth">
|
|
769
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Month</mat-label>
|
|
770
|
-
<mat-select [formControl]="monthControl" (selectionChange)="onChange()" [required]="instance.monthRequired">
|
|
771
|
-
<mat-option *ngFor="let month of instance.months" [value]="month.value">
|
|
772
|
-
{{month.label}}
|
|
773
|
-
</mat-option>
|
|
774
|
-
</mat-select>
|
|
775
|
-
</mat-form-field>
|
|
776
|
-
<mat-form-field *ngIf="!instance.dayFirst && instance.showDay">
|
|
777
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Day</mat-label>
|
|
778
|
-
<mat-select [formControl]="dayControl" (selectionChange)="onChange()" [required]="instance.dayRequired">
|
|
779
|
-
<mat-option *ngFor="let day of instance.days" [value]="day.value">
|
|
780
|
-
{{day.label}}
|
|
781
|
-
</mat-option>
|
|
782
|
-
</mat-select>
|
|
783
|
-
</mat-form-field>
|
|
784
|
-
<mat-form-field *ngIf="instance.showYear">
|
|
785
|
-
<mat-label *ngIf="!instance.component.hideInputLabels">Year</mat-label>
|
|
786
|
-
<mat-select [formControl]="yearControl" (selectionChange)="onChange()" [required]="instance.yearRequired">
|
|
787
|
-
<mat-option *ngFor="let year of instance.years" [value]="year.value">
|
|
788
|
-
{{year.label}}
|
|
789
|
-
</mat-option>
|
|
790
|
-
</mat-select>
|
|
791
|
-
</mat-form-field>
|
|
792
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
793
|
-
</ng-template>
|
|
794
|
-
`
|
|
795
|
-
}]
|
|
796
|
-
}] });
|
|
797
|
-
DayComponent.MaterialComponent = MaterialDayComponent;
|
|
798
|
-
|
|
799
|
-
class MaterialHiddenComponent extends MaterialComponent {
|
|
800
|
-
}
|
|
801
|
-
MaterialHiddenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialHiddenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
802
|
-
MaterialHiddenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialHiddenComponent, selector: "mat-formio-hidden", usesInheritance: true, ngImport: i0, template: `<input matInput type="hidden" [formControl]="control" #input>`, isInline: true, dependencies: [{ kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$3.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"] }] });
|
|
803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialHiddenComponent, decorators: [{
|
|
804
|
-
type: Component,
|
|
805
|
-
args: [{
|
|
806
|
-
selector: 'mat-formio-hidden',
|
|
807
|
-
template: `<input matInput type="hidden" [formControl]="control" #input>`
|
|
808
|
-
}]
|
|
809
|
-
}] });
|
|
810
|
-
HiddenComponent.MaterialComponent = MaterialHiddenComponent;
|
|
811
|
-
|
|
812
|
-
class MaterialHtmlComponent extends MaterialComponent {
|
|
813
|
-
ngAfterViewInit() {
|
|
814
|
-
super.ngAfterViewInit();
|
|
815
|
-
if (this.instance.component.refreshOnChange) {
|
|
816
|
-
this.instance.checkRefreshOn = () => {
|
|
817
|
-
this.htmlBody.nativeElement.innerHTML = this.instance.renderContent();
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
MaterialHtmlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialHtmlComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
-
MaterialHtmlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialHtmlComponent, selector: "mat-formio-html", viewQueries: [{ propertyName: "htmlBody", first: true, predicate: ["htmlBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div #htmlBody></div>`, isInline: true });
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialHtmlComponent, decorators: [{
|
|
825
|
-
type: Component,
|
|
826
|
-
args: [{
|
|
827
|
-
selector: 'mat-formio-html',
|
|
828
|
-
template: `<div #htmlBody></div>`
|
|
829
|
-
}]
|
|
830
|
-
}], propDecorators: { htmlBody: [{
|
|
831
|
-
type: ViewChild,
|
|
832
|
-
args: ['htmlBody']
|
|
833
|
-
}] } });
|
|
834
|
-
HtmlComponent.MaterialComponent = MaterialHtmlComponent;
|
|
835
|
-
|
|
836
|
-
class MaterialTagsComponent extends MaterialComponent {
|
|
837
|
-
constructor() {
|
|
838
|
-
super(...arguments);
|
|
839
|
-
this.separatorKeysCodes = [ENTER, COMMA];
|
|
840
|
-
this.tags = [];
|
|
841
|
-
}
|
|
842
|
-
add(event) {
|
|
843
|
-
const input = event.input;
|
|
844
|
-
const value = event.value;
|
|
845
|
-
if ((value || '').trim()) {
|
|
846
|
-
this.tags.push(value.trim());
|
|
847
|
-
}
|
|
848
|
-
if (input) {
|
|
849
|
-
input.value = '';
|
|
850
|
-
}
|
|
851
|
-
this.onChange();
|
|
852
|
-
}
|
|
853
|
-
remove(index) {
|
|
854
|
-
if (index >= 0 && index < this.tags.length) {
|
|
855
|
-
this.tags.splice(index, 1);
|
|
856
|
-
}
|
|
857
|
-
this.onChange();
|
|
858
|
-
}
|
|
859
|
-
getValue() {
|
|
860
|
-
return (this.instance.component.storeas === 'string') ? this.tags.join(this.instance.delimiter) : this.tags;
|
|
861
|
-
}
|
|
862
|
-
setValue(value) {
|
|
863
|
-
if (typeof value === 'string') {
|
|
864
|
-
value = value.split(this.instance.delimiter);
|
|
865
|
-
}
|
|
866
|
-
if (value && !Array.isArray(value)) {
|
|
867
|
-
value = [value];
|
|
868
|
-
}
|
|
869
|
-
this.tags = value;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
MaterialTagsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTagsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
873
|
-
MaterialTagsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTagsComponent, selector: "mat-formio-tags", usesInheritance: true, ngImport: i0, template: `
|
|
874
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
875
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
876
|
-
<mat-form-field class="example-chip-list" fxFill>
|
|
877
|
-
|
|
878
|
-
<mat-label *ngIf="hasLabel">
|
|
879
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
880
|
-
</mat-label>
|
|
881
|
-
|
|
882
|
-
<mat-chip-list #chipList [attr.aria-label]="instance.component.label">
|
|
883
|
-
<mat-chip *ngFor="let tag of tags; index as i;"
|
|
884
|
-
[selectable]="true"
|
|
885
|
-
[removable]="true"
|
|
886
|
-
(removed)="remove(i)"
|
|
887
|
-
>
|
|
888
|
-
{{tag}}
|
|
889
|
-
<mat-icon matChipRemove>cancel</mat-icon>
|
|
890
|
-
</mat-chip>
|
|
891
|
-
|
|
892
|
-
<input [formControl]="control"
|
|
893
|
-
[matChipInputFor]="chipList"
|
|
894
|
-
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
|
|
895
|
-
[matChipInputAddOnBlur]="true"
|
|
896
|
-
(matChipInputTokenEnd)="add($event)"
|
|
897
|
-
>
|
|
898
|
-
</mat-chip-list>
|
|
899
|
-
</mat-form-field>
|
|
900
|
-
</ng-template>
|
|
901
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$5.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i4$5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i4$5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i4$5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTagsComponent, decorators: [{
|
|
903
|
-
type: Component,
|
|
904
|
-
args: [{
|
|
905
|
-
selector: 'mat-formio-tags',
|
|
906
|
-
template: `
|
|
907
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
908
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
909
|
-
<mat-form-field class="example-chip-list" fxFill>
|
|
910
|
-
|
|
911
|
-
<mat-label *ngIf="hasLabel">
|
|
912
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
913
|
-
</mat-label>
|
|
914
|
-
|
|
915
|
-
<mat-chip-list #chipList [attr.aria-label]="instance.component.label">
|
|
916
|
-
<mat-chip *ngFor="let tag of tags; index as i;"
|
|
917
|
-
[selectable]="true"
|
|
918
|
-
[removable]="true"
|
|
919
|
-
(removed)="remove(i)"
|
|
920
|
-
>
|
|
921
|
-
{{tag}}
|
|
922
|
-
<mat-icon matChipRemove>cancel</mat-icon>
|
|
923
|
-
</mat-chip>
|
|
924
|
-
|
|
925
|
-
<input [formControl]="control"
|
|
926
|
-
[matChipInputFor]="chipList"
|
|
927
|
-
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
|
|
928
|
-
[matChipInputAddOnBlur]="true"
|
|
929
|
-
(matChipInputTokenEnd)="add($event)"
|
|
930
|
-
>
|
|
931
|
-
</mat-chip-list>
|
|
932
|
-
</mat-form-field>
|
|
933
|
-
</ng-template>
|
|
934
|
-
`
|
|
935
|
-
}]
|
|
936
|
-
}] });
|
|
937
|
-
TagsComponent.MaterialComponent = MaterialTagsComponent;
|
|
938
|
-
|
|
939
|
-
var ButtonsThemes;
|
|
940
|
-
(function (ButtonsThemes) {
|
|
941
|
-
ButtonsThemes["PRIMARY"] = "primary";
|
|
942
|
-
ButtonsThemes["SECONDARY"] = "secondary";
|
|
943
|
-
ButtonsThemes["INFO"] = "info";
|
|
944
|
-
ButtonsThemes["WARNING"] = "warning";
|
|
945
|
-
ButtonsThemes["DANGER"] = "danger";
|
|
946
|
-
ButtonsThemes["SUCCESS"] = "success";
|
|
947
|
-
})(ButtonsThemes || (ButtonsThemes = {}));
|
|
948
|
-
var AngularButtonsThemes;
|
|
949
|
-
(function (AngularButtonsThemes) {
|
|
950
|
-
AngularButtonsThemes["WARN"] = "warn";
|
|
951
|
-
AngularButtonsThemes["PRIMARY"] = "primary";
|
|
952
|
-
AngularButtonsThemes["BASIC"] = "basic";
|
|
953
|
-
AngularButtonsThemes["ACCENT"] = "accent";
|
|
954
|
-
})(AngularButtonsThemes || (AngularButtonsThemes = {}));
|
|
955
|
-
|
|
956
|
-
class MaterialButtonComponent extends MaterialComponent {
|
|
957
|
-
constructor() {
|
|
958
|
-
super(...arguments);
|
|
959
|
-
this.loading = false;
|
|
960
|
-
this.done = false;
|
|
961
|
-
this.error = false;
|
|
962
|
-
this.disabled = false;
|
|
963
|
-
this.clicked = false;
|
|
964
|
-
}
|
|
965
|
-
get color() {
|
|
966
|
-
if (this.error) {
|
|
967
|
-
return AngularButtonsThemes.WARN;
|
|
968
|
-
}
|
|
969
|
-
const theme = this.angularButtonTheme;
|
|
970
|
-
return theme || AngularButtonsThemes.PRIMARY;
|
|
971
|
-
}
|
|
972
|
-
get angularButtonTheme() {
|
|
973
|
-
switch (this.instance.component.theme) {
|
|
974
|
-
case ButtonsThemes.PRIMARY:
|
|
975
|
-
return AngularButtonsThemes.PRIMARY;
|
|
976
|
-
case ButtonsThemes.WARNING:
|
|
977
|
-
return AngularButtonsThemes.ACCENT;
|
|
978
|
-
case ButtonsThemes.DANGER:
|
|
979
|
-
return AngularButtonsThemes.WARN;
|
|
980
|
-
case ButtonsThemes.SECONDARY:
|
|
981
|
-
return AngularButtonsThemes.BASIC;
|
|
982
|
-
default:
|
|
983
|
-
return '';
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
get buttonClass() {
|
|
987
|
-
let className = this.instance.component.block ? 'mat-formio-button-block' : '';
|
|
988
|
-
className += this.instance.component.size ? ` mat-formio-button-${this.instance.component.size}` : '';
|
|
989
|
-
className += !this.angularButtonTheme ? ` mat-formio-theme-${this.instance.component.theme}` : '';
|
|
990
|
-
return className;
|
|
991
|
-
}
|
|
992
|
-
onClick(event) {
|
|
993
|
-
this.clicked = true;
|
|
994
|
-
this.instance.onClick(event);
|
|
995
|
-
}
|
|
996
|
-
getValue() {
|
|
997
|
-
return this.clicked;
|
|
998
|
-
}
|
|
999
|
-
setState(loading, error, done) {
|
|
1000
|
-
this.loading = loading;
|
|
1001
|
-
this.done = done;
|
|
1002
|
-
this.error = error;
|
|
1003
|
-
}
|
|
1004
|
-
getIconFontSet(icon) {
|
|
1005
|
-
const fontSet = icon.split(' ')[0];
|
|
1006
|
-
return fontSet;
|
|
1007
|
-
}
|
|
1008
|
-
getIconName(icon) {
|
|
1009
|
-
return icon.replace(this.getIconFontSet(icon), '');
|
|
1010
|
-
}
|
|
1011
|
-
setInstance(instance) {
|
|
1012
|
-
const retVal = super.setInstance(instance);
|
|
1013
|
-
this.disabled = instance.shouldDisabled;
|
|
1014
|
-
instance.on('submitButton', () => this.setState(true, false, false));
|
|
1015
|
-
instance.on('submitDone', () => this.setState(false, false, true));
|
|
1016
|
-
instance.on('submitError', () => this.setState(false, true, false));
|
|
1017
|
-
instance.on('requestButton', () => this.setState(true, false, false));
|
|
1018
|
-
instance.on('requestDone', () => this.setState(false, false, true));
|
|
1019
|
-
instance.on('change', (event) => {
|
|
1020
|
-
this.disabled = this.instance.shouldDisabled || (this.instance.component.disableOnInvalid && !event.isValid);
|
|
1021
|
-
if (event.isValid) {
|
|
1022
|
-
this.loading = false;
|
|
1023
|
-
this.error = false;
|
|
1024
|
-
}
|
|
1025
|
-
});
|
|
1026
|
-
return retVal;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
MaterialButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1030
|
-
MaterialButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialButtonComponent, selector: "mat-formio-button", usesInheritance: true, ngImport: i0, template: "<button *ngIf=\"instance\"\n [ngClass]=\"buttonClass\"\n type=\"{{ instance.component.action }}\"\n mat-raised-button [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"instance.onClick($event)\"\n>\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\n <mat-icon *ngIf=\"done\">done</mat-icon>\n <mat-icon *ngIf=\"error\">close</mat-icon>\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\n {{ instance.component.label }}\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\n</button>\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
1031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialButtonComponent, decorators: [{
|
|
1032
|
-
type: Component,
|
|
1033
|
-
args: [{ selector: 'mat-formio-button', template: "<button *ngIf=\"instance\"\n [ngClass]=\"buttonClass\"\n type=\"{{ instance.component.action }}\"\n mat-raised-button [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"instance.onClick($event)\"\n>\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\n <mat-icon *ngIf=\"done\">done</mat-icon>\n <mat-icon *ngIf=\"error\">close</mat-icon>\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\n {{ instance.component.label }}\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\n</button>\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"] }]
|
|
1034
|
-
}] });
|
|
1035
|
-
ButtonComponent.MaterialComponent = MaterialButtonComponent;
|
|
1036
|
-
|
|
1037
|
-
class MaterialTextareaComponent extends MaterialComponent {
|
|
1038
|
-
ngAfterViewInit() {
|
|
1039
|
-
// Attach the element so the wysiwyg will work.
|
|
1040
|
-
this.instance.attachElement(this.textarea.nativeElement);
|
|
1041
|
-
}
|
|
1042
|
-
getValue() {
|
|
1043
|
-
return isNil(this.control.value) ? '' : this.control.value;
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
MaterialTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1047
|
-
MaterialTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTextareaComponent, selector: "mat-formio-textarea", viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1048
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
1049
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1050
|
-
<mat-form-field class="mat-formio-textarea"
|
|
1051
|
-
[ngClass]="{'editor-enabled': !!instance.component.editor}"
|
|
1052
|
-
fxFill
|
|
1053
|
-
fxFlexAlign="center"
|
|
1054
|
-
>
|
|
1055
|
-
<mat-label fxFill *ngIf="hasLabel">
|
|
1056
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1057
|
-
</mat-label>
|
|
1058
|
-
<span *ngIf="instance.component.prefix" matPrefix>{{ instance.component.prefix }} </span>
|
|
1059
|
-
<textarea matInput
|
|
1060
|
-
[placeholder]="instance.component.placeholder"
|
|
1061
|
-
[formControl]="control"
|
|
1062
|
-
[rows]="(instance.component.rows || 3)"
|
|
1063
|
-
(input)="onChange()"
|
|
1064
|
-
#textarea
|
|
1065
|
-
>
|
|
1066
|
-
</textarea>
|
|
1067
|
-
<span *ngIf="instance.component.suffix" matSuffix>{{ instance.component.suffix }}</span>
|
|
1068
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1069
|
-
</mat-form-field>
|
|
1070
|
-
</ng-template>
|
|
1071
|
-
`, isInline: true, styles: [".mat-input-element{min-height:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.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"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i5.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
1072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTextareaComponent, decorators: [{
|
|
1073
|
-
type: Component,
|
|
1074
|
-
args: [{ selector: 'mat-formio-textarea', template: `
|
|
1075
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
1076
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1077
|
-
<mat-form-field class="mat-formio-textarea"
|
|
1078
|
-
[ngClass]="{'editor-enabled': !!instance.component.editor}"
|
|
1079
|
-
fxFill
|
|
1080
|
-
fxFlexAlign="center"
|
|
1081
|
-
>
|
|
1082
|
-
<mat-label fxFill *ngIf="hasLabel">
|
|
1083
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1084
|
-
</mat-label>
|
|
1085
|
-
<span *ngIf="instance.component.prefix" matPrefix>{{ instance.component.prefix }} </span>
|
|
1086
|
-
<textarea matInput
|
|
1087
|
-
[placeholder]="instance.component.placeholder"
|
|
1088
|
-
[formControl]="control"
|
|
1089
|
-
[rows]="(instance.component.rows || 3)"
|
|
1090
|
-
(input)="onChange()"
|
|
1091
|
-
#textarea
|
|
1092
|
-
>
|
|
1093
|
-
</textarea>
|
|
1094
|
-
<span *ngIf="instance.component.suffix" matSuffix>{{ instance.component.suffix }}</span>
|
|
1095
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1096
|
-
</mat-form-field>
|
|
1097
|
-
</ng-template>
|
|
1098
|
-
`, styles: [".mat-input-element{min-height:16px}\n"] }]
|
|
1099
|
-
}], propDecorators: { textarea: [{
|
|
1100
|
-
type: ViewChild,
|
|
1101
|
-
args: ['textarea']
|
|
1102
|
-
}] } });
|
|
1103
|
-
TextAreaComponent.MaterialComponent = MaterialTextareaComponent;
|
|
1104
|
-
|
|
1105
|
-
class MaterialNestedComponent extends MaterialComponent {
|
|
1106
|
-
setInstance(instance) {
|
|
1107
|
-
instance.viewContainer = () => {
|
|
1108
|
-
return this.viewContainers ? this.viewContainers[0] : null;
|
|
1109
|
-
};
|
|
1110
|
-
super.setInstance(instance);
|
|
1111
|
-
}
|
|
1112
|
-
renderComponents() {
|
|
1113
|
-
if (this.instance.renderComponents) {
|
|
1114
|
-
this.instance.renderComponents();
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
render() {
|
|
1118
|
-
this.viewContainers = this.components.toArray();
|
|
1119
|
-
this.renderComponents();
|
|
1120
|
-
this.ref.detectChanges();
|
|
1121
|
-
}
|
|
1122
|
-
ngAfterViewInit() {
|
|
1123
|
-
this.components.changes.subscribe(() => this.render());
|
|
1124
|
-
this.render();
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
MaterialNestedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialNestedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1128
|
-
MaterialNestedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialNestedComponent, selector: "mat-formio-nested", viewQueries: [{ propertyName: "components", predicate: ["components"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: '<ng-template #components></ng-template>', isInline: true });
|
|
1129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialNestedComponent, decorators: [{
|
|
1130
|
-
type: Component,
|
|
1131
|
-
args: [{
|
|
1132
|
-
selector: 'mat-formio-nested',
|
|
1133
|
-
template: '<ng-template #components></ng-template>'
|
|
1134
|
-
}]
|
|
1135
|
-
}], propDecorators: { components: [{
|
|
1136
|
-
type: ViewChildren,
|
|
1137
|
-
args: ['components', { read: ViewContainerRef }]
|
|
1138
|
-
}] } });
|
|
1139
|
-
|
|
1140
|
-
class MaterialPanelComponent extends MaterialNestedComponent {
|
|
1141
|
-
}
|
|
1142
|
-
MaterialPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPanelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1143
|
-
MaterialPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialPanelComponent, selector: "mat-formio-panel", usesInheritance: true, ngImport: i0, template: `
|
|
1144
|
-
<mat-card *ngIf="!instance.component.collapsible">
|
|
1145
|
-
<mat-card-title *ngIf="instance?.component?.title">
|
|
1146
|
-
{{ instance.component.title }}
|
|
1147
|
-
</mat-card-title>
|
|
1148
|
-
<mat-card-content fxLayout="column" fxLayoutGap="1em">
|
|
1149
|
-
<ng-template #components></ng-template>
|
|
1150
|
-
</mat-card-content>
|
|
1151
|
-
</mat-card>
|
|
1152
|
-
<mat-expansion-panel *ngIf="instance.component.collapsible"
|
|
1153
|
-
[expanded]="!instance.component.collapsed"
|
|
1154
|
-
>
|
|
1155
|
-
<mat-expansion-panel-header *ngIf="instance?.component?.title">
|
|
1156
|
-
<mat-panel-title>
|
|
1157
|
-
{{ instance.component.title }}
|
|
1158
|
-
</mat-panel-title>
|
|
1159
|
-
</mat-expansion-panel-header>
|
|
1160
|
-
<ng-template #components></ng-template>
|
|
1161
|
-
</mat-expansion-panel>
|
|
1162
|
-
`, isInline: true, styles: [":host{margin-bottom:1em}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i2$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i2$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }] });
|
|
1163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialPanelComponent, decorators: [{
|
|
1164
|
-
type: Component,
|
|
1165
|
-
args: [{ selector: 'mat-formio-panel', template: `
|
|
1166
|
-
<mat-card *ngIf="!instance.component.collapsible">
|
|
1167
|
-
<mat-card-title *ngIf="instance?.component?.title">
|
|
1168
|
-
{{ instance.component.title }}
|
|
1169
|
-
</mat-card-title>
|
|
1170
|
-
<mat-card-content fxLayout="column" fxLayoutGap="1em">
|
|
1171
|
-
<ng-template #components></ng-template>
|
|
1172
|
-
</mat-card-content>
|
|
1173
|
-
</mat-card>
|
|
1174
|
-
<mat-expansion-panel *ngIf="instance.component.collapsible"
|
|
1175
|
-
[expanded]="!instance.component.collapsed"
|
|
1176
|
-
>
|
|
1177
|
-
<mat-expansion-panel-header *ngIf="instance?.component?.title">
|
|
1178
|
-
<mat-panel-title>
|
|
1179
|
-
{{ instance.component.title }}
|
|
1180
|
-
</mat-panel-title>
|
|
1181
|
-
</mat-expansion-panel-header>
|
|
1182
|
-
<ng-template #components></ng-template>
|
|
1183
|
-
</mat-expansion-panel>
|
|
1184
|
-
`, styles: [":host{margin-bottom:1em}\n"] }]
|
|
1185
|
-
}] });
|
|
1186
|
-
PanelComponent.MaterialComponent = MaterialPanelComponent;
|
|
1187
|
-
|
|
1188
|
-
class MaterialColumnsComponent extends MaterialNestedComponent {
|
|
1189
|
-
constructor() {
|
|
1190
|
-
super(...arguments);
|
|
1191
|
-
this.flexGap = 0.5;
|
|
1192
|
-
this.totalSpace = 0;
|
|
1193
|
-
}
|
|
1194
|
-
setInstance(instance) {
|
|
1195
|
-
this.totalSpace = 100 - ((instance.component.columns.length - 1) * this.flexGap);
|
|
1196
|
-
super.setInstance(instance);
|
|
1197
|
-
instance.viewContainer = (component) => {
|
|
1198
|
-
return this.viewContainers ? this.viewContainers[component.column] : null;
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
flexWidth(column, index) {
|
|
1202
|
-
if (index >= (this.instance.component.columns.length - 1)) {
|
|
1203
|
-
return Math.ceil(((parseFloat(column.width) / 12) * this.totalSpace)) + '%';
|
|
1204
|
-
}
|
|
1205
|
-
else {
|
|
1206
|
-
return Math.floor(((parseFloat(column.width) / 12) * this.totalSpace)) + '%';
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
MaterialColumnsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialColumnsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1211
|
-
MaterialColumnsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialColumnsComponent, selector: "mat-formio-columns", usesInheritance: true, ngImport: i0, template: `
|
|
1212
|
-
<div class="container"
|
|
1213
|
-
fxLayout="row"
|
|
1214
|
-
fxLayout.xs="column"
|
|
1215
|
-
fxLayoutWrap
|
|
1216
|
-
fxLayoutGap="{{ flexGap }}%"
|
|
1217
|
-
fxLayoutAlign="center"
|
|
1218
|
-
>
|
|
1219
|
-
<div
|
|
1220
|
-
*ngFor="let column of instance.component.columns; let i = index"
|
|
1221
|
-
[fxFlex]="flexWidth(column, i)"
|
|
1222
|
-
fxLayout="column"
|
|
1223
|
-
fxLayoutGap="1em">
|
|
1224
|
-
<ng-template #components></ng-template>
|
|
1225
|
-
</div>
|
|
1226
|
-
</div>
|
|
1227
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
|
|
1228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialColumnsComponent, decorators: [{
|
|
1229
|
-
type: Component,
|
|
1230
|
-
args: [{ selector: 'mat-formio-columns', template: `
|
|
1231
|
-
<div class="container"
|
|
1232
|
-
fxLayout="row"
|
|
1233
|
-
fxLayout.xs="column"
|
|
1234
|
-
fxLayoutWrap
|
|
1235
|
-
fxLayoutGap="{{ flexGap }}%"
|
|
1236
|
-
fxLayoutAlign="center"
|
|
1237
|
-
>
|
|
1238
|
-
<div
|
|
1239
|
-
*ngFor="let column of instance.component.columns; let i = index"
|
|
1240
|
-
[fxFlex]="flexWidth(column, i)"
|
|
1241
|
-
fxLayout="column"
|
|
1242
|
-
fxLayoutGap="1em">
|
|
1243
|
-
<ng-template #components></ng-template>
|
|
1244
|
-
</div>
|
|
1245
|
-
</div>
|
|
1246
|
-
` }]
|
|
1247
|
-
}] });
|
|
1248
|
-
ColumnsComponent.MaterialComponent = MaterialColumnsComponent;
|
|
1249
|
-
|
|
1250
|
-
class MaterialContainerComponent extends MaterialNestedComponent {
|
|
1251
|
-
}
|
|
1252
|
-
MaterialContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1253
|
-
MaterialContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialContainerComponent, selector: "mat-formio-container", usesInheritance: true, ngImport: i0, template: `
|
|
1254
|
-
<div fxLayout="column" fxLayoutGap="1em">
|
|
1255
|
-
<ng-template #components></ng-template>
|
|
1256
|
-
</div>`, isInline: true, dependencies: [{ kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
|
|
1257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialContainerComponent, decorators: [{
|
|
1258
|
-
type: Component,
|
|
1259
|
-
args: [{
|
|
1260
|
-
selector: 'mat-formio-container',
|
|
1261
|
-
template: `
|
|
1262
|
-
<div fxLayout="column" fxLayoutGap="1em">
|
|
1263
|
-
<ng-template #components></ng-template>
|
|
1264
|
-
</div>`
|
|
1265
|
-
}]
|
|
1266
|
-
}] });
|
|
1267
|
-
ContainerComponent.MaterialComponent = MaterialContainerComponent;
|
|
1268
|
-
|
|
1269
|
-
class MaterialTabsComponent extends MaterialNestedComponent {
|
|
1270
|
-
setInstance(instance) {
|
|
1271
|
-
super.setInstance(instance);
|
|
1272
|
-
instance.viewContainer = (component) => {
|
|
1273
|
-
return this.viewContainers ? this.viewContainers[component.tab] : null;
|
|
1274
|
-
};
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
MaterialTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1278
|
-
MaterialTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTabsComponent, selector: "mat-formio-tabs", usesInheritance: true, ngImport: i0, template: `
|
|
1279
|
-
<mat-tab-group>
|
|
1280
|
-
<mat-tab *ngFor="let tab of instance.component.components" [label]="tab.label">
|
|
1281
|
-
<div fxLayout="column" fxLayoutGap="1em" style="border: 1px dotted rgba(0, 0, 0, 0.125)">
|
|
1282
|
-
<ng-template #components></ng-template>
|
|
1283
|
-
</div>
|
|
1284
|
-
</mat-tab>
|
|
1285
|
-
</mat-tab-group>
|
|
1286
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i2$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
|
|
1287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTabsComponent, decorators: [{
|
|
1288
|
-
type: Component,
|
|
1289
|
-
args: [{
|
|
1290
|
-
selector: 'mat-formio-tabs',
|
|
1291
|
-
template: `
|
|
1292
|
-
<mat-tab-group>
|
|
1293
|
-
<mat-tab *ngFor="let tab of instance.component.components" [label]="tab.label">
|
|
1294
|
-
<div fxLayout="column" fxLayoutGap="1em" style="border: 1px dotted rgba(0, 0, 0, 0.125)">
|
|
1295
|
-
<ng-template #components></ng-template>
|
|
1296
|
-
</div>
|
|
1297
|
-
</mat-tab>
|
|
1298
|
-
</mat-tab-group>
|
|
1299
|
-
`
|
|
1300
|
-
}]
|
|
1301
|
-
}] });
|
|
1302
|
-
TabsComponent.MaterialComponent = MaterialTabsComponent;
|
|
1303
|
-
|
|
1304
|
-
class MaterialTimeComponent extends MaterialComponent {
|
|
1305
|
-
constructor() {
|
|
1306
|
-
super(...arguments);
|
|
1307
|
-
this.disabled = false;
|
|
1308
|
-
this.period = 'AM';
|
|
1309
|
-
this.hourControl = new FormControl();
|
|
1310
|
-
this.minuteControl = new FormControl();
|
|
1311
|
-
this.secondControl = new FormControl();
|
|
1312
|
-
this.selectedEvent = new EventEmitter();
|
|
1313
|
-
this.hourStep = 1;
|
|
1314
|
-
this.minuteStep = 1;
|
|
1315
|
-
this.secondStep = 1;
|
|
1316
|
-
this.renderElementOnly = false;
|
|
1317
|
-
}
|
|
1318
|
-
setDisabled(disabled) {
|
|
1319
|
-
if (disabled) {
|
|
1320
|
-
this.hourControl.disable();
|
|
1321
|
-
this.minuteControl.disable();
|
|
1322
|
-
this.secondControl.disable();
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
get dataFormat() {
|
|
1326
|
-
let format = this.instance.component.dataFormat;
|
|
1327
|
-
format = format ? format : 'HH:mm';
|
|
1328
|
-
return format;
|
|
1329
|
-
}
|
|
1330
|
-
setInstance(instance) {
|
|
1331
|
-
super.setInstance(instance);
|
|
1332
|
-
// this.control.setValue('00:00:00');
|
|
1333
|
-
this.onChange();
|
|
1334
|
-
}
|
|
1335
|
-
onChange() {
|
|
1336
|
-
const hours = this.hourControl.value;
|
|
1337
|
-
const minutes = this.minuteControl.value || '00';
|
|
1338
|
-
const seconds = this.secondControl.value || '';
|
|
1339
|
-
const rawValue = `${hours || '00'}:${minutes}${seconds ? ':' + seconds : ''} ${this.period}`;
|
|
1340
|
-
let value = this.getTwentyFourHourTime(rawValue);
|
|
1341
|
-
if (!hours) {
|
|
1342
|
-
value = this.instance.emptyValue;
|
|
1343
|
-
}
|
|
1344
|
-
this.control.setValue(value);
|
|
1345
|
-
if (this.instance) {
|
|
1346
|
-
super.onChange();
|
|
1347
|
-
}
|
|
1348
|
-
this.selectedEvent.emit(this.control);
|
|
1349
|
-
}
|
|
1350
|
-
setValue(value) {
|
|
1351
|
-
if (!value) {
|
|
1352
|
-
return;
|
|
1353
|
-
}
|
|
1354
|
-
super.setValue(value);
|
|
1355
|
-
const [hourValue, minuteValue, period] = value.split(':');
|
|
1356
|
-
this.hourControl.setValue(hourValue);
|
|
1357
|
-
this.minuteControl.setValue(minuteValue);
|
|
1358
|
-
// fix for default value with seconds instead of period
|
|
1359
|
-
this.period = period === ('AM' || 'PM') ? period : this.period;
|
|
1360
|
-
}
|
|
1361
|
-
getTwentyFourHourTime(amPmString) {
|
|
1362
|
-
const moment = moment_;
|
|
1363
|
-
return moment(amPmString, ['h:mm:ss A']).format(this.dataFormat);
|
|
1364
|
-
}
|
|
1365
|
-
changePeriod() {
|
|
1366
|
-
this.period = this.period === 'AM' ? 'PM' : 'AM';
|
|
1367
|
-
this.onChange();
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
MaterialTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1371
|
-
MaterialTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTimeComponent, selector: "mat-formio-time", inputs: { hourStep: "hourStep", minuteStep: "minuteStep", secondStep: "secondStep", renderElementOnly: "renderElementOnly" }, outputs: { selectedEvent: "selectedEvent" }, usesInheritance: true, ngImport: i0, template: `
|
|
1372
|
-
<mat-formio-form-field
|
|
1373
|
-
[instance]="instance"
|
|
1374
|
-
[componentTemplate]="componentTemplate"
|
|
1375
|
-
[renderElementOnly]="renderElementOnly"
|
|
1376
|
-
></mat-formio-form-field>
|
|
1377
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1378
|
-
<mat-label fxFill *ngIf="hasLabel">
|
|
1379
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1380
|
-
</mat-label>
|
|
1381
|
-
|
|
1382
|
-
<div style="display: block">
|
|
1383
|
-
<div fxLayout="row" fxLayoutGap="5%">
|
|
1384
|
-
<input
|
|
1385
|
-
[formControl]="hourControl"
|
|
1386
|
-
[step]="hourStep"
|
|
1387
|
-
[min]="0"
|
|
1388
|
-
[max]="12"
|
|
1389
|
-
type="number"
|
|
1390
|
-
fxFlex="25%"
|
|
1391
|
-
(input)="onChange()"
|
|
1392
|
-
>
|
|
1393
|
-
<input
|
|
1394
|
-
[formControl]="minuteControl"
|
|
1395
|
-
[step]="minuteStep"
|
|
1396
|
-
[min]="0"
|
|
1397
|
-
[max]="59"
|
|
1398
|
-
type="number"
|
|
1399
|
-
fxFlex="25%"
|
|
1400
|
-
(input)="onChange()"
|
|
1401
|
-
>
|
|
1402
|
-
<input
|
|
1403
|
-
[formControl]="secondControl"
|
|
1404
|
-
[step]="secondStep"
|
|
1405
|
-
[min]="0"
|
|
1406
|
-
[max]="59"
|
|
1407
|
-
type="number"
|
|
1408
|
-
fxFlex="25%"
|
|
1409
|
-
(input)="onChange()"
|
|
1410
|
-
*ngIf="instance?.component?.dataFormat === 'HH:mm:ss' ||
|
|
1411
|
-
instance?.component?.dataFormat === 'HH:mm:ss.SSS'"
|
|
1412
|
-
>
|
|
1413
|
-
<button
|
|
1414
|
-
[disabled]="instance?.component?.disabled"
|
|
1415
|
-
fxFlex="25%"
|
|
1416
|
-
(click)="changePeriod()"
|
|
1417
|
-
>
|
|
1418
|
-
{{period}}
|
|
1419
|
-
</button>
|
|
1420
|
-
</div>
|
|
1421
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1422
|
-
</div>
|
|
1423
|
-
</ng-template>
|
|
1424
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
1425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTimeComponent, decorators: [{
|
|
1426
|
-
type: Component,
|
|
1427
|
-
args: [{
|
|
1428
|
-
selector: 'mat-formio-time',
|
|
1429
|
-
template: `
|
|
1430
|
-
<mat-formio-form-field
|
|
1431
|
-
[instance]="instance"
|
|
1432
|
-
[componentTemplate]="componentTemplate"
|
|
1433
|
-
[renderElementOnly]="renderElementOnly"
|
|
1434
|
-
></mat-formio-form-field>
|
|
1435
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1436
|
-
<mat-label fxFill *ngIf="hasLabel">
|
|
1437
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1438
|
-
</mat-label>
|
|
1439
|
-
|
|
1440
|
-
<div style="display: block">
|
|
1441
|
-
<div fxLayout="row" fxLayoutGap="5%">
|
|
1442
|
-
<input
|
|
1443
|
-
[formControl]="hourControl"
|
|
1444
|
-
[step]="hourStep"
|
|
1445
|
-
[min]="0"
|
|
1446
|
-
[max]="12"
|
|
1447
|
-
type="number"
|
|
1448
|
-
fxFlex="25%"
|
|
1449
|
-
(input)="onChange()"
|
|
1450
|
-
>
|
|
1451
|
-
<input
|
|
1452
|
-
[formControl]="minuteControl"
|
|
1453
|
-
[step]="minuteStep"
|
|
1454
|
-
[min]="0"
|
|
1455
|
-
[max]="59"
|
|
1456
|
-
type="number"
|
|
1457
|
-
fxFlex="25%"
|
|
1458
|
-
(input)="onChange()"
|
|
1459
|
-
>
|
|
1460
|
-
<input
|
|
1461
|
-
[formControl]="secondControl"
|
|
1462
|
-
[step]="secondStep"
|
|
1463
|
-
[min]="0"
|
|
1464
|
-
[max]="59"
|
|
1465
|
-
type="number"
|
|
1466
|
-
fxFlex="25%"
|
|
1467
|
-
(input)="onChange()"
|
|
1468
|
-
*ngIf="instance?.component?.dataFormat === 'HH:mm:ss' ||
|
|
1469
|
-
instance?.component?.dataFormat === 'HH:mm:ss.SSS'"
|
|
1470
|
-
>
|
|
1471
|
-
<button
|
|
1472
|
-
[disabled]="instance?.component?.disabled"
|
|
1473
|
-
fxFlex="25%"
|
|
1474
|
-
(click)="changePeriod()"
|
|
1475
|
-
>
|
|
1476
|
-
{{period}}
|
|
1477
|
-
</button>
|
|
1478
|
-
</div>
|
|
1479
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1480
|
-
</div>
|
|
1481
|
-
</ng-template>
|
|
1482
|
-
`
|
|
1483
|
-
}]
|
|
1484
|
-
}], propDecorators: { selectedEvent: [{
|
|
1485
|
-
type: Output
|
|
1486
|
-
}], hourStep: [{
|
|
1487
|
-
type: Input
|
|
1488
|
-
}], minuteStep: [{
|
|
1489
|
-
type: Input
|
|
1490
|
-
}], secondStep: [{
|
|
1491
|
-
type: Input
|
|
1492
|
-
}], renderElementOnly: [{
|
|
1493
|
-
type: Input
|
|
1494
|
-
}] } });
|
|
1495
|
-
TimeComponent.MaterialComponent = MaterialTimeComponent;
|
|
1496
|
-
|
|
1497
|
-
class MaterialCalendarComponent extends MaterialComponent {
|
|
1498
|
-
constructor() {
|
|
1499
|
-
super(...arguments);
|
|
1500
|
-
this.timeSelectEvent = new EventEmitter();
|
|
1501
|
-
this.dateSelectEvent = new EventEmitter();
|
|
1502
|
-
}
|
|
1503
|
-
setInstance(instance) {
|
|
1504
|
-
super.setInstance(instance);
|
|
1505
|
-
}
|
|
1506
|
-
setExistedDate(value) {
|
|
1507
|
-
this.selectedDate = value;
|
|
1508
|
-
}
|
|
1509
|
-
setExistedTime(value, forTime) {
|
|
1510
|
-
this.selectedTime = value;
|
|
1511
|
-
this.time.setValue(forTime);
|
|
1512
|
-
}
|
|
1513
|
-
onDate(event) {
|
|
1514
|
-
this.selectedDate = event;
|
|
1515
|
-
this.dateSelectEvent.emit(this.selectedDate);
|
|
1516
|
-
}
|
|
1517
|
-
onTime(event) {
|
|
1518
|
-
this.selectedTime = event.value;
|
|
1519
|
-
this.timeSelectEvent.emit(this.selectedTime);
|
|
1520
|
-
}
|
|
1521
|
-
getPopupStyles() {
|
|
1522
|
-
return {
|
|
1523
|
-
position: 'absolute',
|
|
1524
|
-
zIndex: '1000',
|
|
1525
|
-
display: 'flex',
|
|
1526
|
-
maxWidth: '100%',
|
|
1527
|
-
maxHeight: '100%',
|
|
1528
|
-
top: '90px',
|
|
1529
|
-
left: '30px'
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
MaterialCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCalendarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1534
|
-
MaterialCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialCalendarComponent, selector: "mat-formio-calendar", inputs: { enableDate: "enableDate", enableTime: "enableTime", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter", hourStep: "hourStep", minuteStep: "minuteStep" }, outputs: { timeSelectEvent: "timeSelectEvent", dateSelectEvent: "dateSelectEvent" }, viewQueries: [{ propertyName: "time", first: true, predicate: ["time"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1535
|
-
<div class="container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="0.5%">
|
|
1536
|
-
<div [ngStyle]="getPopupStyles()">
|
|
1537
|
-
<mat-card style="padding: 0;">
|
|
1538
|
-
<mat-calendar
|
|
1539
|
-
[dateFilter]="dateFilter"
|
|
1540
|
-
[maxDate]="maxDate"
|
|
1541
|
-
[minDate]="minDate"
|
|
1542
|
-
[selected]="selectedDate"
|
|
1543
|
-
(selectedChange)="onDate($event)"
|
|
1544
|
-
class="calendar"
|
|
1545
|
-
*ngIf="enableDate !== false"
|
|
1546
|
-
>
|
|
1547
|
-
</mat-calendar>
|
|
1548
|
-
<mat-formio-time
|
|
1549
|
-
#time
|
|
1550
|
-
[hourStep]="hourStep"
|
|
1551
|
-
[instance]="instance"
|
|
1552
|
-
[renderElementOnly]="true"
|
|
1553
|
-
[minuteStep]="minuteStep"
|
|
1554
|
-
(selectedEvent)="onTime($event)"
|
|
1555
|
-
class="ml-3 formio-time"
|
|
1556
|
-
*ngIf="enableTime"
|
|
1557
|
-
>
|
|
1558
|
-
</mat-formio-time>
|
|
1559
|
-
</mat-card>
|
|
1560
|
-
</div>
|
|
1561
|
-
</div>
|
|
1562
|
-
`, isInline: true, styles: [".calendar,.formio-time{padding:16px;background-color:#fff;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.formio-time{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5$2.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection"], exportAs: ["matCalendar"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i4$2.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: MaterialTimeComponent, selector: "mat-formio-time", inputs: ["hourStep", "minuteStep", "secondStep", "renderElementOnly"], outputs: ["selectedEvent"] }] });
|
|
1563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCalendarComponent, decorators: [{
|
|
1564
|
-
type: Component,
|
|
1565
|
-
args: [{ selector: 'mat-formio-calendar', template: `
|
|
1566
|
-
<div class="container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="0.5%">
|
|
1567
|
-
<div [ngStyle]="getPopupStyles()">
|
|
1568
|
-
<mat-card style="padding: 0;">
|
|
1569
|
-
<mat-calendar
|
|
1570
|
-
[dateFilter]="dateFilter"
|
|
1571
|
-
[maxDate]="maxDate"
|
|
1572
|
-
[minDate]="minDate"
|
|
1573
|
-
[selected]="selectedDate"
|
|
1574
|
-
(selectedChange)="onDate($event)"
|
|
1575
|
-
class="calendar"
|
|
1576
|
-
*ngIf="enableDate !== false"
|
|
1577
|
-
>
|
|
1578
|
-
</mat-calendar>
|
|
1579
|
-
<mat-formio-time
|
|
1580
|
-
#time
|
|
1581
|
-
[hourStep]="hourStep"
|
|
1582
|
-
[instance]="instance"
|
|
1583
|
-
[renderElementOnly]="true"
|
|
1584
|
-
[minuteStep]="minuteStep"
|
|
1585
|
-
(selectedEvent)="onTime($event)"
|
|
1586
|
-
class="ml-3 formio-time"
|
|
1587
|
-
*ngIf="enableTime"
|
|
1588
|
-
>
|
|
1589
|
-
</mat-formio-time>
|
|
1590
|
-
</mat-card>
|
|
1591
|
-
</div>
|
|
1592
|
-
</div>
|
|
1593
|
-
`, styles: [".calendar,.formio-time{padding:16px;background-color:#fff;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.formio-time{display:flex}\n"] }]
|
|
1594
|
-
}], propDecorators: { time: [{
|
|
1595
|
-
type: ViewChild,
|
|
1596
|
-
args: ['time']
|
|
1597
|
-
}], enableDate: [{
|
|
1598
|
-
type: Input
|
|
1599
|
-
}], enableTime: [{
|
|
1600
|
-
type: Input
|
|
1601
|
-
}], minDate: [{
|
|
1602
|
-
type: Input
|
|
1603
|
-
}], maxDate: [{
|
|
1604
|
-
type: Input
|
|
1605
|
-
}], dateFilter: [{
|
|
1606
|
-
type: Input
|
|
1607
|
-
}], hourStep: [{
|
|
1608
|
-
type: Input
|
|
1609
|
-
}], minuteStep: [{
|
|
1610
|
-
type: Input
|
|
1611
|
-
}], timeSelectEvent: [{
|
|
1612
|
-
type: Output
|
|
1613
|
-
}], dateSelectEvent: [{
|
|
1614
|
-
type: Output
|
|
1615
|
-
}] } });
|
|
1616
|
-
|
|
1617
|
-
class MaskDirective {
|
|
1618
|
-
constructor(elementRef) {
|
|
1619
|
-
this.elementRef = elementRef;
|
|
1620
|
-
}
|
|
1621
|
-
get value() {
|
|
1622
|
-
return this._value;
|
|
1623
|
-
}
|
|
1624
|
-
set value(value) {
|
|
1625
|
-
this._value = value;
|
|
1626
|
-
this.formatValue(value);
|
|
1627
|
-
}
|
|
1628
|
-
formatValue(value) {
|
|
1629
|
-
if (value !== null) {
|
|
1630
|
-
this.elementRef.nativeElement.value = this.format(value);
|
|
1631
|
-
}
|
|
1632
|
-
else {
|
|
1633
|
-
this.elementRef.nativeElement.value = '';
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
_onChange(value) {
|
|
1637
|
-
}
|
|
1638
|
-
writeValue(value) {
|
|
1639
|
-
this._value = value;
|
|
1640
|
-
this.formatValue(this._value); // format Value
|
|
1641
|
-
}
|
|
1642
|
-
registerOnChange(fn) {
|
|
1643
|
-
this._onChange = fn;
|
|
1644
|
-
}
|
|
1645
|
-
registerOnTouched() {
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
MaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1649
|
-
MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: MaskDirective, selector: "input[matMask]", inputs: { format: ["matMask", "format"], value: "value" }, providers: [
|
|
1650
|
-
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MaskDirective },
|
|
1651
|
-
{
|
|
1652
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1653
|
-
useExisting: forwardRef(() => MaskDirective),
|
|
1654
|
-
multi: true,
|
|
1655
|
-
}
|
|
1656
|
-
], ngImport: i0 });
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaskDirective, decorators: [{
|
|
1658
|
-
type: Directive,
|
|
1659
|
-
args: [{
|
|
1660
|
-
selector: 'input[matMask]',
|
|
1661
|
-
providers: [
|
|
1662
|
-
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MaskDirective },
|
|
1663
|
-
{
|
|
1664
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1665
|
-
useExisting: forwardRef(() => MaskDirective),
|
|
1666
|
-
multi: true,
|
|
1667
|
-
}
|
|
1668
|
-
]
|
|
1669
|
-
}]
|
|
1670
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { format: [{
|
|
1671
|
-
type: Input,
|
|
1672
|
-
args: ['matMask']
|
|
1673
|
-
}], value: [{
|
|
1674
|
-
type: Input,
|
|
1675
|
-
args: ['value']
|
|
1676
|
-
}] } });
|
|
1677
|
-
|
|
1678
|
-
class MaterialDateComponent extends MaterialComponent {
|
|
1679
|
-
constructor() {
|
|
1680
|
-
super(...arguments);
|
|
1681
|
-
this.timeControl = new FormControl();
|
|
1682
|
-
this.displayControl = new FormControl();
|
|
1683
|
-
this.selectedTime = '00:00';
|
|
1684
|
-
this.allowManualInput = true;
|
|
1685
|
-
this.formatTime = (value) => {
|
|
1686
|
-
if (!value) {
|
|
1687
|
-
return this.instance.emptyValue;
|
|
1688
|
-
}
|
|
1689
|
-
return momentDate(value).format(this.instance.component.format);
|
|
1690
|
-
};
|
|
1691
|
-
this.dateFilter = (d) => {
|
|
1692
|
-
const isValid = this.instance.component.datePicker.disableWeekends ? this.disableWeekends(d) : true;
|
|
1693
|
-
return this.instance.component.widget.disabledDates && isValid ?
|
|
1694
|
-
this.disableDates(this.instance.component.widget.disabledDates.split(','), d) : isValid;
|
|
1695
|
-
};
|
|
1696
|
-
}
|
|
1697
|
-
get enableDate() {
|
|
1698
|
-
return this.instance && this.instance.component.enableDate !== false;
|
|
1699
|
-
}
|
|
1700
|
-
get enableTime() {
|
|
1701
|
-
return this.instance && this.instance.component.enableTime === true;
|
|
1702
|
-
}
|
|
1703
|
-
setDisplayControlValue(value = null) {
|
|
1704
|
-
const format = `YYYY-MM-DD${this.enableTime ? 'THH:mm' : ''}`;
|
|
1705
|
-
value = value || this.getDateTimeValue();
|
|
1706
|
-
if (value) {
|
|
1707
|
-
this.displayControl.setValue(momentDate(value).format(format));
|
|
1708
|
-
}
|
|
1709
|
-
else {
|
|
1710
|
-
this.displayControl.setValue('');
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
onChangeDate(event) {
|
|
1714
|
-
this.selectedDate = momentDate(event).utc().format();
|
|
1715
|
-
this.control.setValue(this.selectedDate);
|
|
1716
|
-
this.setDateTime();
|
|
1717
|
-
}
|
|
1718
|
-
onChangeTime(time) {
|
|
1719
|
-
this.selectedTime = time;
|
|
1720
|
-
if (this.selectedDate || (this.enableTime && !this.enableDate)) {
|
|
1721
|
-
this.setDateTime();
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
onChangeInput() {
|
|
1725
|
-
const value = this.dateFilter(this.displayControl.value) &&
|
|
1726
|
-
this.checkMinMax(this.displayControl.value) ? this.displayControl.value : '';
|
|
1727
|
-
this.control.setValue(value);
|
|
1728
|
-
this.onChange();
|
|
1729
|
-
}
|
|
1730
|
-
getDateTimeValue() {
|
|
1731
|
-
let newDate = '';
|
|
1732
|
-
let isSelectedTime = false;
|
|
1733
|
-
if (this.calendar && this.calendar.selectedTime) {
|
|
1734
|
-
const { selectedTime } = this.calendar;
|
|
1735
|
-
isSelectedTime = true;
|
|
1736
|
-
if (this.selectedTime !== selectedTime) {
|
|
1737
|
-
this.selectedTime = selectedTime;
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
if (this.enableTime && this.enableDate) {
|
|
1741
|
-
const [hours, minutes] = this.selectedTime.split(':');
|
|
1742
|
-
newDate = isSelectedTime
|
|
1743
|
-
? momentDate(this.selectedDate)
|
|
1744
|
-
.hours(Number.parseInt(hours))
|
|
1745
|
-
.minutes(Number.parseInt(minutes))
|
|
1746
|
-
.utc()
|
|
1747
|
-
: this.selectedDate;
|
|
1748
|
-
}
|
|
1749
|
-
if (!this.enableTime && this.enableDate) {
|
|
1750
|
-
newDate = this.selectedDate;
|
|
1751
|
-
}
|
|
1752
|
-
if (this.enableTime && !this.enableDate) {
|
|
1753
|
-
const [hours, minutes] = this.selectedTime.split(':');
|
|
1754
|
-
newDate = momentDate(new Date())
|
|
1755
|
-
.hours(Number.parseInt(hours))
|
|
1756
|
-
.minutes(Number.parseInt(minutes))
|
|
1757
|
-
.seconds(0)
|
|
1758
|
-
.utc();
|
|
1759
|
-
}
|
|
1760
|
-
return newDate;
|
|
1761
|
-
}
|
|
1762
|
-
setDateTime() {
|
|
1763
|
-
this.control.setValue(this.getDateTimeValue());
|
|
1764
|
-
this.onChange();
|
|
1765
|
-
}
|
|
1766
|
-
setInstance(instance) {
|
|
1767
|
-
super.setInstance(instance);
|
|
1768
|
-
this.isDisabled() ? this.control.disable() : this.control.enable();
|
|
1769
|
-
this.isDisabled() ? this.displayControl.disable() : this.displayControl.enable();
|
|
1770
|
-
if (this.instance) {
|
|
1771
|
-
this.allowManualInput = this.instance.component.allowInput === false ? false : true;
|
|
1772
|
-
if (this.instance.component && this.instance.component.datePicker) {
|
|
1773
|
-
const { minDate: min, maxDate: max } = this.instance.component.datePicker;
|
|
1774
|
-
// It improves the date to the full format if the customer set only a year. Otherwise we will have conflicts into the moment.js.
|
|
1775
|
-
const { minDate, maxDate } = this.improveMinMaxDate(min, max);
|
|
1776
|
-
this.instance.component.datePicker.minDate = minDate;
|
|
1777
|
-
this.instance.component.datePicker.maxDate = maxDate;
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
toggleCalendar(event) {
|
|
1782
|
-
if (!this.isDisabled()) {
|
|
1783
|
-
if (!this.isPickerOpened) {
|
|
1784
|
-
const date = this.getValue();
|
|
1785
|
-
if (date && this.checkMinMax(date)) {
|
|
1786
|
-
if (this.enableDate && this.calendar && !this.calendar.selectedDate) {
|
|
1787
|
-
this.calendar.setExistedDate(momentDate(date).toDate());
|
|
1788
|
-
}
|
|
1789
|
-
if (this.enableTime && this.calendar && !this.calendar.selectedTime) {
|
|
1790
|
-
const time = momentDate(date);
|
|
1791
|
-
this.calendar.setExistedTime(time.format('HH:mm'), time.format('h:mm:A'));
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
this.isPickerOpened = !this.isPickerOpened;
|
|
1796
|
-
event.stopPropagation();
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
isDisabled() {
|
|
1800
|
-
const { readonly, disabled } = this.instance.component;
|
|
1801
|
-
return readonly || disabled || this.instance.root.options.readOnly;
|
|
1802
|
-
}
|
|
1803
|
-
setValue(value) {
|
|
1804
|
-
if (this.dateFilter(value) && this.checkMinMax(value)) {
|
|
1805
|
-
this.setDisplayControlValue(value);
|
|
1806
|
-
super.setValue(value);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
onChange() {
|
|
1810
|
-
const value = this.dateFilter(this.getValue()) && this.checkMinMax(this.getValue()) ? this.getValue() : '';
|
|
1811
|
-
this.setDisplayControlValue(value);
|
|
1812
|
-
}
|
|
1813
|
-
beforeSubmit() {
|
|
1814
|
-
this.onChange();
|
|
1815
|
-
super.beforeSubmit();
|
|
1816
|
-
}
|
|
1817
|
-
checkMinMax(value) {
|
|
1818
|
-
let isValid = true;
|
|
1819
|
-
const { minDate: min, maxDate: max } = this.instance.component.datePicker;
|
|
1820
|
-
const { minDate, maxDate } = this.improveMinMaxDate(min, max);
|
|
1821
|
-
if (minDate) {
|
|
1822
|
-
isValid = momentDate(value).isSameOrAfter(minDate);
|
|
1823
|
-
}
|
|
1824
|
-
if (maxDate && isValid) {
|
|
1825
|
-
isValid = momentDate(value).isSameOrBefore(maxDate);
|
|
1826
|
-
}
|
|
1827
|
-
return isValid;
|
|
1828
|
-
}
|
|
1829
|
-
disableWeekends(d) {
|
|
1830
|
-
if (d && d.getDay) {
|
|
1831
|
-
const day = d.getDay();
|
|
1832
|
-
return day !== 0 && day !== 6;
|
|
1833
|
-
}
|
|
1834
|
-
return true;
|
|
1835
|
-
}
|
|
1836
|
-
disableDates(dates, d) {
|
|
1837
|
-
const formattedDates = dates.map((date) => momentDate(date).format('YYYY-MM-DD'));
|
|
1838
|
-
return !formattedDates.includes(momentDate(d).format('YYYY-MM-DD'));
|
|
1839
|
-
}
|
|
1840
|
-
clickOutside(event) {
|
|
1841
|
-
if (event.target.classList.contains('mat-calendar-body-selected') && this.isPickerOpened)
|
|
1842
|
-
this.toggleCalendar(event);
|
|
1843
|
-
}
|
|
1844
|
-
improveMinMaxDate(minDate, maxDate) {
|
|
1845
|
-
if (minDate && minDate.length === 4) {
|
|
1846
|
-
minDate = momentDate(`${minDate}-01-01`).format('YYYY-MM-DD');
|
|
1847
|
-
}
|
|
1848
|
-
if (maxDate && maxDate.length === 4) {
|
|
1849
|
-
maxDate = momentDate(`${maxDate}-01-01`).subtract(1, 'day').format('YYYY-MM-DD');
|
|
1850
|
-
}
|
|
1851
|
-
return { minDate, maxDate };
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
MaterialDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1855
|
-
MaterialDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialDateComponent, selector: "mat-formio-date", host: { listeners: { "document:click": "clickOutside($event)" } }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1856
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
1857
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1858
|
-
<mat-label *ngIf="hasLabel" fxFill>
|
|
1859
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1860
|
-
</mat-label>
|
|
1861
|
-
|
|
1862
|
-
<form class="example-form">
|
|
1863
|
-
<mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
|
|
1864
|
-
<mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
|
|
1865
|
-
</mat-datepicker-toggle>
|
|
1866
|
-
<mat-form-field class="example-full-width">
|
|
1867
|
-
<input
|
|
1868
|
-
*ngIf="enableTime && enableDate"
|
|
1869
|
-
matInput
|
|
1870
|
-
type="datetime-local"
|
|
1871
|
-
[placeholder]="instance.component.placeholder"
|
|
1872
|
-
[formControl]="displayControl"
|
|
1873
|
-
(input)="onChangeInput()"
|
|
1874
|
-
[readonly]="!allowManualInput"
|
|
1875
|
-
>
|
|
1876
|
-
<input
|
|
1877
|
-
*ngIf="enableTime && !enableDate"
|
|
1878
|
-
matInput
|
|
1879
|
-
[placeholder]="instance.component.placeholder"
|
|
1880
|
-
[formControl]="displayControl"
|
|
1881
|
-
[matMask]="formatTime"
|
|
1882
|
-
(input)="onChangeInput()"
|
|
1883
|
-
[readonly]="!allowManualInput"
|
|
1884
|
-
>
|
|
1885
|
-
<input
|
|
1886
|
-
*ngIf="!enableTime && enableDate"
|
|
1887
|
-
matInput
|
|
1888
|
-
[placeholder]="instance.component.placeholder"
|
|
1889
|
-
[formControl]="displayControl"
|
|
1890
|
-
(input)="onChangeInput()"
|
|
1891
|
-
[readonly]="!allowManualInput"
|
|
1892
|
-
>
|
|
1893
|
-
</mat-form-field>
|
|
1894
|
-
|
|
1895
|
-
<mat-formio-calendar
|
|
1896
|
-
#calendar
|
|
1897
|
-
[minDate]="instance.component.datePicker.minDate || ''"
|
|
1898
|
-
[maxDate]="instance.component.datePicker.maxDate || ''"
|
|
1899
|
-
[dateFilter]="dateFilter"
|
|
1900
|
-
[hidden]="!isPickerOpened"
|
|
1901
|
-
(dateSelectEvent)="onChangeDate($event)"
|
|
1902
|
-
(timeSelectEvent)="onChangeTime($event)"
|
|
1903
|
-
[enableDate]="enableDate"
|
|
1904
|
-
[enableTime]="enableTime"
|
|
1905
|
-
[hourStep]="instance.component.timePicker.hourStep"
|
|
1906
|
-
[minuteStep]="instance.component.timePicker.minuteStep"
|
|
1907
|
-
[instance]="instance"
|
|
1908
|
-
></mat-formio-calendar>
|
|
1909
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1910
|
-
</form>
|
|
1911
|
-
</ng-template>
|
|
1912
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$3.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"] }, { kind: "component", type: i5$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5$2.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: MaterialCalendarComponent, selector: "mat-formio-calendar", inputs: ["enableDate", "enableTime", "minDate", "maxDate", "dateFilter", "hourStep", "minuteStep"], outputs: ["timeSelectEvent", "dateSelectEvent"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }, { kind: "directive", type: MaskDirective, selector: "input[matMask]", inputs: ["matMask", "value"] }] });
|
|
1913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDateComponent, decorators: [{
|
|
1914
|
-
type: Component,
|
|
1915
|
-
args: [{
|
|
1916
|
-
selector: 'mat-formio-date',
|
|
1917
|
-
host: {
|
|
1918
|
-
'(document:click)': 'clickOutside($event)',
|
|
1919
|
-
},
|
|
1920
|
-
template: `
|
|
1921
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
1922
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
1923
|
-
<mat-label *ngIf="hasLabel" fxFill>
|
|
1924
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
1925
|
-
</mat-label>
|
|
1926
|
-
|
|
1927
|
-
<form class="example-form">
|
|
1928
|
-
<mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
|
|
1929
|
-
<mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
|
|
1930
|
-
</mat-datepicker-toggle>
|
|
1931
|
-
<mat-form-field class="example-full-width">
|
|
1932
|
-
<input
|
|
1933
|
-
*ngIf="enableTime && enableDate"
|
|
1934
|
-
matInput
|
|
1935
|
-
type="datetime-local"
|
|
1936
|
-
[placeholder]="instance.component.placeholder"
|
|
1937
|
-
[formControl]="displayControl"
|
|
1938
|
-
(input)="onChangeInput()"
|
|
1939
|
-
[readonly]="!allowManualInput"
|
|
1940
|
-
>
|
|
1941
|
-
<input
|
|
1942
|
-
*ngIf="enableTime && !enableDate"
|
|
1943
|
-
matInput
|
|
1944
|
-
[placeholder]="instance.component.placeholder"
|
|
1945
|
-
[formControl]="displayControl"
|
|
1946
|
-
[matMask]="formatTime"
|
|
1947
|
-
(input)="onChangeInput()"
|
|
1948
|
-
[readonly]="!allowManualInput"
|
|
1949
|
-
>
|
|
1950
|
-
<input
|
|
1951
|
-
*ngIf="!enableTime && enableDate"
|
|
1952
|
-
matInput
|
|
1953
|
-
[placeholder]="instance.component.placeholder"
|
|
1954
|
-
[formControl]="displayControl"
|
|
1955
|
-
(input)="onChangeInput()"
|
|
1956
|
-
[readonly]="!allowManualInput"
|
|
1957
|
-
>
|
|
1958
|
-
</mat-form-field>
|
|
1959
|
-
|
|
1960
|
-
<mat-formio-calendar
|
|
1961
|
-
#calendar
|
|
1962
|
-
[minDate]="instance.component.datePicker.minDate || ''"
|
|
1963
|
-
[maxDate]="instance.component.datePicker.maxDate || ''"
|
|
1964
|
-
[dateFilter]="dateFilter"
|
|
1965
|
-
[hidden]="!isPickerOpened"
|
|
1966
|
-
(dateSelectEvent)="onChangeDate($event)"
|
|
1967
|
-
(timeSelectEvent)="onChangeTime($event)"
|
|
1968
|
-
[enableDate]="enableDate"
|
|
1969
|
-
[enableTime]="enableTime"
|
|
1970
|
-
[hourStep]="instance.component.timePicker.hourStep"
|
|
1971
|
-
[minuteStep]="instance.component.timePicker.minuteStep"
|
|
1972
|
-
[instance]="instance"
|
|
1973
|
-
></mat-formio-calendar>
|
|
1974
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
1975
|
-
</form>
|
|
1976
|
-
</ng-template>
|
|
1977
|
-
`
|
|
1978
|
-
}]
|
|
1979
|
-
}], propDecorators: { calendar: [{
|
|
1980
|
-
type: ViewChild,
|
|
1981
|
-
args: ['calendar']
|
|
1982
|
-
}] } });
|
|
1983
|
-
DateTimeComponent.MaterialComponent = MaterialDateComponent;
|
|
1984
|
-
|
|
1985
|
-
class MaterialCheckboxComponent extends MaterialComponent {
|
|
1986
|
-
getValue() {
|
|
1987
|
-
return _.isNil(this.control.value) ? '' : this.control.value;
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
MaterialCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1991
|
-
MaterialCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialCheckboxComponent, selector: "mat-formio-checkbox", usesInheritance: true, ngImport: i0, template: `
|
|
1992
|
-
<mat-checkbox (change)="onChange()" [ngClass]="{'validation-error' : !!instance.error}"
|
|
1993
|
-
[formControl]="control"
|
|
1994
|
-
>
|
|
1995
|
-
<span matFormioLabel [instance]="instance"></span>
|
|
1996
|
-
<mat-icon *ngIf="instance.component.tooltip" matSuffix
|
|
1997
|
-
matTooltip="{{ instance.component.tooltip }}" style="font-size: 1rem;">info
|
|
1998
|
-
</mat-icon>
|
|
1999
|
-
</mat-checkbox>
|
|
2000
|
-
<mat-hint>
|
|
2001
|
-
{{ instance.component.description }}
|
|
2002
|
-
</mat-hint>
|
|
2003
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2004
|
-
`, isInline: true, styles: ["::ng-deep .mat-checkbox.validation-error .mat-checkbox-frame{border-color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i4$6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialCheckboxComponent, decorators: [{
|
|
2006
|
-
type: Component,
|
|
2007
|
-
args: [{ selector: 'mat-formio-checkbox', template: `
|
|
2008
|
-
<mat-checkbox (change)="onChange()" [ngClass]="{'validation-error' : !!instance.error}"
|
|
2009
|
-
[formControl]="control"
|
|
2010
|
-
>
|
|
2011
|
-
<span matFormioLabel [instance]="instance"></span>
|
|
2012
|
-
<mat-icon *ngIf="instance.component.tooltip" matSuffix
|
|
2013
|
-
matTooltip="{{ instance.component.tooltip }}" style="font-size: 1rem;">info
|
|
2014
|
-
</mat-icon>
|
|
2015
|
-
</mat-checkbox>
|
|
2016
|
-
<mat-hint>
|
|
2017
|
-
{{ instance.component.description }}
|
|
2018
|
-
</mat-hint>
|
|
2019
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2020
|
-
`, styles: ["::ng-deep .mat-checkbox.validation-error .mat-checkbox-frame{border-color:red}\n"] }]
|
|
2021
|
-
}] });
|
|
2022
|
-
CheckboxComponent.MaterialComponent = MaterialCheckboxComponent;
|
|
2023
|
-
|
|
2024
|
-
class MaterialFieldsetComponent extends MaterialNestedComponent {
|
|
2025
|
-
}
|
|
2026
|
-
MaterialFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2027
|
-
MaterialFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialFieldsetComponent, selector: "mat-formio-fieldset", usesInheritance: true, ngImport: i0, template: `
|
|
2028
|
-
<fieldset>
|
|
2029
|
-
<legend [attr.ref]="'header'">
|
|
2030
|
-
{{ instance.component.legend }}
|
|
2031
|
-
<mat-icon *ngIf="instance.component.tooltip"
|
|
2032
|
-
matSuffix
|
|
2033
|
-
matTooltip="{{ instance.component.tooltip }}"
|
|
2034
|
-
>
|
|
2035
|
-
info
|
|
2036
|
-
</mat-icon>
|
|
2037
|
-
</legend>
|
|
2038
|
-
<div class="fieldset-body" [attr.ref]="instance.component.key" fxLayout="column" fxLayoutGap="1em">
|
|
2039
|
-
<ng-template #components></ng-template>
|
|
2040
|
-
</div>
|
|
2041
|
-
</fieldset>
|
|
2042
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
|
|
2043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialFieldsetComponent, decorators: [{
|
|
2044
|
-
type: Component,
|
|
2045
|
-
args: [{ selector: 'mat-formio-fieldset', template: `
|
|
2046
|
-
<fieldset>
|
|
2047
|
-
<legend [attr.ref]="'header'">
|
|
2048
|
-
{{ instance.component.legend }}
|
|
2049
|
-
<mat-icon *ngIf="instance.component.tooltip"
|
|
2050
|
-
matSuffix
|
|
2051
|
-
matTooltip="{{ instance.component.tooltip }}"
|
|
2052
|
-
>
|
|
2053
|
-
info
|
|
2054
|
-
</mat-icon>
|
|
2055
|
-
</legend>
|
|
2056
|
-
<div class="fieldset-body" [attr.ref]="instance.component.key" fxLayout="column" fxLayoutGap="1em">
|
|
2057
|
-
<ng-template #components></ng-template>
|
|
2058
|
-
</div>
|
|
2059
|
-
</fieldset>
|
|
2060
|
-
` }]
|
|
2061
|
-
}] });
|
|
2062
|
-
FieldsetComponent.MaterialComponent = MaterialFieldsetComponent;
|
|
2063
|
-
|
|
2064
|
-
class MaterialContentComponent extends MaterialComponent {
|
|
2065
|
-
}
|
|
2066
|
-
MaterialContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2067
|
-
MaterialContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialContentComponent, selector: "mat-formio-content", usesInheritance: true, ngImport: i0, template: `<div [innerHTML]="instance.content"></div>`, isInline: true });
|
|
2068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialContentComponent, decorators: [{
|
|
2069
|
-
type: Component,
|
|
2070
|
-
args: [{
|
|
2071
|
-
selector: 'mat-formio-content',
|
|
2072
|
-
template: `<div [innerHTML]="instance.content"></div>`
|
|
2073
|
-
}]
|
|
2074
|
-
}] });
|
|
2075
|
-
ContentComponent.MaterialComponent = MaterialContentComponent;
|
|
2076
|
-
|
|
2077
|
-
class MaterialSignatureComponent extends MaterialComponent {
|
|
2078
|
-
renderComponents() {
|
|
2079
|
-
if (this.signatureElement) {
|
|
2080
|
-
this.instance.attach(this.signatureElement.nativeElement);
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
ngAfterViewInit() {
|
|
2084
|
-
this.renderComponents();
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
MaterialSignatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSignatureComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2088
|
-
MaterialSignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialSignatureComponent, selector: "mat-formio-signature", viewQueries: [{ propertyName: "signatureElement", first: true, predicate: ["signature"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2089
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2090
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2091
|
-
<div #signature>
|
|
2092
|
-
|
|
2093
|
-
<mat-label *ngIf="hasLabel">
|
|
2094
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2095
|
-
</mat-label>
|
|
2096
|
-
|
|
2097
|
-
<button mat-icon-button [ngStyle]="{position: 'absolute'}" ref="refresh">
|
|
2098
|
-
<mat-icon>refresh</mat-icon>
|
|
2099
|
-
</button>
|
|
2100
|
-
|
|
2101
|
-
<div class="signature-pad-body"
|
|
2102
|
-
[ngStyle]="{width: instance.component.width, height: instance.component.height, padding: 0, margin: 0}"
|
|
2103
|
-
[attr.tabindex]="instance.component.tabindex || 0"
|
|
2104
|
-
ref="padBody"
|
|
2105
|
-
>
|
|
2106
|
-
<canvas class="signature-pad-canvas"
|
|
2107
|
-
[attr.height]="instance.component.height"
|
|
2108
|
-
ref="canvas"
|
|
2109
|
-
></canvas>
|
|
2110
|
-
<img fxFlexFill [ngStyle]="{display: 'none' }" ref="signatureImage">
|
|
2111
|
-
</div>
|
|
2112
|
-
<div *ngIf="instance.component.footer"
|
|
2113
|
-
class="signature-pad-footer"
|
|
2114
|
-
fxLayout="row"
|
|
2115
|
-
fxLayoutAlign="center center"
|
|
2116
|
-
>
|
|
2117
|
-
<mat-hint>{{ instance.t(instance.component.footer) }}</mat-hint>
|
|
2118
|
-
</div>
|
|
2119
|
-
</div>
|
|
2120
|
-
</ng-template>
|
|
2121
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i4$2.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSignatureComponent, decorators: [{
|
|
2123
|
-
type: Component,
|
|
2124
|
-
args: [{
|
|
2125
|
-
selector: 'mat-formio-signature',
|
|
2126
|
-
template: `
|
|
2127
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2128
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2129
|
-
<div #signature>
|
|
2130
|
-
|
|
2131
|
-
<mat-label *ngIf="hasLabel">
|
|
2132
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2133
|
-
</mat-label>
|
|
2134
|
-
|
|
2135
|
-
<button mat-icon-button [ngStyle]="{position: 'absolute'}" ref="refresh">
|
|
2136
|
-
<mat-icon>refresh</mat-icon>
|
|
2137
|
-
</button>
|
|
2138
|
-
|
|
2139
|
-
<div class="signature-pad-body"
|
|
2140
|
-
[ngStyle]="{width: instance.component.width, height: instance.component.height, padding: 0, margin: 0}"
|
|
2141
|
-
[attr.tabindex]="instance.component.tabindex || 0"
|
|
2142
|
-
ref="padBody"
|
|
2143
|
-
>
|
|
2144
|
-
<canvas class="signature-pad-canvas"
|
|
2145
|
-
[attr.height]="instance.component.height"
|
|
2146
|
-
ref="canvas"
|
|
2147
|
-
></canvas>
|
|
2148
|
-
<img fxFlexFill [ngStyle]="{display: 'none' }" ref="signatureImage">
|
|
2149
|
-
</div>
|
|
2150
|
-
<div *ngIf="instance.component.footer"
|
|
2151
|
-
class="signature-pad-footer"
|
|
2152
|
-
fxLayout="row"
|
|
2153
|
-
fxLayoutAlign="center center"
|
|
2154
|
-
>
|
|
2155
|
-
<mat-hint>{{ instance.t(instance.component.footer) }}</mat-hint>
|
|
2156
|
-
</div>
|
|
2157
|
-
</div>
|
|
2158
|
-
</ng-template>
|
|
2159
|
-
`
|
|
2160
|
-
}]
|
|
2161
|
-
}], propDecorators: { signatureElement: [{
|
|
2162
|
-
type: ViewChild,
|
|
2163
|
-
args: ['signature']
|
|
2164
|
-
}] } });
|
|
2165
|
-
SignatureComponent.MaterialComponent = MaterialSignatureComponent;
|
|
2166
|
-
|
|
2167
|
-
class MaterialSurveyComponent extends MaterialComponent {
|
|
2168
|
-
constructor() {
|
|
2169
|
-
super(...arguments);
|
|
2170
|
-
this.controls = {};
|
|
2171
|
-
}
|
|
2172
|
-
getFormControl(question) {
|
|
2173
|
-
if (!this.controls[question]) {
|
|
2174
|
-
this.controls[question] = new FormControl();
|
|
2175
|
-
if (this.instance.shouldDisabled) {
|
|
2176
|
-
this.controls[question].disable();
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
return this.controls[question];
|
|
2180
|
-
}
|
|
2181
|
-
setDisabled(disabled) {
|
|
2182
|
-
const method = disabled ? 'disable' : 'enable';
|
|
2183
|
-
for (const question in this.controls) {
|
|
2184
|
-
if (this.controls.hasOwnProperty(question)) {
|
|
2185
|
-
this.controls[question][method]();
|
|
2186
|
-
}
|
|
2187
|
-
}
|
|
2188
|
-
}
|
|
2189
|
-
getValue() {
|
|
2190
|
-
const values = {};
|
|
2191
|
-
for (const question in this.controls) {
|
|
2192
|
-
if (this.controls.hasOwnProperty(question)) {
|
|
2193
|
-
values[question] = this.controls[question].value || false;
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
return values;
|
|
2197
|
-
}
|
|
2198
|
-
setValue(value) {
|
|
2199
|
-
for (const question in value) {
|
|
2200
|
-
if (value.hasOwnProperty(question)) {
|
|
2201
|
-
const control = this.getFormControl(question);
|
|
2202
|
-
if (control) {
|
|
2203
|
-
control.setValue(value[question] || false);
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
getUniqueName(question) {
|
|
2209
|
-
return `${this.instance.id}-${question}`;
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
MaterialSurveyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSurveyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2213
|
-
MaterialSurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialSurveyComponent, selector: "mat-formio-survey", usesInheritance: true, ngImport: i0, template: `
|
|
2214
|
-
|
|
2215
|
-
<mat-formio-form-field
|
|
2216
|
-
[instance]="instance"
|
|
2217
|
-
[componentTemplate]="componentTemplate"
|
|
2218
|
-
[showDescription]="false"
|
|
2219
|
-
></mat-formio-form-field>
|
|
2220
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2221
|
-
|
|
2222
|
-
<table class="mat-elevation-z8 mat-table" fxFill>
|
|
2223
|
-
<thead>
|
|
2224
|
-
<tr class="mat-header-row">
|
|
2225
|
-
<th class="mat-header-cell">
|
|
2226
|
-
<h2 *ngIf="hasLabel">
|
|
2227
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2228
|
-
</h2>
|
|
2229
|
-
</th>
|
|
2230
|
-
<th class="mat-header-cell"
|
|
2231
|
-
*ngFor="let value of instance.component.values"
|
|
2232
|
-
style="text-align: center;"
|
|
2233
|
-
>
|
|
2234
|
-
{{ value.label }}
|
|
2235
|
-
</th>
|
|
2236
|
-
</tr>
|
|
2237
|
-
</thead>
|
|
2238
|
-
|
|
2239
|
-
<tbody>
|
|
2240
|
-
<tr class="mat-row" *ngFor="let question of instance.component.questions; index as i;">
|
|
2241
|
-
<td class="mat-cell">{{ question.label }}</td>
|
|
2242
|
-
<td class="mat-cell"
|
|
2243
|
-
*ngFor="let value of instance.component.values; index as j;"
|
|
2244
|
-
style="text-align: center;"
|
|
2245
|
-
>
|
|
2246
|
-
<mat-radio-group (change)="onChange()"
|
|
2247
|
-
[formControl]="getFormControl(question.value)"
|
|
2248
|
-
[name]="getUniqueName(question.value)"
|
|
2249
|
-
>
|
|
2250
|
-
<mat-radio-button [value]="value.value"></mat-radio-button>
|
|
2251
|
-
</mat-radio-group>
|
|
2252
|
-
</td>
|
|
2253
|
-
</tr>
|
|
2254
|
-
<mat-hint *ngIf="instance.component.description" class="mat-formio-component-description">
|
|
2255
|
-
{{ instance.component.description }}
|
|
2256
|
-
</mat-hint>
|
|
2257
|
-
</tbody>
|
|
2258
|
-
|
|
2259
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2260
|
-
</table>
|
|
2261
|
-
</ng-template>
|
|
2262
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4$7.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i4$7.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSurveyComponent, decorators: [{
|
|
2264
|
-
type: Component,
|
|
2265
|
-
args: [{
|
|
2266
|
-
selector: 'mat-formio-survey',
|
|
2267
|
-
template: `
|
|
2268
|
-
|
|
2269
|
-
<mat-formio-form-field
|
|
2270
|
-
[instance]="instance"
|
|
2271
|
-
[componentTemplate]="componentTemplate"
|
|
2272
|
-
[showDescription]="false"
|
|
2273
|
-
></mat-formio-form-field>
|
|
2274
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2275
|
-
|
|
2276
|
-
<table class="mat-elevation-z8 mat-table" fxFill>
|
|
2277
|
-
<thead>
|
|
2278
|
-
<tr class="mat-header-row">
|
|
2279
|
-
<th class="mat-header-cell">
|
|
2280
|
-
<h2 *ngIf="hasLabel">
|
|
2281
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2282
|
-
</h2>
|
|
2283
|
-
</th>
|
|
2284
|
-
<th class="mat-header-cell"
|
|
2285
|
-
*ngFor="let value of instance.component.values"
|
|
2286
|
-
style="text-align: center;"
|
|
2287
|
-
>
|
|
2288
|
-
{{ value.label }}
|
|
2289
|
-
</th>
|
|
2290
|
-
</tr>
|
|
2291
|
-
</thead>
|
|
2292
|
-
|
|
2293
|
-
<tbody>
|
|
2294
|
-
<tr class="mat-row" *ngFor="let question of instance.component.questions; index as i;">
|
|
2295
|
-
<td class="mat-cell">{{ question.label }}</td>
|
|
2296
|
-
<td class="mat-cell"
|
|
2297
|
-
*ngFor="let value of instance.component.values; index as j;"
|
|
2298
|
-
style="text-align: center;"
|
|
2299
|
-
>
|
|
2300
|
-
<mat-radio-group (change)="onChange()"
|
|
2301
|
-
[formControl]="getFormControl(question.value)"
|
|
2302
|
-
[name]="getUniqueName(question.value)"
|
|
2303
|
-
>
|
|
2304
|
-
<mat-radio-button [value]="value.value"></mat-radio-button>
|
|
2305
|
-
</mat-radio-group>
|
|
2306
|
-
</td>
|
|
2307
|
-
</tr>
|
|
2308
|
-
<mat-hint *ngIf="instance.component.description" class="mat-formio-component-description">
|
|
2309
|
-
{{ instance.component.description }}
|
|
2310
|
-
</mat-hint>
|
|
2311
|
-
</tbody>
|
|
2312
|
-
|
|
2313
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2314
|
-
</table>
|
|
2315
|
-
</ng-template>
|
|
2316
|
-
`
|
|
2317
|
-
}]
|
|
2318
|
-
}] });
|
|
2319
|
-
SurveyComponent.MaterialComponent = MaterialSurveyComponent;
|
|
2320
|
-
|
|
2321
|
-
class MaterialRadioComponent extends MaterialComponent {
|
|
2322
|
-
getLayout() {
|
|
2323
|
-
return this.instance.component.inline ? 'row' : 'column';
|
|
2324
|
-
}
|
|
2325
|
-
isRadioChecked(option) {
|
|
2326
|
-
return option.value === this.instance.dataValue;
|
|
2327
|
-
}
|
|
2328
|
-
clearValue(event, option) {
|
|
2329
|
-
if (this.isRadioChecked(option)) {
|
|
2330
|
-
event.preventDefault();
|
|
2331
|
-
this.deselectValue();
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
deselectValue() {
|
|
2335
|
-
this.instance.updateValue(null, {
|
|
2336
|
-
modified: true,
|
|
2337
|
-
});
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
MaterialRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2341
|
-
MaterialRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialRadioComponent, selector: "mat-formio-radio", usesInheritance: true, ngImport: i0, template: `
|
|
2342
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2343
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2344
|
-
<div fxLayout="column">
|
|
2345
|
-
<mat-label *ngIf="hasLabel">
|
|
2346
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2347
|
-
</mat-label>
|
|
2348
|
-
|
|
2349
|
-
<mat-radio-group
|
|
2350
|
-
(change)="onChange()"
|
|
2351
|
-
[formControl]="control"
|
|
2352
|
-
fxFlexOffset="10px"
|
|
2353
|
-
fxLayout="{{ getLayout() }}"
|
|
2354
|
-
fxLayoutGap="10px"
|
|
2355
|
-
>
|
|
2356
|
-
<mat-radio-button *ngFor="let option of instance.component.values"
|
|
2357
|
-
value="{{ option.value }}"
|
|
2358
|
-
[checked]="isRadioChecked(option)"
|
|
2359
|
-
(keyup.space)="clearValue($event, option)"
|
|
2360
|
-
(click)="clearValue($event, option)"
|
|
2361
|
-
>
|
|
2362
|
-
{{ option.label }}
|
|
2363
|
-
</mat-radio-button>
|
|
2364
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2365
|
-
</mat-radio-group>
|
|
2366
|
-
</div>
|
|
2367
|
-
</ng-template>
|
|
2368
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$7.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i4$7.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialRadioComponent, decorators: [{
|
|
2370
|
-
type: Component,
|
|
2371
|
-
args: [{
|
|
2372
|
-
selector: 'mat-formio-radio',
|
|
2373
|
-
template: `
|
|
2374
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2375
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2376
|
-
<div fxLayout="column">
|
|
2377
|
-
<mat-label *ngIf="hasLabel">
|
|
2378
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2379
|
-
</mat-label>
|
|
2380
|
-
|
|
2381
|
-
<mat-radio-group
|
|
2382
|
-
(change)="onChange()"
|
|
2383
|
-
[formControl]="control"
|
|
2384
|
-
fxFlexOffset="10px"
|
|
2385
|
-
fxLayout="{{ getLayout() }}"
|
|
2386
|
-
fxLayoutGap="10px"
|
|
2387
|
-
>
|
|
2388
|
-
<mat-radio-button *ngFor="let option of instance.component.values"
|
|
2389
|
-
value="{{ option.value }}"
|
|
2390
|
-
[checked]="isRadioChecked(option)"
|
|
2391
|
-
(keyup.space)="clearValue($event, option)"
|
|
2392
|
-
(click)="clearValue($event, option)"
|
|
2393
|
-
>
|
|
2394
|
-
{{ option.label }}
|
|
2395
|
-
</mat-radio-button>
|
|
2396
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2397
|
-
</mat-radio-group>
|
|
2398
|
-
</div>
|
|
2399
|
-
</ng-template>
|
|
2400
|
-
`
|
|
2401
|
-
}]
|
|
2402
|
-
}] });
|
|
2403
|
-
RadioComponent.MaterialComponent = MaterialRadioComponent;
|
|
2404
|
-
|
|
2405
|
-
class MaterialSelectBoxesComponent extends MaterialRadioComponent {
|
|
2406
|
-
constructor() {
|
|
2407
|
-
super(...arguments);
|
|
2408
|
-
this.value = {};
|
|
2409
|
-
this.disabled = false;
|
|
2410
|
-
}
|
|
2411
|
-
setInstance(instance) {
|
|
2412
|
-
instance.component.values.forEach((option) => {
|
|
2413
|
-
this.value[option.value] = false;
|
|
2414
|
-
});
|
|
2415
|
-
super.setInstance(instance);
|
|
2416
|
-
}
|
|
2417
|
-
getValue() {
|
|
2418
|
-
return this.value;
|
|
2419
|
-
}
|
|
2420
|
-
setValue(value) {
|
|
2421
|
-
const normalizedValue = this.instance.normalizeValue(value);
|
|
2422
|
-
for (const prop in normalizedValue) {
|
|
2423
|
-
if (normalizedValue.hasOwnProperty(prop)) {
|
|
2424
|
-
this.value[prop] = normalizedValue[prop];
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
setDisabled(disabled) {
|
|
2429
|
-
this.disabled = !!disabled;
|
|
2430
|
-
}
|
|
2431
|
-
onChange() {
|
|
2432
|
-
this.instance.updateValue(this.getValue(), { modified: true });
|
|
2433
|
-
this.instance.triggerChange({ modified: true });
|
|
2434
|
-
}
|
|
2435
|
-
}
|
|
2436
|
-
MaterialSelectBoxesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSelectBoxesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2437
|
-
MaterialSelectBoxesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialSelectBoxesComponent, selector: "mat-formio-selectboxes", usesInheritance: true, ngImport: i0, template: `
|
|
2438
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2439
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2440
|
-
<div fxLayout="column">
|
|
2441
|
-
<mat-label *ngIf="hasLabel">
|
|
2442
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2443
|
-
</mat-label>
|
|
2444
|
-
<div
|
|
2445
|
-
fxFlexOffset="10px"
|
|
2446
|
-
fxLayout="{{ getLayout() }}"
|
|
2447
|
-
fxLayoutGap="10px"
|
|
2448
|
-
>
|
|
2449
|
-
<mat-checkbox
|
|
2450
|
-
*ngFor="let option of instance.component.values"
|
|
2451
|
-
(change)="onChange()"
|
|
2452
|
-
[(ngModel)]="value[option.value]"
|
|
2453
|
-
[disabled]="disabled"
|
|
2454
|
-
>
|
|
2455
|
-
{{ option.label }}
|
|
2456
|
-
</mat-checkbox>
|
|
2457
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2458
|
-
</div>
|
|
2459
|
-
</div>
|
|
2460
|
-
</ng-template>
|
|
2461
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSelectBoxesComponent, decorators: [{
|
|
2463
|
-
type: Component,
|
|
2464
|
-
args: [{
|
|
2465
|
-
selector: 'mat-formio-selectboxes',
|
|
2466
|
-
template: `
|
|
2467
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2468
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2469
|
-
<div fxLayout="column">
|
|
2470
|
-
<mat-label *ngIf="hasLabel">
|
|
2471
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2472
|
-
</mat-label>
|
|
2473
|
-
<div
|
|
2474
|
-
fxFlexOffset="10px"
|
|
2475
|
-
fxLayout="{{ getLayout() }}"
|
|
2476
|
-
fxLayoutGap="10px"
|
|
2477
|
-
>
|
|
2478
|
-
<mat-checkbox
|
|
2479
|
-
*ngFor="let option of instance.component.values"
|
|
2480
|
-
(change)="onChange()"
|
|
2481
|
-
[(ngModel)]="value[option.value]"
|
|
2482
|
-
[disabled]="disabled"
|
|
2483
|
-
>
|
|
2484
|
-
{{ option.label }}
|
|
2485
|
-
</mat-checkbox>
|
|
2486
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2487
|
-
</div>
|
|
2488
|
-
</div>
|
|
2489
|
-
</ng-template>
|
|
2490
|
-
`
|
|
2491
|
-
}]
|
|
2492
|
-
}] });
|
|
2493
|
-
SelectBoxesComponent.MaterialComponent = MaterialSelectBoxesComponent;
|
|
2494
|
-
|
|
2495
|
-
class MaterialSelectComponent extends MaterialComponent {
|
|
2496
|
-
constructor() {
|
|
2497
|
-
super(...arguments);
|
|
2498
|
-
this.websiteMultiCtrl = new FormControl();
|
|
2499
|
-
this.websiteMultiFilterCtrl = new FormControl();
|
|
2500
|
-
this._onDestroy = new Subject();
|
|
2501
|
-
}
|
|
2502
|
-
filterWebsiteMulti() {
|
|
2503
|
-
if (!this.selectOptions) {
|
|
2504
|
-
return;
|
|
2505
|
-
}
|
|
2506
|
-
let search = this.websiteMultiFilterCtrl.value;
|
|
2507
|
-
search = search.toLowerCase();
|
|
2508
|
-
this.filteredOptions = this.selectOptions.then((options) => {
|
|
2509
|
-
const filtered = options.filter((option) => option.label.toLowerCase().indexOf(search) !== -1);
|
|
2510
|
-
this.filteredOptionsLength = filtered.length;
|
|
2511
|
-
return filtered;
|
|
2512
|
-
});
|
|
2513
|
-
}
|
|
2514
|
-
ngOnDestroy() {
|
|
2515
|
-
this._onDestroy.next('');
|
|
2516
|
-
this._onDestroy.complete();
|
|
2517
|
-
}
|
|
2518
|
-
/*End*/
|
|
2519
|
-
setInstance(instance) {
|
|
2520
|
-
super.setInstance(instance);
|
|
2521
|
-
this.instance.triggerUpdate();
|
|
2522
|
-
}
|
|
2523
|
-
ngOnInit() {
|
|
2524
|
-
/*new logic */
|
|
2525
|
-
//this.websiteMultiCtrl.setValue(this.websites[1]);
|
|
2526
|
-
//this.filteredOptions.next(this.websites.slice());
|
|
2527
|
-
this.websiteMultiFilterCtrl.valueChanges
|
|
2528
|
-
.pipe(takeUntil(this._onDestroy))
|
|
2529
|
-
.subscribe(() => {
|
|
2530
|
-
this.filterWebsiteMulti();
|
|
2531
|
-
});
|
|
2532
|
-
/*End */
|
|
2533
|
-
this.selectOptions = new Promise((resolve) => {
|
|
2534
|
-
this.selectOptionsResolve = resolve;
|
|
2535
|
-
});
|
|
2536
|
-
this.selectOptions.then((options) => {
|
|
2537
|
-
this.filteredOptionsLength = options.length;
|
|
2538
|
-
});
|
|
2539
|
-
this.filteredOptions = this.selectOptions;
|
|
2540
|
-
}
|
|
2541
|
-
// onFilter(value) {
|
|
2542
|
-
// this.filteredOptions = this.selectOptions.then((options) => {
|
|
2543
|
-
// const filtered = options.filter((option) => option.label.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
2544
|
-
// this.filteredOptionsLength = filtered.length;
|
|
2545
|
-
// return filtered;
|
|
2546
|
-
// })
|
|
2547
|
-
// }
|
|
2548
|
-
compareObjects(o1, o2) {
|
|
2549
|
-
return _.isEqual(o1, o2);
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2553
|
-
MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialSelectComponent, selector: "mat-formio-select", viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2554
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2555
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2556
|
-
<mat-form-field fxFill>
|
|
2557
|
-
|
|
2558
|
-
<mat-label *ngIf="hasLabel">
|
|
2559
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2560
|
-
</mat-label>
|
|
2561
|
-
|
|
2562
|
-
<span *ngIf="instance.component.prefix" matPrefix>
|
|
2563
|
-
{{ instance.component.prefix }}
|
|
2564
|
-
</span>
|
|
2565
|
-
<mat-select
|
|
2566
|
-
[multiple]="instance.component.multiple"
|
|
2567
|
-
[formControl]="control"
|
|
2568
|
-
[placeholder]="instance.component.placeholder"
|
|
2569
|
-
(selectionChange)="onChange()"
|
|
2570
|
-
[compareWith]="compareObjects"
|
|
2571
|
-
>
|
|
2572
|
-
|
|
2573
|
-
<mat-option>
|
|
2574
|
-
<ngx-mat-select-search placeholderLabel="Find country..." [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
|
|
2575
|
-
</mat-option>
|
|
2576
|
-
|
|
2577
|
-
<mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
|
|
2578
|
-
<span [innerHTML]="option.label"></span>
|
|
2579
|
-
</mat-option>
|
|
2580
|
-
|
|
2581
|
-
<!-- <div class="mat-option">
|
|
2582
|
-
<input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
|
|
2583
|
-
</div> -->
|
|
2584
|
-
<mat-option *ngIf="!filteredOptionsLength" disabled>
|
|
2585
|
-
<span>Nothing was found</span>
|
|
2586
|
-
</mat-option>
|
|
2587
|
-
<!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
|
|
2588
|
-
<span [innerHTML]="option.label"></span>
|
|
2589
|
-
</mat-option> -->
|
|
2590
|
-
</mat-select>
|
|
2591
|
-
|
|
2592
|
-
<span *ngIf="instance.component.suffix" matSuffix>
|
|
2593
|
-
{{ instance.component.suffix }}
|
|
2594
|
-
</span>
|
|
2595
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2596
|
-
</mat-form-field>
|
|
2597
|
-
</ng-template>
|
|
2598
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
2599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialSelectComponent, decorators: [{
|
|
2600
|
-
type: Component,
|
|
2601
|
-
args: [{
|
|
2602
|
-
selector: 'mat-formio-select',
|
|
2603
|
-
template: `
|
|
2604
|
-
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
2605
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2606
|
-
<mat-form-field fxFill>
|
|
2607
|
-
|
|
2608
|
-
<mat-label *ngIf="hasLabel">
|
|
2609
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2610
|
-
</mat-label>
|
|
2611
|
-
|
|
2612
|
-
<span *ngIf="instance.component.prefix" matPrefix>
|
|
2613
|
-
{{ instance.component.prefix }}
|
|
2614
|
-
</span>
|
|
2615
|
-
<mat-select
|
|
2616
|
-
[multiple]="instance.component.multiple"
|
|
2617
|
-
[formControl]="control"
|
|
2618
|
-
[placeholder]="instance.component.placeholder"
|
|
2619
|
-
(selectionChange)="onChange()"
|
|
2620
|
-
[compareWith]="compareObjects"
|
|
2621
|
-
>
|
|
2622
|
-
|
|
2623
|
-
<mat-option>
|
|
2624
|
-
<ngx-mat-select-search placeholderLabel="Find country..." [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
|
|
2625
|
-
</mat-option>
|
|
2626
|
-
|
|
2627
|
-
<mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
|
|
2628
|
-
<span [innerHTML]="option.label"></span>
|
|
2629
|
-
</mat-option>
|
|
2630
|
-
|
|
2631
|
-
<!-- <div class="mat-option">
|
|
2632
|
-
<input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
|
|
2633
|
-
</div> -->
|
|
2634
|
-
<mat-option *ngIf="!filteredOptionsLength" disabled>
|
|
2635
|
-
<span>Nothing was found</span>
|
|
2636
|
-
</mat-option>
|
|
2637
|
-
<!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
|
|
2638
|
-
<span [innerHTML]="option.label"></span>
|
|
2639
|
-
</mat-option> -->
|
|
2640
|
-
</mat-select>
|
|
2641
|
-
|
|
2642
|
-
<span *ngIf="instance.component.suffix" matSuffix>
|
|
2643
|
-
{{ instance.component.suffix }}
|
|
2644
|
-
</span>
|
|
2645
|
-
<mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
|
|
2646
|
-
</mat-form-field>
|
|
2647
|
-
</ng-template>
|
|
2648
|
-
`
|
|
2649
|
-
}]
|
|
2650
|
-
}], propDecorators: { multiSelect: [{
|
|
2651
|
-
type: ViewChild,
|
|
2652
|
-
args: ['multiSelect', { static: true }]
|
|
2653
|
-
}] } });
|
|
2654
|
-
SelectComponent.MaterialComponent = MaterialSelectComponent;
|
|
2655
|
-
// Make sure we detect changes when new items make their way into the select dropdown.
|
|
2656
|
-
const setItems = SelectComponent.prototype.setItems;
|
|
2657
|
-
SelectComponent.prototype.setItems = function (...args) {
|
|
2658
|
-
setItems.call(this, ...args);
|
|
2659
|
-
if (this.materialComponent && this.materialComponent.selectOptionsResolve) {
|
|
2660
|
-
this.materialComponent.selectOptionsResolve(this.selectOptions);
|
|
2661
|
-
}
|
|
2662
|
-
};
|
|
2663
|
-
|
|
2664
|
-
class MaterialWellComponent extends MaterialNestedComponent {
|
|
2665
|
-
}
|
|
2666
|
-
MaterialWellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialWellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2667
|
-
MaterialWellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialWellComponent, selector: "mat-formio-well", usesInheritance: true, ngImport: i0, template: `
|
|
2668
|
-
<mat-card>
|
|
2669
|
-
<mat-card-content fxLayout="column"
|
|
2670
|
-
fxLayoutGap="1em"
|
|
2671
|
-
[ngStyle]="{
|
|
2672
|
-
'background-color':'#f5f5f5',
|
|
2673
|
-
'padding': '1.5em'
|
|
2674
|
-
}"
|
|
2675
|
-
>
|
|
2676
|
-
<ng-template #components></ng-template>
|
|
2677
|
-
</mat-card-content>
|
|
2678
|
-
</mat-card>
|
|
2679
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i4$2.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }] });
|
|
2680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialWellComponent, decorators: [{
|
|
2681
|
-
type: Component,
|
|
2682
|
-
args: [{ selector: 'mat-formio-well', template: `
|
|
2683
|
-
<mat-card>
|
|
2684
|
-
<mat-card-content fxLayout="column"
|
|
2685
|
-
fxLayoutGap="1em"
|
|
2686
|
-
[ngStyle]="{
|
|
2687
|
-
'background-color':'#f5f5f5',
|
|
2688
|
-
'padding': '1.5em'
|
|
2689
|
-
}"
|
|
2690
|
-
>
|
|
2691
|
-
<ng-template #components></ng-template>
|
|
2692
|
-
</mat-card-content>
|
|
2693
|
-
</mat-card>
|
|
2694
|
-
` }]
|
|
2695
|
-
}] });
|
|
2696
|
-
WellComponent.MaterialComponent = MaterialWellComponent;
|
|
2697
|
-
|
|
2698
|
-
class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
2699
|
-
constructor() {
|
|
2700
|
-
super(...arguments);
|
|
2701
|
-
this.dataSource = new MatTableDataSource();
|
|
2702
|
-
}
|
|
2703
|
-
getColumnLabel(column) {
|
|
2704
|
-
return column.label || column.key;
|
|
2705
|
-
}
|
|
2706
|
-
setInstance(instance) {
|
|
2707
|
-
super.setInstance(instance);
|
|
2708
|
-
this.dataSource.data = instance.dataValue;
|
|
2709
|
-
this.columns = {};
|
|
2710
|
-
this.displayedColumns = [];
|
|
2711
|
-
this.formColumns = [];
|
|
2712
|
-
instance.getColumns().map((column) => {
|
|
2713
|
-
this.formColumns.push(column.key);
|
|
2714
|
-
this.displayedColumns.push(column.key);
|
|
2715
|
-
this.columns[column.key] = column;
|
|
2716
|
-
});
|
|
2717
|
-
this.displayedColumns.push('__removeRow');
|
|
2718
|
-
if (this.instance.component.reorder) {
|
|
2719
|
-
this.displayedColumns.push('position');
|
|
2720
|
-
}
|
|
2721
|
-
instance.viewContainer = (component) => {
|
|
2722
|
-
let viewContainer;
|
|
2723
|
-
if (this.instance.component.disabled) {
|
|
2724
|
-
component.component.disabled = true;
|
|
2725
|
-
}
|
|
2726
|
-
this.viewContainers.forEach((container) => {
|
|
2727
|
-
const td = container.element.nativeElement.parentNode;
|
|
2728
|
-
if (component.rowIndex === parseInt(td.getAttribute('rowIndex'), 10) &&
|
|
2729
|
-
component.component.key === td.getAttribute('component')) {
|
|
2730
|
-
viewContainer = container;
|
|
2731
|
-
}
|
|
2732
|
-
});
|
|
2733
|
-
return viewContainer ? viewContainer : null;
|
|
2734
|
-
};
|
|
2735
|
-
}
|
|
2736
|
-
addAnother() {
|
|
2737
|
-
this.checkRowsNumber();
|
|
2738
|
-
this.instance.addRow();
|
|
2739
|
-
if (this.dataSource.data.length < this.instance.rows.length) {
|
|
2740
|
-
this.dataSource.data.push({});
|
|
2741
|
-
}
|
|
2742
|
-
this.dataSource.data = [...this.dataSource.data];
|
|
2743
|
-
}
|
|
2744
|
-
checkRowsNumber() {
|
|
2745
|
-
while (this.instance.rows.length < this.dataSource.data.length) {
|
|
2746
|
-
this.instance.addRow();
|
|
2747
|
-
}
|
|
2748
|
-
}
|
|
2749
|
-
removeRow(index) {
|
|
2750
|
-
this.instance.removeRow(index);
|
|
2751
|
-
this.dataSource.data.splice(index, 1);
|
|
2752
|
-
this.dataSource.data = [...this.dataSource.data];
|
|
2753
|
-
}
|
|
2754
|
-
dropTable(event) {
|
|
2755
|
-
const prevIndex = this.dataSource.data.findIndex((d) => d === event.item.data);
|
|
2756
|
-
moveItemInArray(this.control.value, prevIndex, event.currentIndex);
|
|
2757
|
-
this.renderComponents();
|
|
2758
|
-
}
|
|
2759
|
-
renderComponents() {
|
|
2760
|
-
this.instance.getRows();
|
|
2761
|
-
this.instance.setValue(this.control.value || []);
|
|
2762
|
-
}
|
|
2763
|
-
setValue(value) {
|
|
2764
|
-
const gridLength = value ? value.length : 0;
|
|
2765
|
-
while (this.instance.rows.length < gridLength) {
|
|
2766
|
-
this.addAnother();
|
|
2767
|
-
this.instance.dataValue = value;
|
|
2768
|
-
this.instance.setValue(value);
|
|
2769
|
-
}
|
|
2770
|
-
if (!value && this.instance.component.clearOnHide) {
|
|
2771
|
-
this.dataSource = new MatTableDataSource(this.instance.defaultValue);
|
|
2772
|
-
}
|
|
2773
|
-
super.setValue(value);
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
MaterialDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDataGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2777
|
-
MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialDataGridComponent, selector: "mat-formio-datagrid", usesInheritance: true, ngImport: i0, template: `
|
|
2778
|
-
<mat-formio-form-field [instance]="instance"
|
|
2779
|
-
[componentTemplate]="componentTemplate"
|
|
2780
|
-
[labelTemplate]="labelTemplate"
|
|
2781
|
-
></mat-formio-form-field>
|
|
2782
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2783
|
-
<mat-card fxFill>
|
|
2784
|
-
<ng-container *ngIf="hasLabel">
|
|
2785
|
-
<ng-container *ngTemplateOutlet="labelTemplate"></ng-container>
|
|
2786
|
-
</ng-container>
|
|
2787
|
-
<mat-card-content>
|
|
2788
|
-
<mat-card-actions
|
|
2789
|
-
*ngIf="instance.hasAddButton() && (instance.component.addAnotherPosition === 'both' || instance.component.addAnotherPosition === 'top')">
|
|
2790
|
-
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
2791
|
-
<mat-icon>add</mat-icon>
|
|
2792
|
-
{{instance.component.addAnother || 'Add Another'}}
|
|
2793
|
-
</button>
|
|
2794
|
-
</mat-card-actions>
|
|
2795
|
-
<table
|
|
2796
|
-
mat-table
|
|
2797
|
-
[dataSource]="dataSource"
|
|
2798
|
-
class="mat-elevation-z8"
|
|
2799
|
-
fxFill
|
|
2800
|
-
cdkDropList
|
|
2801
|
-
[cdkDropListData]="dataSource"
|
|
2802
|
-
(cdkDropListDropped)="dropTable($event)">
|
|
2803
|
-
>
|
|
2804
|
-
<ng-container *ngFor="let column of formColumns" [matColumnDef]="column">
|
|
2805
|
-
<th mat-header-cell *matHeaderCellDef>{{ getColumnLabel(columns[column]) }}</th>
|
|
2806
|
-
<td mat-cell *matCellDef="let i = index;" [attr.rowIndex]="i" [attr.component]="column">
|
|
2807
|
-
<ng-template #components></ng-template>
|
|
2808
|
-
</td>
|
|
2809
|
-
</ng-container>
|
|
2810
|
-
<ng-container matColumnDef="__removeRow">
|
|
2811
|
-
<th mat-header-cell *matHeaderCellDef></th>
|
|
2812
|
-
<td mat-cell *matCellDef="let i = index;">
|
|
2813
|
-
<button mat-button *ngIf="instance.hasRemoveButtons()" (click)="removeRow(i)">
|
|
2814
|
-
<mat-icon aria-hidden="false" aria-label="Remove row">delete</mat-icon>
|
|
2815
|
-
</button>
|
|
2816
|
-
</td>
|
|
2817
|
-
</ng-container>
|
|
2818
|
-
<ng-container matColumnDef="position" *ngIf="instance.component.reorder">
|
|
2819
|
-
<th mat-header-cell *matHeaderCellDef> No.</th>
|
|
2820
|
-
<td mat-cell *matCellDef="let element">
|
|
2821
|
-
<mat-icon cdkDragHandle>reorder</mat-icon>
|
|
2822
|
-
</td>
|
|
2823
|
-
</ng-container>
|
|
2824
|
-
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
2825
|
-
<div *ngIf="instance?.component?.reorder">
|
|
2826
|
-
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;" cdkDrag
|
|
2827
|
-
[cdkDragData]="row"></tr>
|
|
2828
|
-
</div>
|
|
2829
|
-
<div *ngIf="!instance?.component?.reorder">
|
|
2830
|
-
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
2831
|
-
</div>
|
|
2832
|
-
</table>
|
|
2833
|
-
</mat-card-content>
|
|
2834
|
-
<mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
|
|
2835
|
-
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
2836
|
-
<mat-icon>add</mat-icon>
|
|
2837
|
-
{{instance.component.addAnother || 'Add Another'}}
|
|
2838
|
-
</button>
|
|
2839
|
-
</mat-card-actions>
|
|
2840
|
-
</mat-card>
|
|
2841
|
-
</ng-template>
|
|
2842
|
-
|
|
2843
|
-
<ng-template #labelTemplate>
|
|
2844
|
-
<mat-card-title>
|
|
2845
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2846
|
-
</mat-card-title>
|
|
2847
|
-
</ng-template>
|
|
2848
|
-
`, isInline: true, styles: [".datagrid-row{height:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i7$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
|
|
2849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialDataGridComponent, decorators: [{
|
|
2850
|
-
type: Component,
|
|
2851
|
-
args: [{ selector: 'mat-formio-datagrid', template: `
|
|
2852
|
-
<mat-formio-form-field [instance]="instance"
|
|
2853
|
-
[componentTemplate]="componentTemplate"
|
|
2854
|
-
[labelTemplate]="labelTemplate"
|
|
2855
|
-
></mat-formio-form-field>
|
|
2856
|
-
<ng-template #componentTemplate let-hasLabel>
|
|
2857
|
-
<mat-card fxFill>
|
|
2858
|
-
<ng-container *ngIf="hasLabel">
|
|
2859
|
-
<ng-container *ngTemplateOutlet="labelTemplate"></ng-container>
|
|
2860
|
-
</ng-container>
|
|
2861
|
-
<mat-card-content>
|
|
2862
|
-
<mat-card-actions
|
|
2863
|
-
*ngIf="instance.hasAddButton() && (instance.component.addAnotherPosition === 'both' || instance.component.addAnotherPosition === 'top')">
|
|
2864
|
-
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
2865
|
-
<mat-icon>add</mat-icon>
|
|
2866
|
-
{{instance.component.addAnother || 'Add Another'}}
|
|
2867
|
-
</button>
|
|
2868
|
-
</mat-card-actions>
|
|
2869
|
-
<table
|
|
2870
|
-
mat-table
|
|
2871
|
-
[dataSource]="dataSource"
|
|
2872
|
-
class="mat-elevation-z8"
|
|
2873
|
-
fxFill
|
|
2874
|
-
cdkDropList
|
|
2875
|
-
[cdkDropListData]="dataSource"
|
|
2876
|
-
(cdkDropListDropped)="dropTable($event)">
|
|
2877
|
-
>
|
|
2878
|
-
<ng-container *ngFor="let column of formColumns" [matColumnDef]="column">
|
|
2879
|
-
<th mat-header-cell *matHeaderCellDef>{{ getColumnLabel(columns[column]) }}</th>
|
|
2880
|
-
<td mat-cell *matCellDef="let i = index;" [attr.rowIndex]="i" [attr.component]="column">
|
|
2881
|
-
<ng-template #components></ng-template>
|
|
2882
|
-
</td>
|
|
2883
|
-
</ng-container>
|
|
2884
|
-
<ng-container matColumnDef="__removeRow">
|
|
2885
|
-
<th mat-header-cell *matHeaderCellDef></th>
|
|
2886
|
-
<td mat-cell *matCellDef="let i = index;">
|
|
2887
|
-
<button mat-button *ngIf="instance.hasRemoveButtons()" (click)="removeRow(i)">
|
|
2888
|
-
<mat-icon aria-hidden="false" aria-label="Remove row">delete</mat-icon>
|
|
2889
|
-
</button>
|
|
2890
|
-
</td>
|
|
2891
|
-
</ng-container>
|
|
2892
|
-
<ng-container matColumnDef="position" *ngIf="instance.component.reorder">
|
|
2893
|
-
<th mat-header-cell *matHeaderCellDef> No.</th>
|
|
2894
|
-
<td mat-cell *matCellDef="let element">
|
|
2895
|
-
<mat-icon cdkDragHandle>reorder</mat-icon>
|
|
2896
|
-
</td>
|
|
2897
|
-
</ng-container>
|
|
2898
|
-
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
2899
|
-
<div *ngIf="instance?.component?.reorder">
|
|
2900
|
-
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;" cdkDrag
|
|
2901
|
-
[cdkDragData]="row"></tr>
|
|
2902
|
-
</div>
|
|
2903
|
-
<div *ngIf="!instance?.component?.reorder">
|
|
2904
|
-
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
2905
|
-
</div>
|
|
2906
|
-
</table>
|
|
2907
|
-
</mat-card-content>
|
|
2908
|
-
<mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
|
|
2909
|
-
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
2910
|
-
<mat-icon>add</mat-icon>
|
|
2911
|
-
{{instance.component.addAnother || 'Add Another'}}
|
|
2912
|
-
</button>
|
|
2913
|
-
</mat-card-actions>
|
|
2914
|
-
</mat-card>
|
|
2915
|
-
</ng-template>
|
|
2916
|
-
|
|
2917
|
-
<ng-template #labelTemplate>
|
|
2918
|
-
<mat-card-title>
|
|
2919
|
-
<span [instance]="instance" matFormioLabel></span>
|
|
2920
|
-
</mat-card-title>
|
|
2921
|
-
</ng-template>
|
|
2922
|
-
`, styles: [".datagrid-row{height:auto}\n"] }]
|
|
2923
|
-
}] });
|
|
2924
|
-
DataGridComponent.MaterialComponent = MaterialDataGridComponent;
|
|
2925
|
-
|
|
2926
|
-
var EditRowState;
|
|
2927
|
-
(function (EditRowState) {
|
|
2928
|
-
EditRowState["NEW"] = "new";
|
|
2929
|
-
EditRowState["EDITING"] = "editing";
|
|
2930
|
-
EditRowState["SAVED"] = "saved";
|
|
2931
|
-
EditRowState["REMOVED"] = "removed";
|
|
2932
|
-
EditRowState["DRAFT"] = "draft";
|
|
2933
|
-
})(EditRowState || (EditRowState = {}));
|
|
2934
|
-
;
|
|
2935
|
-
/* tslint:disable no-bitwise only-arrow-functions */
|
|
2936
|
-
const hashCode = function (str) {
|
|
2937
|
-
let hash = 0;
|
|
2938
|
-
let i = 0;
|
|
2939
|
-
let chr;
|
|
2940
|
-
str = str.replace(/\s/g, '');
|
|
2941
|
-
if (str.length === 0) {
|
|
2942
|
-
return hash;
|
|
2943
|
-
}
|
|
2944
|
-
for (i = 0; i < str.length; i++) {
|
|
2945
|
-
chr = str.charCodeAt(i);
|
|
2946
|
-
hash = ((hash << 5) - hash) + chr;
|
|
2947
|
-
hash |= 0; // Convert to 32bit integer
|
|
2948
|
-
}
|
|
2949
|
-
return hash;
|
|
2950
|
-
};
|
|
2951
|
-
/* tslint:enable no-bitwise only-arrow-functions */
|
|
2952
|
-
// Do nothing to createRowComponents, let mat-formio handle it.
|
|
2953
|
-
/* tslint:disable only-arrow-functions */
|
|
2954
|
-
EditGridComponent.prototype.createRowComponents = function () {
|
|
2955
|
-
return [];
|
|
2956
|
-
};
|
|
2957
|
-
const checkRow = EditGridComponent.prototype.checkRow;
|
|
2958
|
-
EditGridComponent.prototype.checkRow = function (data, editRow, flags = {}) {
|
|
2959
|
-
if (flags.checkRow) {
|
|
2960
|
-
return checkRow.call(this, data, editRow, flags);
|
|
2961
|
-
}
|
|
2962
|
-
else {
|
|
2963
|
-
return true;
|
|
2964
|
-
}
|
|
2965
|
-
};
|
|
2966
|
-
/* tslint:enable only-arrow-functions */
|
|
2967
|
-
const DEFAULT_HEADER_TEMPLATES = [
|
|
2968
|
-
hashCode(EditGridComponent.defaultHeaderTemplate),
|
|
2969
|
-
hashCode(`
|
|
2970
|
-
<div class="row">
|
|
2971
|
-
{% (components || []).forEach(function(component) { %}
|
|
2972
|
-
<div class="col-sm-2">{{ component.label }}</div>
|
|
2973
|
-
{% }) %}
|
|
2974
|
-
</div>`)
|
|
2975
|
-
];
|
|
2976
|
-
const DEFAULT_ROW_TEMPLATES = [
|
|
2977
|
-
hashCode(EditGridComponent.defaultRowTemplate),
|
|
2978
|
-
hashCode(`<div class="row">
|
|
2979
|
-
{% util.eachComponent(components, function(component) { %}
|
|
2980
|
-
<div class="col-sm-2">
|
|
2981
|
-
{{ getView(component, row[component.key]) }}
|
|
2982
|
-
</div>
|
|
2983
|
-
{% }) %}
|
|
2984
|
-
{% if (!instance.options.readOnly) { %}
|
|
2985
|
-
<div class="col-sm-2">
|
|
2986
|
-
<div class="btn-group pull-right">
|
|
2987
|
-
<button class="btn btn-default btn-sm editRow">Edit</button>
|
|
2988
|
-
<button class="btn btn-danger btn-sm removeRow">Delete</button>
|
|
2989
|
-
</div>
|
|
2990
|
-
</div>
|
|
2991
|
-
{% } %}
|
|
2992
|
-
</div>`)
|
|
2993
|
-
];
|
|
2994
|
-
class MaterialEditGridComponent extends MaterialNestedComponent {
|
|
2995
|
-
constructor() {
|
|
2996
|
-
super(...arguments);
|
|
2997
|
-
this.columns = {};
|
|
2998
|
-
this.colWidth = 0;
|
|
2999
|
-
this.valid = true;
|
|
3000
|
-
this.RowStates = EditRowState;
|
|
3001
|
-
}
|
|
3002
|
-
getRowTemplate(content) {
|
|
3003
|
-
return `<mat-list style="display: flex;">
|
|
3004
|
-
{% (components || []).forEach(function(component) { %}
|
|
3005
|
-
{% if (!component.hasOwnProperty('tableView') || component.tableView) { %}
|
|
3006
|
-
<mat-list-item style="width: {{ colWidth }}%; margin: 0 0.8rem">${content}</mat-list-item>
|
|
3007
|
-
{% } %}
|
|
3008
|
-
{% }) %}
|
|
3009
|
-
</mat-list>`;
|
|
3010
|
-
}
|
|
3011
|
-
validate(index) {
|
|
3012
|
-
if (!this.forms) {
|
|
3013
|
-
return;
|
|
3014
|
-
}
|
|
3015
|
-
const forms = this.forms.toArray();
|
|
3016
|
-
if (!forms[index]) {
|
|
3017
|
-
return;
|
|
3018
|
-
}
|
|
3019
|
-
const formioComponent = forms[index];
|
|
3020
|
-
const { data } = formioComponent.formio.submission;
|
|
3021
|
-
const isInvalid = Object.keys(data).some(value => isString(data[value]) && data[value].length === 0);
|
|
3022
|
-
if (isInvalid) {
|
|
3023
|
-
this.valid = false;
|
|
3024
|
-
}
|
|
3025
|
-
else {
|
|
3026
|
-
this.valid = true;
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
setInstance(instance) {
|
|
3030
|
-
if (instance.component.templates.header &&
|
|
3031
|
-
(DEFAULT_HEADER_TEMPLATES.indexOf(hashCode(instance.component.templates.header)) !== -1)) {
|
|
3032
|
-
instance.component.templates.header = this.getRowTemplate('{{ component.label }}');
|
|
3033
|
-
}
|
|
3034
|
-
if (instance.component.templates.row &&
|
|
3035
|
-
(DEFAULT_ROW_TEMPLATES.indexOf(hashCode(instance.component.templates.row)) !== -1)) {
|
|
3036
|
-
instance.component.templates.row = this.getRowTemplate('{{ getView(component, row[component.key]) }}');
|
|
3037
|
-
}
|
|
3038
|
-
this.displayedColumns = instance.component.components.map((comp) => {
|
|
3039
|
-
if (comp.hasOwnProperty('tableView') && !comp.tableView) {
|
|
3040
|
-
return false;
|
|
3041
|
-
}
|
|
3042
|
-
this.columns[comp.key] = comp;
|
|
3043
|
-
return comp.key;
|
|
3044
|
-
}).filter(name => !!name);
|
|
3045
|
-
const dataValue = instance.dataValue || [];
|
|
3046
|
-
this.colWidth = instance.component.components.length ? Math.floor(100 / instance.component.components.length) : 100;
|
|
3047
|
-
if (instance.component.templates && instance.component.templates.header) {
|
|
3048
|
-
this.header = instance.renderString(instance.component.templates.header, {
|
|
3049
|
-
components: instance.component.components,
|
|
3050
|
-
value: dataValue,
|
|
3051
|
-
colWidth: this.colWidth
|
|
3052
|
-
});
|
|
3053
|
-
}
|
|
3054
|
-
if (instance.component.templates && instance.component.templates.footer) {
|
|
3055
|
-
this.footer = instance.renderString(instance.component.templates.footer, {
|
|
3056
|
-
components: instance.component.components,
|
|
3057
|
-
value: dataValue,
|
|
3058
|
-
colWidth: this.colWidth
|
|
3059
|
-
});
|
|
3060
|
-
}
|
|
3061
|
-
setTimeout(() => {
|
|
3062
|
-
this.renderTemplate(this.headerElement, this.header);
|
|
3063
|
-
this.renderTemplate(this.footerElement, this.footer);
|
|
3064
|
-
}, 0);
|
|
3065
|
-
super.setInstance(instance);
|
|
3066
|
-
}
|
|
3067
|
-
addAnother() {
|
|
3068
|
-
const row = this.instance.addRow();
|
|
3069
|
-
}
|
|
3070
|
-
editRow(row, index) {
|
|
3071
|
-
const { state } = row;
|
|
3072
|
-
const { NEW, REMOVED } = this.RowStates;
|
|
3073
|
-
if (state === NEW || state === REMOVED) {
|
|
3074
|
-
return;
|
|
3075
|
-
}
|
|
3076
|
-
this.instance.editRow(index);
|
|
3077
|
-
const forms = this.forms.toArray();
|
|
3078
|
-
if (forms[index]) {
|
|
3079
|
-
forms[index].formio.submission = { data: JSON.parse(JSON.stringify(row.data)) };
|
|
3080
|
-
}
|
|
3081
|
-
}
|
|
3082
|
-
/**
|
|
3083
|
-
* Updates the row template.
|
|
3084
|
-
*
|
|
3085
|
-
* @param row
|
|
3086
|
-
* @param index
|
|
3087
|
-
*/
|
|
3088
|
-
updateRowTemplate(rowElement, index, comps) {
|
|
3089
|
-
const self = this;
|
|
3090
|
-
const editRow = Object.assign({}, this.instance.editRows[index]);
|
|
3091
|
-
if (editRow.state !== this.RowStates.NEW) {
|
|
3092
|
-
this.renderTemplate(rowElement, this.instance.renderString(this.instance.component.templates.row, {
|
|
3093
|
-
row: this.instance.dataValue[index] || {},
|
|
3094
|
-
data: this.instance.data,
|
|
3095
|
-
rowIndex: index,
|
|
3096
|
-
colWidth: this.colWidth,
|
|
3097
|
-
components: this.instance.component.components,
|
|
3098
|
-
getView: function getView(component, data) {
|
|
3099
|
-
if (!comps[component.type]) {
|
|
3100
|
-
comps[component.type] = Components$2.create(component, {}, {}, true);
|
|
3101
|
-
}
|
|
3102
|
-
return comps[component.type] ? comps[component.type].getView(data) : '';
|
|
3103
|
-
}
|
|
3104
|
-
}));
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
/**
|
|
3108
|
-
* Saves a row.
|
|
3109
|
-
*
|
|
3110
|
-
* @param row - The edit grid row.
|
|
3111
|
-
* @param index - The index for this row.
|
|
3112
|
-
*/
|
|
3113
|
-
saveRow(row, index) {
|
|
3114
|
-
const forms = this.forms.toArray();
|
|
3115
|
-
if (forms[index]) {
|
|
3116
|
-
const formioComponent = forms[index];
|
|
3117
|
-
row.data = JSON.parse(JSON.stringify(formioComponent.formio.submission.data));
|
|
3118
|
-
this.instance.saveRow(index);
|
|
3119
|
-
const rows = this.rowElements.toArray();
|
|
3120
|
-
if (rows && rows[index]) {
|
|
3121
|
-
this.updateRowTemplate(rows[index], index, {});
|
|
3122
|
-
}
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
cancelRow(index) {
|
|
3126
|
-
this.instance.cancelRow(index);
|
|
3127
|
-
this.valid = true;
|
|
3128
|
-
}
|
|
3129
|
-
renderTemplate(element, template) {
|
|
3130
|
-
if (!element || !element.nativeElement) {
|
|
3131
|
-
return;
|
|
3132
|
-
}
|
|
3133
|
-
element.nativeElement.innerHTML = template;
|
|
3134
|
-
}
|
|
3135
|
-
ngAfterViewInit() {
|
|
3136
|
-
this.rowElements.changes.subscribe((rows) => {
|
|
3137
|
-
const rowCache = {};
|
|
3138
|
-
rows.forEach((row, index) => this.updateRowTemplate(row, index, rowCache));
|
|
3139
|
-
});
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
MaterialEditGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialEditGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3143
|
-
MaterialEditGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialEditGridComponent, selector: "mat-formio-editgrid", viewQueries: [{ propertyName: "headerElement", first: true, predicate: ["header"], descendants: true }, { propertyName: "footerElement", first: true, predicate: ["footer"], descendants: true }, { propertyName: "rowElements", predicate: ["rows"], descendants: true }, { propertyName: "forms", predicate: ["forms"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\" [labelTemplate]=\"labelTemplate\">\n</mat-formio-form-field>\n<ng-template #componentTemplate let-hasLabel>\n\n <span fxLayout=\"column\" fxLayoutGap=\"1em\" fxFill>\n <ng-container *ngIf=\"hasLabel\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n </ng-container>\n <mat-accordion>\n <mat-expansion-panel *ngIf=\"header\" disabled=\"true\">\n <mat-expansion-panel-header>\n <span #header fxFill></span>\n </mat-expansion-panel-header>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngFor=\"let row of instance.editRows; index as i;\" [expanded]=\"instance.isOpen(row)\">\n <mat-expansion-panel-header (click)=\"editRow(row, i)\">\n <span *ngIf=\"row.state !== RowStates.NEW\" #rows fxFill></span>\n </mat-expansion-panel-header>\n\n <mat-formio [form]=\"instance.component\" #forms (change)=\"validate(i)\"></mat-formio>\n\n <span fxLayout=\"row\" fxLayoutGap=\"1em\">\n <button mat-raised-button color=\"primary\" [disabled]=\"!valid\" (click)=\"saveRow(row, i)\">Save</button>\n <button mat-raised-button color=\"secondary\" (click)=\"cancelRow(i)\">Cancel</button>\n <button mat-raised-button color=\"warn\" (click)=\"instance.removeRow(i)\" class=\"delete-button\">\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf=\"footer\" disabled=\"true\">\n <mat-expansion-panel-header>\n <span #footer></span>\n </mat-expansion-panel-header>\n </mat-expansion-panel>\n </mat-accordion>\n\n <span fxFill=\"none\" *ngIf=\"instance.hasAddButton()\">\n <button mat-raised-button color=\"primary\" (click)=\"addAnother()\">\n <mat-icon>add</mat-icon> Add Another\n </button>\n </span>\n </span>\n</ng-template>\n\n<ng-template #labelTemplate>\n <mat-card-title>\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-card-title>\n</ng-template> -->\n", styles: [":host .delete-button{margin-left:auto;order:2}\n"] });
|
|
3144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialEditGridComponent, decorators: [{
|
|
3145
|
-
type: Component,
|
|
3146
|
-
args: [{ selector: 'mat-formio-editgrid', template: "<!-- <mat-formio-form-field [instance]=\"instance\" [componentTemplate]=\"componentTemplate\" [labelTemplate]=\"labelTemplate\">\n</mat-formio-form-field>\n<ng-template #componentTemplate let-hasLabel>\n\n <span fxLayout=\"column\" fxLayoutGap=\"1em\" fxFill>\n <ng-container *ngIf=\"hasLabel\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n </ng-container>\n <mat-accordion>\n <mat-expansion-panel *ngIf=\"header\" disabled=\"true\">\n <mat-expansion-panel-header>\n <span #header fxFill></span>\n </mat-expansion-panel-header>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngFor=\"let row of instance.editRows; index as i;\" [expanded]=\"instance.isOpen(row)\">\n <mat-expansion-panel-header (click)=\"editRow(row, i)\">\n <span *ngIf=\"row.state !== RowStates.NEW\" #rows fxFill></span>\n </mat-expansion-panel-header>\n\n <mat-formio [form]=\"instance.component\" #forms (change)=\"validate(i)\"></mat-formio>\n\n <span fxLayout=\"row\" fxLayoutGap=\"1em\">\n <button mat-raised-button color=\"primary\" [disabled]=\"!valid\" (click)=\"saveRow(row, i)\">Save</button>\n <button mat-raised-button color=\"secondary\" (click)=\"cancelRow(i)\">Cancel</button>\n <button mat-raised-button color=\"warn\" (click)=\"instance.removeRow(i)\" class=\"delete-button\">\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf=\"footer\" disabled=\"true\">\n <mat-expansion-panel-header>\n <span #footer></span>\n </mat-expansion-panel-header>\n </mat-expansion-panel>\n </mat-accordion>\n\n <span fxFill=\"none\" *ngIf=\"instance.hasAddButton()\">\n <button mat-raised-button color=\"primary\" (click)=\"addAnother()\">\n <mat-icon>add</mat-icon> Add Another\n </button>\n </span>\n </span>\n</ng-template>\n\n<ng-template #labelTemplate>\n <mat-card-title>\n <span [instance]=\"instance\" matFormioLabel></span>\n </mat-card-title>\n</ng-template> -->\n", styles: [":host .delete-button{margin-left:auto;order:2}\n"] }]
|
|
3147
|
-
}], propDecorators: { headerElement: [{
|
|
3148
|
-
type: ViewChild,
|
|
3149
|
-
args: ['header']
|
|
3150
|
-
}], footerElement: [{
|
|
3151
|
-
type: ViewChild,
|
|
3152
|
-
args: ['footer']
|
|
3153
|
-
}], rowElements: [{
|
|
3154
|
-
type: ViewChildren,
|
|
3155
|
-
args: ['rows']
|
|
3156
|
-
}], forms: [{
|
|
3157
|
-
type: ViewChildren,
|
|
3158
|
-
args: ['forms']
|
|
3159
|
-
}] } });
|
|
3160
|
-
EditGridComponent.MaterialComponent = MaterialEditGridComponent;
|
|
3161
|
-
|
|
3162
|
-
class MaterialTableComponent extends MaterialNestedComponent {
|
|
3163
|
-
setInstance(instance) {
|
|
3164
|
-
super.setInstance(instance);
|
|
3165
|
-
instance.viewContainer = (component) => {
|
|
3166
|
-
return this.viewContainers ?
|
|
3167
|
-
this.viewContainers[(component.tableRow * this.instance.component.numCols) + component.tableColumn] :
|
|
3168
|
-
null;
|
|
3169
|
-
};
|
|
3170
|
-
}
|
|
3171
|
-
getTableColClasses() {
|
|
3172
|
-
if (!this.instance) {
|
|
3173
|
-
return;
|
|
3174
|
-
}
|
|
3175
|
-
const { condensed, cellAlignment } = this.instance.component;
|
|
3176
|
-
return Object.assign({ 'is-condensed': condensed }, (cellAlignment && { [cellAlignment]: true }));
|
|
3177
|
-
}
|
|
3178
|
-
}
|
|
3179
|
-
MaterialTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3180
|
-
MaterialTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialTableComponent, selector: "mat-formio-table", usesInheritance: true, ngImport: i0, template: `
|
|
3181
|
-
<table class="mat-table" style="width: 100%;" [ngClass]="{'is-bordered' : instance.component.bordered}">
|
|
3182
|
-
<thead>
|
|
3183
|
-
<tr class="mat-header-row">
|
|
3184
|
-
<th *ngFor="let header of instance.component.header"
|
|
3185
|
-
class="mat-header-cell"
|
|
3186
|
-
>
|
|
3187
|
-
{{ instance.t(header) }}
|
|
3188
|
-
</th>
|
|
3189
|
-
</tr>
|
|
3190
|
-
</thead>
|
|
3191
|
-
|
|
3192
|
-
<tbody>
|
|
3193
|
-
<tr *ngFor="let row of instance.table; let i = index"
|
|
3194
|
-
role="row"
|
|
3195
|
-
class="mat-row"
|
|
3196
|
-
[ngClass]="{
|
|
3197
|
-
'is-hover': instance.component.hover,
|
|
3198
|
-
'is-striped': instance.component.striped && i % 2 === 0
|
|
3199
|
-
}"
|
|
3200
|
-
>
|
|
3201
|
-
<td *ngFor="let col of row"
|
|
3202
|
-
role="gridcell"
|
|
3203
|
-
class="mat-cell"
|
|
3204
|
-
[ngClass]="getTableColClasses()"
|
|
3205
|
-
>
|
|
3206
|
-
<ng-template #components></ng-template>
|
|
3207
|
-
</td>
|
|
3208
|
-
</tr>
|
|
3209
|
-
</tbody>
|
|
3210
|
-
</table>
|
|
3211
|
-
`, isInline: true, styles: [".mat-table.is-bordered{border:1px solid #ddd}.mat-row.is-hover:hover{background-color:#f5f5f5}.mat-cell{padding:8px}.mat-cell.is-condensed{padding:3px}.mat-row.is-striped{background-color:#eee}.mat-cell.center{text-align:center}.mat-cell.right{text-align:right}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
3212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialTableComponent, decorators: [{
|
|
3213
|
-
type: Component,
|
|
3214
|
-
args: [{ selector: 'mat-formio-table', template: `
|
|
3215
|
-
<table class="mat-table" style="width: 100%;" [ngClass]="{'is-bordered' : instance.component.bordered}">
|
|
3216
|
-
<thead>
|
|
3217
|
-
<tr class="mat-header-row">
|
|
3218
|
-
<th *ngFor="let header of instance.component.header"
|
|
3219
|
-
class="mat-header-cell"
|
|
3220
|
-
>
|
|
3221
|
-
{{ instance.t(header) }}
|
|
3222
|
-
</th>
|
|
3223
|
-
</tr>
|
|
3224
|
-
</thead>
|
|
3225
|
-
|
|
3226
|
-
<tbody>
|
|
3227
|
-
<tr *ngFor="let row of instance.table; let i = index"
|
|
3228
|
-
role="row"
|
|
3229
|
-
class="mat-row"
|
|
3230
|
-
[ngClass]="{
|
|
3231
|
-
'is-hover': instance.component.hover,
|
|
3232
|
-
'is-striped': instance.component.striped && i % 2 === 0
|
|
3233
|
-
}"
|
|
3234
|
-
>
|
|
3235
|
-
<td *ngFor="let col of row"
|
|
3236
|
-
role="gridcell"
|
|
3237
|
-
class="mat-cell"
|
|
3238
|
-
[ngClass]="getTableColClasses()"
|
|
3239
|
-
>
|
|
3240
|
-
<ng-template #components></ng-template>
|
|
3241
|
-
</td>
|
|
3242
|
-
</tr>
|
|
3243
|
-
</tbody>
|
|
3244
|
-
</table>
|
|
3245
|
-
`, styles: [".mat-table.is-bordered{border:1px solid #ddd}.mat-row.is-hover:hover{background-color:#f5f5f5}.mat-cell{padding:8px}.mat-cell.is-condensed{padding:3px}.mat-row.is-striped{background-color:#eee}.mat-cell.center{text-align:center}.mat-cell.right{text-align:right}\n"] }]
|
|
3246
|
-
}] });
|
|
3247
|
-
TableComponent.MaterialComponent = MaterialTableComponent;
|
|
3248
|
-
|
|
3249
|
-
class MaterialWizardComponent extends MaterialNestedComponent {
|
|
3250
|
-
constructor() {
|
|
3251
|
-
super(...arguments);
|
|
3252
|
-
this.isLinear = true;
|
|
3253
|
-
this.prevNumOfPages = 0;
|
|
3254
|
-
}
|
|
3255
|
-
setInstance(instance) {
|
|
3256
|
-
this.isLinear = (instance.options &&
|
|
3257
|
-
instance.options.breadcrumbSettings &&
|
|
3258
|
-
instance.options.breadcrumbSettings.clickable) ? false : true;
|
|
3259
|
-
this.updatePages(instance);
|
|
3260
|
-
instance.on('pagesChanged', () => this.updatePages());
|
|
3261
|
-
super.setInstance(instance);
|
|
3262
|
-
}
|
|
3263
|
-
updatePages(instance = this.instance) {
|
|
3264
|
-
if (this.prevNumOfPages !== instance.pages.length) {
|
|
3265
|
-
instance.pages.forEach((page, pageIndex) => {
|
|
3266
|
-
page.viewContainer = () => {
|
|
3267
|
-
return this.viewContainers ? this.viewContainers[pageIndex] : null;
|
|
3268
|
-
};
|
|
3269
|
-
});
|
|
3270
|
-
this.prevNumOfPages = instance.pages.length;
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
resetWizard() {
|
|
3274
|
-
this.instance.cancel();
|
|
3275
|
-
this.stepper.reset();
|
|
3276
|
-
}
|
|
3277
|
-
nextPage() {
|
|
3278
|
-
this.instance.nextPage().then(() => this.stepper.next());
|
|
3279
|
-
}
|
|
3280
|
-
prevPage() {
|
|
3281
|
-
this.instance.prevPage().then(() => this.stepper.previous());
|
|
3282
|
-
}
|
|
3283
|
-
submit() {
|
|
3284
|
-
this.instance.submit();
|
|
3285
|
-
}
|
|
3286
|
-
renderComponents() {
|
|
3287
|
-
if (this.instance.renderComponents && this.instance.pages) {
|
|
3288
|
-
this.instance.renderComponents(this.instance.pages.reduce((comps, page) => {
|
|
3289
|
-
return comps.concat(page.components);
|
|
3290
|
-
}, []));
|
|
3291
|
-
}
|
|
3292
|
-
}
|
|
3293
|
-
}
|
|
3294
|
-
MaterialWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialWizardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3295
|
-
MaterialWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: MaterialWizardComponent, selector: "mat-formio-wizard", viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3296
|
-
<mat-horizontal-stepper [linear]="isLinear" #stepper>
|
|
3297
|
-
<mat-step *ngFor="let page of instance.pages" [label]="page.component.title">
|
|
3298
|
-
<ng-template #components></ng-template>
|
|
3299
|
-
<div class="navigation-button-row">
|
|
3300
|
-
<button *ngIf="instance.hasButton('cancel')" mat-raised-button (click)="resetWizard()">Cancel</button>
|
|
3301
|
-
<button *ngIf="instance.hasButton('previous')" mat-raised-button color="primary" (click)="prevPage()">Previous</button>
|
|
3302
|
-
<button *ngIf="instance.hasButton('next')" mat-raised-button color="primary" (click)="nextPage()">Next</button>
|
|
3303
|
-
<button *ngIf="instance.hasButton('submit')" mat-raised-button color="primary" (click)="submit()">Submit</button>
|
|
3304
|
-
</div>
|
|
3305
|
-
</mat-step>
|
|
3306
|
-
</mat-horizontal-stepper>`, isInline: true, styles: [":host .navigation-button-row{margin-top:8px}\n", ":host .navigation-button-row button{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$3.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "component", type: i3$3.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }] });
|
|
3307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: MaterialWizardComponent, decorators: [{
|
|
3308
|
-
type: Component,
|
|
3309
|
-
args: [{ selector: 'mat-formio-wizard', template: `
|
|
3310
|
-
<mat-horizontal-stepper [linear]="isLinear" #stepper>
|
|
3311
|
-
<mat-step *ngFor="let page of instance.pages" [label]="page.component.title">
|
|
3312
|
-
<ng-template #components></ng-template>
|
|
3313
|
-
<div class="navigation-button-row">
|
|
3314
|
-
<button *ngIf="instance.hasButton('cancel')" mat-raised-button (click)="resetWizard()">Cancel</button>
|
|
3315
|
-
<button *ngIf="instance.hasButton('previous')" mat-raised-button color="primary" (click)="prevPage()">Previous</button>
|
|
3316
|
-
<button *ngIf="instance.hasButton('next')" mat-raised-button color="primary" (click)="nextPage()">Next</button>
|
|
3317
|
-
<button *ngIf="instance.hasButton('submit')" mat-raised-button color="primary" (click)="submit()">Submit</button>
|
|
3318
|
-
</div>
|
|
3319
|
-
</mat-step>
|
|
3320
|
-
</mat-horizontal-stepper>`, styles: [":host .navigation-button-row{margin-top:8px}\n", ":host .navigation-button-row button{margin-right:8px}\n"] }]
|
|
3321
|
-
}], propDecorators: { stepper: [{
|
|
3322
|
-
type: ViewChild,
|
|
3323
|
-
args: ['stepper', { static: true }]
|
|
3324
|
-
}] } });
|
|
3325
|
-
Wizard.MaterialComponent = MaterialWizardComponent;
|
|
3326
|
-
Displays.addDisplay('wizard', Wizard);
|
|
3327
|
-
|
|
3328
|
-
const Components$1 = require('formiojs/components/Components').default;
|
|
3329
|
-
// Set the components.
|
|
3330
|
-
const components = {
|
|
3331
|
-
textfield: TextFieldComponent,
|
|
3332
|
-
password: PasswordComponent,
|
|
3333
|
-
url: UrlComponent,
|
|
3334
|
-
checkbox: CheckboxComponent,
|
|
3335
|
-
email: EmailComponent,
|
|
3336
|
-
phoneNumber: PhoneNumberComponent,
|
|
3337
|
-
number: NumberComponent,
|
|
3338
|
-
currency: CurrencyComponent,
|
|
3339
|
-
day: DayComponent,
|
|
3340
|
-
hidden: HiddenComponent,
|
|
3341
|
-
htmlelement: HtmlComponent,
|
|
3342
|
-
tags: TagsComponent,
|
|
3343
|
-
textarea: TextAreaComponent,
|
|
3344
|
-
button: ButtonComponent,
|
|
3345
|
-
datetime: DateTimeComponent,
|
|
3346
|
-
panel: PanelComponent,
|
|
3347
|
-
columns: ColumnsComponent,
|
|
3348
|
-
tabs: TabsComponent,
|
|
3349
|
-
table: TableComponent,
|
|
3350
|
-
well: WellComponent,
|
|
3351
|
-
fieldset: FieldsetComponent,
|
|
3352
|
-
content: ContentComponent,
|
|
3353
|
-
signature: SignatureComponent,
|
|
3354
|
-
survey: SurveyComponent,
|
|
3355
|
-
selectboxes: SelectBoxesComponent,
|
|
3356
|
-
radio: RadioComponent,
|
|
3357
|
-
select: SelectComponent,
|
|
3358
|
-
container: ContainerComponent,
|
|
3359
|
-
datagrid: DataGridComponent,
|
|
3360
|
-
editgrid: EditGridComponent,
|
|
3361
|
-
unknown: FormioComponent$1,
|
|
3362
|
-
time: TimeComponent,
|
|
3363
|
-
wizard: Wizard
|
|
3364
|
-
};
|
|
3365
|
-
function getComponents() {
|
|
3366
|
-
for (const type of Object.keys(components)) {
|
|
3367
|
-
const CompClass = components[type];
|
|
3368
|
-
CompClass.prototype.render = (function () {
|
|
3369
|
-
if (this.materialComponent) {
|
|
3370
|
-
return this.materialComponent.renderComponents();
|
|
3371
|
-
}
|
|
3372
|
-
const viewContainer = this.parent ? this.parent.viewContainer(this) : this.viewContainer(this);
|
|
3373
|
-
if (!viewContainer) {
|
|
3374
|
-
return;
|
|
3375
|
-
}
|
|
3376
|
-
const factory = this.options.viewResolver.resolveComponentFactory(CompClass.MaterialComponent);
|
|
3377
|
-
const componentRef = viewContainer.createComponent(factory);
|
|
3378
|
-
componentRef.instance.setInstance(this);
|
|
3379
|
-
});
|
|
3380
|
-
const setValue = CompClass.prototype.setValue;
|
|
3381
|
-
CompClass.prototype.setValue = (function (...args) {
|
|
3382
|
-
if (this.materialComponent) {
|
|
3383
|
-
this.materialComponent.setValue(args[0]);
|
|
3384
|
-
}
|
|
3385
|
-
return setValue.call(this, ...args);
|
|
3386
|
-
});
|
|
3387
|
-
components[type] = CompClass;
|
|
3388
|
-
}
|
|
3389
|
-
return components;
|
|
3390
|
-
}
|
|
3391
|
-
function registerComponent(name, CompClass) {
|
|
3392
|
-
class DummyComponent extends FormioComponent$2 {
|
|
3393
|
-
}
|
|
3394
|
-
;
|
|
3395
|
-
const formIOComp = DummyComponent;
|
|
3396
|
-
formIOComp.MaterialComponent = CompClass;
|
|
3397
|
-
formIOComp.prototype.render = (function () {
|
|
3398
|
-
if (this.materialComponent) {
|
|
3399
|
-
return this.materialComponent;
|
|
3400
|
-
}
|
|
3401
|
-
const viewContainer = this.parent ? this.parent.viewContainer(this) : this.viewContainer(this);
|
|
3402
|
-
if (!viewContainer) {
|
|
3403
|
-
return;
|
|
3404
|
-
}
|
|
3405
|
-
const factory = this.options.viewResolver.resolveComponentFactory(formIOComp.MaterialComponent);
|
|
3406
|
-
const componentRef = viewContainer.createComponent(factory);
|
|
3407
|
-
componentRef.instance.setInstance(this);
|
|
3408
|
-
});
|
|
3409
|
-
const setValue = formIOComp.prototype.setValue;
|
|
3410
|
-
formIOComp.prototype.setValue = (function (...args) {
|
|
3411
|
-
if (this.materialComponent) {
|
|
3412
|
-
this.materialComponent.setValue(args[0]);
|
|
3413
|
-
}
|
|
3414
|
-
return setValue.call(this, ...args);
|
|
3415
|
-
});
|
|
3416
|
-
Components$1.addComponent(name, formIOComp);
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
const Components = require('formiojs/components/Components').default;
|
|
3420
|
-
const Formio = require('formiojs/Formio').default;
|
|
3421
|
-
const Form = require('formiojs/Form').default;
|
|
3422
|
-
const Utils = require('formiojs/utils').default;
|
|
3423
|
-
function initRenderer() {
|
|
3424
|
-
Components.setComponents(getComponents());
|
|
3425
|
-
Formio.Components = Components;
|
|
3426
|
-
Formio.Templates = {};
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
class FormioComponent extends FormioBaseComponent {
|
|
3430
|
-
constructor(resolver, cd, ngZone, config) {
|
|
3431
|
-
super(ngZone, config);
|
|
3432
|
-
this.resolver = resolver;
|
|
3433
|
-
this.cd = cd;
|
|
3434
|
-
this.ngZone = ngZone;
|
|
3435
|
-
this.config = config;
|
|
3436
|
-
}
|
|
3437
|
-
getRendererOptions() {
|
|
3438
|
-
const rendererOptions = super.getRendererOptions();
|
|
3439
|
-
return Object.assign(Object.assign({}, rendererOptions), { validateOnInit: get$1(rendererOptions, 'validateOnInit', true) });
|
|
3440
|
-
}
|
|
3441
|
-
createRenderer() {
|
|
3442
|
-
const options = this.getRendererOptions();
|
|
3443
|
-
const flags = {
|
|
3444
|
-
validateOnInit: options.validateOnInit
|
|
3445
|
-
};
|
|
3446
|
-
options.viewResolver = this.resolver;
|
|
3447
|
-
const form = new Form();
|
|
3448
|
-
form._form = this.form;
|
|
3449
|
-
form.options = options;
|
|
3450
|
-
form.options.events = form.events;
|
|
3451
|
-
form.instance = form.create(this.form.display);
|
|
3452
|
-
form.instance.viewContainer = () => this.formioViewContainer;
|
|
3453
|
-
if (this.submission && this.submission.data) {
|
|
3454
|
-
form.instance.data = this.submission.data;
|
|
3455
|
-
}
|
|
3456
|
-
this.ngZone.run(() => form.instance.setForm(this.form, flags)
|
|
3457
|
-
.then(() => form.readyResolve(form.instance))
|
|
3458
|
-
.catch(() => form.readyReject()));
|
|
3459
|
-
return form.instance;
|
|
3460
|
-
}
|
|
3461
|
-
}
|
|
3462
|
-
FormioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: FormioComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.FormioAppConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3463
|
-
FormioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: FormioComponent, selector: "mat-formio", viewQueries: [{ propertyName: "formioViewContainer", first: true, predicate: ["formio"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3464
|
-
<mat-spinner *ngIf="isLoading"></mat-spinner>
|
|
3465
|
-
<div *ngIf="!this.options?.disableAlerts">
|
|
3466
|
-
<div *ngFor="let alert of alerts.alerts"
|
|
3467
|
-
class="alert alert-{{ alert.type }}"
|
|
3468
|
-
role="alert"
|
|
3469
|
-
>
|
|
3470
|
-
{{ alert.message }}
|
|
3471
|
-
</div>
|
|
3472
|
-
</div>
|
|
3473
|
-
<div fxLayout="column" fxLayoutGap="1em">
|
|
3474
|
-
<ng-template #formio></ng-template>
|
|
3475
|
-
</div>
|
|
3476
|
-
`, isInline: true, styles: [".alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:.5rem;border:1px solid transparent;border-radius:.25rem}::ng-deep mat-card{box-sizing:border-box;-moz-box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
|
|
3477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: FormioComponent, decorators: [{
|
|
3478
|
-
type: Component,
|
|
3479
|
-
args: [{ selector: 'mat-formio', template: `
|
|
3480
|
-
<mat-spinner *ngIf="isLoading"></mat-spinner>
|
|
3481
|
-
<div *ngIf="!this.options?.disableAlerts">
|
|
3482
|
-
<div *ngFor="let alert of alerts.alerts"
|
|
3483
|
-
class="alert alert-{{ alert.type }}"
|
|
3484
|
-
role="alert"
|
|
3485
|
-
>
|
|
3486
|
-
{{ alert.message }}
|
|
3487
|
-
</div>
|
|
3488
|
-
</div>
|
|
3489
|
-
<div fxLayout="column" fxLayoutGap="1em">
|
|
3490
|
-
<ng-template #formio></ng-template>
|
|
3491
|
-
</div>
|
|
3492
|
-
`, styles: [".alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:.5rem;border:1px solid transparent;border-radius:.25rem}::ng-deep mat-card{box-sizing:border-box;-moz-box-sizing:border-box}\n"] }]
|
|
3493
|
-
}], ctorParameters: function () {
|
|
3494
|
-
return [{ type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.FormioAppConfig, decorators: [{
|
|
3495
|
-
type: Optional
|
|
3496
|
-
}] }];
|
|
3497
|
-
}, propDecorators: { formioViewContainer: [{
|
|
3498
|
-
type: ViewChild,
|
|
3499
|
-
args: ['formio', { static: true, read: ViewContainerRef }]
|
|
3500
|
-
}] } });
|
|
3501
|
-
|
|
3502
|
-
class NgxRenderMaterialFormsModule {
|
|
3503
|
-
constructor() {
|
|
3504
|
-
initRenderer();
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
NgxRenderMaterialFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3508
|
-
NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsModule, declarations: [NgxRenderMaterialFormsComponent,
|
|
3509
|
-
FormioComponent,
|
|
3510
|
-
MaterialButtonComponent,
|
|
3511
|
-
MaterialTextfieldComponent,
|
|
3512
|
-
MaterialPasswordComponent,
|
|
3513
|
-
MaterialUrlComponent,
|
|
3514
|
-
MaterialEmailComponent,
|
|
3515
|
-
MaterialPhoneNumberComponent,
|
|
3516
|
-
MaterialNumberComponent,
|
|
3517
|
-
MaterialCurrencyComponent,
|
|
3518
|
-
MaterialDayComponent,
|
|
3519
|
-
MaterialHiddenComponent,
|
|
3520
|
-
MaterialHtmlComponent,
|
|
3521
|
-
MaterialTagsComponent,
|
|
3522
|
-
MaterialTextareaComponent,
|
|
3523
|
-
MaterialColumnsComponent,
|
|
3524
|
-
MaterialContainerComponent,
|
|
3525
|
-
MaterialDataGridComponent,
|
|
3526
|
-
MaterialEditGridComponent,
|
|
3527
|
-
MaterialPanelComponent,
|
|
3528
|
-
MaterialCheckboxComponent,
|
|
3529
|
-
MaterialFieldsetComponent,
|
|
3530
|
-
MaterialContentComponent,
|
|
3531
|
-
MaterialSignatureComponent,
|
|
3532
|
-
MaterialSurveyComponent,
|
|
3533
|
-
MaterialSelectBoxesComponent,
|
|
3534
|
-
MaterialRadioComponent,
|
|
3535
|
-
MaterialSelectComponent,
|
|
3536
|
-
MaterialTabsComponent,
|
|
3537
|
-
MaterialTableComponent,
|
|
3538
|
-
MaterialDateComponent,
|
|
3539
|
-
MaterialWellComponent,
|
|
3540
|
-
MaterialWizardComponent,
|
|
3541
|
-
MaterialComponent,
|
|
3542
|
-
MaterialNestedComponent,
|
|
3543
|
-
MaterialTimeComponent,
|
|
3544
|
-
MaterialCalendarComponent,
|
|
3545
|
-
FormioFormFieldComponent,
|
|
3546
|
-
LabelComponent,
|
|
3547
|
-
MaskDirective], imports: [CommonModule,
|
|
3548
|
-
FormsModule,
|
|
3549
|
-
ReactiveFormsModule,
|
|
3550
|
-
MatInputModule,
|
|
3551
|
-
MatButtonModule,
|
|
3552
|
-
MatInputModule,
|
|
3553
|
-
MatFormFieldModule,
|
|
3554
|
-
MatCheckboxModule,
|
|
3555
|
-
MatRadioModule,
|
|
3556
|
-
MatSelectModule,
|
|
3557
|
-
MatListModule,
|
|
3558
|
-
MatChipsModule,
|
|
3559
|
-
MatExpansionModule,
|
|
3560
|
-
MatButtonModule,
|
|
3561
|
-
MatTabsModule,
|
|
3562
|
-
MatTableModule,
|
|
3563
|
-
MatNativeDateModule,
|
|
3564
|
-
MatDatepickerModule,
|
|
3565
|
-
MatProgressSpinnerModule,
|
|
3566
|
-
MatTooltipModule,
|
|
3567
|
-
MatIconModule,
|
|
3568
|
-
FlexLayoutModule,
|
|
3569
|
-
MatStepperModule,
|
|
3570
|
-
MatCardModule,
|
|
3571
|
-
DragDropModule,
|
|
3572
|
-
NgxMatSelectSearchModule], exports: [NgxRenderMaterialFormsComponent,
|
|
3573
|
-
FormioComponent,
|
|
3574
|
-
MatInputModule,
|
|
3575
|
-
MatFormFieldModule,
|
|
3576
|
-
MatCheckboxModule,
|
|
3577
|
-
MatRadioModule,
|
|
3578
|
-
MatSelectModule,
|
|
3579
|
-
MatListModule,
|
|
3580
|
-
MatChipsModule,
|
|
3581
|
-
MatExpansionModule,
|
|
3582
|
-
MatButtonModule,
|
|
3583
|
-
MatCardModule,
|
|
3584
|
-
MatTabsModule,
|
|
3585
|
-
MatTableModule,
|
|
3586
|
-
MatNativeDateModule,
|
|
3587
|
-
MatDatepickerModule,
|
|
3588
|
-
MatProgressSpinnerModule,
|
|
3589
|
-
MatTooltipModule,
|
|
3590
|
-
MatIconModule,
|
|
3591
|
-
DragDropModule,
|
|
3592
|
-
MatStepperModule,
|
|
3593
|
-
FlexLayoutModule,
|
|
3594
|
-
NgxMatSelectSearchModule] });
|
|
3595
|
-
NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsModule, imports: [CommonModule,
|
|
3596
|
-
FormsModule,
|
|
3597
|
-
ReactiveFormsModule,
|
|
3598
|
-
MatInputModule,
|
|
3599
|
-
MatButtonModule,
|
|
3600
|
-
MatInputModule,
|
|
3601
|
-
MatFormFieldModule,
|
|
3602
|
-
MatCheckboxModule,
|
|
3603
|
-
MatRadioModule,
|
|
3604
|
-
MatSelectModule,
|
|
3605
|
-
MatListModule,
|
|
3606
|
-
MatChipsModule,
|
|
3607
|
-
MatExpansionModule,
|
|
3608
|
-
MatButtonModule,
|
|
3609
|
-
MatTabsModule,
|
|
3610
|
-
MatTableModule,
|
|
3611
|
-
MatNativeDateModule,
|
|
3612
|
-
MatDatepickerModule,
|
|
3613
|
-
MatProgressSpinnerModule,
|
|
3614
|
-
MatTooltipModule,
|
|
3615
|
-
MatIconModule,
|
|
3616
|
-
FlexLayoutModule,
|
|
3617
|
-
MatStepperModule,
|
|
3618
|
-
MatCardModule,
|
|
3619
|
-
DragDropModule,
|
|
3620
|
-
NgxMatSelectSearchModule, MatInputModule,
|
|
3621
|
-
MatFormFieldModule,
|
|
3622
|
-
MatCheckboxModule,
|
|
3623
|
-
MatRadioModule,
|
|
3624
|
-
MatSelectModule,
|
|
3625
|
-
MatListModule,
|
|
3626
|
-
MatChipsModule,
|
|
3627
|
-
MatExpansionModule,
|
|
3628
|
-
MatButtonModule,
|
|
3629
|
-
MatCardModule,
|
|
3630
|
-
MatTabsModule,
|
|
3631
|
-
MatTableModule,
|
|
3632
|
-
MatNativeDateModule,
|
|
3633
|
-
MatDatepickerModule,
|
|
3634
|
-
MatProgressSpinnerModule,
|
|
3635
|
-
MatTooltipModule,
|
|
3636
|
-
MatIconModule,
|
|
3637
|
-
DragDropModule,
|
|
3638
|
-
MatStepperModule,
|
|
3639
|
-
FlexLayoutModule,
|
|
3640
|
-
NgxMatSelectSearchModule] });
|
|
3641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NgxRenderMaterialFormsModule, decorators: [{
|
|
3642
|
-
type: NgModule,
|
|
3643
|
-
args: [{
|
|
3644
|
-
declarations: [
|
|
3645
|
-
NgxRenderMaterialFormsComponent,
|
|
3646
|
-
FormioComponent,
|
|
3647
|
-
MaterialButtonComponent,
|
|
3648
|
-
MaterialTextfieldComponent,
|
|
3649
|
-
MaterialPasswordComponent,
|
|
3650
|
-
MaterialUrlComponent,
|
|
3651
|
-
MaterialEmailComponent,
|
|
3652
|
-
MaterialPhoneNumberComponent,
|
|
3653
|
-
MaterialNumberComponent,
|
|
3654
|
-
MaterialCurrencyComponent,
|
|
3655
|
-
MaterialDayComponent,
|
|
3656
|
-
MaterialHiddenComponent,
|
|
3657
|
-
MaterialHtmlComponent,
|
|
3658
|
-
MaterialTagsComponent,
|
|
3659
|
-
MaterialTextareaComponent,
|
|
3660
|
-
MaterialColumnsComponent,
|
|
3661
|
-
MaterialContainerComponent,
|
|
3662
|
-
MaterialDataGridComponent,
|
|
3663
|
-
MaterialEditGridComponent,
|
|
3664
|
-
MaterialPanelComponent,
|
|
3665
|
-
MaterialCheckboxComponent,
|
|
3666
|
-
MaterialFieldsetComponent,
|
|
3667
|
-
MaterialContentComponent,
|
|
3668
|
-
MaterialSignatureComponent,
|
|
3669
|
-
MaterialSurveyComponent,
|
|
3670
|
-
MaterialSelectBoxesComponent,
|
|
3671
|
-
MaterialRadioComponent,
|
|
3672
|
-
MaterialSelectComponent,
|
|
3673
|
-
MaterialTabsComponent,
|
|
3674
|
-
MaterialTableComponent,
|
|
3675
|
-
MaterialDateComponent,
|
|
3676
|
-
MaterialWellComponent,
|
|
3677
|
-
MaterialWizardComponent,
|
|
3678
|
-
MaterialComponent,
|
|
3679
|
-
MaterialNestedComponent,
|
|
3680
|
-
MaterialTimeComponent,
|
|
3681
|
-
MaterialCalendarComponent,
|
|
3682
|
-
FormioFormFieldComponent,
|
|
3683
|
-
LabelComponent,
|
|
3684
|
-
MaskDirective
|
|
3685
|
-
],
|
|
3686
|
-
imports: [
|
|
3687
|
-
CommonModule,
|
|
3688
|
-
FormsModule,
|
|
3689
|
-
ReactiveFormsModule,
|
|
3690
|
-
MatInputModule,
|
|
3691
|
-
MatButtonModule,
|
|
3692
|
-
MatInputModule,
|
|
3693
|
-
MatFormFieldModule,
|
|
3694
|
-
MatCheckboxModule,
|
|
3695
|
-
MatRadioModule,
|
|
3696
|
-
MatSelectModule,
|
|
3697
|
-
MatListModule,
|
|
3698
|
-
MatChipsModule,
|
|
3699
|
-
MatExpansionModule,
|
|
3700
|
-
MatButtonModule,
|
|
3701
|
-
MatTabsModule,
|
|
3702
|
-
MatTableModule,
|
|
3703
|
-
MatNativeDateModule,
|
|
3704
|
-
MatDatepickerModule,
|
|
3705
|
-
MatProgressSpinnerModule,
|
|
3706
|
-
MatTooltipModule,
|
|
3707
|
-
MatIconModule,
|
|
3708
|
-
FlexLayoutModule,
|
|
3709
|
-
MatStepperModule,
|
|
3710
|
-
MatCardModule,
|
|
3711
|
-
DragDropModule,
|
|
3712
|
-
NgxMatSelectSearchModule
|
|
3713
|
-
],
|
|
3714
|
-
exports: [
|
|
3715
|
-
NgxRenderMaterialFormsComponent,
|
|
3716
|
-
FormioComponent,
|
|
3717
|
-
MatInputModule,
|
|
3718
|
-
MatFormFieldModule,
|
|
3719
|
-
MatCheckboxModule,
|
|
3720
|
-
MatRadioModule,
|
|
3721
|
-
MatSelectModule,
|
|
3722
|
-
MatListModule,
|
|
3723
|
-
MatChipsModule,
|
|
3724
|
-
MatExpansionModule,
|
|
3725
|
-
MatButtonModule,
|
|
3726
|
-
MatCardModule,
|
|
3727
|
-
MatTabsModule,
|
|
3728
|
-
MatTableModule,
|
|
3729
|
-
MatNativeDateModule,
|
|
3730
|
-
MatDatepickerModule,
|
|
3731
|
-
MatProgressSpinnerModule,
|
|
3732
|
-
MatTooltipModule,
|
|
3733
|
-
MatIconModule,
|
|
3734
|
-
DragDropModule,
|
|
3735
|
-
MatStepperModule,
|
|
3736
|
-
FlexLayoutModule,
|
|
3737
|
-
NgxMatSelectSearchModule
|
|
3738
|
-
],
|
|
3739
|
-
entryComponents: [
|
|
3740
|
-
MaterialButtonComponent,
|
|
3741
|
-
MaterialTextfieldComponent,
|
|
3742
|
-
MaterialPasswordComponent,
|
|
3743
|
-
MaterialUrlComponent,
|
|
3744
|
-
MaterialEmailComponent,
|
|
3745
|
-
MaterialPhoneNumberComponent,
|
|
3746
|
-
MaterialNumberComponent,
|
|
3747
|
-
MaterialCurrencyComponent,
|
|
3748
|
-
MaterialDayComponent,
|
|
3749
|
-
MaterialHiddenComponent,
|
|
3750
|
-
MaterialHtmlComponent,
|
|
3751
|
-
MaterialTagsComponent,
|
|
3752
|
-
MaterialTextareaComponent,
|
|
3753
|
-
MaterialColumnsComponent,
|
|
3754
|
-
MaterialContainerComponent,
|
|
3755
|
-
MaterialDataGridComponent,
|
|
3756
|
-
MaterialEditGridComponent,
|
|
3757
|
-
MaterialPanelComponent,
|
|
3758
|
-
MaterialCheckboxComponent,
|
|
3759
|
-
MaterialFieldsetComponent,
|
|
3760
|
-
MaterialContentComponent,
|
|
3761
|
-
MaterialSignatureComponent,
|
|
3762
|
-
MaterialSurveyComponent,
|
|
3763
|
-
MaterialSelectBoxesComponent,
|
|
3764
|
-
MaterialRadioComponent,
|
|
3765
|
-
MaterialSelectComponent,
|
|
3766
|
-
MaterialTabsComponent,
|
|
3767
|
-
MaterialTableComponent,
|
|
3768
|
-
MaterialDateComponent,
|
|
3769
|
-
MaterialWellComponent,
|
|
3770
|
-
MaterialComponent,
|
|
3771
|
-
MaterialNestedComponent,
|
|
3772
|
-
MaterialTimeComponent,
|
|
3773
|
-
MaterialWizardComponent
|
|
3774
|
-
]
|
|
3775
|
-
}]
|
|
3776
|
-
}], ctorParameters: function () { return []; } });
|
|
3777
|
-
|
|
3778
|
-
/*
|
|
3779
|
-
* Public API Surface of ngx-render-material-forms
|
|
3780
|
-
*/
|
|
3781
|
-
|
|
3782
|
-
/**
|
|
3783
|
-
* Generated bundle index. Do not edit.
|
|
3784
|
-
*/
|
|
3785
|
-
|
|
3786
|
-
export { Components, Form, Formio, FormioComponent, MaterialButtonComponent, MaterialCheckboxComponent, MaterialColumnsComponent, MaterialComponent, MaterialContainerComponent, MaterialContentComponent, MaterialCurrencyComponent, MaterialDataGridComponent, MaterialDateComponent, MaterialDayComponent, MaterialEditGridComponent, MaterialEmailComponent, MaterialFieldsetComponent, MaterialHiddenComponent, MaterialHtmlComponent, MaterialNestedComponent, MaterialNumberComponent, MaterialPanelComponent, MaterialPasswordComponent, MaterialPhoneNumberComponent, MaterialRadioComponent, MaterialSelectBoxesComponent, MaterialSelectComponent, MaterialSignatureComponent, MaterialSurveyComponent, MaterialTableComponent, MaterialTabsComponent, MaterialTagsComponent, MaterialTextareaComponent, MaterialTextfieldComponent, MaterialTimeComponent, MaterialUrlComponent, MaterialWellComponent, NgxRenderMaterialFormsComponent, NgxRenderMaterialFormsModule, NgxRenderMaterialFormsService, Utils, initRenderer, registerComponent };
|
|
3787
|
-
//# sourceMappingURL=ngx-render-material-forms.mjs.map
|