@taiga-ui/core 3.29.2 → 3.30.0-dev.main-acad351

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 (84) hide show
  1. package/bundles/taiga-ui-core-animations.umd.js +2 -10
  2. package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-alert.umd.js +10 -15
  4. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-error.umd.js +2 -3
  6. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-hints-host.umd.js +28 -7
  8. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-root.umd.js +13 -3
  10. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +34 -62
  12. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-directives-dropdown.umd.js +21 -24
  14. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-directives-hint.umd.js +18 -22
  16. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-enums.umd.js +1 -0
  18. package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-services.umd.js +4 -3
  20. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-tokens.umd.js +4 -1
  22. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-utils-format.umd.js +10 -0
  24. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-utils-mask.umd.js +4 -0
  26. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  27. package/components/alert/alert.component.d.ts +2 -9
  28. package/components/error/error.component.d.ts +2 -9
  29. package/components/hints-host/hints-host.component.d.ts +9 -4
  30. package/components/root/root.component.d.ts +3 -1
  31. package/components/scroll-controls/scroll-controls.component.d.ts +3 -11
  32. package/components/scroll-controls/scrollbar.directive.d.ts +3 -6
  33. package/constants/cache-basting-payload.d.ts +1 -1
  34. package/directives/dropdown/dropdown.component.d.ts +3 -11
  35. package/directives/dropdown/dropdown.directive.d.ts +2 -2
  36. package/directives/hint/hint.component.d.ts +4 -12
  37. package/enums/dropdown-animation.d.ts +1 -0
  38. package/esm2015/animations/animations.js +3 -11
  39. package/esm2015/components/alert/alert.component.js +12 -17
  40. package/esm2015/components/error/error.component.js +3 -4
  41. package/esm2015/components/hints-host/hints-host.component.js +27 -6
  42. package/esm2015/components/root/root.component.js +15 -5
  43. package/esm2015/components/scroll-controls/scroll-controls.component.js +6 -16
  44. package/esm2015/components/scroll-controls/scrollbar.directive.js +19 -39
  45. package/esm2015/directives/dropdown/dropdown.component.js +24 -27
  46. package/esm2015/directives/dropdown/dropdown.directive.js +4 -4
  47. package/esm2015/directives/hint/hint.component.js +19 -23
  48. package/esm2015/enums/dropdown-animation.js +2 -1
  49. package/esm2015/services/position.service.js +5 -3
  50. package/esm2015/tokens/animation-options.js +2 -1
  51. package/esm2015/tokens/scroll-ref.js +6 -3
  52. package/esm2015/utils/format/format-phone.js +11 -1
  53. package/esm2015/utils/mask/create-correction-mask.js +5 -1
  54. package/fesm2015/taiga-ui-core-animations.js +2 -10
  55. package/fesm2015/taiga-ui-core-animations.js.map +1 -1
  56. package/fesm2015/taiga-ui-core-components-alert.js +11 -16
  57. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  58. package/fesm2015/taiga-ui-core-components-error.js +2 -3
  59. package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
  60. package/fesm2015/taiga-ui-core-components-hints-host.js +26 -5
  61. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  62. package/fesm2015/taiga-ui-core-components-root.js +14 -4
  63. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  64. package/fesm2015/taiga-ui-core-components-scroll-controls.js +23 -51
  65. package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
  66. package/fesm2015/taiga-ui-core-directives-dropdown.js +19 -22
  67. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  68. package/fesm2015/taiga-ui-core-directives-hint.js +18 -22
  69. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  70. package/fesm2015/taiga-ui-core-enums.js +1 -0
  71. package/fesm2015/taiga-ui-core-enums.js.map +1 -1
  72. package/fesm2015/taiga-ui-core-services.js +4 -2
  73. package/fesm2015/taiga-ui-core-services.js.map +1 -1
  74. package/fesm2015/taiga-ui-core-tokens.js +5 -2
  75. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  76. package/fesm2015/taiga-ui-core-utils-format.js +10 -0
  77. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  78. package/fesm2015/taiga-ui-core-utils-mask.js +4 -0
  79. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  80. package/package.json +4 -4
  81. package/services/position.service.d.ts +1 -1
  82. package/styles/theme/wrapper/textfield.less +8 -8
  83. package/utils/format/format-phone.d.ts +10 -0
  84. package/utils/mask/create-correction-mask.d.ts +4 -0
@@ -2,7 +2,7 @@
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
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, i9, tokens, operators, utils, i4, i1$1, i1$2, i3, ngEventPlugins, common$1) { 'use strict';
5
+ })(this, (function (exports, i0, common, i2, i1, animations, i5, 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;
@@ -25,7 +25,7 @@
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
27
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1);
28
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
28
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
29
29
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
31
31
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
@@ -357,14 +357,14 @@
357
357
  });
358
358
 
