@taiga-ui/core 3.19.0 → 3.20.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 (179) hide show
  1. package/abstract/abstract-driver.directive.d.ts +9 -2
  2. package/abstract/driver.d.ts +1 -0
  3. package/abstract/position-accessor.d.ts +3 -1
  4. package/abstract/rect-accessor.d.ts +4 -1
  5. package/abstract/vehicle.d.ts +1 -0
  6. package/bundles/taiga-ui-core-abstract.umd.js +49 -10
  7. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  8. package/bundles/taiga-ui-core-components-button.umd.js +4 -1
  9. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  10. package/bundles/taiga-ui-core-components-dialog.umd.js +8 -2
  11. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  12. package/bundles/taiga-ui-core-components-loader.umd.js +4 -1
  13. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  14. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +4 -1
  15. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  16. package/bundles/taiga-ui-core-components-root.umd.js +1 -1
  17. package/bundles/taiga-ui-core-components-svg.umd.js +4 -1
  18. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-directives-dropdown.umd.js +167 -110
  20. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-directives-hint.umd.js +242 -181
  22. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +15 -12
  24. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-tokens.umd.js +129 -37
  26. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  27. package/components/button/button-options.d.ts +3 -0
  28. package/components/dialog/dialog.tokens.d.ts +6 -0
  29. package/components/loader/loader-options.d.ts +3 -0
  30. package/components/primitive-checkbox/checkbox-options.d.ts +3 -0
  31. package/components/svg/svg-options.d.ts +3 -0
  32. package/directives/dropdown/dropdown-context.directive.d.ts +1 -0
  33. package/directives/dropdown/dropdown-driver.directive.d.ts +5 -2
  34. package/directives/dropdown/dropdown-host.directive.d.ts +1 -0
  35. package/directives/dropdown/dropdown-hover-options.directive.d.ts +3 -0
  36. package/directives/dropdown/dropdown-hover.directive.d.ts +1 -0
  37. package/directives/dropdown/dropdown-manual.directive.d.ts +1 -0
  38. package/directives/dropdown/dropdown-options.directive.d.ts +3 -0
  39. package/directives/dropdown/dropdown-position-sided.directive.d.ts +4 -3
  40. package/directives/dropdown/dropdown-position.directive.d.ts +7 -3
  41. package/directives/dropdown/dropdown-selection.directive.d.ts +1 -0
  42. package/directives/dropdown/dropdown.directive.d.ts +7 -4
  43. package/directives/dropdown/dropdown.providers.d.ts +3 -0
  44. package/directives/hint/hint-describe.directive.d.ts +3 -5
  45. package/directives/hint/hint-driver.directive.d.ts +5 -2
  46. package/directives/hint/hint-host.directive.d.ts +1 -0
  47. package/directives/hint/hint-hover.directive.d.ts +2 -0
  48. package/directives/hint/hint-manual.directive.d.ts +3 -1
  49. package/directives/hint/hint-options.directive.d.ts +3 -0
  50. package/directives/hint/hint-position.directive.d.ts +6 -3
  51. package/directives/hint/hint.directive.d.ts +3 -2
  52. package/directives/hint/hint.providers.d.ts +3 -0
  53. package/directives/textfield-controller/textfield-options.d.ts +3 -0
  54. package/esm2015/abstract/abstract-driver.directive.js +15 -7
  55. package/esm2015/abstract/driver.js +2 -1
  56. package/esm2015/abstract/position-accessor.js +10 -1
  57. package/esm2015/abstract/rect-accessor.js +14 -1
  58. package/esm2015/abstract/vehicle.js +2 -1
  59. package/esm2015/components/button/button-options.js +5 -2
  60. package/esm2015/components/dialog/dialog.tokens.js +9 -3
  61. package/esm2015/components/loader/loader-options.js +5 -2
  62. package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -2
  63. package/esm2015/components/root/root.component.js +1 -1
  64. package/esm2015/components/svg/svg-options.js +5 -2
  65. package/esm2015/directives/dropdown/dropdown-context.directive.js +2 -1
  66. package/esm2015/directives/dropdown/dropdown-driver.directive.js +22 -5
  67. package/esm2015/directives/dropdown/dropdown-host.directive.js +5 -1
  68. package/esm2015/directives/dropdown/dropdown-hover-options.directive.js +5 -2
  69. package/esm2015/directives/dropdown/dropdown-hover.directive.js +2 -1
  70. package/esm2015/directives/dropdown/dropdown-manual.directive.js +4 -3
  71. package/esm2015/directives/dropdown/dropdown-options.directive.js +5 -2
  72. package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +13 -12
  73. package/esm2015/directives/dropdown/dropdown-position.directive.js +27 -10
  74. package/esm2015/directives/dropdown/dropdown-selection.directive.js +2 -1
  75. package/esm2015/directives/dropdown/dropdown.component.js +19 -9
  76. package/esm2015/directives/dropdown/dropdown.directive.js +14 -19
  77. package/esm2015/directives/dropdown/dropdown.providers.js +5 -2
  78. package/esm2015/directives/hint/hint-describe.directive.js +5 -11
  79. package/esm2015/directives/hint/hint-driver.directive.js +22 -5
  80. package/esm2015/directives/hint/hint-host.directive.js +5 -1
  81. package/esm2015/directives/hint/hint-hover.directive.js +5 -3
  82. package/esm2015/directives/hint/hint-manual.directive.js +12 -5
  83. package/esm2015/directives/hint/hint-options.directive.js +5 -2
  84. package/esm2015/directives/hint/hint-position.directive.js +24 -10
  85. package/esm2015/directives/hint/hint.component.js +18 -4
  86. package/esm2015/directives/hint/hint.directive.js +3 -1
  87. package/esm2015/directives/hint/hint.providers.js +6 -2
  88. package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +2 -2
  89. package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +2 -2
  90. package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
  91. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +2 -2
  92. package/esm2015/directives/textfield-controller/textfield-filler.directive.js +2 -2
  93. package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +2 -2
  94. package/esm2015/directives/textfield-controller/textfield-icon.directive.js +2 -2
  95. package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +2 -2
  96. package/esm2015/directives/textfield-controller/textfield-options.js +5 -2
  97. package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +2 -2
  98. package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +2 -2
  99. package/esm2015/directives/textfield-controller/textfield-size.directive.js +2 -2
  100. package/esm2015/tokens/animation-options.js +5 -2
  101. package/esm2015/tokens/animations-duration.js +5 -2
  102. package/esm2015/tokens/assert-enabled.js +5 -2
  103. package/esm2015/tokens/data-list-accessor.js +5 -2
  104. package/esm2015/tokens/data-list-host.js +5 -2
  105. package/esm2015/tokens/day-type-handler.js +5 -2
  106. package/esm2015/tokens/document-or-shadow-root.js +2 -2
  107. package/esm2015/tokens/element-ref.js +5 -2
  108. package/esm2015/tokens/first-day-of-week.js +5 -2
  109. package/esm2015/tokens/i18n.js +25 -7
  110. package/esm2015/tokens/icon-place.js +3 -2
  111. package/esm2015/tokens/icons-path.js +5 -2
  112. package/esm2015/tokens/icons.js +5 -2
  113. package/esm2015/tokens/is-mobile-resolution.js +5 -2
  114. package/esm2015/tokens/media.js +5 -2
  115. package/esm2015/tokens/mode.js +5 -2
  116. package/esm2015/tokens/notification-options.js +5 -2
  117. package/esm2015/tokens/number-format.js +5 -2
  118. package/esm2015/tokens/option-content.js +5 -2
  119. package/esm2015/tokens/ordered-short-week-days.js +3 -2
  120. package/esm2015/tokens/sanitizer.js +5 -2
  121. package/esm2015/tokens/scroll-ref.js +5 -2
  122. package/esm2015/tokens/selection-stream.js +5 -2
  123. package/esm2015/tokens/svg-content-processor.js +3 -2
  124. package/esm2015/tokens/svg-src-processor.js +3 -2
  125. package/esm2015/tokens/textfield-appearance.js +7 -4
  126. package/esm2015/tokens/textfield-host.js +5 -2
  127. package/esm2015/tokens/theme.js +2 -2
  128. package/esm2015/tokens/value-accessor.js +5 -2
  129. package/esm2015/tokens/viewport.js +6 -2
  130. package/fesm2015/taiga-ui-core-abstract.js +39 -9
  131. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  132. package/fesm2015/taiga-ui-core-components-button.js +4 -1
  133. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  134. package/fesm2015/taiga-ui-core-components-dialog.js +8 -2
  135. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  136. package/fesm2015/taiga-ui-core-components-loader.js +4 -1
  137. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  138. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +4 -1
  139. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  140. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  141. package/fesm2015/taiga-ui-core-components-svg.js +4 -1
  142. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  143. package/fesm2015/taiga-ui-core-directives-dropdown.js +104 -53
  144. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  145. package/fesm2015/taiga-ui-core-directives-hint.js +187 -132
  146. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  147. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +15 -12
  148. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  149. package/fesm2015/taiga-ui-core-tokens.js +129 -37
  150. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  151. package/package.json +4 -4
  152. package/tokens/animation-options.d.ts +3 -0
  153. package/tokens/animations-duration.d.ts +3 -0
  154. package/tokens/assert-enabled.d.ts +3 -0
  155. package/tokens/data-list-accessor.d.ts +3 -0
  156. package/tokens/data-list-host.d.ts +3 -0
  157. package/tokens/day-type-handler.d.ts +3 -0
  158. package/tokens/element-ref.d.ts +3 -0
  159. package/tokens/first-day-of-week.d.ts +3 -0
  160. package/tokens/i18n.d.ts +18 -0
  161. package/tokens/icon-place.d.ts +1 -0
  162. package/tokens/icons-path.d.ts +1 -0
  163. package/tokens/icons.d.ts +3 -0
  164. package/tokens/is-mobile-resolution.d.ts +3 -0
  165. package/tokens/media.d.ts +3 -0
  166. package/tokens/mode.d.ts +3 -0
  167. package/tokens/notification-options.d.ts +3 -0
  168. package/tokens/number-format.d.ts +3 -0
  169. package/tokens/option-content.d.ts +3 -0
  170. package/tokens/ordered-short-week-days.d.ts +1 -0
  171. package/tokens/sanitizer.d.ts +3 -0
  172. package/tokens/scroll-ref.d.ts +3 -0
  173. package/tokens/selection-stream.d.ts +3 -0
  174. package/tokens/svg-content-processor.d.ts +1 -0
  175. package/tokens/svg-src-processor.d.ts +1 -0
  176. package/tokens/textfield-appearance.d.ts +5 -1
  177. package/tokens/textfield-host.d.ts +3 -0
  178. package/tokens/value-accessor.d.ts +3 -0
  179. package/tokens/viewport.d.ts +3 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('rxjs/operators'), require('@taiga-ui/core/utils'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('@taiga-ui/core/components/scrollbar'), require('@taiga-ui/core/directives/mode'), require('@tinkoff/ng-event-plugins'), require('@angular/common')) :
