@taiga-ui/addon-mobile 4.65.0 → 5.0.0-canary.2e92594

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 (167) hide show
  1. package/README.md +2 -2
  2. package/components/bottom-sheet/bottom-sheet.component.d.ts +3 -3
  3. package/components/index.d.ts +0 -1
  4. package/components/mobile-calendar/calendar-date-stream.d.ts +6 -0
  5. package/components/mobile-calendar/index.d.ts +1 -0
  6. package/components/mobile-calendar/mobile-calendar.component.d.ts +20 -22
  7. package/components/mobile-calendar/mobile-calendar.strategy.d.ts +3 -7
  8. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +10 -12
  9. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.d.ts +6 -6
  10. package/components/pull-to-refresh/pull-to-refresh.component.d.ts +8 -7
  11. package/components/sheet-dialog/sheet-dialog.component.d.ts +2 -2
  12. package/components/sheet-dialog/sheet-dialog.directive.d.ts +4 -3
  13. package/components/sheet-dialog/sheet-dialog.options.d.ts +4 -10
  14. package/components/sheet-dialog/sheet-dialog.service.d.ts +9 -4
  15. package/components/swipe-action/swipe-actions-auto-close.directive.d.ts +2 -2
  16. package/components/tab-bar/tab-bar-item.component.d.ts +3 -3
  17. package/components/tab-bar/tab-bar.component.d.ts +4 -7
  18. package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +10 -14
  19. package/directives/dropdown-mobile/dropdown-mobile.directive.d.ts +1 -2
  20. package/directives/dropdown-sheet/dropdown-sheet.component.d.ts +14 -0
  21. package/directives/dropdown-sheet/dropdown-sheet.directive.d.ts +6 -0
  22. package/directives/dropdown-sheet/index.d.ts +2 -0
  23. package/directives/elastic-sticky/elastic-sticky.directive.d.ts +1 -2
  24. package/directives/index.d.ts +1 -1
  25. package/directives/responsive-dialog/responsive-dialog.directive.d.ts +5 -4
  26. package/directives/responsive-dialog/responsive-dialog.service.d.ts +4 -7
  27. package/directives/ripple/ripple.directive.d.ts +3 -3
  28. package/directives/touchable/touchable.directive.d.ts +5 -5
  29. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +14 -23
  30. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +35 -57
  32. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +10 -14
  34. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +130 -165
  36. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +49 -60
  38. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +62 -61
  40. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +12 -20
  42. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +32 -53
  44. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-addon-mobile-components.mjs +0 -1
  46. package/fesm2022/taiga-ui-addon-mobile-components.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +67 -90
  48. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs +83 -0
  50. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs.map +1 -0
  51. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +12 -16
  52. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +46 -29
  54. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +21 -44
  56. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +20 -27
  58. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-addon-mobile-directives.mjs +1 -1
  60. package/fesm2022/taiga-ui-addon-mobile-services.mjs +36 -7
  61. package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
  62. package/package.json +23 -61
  63. package/services/index.d.ts +1 -0
  64. package/services/theme-color.service.d.ts +18 -0
  65. package/styles/android/app-bar.less +1 -1
  66. package/styles/android/checkbox.less +2 -3
  67. package/styles/common/badge-notification.less +1 -1
  68. package/styles/common/badge.less +2 -3
  69. package/styles/common/block-status.less +1 -1
  70. package/styles/common/button.less +1 -1
  71. package/styles/common/card-large.less +1 -1
  72. package/styles/common/chip.less +3 -9
  73. package/styles/common/header.less +1 -1
  74. package/styles/common/message.less +1 -1
  75. package/styles/common/segmented.less +1 -1
  76. package/styles/common/title.less +0 -1
  77. package/styles/common/toast.less +3 -4
  78. package/styles/ios/checkbox.less +2 -4
  79. package/styles/ios/switch.less +51 -2
  80. package/components/mobile-dialog/index.d.ts +0 -3
  81. package/components/mobile-dialog/mobile-dialog.component.d.ts +0 -10
  82. package/components/mobile-dialog/mobile-dialog.options.d.ts +0 -12
  83. package/components/mobile-dialog/mobile-dialog.service.d.ts +0 -10
  84. package/directives/sidebar/index.d.ts +0 -3
  85. package/directives/sidebar/sidebar.component.d.ts +0 -21
  86. package/directives/sidebar/sidebar.d.ts +0 -6
  87. package/directives/sidebar/sidebar.directive.d.ts +0 -22
  88. package/esm2022/components/bottom-sheet/bottom-sheet.component.mjs +0 -50
  89. package/esm2022/components/bottom-sheet/index.mjs +0 -2
  90. package/esm2022/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.mjs +0 -5
  91. package/esm2022/components/index.mjs +0 -10
  92. package/esm2022/components/mobile-calendar/index.mjs +0 -5
  93. package/esm2022/components/mobile-calendar/mobile-calendar.component.mjs +0 -308
  94. package/esm2022/components/mobile-calendar/mobile-calendar.const.mjs +0 -35
  95. package/esm2022/components/mobile-calendar/mobile-calendar.providers.mjs +0 -27
  96. package/esm2022/components/mobile-calendar/mobile-calendar.strategy.mjs +0 -126
  97. package/esm2022/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.mjs +0 -5
  98. package/esm2022/components/mobile-calendar-dropdown/index.mjs +0 -3
  99. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.mjs +0 -113
  100. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.mjs +0 -53
  101. package/esm2022/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +0 -5
  102. package/esm2022/components/mobile-calendar-sheet/index.mjs +0 -2
  103. package/esm2022/components/mobile-calendar-sheet/mobile-calendar-sheet.component.mjs +0 -25
  104. package/esm2022/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +0 -5
  105. package/esm2022/components/mobile-dialog/index.mjs +0 -4
  106. package/esm2022/components/mobile-dialog/mobile-dialog.component.mjs +0 -26
  107. package/esm2022/components/mobile-dialog/mobile-dialog.options.mjs +0 -17
  108. package/esm2022/components/mobile-dialog/mobile-dialog.service.mjs +0 -22
  109. package/esm2022/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -5
  110. package/esm2022/components/pull-to-refresh/index.mjs +0 -6
  111. package/esm2022/components/pull-to-refresh/loader-android/loader-android.component.mjs +0 -46
  112. package/esm2022/components/pull-to-refresh/loader-ios/loader-ios.component.mjs +0 -39
  113. package/esm2022/components/pull-to-refresh/pull-to-refresh.component.mjs +0 -51
  114. package/esm2022/components/pull-to-refresh/pull-to-refresh.providers.mjs +0 -24
  115. package/esm2022/components/pull-to-refresh/pull-to-refresh.service.mjs +0 -37
  116. package/esm2022/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +0 -5
  117. package/esm2022/components/sheet-dialog/index.mjs +0 -5
  118. package/esm2022/components/sheet-dialog/sheet-dialog.component.mjs +0 -81
  119. package/esm2022/components/sheet-dialog/sheet-dialog.directive.mjs +0 -21
  120. package/esm2022/components/sheet-dialog/sheet-dialog.options.mjs +0 -24
  121. package/esm2022/components/sheet-dialog/sheet-dialog.service.mjs +0 -38
  122. package/esm2022/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.mjs +0 -5
  123. package/esm2022/components/swipe-action/index.mjs +0 -3
  124. package/esm2022/components/swipe-action/swipe-actions-auto-close.directive.mjs +0 -34
  125. package/esm2022/components/swipe-action/swipe-actions.component.mjs +0 -23
  126. package/esm2022/components/swipe-action/taiga-ui-addon-mobile-components-swipe-action.mjs +0 -5
  127. package/esm2022/components/tab-bar/index.mjs +0 -5
  128. package/esm2022/components/tab-bar/tab-bar-item.component.mjs +0 -26
  129. package/esm2022/components/tab-bar/tab-bar-item.directive.mjs +0 -27
  130. package/esm2022/components/tab-bar/tab-bar.component.mjs +0 -46
  131. package/esm2022/components/tab-bar/tab-bar.mjs +0 -9
  132. package/esm2022/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.mjs +0 -5
  133. package/esm2022/components/taiga-ui-addon-mobile-components.mjs +0 -5
  134. package/esm2022/directives/dropdown-mobile/dropdown-mobile.component.mjs +0 -98
  135. package/esm2022/directives/dropdown-mobile/dropdown-mobile.directive.mjs +0 -54
  136. package/esm2022/directives/dropdown-mobile/index.mjs +0 -3
  137. package/esm2022/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +0 -5
  138. package/esm2022/directives/elastic-sticky/elastic-sticky.directive.mjs +0 -23
  139. package/esm2022/directives/elastic-sticky/elastic-sticky.service.mjs +0 -53
  140. package/esm2022/directives/elastic-sticky/index.mjs +0 -3
  141. package/esm2022/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +0 -5
  142. package/esm2022/directives/index.mjs +0 -7
  143. package/esm2022/directives/responsive-dialog/index.mjs +0 -3
  144. package/esm2022/directives/responsive-dialog/responsive-dialog.directive.mjs +0 -21
  145. package/esm2022/directives/responsive-dialog/responsive-dialog.service.mjs +0 -34
  146. package/esm2022/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +0 -5
  147. package/esm2022/directives/ripple/index.mjs +0 -2
  148. package/esm2022/directives/ripple/ripple.directive.mjs +0 -98
  149. package/esm2022/directives/ripple/taiga-ui-addon-mobile-directives-ripple.mjs +0 -5
  150. package/esm2022/directives/sidebar/index.mjs +0 -4
  151. package/esm2022/directives/sidebar/sidebar.component.mjs +0 -45
  152. package/esm2022/directives/sidebar/sidebar.directive.mjs +0 -64
  153. package/esm2022/directives/sidebar/sidebar.mjs +0 -7
  154. package/esm2022/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -5
  155. package/esm2022/directives/taiga-ui-addon-mobile-directives.mjs +0 -5
  156. package/esm2022/directives/touchable/index.mjs +0 -2
  157. package/esm2022/directives/touchable/taiga-ui-addon-mobile-directives-touchable.mjs +0 -5
  158. package/esm2022/directives/touchable/touchable.directive.mjs +0 -71
  159. package/esm2022/index.mjs +0 -4
  160. package/esm2022/services/index.mjs +0 -2
  161. package/esm2022/services/keyboard.service.mjs +0 -53
  162. package/esm2022/services/taiga-ui-addon-mobile-services.mjs +0 -5
  163. package/esm2022/taiga-ui-addon-mobile.mjs +0 -5
  164. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -65
  165. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +0 -1
  166. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -114
  167. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +0 -1
