@rlucan/ui 14.2.6 → 16.2.2
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/README.md +24 -24
- package/esm2022/lib/action-button/action-button.component.mjs +99 -99
- package/esm2022/lib/action-icon/action-icon.component.mjs +36 -36
- package/esm2022/lib/autocomplete/autocomplete.component.mjs +390 -390
- package/esm2022/lib/avatar/avatar.component.mjs +34 -34
- package/esm2022/lib/button/button.component.mjs +56 -56
- package/esm2022/lib/checkbox/checkbox.component.mjs +38 -38
- package/esm2022/lib/checkbox-group/checkbox-group.component.mjs +90 -90
- package/esm2022/lib/currency/currency.component.mjs +150 -150
- package/esm2022/lib/date/date.component.mjs +67 -67
- package/esm2022/lib/dialog/dialog.component.mjs +36 -36
- package/esm2022/lib/directives/force-visibility/force-visibility.directive.mjs +104 -104
- package/esm2022/lib/editor/editor.component.mjs +118 -118
- package/esm2022/lib/elements/burger/burger.component.mjs +20 -20
- package/esm2022/lib/elements/expander/expander.component.mjs +27 -27
- package/esm2022/lib/elements/validation-message/validation-message.component.mjs +46 -46
- package/esm2022/lib/file/file.component.mjs +144 -144
- package/esm2022/lib/file-uploader/ui-file-uploader.component.mjs +404 -404
- package/esm2022/lib/input/input.component.mjs +264 -264
- package/esm2022/lib/input-autocomplete/input-autocomplete.component.mjs +276 -276
- package/esm2022/lib/layouts/base/ui-base-layout.component.mjs +21 -21
- package/esm2022/lib/layouts/base/ui-base.component.mjs +73 -73
- package/esm2022/lib/layouts/simple/ui-simple-layout.component.mjs +17 -17
- package/esm2022/lib/layouts/simple/ui-simple.component.mjs +165 -165
- package/esm2022/lib/radio/radio.component.mjs +20 -20
- package/esm2022/lib/radio-group/radio-group.component.mjs +53 -53
- package/esm2022/lib/select/select.component.mjs +126 -115
- package/esm2022/lib/services/message-box.service.mjs +110 -110
- package/esm2022/lib/services/toast.service.mjs +23 -23
- package/esm2022/lib/services/ui-file.service.mjs +70 -70
- package/esm2022/lib/services/ui-translate.service.mjs +31 -31
- package/esm2022/lib/submit-button/submit-button.component.mjs +71 -71
- package/esm2022/lib/table/table.component.mjs +97 -97
- package/esm2022/lib/text-area/text-area.component.mjs +45 -45
- package/esm2022/lib/ui.model.mjs +1 -1
- package/esm2022/lib/ui.module.mjs +268 -268
- package/esm2022/public-api.mjs +34 -34
- package/esm2022/rlucan-ui.mjs +4 -4
- package/fesm2022/rlucan-ui.mjs +3285 -3274
- package/fesm2022/rlucan-ui.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/action-button/action-button.component.d.ts +28 -32
- package/lib/action-icon/action-icon.component.d.ts +15 -15
- package/lib/autocomplete/autocomplete.component.d.ts +57 -57
- package/lib/avatar/avatar.component.d.ts +14 -14
- package/lib/button/button.component.d.ts +18 -18
- package/lib/checkbox/checkbox.component.d.ts +15 -15
- package/lib/checkbox-group/checkbox-group.component.d.ts +18 -18
- package/lib/currency/currency.component.d.ts +31 -31
- package/lib/date/date.component.d.ts +24 -24
- package/lib/dialog/dialog.component.d.ts +13 -13
- package/lib/directives/force-visibility/force-visibility.directive.d.ts +22 -22
- package/lib/editor/editor.component.d.ts +24 -24
- package/lib/elements/burger/burger.component.d.ts +9 -9
- package/lib/elements/expander/expander.component.d.ts +10 -10
- package/lib/elements/validation-message/validation-message.component.d.ts +12 -12
- package/lib/file/file.component.d.ts +35 -35
- package/lib/file-uploader/ui-file-uploader.component.d.ts +102 -102
- package/lib/input/input.component.d.ts +42 -42
- package/lib/input-autocomplete/input-autocomplete.component.d.ts +44 -44
- package/lib/layouts/base/ui-base-layout.component.d.ts +8 -8
- package/lib/layouts/base/ui-base.component.d.ts +23 -23
- package/lib/layouts/simple/ui-simple-layout.component.d.ts +8 -8
- package/lib/layouts/simple/ui-simple.component.d.ts +40 -40
- package/lib/radio/radio.component.d.ts +8 -8
- package/lib/radio-group/radio-group.component.d.ts +18 -18
- package/lib/select/select.component.d.ts +37 -35
- package/lib/services/message-box.service.d.ts +58 -58
- package/lib/services/toast.service.d.ts +13 -13
- package/lib/services/ui-file.service.d.ts +33 -33
- package/lib/services/ui-translate.service.d.ts +11 -11
- package/lib/submit-button/submit-button.component.d.ts +21 -21
- package/lib/table/table.component.d.ts +36 -36
- package/lib/text-area/text-area.component.d.ts +18 -18
- package/lib/ui.model.d.ts +2 -2
- package/lib/ui.module.d.ts +59 -59
- package/package.json +1 -1
- package/public-api.d.ts +29 -29
- package/src/js/editorjs.mjs +9634 -9634
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
import { Component, Host, HostBinding, Input, Optional, SkipSelf } from '@angular/core';
|
|
2
|
-
import { UiBaseComponent } from '../layouts/base/ui-base.component';
|
|
3
|
-
import { UntypedFormControl, UntypedFormGroup, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/forms";
|
|
6
|
-
import * as i2 from "@angular/common";
|
|
7
|
-
import * as i3 from "../input/input.component";
|
|
8
|
-
import * as i4 from "../select/select.component";
|
|
9
|
-
import * as i5 from "../layouts/base/ui-base-layout.component";
|
|
10
|
-
export class CurrencyComponent extends UiBaseComponent {
|
|
11
|
-
// @HostBinding('class')
|
|
12
|
-
// get sizeClass(): string {
|
|
13
|
-
// return this.size;
|
|
14
|
-
// }
|
|
15
|
-
constructor(controlContainer) {
|
|
16
|
-
super();
|
|
17
|
-
this.controlContainer = controlContainer;
|
|
18
|
-
this.currencies = [];
|
|
19
|
-
this.currencyDisabled = false;
|
|
20
|
-
this.panelClass = 'ui-currency';
|
|
21
|
-
this.amountHidden = false;
|
|
22
|
-
this.formGroup = new UntypedFormGroup({
|
|
23
|
-
amount: new UntypedFormControl(),
|
|
24
|
-
currency: new UntypedFormControl()
|
|
25
|
-
});
|
|
26
|
-
this.hasFocus = false;
|
|
27
|
-
this.onChange = (value) => { };
|
|
28
|
-
}
|
|
29
|
-
ngOnInit() {
|
|
30
|
-
super.ngOnInit();
|
|
31
|
-
this.formGroup.valueChanges.subscribe(v => this.onChange(v));
|
|
32
|
-
// this.formGroup = new FormGroup({
|
|
33
|
-
// amount: new FormControl(this.control?.value.amount),
|
|
34
|
-
// currency: new FormControl(this.currencies.find(c => c.code === this.control?.value.currency.code))
|
|
35
|
-
// });
|
|
36
|
-
// this.formGroup.valueChanges.subscribe(v => {
|
|
37
|
-
// this.onChange(this.formGroup?.getRawValue());
|
|
38
|
-
// });
|
|
39
|
-
if (this.currencyDisabled) {
|
|
40
|
-
this.formGroup.get('currency')?.disable();
|
|
41
|
-
}
|
|
42
|
-
// this.ngControl.control.statusChanges.subscribe(s => {
|
|
43
|
-
// if (s === 'INVALID') {
|
|
44
|
-
// // this.formGroup?.get('amount')?.setErrors(this.control?.errors || null);
|
|
45
|
-
// this.formGroup?.get('currency')?.markAsTouched();
|
|
46
|
-
// // this.formGroup?.get('currency')?.setErrors(this.control?.errors || null);
|
|
47
|
-
// }
|
|
48
|
-
// if (s === 'DISABLED') {
|
|
49
|
-
// this.formGroup?.disable({emitEvent: false});
|
|
50
|
-
// }
|
|
51
|
-
// if (s === 'VALID') {
|
|
52
|
-
// this.formGroup?.enable({emitEvent: false});
|
|
53
|
-
// if (this.currencyDisabled) {
|
|
54
|
-
// this.formGroup?.get('currency')?.disable({emitEvent: false});
|
|
55
|
-
// }
|
|
56
|
-
// }
|
|
57
|
-
// });
|
|
58
|
-
this.parentFormControl = this.controlContainer.control.get(this.formControlName);
|
|
59
|
-
}
|
|
60
|
-
// bindValidators(validators) {
|
|
61
|
-
// console.log('binding validators', validators);
|
|
62
|
-
// if (this.formGroup) {
|
|
63
|
-
// this.formGroup.get('amount').setValidators(validators);
|
|
64
|
-
// this.formGroup.get('currency').markAsTouched();
|
|
65
|
-
// this.formGroup.get('currency').setErrors(validators);
|
|
66
|
-
// }
|
|
67
|
-
// }
|
|
68
|
-
get isInvalid() {
|
|
69
|
-
return this.parentFormControl.invalid;
|
|
70
|
-
}
|
|
71
|
-
get validationErrors() {
|
|
72
|
-
return this.parentFormControl.errors;
|
|
73
|
-
}
|
|
74
|
-
focusChanged(hasFocus) {
|
|
75
|
-
this.hasFocus = hasFocus;
|
|
76
|
-
}
|
|
77
|
-
registerOnChange(fn) {
|
|
78
|
-
this.onChange = fn;
|
|
79
|
-
}
|
|
80
|
-
registerOnTouched(fn) {
|
|
81
|
-
}
|
|
82
|
-
registerOnValidatorChange(fn) {
|
|
83
|
-
}
|
|
84
|
-
setDisabledState(isDisabled) {
|
|
85
|
-
if (isDisabled) {
|
|
86
|
-
this.formGroup.get('amount').disable();
|
|
87
|
-
if (!this.currencyDisabled) {
|
|
88
|
-
this.formGroup.get('currency').disable();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.formGroup.get('amount').enable();
|
|
93
|
-
if (!this.currencyDisabled) {
|
|
94
|
-
this.formGroup.get('currency').enable();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
validate(control) {
|
|
99
|
-
return undefined;
|
|
100
|
-
}
|
|
101
|
-
writeValue(obj) {
|
|
102
|
-
this.formGroup.setValue(obj);
|
|
103
|
-
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CurrencyComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: CurrencyComponent, selector: "ui-currency", inputs: { currencies: "currencies", currencyDisabled: "currencyDisabled", formControlName: "formControlName", panelClass: "panelClass", amountHidden: "amountHidden" }, host: { properties: { "class.amount-hidden": "this.amountHidden", "class.focus": "this.hasFocus" } }, providers: [{
|
|
106
|
-
provide: NG_VALUE_ACCESSOR,
|
|
107
|
-
multi: true,
|
|
108
|
-
useExisting: CurrencyComponent
|
|
109
|
-
}, {
|
|
110
|
-
provide: NG_VALIDATORS,
|
|
111
|
-
multi: true,
|
|
112
|
-
useExisting: CurrencyComponent
|
|
113
|
-
}
|
|
114
|
-
], usesInheritance: true, ngImport: i0, template: "<ui-base-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [formGroup]=\"formGroup\">\r\n <ui-input *ngIf=\"!amountHidden\" [textAlign]=\"'right'\" [formControlName]=\"'amount'\" [placeholder]=\"placeholder\" #input [useInputMessages]=\"'never'\" (focusChanged)=\"focusChanged($event)\"></ui-input>\r\n <ui-select [panelClass]=\"panelClass\" [formControlName]=\"'currency'\" [displayAttribute]=\"'symbol'\" [options]=\"currencies\" [useInputMessages]=\"'never'\"></ui-select>\r\n</div>\r\n\r\n</ui-base-layout>\r\n\r\n", styles: [":host{display:block}:host.amount-hidden ui-select{padding-left:.7em}:host .control-container{display:flex;border-style:solid}:host .control-container ui-input{flex:1 1 100%}:host .control-container ui-select{flex-grow:0;flex-shrink:1}:host ::ng-deep .mat-mdc-select-trigger{padding-left:.2em}:host ::ng-deep input{text-align:right;padding-right:.2em}:host ::ng-deep input,:host ::ng-deep .mat-mdc-select-trigger{border-width:0}:host.large ui-select{flex-basis:4.5em}:host.larger ui-select{flex-basis:5em}:host.normal ui-select{flex-basis:5.5em}:host.smaller ui-select{flex-basis:6em}:host.small ui-select{flex-basis:6em}:host.amount-hidden.large ui-select{flex-basis:5.2em}:host.amount-hidden.larger ui-select{flex-basis:4.7em}:host.amount-hidden.normal ui-select{flex-basis:4.2em}:host.amount-hidden.smaller ui-select{flex-basis:3.8em}:host.amount-hidden.smaller ui-select ::ng-deep .mat-mdc-select-trigger{width:3.2em}:host.amount-hidden.small ui-select{flex-basis:3.5em}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.InputComponent, selector: "ui-input", inputs: ["prefixIcon", "suffixIcon", "type", "clearButton", "activeIcons", "forceHasPrefix", "forceHasSuffix", "textAlign"], outputs: ["focusChanged", "keyPressed"] }, { kind: "component", type: i4.SelectComponent, selector: "ui-select", inputs: ["multiple", "triggerFormatter", "valueAttribute", "resetText", "displayAttribute", "options", "optionFormatter", "optionTemplateRef", "triggerTemplateRef", "panelClass", "allowEmptySelection", "trackBy"] }, { kind: "component", type: i5.UiBaseLayoutComponent, selector: "ui-base-layout", inputs: ["ctx"] }] }); }
|
|
115
|
-
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CurrencyComponent, decorators: [{
|
|
117
|
-
type: Component,
|
|
118
|
-
args: [{ selector: 'ui-currency', providers: [{
|
|
119
|
-
provide: NG_VALUE_ACCESSOR,
|
|
120
|
-
multi: true,
|
|
121
|
-
useExisting: CurrencyComponent
|
|
122
|
-
}, {
|
|
123
|
-
provide: NG_VALIDATORS,
|
|
124
|
-
multi: true,
|
|
125
|
-
useExisting: CurrencyComponent
|
|
126
|
-
}
|
|
127
|
-
], template: "<ui-base-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [formGroup]=\"formGroup\">\r\n <ui-input *ngIf=\"!amountHidden\" [textAlign]=\"'right'\" [formControlName]=\"'amount'\" [placeholder]=\"placeholder\" #input [useInputMessages]=\"'never'\" (focusChanged)=\"focusChanged($event)\"></ui-input>\r\n <ui-select [panelClass]=\"panelClass\" [formControlName]=\"'currency'\" [displayAttribute]=\"'symbol'\" [options]=\"currencies\" [useInputMessages]=\"'never'\"></ui-select>\r\n</div>\r\n\r\n</ui-base-layout>\r\n\r\n", styles: [":host{display:block}:host.amount-hidden ui-select{padding-left:.7em}:host .control-container{display:flex;border-style:solid}:host .control-container ui-input{flex:1 1 100%}:host .control-container ui-select{flex-grow:0;flex-shrink:1}:host ::ng-deep .mat-mdc-select-trigger{padding-left:.2em}:host ::ng-deep input{text-align:right;padding-right:.2em}:host ::ng-deep input,:host ::ng-deep .mat-mdc-select-trigger{border-width:0}:host.large ui-select{flex-basis:4.5em}:host.larger ui-select{flex-basis:5em}:host.normal ui-select{flex-basis:5.5em}:host.smaller ui-select{flex-basis:6em}:host.small ui-select{flex-basis:6em}:host.amount-hidden.large ui-select{flex-basis:5.2em}:host.amount-hidden.larger ui-select{flex-basis:4.7em}:host.amount-hidden.normal ui-select{flex-basis:4.2em}:host.amount-hidden.smaller ui-select{flex-basis:3.8em}:host.amount-hidden.smaller ui-select ::ng-deep .mat-mdc-select-trigger{width:3.2em}:host.amount-hidden.small ui-select{flex-basis:3.5em}\n"] }]
|
|
128
|
-
}], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
|
|
129
|
-
type: Optional
|
|
130
|
-
}, {
|
|
131
|
-
type: Host
|
|
132
|
-
}, {
|
|
133
|
-
type: SkipSelf
|
|
134
|
-
}] }]; }, propDecorators: { currencies: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], currencyDisabled: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], formControlName: [{
|
|
139
|
-
type: Input
|
|
140
|
-
}], panelClass: [{
|
|
141
|
-
type: Input
|
|
142
|
-
}], amountHidden: [{
|
|
143
|
-
type: HostBinding,
|
|
144
|
-
args: ['class.amount-hidden']
|
|
145
|
-
}, {
|
|
146
|
-
type: Input
|
|
147
|
-
}], hasFocus: [{
|
|
148
|
-
type: HostBinding,
|
|
149
|
-
args: ['class.focus']
|
|
150
|
-
}] } });
|
|
1
|
+
import { Component, Host, HostBinding, Input, Optional, SkipSelf } from '@angular/core';
|
|
2
|
+
import { UiBaseComponent } from '../layouts/base/ui-base.component';
|
|
3
|
+
import { UntypedFormControl, UntypedFormGroup, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
7
|
+
import * as i3 from "../input/input.component";
|
|
8
|
+
import * as i4 from "../select/select.component";
|
|
9
|
+
import * as i5 from "../layouts/base/ui-base-layout.component";
|
|
10
|
+
export class CurrencyComponent extends UiBaseComponent {
|
|
11
|
+
// @HostBinding('class')
|
|
12
|
+
// get sizeClass(): string {
|
|
13
|
+
// return this.size;
|
|
14
|
+
// }
|
|
15
|
+
constructor(controlContainer) {
|
|
16
|
+
super();
|
|
17
|
+
this.controlContainer = controlContainer;
|
|
18
|
+
this.currencies = [];
|
|
19
|
+
this.currencyDisabled = false;
|
|
20
|
+
this.panelClass = 'ui-currency';
|
|
21
|
+
this.amountHidden = false;
|
|
22
|
+
this.formGroup = new UntypedFormGroup({
|
|
23
|
+
amount: new UntypedFormControl(),
|
|
24
|
+
currency: new UntypedFormControl()
|
|
25
|
+
});
|
|
26
|
+
this.hasFocus = false;
|
|
27
|
+
this.onChange = (value) => { };
|
|
28
|
+
}
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
super.ngOnInit();
|
|
31
|
+
this.formGroup.valueChanges.subscribe(v => this.onChange(v));
|
|
32
|
+
// this.formGroup = new FormGroup({
|
|
33
|
+
// amount: new FormControl(this.control?.value.amount),
|
|
34
|
+
// currency: new FormControl(this.currencies.find(c => c.code === this.control?.value.currency.code))
|
|
35
|
+
// });
|
|
36
|
+
// this.formGroup.valueChanges.subscribe(v => {
|
|
37
|
+
// this.onChange(this.formGroup?.getRawValue());
|
|
38
|
+
// });
|
|
39
|
+
if (this.currencyDisabled) {
|
|
40
|
+
this.formGroup.get('currency')?.disable();
|
|
41
|
+
}
|
|
42
|
+
// this.ngControl.control.statusChanges.subscribe(s => {
|
|
43
|
+
// if (s === 'INVALID') {
|
|
44
|
+
// // this.formGroup?.get('amount')?.setErrors(this.control?.errors || null);
|
|
45
|
+
// this.formGroup?.get('currency')?.markAsTouched();
|
|
46
|
+
// // this.formGroup?.get('currency')?.setErrors(this.control?.errors || null);
|
|
47
|
+
// }
|
|
48
|
+
// if (s === 'DISABLED') {
|
|
49
|
+
// this.formGroup?.disable({emitEvent: false});
|
|
50
|
+
// }
|
|
51
|
+
// if (s === 'VALID') {
|
|
52
|
+
// this.formGroup?.enable({emitEvent: false});
|
|
53
|
+
// if (this.currencyDisabled) {
|
|
54
|
+
// this.formGroup?.get('currency')?.disable({emitEvent: false});
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
// });
|
|
58
|
+
this.parentFormControl = this.controlContainer.control.get(this.formControlName);
|
|
59
|
+
}
|
|
60
|
+
// bindValidators(validators) {
|
|
61
|
+
// console.log('binding validators', validators);
|
|
62
|
+
// if (this.formGroup) {
|
|
63
|
+
// this.formGroup.get('amount').setValidators(validators);
|
|
64
|
+
// this.formGroup.get('currency').markAsTouched();
|
|
65
|
+
// this.formGroup.get('currency').setErrors(validators);
|
|
66
|
+
// }
|
|
67
|
+
// }
|
|
68
|
+
get isInvalid() {
|
|
69
|
+
return this.parentFormControl.invalid;
|
|
70
|
+
}
|
|
71
|
+
get validationErrors() {
|
|
72
|
+
return this.parentFormControl.errors;
|
|
73
|
+
}
|
|
74
|
+
focusChanged(hasFocus) {
|
|
75
|
+
this.hasFocus = hasFocus;
|
|
76
|
+
}
|
|
77
|
+
registerOnChange(fn) {
|
|
78
|
+
this.onChange = fn;
|
|
79
|
+
}
|
|
80
|
+
registerOnTouched(fn) {
|
|
81
|
+
}
|
|
82
|
+
registerOnValidatorChange(fn) {
|
|
83
|
+
}
|
|
84
|
+
setDisabledState(isDisabled) {
|
|
85
|
+
if (isDisabled) {
|
|
86
|
+
this.formGroup.get('amount').disable();
|
|
87
|
+
if (!this.currencyDisabled) {
|
|
88
|
+
this.formGroup.get('currency').disable();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.formGroup.get('amount').enable();
|
|
93
|
+
if (!this.currencyDisabled) {
|
|
94
|
+
this.formGroup.get('currency').enable();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
validate(control) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
writeValue(obj) {
|
|
102
|
+
this.formGroup.setValue(obj);
|
|
103
|
+
}
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CurrencyComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: CurrencyComponent, selector: "ui-currency", inputs: { currencies: "currencies", currencyDisabled: "currencyDisabled", formControlName: "formControlName", panelClass: "panelClass", amountHidden: "amountHidden" }, host: { properties: { "class.amount-hidden": "this.amountHidden", "class.focus": "this.hasFocus" } }, providers: [{
|
|
106
|
+
provide: NG_VALUE_ACCESSOR,
|
|
107
|
+
multi: true,
|
|
108
|
+
useExisting: CurrencyComponent
|
|
109
|
+
}, {
|
|
110
|
+
provide: NG_VALIDATORS,
|
|
111
|
+
multi: true,
|
|
112
|
+
useExisting: CurrencyComponent
|
|
113
|
+
}
|
|
114
|
+
], usesInheritance: true, ngImport: i0, template: "<ui-base-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [formGroup]=\"formGroup\">\r\n <ui-input *ngIf=\"!amountHidden\" [textAlign]=\"'right'\" [formControlName]=\"'amount'\" [placeholder]=\"placeholder\" #input [useInputMessages]=\"'never'\" (focusChanged)=\"focusChanged($event)\"></ui-input>\r\n <ui-select [panelClass]=\"panelClass\" [formControlName]=\"'currency'\" [displayAttribute]=\"'symbol'\" [options]=\"currencies\" [useInputMessages]=\"'never'\"></ui-select>\r\n</div>\r\n\r\n</ui-base-layout>\r\n\r\n", styles: [":host{display:block}:host.amount-hidden ui-select{padding-left:.7em}:host .control-container{display:flex;border-style:solid}:host .control-container ui-input{flex:1 1 100%}:host .control-container ui-select{flex-grow:0;flex-shrink:1}:host ::ng-deep .mat-mdc-select-trigger{padding-left:.2em}:host ::ng-deep input{text-align:right;padding-right:.2em}:host ::ng-deep input,:host ::ng-deep .mat-mdc-select-trigger{border-width:0}:host.large ui-select{flex-basis:4.5em}:host.larger ui-select{flex-basis:5em}:host.normal ui-select{flex-basis:5.5em}:host.smaller ui-select{flex-basis:6em}:host.small ui-select{flex-basis:6em}:host.amount-hidden.large ui-select{flex-basis:5.2em}:host.amount-hidden.larger ui-select{flex-basis:4.7em}:host.amount-hidden.normal ui-select{flex-basis:4.2em}:host.amount-hidden.smaller ui-select{flex-basis:3.8em}:host.amount-hidden.smaller ui-select ::ng-deep .mat-mdc-select-trigger{width:3.2em}:host.amount-hidden.small ui-select{flex-basis:3.5em}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.InputComponent, selector: "ui-input", inputs: ["prefixIcon", "suffixIcon", "type", "clearButton", "activeIcons", "forceHasPrefix", "forceHasSuffix", "textAlign"], outputs: ["focusChanged", "keyPressed"] }, { kind: "component", type: i4.SelectComponent, selector: "ui-select", inputs: ["multiple", "triggerFormatter", "valueAttribute", "resetText", "displayAttribute", "options", "optionFormatter", "optionTemplateRef", "triggerTemplateRef", "panelClass", "allowEmptySelection", "trackBy"] }, { kind: "component", type: i5.UiBaseLayoutComponent, selector: "ui-base-layout", inputs: ["ctx"] }] }); }
|
|
115
|
+
}
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: CurrencyComponent, decorators: [{
|
|
117
|
+
type: Component,
|
|
118
|
+
args: [{ selector: 'ui-currency', providers: [{
|
|
119
|
+
provide: NG_VALUE_ACCESSOR,
|
|
120
|
+
multi: true,
|
|
121
|
+
useExisting: CurrencyComponent
|
|
122
|
+
}, {
|
|
123
|
+
provide: NG_VALIDATORS,
|
|
124
|
+
multi: true,
|
|
125
|
+
useExisting: CurrencyComponent
|
|
126
|
+
}
|
|
127
|
+
], template: "<ui-base-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [formGroup]=\"formGroup\">\r\n <ui-input *ngIf=\"!amountHidden\" [textAlign]=\"'right'\" [formControlName]=\"'amount'\" [placeholder]=\"placeholder\" #input [useInputMessages]=\"'never'\" (focusChanged)=\"focusChanged($event)\"></ui-input>\r\n <ui-select [panelClass]=\"panelClass\" [formControlName]=\"'currency'\" [displayAttribute]=\"'symbol'\" [options]=\"currencies\" [useInputMessages]=\"'never'\"></ui-select>\r\n</div>\r\n\r\n</ui-base-layout>\r\n\r\n", styles: [":host{display:block}:host.amount-hidden ui-select{padding-left:.7em}:host .control-container{display:flex;border-style:solid}:host .control-container ui-input{flex:1 1 100%}:host .control-container ui-select{flex-grow:0;flex-shrink:1}:host ::ng-deep .mat-mdc-select-trigger{padding-left:.2em}:host ::ng-deep input{text-align:right;padding-right:.2em}:host ::ng-deep input,:host ::ng-deep .mat-mdc-select-trigger{border-width:0}:host.large ui-select{flex-basis:4.5em}:host.larger ui-select{flex-basis:5em}:host.normal ui-select{flex-basis:5.5em}:host.smaller ui-select{flex-basis:6em}:host.small ui-select{flex-basis:6em}:host.amount-hidden.large ui-select{flex-basis:5.2em}:host.amount-hidden.larger ui-select{flex-basis:4.7em}:host.amount-hidden.normal ui-select{flex-basis:4.2em}:host.amount-hidden.smaller ui-select{flex-basis:3.8em}:host.amount-hidden.smaller ui-select ::ng-deep .mat-mdc-select-trigger{width:3.2em}:host.amount-hidden.small ui-select{flex-basis:3.5em}\n"] }]
|
|
128
|
+
}], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
|
|
129
|
+
type: Optional
|
|
130
|
+
}, {
|
|
131
|
+
type: Host
|
|
132
|
+
}, {
|
|
133
|
+
type: SkipSelf
|
|
134
|
+
}] }]; }, propDecorators: { currencies: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], currencyDisabled: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], formControlName: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], panelClass: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], amountHidden: [{
|
|
143
|
+
type: HostBinding,
|
|
144
|
+
args: ['class.amount-hidden']
|
|
145
|
+
}, {
|
|
146
|
+
type: Input
|
|
147
|
+
}], hasFocus: [{
|
|
148
|
+
type: HostBinding,
|
|
149
|
+
args: ['class.focus']
|
|
150
|
+
}] } });
|
|
151
151
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3kuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvc3JjL2xpYi9jdXJyZW5jeS9jdXJyZW5jeS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9zcmMvbGliL2N1cnJlbmN5L2N1cnJlbmN5LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8s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5cclxuIl19
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { Component, EventEmitter, Optional, Output, Self, ViewChild } from '@angular/core';
|
|
2
|
-
import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/forms";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
import * as i3 from "@angular/material/icon";
|
|
7
|
-
import * as i4 from "@angular/material/datepicker";
|
|
8
|
-
import * as i5 from "../layouts/simple/ui-simple-layout.component";
|
|
9
|
-
export class DateComponent extends UiSimpleComponent {
|
|
10
|
-
constructor(ngControl) {
|
|
11
|
-
super(ngControl);
|
|
12
|
-
this.ngControl = ngControl;
|
|
13
|
-
// @Input() placeholder: string | undefined;
|
|
14
|
-
// @Input() control;
|
|
15
|
-
// // @Input() controlName;
|
|
16
|
-
// @Input() label;
|
|
17
|
-
// @Input() type;
|
|
18
|
-
// @Input() floatLabel;
|
|
19
|
-
this.doKeyup = new EventEmitter();
|
|
20
|
-
this.hasFocus = false;
|
|
21
|
-
this.controlTypeName = 'date';
|
|
22
|
-
this.opening = false;
|
|
23
|
-
}
|
|
24
|
-
open() {
|
|
25
|
-
this.hasFocus = true;
|
|
26
|
-
// this.opening = true;
|
|
27
|
-
// this.picker.open();
|
|
28
|
-
// setTimeout(() => {
|
|
29
|
-
// this.input.nativeElement.focus();
|
|
30
|
-
// this.opening = false;
|
|
31
|
-
// }); // , 150);
|
|
32
|
-
}
|
|
33
|
-
close() {
|
|
34
|
-
this.hasFocus = false;
|
|
35
|
-
// if (!this.opening) {
|
|
36
|
-
// this.picker.close();h
|
|
37
|
-
// }
|
|
38
|
-
}
|
|
39
|
-
keyup() {
|
|
40
|
-
this.doKeyup.emit();
|
|
41
|
-
// this.onChange(this.control.value);
|
|
42
|
-
}
|
|
43
|
-
writeValue(obj) { }
|
|
44
|
-
registerOnChange(fn) {
|
|
45
|
-
this.onChange = fn;
|
|
46
|
-
}
|
|
47
|
-
registerOnTouched(fn) { }
|
|
48
|
-
setDisabledState(isDisabled) { }
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: DateComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: DateComponent, selector: "ui-date", outputs: { doKeyup: "doKeyup" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container has-suffix active-icons\" [ngClass]=\"{'has-focus': hasFocus}\">\r\n <input #input (blur)=\"close()\" (focus)=\"open()\" [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [formControl]=\"componentFormControl\" (keyup)=\"keyup()\">\r\n <mat-icon slot=\"suffix\" (click)=\"picker.open()\" [ngClass]=\"{disabled: componentFormControl.disabled}\">today</mat-icon>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }] }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: DateComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{ selector: 'ui-date', template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container has-suffix active-icons\" [ngClass]=\"{'has-focus': hasFocus}\">\r\n <input #input (blur)=\"close()\" (focus)=\"open()\" [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [formControl]=\"componentFormControl\" (keyup)=\"keyup()\">\r\n <mat-icon slot=\"suffix\" (click)=\"picker.open()\" [ngClass]=\"{disabled: componentFormControl.disabled}\">today</mat-icon>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n"] }]
|
|
55
|
-
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
56
|
-
type: Optional
|
|
57
|
-
}, {
|
|
58
|
-
type: Self
|
|
59
|
-
}] }]; }, propDecorators: { doKeyup: [{
|
|
60
|
-
type: Output
|
|
61
|
-
}], picker: [{
|
|
62
|
-
type: ViewChild,
|
|
63
|
-
args: ['picker']
|
|
64
|
-
}], input: [{
|
|
65
|
-
type: ViewChild,
|
|
66
|
-
args: ['input']
|
|
67
|
-
}] } });
|
|
1
|
+
import { Component, EventEmitter, Optional, Output, Self, ViewChild } from '@angular/core';
|
|
2
|
+
import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@angular/material/icon";
|
|
7
|
+
import * as i4 from "@angular/material/datepicker";
|
|
8
|
+
import * as i5 from "../layouts/simple/ui-simple-layout.component";
|
|
9
|
+
export class DateComponent extends UiSimpleComponent {
|
|
10
|
+
constructor(ngControl) {
|
|
11
|
+
super(ngControl);
|
|
12
|
+
this.ngControl = ngControl;
|
|
13
|
+
// @Input() placeholder: string | undefined;
|
|
14
|
+
// @Input() control;
|
|
15
|
+
// // @Input() controlName;
|
|
16
|
+
// @Input() label;
|
|
17
|
+
// @Input() type;
|
|
18
|
+
// @Input() floatLabel;
|
|
19
|
+
this.doKeyup = new EventEmitter();
|
|
20
|
+
this.hasFocus = false;
|
|
21
|
+
this.controlTypeName = 'date';
|
|
22
|
+
this.opening = false;
|
|
23
|
+
}
|
|
24
|
+
open() {
|
|
25
|
+
this.hasFocus = true;
|
|
26
|
+
// this.opening = true;
|
|
27
|
+
// this.picker.open();
|
|
28
|
+
// setTimeout(() => {
|
|
29
|
+
// this.input.nativeElement.focus();
|
|
30
|
+
// this.opening = false;
|
|
31
|
+
// }); // , 150);
|
|
32
|
+
}
|
|
33
|
+
close() {
|
|
34
|
+
this.hasFocus = false;
|
|
35
|
+
// if (!this.opening) {
|
|
36
|
+
// this.picker.close();h
|
|
37
|
+
// }
|
|
38
|
+
}
|
|
39
|
+
keyup() {
|
|
40
|
+
this.doKeyup.emit();
|
|
41
|
+
// this.onChange(this.control.value);
|
|
42
|
+
}
|
|
43
|
+
writeValue(obj) { }
|
|
44
|
+
registerOnChange(fn) {
|
|
45
|
+
this.onChange = fn;
|
|
46
|
+
}
|
|
47
|
+
registerOnTouched(fn) { }
|
|
48
|
+
setDisabledState(isDisabled) { }
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: DateComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: DateComponent, selector: "ui-date", outputs: { doKeyup: "doKeyup" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container has-suffix active-icons\" [ngClass]=\"{'has-focus': hasFocus}\">\r\n <input #input (blur)=\"close()\" (focus)=\"open()\" [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [formControl]=\"componentFormControl\" (keyup)=\"keyup()\">\r\n <mat-icon slot=\"suffix\" (click)=\"picker.open()\" [ngClass]=\"{disabled: componentFormControl.disabled}\">today</mat-icon>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }] }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: DateComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{ selector: 'ui-date', template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container has-suffix active-icons\" [ngClass]=\"{'has-focus': hasFocus}\">\r\n <input #input (blur)=\"close()\" (focus)=\"open()\" [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [formControl]=\"componentFormControl\" (keyup)=\"keyup()\">\r\n <mat-icon slot=\"suffix\" (click)=\"picker.open()\" [ngClass]=\"{disabled: componentFormControl.disabled}\">today</mat-icon>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n"] }]
|
|
55
|
+
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
56
|
+
type: Optional
|
|
57
|
+
}, {
|
|
58
|
+
type: Self
|
|
59
|
+
}] }]; }, propDecorators: { doKeyup: [{
|
|
60
|
+
type: Output
|
|
61
|
+
}], picker: [{
|
|
62
|
+
type: ViewChild,
|
|
63
|
+
args: ['picker']
|
|
64
|
+
}], input: [{
|
|
65
|
+
type: ViewChild,
|
|
66
|
+
args: ['input']
|
|
67
|
+
}] } });
|
|
68
68
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9zcmMvbGliL2RhdGUvZGF0ZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9zcmMvbGliL2RhdGUvZGF0ZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBZSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFeEcsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7Ozs7Ozs7QUFlMUUsTUFBTSxPQUFPLGFBQWMsU0FBUSxpQkFBaUI7SUFvQmxELFlBQXVDLFNBQW9CO1FBQ3pELEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQztRQURvQixjQUFTLEdBQVQsU0FBUyxDQUFXO1FBbkIzRCw0Q0FBNEM7UUFDNUMsb0JBQW9CO1FBQ3BCLDJCQUEyQjtRQUMzQixrQkFBa0I7UUFDbEIsaUJBQWlCO1FBQ2pCLHVCQUF1QjtRQUViLFlBQU8sR0FBRyxJQUFJLFlBQVksRUFBRSxDQUF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