3
3
  typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/dropdown', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/services', '@taiga-ui/core/tokens', 'rxjs/operators', '@taiga-ui/core/utils', '@tinkoff/ng-polymorpheus', 'rxjs', '@taiga-ui/core/components/scrollbar', '@taiga-ui/core/directives/mode', '@tinkoff/ng-event-plugins', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.directives = global["taiga-ui"].core.directives || {}, global["taiga-ui"].core.directives.dropdown = {}), global.ng.core, global.common, global.i2, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.rxjs.operators, global["taiga-ui"].core.utils, global.i1, global.rxjs, global["taiga-ui"].core.components.scrollbar, global["taiga-ui"].core.directives.mode, global.ngEventPlugins, global.ng.common));
5
- })(this, (function (exports, i0, common, i2, i1$1, animations, services, tokens, operators, utils, i1, i5, i1$2, i3, ngEventPlugins, common$1) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.directives = global["taiga-ui"].core.directives || {}, global["taiga-ui"].core.directives.dropdown = {}), global.ng.core, global.common, global.i2, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.rxjs.operators, global["taiga-ui"].core.utils, global.i4, global.rxjs, global["taiga-ui"].core.components.scrollbar, global["taiga-ui"].core.directives.mode, global.ngEventPlugins, global.ng.common));
5
+ })(this, (function (exports, i0, common, i2, i1, animations, services, tokens, operators, utils, i4, i1$1, i1$2, i3, ngEventPlugins, common$1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,9 +24,9 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$1);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
27
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1);
28
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
30
30
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
31
31
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
32
 
@@ -348,17 +348,23 @@
348
348
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
349
349
  }