@@ -1,7 +1,5 @@
1
- import { NgForOf } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { Component, ChangeDetectionStrategy, ViewChildren, ViewChild, Input } from '@angular/core';
4
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
2
+ import { viewChildren, viewChild, input, ChangeDetectionStrategy, Component } from '@angular/core';
5
3
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
4
  import { tuiHeaderOptionsProvider } from '@taiga-ui/layout/components/header';
7
5
 
@@ -12,14 +10,15 @@ const OPTIONS = {
12
10
  };
13
11
  class TuiBottomSheet {
14
12
  constructor() {
15
- this.elements = EMPTY_QUERY;
13
+ this.elements = viewChildren('stops');
14
+ this.content = viewChild('content');
16
15
  this.el = tuiInjectElement();
17
- this.stops = ['1.5rem'];
16
+ this.stops = input(['1.5rem']);
18
17
  }
19
18
  onScroll() {
20
19
  const { clientHeight, scrollTop, scrollHeight } = this.el;
21
- const top = this.elements.get(0)?.nativeElement.clientHeight || 0;
22
- const max = this.content?.nativeElement.clientHeight || Infinity;
20
+ const top = this.elements()[0]?.nativeElement.clientHeight || 0;
21
+ const max = this.content()?.nativeElement.clientHeight || Infinity;
23
22
  const height = Math.min(clientHeight, max);
24
23
  const scrolled = Math.min(scrollTop, height - top);
25
24
  const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;
@@ -27,26 +26,18 @@ class TuiBottomSheet {
27
26
  this.el.style.setProperty('overflow', 'scroll');
28
27
  this.el.animate([{ transform }], OPTIONS);
29
28
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiBottomSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiBottomSheet, isStandalone: true, selector: "tui-bottom-sheet", inputs: { stops: "stops" }, host: { listeners: { "scroll.zoneless": "onScroll()", "resize": "onScroll()" }, properties: { "style.--t-initial": "stops[0]", "style.scroll-snap-type": "stops.length > 1 ? \"y mandatory\" : null" } }, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "elements", predicate: ["stops"], descendants: true }], ngImport: i0, template: "<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-initial)) auto 0;background:var(--tui-background-elevation-1);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-background-elevation-1),var(--tui-shadow-medium)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:sticky;top:.625rem;left:50%;z-index:1;display:block;inset-inline-start:50%;inline-size:2rem;block-size:.25rem;margin-block-end:-.25rem;transform:translate(calc(-50% * var(--tui-inline)));background:var(--tui-background-elevation-1);box-shadow:0 0 0 20rem var(--tui-background-elevation-1),inset 0 0 0 1rem var(--tui-border-normal);border-radius:1rem;clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-initial));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-initial));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-initial))}.t-stop{position:absolute;block-size:var(--t-initial);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBottomSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBottomSheet, isStandalone: true, selector: "tui-bottom-sheet", inputs: { stops: { classPropertyName: "stops", publicName: "stops", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "scroll.zoneless": "onScroll()", "resize": "onScroll()" }, properties: { "style.--t-initial": "stops()[0]", "style.scroll-snap-type": "stops().length > 1 ? \"y mandatory\" : null" } }, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], viewQueries: [{ propertyName: "elements", predicate: ["stops"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (stop of stops(); track $index) {\n <div\n #stops\n class=\"t-stop\"\n [style.inset-block-start]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-initial)) auto 0;background:var(--tui-background-elevation-1);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-background-elevation-1),var(--tui-shadow-medium)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:sticky;top:.625rem;left:50%;z-index:1;display:block;inset-inline-start:50%;inline-size:2rem;block-size:.25rem;margin-block-end:-.25rem;transform:translate(calc(-50% * var(--tui-inline)));background:var(--tui-background-elevation-1);box-shadow:0 0 0 20rem var(--tui-background-elevation-1),inset 0 0 0 1rem var(--tui-border-normal);border-radius:1rem;clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-initial));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-initial));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-initial))}.t-stop{position:absolute;block-size:var(--t-initial);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32
31
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiBottomSheet, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBottomSheet, decorators: [{
34
33
  type: Component,
35
- args: [{ standalone: true, selector: 'tui-bottom-sheet', imports: [NgForOf], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], host: {
36
- '[style.--t-initial]': 'stops[0]',
37
- '[style.scroll-snap-type]': 'stops.length > 1 ? "y mandatory" : null',
34
+ args: [{ selector: 'tui-bottom-sheet', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], host: {
35
+ '[style.--t-initial]': 'stops()[0]',
36
+ '[style.scroll-snap-type]': 'stops().length > 1 ? "y mandatory" : null',
38
37
  '(scroll.zoneless)': 'onScroll()',
39
38
  '(resize)': 'onScroll()',
40
- }, template: "<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-initial)) auto 0;background:var(--tui-background-elevation-1);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-background-elevation-1),var(--tui-shadow-medium)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:sticky;top:.625rem;left:50%;z-index:1;display:block;inset-inline-start:50%;inline-size:2rem;block-size:.25rem;margin-block-end:-.25rem;transform:translate(calc(-50% * var(--tui-inline)));background:var(--tui-background-elevation-1);box-shadow:0 0 0 20rem var(--tui-background-elevation-1),inset 0 0 0 1rem var(--tui-border-normal);border-radius:1rem;clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-initial));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-initial));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-initial))}.t-stop{position:absolute;block-size:var(--t-initial);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"] }]
41
- }], propDecorators: { elements: [{
42
- type: ViewChildren,
43
- args: ['stops']
44
- }], content: [{
45
- type: ViewChild,
46
- args: ['content']
47
- }], stops: [{
48
- type: Input
49
- }] } });
39
+ }, template: "@for (stop of stops(); track $index) {\n <div\n #stops\n class=\"t-stop\"\n [style.inset-block-start]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-initial)) auto 0;background:var(--tui-background-elevation-1);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-background-elevation-1),var(--tui-shadow-medium)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:sticky;top:.625rem;left:50%;z-index:1;display:block;inset-inline-start:50%;inline-size:2rem;block-size:.25rem;margin-block-end:-.25rem;transform:translate(calc(-50% * var(--tui-inline)));background:var(--tui-background-elevation-1);box-shadow:0 0 0 20rem var(--tui-background-elevation-1),inset 0 0 0 1rem var(--tui-border-normal);border-radius:1rem;clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-initial));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-initial));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-initial))}.t-stop{position:absolute;block-size:var(--t-initial);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"] }]
40
+ }] });
50
41
 
