@ptsecurity/mosaic 17.3.0 → 17.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/autocomplete-trigger.directive.d.ts +1 -0
- package/button/button.scss +14 -4
- package/checkbox/checkbox.d.ts +6 -6
- package/core/animation/animation.d.ts +2 -1
- package/core/common-behaviors/checkbox.d.ts +1 -0
- package/core/common-behaviors/index.d.ts +1 -0
- package/core/forms/index.d.ts +1 -0
- package/core/forms/validators.d.ts +22 -0
- package/core/locales/en-US.d.ts +17 -0
- package/core/locales/es-LA.d.ts +17 -0
- package/core/locales/fa-IR.d.ts +17 -0
- package/core/locales/index.d.ts +7 -0
- package/core/locales/locale-service.d.ts +175 -0
- package/core/locales/pt-BR.d.ts +17 -0
- package/core/locales/ru-RU.d.ts +17 -0
- package/core/locales/tk-TM.d.ts +64 -0
- package/core/locales/zh-CN.d.ts +17 -0
- package/core/pop-up/constants.d.ts +9 -0
- package/core/pop-up/pop-up-trigger.d.ts +25 -9
- package/core/pop-up/pop-up.d.ts +3 -3
- package/core/styles/theming/_theming.scss +1 -0
- package/datepicker/calendar-header.component.d.ts +11 -5
- package/datepicker/datepicker-input.directive.d.ts +10 -0
- package/dropdown/dropdown-trigger.directive.d.ts +1 -1
- package/ellipsis-center/ellipsis-center.directive.d.ts +3 -7
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +13 -5
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/checkbox/checkbox.mjs +5 -5
- package/esm2022/code-block/actionbar.component.mjs +1 -1
- package/esm2022/core/animation/animation.mjs +2 -1
- package/esm2022/core/common-behaviors/checkbox.mjs +2 -0
- package/esm2022/core/common-behaviors/index.mjs +2 -1
- package/esm2022/core/forms/index.mjs +2 -1
- package/esm2022/core/forms/validators.mjs +33 -0
- package/esm2022/core/locales/en-US.mjs +19 -2
- package/esm2022/core/locales/es-LA.mjs +19 -2
- package/esm2022/core/locales/fa-IR.mjs +19 -2
- package/esm2022/core/locales/index.mjs +8 -1
- package/esm2022/core/locales/locale-service.mjs +39 -3
- package/esm2022/core/locales/pt-BR.mjs +19 -2
- package/esm2022/core/locales/ru-RU.mjs +19 -2
- package/esm2022/core/locales/tk-TM.mjs +63 -0
- package/esm2022/core/locales/zh-CN.mjs +19 -2
- package/esm2022/core/pop-up/constants.mjs +6 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +68 -21
- package/esm2022/core/pop-up/pop-up.mjs +7 -6
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +40 -10
- package/esm2022/datepicker/datepicker-input.directive.mjs +103 -23
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +2 -2
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +12 -23
- package/esm2022/file-upload/file-upload.mjs +39 -2
- package/esm2022/file-upload/file-upload.module.mjs +8 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +157 -42
- package/esm2022/file-upload/single-file-upload.component.mjs +140 -38
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/validate.directive.mjs +5 -2
- package/esm2022/input/input-number.mjs +31 -59
- package/esm2022/input/input-password.mjs +15 -26
- package/esm2022/input/input.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +10 -8
- package/esm2022/modal/modal.component.mjs +3 -3
- package/esm2022/modal/modal.directive.mjs +38 -7
- package/esm2022/navbar/navbar-item.component.mjs +16 -30
- package/esm2022/popover/popover-confirm.component.mjs +11 -20
- package/esm2022/popover/popover.component.mjs +27 -29
- package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
- package/esm2022/select/select-option.directive.mjs +7 -18
- package/esm2022/select/select.component.mjs +9 -6
- package/esm2022/sidebar/sidebar.component.mjs +10 -6
- package/esm2022/tabs/tab-group.component.mjs +1 -1
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/timezone/timezone-option.directive.mjs +7 -18
- package/esm2022/title/title.directive.mjs +7 -18
- package/esm2022/toggle/toggle.component.mjs +103 -18
- package/esm2022/tooltip/tooltip.component.mjs +72 -45
- package/esm2022/tree-select/tree-select.component.mjs +8 -6
- package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +12 -4
- package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-checkbox.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-checkbox.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-code-block.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-core.mjs +322 -36
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs +141 -31
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-dropdown.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +11 -19
- package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs +327 -73
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-form-field.mjs +9 -6
- package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-input.mjs +39 -75
- package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +10 -8
- package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-modal.mjs +32 -7
- package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-navbar.mjs +14 -26
- package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-popover.mjs +33 -39
- package/fesm2022/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-select.mjs +25 -28
- package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-sidebar.mjs +8 -4
- package/fesm2022/ptsecurity-mosaic-sidebar.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tabs.mjs +3 -3
- package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-timezone.mjs +10 -17
- package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-title.mjs +6 -14
- package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-toggle.mjs +102 -17
- package/fesm2022/ptsecurity-mosaic-toggle.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tooltip.mjs +71 -42
- package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs +7 -5
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +23 -13
- package/file-upload/file-upload.d.ts +31 -3
- package/file-upload/file-upload.module.d.ts +11 -10
- package/file-upload/file-upload.scss +8 -1
- package/file-upload/multiple-file-upload.component.d.ts +62 -10
- package/file-upload/multiple-file-upload.component.scss +0 -8
- package/file-upload/single-file-upload.component.d.ts +55 -11
- package/file-upload/single-file-upload.component.scss +0 -8
- package/form-field/form-field.d.ts +1 -1
- package/form-field/validate.directive.d.ts +5 -2
- package/input/input-number.d.ts +10 -11
- package/input/input-password.d.ts +3 -6
- package/input/input.d.ts +1 -1
- package/loader-overlay/loader-overlay.component.d.ts +4 -3
- package/modal/modal.directive.d.ts +4 -1
- package/navbar/navbar-item.component.d.ts +5 -7
- package/package.json +8 -8
- package/popover/popover-confirm.component.d.ts +3 -6
- package/popover/popover.component.d.ts +9 -6
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/progress-spinner/progress-spinner.scss +1 -0
- package/select/select-option.directive.d.ts +3 -6
- package/sidebar/sidebar.component.d.ts +3 -2
- package/tabs/tab-header.scss +2 -2
- package/timezone/timezone-option.directive.d.ts +3 -6
- package/title/title.directive.d.ts +3 -6
- package/toggle/_toggle-theme.scss +7 -1
- package/toggle/toggle.component.d.ts +23 -6
- package/toggle/toggle.scss +23 -0
- package/tooltip/tooltip.component.d.ts +25 -13
@@ -1,4 +1,3 @@
|
|
1
|
-
import * as i3$1 from '@angular/cdk/a11y';
|
2
1
|
import { A11yModule } from '@angular/cdk/a11y';
|
3
2
|
import { CommonModule } from '@angular/common';
|
4
3
|
import * as i0 from '@angular/core';
|
@@ -6,21 +5,21 @@ import { forwardRef, EventEmitter, Directive, Attribute, Optional, Inject, Input
|
|
6
5
|
import * as i1 from '@angular/forms';
|
7
6
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormsModule } from '@angular/forms';
|
8
7
|
import * as i3 from '@ptsecurity/mosaic/core';
|
9
|
-
import { MC_LOCALE_SERVICE, mixinErrorState, PopUpTriggers, McCommonModule } from '@ptsecurity/mosaic/core';
|
8
|
+
import { ruRULocaleData, checkAndNormalizeLocalizedNumber, normalizeNumber, MC_LOCALE_SERVICE, mixinErrorState, PopUpTriggers, McCommonModule } from '@ptsecurity/mosaic/core';
|
10
9
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
11
10
|
import { getSupportedInputTypes } from '@angular/cdk/platform';
|
12
|
-
import * as
|
11
|
+
import * as i1$1 from '@ptsecurity/mosaic/form-field';
|
13
12
|
import { McFormFieldControl } from '@ptsecurity/mosaic/form-field';
|
14
|
-
import { Subject
|
13
|
+
import { Subject } from 'rxjs';
|
14
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
15
15
|
import { A, C, V, X, Z, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, isFunctionKey, isNumberKey, isNumpadKey, UP_ARROW, DOWN_ARROW } from '@ptsecurity/cdk/keycodes';
|
16
|
-
import
|
17
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
18
|
-
import { McTooltipTrigger, MC_TOOLTIP_SCROLL_STRATEGY } from '@ptsecurity/mosaic/tooltip';
|
16
|
+
import { McTooltipTrigger } from '@ptsecurity/mosaic/tooltip';
|
19
17
|
|
20
18
|
function getMcInputUnsupportedTypeError(inputType) {
|
21
19
|
return Error(`Input type "${inputType}" isn't supported by mcInput.`);
|
22
20
|
}
|
23
21
|
|
22
|
+
const MC_INPUT_NUMBER_DEFAULT_CONFIGURATION = ruRULocaleData['ru-RU'].input.number;
|
24
23
|
const BIG_STEP = 10;
|
25
24
|
const SMALL_STEP = 1;
|
26
25
|
// TODO: подставлять локализованный сплиттер
|
@@ -103,20 +102,18 @@ class McNumberInput {
|
|
103
102
|
this.withThousandSeparator = true;
|
104
103
|
this._disabled = false;
|
105
104
|
this.focused = false;
|
106
|
-
this.localeSubscription = Subscription.EMPTY;
|
107
105
|
// tslint:disable-next-line:no-empty
|
108
106
|
this.onTouched = () => { };
|
109
107
|
// tslint:disable-next-line:no-empty
|
110
108
|
this.cvaOnChange = () => { };
|
111
|
-
this.updateLocaleParams = (
|
112
|
-
this.
|
109
|
+
this.updateLocaleParams = () => {
|
110
|
+
this.config = this.localeService.getParams('input').number;
|
113
111
|
this.setViewValue(this.formatNumber(this.value));
|
114
112
|
};
|
115
113
|
this.step = isDigit(step) ? parseFloat(step) : SMALL_STEP;
|
116
114
|
this.bigStep = isDigit(bigStep) ? parseFloat(bigStep) : BIG_STEP;
|
117
115
|
this.min = isDigit(min) ? parseFloat(min) : -Infinity;
|
118
116
|
this.max = isDigit(max) ? parseFloat(max) : Infinity;
|
119
|
-
setTimeout(() => this.nativeElement.type = 'text', 0);
|
120
117
|
if ('valueAsNumber' in this.nativeElement) {
|
121
118
|
/* переделать алгоритм */
|
122
119
|
Object.defineProperty(Object.getPrototypeOf(this.nativeElement), 'valueAsNumber', {
|
@@ -127,14 +124,12 @@ class McNumberInput {
|
|
127
124
|
}
|
128
125
|
});
|
129
126
|
}
|
130
|
-
this.
|
131
|
-
|
132
|
-
|
133
|
-
}
|
134
|
-
this.localeSubscription = this.localeService.changes.subscribe(this.updateLocaleParams);
|
127
|
+
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
|
128
|
+
if (!localeService) {
|
129
|
+
this.initDefaultParams();
|
130
|
+
}
|
135
131
|
}
|
136
132
|
ngOnDestroy() {
|
137
|
-
this.localeSubscription.unsubscribe();
|
138
133
|
this.valueChange.complete();
|
139
134
|
this.disabledChange.complete();
|
140
135
|
}
|
@@ -174,8 +169,8 @@ class McNumberInput {
|
|
174
169
|
const isCtrlV = (e) => e.keyCode === V && (e.ctrlKey || e.metaKey);
|
175
170
|
const isCtrlX = (e) => e.keyCode === X && (e.ctrlKey || e.metaKey);
|
176
171
|
const isCtrlZ = (e) => e.keyCode === Z && (e.ctrlKey || e.metaKey);
|
177
|
-
const isPeriod = (e) => this.
|
178
|
-
|| [this.
|
172
|
+
const isPeriod = (e) => this.config.groupSeparator.includes(e.key)
|
173
|
+
|| [this.config.fractionSeparator, '.'].includes(e.key);
|
179
174
|
const minuses = [NUMPAD_MINUS, DASH, FF_MINUS];
|
180
175
|
const serviceKeys = [DELETE, BACKSPACE, TAB, ESCAPE, ENTER];
|
181
176
|
const arrows = [LEFT_ARROW, RIGHT_ARROW];
|
@@ -186,8 +181,8 @@ class McNumberInput {
|
|
186
181
|
return;
|
187
182
|
}
|
188
183
|
if (isPeriod(event)) {
|
189
|
-
if (event.key === this.
|
190
|
-
this.viewValue.indexOf(this.
|
184
|
+
if (event.key === this.config.fractionSeparator &&
|
185
|
+
this.viewValue.indexOf(this.config.fractionSeparator) !== -1) {
|
191
186
|
event.preventDefault();
|
192
187
|
return;
|
193
188
|
}
|
@@ -243,7 +238,7 @@ class McNumberInput {
|
|
243
238
|
});
|
244
239
|
}
|
245
240
|
onPaste(event) {
|
246
|
-
this.valueFromPaste =
|
241
|
+
this.valueFromPaste = checkAndNormalizeLocalizedNumber(event.clipboardData?.getData('text'));
|
247
242
|
if (this.valueFromPaste === null) {
|
248
243
|
event.preventDefault();
|
249
244
|
}
|
@@ -264,6 +259,9 @@ class McNumberInput {
|
|
264
259
|
this.cvaOnChange(res);
|
265
260
|
this.valueChange.emit(res);
|
266
261
|
}
|
262
|
+
initDefaultParams() {
|
263
|
+
this.config = MC_INPUT_NUMBER_DEFAULT_CONFIGURATION;
|
264
|
+
}
|
267
265
|
setViewValue(value, savePosition = false) {
|
268
266
|
const cursorPosition = this.nativeElement.selectionStart;
|
269
267
|
this.renderer.setProperty(this.nativeElement, 'value', value);
|
@@ -273,7 +271,7 @@ class McNumberInput {
|
|
273
271
|
}
|
274
272
|
}
|
275
273
|
viewToModelUpdate(newValue) {
|
276
|
-
const normalizedValue = newValue === null ? null : +
|
274
|
+
const normalizedValue = newValue === null ? null : +normalizeNumber(newValue, this.config);
|
277
275
|
if (normalizedValue !== this.value) {
|
278
276
|
this._value = normalizedValue;
|
279
277
|
this.cvaOnChange(normalizedValue);
|
@@ -282,15 +280,15 @@ class McNumberInput {
|
|
282
280
|
this.ngControl?.updateValueAndValidity({ emitEvent: false });
|
283
281
|
}
|
284
282
|
formatViewValue() {
|
285
|
-
if (this.viewValue === null || this.viewValue === '' || Number.isNaN(+
|
283
|
+
if (this.viewValue === null || this.viewValue === '' || Number.isNaN(+normalizeNumber(this.viewValue, this.config))) {
|
286
284
|
return null;
|
287
285
|
}
|
288
|
-
const separator = this.
|
289
|
-
&& this.
|
286
|
+
const separator = this.config.groupSeparator.includes(' ')
|
287
|
+
&& this.config.fractionSeparator === ','
|
290
288
|
? /[,.]/
|
291
|
-
: this.
|
289
|
+
: this.config.fractionSeparator;
|
292
290
|
const [intPart, fractionPart] = this.viewValue.split(separator)
|
293
|
-
.map((valuePart) =>
|
291
|
+
.map((valuePart) => normalizeNumber(valuePart, this.config));
|
294
292
|
return this.createLocalizedNumberFromParts(+intPart, fractionPart);
|
295
293
|
}
|
296
294
|
formatNumber(value) {
|
@@ -305,55 +303,26 @@ class McNumberInput {
|
|
305
303
|
useGrouping: this.withThousandSeparator,
|
306
304
|
maximumFractionDigits: 20
|
307
305
|
};
|
308
|
-
if (this.withThousandSeparator && this.
|
306
|
+
if (this.withThousandSeparator && this.config.startFormattingFrom) {
|
309
307
|
formatOptions.useGrouping = intPart >= Math.pow(
|
310
308
|
// tslint:disable-next-line:no-magic-numbers
|
311
|
-
10, this.
|
309
|
+
10, this.config.startFormattingFrom);
|
312
310
|
}
|
313
|
-
const localeId = this.localeService.id === 'es-LA' ? 'ru-RU' : this.localeService.id;
|
311
|
+
const localeId = !this.localeService || this.localeService?.id === 'es-LA' ? 'ru-RU' : this.localeService.id;
|
314
312
|
const formatter = new Intl.NumberFormat(localeId, formatOptions);
|
315
313
|
const formattedFractionPart = fractionPart?.split('')
|
316
314
|
.map((numChar) => formatter.format(+numChar)).join('');
|
317
315
|
return formattedFractionPart === undefined
|
318
316
|
? formatter.format(intPart)
|
319
|
-
: `${formatter.format(intPart)}${this.
|
320
|
-
}
|
321
|
-
/**
|
322
|
-
* Method that returns a string representation of a number without localized separators
|
323
|
-
*/
|
324
|
-
normalizeNumber(value, customConfig) {
|
325
|
-
if (value === null || value === undefined) {
|
326
|
-
return '';
|
327
|
-
}
|
328
|
-
const { groupSeparator, fractionSeparator } = customConfig || this.numberLocaleConfig;
|
329
|
-
const groupSeparatorRegexp = new RegExp(`[${groupSeparator.join('')}]`, 'g');
|
330
|
-
const fractionSeparatorRegexp = new RegExp(`\\${fractionSeparator}`, 'g');
|
331
|
-
return value.toString()
|
332
|
-
.replace(groupSeparatorRegexp, '')
|
333
|
-
.replace(fractionSeparatorRegexp, '.');
|
334
|
-
}
|
335
|
-
checkAndNormalizeLocalizedNumber(num) {
|
336
|
-
if (num === null || num === undefined) {
|
337
|
-
return null;
|
338
|
-
}
|
339
|
-
/* if some locale input config satisfies pasted number, try to normalise with selected locale config */
|
340
|
-
let numberOutput = null;
|
341
|
-
for (const { config } of this.allNumberLocaleConfigs) {
|
342
|
-
const normalized = +this.normalizeNumber(num, config);
|
343
|
-
if (!Number.isNaN(normalized)) {
|
344
|
-
numberOutput = normalized;
|
345
|
-
break;
|
346
|
-
}
|
347
|
-
}
|
348
|
-
return numberOutput;
|
317
|
+
: `${formatter.format(intPart)}${this.config.fractionSeparator}${formattedFractionPart}`;
|
349
318
|
}
|
350
319
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McNumberInput, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: 'step', attribute: true }, { token: 'big-step', attribute: true }, { token: 'min', attribute: true }, { token: 'max', attribute: true }, { token: MC_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
351
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: McNumberInput, selector: "input[
|
320
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: McNumberInput, selector: "input[mcNumberInput]", inputs: { bigStep: "bigStep", step: "step", min: "min", max: "max", withThousandSeparator: "withThousandSeparator", startFormattingFrom: "startFormattingFrom", value: "value", disabled: "disabled" }, host: { listeners: { "blur": "focusChanged(false)", "focus": "focusChanged(true)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)", "input": "onInput($event)" } }, providers: [MC_NUMBER_INPUT_VALUE_ACCESSOR], exportAs: ["mcNumericalInput"], ngImport: i0 }); }
|
352
321
|
}
|
353
322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McNumberInput, decorators: [{
|
354
323
|
type: Directive,
|
355
324
|
args: [{
|
356
|
-
selector: `input[
|
325
|
+
selector: `input[mcNumberInput]`,
|
357
326
|
exportAs: 'mcNumericalInput',
|
358
327
|
providers: [MC_NUMBER_INPUT_VALUE_ACCESSOR],
|
359
328
|
host: {
|
@@ -613,14 +582,14 @@ class McInput extends McInputMixinBase {
|
|
613
582
|
return validity?.badInput;
|
614
583
|
}
|
615
584
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McInput, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: McNumberInput, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MC_INPUT_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
616
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: McInput, selector: "input[mcInput]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", type: "type", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)" }, properties: { "attr.id": "id", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "mc-input" }, providers: [{
|
585
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: McInput, selector: "input[mcInput],input[mcNumberInput]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", type: "type", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)" }, properties: { "attr.id": "id", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "mc-input" }, providers: [{
|
617
586
|
provide: McFormFieldControl, useExisting: McInput
|
618
587
|
}], exportAs: ["mcInput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
619
588
|
}
|
620
589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McInput, decorators: [{
|
621
590
|
type: Directive,
|
622
591
|
args: [{
|
623
|
-
selector: `input[mcInput]`,
|
592
|
+
selector: `input[mcInput],input[mcNumberInput]`,
|
624
593
|
exportAs: 'mcInput',
|
625
594
|
host: {
|
626
595
|
class: 'mc-input',
|
@@ -800,8 +769,8 @@ class McPasswordToggle extends McTooltipTrigger {
|
|
800
769
|
get visibility() {
|
801
770
|
return this.disabled && this.formField.control.empty ? 'hidden' : 'visible';
|
802
771
|
}
|
803
|
-
constructor(
|
804
|
-
super(
|
772
|
+
constructor(formField) {
|
773
|
+
super();
|
805
774
|
this.formField = formField;
|
806
775
|
this._tabIndex = 0;
|
807
776
|
this.trigger = `${PopUpTriggers.Hover}`;
|
@@ -833,7 +802,7 @@ class McPasswordToggle extends McTooltipTrigger {
|
|
833
802
|
stopFocusMonitor() {
|
834
803
|
this.focusMonitor.stopMonitoring(this.elementRef);
|
835
804
|
}
|
836
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McPasswordToggle, deps: [{ token: i1$1.
|
805
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McPasswordToggle, deps: [{ token: i1$1.McFormField }], target: i0.ɵɵFactoryTarget.Component }); }
|
837
806
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: McPasswordToggle, selector: "mc-password-toggle", inputs: { content: ["mcTooltipNotHidden", "content"], mcTooltipHidden: "mcTooltipHidden", disabled: "disabled", tabIndex: "tabIndex" }, host: { listeners: { "click": "toggle()", "keydown.ENTER": "toggle()", "keydown.SPACE": "toggle()" }, properties: { "class.mc-eye_16": "hidden", "class.mc-eye-crossed_16": "!hidden", "style.visibility": "visibility", "attr.tabindex": "disabled ? null : tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-password-toggle mc" }, exportAs: ["mcPasswordToggle"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
838
807
|
}
|
839
808
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McPasswordToggle, decorators: [{
|
@@ -856,12 +825,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
856
825
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
857
826
|
encapsulation: ViewEncapsulation.None
|
858
827
|
}]
|
859
|
-
}], ctorParameters: () => [{ type: i1$1.
|
860
|
-
type: Inject,
|
861
|
-
args: [MC_TOOLTIP_SCROLL_STRATEGY]
|
862
|
-
}] }, { type: i2.Directionality, decorators: [{
|
863
|
-
type: Optional
|
864
|
-
}] }, { type: i3$1.FocusMonitor }, { type: i4.McFormField }], propDecorators: { content: [{
|
828
|
+
}], ctorParameters: () => [{ type: i1$1.McFormField }], propDecorators: { content: [{
|
865
829
|
type: Input,
|
866
830
|
args: ['mcTooltipNotHidden']
|
867
831
|
}], mcTooltipHidden: [{
|
@@ -1149,5 +1113,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
1149
1113
|
* Generated bundle index. Do not edit.
|
1150
1114
|
*/
|
1151
1115
|
|
1152
|
-
export { BIG_STEP, MAX_VALIDATOR, MC_INPUT_VALUE_ACCESSOR, MC_NUMBER_INPUT_VALUE_ACCESSOR, MIN_VALIDATOR, MaxValidator, McInput, McInputBase, McInputMixinBase, McInputModule, McInputMono, McInputPassword, McNumberInput, McPasswordToggle, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
|
1116
|
+
export { BIG_STEP, MAX_VALIDATOR, MC_INPUT_NUMBER_DEFAULT_CONFIGURATION, MC_INPUT_VALUE_ACCESSOR, MC_NUMBER_INPUT_VALUE_ACCESSOR, MIN_VALIDATOR, MaxValidator, McInput, McInputBase, McInputMixinBase, McInputModule, McInputMono, McInputPassword, McNumberInput, McPasswordToggle, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
|
1153
1117
|
//# sourceMappingURL=ptsecurity-mosaic-input.mjs.map
|