350
350
 
351
- var TUI_DROPDOWN_COMPONENT = new i0.InjectionToken("[TUI_DROPDOWN_COMPONENT] A component to display a dropdown", {
351
+ /**
352
+ * A component to display a dropdown
353
+ */
354
+ var TUI_DROPDOWN_COMPONENT = new i0.InjectionToken("[TUI_DROPDOWN_COMPONENT]", {
352
355
  factory: function () { return TuiDropdownComponent; },
353
356
  });
354
357
 
355
358
  var TuiDropdownDirective = /** @class */ (function () {
356
- function TuiDropdownDirective(elementRef, component, dropdownService) {
359
+ function TuiDropdownDirective(elementRef, hapica, injector, dropdownService) {
357
360
  this.elementRef = elementRef;
358
- this.component = component;
361
+ this.hapica = hapica;
362
+ this.injector = injector;
359
363
  this.dropdownService = dropdownService;
360
364
  this.content = '';
361
365
  this.dropdownBoxRef = null;
366
+ this.type = 'dropdown';
367
+ this.component = new i4.PolymorpheusComponent(this.hapica, this.injector);
362
368
  }
363
369
  Object.defineProperty(TuiDropdownDirective.prototype, "position", {
364
370
  get: function () {
@@ -396,15 +402,10 @@
396
402
  };
397
403
  return TuiDropdownDirective;
398
404
  }());
399
- TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i0.ElementRef }, { token: i1.PolymorpheusComponent }, { token: i2.TuiDropdownPortalService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
405
+ TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
400
406
  TuiDropdownDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
401
- i1$1.tuiAsRectAccessor(TuiDropdownDirective),
402
- i1$1.tuiAsVehicle(TuiDropdownDirective),
403
- {
404
- provide: i1.PolymorpheusComponent,
405
- deps: [TUI_DROPDOWN_COMPONENT, i0.INJECTOR],
406
- useClass: i1.PolymorpheusComponent,
407
- },
407
+ i1.tuiAsRectAccessor(TuiDropdownDirective),
408
+ i1.tuiAsVehicle(TuiDropdownDirective),
408
409
  ], exportAs: ["tuiDropdown"], usesOnChanges: true, ngImport: i0__namespace });
409
410
  __decorate([
410
411
  i2.tuiDefaultProp()
@@ -418,22 +419,20 @@
418
419
  selector: '[tuiDropdown]:not(ng-container)',
419
420
  exportAs: 'tuiDropdown',
420
421
  providers: [
421
- i1$1.tuiAsRectAccessor(TuiDropdownDirective),
422
- i1$1.tuiAsVehicle(TuiDropdownDirective),
423
- {
424
- provide: i1.PolymorpheusComponent,
425
- deps: [TUI_DROPDOWN_COMPONENT, i0.INJECTOR],
426
- useClass: i1.PolymorpheusComponent,
427
- },
422
+ i1.tuiAsRectAccessor(TuiDropdownDirective),
423
+ i1.tuiAsVehicle(TuiDropdownDirective),
428
424
  ],
429
425
  }]
430
426
  }], ctorParameters: function () {
431
427
  return [{ type: i0__namespace.ElementRef, decorators: [{
432
428
  type: i0.Inject,
433
429
  args: [i0.ElementRef]
434
- }] }, { type: i1__namespace.PolymorpheusComponent, decorators: [{
430
+ }] }, { type: i0__namespace.Type, decorators: [{
431
+ type: i0.Inject,
432
+ args: [TUI_DROPDOWN_COMPONENT]
433
+ }] }, { type: i0__namespace.Injector, decorators: [{
435
434
  type: i0.Inject,
436
- args: [i1.PolymorpheusComponent]
435
+ args: [i0.INJECTOR]
437
436
  }] }, { type: i2__namespace.TuiDropdownPortalService, decorators: [{
438
437
  type: i0.Inject,
439
438
  args: [i2.TuiDropdownPortalService]
@@ -448,7 +447,10 @@
448
447
  showDelay: 200,
449
448
  hideDelay: 500,
450
449
  };
451
- var TUI_DROPDOWN_HOVER_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_HOVER_OPTIONS] Default parameters for dropdown hover directive', {
450
+ /**
451
+ * Default parameters for dropdown hover directive
452
+ */
453
+ var TUI_DROPDOWN_HOVER_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_HOVER_OPTIONS]', {
452
454
  factory: function () { return TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS; },
453
455
  });
