@taiga-ui/cdk 2.47.0 → 2.48.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 (79) hide show
  1. package/abstract/controller.d.ts +6 -0
  2. package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
  3. package/bundles/taiga-ui-cdk-abstract.umd.js +12 -0
  4. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-abstract.umd.min.js +1 -1
  6. package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +96 -35
  8. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
  9. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js +1 -1
  10. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
  11. package/bundles/taiga-ui-cdk-enums.umd.js +12 -0
  12. package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-enums.umd.min.js +1 -1
  14. package/bundles/taiga-ui-cdk-enums.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-utils-browser.umd.js +2 -2
  16. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  17. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js +1 -1
  18. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-cdk-utils-focus.umd.js +1 -1
  20. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  21. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js +1 -1
  22. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
  23. package/directives/auto-focus/autofocus.options.d.ts +1 -1
  24. package/directives/auto-focus/handlers/ios.handler.d.ts +26 -1
  25. package/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.metadata.json +1 -1
  26. package/enums/autocomplete.d.ts +10 -0
  27. package/enums/taiga-ui-cdk-enums.metadata.json +1 -1
  28. package/esm2015/abstract/controller.js +7 -1
  29. package/esm2015/directives/auto-focus/autofocus.options.js +7 -6
  30. package/esm2015/directives/auto-focus/handlers/ios.handler.js +80 -29
  31. package/esm2015/enums/autocomplete.js +12 -1
  32. package/esm2015/utils/browser/is-edge-older-than.js +2 -2
  33. package/esm2015/utils/browser/is-safari.js +2 -2
  34. package/esm2015/utils/focus/get-native-focused.js +2 -2
  35. package/esm5/abstract/controller.js +14 -1
  36. package/esm5/directives/auto-focus/autofocus.options.js +7 -6
  37. package/esm5/directives/auto-focus/handlers/ios.handler.js +92 -30
  38. package/esm5/enums/autocomplete.js +12 -1
  39. package/esm5/utils/browser/is-edge-older-than.js +2 -2
  40. package/esm5/utils/browser/is-safari.js +2 -2
  41. package/esm5/utils/focus/get-native-focused.js +2 -2
  42. package/fesm2015/taiga-ui-cdk-abstract.js +7 -1
  43. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  44. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +84 -33
  45. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  46. package/fesm2015/taiga-ui-cdk-enums.js +11 -0
  47. package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
  48. package/fesm2015/taiga-ui-cdk-utils-browser.js +2 -2
  49. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  50. package/fesm2015/taiga-ui-cdk-utils-focus.js +1 -1
  51. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  52. package/fesm5/taiga-ui-cdk-abstract.js +12 -1
  53. package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
  54. package/fesm5/taiga-ui-cdk-directives-auto-focus.js +96 -34
  55. package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  56. package/fesm5/taiga-ui-cdk-enums.js +11 -0
  57. package/fesm5/taiga-ui-cdk-enums.js.map +1 -1
  58. package/fesm5/taiga-ui-cdk-utils-browser.js +2 -2
  59. package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
  60. package/fesm5/taiga-ui-cdk-utils-focus.js +1 -1
  61. package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
  62. package/package.json +1 -1
  63. package/schematics/ng-update/constants/consts.js +28 -0
  64. package/schematics/ng-update/constants/enums.js +22 -0
  65. package/schematics/ng-update/constants/services.d.ts +8 -0
  66. package/schematics/ng-update/constants/services.js +43 -0
  67. package/schematics/ng-update/constants/types.d.ts +1 -0
  68. package/schematics/ng-update/constants/types.js +29 -0
  69. package/schematics/ng-update/constants/warnings.js +22 -0
  70. package/schematics/ng-update/index.js +2 -0
  71. package/schematics/ng-update/steps/rename-types.js +26 -17
  72. package/schematics/ng-update/steps/replace-const.js +2 -2
  73. package/schematics/ng-update/steps/replace-enums.js +2 -2
  74. package/schematics/ng-update/steps/replace-services.d.ts +1 -0
  75. package/schematics/ng-update/steps/replace-services.js +51 -0
  76. package/schematics/ng-update/steps/show-warnings.js +26 -9
  77. package/schematics/utils/{remove-import.d.ts → import-manipulations.d.ts} +1 -0
  78. package/schematics/utils/import-manipulations.js +19 -0
  79. package/schematics/utils/remove-import.js +0 -11
@@ -1,10 +1,11 @@
1
- import { __decorate, __extends, __param } from 'tslib';
1
+ import { __decorate, __extends, __param, __values } from 'tslib';
2
2
  import { ElementRef, Directive, Optional, Self, Inject, Renderer2, NgZone, InjectionToken, inject, Input, NgModule } from '@angular/core';