51
42
  /**
52
43
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.mjs","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {NgForOf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n type QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHeaderOptionsProvider} from '@taiga-ui/layout/components/header';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n standalone: true,\n selector: 'tui-bottom-sheet',\n imports: [NgForOf],\n templateUrl: './bottom-sheet.template.html',\n styleUrls: ['./bottom-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiHeaderOptionsProvider({size: 'h5'})],\n host: {\n '[style.--t-initial]': 'stops[0]',\n '[style.scroll-snap-type]': 'stops.length > 1 ? \"y mandatory\" : null',\n '(scroll.zoneless)': 'onScroll()',\n '(resize)': 'onScroll()',\n },\n})\nexport class TuiBottomSheet {\n @ViewChildren('stops')\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @ViewChild('content')\n private readonly content?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement();\n\n @Input()\n public stops: readonly string[] = ['1.5rem'];\n\n protected onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el;\n const top = this.elements.get(0)?.nativeElement.clientHeight || 0;\n const max = this.content?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.style.setProperty('overflow', 'scroll');\n this.el.animate([{transform}], OPTIONS);\n }\n}\n","<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAcA,MAAM,OAAO,GAAG;AACZ,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,UAAU;CACV,CAAC;AAEX,MAea,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAiBqB,IAAQ,CAAA,QAAA,GAAuC,WAAW,CAAC;QAK3D,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE,CAAC;AAGlC,QAAA,IAAA,CAAA,KAAK,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAchD,KAAA;IAZa,QAAQ,GAAA;QACd,MAAM,EAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AACxD,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,YAAY,IAAI,CAAC,CAAC;QAClE,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,YAAY,IAAI,QAAQ,CAAC;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAC3C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,CAAkB,eAAA,EAAA,CAAC,CAAC,GAAG,QAAQ,QAAQ,CAAC;AAE1D,QAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,CAAA,EAAG,YAAY,CAAA,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eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAYR,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,kBAAkB,EACnB,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,eAAA,EAGD,uBAAuB,CAAC,MAAM,aACpC,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC,EAC7C,IAAA,EAAA;AACF,wBAAA,qBAAqB,EAAE,UAAU;AACjC,wBAAA,0BAA0B,EAAE,yCAAyC;AACrE,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,UAAU,EAAE,YAAY;AAC3B,qBAAA,EAAA,QAAA,EAAA,wPAAA,EAAA,MAAA,EAAA,CAAA,89CAAA,CAAA,EAAA,CAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,YAAY;uBAAC,OAAO,CAAA;gBAIJ,OAAO,EAAA,CAAA;sBADvB,SAAS;uBAAC,SAAS,CAAA;gBAMb,KAAK,EAAA,CAAA;sBADX,KAAK;;;AE5CV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.mjs","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n input,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHeaderOptionsProvider} from '@taiga-ui/layout/components/header';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n selector: 'tui-bottom-sheet',\n templateUrl: './bottom-sheet.template.html',\n styleUrl: './bottom-sheet.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiHeaderOptionsProvider({size: 'h5'})],\n host: {\n '[style.--t-initial]': 'stops()[0]',\n '[style.scroll-snap-type]': 'stops().length > 1 ? \"y mandatory\" : null',\n '(scroll.zoneless)': 'onScroll()',\n '(resize)': 'onScroll()',\n },\n})\nexport class TuiBottomSheet {\n private readonly elements = viewChildren<ElementRef<HTMLElement>>('stops');\n private readonly content = viewChild<ElementRef<HTMLElement>>('content');\n private readonly el = tuiInjectElement();\n\n public readonly stops = input<readonly string[]>(['1.5rem']);\n\n protected onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el;\n const top = this.elements()[0]?.nativeElement.clientHeight || 0;\n const max = this.content()?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.style.setProperty('overflow', 'scroll');\n this.el.animate([{transform}], OPTIONS);\n }\n}\n","@for (stop of stops(); track $index) {\n <div\n #stops\n class=\"t-stop\"\n [style.inset-block-start]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA,MAAM,OAAO,GAAG;AACZ,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,UAAU;CACV;MAeG,cAAc,CAAA;AAb3B,IAAA,WAAA,GAAA;AAcqB,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAA0B,OAAO,CAAC;AACzD,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAA0B,SAAS,CAAC;QACvD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAExB,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AA,EAAA,mSAAA,EAAA,MAAA,EAAA,CAAA,89CAAA,CAAA,EAAA;;;AE5BL;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
- import { __decorate } from 'tslib';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, Directive, ContentChild, computed, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { contentChild, inject, Directive, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
3
  import { TuiMobileCalendar } from '@taiga-ui/addon-mobile/components/mobile-calendar';
5
4
  import { TuiKeyboardService } from '@taiga-ui/addon-mobile/services';
6
5
  import { TuiControl } from '@taiga-ui/cdk/classes';
@@ -10,62 +9,52 @@ import * as i1 from '@taiga-ui/cdk/directives/active-zone';
10
9
  import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
11
10
  import * as i2 from '@taiga-ui/cdk/directives/animated';
12
11
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
13
- import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
14
- import { TUI_DROPDOWN_COMPONENT, TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
15
- import { TUI_DAY_CAPS_MAPPER, calculateDisabledItemHandler } from '@taiga-ui/kit/components/calendar-range';
16
- import { TUI_MOBILE_CALENDAR } from '@taiga-ui/kit/tokens';
12
+ import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
13
+ import { TUI_DROPDOWN_COMPONENT, TuiDropdownDirective } from '@taiga-ui/core/portals/dropdown';
14
+ import { calculateDisabledItemHandler, TUI_DAY_CAPS_MAPPER } from '@taiga-ui/kit/components/calendar-range';
17
15
  import { injectContext } from '@taiga-ui/polymorpheus';
18
- import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
16
+ import { WA_IS_MOBILE } from '@ng-web-apis/platform';
19
17
  import { TuiItemsHandlersDirective } from '@taiga-ui/core/directives/items-handlers';
20
18
  import { TuiInputDateDirective } from '@taiga-ui/kit/components/input-date';
21
19
  import { TuiInputDateRangeDirective } from '@taiga-ui/kit/components/input-date-range';
22
20
  import { TuiInputDateTimeDirective } from '@taiga-ui/kit/components/input-date-time';
23
21
 
24
- // TODO: Rename to TuiMobileCalendarDropdown in v5
25
- class TuiMobileCalendarDropdownNew {
22
+ class TuiMobileCalendarDropdown {
26
23
  constructor() {
24
+ this.single = contentChild(TuiInputDateDirective);
25
+ this.range = contentChild(TuiInputDateRangeDirective);
26
+ this.dateTime = contentChild(TuiInputDateTimeDirective);
27
27
  this.handlers = inject(TuiItemsHandlersDirective);
28
28
  }
29
29
  get date() {
30
- return this.single || this.range || this.dateTime;
30
+ return this.single() || this.range() || this.dateTime();
31
31
  }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdownNew, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiMobileCalendarDropdownNew, isStandalone: true, selector: "[tuiMobileCalendar]", providers: [
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarDropdown, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.17", type: TuiMobileCalendarDropdown, isStandalone: true, selector: "[tuiMobileCalendar]", providers: [
34
34
  {
35
35
  provide: TUI_DROPDOWN_COMPONENT,
36
- useFactory: () => inject(TUI_IS_MOBILE)
37
- ? TuiMobileCalendarDropdown
36
+ useFactory: () => inject(WA_IS_MOBILE)
37
+ ? TuiMobileCalendarDropdownComponent
38
38
  : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
39
39
  },
40
- ], queries: [{ propertyName: "single", first: true, predicate: TuiInputDateDirective, descendants: true }, { propertyName: "range", first: true, predicate: TuiInputDateRangeDirective, descendants: true }, { propertyName: "dateTime", first: true, predicate: TuiInputDateTimeDirective, descendants: true }], ngImport: i0 }); }
40
+ ], queries: [{ propertyName: "single", first: true, predicate: TuiInputDateDirective, descendants: true, isSignal: true }, { propertyName: "range", first: true, predicate: TuiInputDateRangeDirective, descendants: true, isSignal: true }, { propertyName: "dateTime", first: true, predicate: TuiInputDateTimeDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
41
41
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdownNew, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarDropdown, decorators: [{
43
43
  type: Directive,
44
44
  args: [{
45
- standalone: true,
46
45
  selector: '[tuiMobileCalendar]',
47
46
  providers: [
48
47
  {
49
48
  provide: TUI_DROPDOWN_COMPONENT,
50
- useFactory: () => inject(TUI_IS_MOBILE)
51
- ? TuiMobileCalendarDropdown
49
+ useFactory: () => inject(WA_IS_MOBILE)
50
+ ? TuiMobileCalendarDropdownComponent
52
51
  : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
53
52
  },
54
53
  ],
55
54
  }]
56
- }], propDecorators: { single: [{
57
- type: ContentChild,
58
- args: [TuiInputDateDirective]
59
- }], range: [{
60
- type: ContentChild,
61
- args: [TuiInputDateRangeDirective]
62
- }], dateTime: [{
63
- type: ContentChild,
64
- args: [TuiInputDateTimeDirective]
65
- }] } });
55
+ }] });
66
56
 
67
- // TODO: Rename to TuiMobileCalendarDropdownComponent in v5, this component is terrible and needs a complete rewrite
68
- class TuiMobileCalendarDropdown {
57
+ class TuiMobileCalendarDropdownComponent {
69
58
  constructor() {
70
59
  // TODO: Rework to use TuiDropdownOpenDirective so the focus returns to the field on closing
71
60
  this.dropdown = inject(TuiDropdownDirective, { optional: true });
@@ -73,17 +62,18 @@ class TuiMobileCalendarDropdown {
73
62
  this.context = injectContext({ optional: true });
74
63
  this.observer = this.context?.$implicit;
75
64
  this.data = this.context?.data || {};
76
- this.selectedPeriod = null;
77
65
  // TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit
66
+ this.selectedPeriod = null;
78
67
  this.control = inject(TuiControl, { optional: true });
79
- this.directive = inject(TuiMobileCalendarDropdownNew, { optional: true });
80
- this.range = !!this.directive?.range || this.is('tui-input-date-range');
68
+ this.directive = inject(TuiMobileCalendarDropdown, { optional: true });
81
69
  this.multi = this.data.multi || this.is('tui-input-date[multiple]');
82
- this.single = !!this.directive?.single ||
83
- !!this.directive?.dateTime ||
70
+ this.range = !!this.directive?.range() || this.is('tui-input-date-range');
71
+ this.single = !!this.directive?.single() ||
72
+ !!this.directive?.dateTime() ||
84
73
  this.data.single || // TODO(v5): use `rangeMode` from DI token `TUI_CALENDAR_SHEET_DEFAULT_OPTIONS`
85
74
  this.is('tui-input-date:not([multiple])');
86
75
  this.value = computed((value = this.directive?.date?.value()) => Array.isArray(value) ? value[0] : value);
76
+ this.mapper = (disabledItemHandler, value, minLength = null) => calculateDisabledItemHandler(disabledItemHandler, value, minLength);
87
77
  this.keyboard.hide();
88
78
  }
89
79
  max() {
@@ -113,11 +103,11 @@ class TuiMobileCalendarDropdown {
113
103
  this.selectedPeriod = new TuiDayRange(value, value);
114
104
  }
115
105
  }
116
- get calculatedDisabledItemHandler() {
117
- return this.calculateDisabledItemHandler(this.directive?.handlers.disabledItemHandler() ||
106
+ get handler() {
107
+ return (this.directive?.handlers.disabledItemHandler() ||
118
108
  this.data.disabledItemHandler ||
119
109
  this.control?.disabledItemHandler ||
120
- TUI_FALSE_HANDLER, this.selectedPeriod, this.control?.minLength ?? null);
110
+ TUI_FALSE_HANDLER);
121
111
  }
122
112
  close() {
123
113
  this.dropdown?.toggle(false);
@@ -135,32 +125,20 @@ class TuiMobileCalendarDropdown {
135
125
  this.observer?.next(normalizedValue);
136
126
  this.close();
137
127
  }
138
- calculateDisabledItemHandler(disabledItemHandler, value, minLength) {
139
- return calculateDisabledItemHandler(disabledItemHandler, value, minLength);
140
- }
141
128
  is(selector) {
142
129
  return !!this.dropdown?.el.closest(selector);
143
130
  }
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiMobileCalendarDropdown, isStandalone: true, selector: "tui-mobile-calendar-dropdown", hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"], dependencies: [{ kind: "component", type: TuiMobileCalendar, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiMobileCalendarDropdownComponent, isStandalone: true, selector: "tui-mobile-calendar-dropdown", hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"handler | tuiMapper: mapper : selectedPeriod : control?.minLength\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"], dependencies: [{ kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiMobileCalendar, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
146
133
  }
147
- __decorate([
148
- tuiPure
149
- ], TuiMobileCalendarDropdown.prototype, "calculateDisabledItemHandler", null);
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdown, decorators: [{
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarDropdownComponent, decorators: [{
151
135
  type: Component,
152
- args: [{ standalone: true, selector: 'tui-mobile-calendar-dropdown', imports: [TuiMobileCalendar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], template: "<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"] }]
153
- }], ctorParameters: function () { return []; }, propDecorators: { calculateDisabledItemHandler: [] } });
154
- function tuiProvideMobileCalendar() {
155
- return {
156
- provide: TUI_MOBILE_CALENDAR,
157
- useValue: TuiMobileCalendarDropdown,
158
- };
159
- }
136
+ args: [{ selector: 'tui-mobile-calendar-dropdown', imports: [TuiMapperPipe, TuiMobileCalendar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], template: "<tui-mobile-calendar\n [disabledItemHandler]=\"handler | tuiMapper: mapper : selectedPeriod : control?.minLength\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"] }]
137
+ }], ctorParameters: () => [] });
160
138
 
161
139
  /**
162
140
  * Generated bundle index. Do not edit.
163
141
  */