454
456
  var tuiDropdownHoverOptionsProvider = function (options) { return ({
@@ -462,22 +464,23 @@
462
464
  var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
463
465
  _this.hovered$ = hovered$;
464
466
  _this.options = options;
465
- _this.toggle$ = new i5.Subject();
466
- _this.stream$ = i5.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i5.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
467
+ _this.toggle$ = new i1$1.Subject();
468
+ _this.stream$ = i1$1.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i1$1.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
467
469
  _this.hovered = visible;
468
470
  }), operators.share());
469
471
  _this.showDelay = _this.options.showDelay;
470
472
  _this.hideDelay = _this.options.hideDelay;
471
473
  _this.hovered = false;
474
+ _this.type = 'dropdown';
472
475
  return _this;
473
476
  }
474
477
  TuiDropdownHoverDirective.prototype.toggle = function (visible) {
475
478
  this.toggle$.next(visible);
476
479
  };
477
480
  return TuiDropdownHoverDirective;
478
- }(i1$1.TuiDriver));
481
+ }(i1.TuiDriver));
479
482
  TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
480
- TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
483
+ TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
481
484
  __decorate([
482
485
  i2.tuiDefaultProp()
483
486
  ], TuiDropdownHoverDirective.prototype, "showDelay", void 0);
@@ -488,10 +491,10 @@
488
491
  type: i0.Directive,
