@taiga-ui/addon-mobile 2.74.0 → 2.76.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 (159) hide show
  1. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js +47 -2
  2. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +1 -1
  4. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +60 -15
  5. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
  6. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +1 -1
  7. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js +48 -3
  8. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +1 -1
  9. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +1 -1
  10. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +51 -6
  11. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
  12. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js +1 -1
  13. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +1 -1
  14. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +85 -40
  15. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
  16. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +1 -1
  17. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +48 -3
  18. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +1 -1
  19. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +1 -1
  20. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +48 -3
  21. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +1 -1
  22. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-addon-mobile-const.umd.js +46 -1
  24. package/bundles/taiga-ui-addon-mobile-const.umd.js.map +1 -1
  25. package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +48 -3
  27. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +1 -1
  28. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +1 -1
  29. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +51 -6
  30. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +1 -1
  31. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +1 -1
  32. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +53 -8
  33. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +1 -1
  34. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +1 -1
  35. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +56 -11
  36. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +1 -1
  37. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +61 -16
  39. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +1 -1
  40. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +1 -1
  41. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +48 -3
  42. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +1 -1
  43. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +1 -1
  44. package/const/mobile-alert-options.d.ts +3 -4
  45. package/directives/mobile-tabs/mobile-tabs.directive.d.ts +1 -1
  46. package/esm2015/components/mobile-calendar/mobile-calendar.component.js +15 -15
  47. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +2 -2
  48. package/esm2015/components/mobile-dialog/mobile-dialog.component.js +3 -3
  49. package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +3 -3
  50. package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +2 -2
  51. package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +2 -2
  52. package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +2 -2
  53. package/esm2015/components/sheet/components/sheet/sheet.component.js +13 -13
  54. package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +2 -2
  55. package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +4 -4
  56. package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +2 -2
  57. package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +2 -2
  58. package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +5 -5
  59. package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +9 -9
  60. package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +8 -8
  61. package/esm2015/components/sheet/sheet.directive.js +3 -3
  62. package/esm2015/components/theme-android/theme-android.component.js +3 -3
  63. package/esm2015/components/theme-ios/theme-ios.component.js +3 -3
  64. package/esm2015/const/mobile-alert-options.js +1 -1
  65. package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +3 -3
  66. package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +2 -2
  67. package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +5 -5
  68. package/esm2015/directives/ripple/ripple-styles.component.js +2 -2
  69. package/esm2015/directives/ripple/ripple.directive.js +7 -7
  70. package/esm2015/directives/sidebar/sidebar.component.js +7 -7
  71. package/esm2015/directives/sidebar/sidebar.directive.js +5 -5
  72. package/esm2015/directives/touchable/touchable.directive.js +15 -15
  73. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +3 -3
  74. package/esm2015/types/touch-mode.js +1 -1
  75. package/esm5/components/mobile-calendar/mobile-calendar.component.js +15 -15
  76. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +2 -2
  77. package/esm5/components/mobile-dialog/mobile-dialog.component.js +3 -3
  78. package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +3 -3
  79. package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +2 -2
  80. package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +2 -2
  81. package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +2 -2
  82. package/esm5/components/sheet/components/sheet/sheet.component.js +13 -13
  83. package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +2 -2
  84. package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +4 -4
  85. package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +2 -2
  86. package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +2 -2
  87. package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +5 -5
  88. package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +9 -9
  89. package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +8 -8
  90. package/esm5/components/sheet/sheet.directive.js +3 -3
  91. package/esm5/components/theme-android/theme-android.component.js +3 -3
  92. package/esm5/components/theme-ios/theme-ios.component.js +3 -3
  93. package/esm5/const/mobile-alert-options.js +1 -1
  94. package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +3 -3
  95. package/esm5/directives/mobile-tabs/mobile-tabs.component.js +2 -2
  96. package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +5 -5
  97. package/esm5/directives/ripple/ripple-styles.component.js +2 -2
  98. package/esm5/directives/ripple/ripple.directive.js +7 -7
  99. package/esm5/directives/sidebar/sidebar.component.js +7 -7
  100. package/esm5/directives/sidebar/sidebar.directive.js +5 -5
  101. package/esm5/directives/touchable/touchable.directive.js +16 -16
  102. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +3 -3
  103. package/esm5/types/touch-mode.js +1 -1
  104. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
  105. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
  106. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +14 -14
  107. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
  108. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +2 -2
  109. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
  110. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +5 -5
  111. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
  112. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +39 -39
  113. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
  114. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +2 -2
  115. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
  116. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +2 -2
  117. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
  118. package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
  119. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +2 -2
  120. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
  121. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +5 -5
  122. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
  123. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +7 -7
  124. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
  125. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +10 -10
  126. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
  127. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +14 -14
  128. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
  129. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +2 -2
  130. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
  131. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
  132. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
  133. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +14 -14
  134. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
  135. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +2 -2
  136. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
  137. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +5 -5
  138. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
  139. package/fesm5/taiga-ui-addon-mobile-components-sheet.js +39 -39
  140. package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
  141. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +2 -2
  142. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
  143. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +2 -2
  144. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
  145. package/fesm5/taiga-ui-addon-mobile-const.js.map +1 -1
  146. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +2 -2
  147. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
  148. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +5 -5
  149. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
  150. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +7 -7
  151. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
  152. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +10 -10
  153. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
  154. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +15 -15
  155. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
  156. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +2 -2
  157. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
  158. package/package.json +4 -4
  159. package/types/touch-mode.d.ts +1 -1