164
142
 
165
- export { TuiMobileCalendarDropdown, TuiMobileCalendarDropdownNew, tuiProvideMobileCalendar };
143
+ export { TuiMobileCalendarDropdown, TuiMobileCalendarDropdownComponent };
166
144
  //# sourceMappingURL=taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.ts"],"sourcesContent":["import {ContentChild, Directive, inject} from '@angular/core';\nimport {type TuiDay, type TuiDayRange, type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\nimport {TuiItemsHandlersDirective} from '@taiga-ui/core/directives/items-handlers';\nimport {\n type TuiInputDateBase,\n TuiInputDateDirective,\n} from '@taiga-ui/kit/components/input-date';\nimport {TuiInputDateRangeDirective} from '@taiga-ui/kit/components/input-date-range';\nimport {TuiInputDateTimeDirective} from '@taiga-ui/kit/components/input-date-time';\n\nimport {TuiMobileCalendarDropdown} from './mobile-calendar-dropdown.component';\n\n// TODO: Rename to TuiMobileCalendarDropdown in v5\n@Directive({\n standalone: true,\n selector: '[tuiMobileCalendar]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiMobileCalendarDropdown\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n})\nexport class TuiMobileCalendarDropdownNew {\n @ContentChild(TuiInputDateDirective)\n public readonly single?: TuiInputDateDirective;\n\n @ContentChild(TuiInputDateRangeDirective)\n public readonly range?: TuiInputDateRangeDirective;\n\n @ContentChild(TuiInputDateTimeDirective)\n public readonly dateTime?: TuiInputDateTimeDirective;\n\n public readonly handlers = inject(TuiItemsHandlersDirective);\n\n public get date():\n | TuiInputDateBase<readonly [TuiDay, TuiTime | null]>\n | TuiInputDateBase<TuiDay>\n | TuiInputDateBase<TuiDayRange>\n | undefined {\n return this.single || this.range || this.dateTime;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n type ValueProvider,\n} from '@angular/core';\nimport {TuiMobileCalendar} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiDay,\n type TuiDayLike,\n TuiDayRange,\n} from '@taiga-ui/cdk/date-time';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n calculateDisabledItemHandler,\n TUI_DAY_CAPS_MAPPER,\n} from '@taiga-ui/kit/components/calendar-range';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit/tokens';\nimport {injectContext} from '@taiga-ui/polymorpheus';\nimport {type Observer} from 'rxjs';\n\nimport {TuiMobileCalendarDropdownNew} from './mobile-calendar-dropdown.directive';\n\nexport interface TuiMobileCalendarData {\n disabledItemHandler?: TuiBooleanHandler<TuiDay>;\n max?: TuiDay | null;\n min?: TuiDay | null;\n multi?: boolean;\n single?: boolean;\n}\n\n// TODO: Rename to TuiMobileCalendarDropdownComponent in v5, this component is terrible and needs a complete rewrite\n@Component({\n standalone: true,\n selector: 'tui-mobile-calendar-dropdown',\n imports: [TuiMobileCalendar],\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrls: ['./mobile-calendar-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n})\nexport class TuiMobileCalendarDropdown {\n // TODO: Rework to use TuiDropdownOpenDirective so the focus returns to the field on closing\n private readonly dropdown = inject(TuiDropdownDirective, {optional: true});\n private readonly keyboard = inject(TuiKeyboardService);\n\n private readonly context = injectContext<Record<string, any>>({optional: true});\n private readonly observer?: Observer<unknown> = this.context?.$implicit;\n private readonly data: TuiMobileCalendarData = this.context?.data || {};\n\n private selectedPeriod: TuiDayRange | null = null;\n\n // TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit\n protected readonly control: any = inject(TuiControl, {optional: true});\n protected readonly directive = inject(TuiMobileCalendarDropdownNew, {optional: true});\n protected readonly range = !!this.directive?.range || this.is('tui-input-date-range');\n protected readonly multi = this.data.multi || this.is('tui-input-date[multiple]');\n protected readonly single =\n !!this.directive?.single ||\n !!this.directive?.dateTime ||\n this.data.single || // TODO(v5): use `rangeMode` from DI token `TUI_CALENDAR_SHEET_DEFAULT_OPTIONS`\n this.is('tui-input-date:not([multiple])');\n\n protected readonly value = computed<TuiDay | TuiDayRange | null>(\n (value = this.directive?.date?.value()) =>\n Array.isArray(value) ? value[0] : value,\n );\n\n constructor() {\n this.keyboard.hide();\n }\n\n public max(): TuiDay {\n return (\n this.directive?.date?.max() ??\n (this.data.max ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.max,\n this.selectedPeriod,\n this.control.maxLength,\n false,\n )\n : this.control?.max) ||\n TUI_LAST_DAY)\n );\n }\n\n public min(): TuiDay {\n return (\n this.directive?.date?.min() ??\n (this.data.min ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.min,\n this.selectedPeriod,\n this.control.maxLength,\n true,\n )\n : this.control?.min) ||\n TUI_FIRST_DAY)\n );\n }\n\n public onValueChange(value: TuiDay | TuiDayRange | readonly TuiDay[] | null): void {\n if (!this.range) {\n return;\n }\n\n if (value === null || value instanceof TuiDayRange) {\n this.selectedPeriod = value;\n } else if (value instanceof TuiDay) {\n this.selectedPeriod = new TuiDayRange(value, value);\n }\n }\n\n protected get calculatedDisabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.calculateDisabledItemHandler(\n this.directive?.handlers.disabledItemHandler() ||\n this.data.disabledItemHandler ||\n this.control?.disabledItemHandler ||\n TUI_FALSE_HANDLER,\n this.selectedPeriod,\n this.control?.minLength ?? null,\n );\n }\n\n protected close(): void {\n this.dropdown?.toggle(false);\n this.observer?.complete();\n this.keyboard.show();\n }\n\n protected confirm(value: TuiDay | TuiDayRange | readonly TuiDay[]): void {\n const normalizedValue = this.range ? this.selectedPeriod : value;\n\n if (this.control) {\n this.control.value = normalizedValue;\n }\n\n if (normalizedValue) {\n this.directive?.date?.setDate(normalizedValue);\n }\n\n this.observer?.next(normalizedValue);\n this.close();\n }\n\n @tuiPure\n private calculateDisabledItemHandler(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null,\n ): TuiBooleanHandler<TuiDay> {\n return calculateDisabledItemHandler(disabledItemHandler, value, minLength);\n }\n\n private is(selector: string): boolean {\n return !!this.dropdown?.el.closest(selector);\n }\n}\n\nexport function tuiProvideMobileCalendar(): ValueProvider {\n return {\n provide: TUI_MOBILE_CALENDAR,\n useValue: TuiMobileCalendarDropdown,\n };\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"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AA,CAAA,QAAA,EAAA,OAAA,EAAA,KAAA,EAAA,KAAA,EAAA,qBAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAkHnB,UAAA,CAAA;IADP,OAAO;AAOP,CAAA,EAAA,yBAAA,CAAA,SAAA,EAAA,8BAAA,EAAA,IAAA,CAAA,CAAA;4FAlHQ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBATrC,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,8BAA8B,EAC/B,OAAA,EAAA,CAAC,iBAAiB,CAAC,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA,CAAC,aAAa,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,sTAAA,EAAA,MAAA,EAAA,CAAA,qaAAA,CAAA,EAAA,CAAA;0EA8GpC,4BAA4B,EAAA,EAAA,EAAA,EAAA,CAAA,CAAA;SAaxB,wBAAwB,GAAA;IACpC,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;AAC5B,QAAA,QAAQ,EAAE,yBAAyB;KACtC,CAAC;AACN;;AEjLA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.ts"],"sourcesContent":["import {contentChild, Directive, inject} from '@angular/core';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {type TuiDay, type TuiDayRange, type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TuiItemsHandlersDirective} from '@taiga-ui/core/directives/items-handlers';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/portals/dropdown';\nimport {\n type TuiInputDateBase,\n TuiInputDateDirective,\n} from '@taiga-ui/kit/components/input-date';\nimport {TuiInputDateRangeDirective} from '@taiga-ui/kit/components/input-date-range';\nimport {TuiInputDateTimeDirective} from '@taiga-ui/kit/components/input-date-time';\n\nimport {TuiMobileCalendarDropdownComponent} from './mobile-calendar-dropdown.component';\n\n@Directive({\n selector: '[tuiMobileCalendar]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(WA_IS_MOBILE)\n ? TuiMobileCalendarDropdownComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n})\nexport class TuiMobileCalendarDropdown {\n public readonly single = contentChild(TuiInputDateDirective);\n public readonly range = contentChild(TuiInputDateRangeDirective);\n public readonly dateTime = contentChild(TuiInputDateTimeDirective);\n public readonly handlers = inject(TuiItemsHandlersDirective);\n\n public get date():\n | TuiInputDateBase<readonly [TuiDay, TuiTime | null]>\n | TuiInputDateBase<TuiDay>\n | TuiInputDateBase<TuiDayRange>\n | undefined {\n return this.single() || this.range() || this.dateTime();\n }\n}\n","import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {TuiMobileCalendar} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiDay,\n type TuiDayLike,\n TuiDayRange,\n} from '@taiga-ui/cdk/date-time';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {\n calculateDisabledItemHandler,\n TUI_DAY_CAPS_MAPPER,\n} from '@taiga-ui/kit/components/calendar-range';\nimport {injectContext} from '@taiga-ui/polymorpheus';\nimport {type Observer} from 'rxjs';\n\nimport {TuiMobileCalendarDropdown} from './mobile-calendar-dropdown.directive';\n\nexport interface TuiMobileCalendarData {\n disabledItemHandler?: TuiBooleanHandler<TuiDay>;\n max?: TuiDay | null;\n min?: TuiDay | null;\n multi?: boolean;\n single?: boolean;\n}\n\n@Component({\n selector: 'tui-mobile-calendar-dropdown',\n imports: [TuiMapperPipe, TuiMobileCalendar],\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrl: './mobile-calendar-dropdown.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n})\nexport class TuiMobileCalendarDropdownComponent {\n // TODO: Rework to use TuiDropdownOpenDirective so the focus returns to the field on closing\n private readonly dropdown = inject(TuiDropdownDirective, {optional: true});\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly context = injectContext<Record<string, any>>({optional: true});\n private readonly observer?: Observer<unknown> = this.context?.$implicit;\n private readonly data: TuiMobileCalendarData = this.context?.data || {};\n\n // TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit\n protected selectedPeriod: TuiDayRange | null = null;\n protected readonly control: any = inject(TuiControl, {optional: true});\n protected readonly directive = inject(TuiMobileCalendarDropdown, {optional: true});\n protected readonly multi = this.data.multi || this.is('tui-input-date[multiple]');\n protected readonly range =\n !!this.directive?.range() || this.is('tui-input-date-range');\n\n protected readonly single =\n !!this.directive?.single() ||\n !!this.directive?.dateTime() ||\n this.data.single || // TODO(v5): use `rangeMode` from DI token `TUI_CALENDAR_SHEET_DEFAULT_OPTIONS`\n this.is('tui-input-date:not([multiple])');\n\n protected readonly value = computed<TuiDay | TuiDayRange | null>(\n (value = this.directive?.date?.value()) =>\n Array.isArray(value) ? value[0] : value,\n );\n\n constructor() {\n this.keyboard.hide();\n }\n\n public max(): TuiDay {\n return (\n this.directive?.date?.max() ??\n (this.data.max ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.max,\n this.selectedPeriod,\n this.control.maxLength,\n false,\n )\n : this.control?.max) ||\n TUI_LAST_DAY)\n );\n }\n\n public min(): TuiDay {\n return (\n this.directive?.date?.min() ??\n (this.data.min ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.min,\n this.selectedPeriod,\n this.control.maxLength,\n true,\n )\n : this.control?.min) ||\n TUI_FIRST_DAY)\n );\n }\n\n public onValueChange(value: TuiDay | TuiDayRange | readonly TuiDay[] | null): void {\n if (!this.range) {\n return;\n }\n\n if (value === null || value instanceof TuiDayRange) {\n this.selectedPeriod = value;\n } else if (value instanceof TuiDay) {\n this.selectedPeriod = new TuiDayRange(value, value);\n }\n }\n\n protected get handler(): TuiBooleanHandler<TuiDay> {\n return (\n this.directive?.handlers.disabledItemHandler() ||\n this.data.disabledItemHandler ||\n this.control?.disabledItemHandler ||\n TUI_FALSE_HANDLER\n );\n }\n\n protected close(): void {\n this.dropdown?.toggle(false);\n this.observer?.complete();\n this.keyboard.show();\n }\n\n protected confirm(value: TuiDay | TuiDayRange | readonly TuiDay[]): void {\n const normalizedValue = this.range ? this.selectedPeriod : value;\n\n if (this.control) {\n this.control.value = normalizedValue;\n }\n\n if (normalizedValue) {\n this.directive?.date?.setDate(normalizedValue);\n }\n\n this.observer?.next(normalizedValue);\n this.close();\n }\n\n protected readonly mapper = (\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null = null,\n ): TuiBooleanHandler<TuiDay> =>\n calculateDisabledItemHandler(disabledItemHandler, value, minLength);\n\n private is(selector: string): boolean {\n return !!this.dropdown?.el.closest(selector);\n }\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"handler | tuiMapper: mapper : selectedPeriod : control?.minLength\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MA0Ba,yBAAyB,CAAA;AAZtC,IAAA,WAAA,GAAA;AAaoB,QAAA,IAAA,CAAA,MAAM,GAAG,YAAY,CAAC,qBAAqB,CAAC;AAC5C,QAAA,IAAA,CAAA,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC;AAChD,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,yBAAyB,CAAC;AAClD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAS/D;AAPG,IAAA,IAAW,IAAI,GAAA;AAKX,QAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;;+GAXlD,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,EAVvB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,SAAA,EAAA;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,sBAAsB;AAC/B,gBAAA,UAAU,EAAE,MACR,MAAM,CAAC,YAAY;AACf,sBAAE;sBACA,MAAM,CAAC,sBAAsB,EAAE,EAAC,QAAQ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AAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,KAAA,EAAA,KAAA,EAAA,qBAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAMjC,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAR9C,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,EAC/B,OAAA,EAAA,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAA,eAAA,EAG1B,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA,CAAC,aAAa,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,0VAAA,EAAA,MAAA,EAAA,CAAA,qaAAA,CAAA,EAAA;;;AExChD;;AAEG;;;;"}
