@ptsecurity/mosaic 17.3.0 → 17.5.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.
Files changed (161) hide show
  1. package/autocomplete/autocomplete-trigger.directive.d.ts +1 -0
  2. package/button/button.scss +14 -4
  3. package/checkbox/checkbox.d.ts +6 -6
  4. package/core/animation/animation.d.ts +2 -1
  5. package/core/common-behaviors/checkbox.d.ts +1 -0
  6. package/core/common-behaviors/index.d.ts +1 -0
  7. package/core/forms/index.d.ts +1 -0
  8. package/core/forms/validators.d.ts +22 -0
  9. package/core/locales/en-US.d.ts +17 -0
  10. package/core/locales/es-LA.d.ts +17 -0
  11. package/core/locales/fa-IR.d.ts +17 -0
  12. package/core/locales/index.d.ts +7 -0
  13. package/core/locales/locale-service.d.ts +175 -0
  14. package/core/locales/pt-BR.d.ts +17 -0
  15. package/core/locales/ru-RU.d.ts +17 -0
  16. package/core/locales/tk-TM.d.ts +64 -0
  17. package/core/locales/zh-CN.d.ts +17 -0
  18. package/core/pop-up/constants.d.ts +9 -0
  19. package/core/pop-up/pop-up-trigger.d.ts +28 -10
  20. package/core/pop-up/pop-up.d.ts +3 -3
  21. package/core/styles/theming/_theming.scss +1 -0
  22. package/datepicker/calendar-header.component.d.ts +11 -5
  23. package/datepicker/datepicker-input.directive.d.ts +10 -0
  24. package/dropdown/dropdown-trigger.directive.d.ts +1 -1
  25. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -7
  26. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +13 -5
  27. package/esm2022/button/button.component.mjs +2 -2
  28. package/esm2022/checkbox/checkbox.mjs +5 -5
  29. package/esm2022/code-block/actionbar.component.mjs +1 -1
  30. package/esm2022/core/animation/animation.mjs +2 -1
  31. package/esm2022/core/common-behaviors/checkbox.mjs +2 -0
  32. package/esm2022/core/common-behaviors/index.mjs +2 -1
  33. package/esm2022/core/forms/index.mjs +2 -1
  34. package/esm2022/core/forms/validators.mjs +33 -0
  35. package/esm2022/core/locales/en-US.mjs +19 -2
  36. package/esm2022/core/locales/es-LA.mjs +19 -2
  37. package/esm2022/core/locales/fa-IR.mjs +19 -2
  38. package/esm2022/core/locales/index.mjs +8 -1
  39. package/esm2022/core/locales/locale-service.mjs +39 -3
  40. package/esm2022/core/locales/pt-BR.mjs +19 -2
  41. package/esm2022/core/locales/ru-RU.mjs +19 -2
  42. package/esm2022/core/locales/tk-TM.mjs +63 -0
  43. package/esm2022/core/locales/zh-CN.mjs +19 -2
  44. package/esm2022/core/pop-up/constants.mjs +6 -1
  45. package/esm2022/core/pop-up/pop-up-trigger.mjs +72 -23
  46. package/esm2022/core/pop-up/pop-up.mjs +7 -6
  47. package/esm2022/core/version.mjs +2 -2
  48. package/esm2022/datepicker/calendar-header.component.mjs +40 -10
  49. package/esm2022/datepicker/datepicker-input.directive.mjs +103 -23
  50. package/esm2022/dropdown/dropdown-trigger.directive.mjs +2 -2
  51. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +12 -23
  52. package/esm2022/file-upload/file-upload.mjs +39 -2
  53. package/esm2022/file-upload/file-upload.module.mjs +8 -1
  54. package/esm2022/file-upload/multiple-file-upload.component.mjs +159 -46
  55. package/esm2022/file-upload/single-file-upload.component.mjs +141 -41
  56. package/esm2022/form-field/form-field.mjs +6 -6
  57. package/esm2022/form-field/validate.directive.mjs +5 -2
  58. package/esm2022/input/input-number.mjs +31 -59
  59. package/esm2022/input/input-password.mjs +15 -26
  60. package/esm2022/input/input.mjs +3 -3
  61. package/esm2022/loader-overlay/loader-overlay.component.mjs +10 -8
  62. package/esm2022/modal/modal.component.mjs +3 -3
  63. package/esm2022/modal/modal.directive.mjs +38 -7
  64. package/esm2022/navbar/navbar-item.component.mjs +16 -30
  65. package/esm2022/popover/popover-confirm.component.mjs +11 -20
  66. package/esm2022/popover/popover.component.mjs +52 -29
  67. package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
  68. package/esm2022/select/select-option.directive.mjs +7 -18
  69. package/esm2022/select/select.component.mjs +9 -6
  70. package/esm2022/sidebar/sidebar.component.mjs +10 -6
  71. package/esm2022/tabs/tab-group.component.mjs +1 -1
  72. package/esm2022/tabs/tab-header.component.mjs +2 -2
  73. package/esm2022/tabs/tab.component.mjs +3 -4
  74. package/esm2022/textarea/textarea.component.mjs +8 -4
  75. package/esm2022/timezone/timezone-option.directive.mjs +7 -18
  76. package/esm2022/title/title.directive.mjs +7 -18
  77. package/esm2022/toggle/toggle.component.mjs +103 -18
  78. package/esm2022/tooltip/tooltip.component.mjs +72 -45
  79. package/esm2022/tree-select/tree-select.component.mjs +9 -7
  80. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +12 -4
  81. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  82. package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
  83. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  84. package/fesm2022/ptsecurity-mosaic-checkbox.mjs +4 -4
  85. package/fesm2022/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  86. package/fesm2022/ptsecurity-mosaic-code-block.mjs +1 -1
  87. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  88. package/fesm2022/ptsecurity-mosaic-core.mjs +325 -37
  89. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  90. package/fesm2022/ptsecurity-mosaic-datepicker.mjs +141 -31
  91. package/fesm2022/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  92. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +1 -1
  93. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  94. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +11 -19
  95. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
  96. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +330 -80
  97. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  98. package/fesm2022/ptsecurity-mosaic-form-field.mjs +9 -6
  99. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  100. package/fesm2022/ptsecurity-mosaic-input.mjs +39 -75
  101. package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
  102. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +10 -8
  103. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  104. package/fesm2022/ptsecurity-mosaic-modal.mjs +32 -7
  105. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  106. package/fesm2022/ptsecurity-mosaic-navbar.mjs +14 -26
  107. package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
  108. package/fesm2022/ptsecurity-mosaic-popover.mjs +58 -40
  109. package/fesm2022/ptsecurity-mosaic-popover.mjs.map +1 -1
  110. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +2 -2
  111. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  112. package/fesm2022/ptsecurity-mosaic-select.mjs +25 -28
  113. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  114. package/fesm2022/ptsecurity-mosaic-sidebar.mjs +8 -4
  115. package/fesm2022/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  116. package/fesm2022/ptsecurity-mosaic-tabs.mjs +5 -6
  117. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
  118. package/fesm2022/ptsecurity-mosaic-textarea.mjs +7 -3
  119. package/fesm2022/ptsecurity-mosaic-textarea.mjs.map +1 -1
  120. package/fesm2022/ptsecurity-mosaic-timezone.mjs +10 -17
  121. package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
  122. package/fesm2022/ptsecurity-mosaic-title.mjs +6 -14
  123. package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
  124. package/fesm2022/ptsecurity-mosaic-toggle.mjs +102 -17
  125. package/fesm2022/ptsecurity-mosaic-toggle.mjs.map +1 -1
  126. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +71 -42
  127. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  128. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +8 -6
  129. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  130. package/file-upload/_file-upload-theme.scss +23 -13
  131. package/file-upload/file-upload.d.ts +31 -3
  132. package/file-upload/file-upload.module.d.ts +11 -10
  133. package/file-upload/file-upload.scss +8 -1
  134. package/file-upload/multiple-file-upload.component.d.ts +62 -10
  135. package/file-upload/multiple-file-upload.component.scss +0 -8
  136. package/file-upload/single-file-upload.component.d.ts +55 -11
  137. package/file-upload/single-file-upload.component.scss +0 -8
  138. package/form-field/form-field.d.ts +1 -1
  139. package/form-field/validate.directive.d.ts +5 -2
  140. package/input/input-number.d.ts +10 -11
  141. package/input/input-password.d.ts +3 -6
  142. package/input/input.d.ts +1 -1
  143. package/loader-overlay/loader-overlay.component.d.ts +4 -3
  144. package/modal/modal.directive.d.ts +4 -1
  145. package/navbar/navbar-item.component.d.ts +5 -7
  146. package/package.json +24 -27
  147. package/popover/popover-confirm.component.d.ts +3 -6
  148. package/popover/popover.component.d.ts +14 -7
  149. package/prebuilt-themes/dark-theme.css +1 -1
  150. package/prebuilt-themes/default-theme.css +1 -1
  151. package/progress-spinner/progress-spinner.scss +1 -0
  152. package/select/select-option.directive.d.ts +3 -6
  153. package/sidebar/sidebar.component.d.ts +3 -2
  154. package/tabs/tab-header.scss +2 -2
  155. package/textarea/textarea.component.d.ts +1 -0
  156. package/timezone/timezone-option.directive.d.ts +3 -6
  157. package/title/title.directive.d.ts +3 -6
  158. package/toggle/_toggle-theme.scss +7 -1
  159. package/toggle/toggle.component.d.ts +23 -6
  160. package/toggle/toggle.scss +23 -0
  161. 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 i4 from '@ptsecurity/mosaic/form-field';