3
- import { ANIMATION_FRAME } from '@ng-web-apis/common';
4
- import { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_APPLE } from '@taiga-ui/cdk/tokens';
3
+ import { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';
4
+ import { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
5
5
  import { POLLING_TIME } from '@taiga-ui/cdk/constants';
6
6
  import { race, timer, Observable } from 'rxjs';
7
7
  import { throttleTime, map, skipWhile, take } from 'rxjs/operators';
8
+ import { px } from '@taiga-ui/cdk/utils';
8
9
 
9
10
  var AbstractTuiAutofocusHandler = /** @class */ (function () {
10
11
  function AbstractTuiAutofocusHandler(tuiFocusableComponent, elementRef) {
@@ -71,12 +72,15 @@ var TuiDefaultAutofocusHandler = /** @class */ (function (_super) {
71
72
  return TuiDefaultAutofocusHandler;
72
73
  }(AbstractTuiAutofocusHandler));
73
74
 
75
+ // @dynamic
74
76
  var TuiIosAutofocusHandler = /** @class */ (function (_super) {
75
77
  __extends(TuiIosAutofocusHandler, _super);
76
- function TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone) {
78
+ function TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef) {
77
79
  var _this = _super.call(this, tuiFocusableComponent, elementRef) || this;
78
80
  _this.renderer = renderer;
79
81
  _this.ngZone = ngZone;
82
+ _this.windowRef = windowRef;
83
+ _this.patchCssStyles();
80
84
  return _this;
81
85
  }
82
86
  TuiIosAutofocusHandler.prototype.setFocus = function () {
@@ -91,43 +95,99 @@ var TuiIosAutofocusHandler = /** @class */ (function (_super) {
91
95
  TuiIosAutofocusHandler.prototype.iosWebkitAutofocus = function () {
92
96
  var _this = this;
93
97
  var _a;
94
- var fakeInput = this.renderer.createElement('input');
95
- fakeInput.style.position = 'absolute';
96
- fakeInput.style.opacity = '0';
97
- fakeInput.style.height = '0';
98
- var blurHandler = function () { return fakeInput.focus(); };
98
+ var fakeInput = this.makeFakeInput();
99
+ var duration = this.getDurationTimeBeforeFocus();
100
+ var fakeFocusTimeoutId = 0;
101
+ var elementFocusTimeoutId = 0;
102
+ var blurHandler = function () { return fakeInput.focus({ preventScroll: true }); };
99
103
  var focusHandler = function () {
100
- setTimeout(function () {
101
- _this.element.focus();
102
- /**
103
- * @note:
104
- * We can't remove the element immediately, because it breaks flow
105
- */
106
- setTimeout(function () {
107
- fakeInput.removeEventListener('blur', blurHandler);
108
- fakeInput.removeEventListener('focus', focusHandler);
104
+ clearTimeout(fakeFocusTimeoutId);
105
+ fakeFocusTimeoutId = _this.windowRef.setTimeout(function () {
106
+ clearTimeout(elementFocusTimeoutId);
107
+ fakeInput.removeEventListener('blur', blurHandler);
108
+ fakeInput.removeEventListener('focus', focusHandler);
109
+ elementFocusTimeoutId = _this.windowRef.setTimeout(function () {
110
+ _this.element.focus({ preventScroll: false });
109
111
  fakeInput.remove();
110
- });
112
+ }, duration);
111
113
  });
112
114
  };
113
- /**
114
- * @note: ping-pong eager strategy hack
115
- * After creating an element and bringing it into DOM,
116
- * the browser automatically focuses on the invisible element.
117
- * And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,
118
- * then we try to focus again on an invisible element, so that the keyboard slowly appears.
119
- * This ping pong allows the keyboard to not overlap the modal window.
120
- */
121
115
  fakeInput.addEventListener('blur', blurHandler, { once: true });
122
116
  fakeInput.addEventListener('focus', focusHandler);
123
- (_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);
124
- fakeInput.focus();
117
+ if (this.insideDialog()) {
118
+ this.windowRef.document.body.appendChild(fakeInput);
119
+ }
120
+ else {
121
+ (_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);
122
+ }
123
+ fakeInput.focus({ preventScroll: true });
124
+ };
125
+ /**
126
+ * @note:
127
+ * emulate textfield position in layout with cursor
128
+ * before focus to real textfield element
129
+ */
130
+ TuiIosAutofocusHandler.prototype.makeFakeInput = function () {
131
+ var fakeInput = this.renderer.createElement('input');
132
+ var rect = this.element.getBoundingClientRect();
133
+ fakeInput.style.height = px(rect.height);
134
+ fakeInput.style.width = px(rect.width / 2);
135
+ fakeInput.style.position = 'fixed';
136
+ fakeInput.style.opacity = '0';
137
+ fakeInput.style.fontSize = px(16); // disable possible auto zoom
138
+ fakeInput.readOnly = true; // prevent keyboard for fake input
139
+ // @note: emulate position cursor before focus to real textfield element
140
+ fakeInput.style.top = px(rect.top);
141
+ fakeInput.style.left = px(rect.left);
142
+ return fakeInput;
143
+ };
144
+ TuiIosAutofocusHandler.prototype.getDurationTimeBeforeFocus = function () {
145
+ return (parseFloat(this.windowRef
146
+ .getComputedStyle(this.element)
147
+ .getPropertyValue('--tui-duration')) || 0);
148
+ };
149
+ /**
150
+ * @note:
151
+ * unfortunately, in older versions of iOS
152
+ * there is a bug that the fake input cursor
153
+ * will move along with the dialog animation
154
+ * and then that dialog will be shaking
155
+ */
156
+ TuiIosAutofocusHandler.prototype.insideDialog = function () {
157
+ return !!this.element.closest('tui-dialog');
158
+ };
159
+ /**
160
+ * @note:
161
+ * This is necessary so that the viewport isn't recalculated
162
+ * and then the dialogs don't shake.
163
+ *
164
+ * Also, we need to fixed height viewport,
165
+ * so that when focusing the dialogs don't shake
166
+ */
167
+ TuiIosAutofocusHandler.prototype.patchCssStyles = function () {
168
+ var e_1, _a;
169
+ var documentRef = this.windowRef.document;
170
+ try {
171
+ for (var _b = __values([documentRef.documentElement, documentRef.body]), _c = _b.next(); !_c.done; _c = _b.next()) {
172
+ var element = _c.value;
173
+ element.style.setProperty('overflow', 'auto');
174
+ element.style.setProperty('height', '100%');
175
+ }
176
+ }
177
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
178
+ finally {
179
+ try {
180
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
181
+ }
182
+ finally { if (e_1) throw e_1.error; }
183
+ }
125
184
  };
126
185
  TuiIosAutofocusHandler.ctorParameters = function () { return [
127
186
  { type: undefined, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
128
187
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
129
188
  { type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
130
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] }
189
+ { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
190
+ { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
131
191
  ]; };
132
192
  TuiIosAutofocusHandler = __decorate([
133
193
  Directive(),
@@ -136,16 +196,17 @@ var TuiIosAutofocusHandler = /** @class */ (function (_super) {
136
196
  __param(0, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)),
137
197
  __param(1, Inject(ElementRef)),
138
198
  __param(2, Inject(Renderer2)),
139
- __param(3, Inject(NgZone))
199
+ __param(3, Inject(NgZone)),
200
+ __param(4, Inject(WINDOW))
140
201
  ], TuiIosAutofocusHandler);
141
202
  return TuiIosAutofocusHandler;
142
203
  }(AbstractTuiAutofocusHandler));
143
204
 
144
205
  var TUI_AUTOFOCUS_HANDLER = new InjectionToken('Autofocusing handler');
145
206
  // TODO: 3.0 remove in ivy compilation
146
- function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone) {
147
- return inject(TUI_IS_APPLE)
148
- ? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)
207
+ function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone, windowRef) {
208
+ return inject(TUI_IS_IOS)
209
+ ? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef)
149
210
  : new TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$);
150
211
  }
151
212
  var TUI_AUTOFOCUS_PROVIDERS = [
@@ -159,6 +220,7 @@ var TUI_AUTOFOCUS_PROVIDERS = [
159
220
  ANIMATION_FRAME,
160
221
  Renderer2,
161
222
  NgZone,
223
+ WINDOW,
162
224
  ],
163
225
  },
164
226
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/handlers/abstract.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/default.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/ios.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.options.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n protected readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches('input, textarea');\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus());\n } else {\n this.element.focus();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(NgZone)\n private readonly ngZone: NgZone,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus();\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLElement = this.renderer.createElement('input');\n\n fakeInput.style.position = 'absolute';\n fakeInput.style.opacity = '0';\n fakeInput.style.height = '0';\n\n const blurHandler = (): void => fakeInput.focus();\n const focusHandler = (): void => {\n setTimeout(() => {\n this.element.focus();\n\n /**\n * @note:\n * We can't remove the element immediately, because it breaks flow\n */\n setTimeout(() => {\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n fakeInput.remove();\n });\n });\n };\n\n /**\n * @note: ping-pong eager strategy hack\n * After creating an element and bringing it into DOM,\n * the browser automatically focuses on the invisible element.\n * And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,\n * then we try to focus again on an invisible element, so that the keyboard slowly appears.\n * This ping pong allows the keyboard to not overlap the modal window.\n */\n fakeInput.addEventListener('blur', blurHandler, {once: true});\n fakeInput.addEventListener('focus', focusHandler);\n\n this.element.parentElement?.appendChild(fakeInput);\n\n fakeInput.focus();\n }\n}\n","import {\n ElementRef,\n inject,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_APPLE} from '@taiga-ui/cdk/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n 'Autofocusing handler',\n);\n\n// TODO: 3.0 remove in ivy compilation\nexport function tuiAutofocusHandlerFactory(\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n elementRef: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n ngZone: NgZone,\n): TuiAutofocusHandler {\n return inject(TUI_IS_APPLE)\n ? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)\n : new TuiDefaultAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n animationFrame$,\n );\n}\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n // TODO: replace to useClass in v3.0\n useFactory: tuiAutofocusHandlerFactory,\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n ],\n },\n];\n","import {AfterViewInit, Directive, Inject, Input} from '@angular/core';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n} from './autofocus.options';\n\n// TODO: 3.0 change input name to tuiAutoFocus and handle empty string\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER) private readonly handler: TuiAutofocusHandler,\n ) {}\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n this.handler.setFocus();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAUI,qCACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,sBAAc,gDAAO;aAArB;;YACI,QACI,OAAA,IAAI,CAAC,qBAAqB,0CAAE,sBAAsB;gBAClD,IAAI,CAAC,UAAU,CAAC,aAAa,EAC/B;SACL;;;OAAA;IAED,sBAAc,2DAAkB;aAAhC;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;SAClD;;;OAAA;;;gBAZkC,UAAU;;IAH3B,2BAA2B;QADhD,SAAS,EAAE;OACU,2BAA2B,CAkBhD;IAAD,kCAAC;CAlBD;;ACCA,IAAM,OAAO,GAAG,IAAI,CAAC;AACrB,IAAM,qBAAqB,GAAG,eAAe,CAAC;;IAGE,8CAA2B;IACvE,oCAII,qBAAyD,EACrC,UAAmC,EACb,eAAmC;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;SAC3B;KACJ;;gDAPI,MAAM,SAAC,qBAAqB;;IAHjC;QADC,KAAK,EAAE;4DACS;IAFR,qBAAqB;QAJjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,uBAAuB;SACrC,CAAC;QAMO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;OALzB,qBAAqB,CAajC;IAAD,4BAAC;CAbD;;;ICLA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/handlers/abstract.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/default.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/ios.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.options.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n protected readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches('input, textarea');\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus());\n } else {\n this.element.focus();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {px} from '@taiga-ui/cdk/utils';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n// @dynamic\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(WINDOW) private readonly windowRef: Window,\n ) {\n super(tuiFocusableComponent, elementRef);\n this.patchCssStyles();\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus();\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLInputElement = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n\n const blurHandler = (): void => fakeInput.focus({preventScroll: true});\n const focusHandler = (): void => {\n clearTimeout(fakeFocusTimeoutId);\n\n fakeFocusTimeoutId = this.windowRef.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n\n elementFocusTimeoutId = this.windowRef.setTimeout(() => {\n this.element.focus({preventScroll: false});\n fakeInput.remove();\n }, duration);\n });\n };\n\n fakeInput.addEventListener('blur', blurHandler, {once: true});\n fakeInput.addEventListener('focus', focusHandler);\n\n if (this.insideDialog()) {\n this.windowRef.document.body.appendChild(fakeInput);\n } else {\n this.element.parentElement?.appendChild(fakeInput);\n }\n\n fakeInput.focus({preventScroll: true});\n }\n\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n */\n private makeFakeInput(): HTMLInputElement {\n const fakeInput: HTMLInputElement = this.renderer.createElement('input');\n const rect: DOMRect = this.element.getBoundingClientRect();\n\n fakeInput.style.height = px(rect.height);\n fakeInput.style.width = px(rect.width / 2);\n fakeInput.style.position = 'fixed';\n fakeInput.style.opacity = '0';\n fakeInput.style.fontSize = px(16); // disable possible auto zoom\n fakeInput.readOnly = true; // prevent keyboard for fake input\n\n // @note: emulate position cursor before focus to real textfield element\n fakeInput.style.top = px(rect.top);\n fakeInput.style.left = px(rect.left);\n\n return fakeInput;\n }\n\n private getDurationTimeBeforeFocus(): number {\n return (\n parseFloat(\n this.windowRef\n .getComputedStyle(this.element)\n .getPropertyValue('--tui-duration'),\n ) || 0\n );\n }\n\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n private insideDialog(): boolean {\n return !!this.element.closest('tui-dialog');\n }\n\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n private patchCssStyles(): void {\n const documentRef = this.windowRef.document;\n\n for (const element of [documentRef.documentElement, documentRef.body]) {\n element.style.setProperty('overflow', 'auto');\n element.style.setProperty('height', '100%');\n }\n }\n}\n","import {\n ElementRef,\n inject,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n 'Autofocusing handler',\n);\n\n// TODO: 3.0 remove in ivy compilation\nexport function tuiAutofocusHandlerFactory(\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n elementRef: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n ngZone: NgZone,\n windowRef: Window,\n): TuiAutofocusHandler {\n return inject(TUI_IS_IOS)\n ? new TuiIosAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n renderer,\n ngZone,\n windowRef,\n )\n : new TuiDefaultAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n animationFrame$,\n );\n}\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n // TODO: replace to useClass in v3.0\n useFactory: tuiAutofocusHandlerFactory,\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n WINDOW,\n ],\n },\n];\n","import {AfterViewInit, Directive, Inject, Input} from '@angular/core';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n} from './autofocus.options';\n\n// TODO: 3.0 change input name to tuiAutoFocus and handle empty string\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER) private readonly handler: TuiAutofocusHandler,\n ) {}\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n this.handler.setFocus();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAUI,qCACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,sBAAc,gDAAO;aAArB;;YACI,QACI,OAAA,IAAI,CAAC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AM,SAAC,qBAAqB;;IAHjC;QADC,KAAK,EAAE;4DACS;IAFR,qBAAqB;QAJjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,uBAAuB;SACrC,CAAC;QAMO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;OALzB,qBAAqB,CAajC;IAAD,4BAAC;CAbD;;;ICLA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
@@ -1,10 +1,21 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
1
2
  var TuiCreditCardAutofillName;
2
3
  (function (TuiCreditCardAutofillName) {
3
4
  TuiCreditCardAutofillName["Off"] = "off";
4
5
  TuiCreditCardAutofillName["CcName"] = "cc-name";
5
6
  TuiCreditCardAutofillName["CcNumber"] = "cc-number";
6
7
  TuiCreditCardAutofillName["CcCsc"] = "cc-csc";
8
+ TuiCreditCardAutofillName["CcExpMonth"] = "cc-exp-month";
9
+ /**
10
+ * @deprecated
11
+ * TODO: 3.0 replace with {@link CcExpMonth}
12
+ */
7
13
  TuiCreditCardAutofillName["CcExp_mounth"] = "cc-exp-month";
14
+ TuiCreditCardAutofillName["CcExpYear"] = "cc-exp-year";
15
+ /**
16
+ * @deprecated
17
+ * TODO: 3.0 replace with {@link CcExpYear}
18
+ */
8
19
  TuiCreditCardAutofillName["CcExp_year"] = "cc-exp-year";
9
20
  TuiCreditCardAutofillName["CcExp"] = "cc-exp";
10
21
  TuiCreditCardAutofillName["CcType"] = "cc-type";
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-enums.js","sources":["ng://@taiga-ui/cdk/enums/autocomplete.ts","ng://@taiga-ui/cdk/enums/day-of-week.ts","ng://@taiga-ui/cdk/enums/input-mode.ts","ng://@taiga-ui/cdk/enums/input-type.ts","ng://@taiga-ui/cdk/enums/month-number.ts","ng://@taiga-ui/cdk/enums/overscroll-mode.ts","ng://@taiga-ui/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["export const enum TuiCreditCardAutofillName {\n Off = 'off',\n CcName = 'cc-name',\n CcNumber = 'cc-number',\n CcCsc = 'cc-csc',\n CcExp_mounth = 'cc-exp-month',\n CcExp_year = 'cc-exp-year',\n CcExp = 'cc-exp',\n CcType = 'cc-type',\n}\n\nexport const enum TuiNameAutofillName {\n Off = 'off',\n Name = 'name',\n GivenName = 'given-name',\n AdditionalName = 'additional-name',\n FamilyName = 'family-name',\n}\n\nexport const enum TuiAccountAutofillName {\n Off = 'off',\n Username = 'username',\n NewPassword = 'new-password',\n CurrentPassword = 'current-password',\n}\n\nexport const enum TuiEmailAutofillName {\n Off = 'off',\n Email = 'email',\n}\n\nexport const enum TuiAddressAutofillName {\n Off = 'off',\n StreetAddress = 'street-address',\n PostalCode = 'postal-code',\n CountryName = 'country-name',\n}\n\nexport const enum TuiPhoneAutofillName {\n Off = 'off',\n Tel = 'tel',\n}\n\nexport const enum TuiDateAutofillName {\n Off = 'off',\n Bday = 'bday',\n}\n\nexport const enum TuiTransactionAutofillName {\n Off = 'off',\n TransactionCurrency = 'transaction-currency',\n TransactionAmount = 'transaction-amount',\n}\n\nexport type TuiAutofillFieldNameT =\n | 'off'\n // TuiCreditCardAutofillName\n | 'cc-name'\n | 'cc-number'\n | 'cc-csc'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-exp'\n | 'cc-type'\n // TuiNameAutofillName\n | 'name'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n // TuiAccountAutofillName\n | 'username'\n | 'new-password'\n | 'current-password'\n // TuiEmailAutofillName\n | 'email'\n // TuiAddressAutofillName\n | 'street-address'\n | 'postal-code'\n | 'country-name'\n // TuiPhoneAutofillName\n | 'tel'\n // TuiDateAutofillName\n | 'bday'\n // TuiTransactionAutofillName\n | 'transaction-currency'\n | 'transaction-amount';\n\nexport type TuiAutofillFieldName =\n | TuiAutofillFieldNameT\n | TuiCreditCardAutofillName\n | TuiNameAutofillName\n | TuiAccountAutofillName\n | TuiEmailAutofillName\n | TuiAddressAutofillName\n | TuiPhoneAutofillName\n | TuiDateAutofillName\n | TuiTransactionAutofillName;\n","export const enum TuiDayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n}\n","/**\n * @deprecated use join type {@link TuiInputModeT}\n */\nexport const enum TuiInputMode {\n None = 'none',\n Text = 'text',\n Decimal = 'decimal',\n Numeric = 'numeric',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Search = 'search',\n}\n","/**\n * @deprecated use join type {@link TuiInputTypeT}\n */\nexport const enum TuiInputType {\n Text = 'text',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Password = 'password',\n}\n","export const enum TuiMonthNumber {\n January,\n February,\n March,\n April,\n May,\n June,\n July,\n August,\n September,\n October,\n November,\n December,\n}\n","/**\n * Modes for {@link TuiOverscrollDirective}:\n *\n * All — blocks all scroll actions\n * Scroll — blocks scroll actions only if content is scrollable (equivalent to overscroll-behavior: contain)\n * None — blocking is disabled\n * @deprecated use join type {@link TuiOverscrollModeT}\n */\nexport const enum TuiOverscrollMode {\n All = 'all',\n Scroll = 'scroll',\n None = 'none',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"IAAkB;AAAlB,WAAkB,yBAAyB;IACvC,wCAAW,CAAA;IACX,+CAAkB,CAAA;IAClB,mDAAsB,CAAA;IACtB,6CAAgB,CAAA;IAChB,0DAA6B,CAAA;IAC7B,uDAA0B,CAAA;IAC1B,6CAAgB,CAAA;IAChB,+CAAkB,CAAA;AACtB,CAAC,EATiB,yBAAyB,KAAzB,yBAAyB,QAS1C;IAEiB;AAAlB,WAAkB,mBAAmB;IACjC,kCAAW,CAAA;IACX,oC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B,CAAA;IACnB,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,iCAAiB,CAAA;AACrB,CAAC,EATiB,YAAY,KAAZ,YAAY;;ACH9B;;;IAGkB;AAAlB,WAAkB,YAAY;IAC1B,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,qCAAqB,CAAA;AACzB,CAAC,EANiB,YAAY,KAAZ,YAAY;;ICHZ;AAAlB,WAAkB,cAAc;IAC5B,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,qDAAK,CAAA;IACL,qDAAK,CAAA;IACL,iDAAG,CAAA;IACH,mDAAI,CAAA;IACJ,mDAAI,CAAA;IACJ,uDAAM,CAAA;IACN,6DAAS,CAAA;IACT,yDAAO,CAAA;IACP,4DAAQ,CAAA;IACR,4DAAQ,CAAA;AACZ,CAAC,EAbiB,cAAc,KAAd,cAAc;;ACAhC;;;;;;;;IAQkB;AAAlB,WAAkB,iBAAiB;IAC/B,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACjB,CAAC,EAJiB,iBAAiB,KAAjB,iBAAiB;;ACRnC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-enums.js","sources":["ng://@taiga-ui/cdk/enums/autocomplete.ts","ng://@taiga-ui/cdk/enums/day-of-week.ts","ng://@taiga-ui/cdk/enums/input-mode.ts","ng://@taiga-ui/cdk/enums/input-type.ts","ng://@taiga-ui/cdk/enums/month-number.ts","ng://@taiga-ui/cdk/enums/overscroll-mode.ts","ng://@taiga-ui/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nexport const enum TuiCreditCardAutofillName {\n Off = 'off',\n CcName = 'cc-name',\n CcNumber = 'cc-number',\n CcCsc = 'cc-csc',\n CcExpMonth = 'cc-exp-month',\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link CcExpMonth}\n */\n CcExp_mounth = 'cc-exp-month',\n CcExpYear = 'cc-exp-year',\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link CcExpYear}\n */\n CcExp_year = 'cc-exp-year',\n CcExp = 'cc-exp',\n CcType = 'cc-type',\n}\n\nexport const enum TuiNameAutofillName {\n Off = 'off',\n Name = 'name',\n GivenName = 'given-name',\n AdditionalName = 'additional-name',\n FamilyName = 'family-name',\n}\n\nexport const enum TuiAccountAutofillName {\n Off = 'off',\n Username = 'username',\n NewPassword = 'new-password',\n CurrentPassword = 'current-password',\n}\n\nexport const enum TuiEmailAutofillName {\n Off = 'off',\n Email = 'email',\n}\n\nexport const enum TuiAddressAutofillName {\n Off = 'off',\n StreetAddress = 'street-address',\n PostalCode = 'postal-code',\n CountryName = 'country-name',\n}\n\nexport const enum TuiPhoneAutofillName {\n Off = 'off',\n Tel = 'tel',\n}\n\nexport const enum TuiDateAutofillName {\n Off = 'off',\n Bday = 'bday',\n}\n\nexport const enum TuiTransactionAutofillName {\n Off = 'off',\n TransactionCurrency = 'transaction-currency',\n TransactionAmount = 'transaction-amount',\n}\n\nexport type TuiAutofillFieldNameT =\n | 'off'\n // TuiCreditCardAutofillName\n | 'cc-name'\n | 'cc-number'\n | 'cc-csc'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-exp'\n | 'cc-type'\n // TuiNameAutofillName\n | 'name'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n // TuiAccountAutofillName\n | 'username'\n | 'new-password'\n | 'current-password'\n // TuiEmailAutofillName\n | 'email'\n // TuiAddressAutofillName\n | 'street-address'\n | 'postal-code'\n | 'country-name'\n // TuiPhoneAutofillName\n | 'tel'\n // TuiDateAutofillName\n | 'bday'\n // TuiTransactionAutofillName\n | 'transaction-currency'\n | 'transaction-amount';\n\nexport type TuiAutofillFieldName =\n | TuiAutofillFieldNameT\n | TuiCreditCardAutofillName\n | TuiNameAutofillName\n | TuiAccountAutofillName\n | TuiEmailAutofillName\n | TuiAddressAutofillName\n | TuiPhoneAutofillName\n | TuiDateAutofillName\n | TuiTransactionAutofillName;\n","export const enum TuiDayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n}\n","/**\n * @deprecated use join type {@link TuiInputModeT}\n */\nexport const enum TuiInputMode {\n None = 'none',\n Text = 'text',\n Decimal = 'decimal',\n Numeric = 'numeric',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Search = 'search',\n}\n","/**\n * @deprecated use join type {@link TuiInputTypeT}\n */\nexport const enum TuiInputType {\n Text = 'text',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Password = 'password',\n}\n","export const enum TuiMonthNumber {\n January,\n February,\n March,\n April,\n May,\n June,\n July,\n August,\n September,\n October,\n November,\n December,\n}\n","/**\n * Modes for {@link TuiOverscrollDirective}:\n *\n * All — blocks all scroll actions\n * Scroll — blocks scroll actions only if content is scrollable (equivalent to overscroll-behavior: contain)\n * None — blocking is disabled\n * @deprecated use join type {@link TuiOverscrollModeT}\n */\nexport const enum TuiOverscrollMode {\n All = 'all',\n Scroll = 'scroll',\n None = 'none',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;IACkB;AAAlB,WAAkB,yBAAyB;IACvC,wCAAW,CAAA;IACX,+CAAkB,CAAA;IAClB,mDAAsB,CAAA;IACtB,6CAAgB,CAAA;IAChB,wDAA2B,CAAA;;;;;IAK3B,0DAA6B,CAAA;IAC7B,sDAAyB,CAAA;;;;;IAKzB,uDAA0B,CAAA;IAC1B,6CAAgB,CAAA;IAChB,+CAAkB,CAAA;AACtB,CAAC,EAnBiB,yBAAyB,KAAzB,yBAAyB,QAmB1C;IAEiB;AAAlB,WAAkB,mBAAmB;IACjC,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,+CAAwB,CAAA;IACxB,yDAAkC,CAAA;IAClC,iDAA0B,CAAA;AAC9B,CAAC,EANiB,mBAAmB,KAAnB,mBA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AAZ,YAAY;;ACH9B;;;IAGkB;AAAlB,WAAkB,YAAY;IAC1B,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,qCAAqB,CAAA;AACzB,CAAC,EANiB,YAAY,KAAZ,YAAY;;ICHZ;AAAlB,WAAkB,cAAc;IAC5B,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,qDAAK,CAAA;IACL,qDAAK,CAAA;IACL,iDAAG,CAAA;IACH,mDAAI,CAAA;IACJ,mDAAI,CAAA;IACJ,uDAAM,CAAA;IACN,6DAAS,CAAA;IACT,yDAAO,CAAA;IACP,4DAAQ,CAAA;IACR,4DAAQ,CAAA;AACZ,CAAC,EAbiB,cAAc,KAAd,cAAc;;ACAhC;;;;;;;;IAQkB;AAAlB,WAAkB,iBAAiB;IAC/B,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACjB,CAAC,EAJiB,iBAAiB,KAAjB,iBAAiB;;ACRnC;;;;;;"}
@@ -2,8 +2,8 @@ function isEdge(userAgent) {
2
2
  return userAgent.toLowerCase().includes('edge');
3
3
  }
4
4
 
5
+ var EDGE = 'edge/';
5
6
  function isEdgeOlderThan(version, userAgent) {
6
- var EDGE = 'edge/';
7
7
  var currentVersion = parseInt(userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length), 10);
8
8
  return currentVersion < version;
9
9
  }
@@ -18,7 +18,7 @@ function isIE(userAgent) {
18
18
 
19
19
  function isSafari(element) {
20
20
  var documentRef = element.ownerDocument;
21
- var windowRef = documentRef && documentRef.defaultView;
21
+ var windowRef = documentRef === null || documentRef === void 0 ? void 0 : documentRef.defaultView;
22
22
  return !!windowRef && 'safari' in windowRef;
23
23
  }
24
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","export function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const EDGE = 'edge/';\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n","export function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('firefox');\n}\n","export function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('trident');\n}\n","export function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef && documentRef.defaultView;\n\n return !!windowRef && 'safari' in windowRef;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD;;SCFgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,IAAI,GAAG,OAAO,CAAC;IACrB,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC;;SCRgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,QAAQ,CAAC,OAAgB;IACrC,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,IAAI,WAAW,CAAC,WAAW,CAAC;IAEzD,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","const EDGE = 'edge/';\n\nexport function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n","export function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('firefox');\n}\n","export function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('trident');\n}\n","export function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef?.defaultView;\n\n return !!windowRef && 'safari' in windowRef;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD;;ACFA,IAAM,IAAI,GAAG,OAAO,CAAC;SAEL,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC;;SCTgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,QAAQ,CAAC,OAAgB;IACrC,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;IAE3C,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
@@ -10,7 +10,7 @@ function getNativeFocused(documentRef) {
10
10
  return documentRef.activeElement;
11
11
  }
12
12
  var element = documentRef.activeElement.shadowRoot.activeElement;
13
- while (element && element.shadowRoot) {
13
+ while (element === null || element === void 0 ? void 0 : element.shadowRoot) {
14
14
  element = element.shadowRoot.activeElement;
15
15
  }
16
16
  return element;
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * @deprecated: use native element.focus()\n * TODO: remove in v3.0\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document): void {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WAAqB;IAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;QACrE,OAAO,WAAW,CAAC,aAAa,CAAC;KACpC;IAED,IAA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CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;KAChC;IAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACtD;;AC5BA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element?.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * @deprecated: use native element.focus()\n * TODO: remove in v3.0\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document): void {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WAAqB;IAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;QACrE,OAAO,WAAW,CAAC,aAAa,CAAC;KACpC;IAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;IAEjE,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAE;QACxB,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;KAC9C;IAED,OAAO,OAAO,CAAC;AACnB;;ACjBA;;;;;;;;;SASgB,gBAAgB,CAC5B,OAAyB,EACzB,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,KAAK,CAAC,EAAC,aAAa,eAAA,EAAC,CAAC,CAAC;KAClC;SAAM;QACH,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL;;AChBA;;;SAGgB,iBAAiB,CAAC,WAAqB;IACnD,IAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;;IAGpD,IAAI,aAAa,YAAY,WAAW,EAAE;QACtC,gBAAgB,CAAC,aAAa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QAEzC,IAAI,eAAe,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE;YACzC,OAAO;SACV;QAED,YAAY,IAAI,IAAI,CAAC;KACxB;AACL;;ACxBA;;;;;;;SAOgB,qBAAqB,CACjC,OAAmC,EACnC,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;QACxB,OAAO;KACV;IAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;QAC7B,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;KACpF;SAAM;QACH,IAAM,OAAK,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;KAChC;IAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACtD;;AC5BA;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "2.47.0",
3
+ "version": "2.48.0",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -42,4 +42,32 @@ exports.CONSTS_TO_REPLACE = [
42
42
  moduleSpecifier: '@taiga-ui/cdk',
43
43
  },
44
44
  },
45
+ {
46
+ from: {
47
+ name: 'TuiNotificationsModule',
48
+ moduleSpecifier: '@taiga-ui/core',
49
+ },
50
+ to: {
51
+ name: 'TuiAlertModule',
52
+ moduleSpecifier: '@taiga-ui/core',
53
+ },
54
+ },
55
+ {
56
+ from: { name: 'identity', moduleSpecifier: '@taiga-ui/cdk' },
57
+ to: { name: 'identity', moduleSpecifier: 'rxjs' },
58
+ },
59
+ {
60
+ from: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/cdk' },
61
+ to: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/core' },
62
+ },
63
+ {
64
+ from: {
65
+ name: 'TuiCountryIsoCode',
66
+ moduleSpecifier: '@taiga-ui/kit',
67
+ },
68
+ to: {
69
+ name: 'TuiCountryIsoCode',
70
+ moduleSpecifier: '@taiga-ui/i18n',
71
+ },
72
+ },
45
73
  ];
@@ -56,6 +56,19 @@ exports.ENUMS_TO_REPLACE = [
56
56
  None: 'none',
57
57
  },
58
58
  },
59
+ {
60
+ name: 'TuiInputMode',
61
+ replaceValues: {
62
+ None: 'none',
63
+ Text: 'text',
64
+ Decimal: 'decimal',
65
+ Numeric: 'numeric',
66
+ Tel: 'tel',
67
+ Email: 'email',
68
+ Url: 'url',
69
+ Search: 'search',
70
+ },
71
+ },
59
72
  {
60
73
  name: 'TuiStepState',
61
74
  replaceValues: {
@@ -171,4 +184,13 @@ exports.ENUMS_TO_REPLACE = [
171
184
  },
172
185
  keepAsType: false,
173
186
  },
187
+ {
188
+ name: 'TuiTouchMode',
189
+ replaceValues: {
190
+ Transform: 'transform',
191
+ Opacity: 'opacity',
192
+ Background: 'background',
193
+ },
194
+ keepAsType: true,
195
+ },
174
196
  ];
@@ -0,0 +1,8 @@
1
+ import { ReplacementConst } from './consts';
2
+ export interface ReplacementService extends ReplacementConst {
3
+ readonly replaceMethods?: {
4
+ from: string;
5
+ to: string;
6
+ }[];
7
+ }
8
+ export declare const SERVICES_TO_REPLACE: ReplacementService[];
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SERVICES_TO_REPLACE = [
4
+ {
5
+ from: {
6
+ name: 'TuiPortalService',
7
+ },
8
+ to: {
9
+ name: 'TuiDropdownPortalService',
10
+ moduleSpecifier: '@taiga-ui/cdk',
11
+ },
12
+ },
13
+ {
14
+ from: {
15
+ name: 'TuiNotificationService',
16
+ },
17
+ to: {
18
+ name: 'TuiAlertService',
19
+ moduleSpecifier: '@taiga-ui/cdk',
20
+ },
21
+ replaceMethods: [
22
+ {
23
+ from: 'show',
24
+ to: 'open',
25
+ },
26
+ ],
27
+ },
28
+ {
29
+ from: {
30
+ name: 'TuiCodeEditor',
31
+ },
32
+ to: {
33
+ name: 'TuiCodeEditor',
34
+ moduleSpecifier: '@taiga-ui/addon-doc',
35
+ },
36
+ replaceMethods: [
37
+ {
38
+ from: 'open',
39
+ to: 'edit',
40
+ },
41
+ ],
42
+ },
43
+ ];
@@ -2,6 +2,7 @@ interface TypeToRename {
2
2
  readonly from: string;
3
3
  readonly to?: string;
4
4
  readonly moduleSpecifier?: string | string[];
5
+ readonly preserveGenerics?: boolean;
5
6
  }
6
7
  export declare const TYPES_TO_RENAME: readonly TypeToRename[];
7
8
  export {};
@@ -42,4 +42,33 @@ exports.TYPES_TO_RENAME = [
42
42
  {
43
43
  from: 'TuiBreadCrumbsItem',
44
44
  },
45
+ {
46
+ from: 'CheckboxOptions',
47
+ to: 'TuiCheckboxOptions',
48
+ moduleSpecifier: ['@taiga-ui/core'],
49
+ },
50
+ {
51
+ from: 'NotificationTokenOptions',
52
+ to: 'TuiNotificationDefaultOptions',
53
+ moduleSpecifier: ['@taiga-ui/core'],
54
+ },
55
+ {
56
+ from: 'TuiNotificationAutoClose',
57
+ to: 'TuiAlertAutoClose',
58
+ moduleSpecifier: ['@taiga-ui/core'],
59
+ },
60
+ {
61
+ from: 'TuiNotificationOptions',
62
+ to: 'TuiAlertOptions<any>',
63
+ moduleSpecifier: ['@taiga-ui/core'],
64
+ },
65
+ {
66
+ from: 'TuiNotificationOptionsWithData',
67
+ to: 'TuiAlertOptions',
68
+ moduleSpecifier: ['@taiga-ui/core'],
69
+ preserveGenerics: true,
70
+ },
71
+ {
72
+ from: 'Country',
73
+ },
45
74
  ];
@@ -5,4 +5,26 @@ exports.MIGRATION_WARNINGS = [
5
5
  name: 'TUI_MOBILE_AWARE',
6
6
  message: 'TUI_MOBILE_AWARE has been deleted in 3.0, please use TuiMobileTabsDirective from @taiga-ui/addon-mobile',
7
7
  },
8
+ {
9
+ name: 'TUI_DATE_FILLER',
10
+ message: 'TUI_DATE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date',
11
+ },
12
+ {
13
+ name: 'TUI_DATE_RANGE_FILLER',
14
+ message: 'TUI_DATE_RANGE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date-range',
15
+ },
16
+ {
17
+ name: 'TUI_SHEET_OFFSET',
18
+ message: 'TUI_SHEET_OFFSET has been deleted in 3.0, please use option argument for each Sheet. Read more: https://taiga-ui.dev/components/sheet',
19
+ },
20
+ {
21
+ name: 'COUNTRIES',
22
+ moduleSpecifier: '@taiga-ui/kit',
23
+ message: 'Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code. Use DI-token TUI_COUNTRIES to get localized country name by its iso code',
24
+ },
25
+ {
26
+ name: 'COUNTRIES_MASKS',
27
+ moduleSpecifier: '@taiga-ui/kit',
28
+ message: 'Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code',
29
+ },
8
30
  ];