489
492
  args: [{
490
493
  selector: '[tuiDropdownHover]:not(ng-container)',
491
- providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
494
+ providers: [i1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
492
495
  }]
493
496
  }], ctorParameters: function () {
494
- return [{ type: i5__namespace.Observable, decorators: [{
497
+ return [{ type: i1__namespace.Observable, decorators: [{
495
498
  type: i0.Inject,
496
499
  args: [i2.TuiHoveredService]
497
500
  }] }, { type: undefined, decorators: [{
@@ -515,7 +518,10 @@
515
518
  minHeight: 80,
516
519
  offset: 4,
517
520
  };
518
- var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_OPTIONS] Default parameters for dropdown directive', {
521
+ /**
522
+ * Default parameters for dropdown directive
523
+ */
524
+ var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_OPTIONS]', {
519
525
  factory: function () { return TUI_DROPDOWN_DEFAULT_OPTIONS; },
520
526
  });
521
527
  var tuiDropdownOptionsProvider = function (override) { return ({
@@ -675,36 +681,46 @@
675
681
  }
676
682
  };
677
683
  TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
678
- var host = document.createElement('div');
679
- var ownerDocument = host.ownerDocument;
680
- var root = ownerDocument ? ownerDocument.body : host;
681
- var focusable = i2.tuiGetClosestFocusable({ initial: host, root: root, previous: previous });
682
- while (focusable !== null && host.contains(focusable)) {
684
+ var nativeElement = this.directive.elementRef.nativeElement;
685
+ var ownerDocument = nativeElement.ownerDocument;
686
+ var root = ownerDocument ? ownerDocument.body : nativeElement;
687
+ var focusable = i2.tuiGetClosestFocusable({ initial: nativeElement, root: root, previous: previous });
688
+ while (focusable !== null && nativeElement.contains(focusable)) {
683
689
  focusable = i2.tuiGetClosestFocusable({ initial: focusable, root: root, previous: previous });
684
690
  }
685
691
  focusable === null || focusable === void 0 ? void 0 : focusable.focus();
686
692
  };
687
693
  return TuiDropdownComponent;
688
694
  }());
689
- TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: services.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: i0.ElementRef }, { token: i2.AbstractTuiPortalHostComponent }, { token: i1$1.TuiRectAccessor }, { token: common.WINDOW }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
690
- TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { properties: { "@tuiDropdownAnimation": "this.dropdownAnimation" } }, providers: [i2.TuiDestroyService, services.TuiPositionService], ngImport: i0__namespace, template: "<div\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-wrapper\"\n [tuiMode]=\"null\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <tui-scrollbar class=\"t-scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n", styles: [":host{position:relative;z-index:0;box-shadow:0 1.5rem 1rem rgba(0,0,0,.03),0 .75rem .75rem rgba(0,0,0,.04),0 .25rem .375rem rgba(0,0,0,.05);position:absolute;display:flex;background-color:var(--tui-elevation-01);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px)}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}.t-wrapper{flex-grow:1;max-width:100%;max-height:inherit;overflow:visible}.t-scroll{height:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2__namespace.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i3__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i1__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiDropdownAnimation], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
695
+ TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: services.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: i0.ElementRef }, { token: i2.AbstractTuiPortalHostComponent }, { token: i1.TuiRectAccessor }, { token: common.WINDOW }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
696
+ TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { properties: { "@tuiDropdownAnimation": "this.dropdownAnimation" } }, providers: [
697
+ i2.TuiDestroyService,
698
+ services.TuiPositionService,
699
+ i1.tuiPositionAccessorFor('dropdown'),
700
+ i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
701
+ ], ngImport: i0__namespace, template: "<div\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-wrapper\"\n [tuiMode]=\"null\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <tui-scrollbar class=\"t-scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n", styles: [":host{position:relative;z-index:0;box-shadow:0 1.5rem 1rem rgba(0,0,0,.03),0 .75rem .75rem rgba(0,0,0,.04),0 .25rem .375rem rgba(0,0,0,.05);position:absolute;display:flex;background-color:var(--tui-elevation-01);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px)}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}.t-wrapper{flex-grow:1;max-width:100%;max-height:inherit;overflow:visible}.t-scroll{height:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2__namespace.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i3__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiDropdownAnimation], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
691
702
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
692
703
  type: i0.Component,
693
704
  args: [{
694
705
  selector: 'tui-dropdown',
695
706
  templateUrl: './dropdown.template.html',
696
707
  styleUrls: ['./dropdown.style.less'],
697
- providers: [i2.TuiDestroyService, services.TuiPositionService],
708
+ providers: [
709
+ i2.TuiDestroyService,
710
+ services.TuiPositionService,
711
+ i1.tuiPositionAccessorFor('dropdown'),
712
+ i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
713
+ ],
698
714
  animations: [animations.tuiDropdownAnimation],
699
715
  // @bad TODO: OnPush
700
716
  // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
701
717
  changeDetection: i0.ChangeDetectionStrategy.Default,
702
718
  }]
703
719
  }], ctorParameters: function () {
704
- return [{ type: i5__namespace.Observable, decorators: [{
720
+ return [{ type: i1__namespace.Observable, decorators: [{
705
721
  type: i0.Inject,
706
722
  args: [services.TuiPositionService]
707
- }] }, { type: i5__namespace.Observable, decorators: [{
723
+ }] }, { type: i1__namespace.Observable, decorators: [{
708
724
  type: i0.Self
709
725
  }, {
710
726
  type: i0.Inject,
@@ -720,7 +736,7 @@
720
736
  args: [i2.AbstractTuiPortalHostComponent]
721
737
  }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
722
738
  type: i0.Inject,
723
- args: [i1$1.TuiRectAccessor]
739
+ args: [i1.TuiRectAccessor]
724
740
  }] }, { type: Window, decorators: [{
725
741
  type: i0.Inject,
726
742
  args: [common.WINDOW]
@@ -749,8 +765,9 @@
749
765
  function TuiDropdownContextDirective(activeZone) {
750
766
  var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
751
767
  _this.activeZone = activeZone;
752
- _this.stream$ = new i5.Subject();
768
+ _this.stream$ = new i1$1.Subject();
753
769
  _this.currentRect = i2.EMPTY_CLIENT_RECT;
770
+ _this.type = 'dropdown';
754
771
  return _this;
755
772
  }
756
773
  TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
@@ -764,12 +781,12 @@
764
781
  return this.currentRect;
765
782
  };
766
783
  return TuiDropdownContextDirective;
767
- }(i1$1.TuiDriver));
784
+ }(i1.TuiDriver));
768
785
  TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
769
786
  TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)" } }, providers: [
770
787
  i2.TuiActiveZoneDirective,
771
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
772
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
788
+ i1.tuiAsDriver(TuiDropdownContextDirective),
789
+ i1.tuiAsRectAccessor(TuiDropdownContextDirective),
773
790
  ], usesInheritance: true, ngImport: i0__namespace });