359
359
  var TuiDropdownDirective = /** @class */ (function () {
360
- function TuiDropdownDirective(el, hapica, injector, dropdownService) {
360
+ function TuiDropdownDirective(el, dropdown, injector, dropdownService) {
361
361
  this.el = el;
362
- this.hapica = hapica;
362
+ this.dropdown = dropdown;
363
363
  this.injector = injector;
364
364
  this.dropdownService = dropdownService;
365
365
  this.dropdownBoxRef = null;
366
366
  this.type = 'dropdown';
367
- this.component = new i4.PolymorpheusComponent(this.hapica, this.injector);
367
+ this.component = new i4.PolymorpheusComponent(this.dropdown, this.injector);
368
368
  }
369
369
  Object.defineProperty(TuiDropdownDirective.prototype, "position", {
370
370
  get: function () {
@@ -608,17 +608,16 @@
608
608
  * using default style of white rounded box with a shadow
609
609
  */
610
610
  var TuiDropdownComponent = /** @class */ (function () {
611
- function TuiDropdownComponent(position$, destroy$, directive, el, host, accessor, win, animationOptions, options, hoverDirective, visualViewportService) {
611
+ function TuiDropdownComponent(visualViewportService, position$, destroy$, directive, animation, el, host, accessor, win, options, hoverDirective) {
612
612
  var _this = this;
613
613
  this.directive = directive;
614
+ this.animation = animation;
614
615
  this.el = el;
615
616
  this.host = host;
616
617
  this.accessor = accessor;
617
618
  this.win = win;
618
- this.animationOptions = animationOptions;
619
619
  this.options = options;
620
620
  this.hoverDirective = hoverDirective;
621
- this.dropdownAnimation = Object.assign({ value: "fadeInTop" /* FadeInTop */ }, this.animationOptions);
622
621
  position$
623
622
  .pipe(operators.map(function (point) { return _this.directive.position === 'fixed'
624
623
  ? visualViewportService.correct(point)
@@ -692,10 +691,10 @@
692
691
  };
693
692
  return TuiDropdownComponent;
694
693
  }());
695
- TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i9.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 }, { token: i9.TuiVisualViewportService }], 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: [
694
+ TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i5.TuiVisualViewportService }, { token: i5.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i0.ElementRef }, { token: i2.AbstractTuiPortalHostComponent }, { token: i1.TuiRectAccessor }, { token: common.WINDOW }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
695
+ TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { properties: { "@tuiDropdownAnimation": "animation" } }, providers: [
697
696
  i2.TuiDestroyService,
698
- i9.TuiPositionService,
697
+ i5.TuiPositionService,
699
698
  i1.tuiPositionAccessorFor('dropdown'),
700
699
  i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
701
700
  ], 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 #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;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 });
@@ -707,19 +706,23 @@
707
706
  styleUrls: ['./dropdown.style.less'],
708
707
  providers: [
709
708
  i2.TuiDestroyService,
710
- i9.TuiPositionService,
709
+ i5.TuiPositionService,
711
710
  i1.tuiPositionAccessorFor('dropdown'),
712
711
  i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
713
712
  ],
714
713
  animations: [animations.tuiDropdownAnimation],
714
+ host: { '[@tuiDropdownAnimation]': 'animation' },
715
715
  // @bad TODO: OnPush
716
716
  // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
717
717
  changeDetection: i0.ChangeDetectionStrategy.Default,
718
718
  }]
719
719
  }], ctorParameters: function () {
720
- return [{ type: i1__namespace.Observable, decorators: [{
720
+ return [{ type: i5__namespace.TuiVisualViewportService, decorators: [{
721
+ type: i0.Inject,
722
+ args: [i5.TuiVisualViewportService]
723
+ }] }, { type: i1__namespace.Observable, decorators: [{
721
724
  type: i0.Inject,
722
- args: [i9.TuiPositionService]
725
+ args: [i5.TuiPositionService]
723
726
  }] }, { type: i1__namespace.Observable, decorators: [{
724
727
  type: i0.Self
725
728
  }, {
@@ -728,6 +731,9 @@
728
731
  }] }, { type: TuiDropdownDirective, decorators: [{
729
732
  type: i0.Inject,
730
733
  args: [TuiDropdownDirective]
734
+ }] }, { type: undefined, decorators: [{
735
+ type: i0.Inject,
736
+ args: [tokens.TUI_ANIMATION_OPTIONS]
731
737
  }] }, { type: i0__namespace.ElementRef, decorators: [{
732
738
  type: i0.Inject,
733
739
  args: [i0.ElementRef]
@@ -740,9 +746,6 @@
740
746
  }] }, { type: Window, decorators: [{
741
747
  type: i0.Inject,
742
748
  args: [common.WINDOW]
743
- }] }, { type: undefined, decorators: [{
744
- type: i0.Inject,
745
- args: [tokens.TUI_ANIMATION_OPTIONS]
746
749
  }] }, { type: undefined, decorators: [{
747
750
  type: i0.Inject,
748
751
  args: [TUI_DROPDOWN_OPTIONS]
@@ -751,14 +754,8 @@
751
754
  }, {
752
755
  type: i0.Inject,
753
756
  args: [TuiDropdownHoverDirective]
754
- }] }, { type: i9__namespace.TuiVisualViewportService, decorators: [{
755
- type: i0.Inject,
756
- args: [i9.TuiVisualViewportService]
757
757
  }] }];
758
- }, propDecorators: { dropdownAnimation: [{
759
- type: i0.HostBinding,
760
- args: ['@tuiDropdownAnimation']
761
- }] } });
758
+ } });
762
759
 
763
760
  function activeZoneFilter(target) {
764
761
  return !this.activeZone.contains(target);