@@ -59,7 +59,7 @@ var TuiRippleStylesComponent = /** @class */ (function () {
59
59
  }
60
60
  TuiRippleStylesComponent = __decorate([
61
61
  Component({
62
- template: "",
62
+ template: '',
63
63
  encapsulation: ViewEncapsulation.None,
64
64
  styles: ["@keyframes tuiRippleOn{from{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@keyframes tuiRippleOff{from{transform:none;opacity:.12}to{transform:none;opacity:0}}[tuiRipple]{position:relative;overflow:hidden}.tui-ripple{position:absolute;z-index:100;border-radius:100%;background:currentColor;transform:scale(0);animation-duration:450ms;animation-fill-mode:forwards;pointer-events:none}"]
65
65
  })
@@ -73,18 +73,18 @@ var TuiRippleDirective = /** @class */ (function () {
73
73
  var _this = this;
74
74
  var nativeElement = _a.nativeElement;
75
75
  directiveStyles.addComponent(TuiRippleStylesComponent);
76
- var touchEnd$ = typedFromEvent(nativeElement, "touchend");
77
- var touchMove$ = typedFromEvent(nativeElement, "touchmove");
76
+ var touchEnd$ = typedFromEvent(nativeElement, 'touchend');
77
+ var touchMove$ = typedFromEvent(nativeElement, 'touchmove');
78
78
  end$.subscribe(function (element) {
79
79
  renderer.removeChild(nativeElement, element);
80
80
  });
81
81
  start$
82
82
  .pipe(mergeMap(function (ripple) {
83
- var animationEndOn$ = typedFromEvent(ripple, "animationend");
83
+ var animationEndOn$ = typedFromEvent(ripple, 'animationend');
84
84
  return race(timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)), touchEnd$.pipe(mapTo(true))).pipe(take(1),
85
85
  // eslint-disable-next-line rxjs/no-unsafe-takeuntil
86
86
  takeUntil(touchMove$), tap(function () {
87
- renderer.setStyle(ripple, "background", _this.tuiRipple || null);
87
+ renderer.setStyle(ripple, 'background', _this.tuiRipple || null);
88
88
  renderer.appendChild(nativeElement, ripple);
89
89
  }), switchMap(function (isTap) {
90
90
  return isTap
@@ -93,7 +93,7 @@ var TuiRippleDirective = /** @class */ (function () {
93
93
  }), mapTo(ripple));
94
94
  }), takeUntil(destroy$))
95
95
  .subscribe(function (element) {
96
- renderer.setStyle(element, "animationName", RIPPLE_OFF);
96
+ renderer.setStyle(element, 'animationName', RIPPLE_OFF);
97
97
  });
98
98
  }
99
99
  TuiRippleDirective.ctorParameters = function () { return [
@@ -109,7 +109,7 @@ var TuiRippleDirective = /** @class */ (function () {
109
109
  ], TuiRippleDirective.prototype, "tuiRipple", void 0);
110
110
  TuiRippleDirective = __decorate([
111
111
  Directive({
112
- selector: "[tuiRipple]",
112
+ selector: '[tuiRipple]',
113
113
  providers: TUI_RIPPLE_PROVIDERS,
114
114
  }),
115
115
  __param(0, Inject(ElementRef)),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`./ripple.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: `[tuiRipple]`,\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, `touchend`);\n const touchMove$ = typedFromEvent(nativeElement, `touchmove`);\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, `animationend`);\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n `background`,\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, `animationName`, RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;IAWa,SAAS,GAAG,cAAc;IAC1B,UAAU,GAAG,eAAe;IAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACpC;IACW,cAAc,GAAG,IAAI,cAAc,CAC5C,qCAAqC,EACvC;IACW,oBAAoB,GAAe;IAC5C,iBAAiB;IACjB;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC9D,UAAU,EAAE,kBAAkB;KACjC;IACD;QACI,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC;QACtE,UAAU,EAAE,gBAAgB;KA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A+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;YAC5D,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,eAAe,EAAE,CAAC,wBAAwB,CAAC;SAC9C,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACVA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: '[tuiRipple]',\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, 'touchend');\n const touchMove$ = typedFromEvent(nativeElement, 'touchmove');\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, 'animationend');\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n 'background',\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, 'animationName', RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;IAWa,SAAS,GAAG,cAAc;IAC1B,UAAU,GAAG,eAAe;IAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACpC;IACW,cAAc,GAAG,IAAI,cAAc,CAC5C,qCAAqC,EACvC;IACW,oBAAoB,GAAe;IAC5C,iBAAiB;IACjB;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC9D,UAAU,EAAE,kBAAkB;KACjC;IACD;QACI,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC;QACtE,UAAU,EAAE,gBAAgB;KAC/B;EACH;AAEF;SACgB,kBAAkB,CAC9B,cAAuB,EACvB,KAAc,EACd,EAAwC,EACxC,QAAmB;QADlB,gCAAa;IAGd,OAAO,KAAK,IAAI,CAAC,cAAc;UACzB,KAAK;UACL,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAC5C,GAAG,CAAC,UAAC,EAAS;gBAAR,oBAAO;YACH,IAAA,gCAAgD,EAA/C,oBAAO,EAAE,oBAAsC,CAAC;YACjD,IAAA,0CACmC,EADlC,gBAAK,EAAE,kBAAM,EAAE,YAAG,EAAE,cACc,CAAC;YAC1C,IAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;YAC1D,IAAM,SAAS,GAAG,MAAM,GAAG,CAAC,CAAC;YAC7B,IAAM,CAAC,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC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ACkC,yBAAyB,uBAA5E,MAAM,SAAC,yBAAyB;gBACJ,SAAS,uBAArC,MAAM,SAAC,SAAS;gBACoB,iBAAiB,uBAArD,MAAM,SAAC,iBAAiB;gBACS,UAAU,uBAA3C,MAAM,SAAC,gBAAgB;gBACM,UAAU,uBAAvC,MAAM,SAAC,cAAc;;IAR1B;QADC,KAAK,EAAE;yDACW;IAFV,kBAAkB;QAJ9B,SAAS,CAAC;YACP,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,oBAAoB;SAClC,CAAC;QAMO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;QACjC,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACxB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;OAVlB,kBAAkB,CAyD9B;IAAD,yBAAC;CAzDD;;;ICrBA;KAA+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;YAC5D,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,eAAe,EAAE,CAAC,wBAAwB,CAAC;SAC9C,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACVA;;;;;;"}
@@ -13,7 +13,7 @@ var TuiSidebarDirective = /** @class */ (function (_super) {
13
13
  _this.componentFactoryResolver = componentFactoryResolver;
14
14
  _this.portalService = portalService;
15
15
  _this.sidebarRef = null;
16
- _this.direction = "left";
16
+ _this.direction = 'left';
17
17
  _this.autoWidth = false;
18
18
  return _this;
19
19
  }
@@ -55,17 +55,17 @@ var TuiSidebarDirective = /** @class */ (function (_super) {
55
55
  { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
56
56
  ]; };
57
57
  __decorate([
58
- Input("tuiSidebarDirection")
58
+ Input('tuiSidebarDirection')
59
59
  ], TuiSidebarDirective.prototype, "direction", void 0);
60
60
  __decorate([
61
- Input("tuiSidebarAutoWidth")
61
+ Input('tuiSidebarAutoWidth')
62
62
  ], TuiSidebarDirective.prototype, "autoWidth", void 0);
63
63
  __decorate([
64
64
  Input()
65
65
  ], TuiSidebarDirective.prototype, "tuiSidebar", null);
66
66
  TuiSidebarDirective = __decorate([
67
67
  Directive({
68
- selector: "[tuiSidebar]",
68
+ selector: '[tuiSidebar]',
69
69
  }),
70
70
  __param(0, Inject(TemplateRef)),
71
71
  __param(1, Inject(Injector)),
@@ -81,12 +81,12 @@ var TuiSidebarComponent = /** @class */ (function () {
81
81
  function TuiSidebarComponent(options, directive) {
82
82
  this.options = options;
83
83
  this.directive = directive;
84
- this.left = __assign({ value: "left" }, this.options);
85
- this.right = __assign({ value: "right" }, this.options);
84
+ this.left = __assign({ value: 'left' }, this.options);
85
+ this.right = __assign({ value: 'right' }, this.options);
86
86
  }
87
87
  Object.defineProperty(TuiSidebarComponent.prototype, "animation", {
88
88
  get: function () {
89
- return this.direction === "left" ? this.left : this.right;
89
+ return this.direction === 'left' ? this.left : this.right;
90
90
  },
91
91
  enumerable: true,
92
92
  configurable: true
@@ -127,14 +127,14 @@ var TuiSidebarComponent = /** @class */ (function () {
127
127
  { type: TuiSidebarDirective, decorators: [{ type: Inject, args: [TuiSidebarDirective,] }] }
128
128
  ]; };
129
129
  __decorate([
130
- HostBinding("@tuiSlideIn")
130
+ HostBinding('@tuiSlideIn')
131
131
  ], TuiSidebarComponent.prototype, "animation", null);
132
132
  __decorate([
133
- HostBinding("class")
133
+ HostBinding('class')
134
134
  ], TuiSidebarComponent.prototype, "directionHostClass", null);
135
135
  TuiSidebarComponent = __decorate([
136
136
  Component({
137
- selector: "aside[tuiSidebar]",
137
+ selector: 'aside[tuiSidebar]',
138
138
  template: "<div\n polymorpheus-outlet\n tuiActiveZone\n class=\"t-wrapper\"\n [content]=\"content\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n></div>\n",
139
139
  changeDetection: ChangeDetectionStrategy.OnPush,
140
140
  animations: [tuiSlideIn],
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.js","sources":["ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.directive.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.component.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.module.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Inject,\n Injector,\n Input,\n OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPortalService} from '@taiga-ui/cdk';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n@Directive({\n selector: `[tuiSidebar]`,\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input(`tuiSidebarDirection`)\n direction: TuiHorizontalDirection = `left`;\n\n @Input(`tuiSidebarAutoWidth`)\n autoWidth = false;\n\n @Input()\n set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n constructor(\n @Inject(TemplateRef) readonly content: TemplateRef<T>,\n @Inject(Injector) private readonly injector: Injector,\n @Inject(ComponentFactoryResolver)\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n @Inject(TuiPortalService)\n private readonly portalService: TuiPortalService,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(content, changeDetectorRef);\n }\n\n ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n const componentFactory =\n this.componentFactoryResolver.resolveComponentFactory(TuiSidebarComponent);\n\n this.sidebarRef = this.portalService.add(componentFactory, this.injector);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.portalService.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {\n TUI_ANIMATION_OPTIONS,\n TuiAnimationOptions,\n TuiHorizontalDirection,\n tuiSlideIn,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n// @dynamic\n@Component({\n selector: `aside[tuiSidebar]`,\n templateUrl: `./sidebar.template.html`,\n styleUrls: [`./sidebar.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly left = {\n value: `left`,\n ...this.options,\n } as const;\n\n private readonly right = {\n value: `right`,\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(TuiSidebarDirective) private readonly directive: TuiSidebarDirective,\n ) {}\n\n @HostBinding(`@tuiSlideIn`)\n get animation(): TuiAnimationOptions {\n return this.direction === `left` ? this.left : this.right;\n }\n\n @HostBinding(`class`)\n get directionHostClass(): string {\n return `t-${this.directive.direction}`;\n }\n\n get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n\n ngDoCheck(): void {\n this.directive.check();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n@NgModule({\n imports: [TuiActiveZoneModule, PolymorpheusModule],\n declarations: [TuiSidebarDirective, TuiSidebarComponent],\n entryComponents: [TuiSidebarComponent],\n exports: [TuiSidebarDirective],\n})\nexport class TuiSidebarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAqBY,uCAAuB;IAoB/B,6BACkC,OAAuB,EAClB,QAAkB,EAEpC,wBAAkD,EAElD,aAA+B,EACrB,iBAAoC;QAPnE,YASI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QATiC,aAAO,GAAP,OAAO,CAAgB;QAClB,cAAQ,GAAR,QAAQ,CAAU;QAEpC,8BAAwB,GAAxB,wBAAwB,CAA0B;QAElD,mBAAa,GAAb,aAAa,CAAkB;QAvB5C,gBAAU,GAA6C,IAAI,CAAC;QAGpE,eAAS,GAA2B,MAAM,CAAC;QAG3C,eAAS,GAAG,KAAK,CAAC;;KAqBjB;IAlBD,sBAAI,2CAAU;aAAd,UAAe,IAAa;YACxB,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;SACJ;;;OAAA;IAcD,yCAAW,GAAX;QACI,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAEO,kCAAI,GAAZ;QACI,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B,OAAO;SACV;QAED,IAAM,gBAAgB,GAClB,IAAI,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;QAE/E,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,CAAC,iBAAiB,CA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B,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACbA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.js","sources":["ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.directive.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.component.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.module.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Inject,\n Injector,\n Input,\n OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPortalService} from '@taiga-ui/cdk';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n@Directive({\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n autoWidth = false;\n\n @Input()\n set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n constructor(\n @Inject(TemplateRef) readonly content: TemplateRef<T>,\n @Inject(Injector) private readonly injector: Injector,\n @Inject(ComponentFactoryResolver)\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n @Inject(TuiPortalService)\n private readonly portalService: TuiPortalService,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(content, changeDetectorRef);\n }\n\n ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n const componentFactory =\n this.componentFactoryResolver.resolveComponentFactory(TuiSidebarComponent);\n\n this.sidebarRef = this.portalService.add(componentFactory, this.injector);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.portalService.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {\n TUI_ANIMATION_OPTIONS,\n TuiAnimationOptions,\n TuiHorizontalDirection,\n tuiSlideIn,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n// @dynamic\n@Component({\n selector: 'aside[tuiSidebar]',\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly left = {\n value: 'left',\n ...this.options,\n } as const;\n\n private readonly right = {\n value: 'right',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(TuiSidebarDirective) private readonly directive: TuiSidebarDirective,\n ) {}\n\n @HostBinding('@tuiSlideIn')\n get animation(): TuiAnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n @HostBinding('class')\n get directionHostClass(): string {\n return `t-${this.directive.direction}`;\n }\n\n get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n\n ngDoCheck(): void {\n this.directive.check();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n@NgModule({\n imports: [TuiActiveZoneModule, PolymorpheusModule],\n declarations: [TuiSidebarDirective, TuiSidebarComponent],\n entryComponents: [TuiSidebarComponent],\n exports: [TuiSidebarDirective],\n})\nexport class TuiSidebarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAqBY,uCAAuB;IAoB/B,6BACkC,OAAuB,EAClB,QAAkB,EAEpC,wBAAkD,EAElD,aAA+B,EACrB,iBAAoC;QAPnE,YASI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QATiC,aAAO,GAAP,OAAO,CAAgB;QAClB,cAAQ,GAAR,QAAQ,CAAU;QAEpC,8BAAwB,GAAxB,wBAAwB,CAA0B;QAElD,mBAAa,GAAb,aAAa,CAAkB;QAvB5C,gBAAU,GAA6C,IAAI,CAAC;QAGpE,eAAS,GAA2B,MAAM,CAAC;QAG3C,eAAS,GAAG,KAAK,CAAC;;KAqBjB;IAlBD,sBAAI,2CAAU;aAAd,UAAe,IAAa;YACxB,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,IAAI,EAAE,CAAC;aACf;SACJ;;;OAAA;IAcD,yCAAW,GAAX;QACI,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAEO,kCAAI,GAAZ;QACI,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B,OAAO;SACV;QAED,IAAM,gBAAgB,GAClB,IAAI,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;QAE/E,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;KACrD;IAEO,kCAAI,GAAZ;QACI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;CAAhC;;ACbA;;;;;;"}
@@ -7,40 +7,40 @@ import { race } from 'rxjs';
7
7
  import { tap, map, switchMap, filter, take, takeUntil } from 'rxjs/operators';
8
8
 
9
9
  var STYLE = {
10
- transform: "scale(0.95)",
11
- opacity: "0.6",
12
- background: "rgba(146, 153, 162, 0.12)",
10
+ transform: 'scale(0.95)',
11
+ opacity: '0.6',
12
+ background: 'rgba(146, 153, 162, 0.12)',
13
13
  };
14
14
  var TuiTouchableDirective = /** @class */ (function () {
15
15
  function TuiTouchableDirective(elementRef, isIos, _a, renderer, destroy$) {
16
16
  var _this = this;
17
17
  var nativeElement = _a.nativeElement;
18
- this.tuiTouchable = "";
18
+ this.tuiTouchable = '';
19
19
  if (!isIos) {
20
20
  return;
21
21
  }
22
22
  var element = elementRef ? elementRef.nativeElement : nativeElement;
23
- typedFromEvent(element, "touchstart", { passive: true })
23
+ typedFromEvent(element, 'touchstart', { passive: true })
24
24
  .pipe(tap(function () {
25
25
  _this.onTouchStart(renderer, element);
26
26
  }), map(function (_a) {
27
27
  var touches = _a.touches;
28
28
  return touches[touches.length - 1].identifier;
29
29
  }), switchMap(function (identifier) {
30
- return race(typedFromEvent(element, "touchmove", { passive: true }).pipe(filter(function (_a) {
30
+ return race(typedFromEvent(element, 'touchmove', { passive: true }).pipe(filter(function (_a) {
31
31
  var touches = _a.touches;
32
32
  return _this.hasTouchLeft(element, touches, identifier);
33
- })), typedFromEvent(element, "touchend")).pipe(take(1));
33
+ })), typedFromEvent(element, 'touchend')).pipe(take(1));
34
34
  }), takeUntil(destroy$))
35
35
  .subscribe(function () {
36
- renderer.removeStyle(element, "transform");
37
- renderer.removeStyle(element, "opacity");
38
- renderer.removeStyle(element, "background");
36
+ renderer.removeStyle(element, 'transform');
37
+ renderer.removeStyle(element, 'opacity');
38
+ renderer.removeStyle(element, 'background');
39
39
  });
40
40
  }
41
41
  Object.defineProperty(TuiTouchableDirective.prototype, "style", {
42
42
  get: function () {
43
- return this.tuiTouchable || "transform";
43
+ return this.tuiTouchable || 'transform';
44
44
  },
45
45
  enumerable: true,
46
46
  configurable: true
@@ -55,11 +55,11 @@ var TuiTouchableDirective = /** @class */ (function () {
55
55
  return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));
56
56
  };
57
57
  TuiTouchableDirective.prototype.onTouchStart = function (renderer, element) {
58
- if (this.style !== "transform") {
59
- renderer.removeStyle(element, "transition");
58
+ if (this.style !== 'transform') {
59
+ renderer.removeStyle(element, 'transition');
60
60
  }
61
61
  else {
62
- renderer.setStyle(element, "transition", "transform 0.2s");
62
+ renderer.setStyle(element, 'transition', 'transform 0.2s');
63
63
  }
64
64
  renderer.setStyle(element, this.style, STYLE[this.style]);
65
65
  };
@@ -76,7 +76,7 @@ var TuiTouchableDirective = /** @class */ (function () {
76
76
  ], TuiTouchableDirective.prototype, "tuiTouchable", void 0);
77
77
  TuiTouchableDirective = __decorate([
78
78
  Directive({
79
- selector: "[tuiTouchable]",
79
+ selector: '[tuiTouchable]',
80
80
  providers: [TuiDestroyService],
81
81
  }),
82
82
  __param(0, Optional()), __param(0, Inject(TUI_ELEMENT_REF)),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-touchable.js","sources":["ng://@taiga-ui/addon-mobile/directives/touchable/touchable.directive.ts","ng://@taiga-ui/addon-mobile/directives/touchable/touchable.module.ts","ng://@taiga-ui/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, Optional, Renderer2} from '@angular/core';\nimport {TuiTouchModeT} from '@taiga-ui/addon-mobile/types';\nimport {findTouchIndex} from '@taiga-ui/addon-mobile/utils';\nimport {\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {race} from 'rxjs';\nimport {filter, map, switchMap, take, takeUntil, tap} from 'rxjs/operators';\n\nconst STYLE = {\n transform: `scale(0.95)`,\n opacity: `0.6`,\n background: `rgba(146, 153, 162, 0.12)`,\n} as const;\n\n@Directive({\n selector: `[tuiTouchable]`,\n providers: [TuiDestroyService],\n})\nexport class TuiTouchableDirective {\n @Input()\n @tuiDefaultProp()\n tuiTouchable: TuiTouchModeT | '' = ``;\n\n constructor(\n @Optional() @Inject(TUI_ELEMENT_REF) elementRef: ElementRef<HTMLElement> | null,\n @Inject(TUI_IS_IOS) isIos: boolean,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n if (!isIos) {\n return;\n }\n\n const element = elementRef ? elementRef.nativeElement : nativeElement;\n\n typedFromEvent(element, `touchstart`, {passive: true})\n .pipe(\n tap(() => {\n this.onTouchStart(renderer, element);\n }),\n map(({touches}) => touches[touches.length - 1].identifier),\n switchMap(identifier =>\n race(\n typedFromEvent(element, `touchmove`, {passive: true}).pipe(\n filter(({touches}) =>\n this.hasTouchLeft(element, touches, identifier),\n ),\n ),\n typedFromEvent(element, `touchend`),\n ).pipe(take(1)),\n ),\n takeUntil(destroy$),\n )\n .subscribe(() => {\n renderer.removeStyle(element, `transform`);\n renderer.removeStyle(element, `opacity`);\n renderer.removeStyle(element, `background`);\n });\n }\n\n get style(): TuiTouchModeT {\n return this.tuiTouchable || `transform`;\n }\n\n private hasTouchLeft(\n element: HTMLElement,\n touches: TouchList,\n identifier: number,\n ): boolean {\n const {ownerDocument} = element;\n const id = findTouchIndex(touches, identifier);\n\n if (!ownerDocument || id === -1) {\n return true;\n }\n\n const {clientX, clientY} = touches[id];\n\n return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));\n }\n\n private onTouchStart(renderer: Renderer2, element: HTMLElement): void {\n if (this.style !== `transform`) {\n renderer.removeStyle(element, `transition`);\n } else {\n renderer.setStyle(element, `transition`, `transform 0.2s`);\n }\n\n renderer.setStyle(element, this.style, STYLE[this.style]);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiTouchableDirective} from './touchable.directive';\n\n@NgModule({\n declarations: [TuiTouchableDirective],\n exports: [TuiTouchableDirective],\n})\nexport class TuiTouchableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaA,IAAM,KAAK,GAAG;IACV,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,2BAA2B;CACjC,CAAC;;IAWP,+BACyC,UAA0C,EAC3D,KAAc,EACd,EAAwC,EACzC,QAAmB,EACX,QAA2B;QAL1D,iBAoCC;YAjCwB,gCAAa;QALtC,iBAAY,GAAuB,EAAE,CAAC;QASlC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO;SACV;QAED,IAAM,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,aAAa,GAAG,aAAa,CAAC;QAEtE,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;aACjD,IAAI,CACD,GAAG,CAAC;YACA,KAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACxC,CAAC,EACF,GAAG,CAAC,UAAC,EAAS;gBAAR,oBAAO;YAAM,OAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU;SAAA,CAAC,EAC1D,SAAS,CAAC,UAAA,UAAU;YAChB,OAAA,IAAI,CACA,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CACtD,MAAM,CAAC,UAAC,EAAS;oBAAR,oBAAO;gBACZ,OAAA,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;aAAA,CAClD,CACJ,EACD,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CACtC,CAAC,IAAI,CAAC,IAAI,CAAC,CA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M,SAAC,UAAU;gBACmB,UAAU,uBAA9C,MAAM,SAAC,UAAU;gBACW,SAAS,uBAArC,MAAM,SAAC,SAAS;gBACoB,iBAAiB,uBAArD,MAAM,SAAC,iBAAiB;;IAP7B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;+DACqB;IAH7B,qBAAqB;QAJjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,CAAC,iBAAiB,CAAC;SACjC,CAAC;QAOO,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;QACnC,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OAVrB,qBAAqB,CAyEjC;IAAD,4BAAC;CAzED;;;ICfA;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-addon-mobile-directives-touchable.js","sources":["ng://@taiga-ui/addon-mobile/directives/touchable/touchable.directive.ts","ng://@taiga-ui/addon-mobile/directives/touchable/touchable.module.ts","ng://@taiga-ui/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, Optional, Renderer2} from '@angular/core';\nimport {TuiTouchModeT} from '@taiga-ui/addon-mobile/types';\nimport {findTouchIndex} from '@taiga-ui/addon-mobile/utils';\nimport {\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {race} from 'rxjs';\nimport {filter, map, switchMap, take, takeUntil, tap} from 'rxjs/operators';\n\nconst STYLE = {\n transform: 'scale(0.95)',\n opacity: '0.6',\n background: 'rgba(146, 153, 162, 0.12)',\n} as const;\n\n@Directive({\n selector: '[tuiTouchable]',\n providers: [TuiDestroyService],\n})\nexport class TuiTouchableDirective {\n @Input()\n @tuiDefaultProp()\n tuiTouchable: TuiTouchModeT | '' = '';\n\n constructor(\n @Optional() @Inject(TUI_ELEMENT_REF) elementRef: ElementRef<HTMLElement> | null,\n @Inject(TUI_IS_IOS) isIos: boolean,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n if (!isIos) {\n return;\n }\n\n const element = elementRef ? elementRef.nativeElement : nativeElement;\n\n typedFromEvent(element, 'touchstart', {passive: true})\n .pipe(\n tap(() => {\n this.onTouchStart(renderer, element);\n }),\n map(({touches}) => touches[touches.length - 1].identifier),\n switchMap(identifier =>\n race(\n typedFromEvent(element, 'touchmove', {passive: true}).pipe(\n filter(({touches}) =>\n this.hasTouchLeft(element, touches, identifier),\n ),\n ),\n typedFromEvent(element, 'touchend'),\n ).pipe(take(1)),\n ),\n takeUntil(destroy$),\n )\n .subscribe(() => {\n renderer.removeStyle(element, 'transform');\n renderer.removeStyle(element, 'opacity');\n renderer.removeStyle(element, 'background');\n });\n }\n\n get style(): TuiTouchModeT {\n return this.tuiTouchable || 'transform';\n }\n\n private hasTouchLeft(\n element: HTMLElement,\n touches: TouchList,\n identifier: number,\n ): boolean {\n const {ownerDocument} = element;\n const id = findTouchIndex(touches, identifier);\n\n if (!ownerDocument || id === -1) {\n return true;\n }\n\n const {clientX, clientY} = touches[id];\n\n return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));\n }\n\n private onTouchStart(renderer: Renderer2, element: HTMLElement): void {\n if (this.style !== 'transform') {\n renderer.removeStyle(element, 'transition');\n } else {\n renderer.setStyle(element, 'transition', 'transform 0.2s');\n }\n\n renderer.setStyle(element, this.style, STYLE[this.style]);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiTouchableDirective} from './touchable.directive';\n\n@NgModule({\n declarations: [TuiTouchableDirective],\n exports: [TuiTouchableDirective],\n})\nexport class TuiTouchableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaA,IAAM,KAAK,GAAG;IACV,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,2BAA2B;CACjC,CAAC;;IAWP,+BACyC,UAA0C,EAC3D,KAAc,EACd,EAAwC,EACzC,QAAmB,EACX,QAA2B;QAL1D,iBAoCC;YAjCwB,gCAAa;QALtC,iBAAY,GAAuB,EAAE,CAAC;QASlC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO;SACV;QAED,IAAM,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,aAAa,GAAG,aAAa,CAAC;QAEtE,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;aACjD,IAAI,CACD,GAAG,CAAC;YACA,KAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACxC,CAAC,EACF,GAAG,CAAC,UAAC,EAAS;gBAAR,oBAAO;YAAM,OAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU;SAAA,CAAC,EAC1D,SAAS,CAAC,UAAA,UAAU;YAChB,OAAA,IAAI,CACA,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CACtD,MAAM,CAAC,UAAC,EAAS;oBAAR,oBAAO;gBACZ,OAAA,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;aAAA,CAClD,CACJ,EACD,cA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C7D;;gBAlEoD,UAAU,uBAA1D,QAAQ,YAAI,MAAM,SAAC,eAAe;8CAClC,MAAM,SAAC,UAAU;gBACmB,UAAU,uBAA9C,MAAM,SAAC,UAAU;gBACW,SAAS,uBAArC,MAAM,SAAC,SAAS;gBACoB,iBAAiB,uBAArD,MAAM,SAAC,iBAAiB;;IAP7B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;+DACqB;IAH7B,qBAAqB;QAJjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,CAAC,iBAAiB,CAAC;SACjC,CAAC;QAOO,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;QACnC,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OAVrB,qBAAqB,CAyEjC;IAAD,4BAAC;CAzED;;;ICfA;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;;;;;;"}
@@ -22,11 +22,11 @@ var TuiPrimitiveCalendarMobileComponent = /** @class */ (function (_super) {
22
22
  ]; };
23
23
  TuiPrimitiveCalendarMobileComponent = __decorate([
24
24
  Component({
25
- selector: "tui-primitive-calendar-mobile",
25
+ selector: 'tui-primitive-calendar-mobile',
26
26
  template: "<ng-container *tuiLet=\"month | tuiCalendarSheet as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n <div\n *tuiRepeatTimes=\"let colIndex of sheet[rowIndex].length\"\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [class.t-cell_today]=\"itemIsToday(sheet[rowIndex][colIndex])\"\n [class.t-cell_interval]=\"itemIsInterval(sheet[rowIndex][colIndex])\"\n [attr.data-state]=\"getItemState(sheet[rowIndex][colIndex])\"\n [attr.data-range]=\"getItemRange(sheet[rowIndex][colIndex])\"\n (click)=\"onItemClick(sheet[rowIndex][colIndex])\"\n >\n {{ sheet[rowIndex][colIndex].day }}\n </div>\n </div>\n</ng-container>\n",
27
27
  changeDetection: ChangeDetectionStrategy.OnPush,
28
28
  host: {
29
- '[class._ios]': "isIOS",
29
+ '[class._ios]': 'isIOS',
30
30
  },
31
31
  styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;z-index:0;display:flex;justify-content:space-between}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:after,.t-item:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;width:2.75rem;text-align:center;outline:0;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:2px solid transparent}.t-cell:before{content:'';position:absolute;top:0;left:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%,0);content:'';bottom:.3125rem;border-radius:.375rem;background-color:var(--tui-text-02)}.t-cell_interval:before{background:var(--tui-base-02)}:host._single .t-cell_interval:before{background:var(--tui-secondary-hover)}.t-cell_interval:not(:last-child):before{right:-2.75rem}.t-cell_interval:first-child>.t-item{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background-color:var(--tui-primary-text)}.t-cell[data-range]>.t-item{color:var(--tui-primary-text)}.t-cell[data-range]>.t-item:after,.t-cell[data-range]>.t-item:before{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hovered]>.t-item:after,.t-cell[data-range][data-state=hovered]>.t-item:before{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=pressed]>.t-item:after,.t-cell[data-range][data-state=pressed]>.t-item:before{background-color:var(--tui-primary-active)}.t-cell[data-range=end]>.t-item:before{left:.25rem}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translateX(1.4375rem) scaleY(.6) scaleX(.4) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.25rem}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translateX(-1.4375rem) scaleY(.6) scaleX(.4) rotate(45deg)}.t-cell[data-state=disabled]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-cell[data-state=disabled]>.t-item{opacity:.36}.t-cell[data-state=hovered]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-hover)}.t-cell[data-state=pressed]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-active)}:host{width:20.75rem;max-width:100vw}:host._ios{width:22.625rem}.t-row{height:3rem;justify-content:flex-start}.t-row:first-child{justify-content:flex-end}:host._ios .t-row{height:3.125rem}.t-cell{height:2.75rem;border-radius:100%;margin-right:.25rem}.t-cell:last-child,:host._ios .t-cell:last-child{margin-right:0}.t-cell:before{right:-100vw}.t-cell:first-child:before{left:-100vw}.t-cell_today:after{height:.375rem;width:.375rem;background-color:var(--tui-link)}.t-cell_interval:before{background-color:var(--tui-base-02)}.t-cell_interval:last-child:first-child:before{right:-100vw}.t-cell[data-range=end],.t-cell[data-range=single],.t-cell[data-range=start]{border-radius:100%;background-color:var(--tui-link);color:var(--tui-accent-text);font-weight:500}.t-cell[data-range=end]:after,.t-cell[data-range=single]:after,.t-cell[data-range=start]:after{background-color:var(--tui-base-01)}:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=single],:host._ios .t-cell[data-range=start]{font-weight:600}.t-cell[data-range=start]:before{left:50%;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]:not(:first-child):before{left:50%;background:var(--tui-base-01);border-radius:0}.t-cell[data-range=end]:first-child:before{right:50%;background-color:var(--tui-base-02)}:host._ios .t-cell{margin-right:.5625rem}:host._ios .t-cell:before{border-radius:.5rem}@media screen and (max-width:22.4375rem){.t-cell,:host._ios .t-cell{margin-right:.125rem}.t-cell:last-child,:host._ios .t-cell:last-child{margin-right:0}}"]
32
32
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js","sources":["ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, TuiPrimitiveCalendarComponent} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\n/**\n * @internal\n * @dynamic\n */\n@Component({\n selector: `tui-primitive-calendar-mobile`,\n templateUrl: `./primitive-calendar-mobile.template.html`,\n styleUrls: [`./primitive-calendar-mobile.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': `isIOS`,\n },\n})\nexport class TuiPrimitiveCalendarMobileComponent extends TuiPrimitiveCalendarComponent {\n constructor(\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_ORDERED_SHORT_WEEK_DAYS)\n weekDays$: Observable<[string, string, string, string, string, string, string]>,\n ) {\n super(weekDays$);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiRippleModule} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiLetModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiCalendarSheetPipeModule} from '@taiga-ui/core';\n\nimport {TuiPrimitiveCalendarMobileComponent} from './primitive-calendar-mobile.component';\n\n/**\n * @internal\n */\n@NgModule({\n imports: [\n TuiRepeatTimesModule,\n TuiCalendarSheetPipeModule,\n TuiRippleModule,\n TuiLetModule,\n ],\n declarations: [TuiPrimitiveCalendarMobileComponent],\n exports: [TuiPrimitiveCalendarMobileComponent],\n})\nexport class TuiPrimitiveCalendarMobileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;IAayD,uDAA6B;IAClF,6CACiC,KAAc,EAE3C,SAA+E;QAHnF,YAKI,kBAAM,SAAS,CAAC,SACnB;QALgC,WAAK,GAAL,KAAK,CAAS;;KAK9C;;8CALI,MAAM,SAAC,UAAU;gBAEP,UAAU,uBADpB,MAAM,SAAC,2BAA2B;;IAH9B,mCAAmC;QAT/C,SAAS,CAAC;YACP,QAAQ,EAAE,+BAA+B;YACzC,y5BAAwD;YAExD,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,IAAI,EAAE;gBACF,cAAc,EAAE,OAAO;aAC1B;;SACJ,CAAC;QAGO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;OAH/B,mCAAmC,CAQ/C;IAAD,0CAAC;CAAA,CARwD,6BAA6B;;ACXtF;;;;IAaA;KAAgD;IAAnC,gCAAgC;QAV5C,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,oBAAoB;gBACpB,0BAA0B;gBAC1B,eAAe;gBACf,YAAY;aACf;YACD,YAAY,EAAE,CAAC,mCAAmC,CAAC;YACnD,OAAO,EAAE,CAAC,mCAAmC,CAAC;SACjD,CAAC;OACW,gCAAgC,CAAG;IAAD,uCAAC;CAAhD;;ACpBA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js","sources":["ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, TuiPrimitiveCalendarComponent} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\n/**\n * @internal\n * @dynamic\n */\n@Component({\n selector: 'tui-primitive-calendar-mobile',\n templateUrl: './primitive-calendar-mobile.template.html',\n styleUrls: ['./primitive-calendar-mobile.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiPrimitiveCalendarMobileComponent extends TuiPrimitiveCalendarComponent {\n constructor(\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_ORDERED_SHORT_WEEK_DAYS)\n weekDays$: Observable<[string, string, string, string, string, string, string]>,\n ) {\n super(weekDays$);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiRippleModule} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiLetModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiCalendarSheetPipeModule} from '@taiga-ui/core';\n\nimport {TuiPrimitiveCalendarMobileComponent} from './primitive-calendar-mobile.component';\n\n/**\n * @internal\n */\n@NgModule({\n imports: [\n TuiRepeatTimesModule,\n TuiCalendarSheetPipeModule,\n TuiRippleModule,\n TuiLetModule,\n ],\n declarations: [TuiPrimitiveCalendarMobileComponent],\n exports: [TuiPrimitiveCalendarMobileComponent],\n})\nexport class TuiPrimitiveCalendarMobileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;IAayD,uDAA6B;IAClF,6CACiC,KAAc,EAE3C,SAA+E;QAHnF,YAKI,kBAAM,SAAS,CAAC,SACnB;QALgC,WAAK,GAAL,KAAK,CAAS;;KAK9C;;8CALI,MAAM,SAAC,UAAU;gBAEP,UAAU,uBADpB,MAAM,SAAC,2BAA2B;;IAH9B,mCAAmC;QAT/C,SAAS,CAAC;YACP,QAAQ,EAAE,+BAA+B;YACzC,y5BAAwD;YAExD,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,IAAI,EAAE;gBACF,cAAc,EAAE,OAAO;aAC1B;;SACJ,CAAC;QAGO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;OAH/B,mCAAmC,CAQ/C;IAAD,0CAAC;CAAA,CARwD,6BAA6B;;ACXtF;;;;IAaA;KAAgD;IAAnC,gCAAgC;QAV5C,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,oBAAoB;gBACpB,0BAA0B;gBAC1B,eAAe;gBACf,YAAY;aACf;YACD,YAAY,EAAE,CAAC,mCAAmC,CAAC;YACnD,OAAO,EAAE,CAAC,mCAAmC,CAAC;SACjD,CAAC;OACW,gCAAgC,CAAG;IAAD,uCAAC;CAAhD;;ACpBA;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-mobile",
3
- "version": "2.74.0",
3
+ "version": "2.76.0",
4
4
  "description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
5
5
  "keywords": [
6
6
  "angular",
@@ -15,9 +15,9 @@
15
15
  "@angular/common": ">=9.0.0",
16
16
  "@angular/core": ">=9.0.0",
17
17
  "@ng-web-apis/common": ">=1.12.1 < 2",
18
- "@taiga-ui/cdk": ">=2.74.0",
19
- "@taiga-ui/core": ">=2.74.0",
20
- "@taiga-ui/kit": ">=2.74.0",
18
+ "@taiga-ui/cdk": ">=2.76.0",
19
+ "@taiga-ui/core": ">=2.76.0",
20
+ "@taiga-ui/kit": ">=2.76.0",
21
21
  "@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
22
22
  "rxjs": ">=6.0.0"
23
23
  },
@@ -1 +1 @@
1
- export declare type TuiTouchModeT = 'transform' | 'opacity' | 'background';
1
+ export declare type TuiTouchModeT = 'background' | 'opacity' | 'transform';