@taiga-ui/addon-mobile 2.52.0 → 2.54.1
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.
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +1 -0
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +1 -0
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +7 -2
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +2 -0
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.js +6 -0
- package/bundles/taiga-ui-addon-mobile-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.min.js.map +1 -1
- package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.metadata.json +1 -1
- package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.metadata.json +1 -1
- package/components/sheet/taiga-ui-addon-mobile-components-sheet.metadata.json +1 -1
- package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.metadata.json +1 -1
- package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.metadata.json +1 -1
- package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +2 -1
- package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +2 -1
- package/esm2015/components/sheet/components/sheet/sheet.providers.js +3 -1
- package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +3 -3
- package/esm2015/components/sheet/ios.hacks.js +4 -1
- package/esm2015/directives/ripple/ripple.providers.js +3 -1
- package/esm2015/directives/sidebar/sidebar.component.js +1 -1
- package/esm2015/utils/find-touch-index.js +6 -1
- package/esm5/components/mobile-calendar/mobile-calendar.providers.js +2 -1
- package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +2 -1
- package/esm5/components/sheet/components/sheet/sheet.providers.js +3 -1
- package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +3 -3
- package/esm5/components/sheet/ios.hacks.js +4 -1
- package/esm5/directives/ripple/ripple.providers.js +3 -1
- package/esm5/directives/sidebar/sidebar.component.js +1 -1
- package/esm5/utils/find-touch-index.js +6 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +7 -2
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +2 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-utils.js +6 -1
- package/fesm2015/taiga-ui-addon-mobile-utils.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -0
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -0
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js +7 -2
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +2 -0
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
- package/fesm5/taiga-ui-addon-mobile-utils.js +6 -1
- package/fesm5/taiga-ui-addon-mobile-utils.js.map +1 -1
- package/package.json +4 -4
- package/utils/find-touch-index.d.ts +4 -0
- package/utils/taiga-ui-addon-mobile-utils.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = 'tuiRippleOn';\nexport const RIPPLE_OFF = 'tuiRippleOff';\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n 'Stream of ripple elements to add',\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n 'Stream of ripple elements to remove',\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, 'touchstart').pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement('div');\n\n renderer.addClass(ripple, 'tui-ripple');\n renderer.setAttribute(\n ripple,\n 'style',\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, 'animationend').pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: '[tuiRipple]',\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, 'touchend');\n const touchMove$ = typedFromEvent(nativeElement, 'touchmove');\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, 'animationend');\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n 'background',\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, 'animationName', RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;IAWa,SAAS,GAAG,cAAc;IAC1B,UAAU,GAAG,eAAe;IAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACpC;IACW,cAAc,GAAG,IAAI,cAAc,CAC5C,qCAAqC,EACvC;IACW,oBAAoB,GAAe;IAC5C,iBAAiB;IACjB;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC9D,UAAU,EAAE,kBAAkB;KACjC;IACD;QACI,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC;QACtE,UAAU,EAAE,gBAAgB;KAC/B;EACH;SAEc,kBAAkB,CAC9B,cAAuB,EACvB,KAAc,EACd,EAAwC,EACxC,QAAmB;QADlB,gCAAa;IAGd,OAAO,KAAK,IAAI,CAAC,cAAc;UACzB,KAAK;UACL,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAC5C,GAAG,CAAC,UAAC,EAAS;gBAAR,oBAAO;YACH,IAAA,gCAAgD,EAA/C,oBAAO,EAAE,o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","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = 'tuiRippleOn';\nexport const RIPPLE_OFF = 'tuiRippleOff';\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n 'Stream of ripple elements to add',\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n 'Stream of ripple elements to remove',\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, 'touchstart').pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement('div');\n\n renderer.addClass(ripple, 'tui-ripple');\n renderer.setAttribute(\n ripple,\n 'style',\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, 'animationend').pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: '[tuiRipple]',\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, 'touchend');\n const touchMove$ = typedFromEvent(nativeElement, 'touchmove');\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, 'animationend');\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n 'background',\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, 'animationName', RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;IAWa,SAAS,GAAG,cAAc;IAC1B,UAAU,GAAG,eAAe;IAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC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AAE,aAAa;YACvB,SAAS,EAAE,oBAAoB;SAClC,CAAC;QAMO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;QACjC,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACxB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;OAVlB,kBAAkB,CAyD9B;IAAD,yBAAC;CAzDD;;;ICrBA;KAA+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;YAC5D,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,eAAe,EAAE,CAAC,wBAAwB,CAAC;SAC9C,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACVA;;;;;;"}
|
|
@@ -131,7 +131,7 @@ var TuiSidebarComponent = /** @class */ (function () {
|
|
|
131
131
|
template: "<div\n polymorpheus-outlet\n tuiActiveZone\n class=\"t-wrapper\"\n [content]=\"content\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n></div>\n",
|
|
132
132
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
133
133
|
animations: [tuiSlideIn],
|
|
134
|
-
styles: [":host{position:fixed;top:0;left:0;width:100%;height:100%;display:flex}:host:after,:host:before{position:absolute;top:0;left:0;width:100%;content:'';height:
|
|
134
|
+
styles: [":host{position:fixed;top:0;left:0;width:100%;height:100%;display:flex}:host:after,:host:before{position:absolute;top:0;left:0;width:100%;content:'';height:100%;background:rgba(0,0,0,.38);-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}:host:before{left:-100%;width:200%}:host:after{left:100%}:host.ng-animating:after,:host.ng-animating:before{opacity:0;transition:opacity var(--tui-duration)}:host.right{justify-content:flex-end}:host.left{justify-content:flex-start}.t-wrapper{position:relative;display:flex;flex-direction:column;background:var(--tui-base-01);box-shadow:0 10rem var(--tui-base-01);width:17.25rem}.t-wrapper_auto-width{width:auto}"]
|
|
135
135
|
}),
|
|
136
136
|
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
137
137
|
__param(1, Inject(TuiSidebarDirective))
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated: use {@link tuiFindTouchIndex} instead
|
|
3
|
+
*/
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1
5
|
function findTouchIndex(touches, id) {
|
|
2
6
|
for (var i = 0; i < touches.length; i++) {
|
|
3
7
|
var identifier = touches[i].identifier;
|
|
@@ -7,10 +11,11 @@ function findTouchIndex(touches, id) {
|
|
|
7
11
|
}
|
|
8
12
|
return -1;
|
|
9
13
|
}
|
|
14
|
+
var tuiFindTouchIndex = findTouchIndex;
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Generated bundle index. Do not edit.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
|
-
export { findTouchIndex };
|
|
20
|
+
export { findTouchIndex, tuiFindTouchIndex };
|
|
16
21
|
//# sourceMappingURL=taiga-ui-addon-mobile-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-utils.js","sources":["ng://@taiga-ui/addon-mobile/utils/find-touch-index.ts","ng://@taiga-ui/addon-mobile/utils/taiga-ui-addon-mobile-utils.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-utils.js","sources":["ng://@taiga-ui/addon-mobile/utils/find-touch-index.ts","ng://@taiga-ui/addon-mobile/utils/taiga-ui-addon-mobile-utils.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiFindTouchIndex} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function findTouchIndex(touches: TouchList, id: number): number {\n for (let i = 0; i < touches.length; i++) {\n const {identifier} = touches[i];\n\n if (identifier === id) {\n return i;\n }\n }\n\n return -1;\n}\n\nexport const tuiFindTouchIndex = findTouchIndex;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;AAGA;SACgB,cAAc,CAAC,OAAkB,EAAE,EAAU;IACzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC9B,IAAA,kCAAU,CAAe;QAEhC,IAAI,UAAU,KAAK,EAAE,EAAE;YACnB,OAAO,CAAC,CAAC;SACZ;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;IAEY,iBAAiB,GAAG;;AChBjC;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.1",
|
|
4
4
|
"description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"@angular/common": ">=9.0.0",
|
|
16
16
|
"@angular/core": ">=9.0.0",
|
|
17
17
|
"@ng-web-apis/common": ">=1.12.1 < 2",
|
|
18
|
-
"@taiga-ui/cdk": ">=2.
|
|
19
|
-
"@taiga-ui/core": ">=2.
|
|
20
|
-
"@taiga-ui/kit": ">=2.
|
|
18
|
+
"@taiga-ui/cdk": ">=2.54.1",
|
|
19
|
+
"@taiga-ui/core": ">=2.54.1",
|
|
20
|
+
"@taiga-ui/kit": ">=2.54.1",
|
|
21
21
|
"@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
|
|
22
22
|
"rxjs": ">=6.0.0"
|
|
23
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"findTouchIndex":{"__symbolic":"function"}},"origins":{"findTouchIndex":"./find-touch-index"},"importAs":"@taiga-ui/addon-mobile/utils"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"findTouchIndex":{"__symbolic":"function"},"tuiFindTouchIndex":{"__symbolic":"reference","name":"findTouchIndex"}},"origins":{"findTouchIndex":"./find-touch-index","tuiFindTouchIndex":"./find-touch-index"},"importAs":"@taiga-ui/addon-mobile/utils"}
|