774
791
  __decorate([
775
792
  ngEventPlugins.shouldCall(activeZoneFilter)
@@ -780,8 +797,8 @@
780
797
  selector: '[tuiDropdown][tuiDropdownContext]',
781
798
  providers: [
782
799
  i2.TuiActiveZoneDirective,
783
- i1$1.tuiAsDriver(TuiDropdownContextDirective),
784
- i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
800
+ i1.tuiAsDriver(TuiDropdownContextDirective),
801
+ i1.tuiAsRectAccessor(TuiDropdownContextDirective),
785
802
  ],
786
803
  }]
787
804
  }], ctorParameters: function () {
@@ -805,12 +822,15 @@
805
822
 
806
823
  var TuiDropdownDriverDirective = /** @class */ (function (_super) {
807
824
  __extends(TuiDropdownDriverDirective, _super);
808
- function TuiDropdownDriverDirective() {
809
- return _super !== null && _super.apply(this, arguments) || this;
825
+ // TODO: Figure out why this is necessary under nx test runner
826
+ function TuiDropdownDriverDirective(destroy$, drivers, vehicles) {
827
+ var _this = _super.call(this, destroy$, drivers, vehicles) || this;
828
+ _this.type = 'dropdown';
829
+ return _this;
810
830
  }
811
831
  return TuiDropdownDriverDirective;
812
- }(i1$1.AbstractTuiDriverDirective));
813
- TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
832
+ }(i1.AbstractTuiDriverDirective));
833
+ TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i1.TuiDriver }, { token: i1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
814
834
  TuiDropdownDriverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDriverDirective, selector: "[tuiDropdown]", providers: [i2.TuiDestroyService], usesInheritance: true, ngImport: i0__namespace });
815
835
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
816
836
  type: i0.Directive,
@@ -818,26 +838,41 @@
818
838
  selector: '[tuiDropdown]',
819
839
  providers: [i2.TuiDestroyService],
820
840
  }]
821
- }] });
841
+ }], ctorParameters: function () {
842
+ return [{ type: i1__namespace.Observable, decorators: [{
843
+ type: i0.Self
844
+ }, {
845
+ type: i0.Inject,
846
+ args: [i2.TuiDestroyService]
847
+ }] }, { type: undefined, decorators: [{
848
+ type: i0.Inject,
849
+ args: [i1.TuiDriver]
850
+ }] }, { type: undefined, decorators: [{
851
+ type: i0.Inject,
852
+ args: [i1.TuiVehicle]
853
+ }] }];
854
+ } });
822
855
 
823
856
  var TuiDropdownHostDirective = /** @class */ (function (_super) {
824
857
  __extends(TuiDropdownHostDirective, _super);
825
858
  function TuiDropdownHostDirective() {
826
- return _super !== null && _super.apply(this, arguments) || this;
859
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
860
+ _this.type = 'dropdown';
861
+ return _this;
827
862
  }
828
863
  TuiDropdownHostDirective.prototype.getClientRect = function () {
829
864
  var _a;
830
865
  return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
831
866
  };
832
867
  return TuiDropdownHostDirective;
833
- }(i1$1.TuiRectAccessor));
868
+ }(i1.TuiRectAccessor));
834
869
  TuiDropdownHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
835
- TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
870
+ TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
836
871
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
837
872
  type: i0.Directive,
838
873
  args: [{
839
874
  selector: '[tuiDropdown][tuiDropdownHost]',
840
- providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
875
+ providers: [i1.tuiAsRectAccessor(TuiDropdownHostDirective)],
841
876
  }]
842
877
  }], propDecorators: { tuiDropdownHost: [{
843
878
  type: i0.Input
@@ -847,38 +882,45 @@
847
882
  __extends(TuiDropdownManualDirective, _super);
848
883
  function TuiDropdownManualDirective() {
849
884
  var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
850
- _this.stream$ = new i5.Subject();
885
+ _this.stream$ = new i1$1.BehaviorSubject(false);
851
886
  _this.tuiDropdownManual = false;
887
+ _this.type = 'dropdown';
852
888
  return _this;
853
889
  }
854
890
  TuiDropdownManualDirective.prototype.ngOnChanges = function () {
855
891
  this.stream$.next(this.tuiDropdownManual);
856
892
  };
857
893
  return TuiDropdownManualDirective;
858
- }(i1$1.TuiDriver));
894
+ }(i1.TuiDriver));
859
895
  TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
860
- TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
896
+ TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
861
897
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
862
898
  type: i0.Directive,
863
899
  args: [{
864
900
  selector: '[tuiDropdown][tuiDropdownManual]',
865
- providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
901
+ providers: [i1.tuiAsDriver(TuiDropdownManualDirective)],
866
902
  }]
867
903
  }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
868
904
  type: i0.Input
869
905
  }] } });
870
906
 
