@mtna/web-form-angular 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +25 -0
- package/bundles/mtna-web-form-angular.umd.js +4982 -0
- package/bundles/mtna-web-form-angular.umd.js.map +1 -0
- package/esm2015/lib/core/animations.js +8 -0
- package/esm2015/lib/core/api-config.js +3 -0
- package/esm2015/lib/core/index.js +7 -0
- package/esm2015/lib/core/pipes/coerce-date-item.pipe.js +23 -0
- package/esm2015/lib/core/pipes/coerce-form-group.pipe.js +35 -0
- package/esm2015/lib/core/pipes/date-quarter.pipe.js +43 -0
- package/esm2015/lib/core/pipes/get-auto-complete.pipe.js +42 -0
- package/esm2015/lib/core/pipes/get-available-quarters.pipe.js +29 -0
- package/esm2015/lib/core/pipes/get-form-control-error.pipe.js +20 -0
- package/esm2015/lib/core/pipes/get-list-icon.pipe.js +53 -0
- package/esm2015/lib/core/pipes/get-object-type.pipe.js +17 -0
- package/esm2015/lib/core/pipes/get-selected-option.pipe.js +20 -0
- package/esm2015/lib/core/pipes/index.js +71 -0
- package/esm2015/lib/core/pipes/items-with-value.pipe.js +30 -0
- package/esm2015/lib/core/pipes/sanitize-html.pipe.js +23 -0
- package/esm2015/lib/core/services/api.service.js +67 -0
- package/esm2015/lib/core/services/form-manager.service.js +465 -0
- package/esm2015/lib/core/services/index.js +5 -0
- package/esm2015/lib/core/services/ng-form.service.js +150 -0
- package/esm2015/lib/core/services/ui.service.js +333 -0
- package/esm2015/lib/core/utilities/find-form-control.js +29 -0
- package/esm2015/lib/core/utilities/find-form-item.js +25 -0
- package/esm2015/lib/core/utilities/flatten-steps.js +10 -0
- package/esm2015/lib/core/utilities/generate-form-steps.js +25 -0
- package/esm2015/lib/core/utilities/index.js +9 -0
- package/esm2015/lib/core/utilities/is-form-group.js +6 -0
- package/esm2015/lib/core/utilities/serializer-util.js +358 -0
- package/esm2015/lib/core/utilities/update-step-status.js +38 -0
- package/esm2015/lib/core/validators/index.js +3 -0
- package/esm2015/lib/core/validators/instant-validation-result-error-state-matcher.js +23 -0
- package/esm2015/lib/core/validators/validation-result-validator.js +19 -0
- package/esm2015/lib/file-upload/file-upload.component.js +66 -0
- package/esm2015/lib/file-upload/index.js +2 -0
- package/esm2015/lib/form/base-form-item.model.js +2 -0
- package/esm2015/lib/form/form-disabler.component.js +38 -0
- package/esm2015/lib/form/form-item.directive.js +22 -0
- package/esm2015/lib/form/form.component.js +250 -0
- package/esm2015/lib/form/form.module.js +214 -0
- package/esm2015/lib/form/index.js +5 -0
- package/esm2015/lib/form/white-list.model.js +11 -0
- package/esm2015/lib/form-item-controls/base-form-item-control.directive.js +58 -0
- package/esm2015/lib/form-item-controls/base-parent-item-control.directive.js +42 -0
- package/esm2015/lib/form-item-controls/base-single-selection-parent.directive.js +53 -0
- package/esm2015/lib/form-item-controls/date-range.component.js +84 -0
- package/esm2015/lib/form-item-controls/date.component.js +134 -0
- package/esm2015/lib/form-item-controls/dropdown.component.js +109 -0
- package/esm2015/lib/form-item-controls/index.js +8 -0
- package/esm2015/lib/form-item-controls/input.component.js +149 -0
- package/esm2015/lib/form-item-controls/year-quarter-range.component.js +75 -0
- package/esm2015/lib/form-item-controls/year-quarter.component.js +228 -0
- package/esm2015/lib/form-stepper/form-step-group.component.js +95 -0
- package/esm2015/lib/form-stepper/form-step-group.pipe.js +20 -0
- package/esm2015/lib/form-stepper/form-step.component.js +110 -0
- package/esm2015/lib/form-stepper/form-step.util.js +28 -0
- package/esm2015/lib/form-stepper/form-stepper.component.js +115 -0
- package/esm2015/lib/form-stepper/form-stepper.module.js +53 -0
- package/esm2015/lib/form-stepper/index.js +8 -0
- package/esm2015/lib/form-stepper/models/base-form-step.model.js +6 -0
- package/esm2015/lib/form-stepper/models/form-step-group.model.js +13 -0
- package/esm2015/lib/form-stepper/models/form-step.model.js +12 -0
- package/esm2015/lib/form-stepper/models/index.js +4 -0
- package/esm2015/lib/groups/form-item-dialog-data.model.js +14 -0
- package/esm2015/lib/groups/group-components.js +646 -0
- package/esm2015/lib/groups/index.js +3 -0
- package/esm2015/lib/groups/repeatable-item.component.js +23 -0
- package/esm2015/lib/item-header/index.js +2 -0
- package/esm2015/lib/item-header/item-header.component.js +108 -0
- package/esm2015/lib/static-form-items/index.js +3 -0
- package/esm2015/lib/static-form-items/ordered-list-item.js +50 -0
- package/esm2015/lib/static-form-items/unordered-list-item.js +52 -0
- package/esm2015/lib/step-card/index.js +2 -0
- package/esm2015/lib/step-card/step-card.component.js +53 -0
- package/esm2015/mtna-web-form-angular.js +5 -0
- package/esm2015/public-api.js +10 -0
- package/fesm2015/mtna-web-form-angular.js +4614 -0
- package/fesm2015/mtna-web-form-angular.js.map +1 -0
- package/lib/_index.scss +25 -0
- package/lib/core/_all-color.scss +25 -0
- package/lib/core/_all-theme.scss +28 -0
- package/lib/core/_all-typography.scss +25 -0
- package/lib/core/_core-theme.scss +43 -0
- package/lib/core/animations.d.ts +2 -0
- package/lib/core/api-config.d.ts +5 -0
- package/lib/core/index.d.ts +6 -0
- package/lib/core/pipes/coerce-date-item.pipe.d.ts +11 -0
- package/lib/core/pipes/coerce-form-group.pipe.d.ts +23 -0
- package/lib/core/pipes/date-quarter.pipe.d.ts +7 -0
- package/lib/core/pipes/get-auto-complete.pipe.d.ts +7 -0
- package/lib/core/pipes/get-available-quarters.pipe.d.ts +8 -0
- package/lib/core/pipes/get-form-control-error.pipe.d.ts +14 -0
- package/lib/core/pipes/get-list-icon.pipe.d.ts +7 -0
- package/lib/core/pipes/get-object-type.pipe.d.ts +7 -0
- package/lib/core/pipes/get-selected-option.pipe.d.ts +8 -0
- package/lib/core/pipes/index.d.ts +28 -0
- package/lib/core/pipes/items-with-value.pipe.d.ts +13 -0
- package/lib/core/pipes/sanitize-html.pipe.d.ts +10 -0
- package/lib/core/services/api.service.d.ts +41 -0
- package/lib/core/services/form-manager.service.d.ts +184 -0
- package/lib/core/services/index.d.ts +4 -0
- package/lib/core/services/ng-form.service.d.ts +76 -0
- package/lib/core/services/ui.service.d.ts +123 -0
- package/lib/core/utilities/find-form-control.d.ts +11 -0
- package/lib/core/utilities/find-form-item.d.ts +10 -0
- package/lib/core/utilities/flatten-steps.d.ts +7 -0
- package/lib/core/utilities/generate-form-steps.d.ts +3 -0
- package/lib/core/utilities/index.d.ts +8 -0
- package/lib/core/utilities/is-form-group.d.ts +3 -0
- package/lib/core/utilities/serializer-util.d.ts +81 -0
- package/lib/core/utilities/update-step-status.d.ts +14 -0
- package/lib/core/validators/index.d.ts +2 -0
- package/lib/core/validators/instant-validation-result-error-state-matcher.d.ts +13 -0
- package/lib/core/validators/validation-result-validator.d.ts +12 -0
- package/lib/file-upload/file-upload.component.d.ts +23 -0
- package/lib/file-upload/index.d.ts +1 -0
- package/lib/form/base-form-item.model.d.ts +15 -0
- package/lib/form/form-disabler.component.d.ts +6 -0
- package/lib/form/form-item.directive.d.ts +13 -0
- package/lib/form/form.component.d.ts +89 -0
- package/lib/form/form.module.d.ts +52 -0
- package/lib/form/index.d.ts +4 -0
- package/lib/form/white-list.model.d.ts +6 -0
- package/lib/form-item-controls/_date-item-theme.scss +29 -0
- package/lib/form-item-controls/_form-control-theme.scss +28 -0
- package/lib/form-item-controls/_year-quarter-item-theme.scss +28 -0
- package/lib/form-item-controls/base-form-item-control.directive.d.ts +26 -0
- package/lib/form-item-controls/base-parent-item-control.directive.d.ts +19 -0
- package/lib/form-item-controls/base-single-selection-parent.directive.d.ts +26 -0
- package/lib/form-item-controls/date-range.component.d.ts +12 -0
- package/lib/form-item-controls/date.component.d.ts +24 -0
- package/lib/form-item-controls/dropdown.component.d.ts +9 -0
- package/lib/form-item-controls/index.d.ts +7 -0
- package/lib/form-item-controls/input.component.d.ts +14 -0
- package/lib/form-item-controls/year-quarter-range.component.d.ts +9 -0
- package/lib/form-item-controls/year-quarter.component.d.ts +33 -0
- package/lib/form-stepper/_form-step-group-theme.scss +43 -0
- package/lib/form-stepper/_form-stepper-theme.scss +72 -0
- package/lib/form-stepper/form-step-group.component.d.ts +23 -0
- package/lib/form-stepper/form-step-group.pipe.d.ts +11 -0
- package/lib/form-stepper/form-step.component.d.ts +27 -0
- package/lib/form-stepper/form-step.util.d.ts +27 -0
- package/lib/form-stepper/form-stepper.component.d.ts +35 -0
- package/lib/form-stepper/form-stepper.module.d.ts +18 -0
- package/lib/form-stepper/index.d.ts +7 -0
- package/lib/form-stepper/models/base-form-step.model.d.ts +4 -0
- package/lib/form-stepper/models/form-step-group.model.d.ts +8 -0
- package/lib/form-stepper/models/form-step.model.d.ts +11 -0
- package/lib/form-stepper/models/index.d.ts +3 -0
- package/lib/groups/_checkbox-theme.scss +62 -0
- package/lib/groups/_form-group-theme.scss +32 -0
- package/lib/groups/_multiple-choice-theme.scss +65 -0
- package/lib/groups/_repeatable-item-theme.scss +28 -0
- package/lib/groups/form-item-dialog-data.model.d.ts +13 -0
- package/lib/groups/group-components.d.ts +221 -0
- package/lib/groups/index.d.ts +2 -0
- package/lib/groups/repeatable-item.component.d.ts +5 -0
- package/lib/item-header/_item-header-theme.scss +28 -0
- package/lib/item-header/index.d.ts +1 -0
- package/lib/item-header/item-header.component.d.ts +35 -0
- package/lib/static-form-items/index.d.ts +2 -0
- package/lib/static-form-items/ordered-list-item.d.ts +11 -0
- package/lib/static-form-items/unordered-list-item.d.ts +11 -0
- package/lib/step-card/_step-card-theme.scss +42 -0
- package/lib/step-card/index.d.ts +1 -0
- package/lib/step-card/step-card.component.d.ts +21 -0
- package/mtna-web-form-angular.d.ts +5 -0
- package/package.json +43 -0
- package/public-api.d.ts +9 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { MatDatepicker } from '@angular/material/datepicker';
|
|
3
|
+
import { BaseFormItemControl } from './base-form-item-control.directive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@mtna/core-angular";
|
|
6
|
+
import * as i2 from "@angular/material/form-field";
|
|
7
|
+
import * as i3 from "@angular/material/datepicker";
|
|
8
|
+
import * as i4 from "@angular/common";
|
|
9
|
+
import * as i5 from "@angular/material/input";
|
|
10
|
+
import * as i6 from "@angular/forms";
|
|
11
|
+
import * as i7 from "../core/pipes/get-form-control-error.pipe";
|
|
12
|
+
export class MtnaWfDateComponent extends BaseFormItemControl {
|
|
13
|
+
constructor(logger) {
|
|
14
|
+
super();
|
|
15
|
+
this.dateItemClass = true;
|
|
16
|
+
this._format = 'YYYY-MM-DD';
|
|
17
|
+
this.rangeLimits = { end: null, start: null };
|
|
18
|
+
// We need to check to ensure 'moment' & 'moment-jdateformatparser' scripts have been added to angular.json so that
|
|
19
|
+
// the DateFormItemComponent doesn't break when attempting to format SimpleDateFormat string to Moment format string
|
|
20
|
+
MtnaWfDateComponent.dateFormItemComponentInstances++;
|
|
21
|
+
if (MtnaWfDateComponent.dateFormItemComponentInstances === 1) {
|
|
22
|
+
try {
|
|
23
|
+
if (!!moment && typeof moment().toMomentFormatString !== 'function') {
|
|
24
|
+
logger.error(`[DateFormItemComponent] constructor
|
|
25
|
+
- Cannot find moment-jdateformatparser, make sure to install the dependency and add the script in angular.json, i.e.
|
|
26
|
+
"scripts": ["node_modules/moment-jdateformatparser/moment-jdateformatparser.min.js"]`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
logger.error(`[DateFormItemComponent] constructor
|
|
31
|
+
- Cannot find moment.js, make sure to install the dependency and add the script in angular.json, i.e.
|
|
32
|
+
"scripts": ["node_modules/moment/min/moment.min.js"]`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get format() {
|
|
37
|
+
return this._format;
|
|
38
|
+
}
|
|
39
|
+
set format(f) {
|
|
40
|
+
if (f) {
|
|
41
|
+
this._format = f;
|
|
42
|
+
// Update configuration anytime the formatter changes
|
|
43
|
+
this.configureDatePickerFormatter();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
ngAfterViewInit() {
|
|
47
|
+
this.configureDatePickerFormatter();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Manually change the parse and display formats of the date picker.
|
|
51
|
+
* @see https://github.com/angular/components/issues/8355#issuecomment-376783293
|
|
52
|
+
*/
|
|
53
|
+
configureDatePickerFormatter() {
|
|
54
|
+
if (this.picker) {
|
|
55
|
+
const datepickerInput = this.picker.datepickerInput;
|
|
56
|
+
// @ts-ignore: access the private date formats on the date picker
|
|
57
|
+
const d = JSON.parse(JSON.stringify(datepickerInput._dateFormats));
|
|
58
|
+
// Convert the Java SimpleDateFormat to the moment equivalents using moment-jdateformatparser
|
|
59
|
+
const momentFormatString = moment().toMomentFormatString(this.format);
|
|
60
|
+
// Use the converted format for the date picker display
|
|
61
|
+
d.display.dateInput = momentFormatString;
|
|
62
|
+
// Use the converted format for the date picker parser (user input)
|
|
63
|
+
d.parse.dateInput = momentFormatString;
|
|
64
|
+
// @ts-ignore: set the updated date formats
|
|
65
|
+
datepickerInput._dateFormats = d;
|
|
66
|
+
// @ts-ignore: manually format the current value in the date picker
|
|
67
|
+
datepickerInput._formatValue(datepickerInput.value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
MtnaWfDateComponent.dateFormItemComponentInstances = 0;
|
|
72
|
+
MtnaWfDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateComponent, deps: [{ token: i1.MtnaLogger }], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
+
MtnaWfDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfDateComponent, selector: "mtna-wf-date-item", inputs: { format: "format", rangeLimits: "rangeLimits" }, host: { properties: { "class.mtna-wf-date-item": "this.dateItemClass" } }, viewQueries: [{ propertyName: "picker", first: true, predicate: MatDatepicker, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
74
|
+
<ng-container *ngTemplateOutlet="header"></ng-container>
|
|
75
|
+
<mat-form-field *ngIf="control" appearance="outline" [mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader">
|
|
76
|
+
<mat-label>{{ item.label || 'Date' }}</mat-label>
|
|
77
|
+
<input
|
|
78
|
+
matInput
|
|
79
|
+
[matDatepicker]="picker"
|
|
80
|
+
[formControl]="$any(control)"
|
|
81
|
+
[max]="rangeLimits?.end"
|
|
82
|
+
[min]="rangeLimits?.start"
|
|
83
|
+
placeholder="Choose a date"
|
|
84
|
+
[required]="item.required"
|
|
85
|
+
/>
|
|
86
|
+
<mat-datepicker-toggle matSuffix [for]="picker" [disabled]="readonly || control.disabled"></mat-datepicker-toggle>
|
|
87
|
+
<mat-datepicker #picker></mat-datepicker>
|
|
88
|
+
<mat-error *ngFor="let error of control.errors | keyvalue">
|
|
89
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
90
|
+
</mat-error>
|
|
91
|
+
<mat-hint>{{ item?.format || format }}</mat-hint>
|
|
92
|
+
</mat-form-field>
|
|
93
|
+
`, isInline: true, styles: [".mtna-wf-control-item .mat-form-field{width:100%}.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["tabIndex", "disabled", "for", "aria-label", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "keyvalue": i4.KeyValuePipe, "mtnaWfGetControlError": i7.MtnaGetFormControlErrorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDateComponent, decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{
|
|
97
|
+
selector: 'mtna-wf-date-item',
|
|
98
|
+
template: `
|
|
99
|
+
<ng-container *ngTemplateOutlet="header"></ng-container>
|
|
100
|
+
<mat-form-field *ngIf="control" appearance="outline" [mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader">
|
|
101
|
+
<mat-label>{{ item.label || 'Date' }}</mat-label>
|
|
102
|
+
<input
|
|
103
|
+
matInput
|
|
104
|
+
[matDatepicker]="picker"
|
|
105
|
+
[formControl]="$any(control)"
|
|
106
|
+
[max]="rangeLimits?.end"
|
|
107
|
+
[min]="rangeLimits?.start"
|
|
108
|
+
placeholder="Choose a date"
|
|
109
|
+
[required]="item.required"
|
|
110
|
+
/>
|
|
111
|
+
<mat-datepicker-toggle matSuffix [for]="picker" [disabled]="readonly || control.disabled"></mat-datepicker-toggle>
|
|
112
|
+
<mat-datepicker #picker></mat-datepicker>
|
|
113
|
+
<mat-error *ngFor="let error of control.errors | keyvalue">
|
|
114
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
115
|
+
</mat-error>
|
|
116
|
+
<mat-hint>{{ item?.format || format }}</mat-hint>
|
|
117
|
+
</mat-form-field>
|
|
118
|
+
`,
|
|
119
|
+
styleUrls: [`form-control.scss`],
|
|
120
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
|
+
encapsulation: ViewEncapsulation.None,
|
|
122
|
+
}]
|
|
123
|
+
}], ctorParameters: function () { return [{ type: i1.MtnaLogger }]; }, propDecorators: { dateItemClass: [{
|
|
124
|
+
type: HostBinding,
|
|
125
|
+
args: ['class.mtna-wf-date-item']
|
|
126
|
+
}], format: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], rangeLimits: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], picker: [{
|
|
131
|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
|
|
2
|
+
import { BaseSingleSelectionParent } from './base-single-selection-parent.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../core/services/ui.service";
|
|
5
|
+
import * as i2 from "@angular/material/form-field";
|
|
6
|
+
import * as i3 from "@angular/material/select";
|
|
7
|
+
import * as i4 from "@angular/material/core";
|
|
8
|
+
import * as i5 from "@angular/material/list";
|
|
9
|
+
import * as i6 from "@angular/material/icon";
|
|
10
|
+
import * as i7 from "@angular/common";
|
|
11
|
+
import * as i8 from "@mtna/core-angular";
|
|
12
|
+
import * as i9 from "@angular/forms";
|
|
13
|
+
import * as i10 from "../core/pipes/get-form-control-error.pipe";
|
|
14
|
+
import * as i11 from "../core/pipes/get-list-icon.pipe";
|
|
15
|
+
import * as i12 from "../core/pipes/get-selected-option.pipe";
|
|
16
|
+
export class MtnaWfDropdownComponent extends BaseSingleSelectionParent {
|
|
17
|
+
constructor(uiService) {
|
|
18
|
+
super(uiService);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
MtnaWfDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDropdownComponent, deps: [{ token: i1.MtnaWfUIService }], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
MtnaWfDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfDropdownComponent, selector: "mtna-wf-dropdown-item", usesInheritance: true, ngImport: i0, template: `
|
|
23
|
+
<ng-container *ngTemplateOutlet="header; context: { $implicit: true }"></ng-container>
|
|
24
|
+
<mat-form-field
|
|
25
|
+
*ngIf="!readonly && !!control; else readOnly"
|
|
26
|
+
appearance="outline"
|
|
27
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
28
|
+
>
|
|
29
|
+
<mat-label>{{ item.label }}</mat-label>
|
|
30
|
+
<mat-select [formControl]="control" (selectionChange)="selectionChange($event)" [required]="item.required">
|
|
31
|
+
<mat-option *ngIf="!item.required">-- None --</mat-option>
|
|
32
|
+
<mat-option *ngFor="let opt of item.options" [value]="opt.option.id" [disabled]="control.value === opt.option.id">{{
|
|
33
|
+
opt.option.name
|
|
34
|
+
}}</mat-option>
|
|
35
|
+
</mat-select>
|
|
36
|
+
<mat-error *ngFor="let error of control.errors | keyvalue">
|
|
37
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
38
|
+
</mat-error>
|
|
39
|
+
</mat-form-field>
|
|
40
|
+
|
|
41
|
+
<ng-template #readOnly>
|
|
42
|
+
<ng-container *ngIf="inList; else fullList">
|
|
43
|
+
<mat-list-item *ngIf="item.required || !!item.value">
|
|
44
|
+
<mat-icon *ngIf="item.label | getListIcon as icon" matListIcon>{{ icon }}</mat-icon>
|
|
45
|
+
<h4 matLine>{{ item.label }}</h4>
|
|
46
|
+
<p matLine>{{ item.value || control?.value | mtnaWfGetSelectedOptionName : item.options }}</p>
|
|
47
|
+
</mat-list-item>
|
|
48
|
+
</ng-container>
|
|
49
|
+
|
|
50
|
+
<ng-template #fullList>
|
|
51
|
+
<mat-list>
|
|
52
|
+
<mat-list-item *ngIf="item.required || !!item.value">
|
|
53
|
+
<mat-icon *ngIf="item.label | getListIcon as icon" matListIcon>{{ icon }}</mat-icon>
|
|
54
|
+
<h4 matLine>{{ item.label }}</h4>
|
|
55
|
+
<p matLine>{{ item.value || control?.value | mtnaWfGetSelectedOptionName : item.options }}</p>
|
|
56
|
+
</mat-list-item>
|
|
57
|
+
</mat-list>
|
|
58
|
+
</ng-template>
|
|
59
|
+
</ng-template>
|
|
60
|
+
`, isInline: true, styles: [".mtna-wf-control-item .mat-form-field{width:100%}.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }], directives: [{ type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i5.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { type: i4.MatLine, selector: "[mat-line], [matLine]" }], pipes: { "keyvalue": i7.KeyValuePipe, "mtnaWfGetControlError": i10.MtnaGetFormControlErrorPipe, "getListIcon": i11.GetListIconPipe, "mtnaWfGetSelectedOptionName": i12.MtnaWfGetSelectedOptionNamePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfDropdownComponent, decorators: [{
|
|
62
|
+
type: Component,
|
|
63
|
+
args: [{
|
|
64
|
+
selector: 'mtna-wf-dropdown-item',
|
|
65
|
+
template: `
|
|
66
|
+
<ng-container *ngTemplateOutlet="header; context: { $implicit: true }"></ng-container>
|
|
67
|
+
<mat-form-field
|
|
68
|
+
*ngIf="!readonly && !!control; else readOnly"
|
|
69
|
+
appearance="outline"
|
|
70
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
71
|
+
>
|
|
72
|
+
<mat-label>{{ item.label }}</mat-label>
|
|
73
|
+
<mat-select [formControl]="control" (selectionChange)="selectionChange($event)" [required]="item.required">
|
|
74
|
+
<mat-option *ngIf="!item.required">-- None --</mat-option>
|
|
75
|
+
<mat-option *ngFor="let opt of item.options" [value]="opt.option.id" [disabled]="control.value === opt.option.id">{{
|
|
76
|
+
opt.option.name
|
|
77
|
+
}}</mat-option>
|
|
78
|
+
</mat-select>
|
|
79
|
+
<mat-error *ngFor="let error of control.errors | keyvalue">
|
|
80
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
81
|
+
</mat-error>
|
|
82
|
+
</mat-form-field>
|
|
83
|
+
|
|
84
|
+
<ng-template #readOnly>
|
|
85
|
+
<ng-container *ngIf="inList; else fullList">
|
|
86
|
+
<mat-list-item *ngIf="item.required || !!item.value">
|
|
87
|
+
<mat-icon *ngIf="item.label | getListIcon as icon" matListIcon>{{ icon }}</mat-icon>
|
|
88
|
+
<h4 matLine>{{ item.label }}</h4>
|
|
89
|
+
<p matLine>{{ item.value || control?.value | mtnaWfGetSelectedOptionName : item.options }}</p>
|
|
90
|
+
</mat-list-item>
|
|
91
|
+
</ng-container>
|
|
92
|
+
|
|
93
|
+
<ng-template #fullList>
|
|
94
|
+
<mat-list>
|
|
95
|
+
<mat-list-item *ngIf="item.required || !!item.value">
|
|
96
|
+
<mat-icon *ngIf="item.label | getListIcon as icon" matListIcon>{{ icon }}</mat-icon>
|
|
97
|
+
<h4 matLine>{{ item.label }}</h4>
|
|
98
|
+
<p matLine>{{ item.value || control?.value | mtnaWfGetSelectedOptionName : item.options }}</p>
|
|
99
|
+
</mat-list-item>
|
|
100
|
+
</mat-list>
|
|
101
|
+
</ng-template>
|
|
102
|
+
</ng-template>
|
|
103
|
+
`,
|
|
104
|
+
styleUrls: [`form-control.scss`],
|
|
105
|
+
encapsulation: ViewEncapsulation.None,
|
|
106
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
107
|
+
}]
|
|
108
|
+
}], ctorParameters: function () { return [{ type: i1.MtnaWfUIService }]; } });
|
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJvcGRvd24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvd2ViLWZvcm0tYW5ndWxhci9zcmMvbGliL2Zvcm0taXRlbS1jb250cm9scy9kcm9wZG93bi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUt0RixPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7QUErQ3JGLE1BQU0sT0FBTyx1QkFBd0IsU0FBUSx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Py52YWx1ZSB8IG10bmFXZkdldFNlbGVjdGVkT3B0aW9uTmFtZSA6IGl0ZW0ub3B0aW9ucyB9fTwvcD5cbiAgICAgICAgICA8L21hdC1saXN0LWl0ZW0+XG4gICAgICAgIDwvbWF0LWxpc3Q+XG4gICAgICA8L25nLXRlbXBsYXRlPlxuICAgIDwvbmctdGVtcGxhdGU+XG4gIGAsXG4gIHN0eWxlVXJsczogW2Bmb3JtLWNvbnRyb2wuc2Nzc2BdLFxuICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbn0pXG5leHBvcnQgY2xhc3MgTXRuYVdmRHJvcGRvd25Db21wb25lbnQgZXh0ZW5kcyBCYXNlU2luZ2xlU2VsZWN0aW9uUGFyZW50PERyb3Bkb3duSXRlbT4ge1xuICBjb25zdHJ1Y3Rvcih1aVNlcnZpY2U6IE10bmFXZlVJU2VydmljZSkge1xuICAgIHN1cGVyKHVpU2VydmljZSk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './base-form-item-control.directive';
|
|
2
|
+
export * from './date.component';
|
|
3
|
+
export * from './date-range.component';
|
|
4
|
+
export * from './dropdown.component';
|
|
5
|
+
export * from './input.component';
|
|
6
|
+
export * from './year-quarter.component';
|
|
7
|
+
export * from './year-quarter-range.component';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93ZWItZm9ybS1hbmd1bGFyL3NyYy9saWIvZm9ybS1pdGVtLWNvbnRyb2xzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0NBQW9DLENBQUM7QUFDbkQsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Jhc2UtZm9ybS1pdGVtLWNvbnRyb2wuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vZGF0ZS5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9kYXRlLXJhbmdlLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2Ryb3Bkb3duLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2lucHV0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL3llYXItcXVhcnRlci5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi95ZWFyLXF1YXJ0ZXItcmFuZ2UuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { BaseFormItemControl } from './base-form-item-control.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/material/form-field";
|
|
5
|
+
import * as i2 from "@angular/material/list";
|
|
6
|
+
import * as i3 from "@angular/common";
|
|
7
|
+
import * as i4 from "@mtna/core-angular";
|
|
8
|
+
import * as i5 from "@angular/material/input";
|
|
9
|
+
import * as i6 from "@angular/forms";
|
|
10
|
+
import * as i7 from "@angular/material/core";
|
|
11
|
+
import * as i8 from "../core/pipes/get-auto-complete.pipe";
|
|
12
|
+
import * as i9 from "../core/pipes/get-form-control-error.pipe";
|
|
13
|
+
export class MtnaWfInputComponent extends BaseFormItemControl {
|
|
14
|
+
constructor(elementRef) {
|
|
15
|
+
super();
|
|
16
|
+
this.elementRef = elementRef;
|
|
17
|
+
this.isParagraph = this._hasHostAttributes('mtnaWfParagraphItem');
|
|
18
|
+
this.isNumberInput = this._hasHostAttributes('mtnaWfDecimalItem', 'mtnaWfWholeNumberItem');
|
|
19
|
+
}
|
|
20
|
+
_hasHostAttributes(...attributes) {
|
|
21
|
+
return attributes.some((attr) => this.elementRef.nativeElement.hasAttribute(attr));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
MtnaWfInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfInputComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
MtnaWfInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfInputComponent, selector: "mtna-wf-input-item[mtnaWfDecimalItem],\n mtna-wf-input-item[mtnaWfParagraphItem],\n mtna-wf-input-item[mtnaWfShortAnswerItem],\n mtna-wf-input-item[mtnaWfWholeNumberItem],", usesInheritance: true, ngImport: i0, template: `
|
|
26
|
+
<ng-container *ngTemplateOutlet="header; context: { $implicit: true }"></ng-container>
|
|
27
|
+
<mat-form-field
|
|
28
|
+
*ngIf="!readonly && !!control; else readOnly"
|
|
29
|
+
appearance="outline"
|
|
30
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
31
|
+
>
|
|
32
|
+
<mat-label>{{ item.label }}</mat-label>
|
|
33
|
+
<textarea
|
|
34
|
+
*ngIf="isParagraph; else shortInput"
|
|
35
|
+
matInput
|
|
36
|
+
[formControl]="control"
|
|
37
|
+
[required]="item.required"
|
|
38
|
+
[attr.autocomplete]="item.label || item.name | getAutoComplete"
|
|
39
|
+
cdkTextareaAutoSize
|
|
40
|
+
cdkAutosizeMinRows="3"
|
|
41
|
+
cdkAutosizeMaxRows="5"
|
|
42
|
+
></textarea>
|
|
43
|
+
|
|
44
|
+
<ng-template #shortInput>
|
|
45
|
+
<input matInput [formControl]="control!" [autocomplete]="item.label || item.name | getAutoComplete" [required]="item.required" />
|
|
46
|
+
</ng-template>
|
|
47
|
+
|
|
48
|
+
<mat-error *ngFor="let error of control.errors | keyvalue | slice : 0 : 1">
|
|
49
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
50
|
+
</mat-error>
|
|
51
|
+
</mat-form-field>
|
|
52
|
+
|
|
53
|
+
<!-- READONLY -->
|
|
54
|
+
<ng-template #readOnly>
|
|
55
|
+
<ng-container *ngTemplateOutlet="inList ? listItem : fullList"></ng-container>
|
|
56
|
+
</ng-template>
|
|
57
|
+
|
|
58
|
+
<ng-template #fullList>
|
|
59
|
+
<mat-list>
|
|
60
|
+
<ng-container *ngTemplateOutlet="listItem"></ng-container>
|
|
61
|
+
</mat-list>
|
|
62
|
+
</ng-template>
|
|
63
|
+
|
|
64
|
+
<ng-template #listItem>
|
|
65
|
+
<mat-list-item class="wrappable-list-item">
|
|
66
|
+
<!-- <mat-icon *ngIf="item.label || item.header as label" matListIcon>{{ label | getListIcon }}</mat-icon> -->
|
|
67
|
+
<h4 *ngIf="!item.questionText && (item.label || item.name) as label" mat-line>{{ label }}</h4>
|
|
68
|
+
<p mat-line class="wrap-line">{{ item.value || 'No Information Provided' }}</p>
|
|
69
|
+
</mat-list-item>
|
|
70
|
+
</ng-template>
|
|
71
|
+
`, isInline: true, styles: [".mtna-wf-control-item .mat-form-field{width:100%}.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}\n", "\n mtna-wf-input-item .mat-list-base .mat-list-item,\n mtna-wf-input-item .mat-list-base .mat-list-item.mat-list-item-with-avatar {\n height: auto;\n padding: 12px 0;\n }\n mtna-wf-input-item .mat-list-base .mat-list-item.mat-2-line,\n mtna-wf-input-item .mat-list-base .mat-list-item.mat-2-line.mat-list-item-with-avatar {\n padding: 18.5px 0;\n }\n mtna-wf-input-item .mat-list-base .mat-list-item .mat-line {\n white-space: normal;\n overflow: unset;\n text-overflow: unset;\n }\n "], components: [{ type: i1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }], directives: [{ type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i1.MatLabel, selector: "mat-label" }, { type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i7.MatLine, selector: "[mat-line], [matLine]" }], pipes: { "getAutoComplete": i8.GetAutoCompletePipe, "slice": i3.SlicePipe, "keyvalue": i3.KeyValuePipe, "mtnaWfGetControlError": i9.MtnaGetFormControlErrorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfInputComponent, decorators: [{
|
|
73
|
+
type: Component,
|
|
74
|
+
args: [{
|
|
75
|
+
selector: `mtna-wf-input-item[mtnaWfDecimalItem],
|
|
76
|
+
mtna-wf-input-item[mtnaWfParagraphItem],
|
|
77
|
+
mtna-wf-input-item[mtnaWfShortAnswerItem],
|
|
78
|
+
mtna-wf-input-item[mtnaWfWholeNumberItem],`,
|
|
79
|
+
template: `
|
|
80
|
+
<ng-container *ngTemplateOutlet="header; context: { $implicit: true }"></ng-container>
|
|
81
|
+
<mat-form-field
|
|
82
|
+
*ngIf="!readonly && !!control; else readOnly"
|
|
83
|
+
appearance="outline"
|
|
84
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
85
|
+
>
|
|
86
|
+
<mat-label>{{ item.label }}</mat-label>
|
|
87
|
+
<textarea
|
|
88
|
+
*ngIf="isParagraph; else shortInput"
|
|
89
|
+
matInput
|
|
90
|
+
[formControl]="control"
|
|
91
|
+
[required]="item.required"
|
|
92
|
+
[attr.autocomplete]="item.label || item.name | getAutoComplete"
|
|
93
|
+
cdkTextareaAutoSize
|
|
94
|
+
cdkAutosizeMinRows="3"
|
|
95
|
+
cdkAutosizeMaxRows="5"
|
|
96
|
+
></textarea>
|
|
97
|
+
|
|
98
|
+
<ng-template #shortInput>
|
|
99
|
+
<input matInput [formControl]="control!" [autocomplete]="item.label || item.name | getAutoComplete" [required]="item.required" />
|
|
100
|
+
</ng-template>
|
|
101
|
+
|
|
102
|
+
<mat-error *ngFor="let error of control.errors | keyvalue | slice : 0 : 1">
|
|
103
|
+
{{ error | mtnaWfGetControlError : item }}
|
|
104
|
+
</mat-error>
|
|
105
|
+
</mat-form-field>
|
|
106
|
+
|
|
107
|
+
<!-- READONLY -->
|
|
108
|
+
<ng-template #readOnly>
|
|
109
|
+
<ng-container *ngTemplateOutlet="inList ? listItem : fullList"></ng-container>
|
|
110
|
+
</ng-template>
|
|
111
|
+
|
|
112
|
+
<ng-template #fullList>
|
|
113
|
+
<mat-list>
|
|
114
|
+
<ng-container *ngTemplateOutlet="listItem"></ng-container>
|
|
115
|
+
</mat-list>
|
|
116
|
+
</ng-template>
|
|
117
|
+
|
|
118
|
+
<ng-template #listItem>
|
|
119
|
+
<mat-list-item class="wrappable-list-item">
|
|
120
|
+
<!-- <mat-icon *ngIf="item.label || item.header as label" matListIcon>{{ label | getListIcon }}</mat-icon> -->
|
|
121
|
+
<h4 *ngIf="!item.questionText && (item.label || item.name) as label" mat-line>{{ label }}</h4>
|
|
122
|
+
<p mat-line class="wrap-line">{{ item.value || 'No Information Provided' }}</p>
|
|
123
|
+
</mat-list-item>
|
|
124
|
+
</ng-template>
|
|
125
|
+
`,
|
|
126
|
+
styleUrls: [`form-control.scss`],
|
|
127
|
+
styles: [
|
|
128
|
+
`
|
|
129
|
+
mtna-wf-input-item .mat-list-base .mat-list-item,
|
|
130
|
+
mtna-wf-input-item .mat-list-base .mat-list-item.mat-list-item-with-avatar {
|
|
131
|
+
height: auto;
|
|
132
|
+
padding: 12px 0;
|
|
133
|
+
}
|
|
134
|
+
mtna-wf-input-item .mat-list-base .mat-list-item.mat-2-line,
|
|
135
|
+
mtna-wf-input-item .mat-list-base .mat-list-item.mat-2-line.mat-list-item-with-avatar {
|
|
136
|
+
padding: 18.5px 0;
|
|
137
|
+
}
|
|
138
|
+
mtna-wf-input-item .mat-list-base .mat-list-item .mat-line {
|
|
139
|
+
white-space: normal;
|
|
140
|
+
overflow: unset;
|
|
141
|
+
text-overflow: unset;
|
|
142
|
+
}
|
|
143
|
+
`,
|
|
144
|
+
],
|
|
145
|
+
encapsulation: ViewEncapsulation.None,
|
|
146
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
147
|
+
}]
|
|
148
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
149
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvd2ViLWZvcm0tYW5ndWxhci9zcmMvbGliL2Zvcm0taXRlbS1jb250cm9scy9pbnB1dC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBYyxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUtsRyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQzs7Ozs7Ozs7Ozs7QUE0RXpFLE1BQU0sT0FBTyxvQkFFWCxTQUFRLG1CQUFtQztJQUkzQyxZQUFzQixVQUFzQjtRQUMxQyxLQUFLLEVBQUUsQ0FBQztRQURZLGVBQVUsR0FBVixVQUFVLENBQVk7UUFIbkMsZ0JBQVcsR0FBRyxJQUFJLENBQUMsa0JBQWtCLENBQUMscUJBQXFCLENBQUMsQ0FBQztRQUM3RCxrQkFBYSxHQUFHLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxtQkFBbUIsRUFBRSx1QkFBdU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ZXJJbnB1dCA9IHRoaXMuX2hhc0hvc3RBdHRyaWJ1dGVzKCdtdG5hV2ZEZWNpbWFsSXRlbScsICdtdG5hV2ZXaG9sZU51bWJlckl0ZW0nKTtcblxuICBjb25zdHJ1Y3Rvcihwcm90ZWN0ZWQgZWxlbWVudFJlZjogRWxlbWVudFJlZikge1xuICAgIHN1cGVyKCk7XG4gIH1cblxuICBwcml2YXRlIF9oYXNIb3N0QXR0cmlidXRlcyguLi5hdHRyaWJ1dGVzOiBzdHJpbmdbXSkge1xuICAgIHJldHVybiBhdHRyaWJ1dGVzLnNvbWUoKGF0dHIpID0+ICh0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuaGFzQXR0cmlidXRlKGF0dHIpKTtcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { BaseFormItemControl } from './base-form-item-control.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./year-quarter.component";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@angular/flex-layout/flex";
|
|
7
|
+
import * as i4 from "@mtna/core-angular";
|
|
8
|
+
export class MtnaWfYearQuarterRangeComponent extends BaseFormItemControl {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.yearQuarterRangeClass = true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
MtnaWfYearQuarterRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterRangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
MtnaWfYearQuarterRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MtnaWfYearQuarterRangeComponent, selector: "mtna-wf-year-quarter-range-item", host: { properties: { "class.mtna-wf-year-quarter-range-item": "this.yearQuarterRangeClass" } }, usesInheritance: true, ngImport: i0, template: `
|
|
16
|
+
<ng-container *ngTemplateOutlet="header"></ng-container>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
*ngIf="control"
|
|
20
|
+
class="range-item-container"
|
|
21
|
+
fxLayout="row"
|
|
22
|
+
fxLayoutAlign="start center"
|
|
23
|
+
fxLayoutGap="8px"
|
|
24
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
25
|
+
>
|
|
26
|
+
<mtna-wf-year-quarter-item
|
|
27
|
+
[control]="control.controls['start']"
|
|
28
|
+
[readonly]="readonly"
|
|
29
|
+
[rangeLimits]="item.rangeLimits"
|
|
30
|
+
></mtna-wf-year-quarter-item>
|
|
31
|
+
<span fxFlex="14px">to</span>
|
|
32
|
+
<mtna-wf-year-quarter-item
|
|
33
|
+
[control]="control.controls['end']"
|
|
34
|
+
[readonly]="readonly"
|
|
35
|
+
[rangeLimits]="item.rangeLimits"
|
|
36
|
+
></mtna-wf-year-quarter-item>
|
|
37
|
+
</div>
|
|
38
|
+
`, isInline: true, styles: [".mtna-wf-control-item .mat-form-field{width:100%}.mtna-wf-control-item .mtna-wf-error-container{font-size:75%;line-height:1;min-height:1em;margin-top:-.75rem}.mtna-wf-control-item .control-item-content{padding:.35em .75em .625em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list){padding-left:.75em}.mtna-wf-control-item .mtna-wf-item-header~:not(.mtna-wf-error-container):not(.mat-list).mat-form-field{width:calc(100% - .75em)}\n"], components: [{ type: i1.MtnaWfYearQuarterComponent, selector: "mtna-wf-year-quarter-item", inputs: ["rangeLimits"] }], directives: [{ type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4.MtnaHighlightDirective, selector: "[mtnaHighlight]", inputs: ["mtnaHighlight", "mtnaHighlightColor"], exportAs: ["mtnaHighlight"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MtnaWfYearQuarterRangeComponent, decorators: [{
|
|
40
|
+
type: Component,
|
|
41
|
+
args: [{
|
|
42
|
+
selector: 'mtna-wf-year-quarter-range-item',
|
|
43
|
+
template: `
|
|
44
|
+
<ng-container *ngTemplateOutlet="header"></ng-container>
|
|
45
|
+
|
|
46
|
+
<div
|
|
47
|
+
*ngIf="control"
|
|
48
|
+
class="range-item-container"
|
|
49
|
+
fxLayout="row"
|
|
50
|
+
fxLayoutAlign="start center"
|
|
51
|
+
fxLayoutGap="8px"
|
|
52
|
+
[mtnaHighlight]="indicatorStatus === 'ACTIVE' && !hasItemHeader"
|
|
53
|
+
>
|
|
54
|
+
<mtna-wf-year-quarter-item
|
|
55
|
+
[control]="control.controls['start']"
|
|
56
|
+
[readonly]="readonly"
|
|
57
|
+
[rangeLimits]="item.rangeLimits"
|
|
58
|
+
></mtna-wf-year-quarter-item>
|
|
59
|
+
<span fxFlex="14px">to</span>
|
|
60
|
+
<mtna-wf-year-quarter-item
|
|
61
|
+
[control]="control.controls['end']"
|
|
62
|
+
[readonly]="readonly"
|
|
63
|
+
[rangeLimits]="item.rangeLimits"
|
|
64
|
+
></mtna-wf-year-quarter-item>
|
|
65
|
+
</div>
|
|
66
|
+
`,
|
|
67
|
+
styleUrls: [`form-control.scss`],
|
|
68
|
+
encapsulation: ViewEncapsulation.None,
|
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
+
}]
|
|
71
|
+
}], propDecorators: { yearQuarterRangeClass: [{
|
|
72
|
+
type: HostBinding,
|
|
73
|
+
args: ['class.mtna-wf-year-quarter-range-item']
|
|
74
|
+
}] } });
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWVhci1xdWFydGVyLXJhbmdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3dlYi1mb3JtLWFuZ3VsYXIvc3JjL2xpYi9mb3JtLWl0ZW0tY29udHJvbHMveWVhci1xdWFydGVyLXJhbmdlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUtuRyxPQUFPLEVBQUUsbUJBQW1CLEVBQU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