11
+ import * as i1$1 from '@ptsecurity/mosaic/form-field';
13
12
  import { McFormFieldControl } from '@ptsecurity/mosaic/form-field';
14
- import { Subject, Subscription } from 'rxjs';
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 * as i2 from '@angular/cdk/bidi';
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 = (id) => {
112
- this.numberLocaleConfig = this.localeService.locales[id].input.number;
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.allNumberLocaleConfigs = this.localeService.locales.items
131
- .map((localeItem) => {
132
- return { id: localeItem.id, config: this.localeService.locales[localeItem.id].input.number };
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.numberLocaleConfig.groupSeparator.includes(e.key)
178
- || [this.numberLocaleConfig.fractionSeparator, '.'].includes(e.key);
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.numberLocaleConfig.fractionSeparator &&
190
- this.viewValue.indexOf(this.numberLocaleConfig.fractionSeparator) !== -1) {
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 = this.checkAndNormalizeLocalizedNumber(event.clipboardData?.getData('text'));
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 : +this.normalizeNumber(newValue);
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(+this.normalizeNumber(this.viewValue))) {
283
+ if (this.viewValue === null || this.viewValue === '' || Number.isNaN(+normalizeNumber(this.viewValue, this.config))) {
286
284
  return null;
287
285
  }
288
- const separator = this.numberLocaleConfig.groupSeparator.includes(' ')
289
- && this.numberLocaleConfig.fractionSeparator === ','
286
+ const separator = this.config.groupSeparator.includes(' ')
287
+ && this.config.fractionSeparator === ','
290
288
  ? /[,.]/
291
- : this.numberLocaleConfig.fractionSeparator;
289
+ : this.config.fractionSeparator;
292
290
  const [intPart, fractionPart] = this.viewValue.split(separator)
293
- .map((valuePart) => this.normalizeNumber(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.numberLocaleConfig.startFormattingFrom) {
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.numberLocaleConfig.startFormattingFrom);
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.numberLocaleConfig.fractionSeparator}${formattedFractionPart}`;
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[mcInput][type=\"number\"]", 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 }); }
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[mcInput][type="number"]`,
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(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor, formField) {
804
- super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor);
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.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i1$1.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: MC_TOOLTIP_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: i3$1.FocusMonitor }, { token: i4.McFormField }], target: i0.ɵɵFactoryTarget.Component }); }
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.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
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