871
- var TuiDropdownPositionDirective = /** @class */ (function () {
872
- function TuiDropdownPositionDirective(options, viewport, accessor) {
873
- this.options = options;
874
- this.viewport = viewport;
875
- this.accessor = accessor;
907
+ var TuiDropdownPositionDirective = /** @class */ (function (_super) {
908
+ __extends(TuiDropdownPositionDirective, _super);
909
+ function TuiDropdownPositionDirective(options, viewport, accessors, directive) {
910
+ var _this = _super.call(this) || this;
911
+ _this.options = options;
912
+ _this.viewport = viewport;
913
+ _this.accessors = accessors;
914
+ _this.directive = directive;
915
+ _this.type = 'dropdown';
916
+ return _this;
876
917
  }
877
- TuiDropdownPositionDirective.prototype.getPosition = function (_a) {
878
- var width = _a.width, height = _a.height;
879
- var hostRect = this.accessor.getClientRect();
918
+ TuiDropdownPositionDirective.prototype.getPosition = function (_c) {
919
+ var width = _c.width, height = _c.height;
920
+ var _a, _b;
921
+ var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
880
922
  var viewport = this.viewport.getClientRect();
881
- var _b = this.options, minHeight = _b.minHeight, align = _b.align, direction = _b.direction, offset = _b.offset;
923
+ var _d = this.options, minHeight = _d.minHeight, align = _d.align, direction = _d.direction, offset = _d.offset;
882
924
  var previous = this.previous || direction || 'bottom';
883
925
  var right = Math.max(hostRect.right - width, offset);
884
926
  var available = {
@@ -899,15 +941,25 @@
899
941
  this.previous = better;
900
942
  return [position[better], position[align]];
901
943
  };
944
+ Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
945
+ get: function () {
946
+ return i1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
947
+ },
948
+ enumerable: false,
949
+ configurable: true
950
+ });
902
951
  return TuiDropdownPositionDirective;
903
- }());
904
- TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }], target: i0__namespace.ɵɵFactoryTarget.Directive });
905
- TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], ngImport: i0__namespace });
952
+ }(i1.TuiPositionAccessor));
953
+ TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1.TuiRectAccessor }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
954
+ TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
955
+ __decorate([
956
+ i2.tuiPure
957
+ ], TuiDropdownPositionDirective.prototype, "accessor", null);
906
958
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
907
959
  type: i0.Directive,
908
960
  args: [{
909
961
  selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
910
- providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
962
+ providers: [i1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
911
963
  }]
912
964
  }], ctorParameters: function () {
913
965
  return [{ type: undefined, decorators: [{
@@ -916,30 +968,37 @@
916
968
  }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
917
969
  type: i0.Inject,
918
970
  args: [tokens.TUI_VIEWPORT]
919
- }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
971
+ }] }, { type: undefined, decorators: [{
920
972
  type: i0.Inject,
921
- args: [i1$1.TuiRectAccessor]
973
+ args: [i1.TuiRectAccessor]
974
+ }] }, { type: TuiDropdownDirective, decorators: [{
975
+ type: i0.Inject,
976
+ args: [TuiDropdownDirective]
922
977
  }] }];
923
- } });
978
+ }, propDecorators: { accessor: [] } });
924
979
 
925
- var TuiDropdownPositionSidedDirective = /** @class */ (function () {
926
- function TuiDropdownPositionSidedDirective(options, viewport, accessor, vertical) {
927
- this.options = options;
928
- this.viewport = viewport;
929
- this.accessor = accessor;
930
- this.vertical = vertical;
931
- this.previous = this.options.direction || 'bottom';
932
- this.tuiDropdownSided = '';
933
- this.tuiDropdownSidedOffset = 4;
980
+ var TuiDropdownPositionSidedDirective = /** @class */ (function (_super) {
981
+ __extends(TuiDropdownPositionSidedDirective, _super);
982
+ function TuiDropdownPositionSidedDirective(options, viewport, vertical) {
983
+ var _this = _super.call(this) || this;
984
+ _this.options = options;
985
+ _this.viewport = viewport;
986
+ _this.vertical = vertical;
987
+ _this.previous = _this.options.direction || 'bottom';
988
+ _this.tuiDropdownSided = '';
989
+ _this.tuiDropdownSidedOffset = 4;
990
+ _this.type = 'dropdown';
991
+ return _this;
934
992
  }
935
993
  TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
994
+ var _a, _b;
936
995
  if (this.tuiDropdownSided === false) {
937
996
  return this.vertical.getPosition(rect);
938
997
  }
939
998
  var height = rect.height, width = rect.width;
940
- var hostRect = this.accessor.getClientRect();
999
+ var hostRect = (_b = (_a = this.vertical.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i2.EMPTY_CLIENT_RECT;
941
1000
  var viewport = this.viewport.getClientRect();
942
- var _a = this.options, align = _a.align, direction = _a.direction, minHeight = _a.minHeight, offset = _a.offset;
1001
+ var _c = this.options, align = _c.align, direction = _c.direction, minHeight = _c.minHeight, offset = _c.offset;
943
1002
  var available = {
944
1003
  top: hostRect.bottom - viewport.top,
945
1004
  left: hostRect.left - offset - viewport.left,
@@ -963,19 +1022,19 @@
963
1022
  return [position[better], left];
964
1023
  };
965
1024
  return TuiDropdownPositionSidedDirective;
966
- }());
967
- TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1025
+ }(i1.TuiPositionAccessor));
1026
+ TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
968
1027
  TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
969
1028
  TuiDropdownPositionDirective,
970
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
971
- ], ngImport: i0__namespace });
1029
+ i1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1030
+ ], usesInheritance: true, ngImport: i0__namespace });
972
1031
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
973
1032
  type: i0.Directive,