@@ -1,26 +1,22 @@
1
- import { NgIf } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, Component, ChangeDetectionStrategy } from '@angular/core';
4
- import { TuiRipple } from '@taiga-ui/addon-mobile/directives';
5
- import { TuiLet } from '@taiga-ui/cdk/directives/let';
6
- import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
7
- import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
8
- import { TuiCalendarSheet } from '@taiga-ui/core/components/calendar';
9
- import { TuiCalendarSheetPipe } from '@taiga-ui/core/pipes/calendar-sheet';
2
+ import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { WA_IS_IOS } from '@ng-web-apis/platform';
4
+ import { TuiRipple } from '@taiga-ui/addon-mobile/directives/ripple';
5
+ import { TuiCalendarSheet, TuiCalendarSheetPipe } from '@taiga-ui/core/components/calendar';
10
6
 
11
7
  class TuiMobileCalendarSheet extends TuiCalendarSheet {
12
8
  constructor() {
13
9
  super(...arguments);
14
- this.isIOS = inject(TUI_IS_IOS);
10
+ this.isIOS = inject(WA_IS_IOS);
15
11
  }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarSheet, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiMobileCalendarSheet, isStandalone: true, selector: "tui-mobile-calendar-sheet", host: { properties: { "class._ios": "isIOS" } }, usesInheritance: true, ngImport: i0, 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 index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\n ></div>\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length ?? 0\">\n <div\n *ngIf=\"sheet[rowIndex]?.[colIndex] as item\"\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n </ng-container>\n <div\n *tuiRepeatTimes=\"let index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\n ></div>\n </div>\n</ng-container>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;-webkit-mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem));mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);-webkit-mask:none;mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;-webkit-mask:none;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{-webkit-mask:none;mask:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarSheet, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
13
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiMobileCalendarSheet, isStandalone: true, selector: "tui-mobile-calendar-sheet", host: { properties: { "class._ios": "isIOS" } }, usesInheritance: true, ngImport: i0, template: "@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-body-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{mask:none}\n"], dependencies: [{ kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18
14
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarSheet, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMobileCalendarSheet, decorators: [{
20
16
  type: Component,
21
- args: [{ standalone: true, selector: 'tui-mobile-calendar-sheet', imports: [NgIf, TuiCalendarSheetPipe, TuiLet, TuiRepeatTimes, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
17
+ args: [{ selector: 'tui-mobile-calendar-sheet', imports: [TuiCalendarSheetPipe, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
22
18
  '[class._ios]': 'isIOS',
23
- }, 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 index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\n ></div>\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length ?? 0\">\n <div\n *ngIf=\"sheet[rowIndex]?.[colIndex] as item\"\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n </ng-container>\n <div\n *tuiRepeatTimes=\"let index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\n ></div>\n </div>\n</ng-container>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;-webkit-mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem));mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);-webkit-mask:none;mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;-webkit-mask:none;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{-webkit-mask:none;mask:none}\n"] }]
19
+ }, template: "@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-body-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{mask:none}\n"] }]
24
20
  }] });
