@sd-angular/core 1.3.243 → 1.3.244
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/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.js +20 -21
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +1 -15
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-full.umd.js +712 -0
- package/bundles/sd-angular-core-date-full.umd.js.map +1 -0
- package/bundles/sd-angular-core-date-full.umd.min.js +2 -0
- package/bundles/sd-angular-core-date-full.umd.min.js.map +1 -0
- package/bundles/sd-angular-core-date-time.umd.js +5 -6
- package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date.umd.js +719 -0
- package/bundles/sd-angular-core-date.umd.js.map +1 -0
- package/bundles/sd-angular-core-date.umd.min.js +2 -0
- package/bundles/sd-angular-core-date.umd.min.js.map +1 -0
- package/bundles/sd-angular-core-form.umd.js +10 -4
- package/bundles/sd-angular-core-form.umd.js.map +1 -1
- package/bundles/sd-angular-core-form.umd.min.js +1 -1
- package/bundles/sd-angular-core-form.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.js +7 -10
- package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-month.umd.js +742 -0
- package/bundles/sd-angular-core-month.umd.js.map +1 -0
- package/bundles/sd-angular-core-month.umd.min.js +2 -0
- package/bundles/sd-angular-core-month.umd.min.js.map +1 -0
- package/bundles/sd-angular-core.umd.js +4 -4
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/date/index.d.ts +1 -0
- package/date/package.json +12 -0
- package/date/sd-angular-core-date.d.ts +4 -0
- package/date/sd-angular-core-date.metadata.json +1 -0
- package/date/src/lib/date.component.d.ts +63 -0
- package/date/src/lib/date.module.d.ts +2 -0
- package/date/src/public-api.d.ts +2 -0
- package/date-full/index.d.ts +1 -0
- package/date-full/package.json +12 -0
- package/date-full/sd-angular-core-date-full.d.ts +4 -0
- package/date-full/sd-angular-core-date-full.metadata.json +1 -0
- package/date-full/src/lib/date-full.component.d.ts +64 -0
- package/date-full/src/lib/date-full.module.d.ts +2 -0
- package/date-full/src/public-api.d.ts +2 -0
- package/date-time/sd-angular-core-date-time.metadata.json +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +2 -2
- package/esm2015/autocomplete/src/lib/autocomplete.module.js +8 -10
- package/esm2015/date/index.js +2 -0
- package/esm2015/date/sd-angular-core-date.js +5 -0
- package/esm2015/date/src/lib/date.component.js +310 -0
- package/esm2015/date/src/lib/date.module.js +38 -0
- package/esm2015/date/src/public-api.js +3 -0
- package/esm2015/date-full/index.js +2 -0
- package/esm2015/date-full/sd-angular-core-date-full.js +5 -0
- package/esm2015/date-full/src/lib/date-full.component.js +303 -0
- package/esm2015/date-full/src/lib/date-full.module.js +40 -0
- package/esm2015/date-full/src/public-api.js +3 -0
- package/esm2015/date-time/src/lib/date-time.component.js +2 -2
- package/esm2015/date-time/src/lib/date-time.module.js +10 -12
- package/esm2015/form/src/lib/form.module.js +21 -12
- package/esm2015/input-number/src/lib/input-number.component.js +2 -2
- package/esm2015/input-number/src/lib/input-number.module.js +3 -7
- package/esm2015/month/index.js +2 -0
- package/esm2015/month/sd-angular-core-month.js +5 -0
- package/esm2015/month/src/lib/month.component.js +334 -0
- package/esm2015/month/src/lib/month.module.js +40 -0
- package/esm2015/month/src/public-api.js +3 -0
- package/esm2015/public-api.js +4 -1
- package/fesm2015/sd-angular-core-autocomplete.js +8 -10
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-date-full.js +344 -0
- package/fesm2015/sd-angular-core-date-full.js.map +1 -0
- package/fesm2015/sd-angular-core-date-time.js +12 -14
- package/fesm2015/sd-angular-core-date-time.js.map +1 -1
- package/fesm2015/sd-angular-core-date.js +349 -0
- package/fesm2015/sd-angular-core-date.js.map +1 -0
- package/fesm2015/sd-angular-core-form.js +19 -10
- package/fesm2015/sd-angular-core-form.js.map +1 -1
- package/fesm2015/sd-angular-core-input-number.js +3 -7
- package/fesm2015/sd-angular-core-input-number.js.map +1 -1
- package/fesm2015/sd-angular-core-month.js +374 -0
- package/fesm2015/sd-angular-core-month.js.map +1 -0
- package/fesm2015/sd-angular-core.js +3 -0
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/form/sd-angular-core-form.metadata.json +1 -1
- package/input-number/sd-angular-core-input-number.metadata.json +1 -1
- package/month/index.d.ts +1 -0
- package/month/package.json +12 -0
- package/month/sd-angular-core-month.d.ts +4 -0
- package/month/sd-angular-core-month.metadata.json +1 -0
- package/month/src/lib/month.component.d.ts +66 -0
- package/month/src/lib/month.module.d.ts +2 -0
- package/month/src/public-api.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/{sd-angular-core-1.3.243.tgz → sd-angular-core-1.3.244.tgz} +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ChangeDetectorRef, Inject, Optional, Input, Output, ContentChild, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { NgForm, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { MatDatepicker, MatDatepickerModule } from '@angular/material/datepicker';
|
|
5
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
import { MatInputModule } from '@angular/material/input';
|
|
8
|
+
import { SdButtonModule } from '@sd-angular/core/button';
|
|
9
|
+
import { SdFormControl, FORM_CONFIG, SdViewDefDirective, SdLabelDefDirective, SdCommonModule } from '@sd-angular/core/common';
|
|
10
|
+
import { SdPopoverModule } from '@sd-angular/core/popover';
|
|
11
|
+
import { SdTranslateModule } from '@sd-angular/core/translate';
|
|
12
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
|
|
13
|
+
import { v4 } from 'uuid';
|
|
14
|
+
import hash from 'object-hash';
|
|
15
|
+
import moment from 'moment';
|
|
16
|
+
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
17
|
+
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
|
18
|
+
import { MAT_DATE_FORMATS } from '@angular/material/core';
|
|
19
|
+
import { Subscription } from 'rxjs';
|
|
20
|
+
|
|
21
|
+
var _date, _name, _form, _subscription;
|
|
22
|
+
const CUSTOM_DATETIME_FORMATS = {
|
|
23
|
+
parse: {
|
|
24
|
+
dateInput: 'DD/MM/YYYY HH:mm',
|
|
25
|
+
},
|
|
26
|
+
display: {
|
|
27
|
+
dateInput: 'DD/MM/YYYY HH:mm',
|
|
28
|
+
monthYearLabel: 'MMM YYYY',
|
|
29
|
+
dateA11yLabel: 'LL',
|
|
30
|
+
monthYearA11yLabel: 'MMMM YYYY',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const CUSTOM_DATE_FORMATS = {
|
|
34
|
+
parse: {
|
|
35
|
+
dateInput: 'DD/MM/YYYY',
|
|
36
|
+
},
|
|
37
|
+
display: {
|
|
38
|
+
dateInput: 'DD/MM/YYYY',
|
|
39
|
+
monthYearLabel: 'MMM YYYY',
|
|
40
|
+
dateA11yLabel: 'LL',
|
|
41
|
+
monthYearA11yLabel: 'MMMM YYYY',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const ɵ0 = CUSTOM_DATE_FORMATS, ɵ1 = CUSTOM_DATETIME_FORMATS;
|
|
45
|
+
class SdMonth {
|
|
46
|
+
constructor(ref, deviceService, formConfig) {
|
|
47
|
+
this.ref = ref;
|
|
48
|
+
this.formConfig = formConfig;
|
|
49
|
+
this.id = `I${v4()}`;
|
|
50
|
+
this.isMobileOrTablet = false;
|
|
51
|
+
_date.set(this, void 0);
|
|
52
|
+
_name.set(this, v4());
|
|
53
|
+
this.disableErrorMessage = false;
|
|
54
|
+
this.formControl = new SdFormControl();
|
|
55
|
+
_form.set(this, void 0);
|
|
56
|
+
this.required = false;
|
|
57
|
+
this.sdChange = new EventEmitter();
|
|
58
|
+
this.sdFocus = new EventEmitter();
|
|
59
|
+
this.modelChange = new EventEmitter();
|
|
60
|
+
_subscription.set(this, new Subscription());
|
|
61
|
+
this.isFocused = false;
|
|
62
|
+
this.onFocus = () => {
|
|
63
|
+
this.isFocused = true;
|
|
64
|
+
this.sdFocus.emit();
|
|
65
|
+
};
|
|
66
|
+
this.onBlur = () => {
|
|
67
|
+
this.isFocused = false;
|
|
68
|
+
};
|
|
69
|
+
this.onClick = () => {
|
|
70
|
+
var _a;
|
|
71
|
+
if ((_a = this.sdView) === null || _a === void 0 ? void 0 : _a.templateRef) {
|
|
72
|
+
if (!this.formControl.disabled && !this.isFocused) {
|
|
73
|
+
this.focus();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
this.blur = () => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
(_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.blur();
|
|
80
|
+
};
|
|
81
|
+
this.focus = () => {
|
|
82
|
+
this.isFocused = true;
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
(_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
86
|
+
(_c = this.datePicker) === null || _c === void 0 ? void 0 : _c.open();
|
|
87
|
+
//
|
|
88
|
+
}, 100);
|
|
89
|
+
};
|
|
90
|
+
this.onKeyDown = (event) => {
|
|
91
|
+
const key = event.keyCode || event.charCode;
|
|
92
|
+
let isShift = false;
|
|
93
|
+
if (key === 16) {
|
|
94
|
+
isShift = true;
|
|
95
|
+
}
|
|
96
|
+
// cho phép copy parse
|
|
97
|
+
if (event.ctrlKey && (key === 67 || key === 86)) {
|
|
98
|
+
console.log('action copy parse... datepicker');
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
// Allow only Numeric Keys.
|
|
102
|
+
if (((key >= 48 && key <= 57) ||
|
|
103
|
+
key === 8 ||
|
|
104
|
+
key <= 37 ||
|
|
105
|
+
key <= 39 ||
|
|
106
|
+
(key >= 96 && key <= 105) ||
|
|
107
|
+
key === 191 ||
|
|
108
|
+
key === 186 ||
|
|
109
|
+
key === 59) &&
|
|
110
|
+
isShift === false) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
this.onKeyup = event => {
|
|
118
|
+
const currentVal = event.target.value;
|
|
119
|
+
const formControl = this.formControl;
|
|
120
|
+
let regex = /^([0]{0,1}[1-9]|1[012])\/\d\d\d\d [012]{0,1}[0-9]:[0-6][0-9]$/g;
|
|
121
|
+
if (currentVal && !regex.test(currentVal)) {
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
this.isValid = true;
|
|
124
|
+
formControl.markAsDirty();
|
|
125
|
+
formControl.markAsTouched();
|
|
126
|
+
formControl.setErrors(Object.assign(Object.assign({}, formControl.errors), { date: `Sai định dạng` }));
|
|
127
|
+
}, 0);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
this.isValid = false;
|
|
132
|
+
formControl.setErrors(Object.assign(Object.assign({}, formControl.errors), { date: null }));
|
|
133
|
+
this.formControl.updateValueAndValidity();
|
|
134
|
+
}, 0);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
this.onChange = (event) => {
|
|
138
|
+
var _a, _b, _c;
|
|
139
|
+
const value = (_a = event.value) === null || _a === void 0 ? void 0 : _a.toDate();
|
|
140
|
+
(_c = (_b = this.input) === null || _b === void 0 ? void 0 : _b.nativeElement) === null || _c === void 0 ? void 0 : _c.focus();
|
|
141
|
+
if (!this.isValid) {
|
|
142
|
+
if (new Date(__classPrivateFieldGet(this, _date)) !== value) {
|
|
143
|
+
this.modelChange.emit(value);
|
|
144
|
+
this.sdChange.emit(value);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.isValid = false;
|
|
149
|
+
this.formControl.setValue(null);
|
|
150
|
+
this.modelChange.emit(null);
|
|
151
|
+
this.sdChange.emit(null);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
this.clear = ($event) => {
|
|
155
|
+
$event === null || $event === void 0 ? void 0 : $event.stopPropagation();
|
|
156
|
+
if (this.formControl.value) {
|
|
157
|
+
this.formControl.setValue(null);
|
|
158
|
+
this.modelChange.emit(null);
|
|
159
|
+
this.sdChange.emit(null);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
this.onMonthSelected = (normalizedMonthAndYear) => {
|
|
163
|
+
const ctrlValue = this.formControl.value || moment();
|
|
164
|
+
ctrlValue.month(normalizedMonthAndYear.month());
|
|
165
|
+
ctrlValue.year(normalizedMonthAndYear.year());
|
|
166
|
+
this.formControl.setValue(ctrlValue);
|
|
167
|
+
this.datePicker.close();
|
|
168
|
+
this.modelChange.emit(ctrlValue);
|
|
169
|
+
this.sdChange.emit(ctrlValue);
|
|
170
|
+
};
|
|
171
|
+
this.isMobileOrTablet = !deviceService.isDesktop();
|
|
172
|
+
}
|
|
173
|
+
set name(val) {
|
|
174
|
+
if (val) {
|
|
175
|
+
__classPrivateFieldSet(this, _name, val);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
set _disableErrorMessage(val) {
|
|
179
|
+
this.disableErrorMessage = val === '' || val;
|
|
180
|
+
val = val === '' || val;
|
|
181
|
+
}
|
|
182
|
+
set _min(val) {
|
|
183
|
+
if (Date.isDate(val)) {
|
|
184
|
+
this.min = new Date(val);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
this.min = null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
set _max(val) {
|
|
191
|
+
if (Date.isDate(val)) {
|
|
192
|
+
this.max = new Date(val);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.max = null;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
set form(val) {
|
|
199
|
+
if (val) {
|
|
200
|
+
if (val instanceof NgForm) {
|
|
201
|
+
__classPrivateFieldSet(this, _form, val.form);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
__classPrivateFieldSet(this, _form, val);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
set disabled(val) {
|
|
209
|
+
val = val === '' || val;
|
|
210
|
+
if (val) {
|
|
211
|
+
this.formControl.disable();
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.formControl.enable();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
set _required(val) {
|
|
218
|
+
this.required = val === '' || val;
|
|
219
|
+
if (this.required) {
|
|
220
|
+
this.formControl.setValidators([Validators.required]);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.formControl.clearValidators();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
set _inlineError(val) {
|
|
227
|
+
this.inlineError = val;
|
|
228
|
+
if (this.inlineError) {
|
|
229
|
+
this.formControl.setValidators([this.customInlineErrorValidator()]);
|
|
230
|
+
this.formControl.updateValueAndValidity();
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
this.formControl.clearValidators();
|
|
234
|
+
this.formControl.updateValueAndValidity();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
set _label(val) {
|
|
238
|
+
this.label = val;
|
|
239
|
+
this.qcId = hash({
|
|
240
|
+
selector: 'sd-month',
|
|
241
|
+
label: val,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
set minDate(val) {
|
|
245
|
+
if (Date.isDate(val)) {
|
|
246
|
+
this.min = new Date(val);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
this.min = null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
set maxDate(val) {
|
|
253
|
+
if (Date.isDate(val)) {
|
|
254
|
+
this.max = new Date(val);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
this.max = null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
set model(val) {
|
|
261
|
+
if (!Date.isDate(val)) {
|
|
262
|
+
val = null;
|
|
263
|
+
}
|
|
264
|
+
if (__classPrivateFieldGet(this, _date) !== val) {
|
|
265
|
+
__classPrivateFieldSet(this, _date, val);
|
|
266
|
+
const date = Date.isDate(__classPrivateFieldGet(this, _date)) ? moment(Date.toFormat(__classPrivateFieldGet(this, _date), 'MM/dd/yyyy HH:mm:ss'), 'MM/DD/YYYY HH:mm:ss') : null;
|
|
267
|
+
this.formControl.setValue(date);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
ngOnDestroy() {
|
|
271
|
+
var _a;
|
|
272
|
+
(_a = __classPrivateFieldGet(this, _form)) === null || _a === void 0 ? void 0 : _a.removeControl(__classPrivateFieldGet(this, _name));
|
|
273
|
+
__classPrivateFieldGet(this, _subscription).unsubscribe();
|
|
274
|
+
}
|
|
275
|
+
ngOnInit() {
|
|
276
|
+
var _a, _b;
|
|
277
|
+
this.appearance = this.appearance || ((_a = this.formConfig) === null || _a === void 0 ? void 0 : _a.appearance);
|
|
278
|
+
__classPrivateFieldGet(this, _subscription).add(this.formControl.sdChanges.subscribe(() => {
|
|
279
|
+
// this.formControl.updateValueAndValidity();
|
|
280
|
+
this.ref.markForCheck();
|
|
281
|
+
}));
|
|
282
|
+
(_b = __classPrivateFieldGet(this, _form)) === null || _b === void 0 ? void 0 : _b.addControl(__classPrivateFieldGet(this, _name), this.formControl);
|
|
283
|
+
}
|
|
284
|
+
// Hàm tạo Validators tùy chỉnh cho inlineError
|
|
285
|
+
customInlineErrorValidator() {
|
|
286
|
+
return (control) => {
|
|
287
|
+
return { inlineError: true };
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
ngAfterViewInit() { }
|
|
291
|
+
focusInputElement() {
|
|
292
|
+
var _a, _b;
|
|
293
|
+
(_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
_date = new WeakMap(), _name = new WeakMap(), _form = new WeakMap(), _subscription = new WeakMap();
|
|
297
|
+
SdMonth.decorators = [
|
|
298
|
+
{ type: Component, args: [{
|
|
299
|
+
selector: 'sd-month',
|
|
300
|
+
template: "<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\"> </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\"\r\n >{{ label }} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></label\r\n>\r\n<div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"sdView?.templateRef\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused && !datePicker?.opened; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef; context: { value: formControl.value }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field\r\n class=\"sd-md\"\r\n [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage }\"\r\n appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\r\n <input\r\n aria-hidden=\"true\"\r\n [id]=\"id\"\r\n matInput\r\n (keyup)=\"onKeyup($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n (dateChange)=\"onChange($event)\"\r\n [autocomplete]=\"id\"\r\n autocorrect=\"off\"\r\n [formControl]=\"formControl\"\r\n [required]=\"required\"\r\n [matDatepicker]=\"picker\"\r\n [placeholder]=\"placeholder || (appearance ? label : '')\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n #input />\r\n <mat-icon\r\n *ngIf=\"formControl?.value && !required && !formControl.disabled\"\r\n class=\"pointer sd-suffix-icon\"\r\n (click)=\"clear($event)\"\r\n matSuffix\r\n >cancel\r\n </mat-icon>\r\n <mat-icon class=\"pointer sd-suffix-icon\" (click)=\"!formControl?.disabled && picker.open()\" #btn matSuffix> today </mat-icon>\r\n <mat-datepicker\r\n #picker\r\n [touchUi]=\"isMobileOrTablet\"\r\n startView=\"multi-year\"\r\n (monthSelected)=\"onMonthSelected($event)\"></mat-datepicker>\r\n <mat-error *ngIf=\"formControl?.errors?.required && formControl?.touched\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ 'This field is required' | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatepickerMin && formControl?.touched\">\r\n <ng-container *ngIf=\"!disableErrorMessage\"\r\n >{{ 'Min date' | sdTranslate }}:\r\n <strong>{{ min | date : 'dd/MM/yyyy HH:mm' }}</strong>\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatepickerMax && formControl?.touched\">\r\n <ng-container *ngIf=\"!disableErrorMessage\"\r\n >{{ 'Max date' | sdTranslate }}:\r\n <strong>{{ max | date : 'dd/MM/yyyy HH:mm' }}</strong>\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.matDatetimePickerParse && formControl?.touched\">\r\n <ng-container *ngIf=\"!disableErrorMessage\"\r\n >{{ 'Parse error' | sdTranslate }}:\r\n <strong>{{ formControl?.errors?.matDatetimePickerParse?.text }}</strong>\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && formControl?.touched && !disableErrorMessage\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ formControl?.errors?.customValidator }} </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError && formControl?.touched && !disableErrorMessage\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ inlineError }}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
|
|
301
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
302
|
+
providers: [
|
|
303
|
+
{ provide: MAT_DATE_FORMATS, useValue: ɵ0 },
|
|
304
|
+
{ provide: NGX_MAT_DATE_FORMATS, useValue: ɵ1 },
|
|
305
|
+
],
|
|
306
|
+
styles: [":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}"]
|
|
307
|
+
},] }
|
|
308
|
+
];
|
|
309
|
+
SdMonth.ctorParameters = () => [
|
|
310
|
+
{ type: ChangeDetectorRef },
|
|
311
|
+
{ type: DeviceDetectorService },
|
|
312
|
+
{ type: undefined, decorators: [{ type: Inject, args: [FORM_CONFIG,] }, { type: Optional }] }
|
|
313
|
+
];
|
|
314
|
+
SdMonth.propDecorators = {
|
|
315
|
+
name: [{ type: Input }],
|
|
316
|
+
appearance: [{ type: Input }],
|
|
317
|
+
_disableErrorMessage: [{ type: Input, args: ['disableErrorMessage',] }],
|
|
318
|
+
_min: [{ type: Input, args: ['min',] }],
|
|
319
|
+
_max: [{ type: Input, args: ['max',] }],
|
|
320
|
+
size: [{ type: Input }],
|
|
321
|
+
form: [{ type: Input }],
|
|
322
|
+
disabled: [{ type: Input }],
|
|
323
|
+
_required: [{ type: Input, args: ['required',] }],
|
|
324
|
+
_inlineError: [{ type: Input, args: ['inlineError',] }],
|
|
325
|
+
_label: [{ type: Input, args: ['label',] }],
|
|
326
|
+
placeholder: [{ type: Input }],
|
|
327
|
+
defaultTime: [{ type: Input }],
|
|
328
|
+
minDate: [{ type: Input }],
|
|
329
|
+
maxDate: [{ type: Input }],
|
|
330
|
+
validator: [{ type: Input }],
|
|
331
|
+
sdChange: [{ type: Output }],
|
|
332
|
+
sdFocus: [{ type: Output }],
|
|
333
|
+
model: [{ type: Input }],
|
|
334
|
+
modelChange: [{ type: Output }],
|
|
335
|
+
sdView: [{ type: ContentChild, args: [SdViewDefDirective,] }],
|
|
336
|
+
sdLabelDef: [{ type: ContentChild, args: [SdLabelDefDirective,] }],
|
|
337
|
+
input: [{ type: ViewChild, args: ['input',] }],
|
|
338
|
+
datePicker: [{ type: ViewChild, args: [MatDatepicker,] }]
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
class SdMonthModule {
|
|
342
|
+
}
|
|
343
|
+
SdMonthModule.decorators = [
|
|
344
|
+
{ type: NgModule, args: [{
|
|
345
|
+
imports: [
|
|
346
|
+
CommonModule,
|
|
347
|
+
FormsModule,
|
|
348
|
+
ReactiveFormsModule,
|
|
349
|
+
MatInputModule,
|
|
350
|
+
MatIconModule,
|
|
351
|
+
MatFormFieldModule,
|
|
352
|
+
MatDatepickerModule,
|
|
353
|
+
SdTranslateModule,
|
|
354
|
+
SdCommonModule,
|
|
355
|
+
SdPopoverModule,
|
|
356
|
+
SdButtonModule
|
|
357
|
+
],
|
|
358
|
+
declarations: [
|
|
359
|
+
SdMonth
|
|
360
|
+
],
|
|
361
|
+
exports: [
|
|
362
|
+
SdCommonModule,
|
|
363
|
+
SdMonth
|
|
364
|
+
],
|
|
365
|
+
providers: []
|
|
366
|
+
},] }
|
|
367
|
+
];
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Generated bundle index. Do not edit.
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
export { SdMonth, SdMonthModule };
|
|
374
|
+
//# sourceMappingURL=sd-angular-core-month.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-angular-core-month.js","sources":["../../../../projects/sd-core/month/src/lib/month.component.ts","../../../../projects/sd-core/month/src/lib/month.module.ts","../../../../projects/sd-core/month/sd-angular-core-month.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n EventEmitter,\r\n Output,\r\n OnDestroy,\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n OnInit,\r\n ViewChild,\r\n ChangeDetectionStrategy,\r\n ContentChild,\r\n ElementRef,\r\n Inject,\r\n Optional,\r\n} from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport hash from 'object-hash';\r\nimport moment, { Moment } from 'moment';\r\nimport { AbstractControl, FormGroup, NgForm, ValidatorFn, Validators } from '@angular/forms';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';\r\nimport { NgxMatDatetimePicker, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';\r\nimport { MAT_DATE_FORMATS } from '@angular/material/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { FORM_CONFIG, IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\n\r\nconst CUSTOM_DATETIME_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY HH:mm',\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY HH:mm',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\nconst CUSTOM_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'DD/MM/YYYY',\r\n },\r\n display: {\r\n dateInput: 'DD/MM/YYYY',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'LL',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'sd-month',\r\n templateUrl: './month.component.html',\r\n styleUrls: ['./month.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n { provide: MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },\r\n { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATETIME_FORMATS },\r\n ],\r\n})\r\nexport class SdMonth implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n isMobileOrTablet = false;\r\n #date: any;\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n\r\n @Input() appearance: MatFormFieldAppearance;\r\n disableErrorMessage = false;\r\n\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = val === '' || val;\r\n val = val === '' || val;\r\n }\r\n\r\n formControl = new SdFormControl();\r\n min: Date;\r\n\r\n @Input('min') set _min(val: string | Date | number) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n\r\n max: Date;\r\n\r\n @Input('max') set _max(val: string | Date | number) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\r\n }\r\n }\r\n\r\n @Input() size: 'sm' | 'lg';\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n\r\n maxlength: number;\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = val === '' || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n\r\n required = false;\r\n\r\n @Input('required') set _required(val: boolean | '') {\r\n this.required = val === '' || val;\r\n if (this.required) {\r\n this.formControl.setValidators([Validators.required]);\r\n } else {\r\n this.formControl.clearValidators();\r\n }\r\n }\r\n\r\n inlineError: string;\r\n\r\n @Input('inlineError') set _inlineError(val: string) {\r\n this.inlineError = val;\r\n if (this.inlineError) {\r\n this.formControl.setValidators([this.customInlineErrorValidator()]);\r\n this.formControl.updateValueAndValidity();\r\n } else {\r\n this.formControl.clearValidators();\r\n this.formControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n qcId: string;\r\n label: string;\r\n\r\n @Input('label') set _label(val: string) {\r\n this.label = val;\r\n this.qcId = hash({\r\n selector: 'sd-month',\r\n label: val,\r\n });\r\n }\r\n\r\n @Input() placeholder: string;\r\n @Input() defaultTime: any;\r\n\r\n @Input() set minDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.min = new Date(val);\r\n } else {\r\n this.min = null;\r\n }\r\n }\r\n\r\n @Input() set maxDate(val: string | Date) {\r\n if (Date.isDate(val)) {\r\n this.max = new Date(val);\r\n } else {\r\n this.max = null;\r\n }\r\n }\r\n\r\n @Input() validator: (value: any) => string | Promise<string>;\r\n @Output() sdChange = new EventEmitter();\r\n @Output() sdFocus = new EventEmitter<any>();\r\n\r\n @Input() set model(val: any) {\r\n if (!Date.isDate(val)) {\r\n val = null;\r\n }\r\n if (this.#date !== val) {\r\n this.#date = val;\r\n const date = Date.isDate(this.#date) ? moment(Date.toFormat(this.#date, 'MM/dd/yyyy HH:mm:ss'), 'MM/DD/YYYY HH:mm:ss') : null;\r\n this.formControl.setValue(date);\r\n }\r\n }\r\n\r\n @Output() modelChange = new EventEmitter();\r\n #subscription = new Subscription();\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n @ViewChild('input') input: ElementRef;\r\n @ViewChild(MatDatepicker) datePicker: MatDatepicker<Moment>;\r\n isFocused = false;\r\n\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n deviceService: DeviceDetectorService,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration\r\n ) {\r\n this.isMobileOrTablet = !deviceService.isDesktop();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(\r\n this.formControl.sdChanges.subscribe(() => {\r\n // this.formControl.updateValueAndValidity();\r\n this.ref.markForCheck();\r\n })\r\n );\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n // Hàm tạo Validators tùy chỉnh cho inlineError\r\n customInlineErrorValidator(): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: any } | null => {\r\n return { inlineError: true };\r\n };\r\n }\r\n\r\n ngAfterViewInit() {}\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n this.sdFocus.emit();\r\n };\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n };\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n };\r\n\r\n blur = () => {\r\n this.input?.nativeElement?.blur();\r\n };\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.input?.nativeElement?.focus();\r\n this.datePicker?.open();\r\n //\r\n }, 100);\r\n };\r\n\r\n focusInputElement() {\r\n this.input?.nativeElement?.focus();\r\n }\r\n\r\n isValid: boolean;\r\n onKeyDown = (event: KeyboardEvent) => {\r\n const key = event.keyCode || event.charCode;\r\n let isShift = false;\r\n if (key === 16) {\r\n isShift = true;\r\n }\r\n\r\n // cho phép copy parse\r\n if (event.ctrlKey && (key === 67 || key === 86)) {\r\n console.log('action copy parse... datepicker');\r\n return true;\r\n }\r\n\r\n // Allow only Numeric Keys.\r\n if (\r\n ((key >= 48 && key <= 57) ||\r\n key === 8 ||\r\n key <= 37 ||\r\n key <= 39 ||\r\n (key >= 96 && key <= 105) ||\r\n key === 191 ||\r\n key === 186 ||\r\n key === 59) &&\r\n isShift === false\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n onKeyup = event => {\r\n const currentVal: string = event.target.value;\r\n const formControl: AbstractControl = this.formControl;\r\n let regex = /^([0]{0,1}[1-9]|1[012])\\/\\d\\d\\d\\d [012]{0,1}[0-9]:[0-6][0-9]$/g;\r\n\r\n if (currentVal && !regex.test(currentVal)) {\r\n setTimeout(() => {\r\n this.isValid = true;\r\n formControl.markAsDirty();\r\n formControl.markAsTouched();\r\n formControl.setErrors({ ...formControl.errors, date: `Sai định dạng` });\r\n }, 0);\r\n } else {\r\n setTimeout(() => {\r\n this.isValid = false;\r\n formControl.setErrors({ ...formControl.errors, date: null });\r\n this.formControl.updateValueAndValidity();\r\n }, 0);\r\n }\r\n };\r\n\r\n onChange = (event: MatDatepickerInputEvent<Moment>) => {\r\n const value = event.value?.toDate();\r\n this.input?.nativeElement?.focus();\r\n if (!this.isValid) {\r\n if (new Date(this.#date) !== value) {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n } else {\r\n this.isValid = false;\r\n this.formControl.setValue(null);\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n };\r\n\r\n clear = ($event: any) => {\r\n $event?.stopPropagation();\r\n if (this.formControl.value) {\r\n this.formControl.setValue(null);\r\n this.modelChange.emit(null);\r\n this.sdChange.emit(null);\r\n }\r\n };\r\n\r\n onMonthSelected = (normalizedMonthAndYear: Moment) => {\r\n const ctrlValue = this.formControl.value || moment();\r\n ctrlValue.month(normalizedMonthAndYear.month());\r\n ctrlValue.year(normalizedMonthAndYear.year());\r\n this.formControl.setValue(ctrlValue);\r\n this.datePicker.close();\r\n this.modelChange.emit(ctrlValue);\r\n this.sdChange.emit(ctrlValue);\r\n };\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { SdButtonModule } from \"@sd-angular/core/button\";\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\nimport { SdPopoverModule } from '@sd-angular/core/popover';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdMonth } from './month.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatFormFieldModule,\r\n MatDatepickerModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n SdPopoverModule,\r\n SdButtonModule\r\n ],\r\n declarations: [\r\n SdMonth\r\n ],\r\n exports: [\r\n SdCommonModule,\r\n SdMonth\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdMonthModule {\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,uBAAuB,GAAG;IAC9B,KAAK,EAAE;QACL,SAAS,EAAE,kBAAkB;KAC9B;IACD,OAAO,EAAE;QACP,SAAS,EAAE,kBAAkB;QAC7B,cAAc,EAAE,UAAU;QAC1B,aAAa,EAAE,IAAI;QACnB,kBAAkB,E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,SAAC,aAAa;qBAcnB,KAAK,SAAC,OAAO;0BAQb,KAAK;0BACL,KAAK;sBAEL,KAAK;sBAQL,KAAK;wBAQL,KAAK;uBACL,MAAM;sBACN,MAAM;oBAEN,KAAK;0BAWL,MAAM;qBAEN,YAAY,SAAC,kBAAkB;yBAC/B,YAAY,SAAC,mBAAmB;oBAChC,SAAS,SAAC,OAAO;yBACjB,SAAS,SAAC,aAAa;;;MClKb,aAAa;;;YAxBzB,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,cAAc;oBACd,aAAa;oBACb,kBAAkB;oBAClB,mBAAmB;oBACnB,iBAAiB;oBACjB,cAAc;oBACd,eAAe;oBACf,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,OAAO;iBACR;gBACD,OAAO,EAAE;oBACP,cAAc;oBACd,OAAO;iBACR;gBACD,SAAS,EAAE,EACV;aACF;;;ACpCD;;;;;;"}
|
|
@@ -25,6 +25,9 @@ import '@sd-angular/core/print';
|
|
|
25
25
|
import '@sd-angular/core/zip';
|
|
26
26
|
import '@sd-angular/core/export';
|
|
27
27
|
import { SdTableModule } from '@sd-angular/core/table';
|
|
28
|
+
import '@sd-angular/core/date';
|
|
29
|
+
import '@sd-angular/core/month';
|
|
30
|
+
import '@sd-angular/core/date-full';
|
|
28
31
|
import { NgModule } from '@angular/core';
|
|
29
32
|
import { CommonModule } from '@angular/common';
|
|
30
33
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core.js","sources":["../../../../projects/sd-core/src/lib/material.module.ts","../../../../projects/sd-core/src/lib/core.module.ts","../../../../projects/sd-core/src/sd-angular-core.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { MatPaginatorModule } from '@angular/material/paginator';\r\n\r\n@NgModule({\r\n imports: [\r\n MatTooltipModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatAutocompleteModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatMenuModule,\r\n MatChipsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatBottomSheetModule,\r\n MatProgressSpinnerModule,\r\n DragDropModule,\r\n MatExpansionModule,\r\n MatTabsModule,\r\n MatPaginatorModule\r\n ],\r\n exports: [\r\n MatTooltipModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatAutocompleteModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatMenuModule,\r\n MatChipsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatBottomSheetModule,\r\n MatProgressSpinnerModule,\r\n DragDropModule,\r\n MatExpansionModule,\r\n MatTabsModule,\r\n MatPaginatorModule\r\n ]\r\n})\r\nexport class MaterialModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from './material.module';\r\n\r\nimport { SdServiceModule } from '@sd-angular/core/service';\r\nimport { SdChartModule } from '@sd-angular/core/chart';\r\nimport { SdGridMaterialModule } from '@sd-angular/core/grid-material';\r\nimport { SdEditorModule } from '@sd-angular/core/editor';\r\nimport { SdKonvaModule } from '@sd-angular/core/konva';\r\nimport { SdUploadExcelModule } from '@sd-angular/core/upload-excel';\r\nimport { SdGridModule } from '@sd-angular/core/grid';\r\nimport { SdFormModule } from '@sd-angular/core/form';\r\nimport { SdTableModule } from '@sd-angular/core/table';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n SdChartModule,\r\n SdKonvaModule,\r\n SdGridMaterialModule,\r\n SdUploadExcelModule,\r\n SdGridModule,\r\n SdFormModule,\r\n SdTableModule,\r\n SdServiceModule\r\n ],\r\n declarations: [\r\n ],\r\n exports: [\r\n SdChartModule,\r\n SdKonvaModule,\r\n SdGridMaterialModule,\r\n SdEditorModule,\r\n SdUploadExcelModule,\r\n SdGridModule,\r\n SdFormModule,\r\n SdTableModule,\r\n SdServiceModule,\r\n MaterialModule,\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdCoreModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sd-angular-core.js","sources":["../../../../projects/sd-core/src/lib/material.module.ts","../../../../projects/sd-core/src/lib/core.module.ts","../../../../projects/sd-core/src/sd-angular-core.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { MatPaginatorModule } from '@angular/material/paginator';\r\n\r\n@NgModule({\r\n imports: [\r\n MatTooltipModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatAutocompleteModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatMenuModule,\r\n MatChipsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatBottomSheetModule,\r\n MatProgressSpinnerModule,\r\n DragDropModule,\r\n MatExpansionModule,\r\n MatTabsModule,\r\n MatPaginatorModule\r\n ],\r\n exports: [\r\n MatTooltipModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatAutocompleteModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatMenuModule,\r\n MatChipsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatBottomSheetModule,\r\n MatProgressSpinnerModule,\r\n DragDropModule,\r\n MatExpansionModule,\r\n MatTabsModule,\r\n MatPaginatorModule\r\n ]\r\n})\r\nexport class MaterialModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from './material.module';\r\n\r\nimport { SdServiceModule } from '@sd-angular/core/service';\r\nimport { SdChartModule } from '@sd-angular/core/chart';\r\nimport { SdGridMaterialModule } from '@sd-angular/core/grid-material';\r\nimport { SdEditorModule } from '@sd-angular/core/editor';\r\nimport { SdKonvaModule } from '@sd-angular/core/konva';\r\nimport { SdUploadExcelModule } from '@sd-angular/core/upload-excel';\r\nimport { SdGridModule } from '@sd-angular/core/grid';\r\nimport { SdFormModule } from '@sd-angular/core/form';\r\nimport { SdTableModule } from '@sd-angular/core/table';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n SdChartModule,\r\n SdKonvaModule,\r\n SdGridMaterialModule,\r\n SdUploadExcelModule,\r\n SdGridModule,\r\n SdFormModule,\r\n SdTableModule,\r\n SdServiceModule\r\n ],\r\n declarations: [\r\n ],\r\n exports: [\r\n SdChartModule,\r\n SdKonvaModule,\r\n SdGridMaterialModule,\r\n SdEditorModule,\r\n SdUploadExcelModule,\r\n SdGridModule,\r\n SdFormModule,\r\n SdTableModule,\r\n SdServiceModule,\r\n MaterialModule,\r\n ],\r\n providers: [\r\n ]\r\n})\r\nexport class SdCoreModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkEa,cAAc;;;YA5C1B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,gBAAgB;oBAChB,kBAAkB;oBAClB,cAAc;oBACd,eAAe;oBACf,qBAAqB;oBACrB,iBAAiB;oBACjB,oBAAoB;oBACpB,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,cAAc;oBACd,eAAe;oBACf,eAAe;oBACf,oBAAoB;oBACpB,wBAAwB;oBACxB,cAAc;oBACd,kBAAkB;oBAClB,aAAa;oBACb,kBAAkB;iBACnB;gBACD,OAAO,EAAE;oBACP,gBAAgB;oBAChB,kBAAkB;oBAClB,cAAc;oBACd,eAAe;oBACf,qBAAqB;oBACrB,iBAAiB;oBACjB,oBAAoB;oBACpB,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,cAAc;oBACd,eAAe;oBACf,eAAe;oBACf,oBAAoB;oBACpB,wBAAwB;oBACxB,cAAc;oBACd,kBAAkB;oBAClB,aAAa;oBACb,kBAAkB;iBACnB;aACF;;;MCrBY,YAAY;;;YA9BxB,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,oBAAoB;oBACpB,mBAAmB;oBACnB,YAAY;oBACZ,YAAY;oBACZ,aAAa;oBACb,eAAe;iBAChB;gBACD,YAAY,EAAE,EACb;gBACD,OAAO,EAAE;oBACP,aAAa;oBACb,aAAa;oBACb,oBAAoB;oBACpB,cAAc;oBACd,mBAAmB;oBACnB,YAAY;oBACZ,YAAY;oBACZ,aAAa;oBACb,eAAe;oBACf,cAAc;iBACf;gBACD,SAAS,EAAE,EACV;aACF;;;AC3CD;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdFormModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdFormModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":34,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":35,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":36,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/modal","name":"SdModalModule","line":37,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/side-drawer","name":"SdSideDrawerModule","line":38,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/label","name":"SdLabelModule","line":39,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/upload-file","name":"SdUploadFileModule","line":40,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date","name":"SdDateModule","line":41,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/month","name":"SdMonthModule","line":42,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-full","name":"SdDateFullModule","line":43,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-range","name":"SdDateRangeModule","line":44,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-time","name":"SdDateTimeModule","line":45,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/time","name":"SdTimeModule","line":46,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":47,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/autocomplete","name":"SdAutocompleteModule","line":48,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input","name":"SdInputModule","line":49,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input-currency","name":"SdInputCurrencyModule","line":50,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input-number","name":"SdInputNumberModule","line":51,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/select","name":"SdSelectModule","line":52,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/select-editor","name":"SdSelectEditorModule","line":53,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/editor","name":"SdEditorModule","line":54,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/switch","name":"SdSwitchModule","line":55,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/radio","name":"SdRadioModule","line":56,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/chip","name":"SdChipModule","line":57,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/textarea","name":"SdTextareaModule","line":58,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/checkbox","name":"SdCheckboxModule","line":59,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/utility","name":"SdUtilityModule","line":60,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/quick-action","name":"SdQuickActionModule","line":61,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/badge","name":"SdBadgeModule","line":62,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/timeline","name":"SdTimelineModule","line":63,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/modal-resizable","name":"SdModalResizableModule","line":64,"character":4}],"declarations":[],"providers":[],"exports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":71,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":72,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":73,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/modal","name":"SdModalModule","line":74,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/side-drawer","name":"SdSideDrawerModule","line":75,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/label","name":"SdLabelModule","line":76,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/upload-file","name":"SdUploadFileModule","line":77,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-range","name":"SdDateRangeModule","line":78,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date","name":"SdDateModule","line":79,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/month","name":"SdMonthModule","line":80,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-full","name":"SdDateFullModule","line":81,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/date-time","name":"SdDateTimeModule","line":82,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/time","name":"SdTimeModule","line":83,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/button","name":"SdButtonModule","line":84,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/autocomplete","name":"SdAutocompleteModule","line":85,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input","name":"SdInputModule","line":86,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input-currency","name":"SdInputCurrencyModule","line":87,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/input-number","name":"SdInputNumberModule","line":88,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/select","name":"SdSelectModule","line":89,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/select-editor","name":"SdSelectEditorModule","line":90,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/editor","name":"SdEditorModule","line":91,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/switch","name":"SdSwitchModule","line":92,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/radio","name":"SdRadioModule","line":93,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/chip","name":"SdChipModule","line":94,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/textarea","name":"SdTextareaModule","line":95,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/checkbox","name":"SdCheckboxModule","line":96,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/utility","name":"SdUtilityModule","line":97,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/quick-action","name":"SdQuickActionModule","line":98,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/badge","name":"SdBadgeModule","line":99,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/timeline","name":"SdTimelineModule","line":100,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/modal-resizable","name":"SdModalResizableModule","line":101,"character":4}]}]}],"members":{}}},"origins":{"SdFormModule":"./src/lib/form.module"},"importAs":"@sd-angular/core/form"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdInputNumberModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SdInputNumber"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":23,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/popover","name":"SdPopoverModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":26,"character":4}],"exports":[{"__symbolic":"reference","name":"SdInputNumber"}]}]}],"members":{}},"SdInputNumber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":39,"character":1},"arguments":[{"selector":"sd-input-number","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":43,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input aria-hidden=\"true\" [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\"\r\n [sdPopoverTriggerFor]=\"null\" [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-content select=\"[sdSuffixIcon]\" matSuffix></ng-content>\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập bé hơn '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập lớn hơn '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{inlineError}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}:host ::ng-deep .mat-form-field:hover .icon-copy{opacity:1}:host ::ng-deep .mat-form-field .icon-copy{cursor:pointer;fill:rgba(0,0,0,.5);height:.9em;opacity:0;transition:opacity .2s linear;width:.9em}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"_label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3},"arguments":["label"]}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":73,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":101,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":130,"character":3}}]}],"_inlineError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":136,"character":3},"arguments":["inlineError"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":141,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":151,"character":3}}]}],"copyTooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":153,"character":3},"arguments":["copyTooltip"]}]}],"_copyable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":155,"character":3},"arguments":["copyable"]}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":160,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":161,"character":3}}]}],"sdBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":162,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":163,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":164,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":166,"character":3},"arguments":["control"]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":172,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":172,"character":16}]}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":173,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":173,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":174,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":174,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":178,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":178,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":178,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":177,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":178,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"customInlineErrorValidator":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method"}],"onCopyText":[{"__symbolic":"method"}]}}},"origins":{"SdInputNumberModule":"./src/lib/input-number.module","SdInputNumber":"./src/lib/input-number.component"},"importAs":"@sd-angular/core/input-number"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdInputNumberModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SdInputNumber"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":21,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":24,"character":4}],"exports":[{"__symbolic":"reference","name":"SdInputNumber"}]}]}],"members":{}},"SdInputNumber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":39,"character":1},"arguments":[{"selector":"sd-input-number","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":43,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input aria-hidden=\"true\" [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-content select=\"[sdSuffixIcon]\" matSuffix></ng-content>\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập bé hơn '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập lớn hơn '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{inlineError}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}:host ::ng-deep .mat-form-field:hover .icon-copy{opacity:1}:host ::ng-deep .mat-form-field .icon-copy{cursor:pointer;fill:rgba(0,0,0,.5);height:.9em;opacity:0;transition:opacity .2s linear;width:.9em}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"_label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3},"arguments":["label"]}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":73,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":75,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":101,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":130,"character":3}}]}],"_inlineError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":136,"character":3},"arguments":["inlineError"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":141,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":151,"character":3}}]}],"copyTooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":153,"character":3},"arguments":["copyTooltip"]}]}],"_copyable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":155,"character":3},"arguments":["copyable"]}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":160,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":161,"character":3}}]}],"sdBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":162,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":163,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":164,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":166,"character":3},"arguments":["control"]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":172,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":172,"character":16}]}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":173,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":173,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":174,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":174,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":178,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":178,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":178,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":177,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":178,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"customInlineErrorValidator":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method"}],"onCopyText":[{"__symbolic":"method"}]}}},"origins":{"SdInputNumberModule":"./src/lib/input-number.module","SdInputNumber":"./src/lib/input-number.component"},"importAs":"@sd-angular/core/input-number"}
|