974
1033
  args: [{
975
1034
  selector: '[tuiDropdownSided]',
976
1035
  providers: [
977
1036
  TuiDropdownPositionDirective,
978
- i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
1037
+ i1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
979
1038
  ],
980
1039
  }]
981
1040
  }], ctorParameters: function () {
@@ -985,10 +1044,7 @@
985
1044
  }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
986
1045
  type: i0.Inject,
987
1046
  args: [tokens.TUI_VIEWPORT]
988
- }] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
989
- type: i0.Inject,
990
- args: [i1$1.TuiRectAccessor]
991
- }] }, { type: i1__namespace$2.TuiPositionAccessor, decorators: [{
1047
+ }] }, { type: TuiDropdownPositionDirective, decorators: [{
992
1048
  type: i0.Inject,
993
1049
  args: [TuiDropdownPositionDirective]
994
1050
  }] }];
@@ -1008,8 +1064,8 @@
1008
1064
  _this.elementRef = elementRef;
1009
1065
  _this.viewContainerRef = viewContainerRef;
1010
1066
  _this.dropdown = dropdown;
1011
- _this.handler$ = new i5.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1012
- _this.stream$ = i5.combineLatest([
1067
+ _this.handler$ = new i1$1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
1068
+ _this.stream$ = i1$1.combineLatest([
1013
1069
  _this.handler$,
1014
1070
  _this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged()),
1015
1071
  ]).pipe(operators.map(function (_b) {
@@ -1022,6 +1078,7 @@
1022
1078
  return (contained && handler(_this.range)) || _this.inDropdown(range);
1023
1079
  }));
1024
1080
  _this.position = 'selection';
1081
+ _this.type = 'dropdown';
1025
1082
  return _this;
1026
1083
  }
1027
1084
  Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
@@ -1117,11 +1174,11 @@
1117
1174
  return ghost;
1118
1175
  };
1119
1176
  return TuiDropdownSelectionDirective;
1120
- }(i1$1.TuiDriver));
1177
+ }(i1.TuiDriver));
1121
1178
  TuiDropdownSelectionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, deps: [{ token: i2.TUI_RANGE }, { token: common$1.DOCUMENT }, { token: tokens.TUI_SELECTION_STREAM }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1122
1179
  TuiDropdownSelectionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownSelectionDirective, selector: "[tuiDropdown][tuiDropdownSelection]", inputs: { position: ["tuiDropdownSelectionPosition", "position"], tuiDropdownSelection: "tuiDropdownSelection" }, providers: [
1123
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1124
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1180
+ i1.tuiAsDriver(TuiDropdownSelectionDirective),
1181
+ i1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1125
1182
  ], usesInheritance: true, ngImport: i0__namespace });
1126
1183
  __decorate([
1127
1184
  i2.tuiDefaultProp()
@@ -1131,8 +1188,8 @@
1131
1188
  args: [{
1132
1189
  selector: '[tuiDropdown][tuiDropdownSelection]',
1133
1190
  providers: [
1134
- i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1135
- i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1191
+ i1.tuiAsDriver(TuiDropdownSelectionDirective),
1192
+ i1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
1136
1193
  ],
1137
1194
  }]
1138
1195
  }], ctorParameters: function () {
@@ -1142,7 +1199,7 @@
1142
1199
  }] }, { type: Document, decorators: [{
1143
1200
  type: i0.Inject,
1144
1201
  args: [common$1.DOCUMENT]
1145
- }] }, { type: i5__namespace.Observable, decorators: [{
1202
+ }] }, { type: i1__namespace.Observable, decorators: [{
1146
1203
  type: i0.Inject,
1147
1204
  args: [tokens.TUI_SELECTION_STREAM]
1148
1205
  }] }, { type: i0__namespace.ElementRef, decorators: [{
@@ -1178,7 +1235,7 @@
1178
1235
  TuiDropdownContextDirective,
1179
1236
  TuiDropdownPositionDirective,
1180
1237
  TuiDropdownPositionSidedDirective,
1181
- TuiDropdownSelectionDirective], imports: [i1.PolymorpheusModule,
1238
+ TuiDropdownSelectionDirective], imports: [i4.PolymorpheusModule,
1182
1239
  i2.TuiActiveZoneModule,
1183
1240
  i2.TuiOverscrollModule,
1184
1241
  i1$2.TuiScrollbarModule,
@@ -1195,7 +1252,7 @@
1195
1252
  TuiDropdownPositionSidedDirective,
1196
1253
  TuiDropdownSelectionDirective] });
1197
1254
  TuiDropdownModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, imports: [[
1198
- i1.PolymorpheusModule,
1255
+ i4.PolymorpheusModule,
1199
1256
  i2.TuiActiveZoneModule,
1200
1257
  i2.TuiOverscrollModule,
1201
1258
  i1$2.TuiScrollbarModule,
@@ -1206,7 +1263,7 @@
1206
1263
  type: i0.NgModule,
1207
1264
  args: [{
1208
1265
  imports: [
1209
- i1.PolymorpheusModule,
1266
+ i4.PolymorpheusModule,
1210
1267
  i2.TuiActiveZoneModule,
1211
1268
  i2.TuiOverscrollModule,
1212
1269
  i1$2.TuiScrollbarModule,