25
21
 
26
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.component.ts","../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.template.html","../../../projects/addon-mobile/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives';\nimport {TuiLet} from '@taiga-ui/cdk/directives/let';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {TuiCalendarSheet} from '@taiga-ui/core/components/calendar';\nimport {TuiCalendarSheetPipe} from '@taiga-ui/core/pipes/calendar-sheet';\n\n@Component({\n standalone: true,\n selector: 'tui-mobile-calendar-sheet',\n imports: [NgIf, TuiCalendarSheetPipe, TuiLet, TuiRepeatTimes, TuiRipple],\n templateUrl: './mobile-calendar-sheet.template.html',\n styleUrls: ['./mobile-calendar-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiMobileCalendarSheet extends TuiCalendarSheet {\n protected readonly isIOS = inject(TUI_IS_IOS);\n}\n","<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 index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\n ></div>\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length ?? 0\">\n <div\n *ngIf=\"sheet[rowIndex]?.[colIndex] as item\"\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n </ng-container>\n <div\n *tuiRepeatTimes=\"let index of 7 - (sheet[rowIndex]?.length ?? 0)\"\n class=\"t-cell t-cell_empty\"\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A,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAQ9D,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,2BAA2B,EAAA,OAAA,EAC5B,CAAC,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,mBAGvD,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,cAAc,EAAE,OAAO;AAC1B,qBAAA,EAAA,QAAA,EAAA,2qCAAA,EAAA,MAAA,EAAA,CAAA,8qJAAA,CAAA,EAAA,CAAA;;;AElBL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.component.ts","../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.template.html","../../../projects/addon-mobile/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiCalendarSheet, TuiCalendarSheetPipe} from '@taiga-ui/core/components/calendar';\n\n@Component({\n selector: 'tui-mobile-calendar-sheet',\n imports: [TuiCalendarSheetPipe, TuiRipple],\n templateUrl: './mobile-calendar-sheet.template.html',\n styleUrl: './mobile-calendar-sheet.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiMobileCalendarSheet extends TuiCalendarSheet {\n protected readonly isIOS = inject(WA_IS_IOS);\n}\n","@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAeM,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAV5D,IAAA,WAAA,GAAA;;AAWuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;AAC/C;+GAFY,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,ECfnC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,OAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,irCA8BA,EDvBc,MAAA,EAAA,CAAA,skIAAA,CAAA,EAAA,YAAA,EAAA,CA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