@taiga-ui/addon-mobile 2.74.0 → 2.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js +47 -2
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +60 -15
- 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-mobile-dialog.umd.js +48 -3
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +51 -6
- 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 +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 +85 -40
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +48 -3
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +48 -3
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.js +46 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +48 -3
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +51 -6
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +53 -8
- 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 +56 -11
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +61 -16
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +48 -3
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +1 -1
- package/const/mobile-alert-options.d.ts +3 -4
- package/directives/mobile-tabs/mobile-tabs.directive.d.ts +1 -1
- package/esm2015/components/mobile-calendar/mobile-calendar.component.js +15 -15
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +2 -2
- package/esm2015/components/mobile-dialog/mobile-dialog.component.js +3 -3
- package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +3 -3
- package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +2 -2
- package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +2 -2
- package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +2 -2
- package/esm2015/components/sheet/components/sheet/sheet.component.js +13 -13
- package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +2 -2
- package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +4 -4
- package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +2 -2
- package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +2 -2
- package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +5 -5
- package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +9 -9
- package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +8 -8
- package/esm2015/components/sheet/sheet.directive.js +3 -3
- package/esm2015/components/theme-android/theme-android.component.js +3 -3
- package/esm2015/components/theme-ios/theme-ios.component.js +3 -3
- package/esm2015/const/mobile-alert-options.js +1 -1
- package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +3 -3
- package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +2 -2
- package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +5 -5
- package/esm2015/directives/ripple/ripple-styles.component.js +2 -2
- package/esm2015/directives/ripple/ripple.directive.js +7 -7
- package/esm2015/directives/sidebar/sidebar.component.js +7 -7
- package/esm2015/directives/sidebar/sidebar.directive.js +5 -5
- package/esm2015/directives/touchable/touchable.directive.js +15 -15
- package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +3 -3
- package/esm2015/types/touch-mode.js +1 -1
- package/esm5/components/mobile-calendar/mobile-calendar.component.js +15 -15
- package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +2 -2
- package/esm5/components/mobile-dialog/mobile-dialog.component.js +3 -3
- package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +3 -3
- package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +2 -2
- package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +2 -2
- package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +2 -2
- package/esm5/components/sheet/components/sheet/sheet.component.js +13 -13
- package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +2 -2
- package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +4 -4
- package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +2 -2
- package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +2 -2
- package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +5 -5
- package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +9 -9
- package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +8 -8
- package/esm5/components/sheet/sheet.directive.js +3 -3
- package/esm5/components/theme-android/theme-android.component.js +3 -3
- package/esm5/components/theme-ios/theme-ios.component.js +3 -3
- package/esm5/const/mobile-alert-options.js +1 -1
- package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +3 -3
- package/esm5/directives/mobile-tabs/mobile-tabs.component.js +2 -2
- package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +5 -5
- package/esm5/directives/ripple/ripple-styles.component.js +2 -2
- package/esm5/directives/ripple/ripple.directive.js +7 -7
- package/esm5/directives/sidebar/sidebar.component.js +7 -7
- package/esm5/directives/sidebar/sidebar.directive.js +5 -5
- package/esm5/directives/touchable/touchable.directive.js +16 -16
- package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +3 -3
- package/esm5/types/touch-mode.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +14 -14
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +5 -5
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +39 -39
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +5 -5
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +7 -7
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +10 -10
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +14 -14
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +14 -14
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +2 -2
- package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +5 -5
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js +39 -39
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +2 -2
- package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +2 -2
- package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-const.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +2 -2
- package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +5 -5
- package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +7 -7
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +10 -10
- package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +15 -15
- package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +2 -2
- package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
- package/package.json +4 -4
- package/types/touch-mode.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-theme-android.js","sources":["ng://@taiga-ui/addon-mobile/components/theme-android/theme-android.component.ts","ng://@taiga-ui/addon-mobile/components/theme-android/theme-android.module.ts","ng://@taiga-ui/addon-mobile/components/theme-android/taiga-ui-addon-mobile-components-theme-android.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-theme-android.js","sources":["ng://@taiga-ui/addon-mobile/components/theme-android/theme-android.component.ts","ng://@taiga-ui/addon-mobile/components/theme-android/theme-android.module.ts","ng://@taiga-ui/addon-mobile/components/theme-android/taiga-ui-addon-mobile-components-theme-android.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector: 'tui-theme-android',\n styleUrls: ['./theme-android.style.less'],\n template: '',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThemeAndroidComponent extends AbstractTuiThemeSwitcher {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiThemeAndroidComponent} from './theme-android.component';\n\n@NgModule({\n declarations: [TuiThemeAndroidComponent],\n exports: [TuiThemeAndroidComponent],\n})\nexport class TuiThemeAndroidModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;IAQa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,wBAAwB;EAAG;AAA5D,wBAAwB;IAPpC,SAAS,CAAC;QACP,QAAQ,EAAE,mBAAmB;QAE7B,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;QACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;GACW,wBAAwB,CAAoC;;ICH5D,qBAAqB,GAAlC,MAAa,qBAAqB;EAAG;AAAxB,qBAAqB;IAJjC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;QACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;KACtC,CAAC;GACW,qBAAqB,CAAG;;ACRrC;;;;;;"}
|
|
@@ -7,8 +7,8 @@ let TuiThemeIosComponent = class TuiThemeIosComponent extends AbstractTuiThemeSw
|
|
|
7
7
|
};
|
|
8
8
|
TuiThemeIosComponent = __decorate([
|
|
9
9
|
Component({
|
|
10
|
-
selector:
|
|
11
|
-
template:
|
|
10
|
+
selector: 'tui-theme-ios',
|
|
11
|
+
template: '',
|
|
12
12
|
encapsulation: ViewEncapsulation.None,
|
|
13
13
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
14
|
styles: ["html{touch-action:manipulation}body{-ms-scroll-chaining:none;overscroll-behavior:none}*{outline:0;scrollbar-width:none;-webkit-tap-highlight-color:transparent}[contenteditable] *,input,textarea{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}::-moz-selection{background-color:transparent}::selection{background-color:transparent}.tui-island{padding:1rem;border-radius:.75rem;box-shadow:0 .625rem 1.875rem rgba(0,0,0,.2)}.tui-island:before{display:none}a[tuiButton],a[tuiIconButton],button[tuiButton],button[tuiIconButton]{border-radius:.5rem;font-size:1.0625rem!important;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-theme-ios.js","sources":["ng://@taiga-ui/addon-mobile/components/theme-ios/theme-ios.component.ts","ng://@taiga-ui/addon-mobile/components/theme-ios/theme-ios.module.ts","ng://@taiga-ui/addon-mobile/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-theme-ios.js","sources":["ng://@taiga-ui/addon-mobile/components/theme-ios/theme-ios.component.ts","ng://@taiga-ui/addon-mobile/components/theme-ios/theme-ios.module.ts","ng://@taiga-ui/addon-mobile/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector: 'tui-theme-ios',\n styleUrls: ['./theme-ios.style.less'],\n template: '',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiThemeIosComponent extends AbstractTuiThemeSwitcher {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiThemeIosComponent} from './theme-ios.component';\n\n@NgModule({\n declarations: [TuiThemeIosComponent],\n exports: [TuiThemeIosComponent],\n})\nexport class TuiThemeIosModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;IAQa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,wBAAwB;EAAG;AAAxD,oBAAoB;IAPhC,SAAS,CAAC;QACP,QAAQ,EAAE,eAAe;QAEzB,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;QACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;GACW,oBAAoB,CAAoC;;ICHxD,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAJ7B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAClC,CAAC;GACW,iBAAiB,CAAG;;ACRjC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-const.js","sources":["ng://@taiga-ui/addon-mobile/const/mobile-alert-options.ts","ng://@taiga-ui/addon-mobile/const/taiga-ui-addon-mobile-const.ts"],"sourcesContent":["import {TuiDialogOptions} from '@taiga-ui/core';\n\nexport type TuiMobileAlertOptions = Omit<\n TuiDialogOptions<unknown>,\n 'data' | '
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-const.js","sources":["ng://@taiga-ui/addon-mobile/const/mobile-alert-options.ts","ng://@taiga-ui/addon-mobile/const/taiga-ui-addon-mobile-const.ts"],"sourcesContent":["import {TuiDialogOptions} from '@taiga-ui/core';\n\nexport type TuiMobileAlertOptions = Omit<\n TuiDialogOptions<unknown>,\n 'data' | 'dismissible' | 'header' | 'label' | 'required'\n>;\n\nconst MOBILE_ALERT_OPTIONS: TuiMobileAlertOptions = {\n size: `fullscreen`,\n closeable: false,\n};\n\nexport type TuiIosAlertOptions = Omit<\n TuiDialogOptions<unknown>,\n 'data' | 'header' | 'label' | 'required'\n>;\n\nexport const TUI_IOS_ALERT_OPTIONS: TuiIosAlertOptions = {\n dismissible: false,\n ...MOBILE_ALERT_OPTIONS,\n};\n\nexport type TuiAndroidAlertOptions = TuiIosAlertOptions;\n\nexport const TUI_ANDROID_ALERT_OPTIONS: TuiAndroidAlertOptions = {\n dismissible: true,\n ...MOBILE_ALERT_OPTIONS,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAOA,MAAM,oBAAoB,GAA0B;IAChD,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,KAAK;CACnB,CAAC;MAOW,qBAAqB,mBAC9B,WAAW,EAAE,KAAK,IACf,oBAAoB,EACzB;MAIW,yBAAyB,mBAClC,WAAW,EAAE,IAAI,IACd,oBAAoB;;AC1B3B;;;;;;"}
|
|
@@ -61,8 +61,8 @@ __decorate([
|
|
|
61
61
|
], TuiElasticStickyDirective.prototype, "tuiElasticSticky", void 0);
|
|
62
62
|
TuiElasticStickyDirective = __decorate([
|
|
63
63
|
Directive({
|
|
64
|
-
selector:
|
|
65
|
-
exportAs:
|
|
64
|
+
selector: '[tuiElasticSticky]',
|
|
65
|
+
exportAs: 'tuiElasticSticky',
|
|
66
66
|
providers: [TuiElasticStickyService, TuiDestroyService],
|
|
67
67
|
}),
|
|
68
68
|
__param(0, Inject(TuiElasticStickyService))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.js","sources":["ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.module.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {ElementRef, Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n getElementOffset,\n TuiDestroyService,\n tuiZoneOptimized,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {SCROLL_REF_SELECTOR, TUI_SCROLL_REF} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n skip,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\n// @dynamic\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n constructor(\n @Optional()\n @Inject(TUI_SCROLL_REF)\n scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) windowRef: Window,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n super(subscriber =>\n ngZone.onStable\n .pipe(\n take(1),\n switchMap(() => {\n const closest = nativeElement.closest(SCROLL_REF_SELECTOR);\n const host = scrollRef?.nativeElement ?? closest;\n const {offsetHeight} = nativeElement;\n const offsetTop = this.getInitialOffset(\n host || windowRef,\n nativeElement,\n );\n\n return typedFromEvent(host || windowRef, `scroll`).pipe(\n map(() =>\n Math.max(\n 1 -\n Math.max(\n Math.round(\n host\n ? host.scrollTop\n : windowRef.pageYOffset,\n ) - offsetTop,\n 0,\n ) /\n offsetHeight,\n 0,\n ),\n ),\n );\n }),\n startWith(1),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n private getInitialOffset(host: Element | Window, element: HTMLElement): number {\n // TODO: iframe warning\n return host instanceof Element\n ? getElementOffset(host, element).offsetTop\n : element.getBoundingClientRect().top;\n }\n}\n","import {Directive, Inject, Output} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.js","sources":["ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.module.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {ElementRef, Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n getElementOffset,\n TuiDestroyService,\n tuiZoneOptimized,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {SCROLL_REF_SELECTOR, TUI_SCROLL_REF} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n skip,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\n// @dynamic\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n constructor(\n @Optional()\n @Inject(TUI_SCROLL_REF)\n scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) windowRef: Window,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n super(subscriber =>\n ngZone.onStable\n .pipe(\n take(1),\n switchMap(() => {\n const closest = nativeElement.closest(SCROLL_REF_SELECTOR);\n const host = scrollRef?.nativeElement ?? closest;\n const {offsetHeight} = nativeElement;\n const offsetTop = this.getInitialOffset(\n host || windowRef,\n nativeElement,\n );\n\n return typedFromEvent(host || windowRef, `scroll`).pipe(\n map(() =>\n Math.max(\n 1 -\n Math.max(\n Math.round(\n host\n ? host.scrollTop\n : windowRef.pageYOffset,\n ) - offsetTop,\n 0,\n ) /\n offsetHeight,\n 0,\n ),\n ),\n );\n }),\n startWith(1),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n private getInitialOffset(host: Element | Window, element: HTMLElement): number {\n // TODO: iframe warning\n return host instanceof Element\n ? getElementOffset(host, element).offsetTop\n : element.getBoundingClientRect().top;\n }\n}\n","import {Directive, Inject, Output} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector: '[tuiElasticSticky]',\n exportAs: 'tuiElasticSticky',\n providers: [TuiElasticStickyService, TuiDestroyService],\n})\nexport class TuiElasticStickyDirective {\n @Output()\n readonly tuiElasticSticky: Observable<number>;\n\n constructor(\n @Inject(TuiElasticStickyService) elasticStickyService: TuiElasticStickyService,\n ) {\n this.tuiElasticSticky = elasticStickyService;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiElasticStickyDirective} from './elastic-sticky.directive';\n\n@NgModule({\n declarations: [TuiElasticStickyDirective],\n exports: [TuiElasticStickyDirective],\n})\nexport class TuiElasticStickyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAoBA;IAEa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,UAAkB;IAC3D,YAGI,SAAyC,EACrB,EAAC,aAAa,EAA0B,EAC5C,MAAc,EACd,SAAiB,EACN,QAA2B;QAEtD,KAAK,CAAC,UAAU,IACZ,MAAM,CAAC,QAAQ;aACV,IAAI,CACD,IAAI,CAAC,CAAC,CAAC,EACP,SAAS,CAAC;;YACN,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;YAC3D,MAAM,IAAI,SAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,mCAAI,OAAO,CAAC;YACjD,MAAM,EAAC,YAAY,EAAC,GAAG,aAAa,CAAC;YACrC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CACnC,IAAI,IAAI,SAAS,EACjB,aAAa,CAChB,CAAC;YAEF,OAAO,cAAc,CAAC,IAAI,IAAI,SAAS,EAAE,QAAQ,CAAC,CAAC,IAAI,CACnD,GAAG,CAAC,MACA,IAAI,CAAC,GAAG,CACJ,CAAC;gBACG,IAAI,CAAC,GAAG,CACJ,IAAI,CAAC,KAAK,CACN,IAAI;sBACE,IAAI,CAAC,SAAS;sBACd,SAAS,CAAC,WAAW,CAC9B,GAAG,SAAS,EACb,CAAC,CACJ;oBACG,YAAY,EACpB,CAAC,CACJ,CACJ,CACJ,CAAC;SACL,CAAC,EACF,SAAS,CAAC,CAAC,CAAC,EACZ,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,EACP,gBAAgB,CAAC,MAAM,CAAC,EACxB,SAAS,CAAC,QAAQ,CAAC,CACtB;aAC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C,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;QACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;KACvC,CAAC;GACW,sBAAsB,CAAG;;ACRtC;;;;;;"}
|
|
@@ -7,7 +7,7 @@ let TuiMobileTabsComponent = class TuiMobileTabsComponent {
|
|
|
7
7
|
};
|
|
8
8
|
TuiMobileTabsComponent = __decorate([
|
|
9
9
|
Component({
|
|
10
|
-
template:
|
|
10
|
+
template: '',
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
12
|
styles: ["[tuiMobileTabs] tui-tabs[data-platform=android],tui-tabs[tuiMobileTabs][data-platform=android]{height:auto}[tuiMobileTabs] tui-tabs[data-platform=android] tui-underline,tui-tabs[tuiMobileTabs][data-platform=android] tui-underline{box-shadow:inset 0 -.1875rem var(--tui-link)}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab],tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;height:3rem;flex:1;flex-shrink:0;justify-content:center;text-transform:uppercase;color:var(--tui-base-09);opacity:.5;font-size:.875rem;font-weight:500;letter-spacing:-.008125rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]:hover,tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]:hover{box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]._active,tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]._active{opacity:1;color:var(--tui-base-09)}[tuiMobileTabs] tui-tabs[data-platform=ios],tui-tabs[tuiMobileTabs][data-platform=ios]{height:auto;border:2px solid transparent;border-radius:.5625rem;background:var(--tui-link);box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=ios] tui-underline,tui-tabs[tuiMobileTabs][data-platform=ios] tui-underline{border-radius:.4375rem;background:var(--tui-base-01);box-shadow:0 .1875rem .0625rem rgba(0,0,0,.04),0 .1875rem .5rem rgba(0,0,0,.12)}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab],tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]{height:1.75rem;flex:1;flex-shrink:0;justify-content:center;color:var(--tui-base-01);opacity:1;font-size:.8125rem;font-weight:500;letter-spacing:-.005rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]:hover,tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]:hover{box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]._active,tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]._active{font-size:.875rem;font-weight:600;color:var(--tui-link)}"]
|
|
13
13
|
})
|
|
@@ -22,10 +22,10 @@ let TuiMobileTabsDirective = class TuiMobileTabsDirective {
|
|
|
22
22
|
}
|
|
23
23
|
get platform() {
|
|
24
24
|
if (this.isIos) {
|
|
25
|
-
return
|
|
25
|
+
return 'ios';
|
|
26
26
|
}
|
|
27
27
|
if (this.isAndroid) {
|
|
28
|
-
return
|
|
28
|
+
return 'android';
|
|
29
29
|
}
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
@@ -36,11 +36,11 @@ TuiMobileTabsDirective.ctorParameters = () => [
|
|
|
36
36
|
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] }
|
|
37
37
|
];
|
|
38
38
|
__decorate([
|
|
39
|
-
HostBinding(
|
|
39
|
+
HostBinding('attr.data-platform')
|
|
40
40
|
], TuiMobileTabsDirective.prototype, "platform", null);
|
|
41
41
|
TuiMobileTabsDirective = __decorate([
|
|
42
42
|
Directive({
|
|
43
|
-
selector:
|
|
43
|
+
selector: '[tuiMobileTabs]',
|
|
44
44
|
providers: [
|
|
45
45
|
{
|
|
46
46
|
provide: TUI_TAB_MARGIN,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-mobile-tabs.js","sources":["ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.component.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.directive.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.module.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-mobile-tabs.js","sources":["ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.component.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.directive.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.module.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['mobile-tabs.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiMobileTabsComponent {}\n","import {Directive, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_ANDROID, TUI_IS_IOS, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {TUI_TAB_MARGIN} from '@taiga-ui/kit';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\n\n// @dynamic\n@Directive({\n selector: '[tuiMobileTabs]',\n providers: [\n {\n provide: TUI_TAB_MARGIN,\n useValue: 0,\n },\n ],\n})\nexport class TuiMobileTabsDirective {\n constructor(\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_IS_ANDROID) private readonly isAndroid: boolean,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiMobileTabsComponent);\n }\n\n @HostBinding('attr.data-platform')\n get platform(): 'android' | 'ios' | null {\n if (this.isIos) {\n return 'ios';\n }\n\n if (this.isAndroid) {\n return 'android';\n }\n\n return null;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\nimport {TuiMobileTabsDirective} from './mobile-tabs.directive';\n\n@NgModule({\n declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n exports: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n entryComponents: [TuiMobileTabsComponent],\n})\nexport class TuiMobileTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAOa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IALlC,SAAS,CAAC;QACP,QAAQ,EAAE,EAAE;QAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;KACxC,CAAC;GACW,sBAAsB,CAAG;;ACDtC;IAUa,sBAAsB,GAAnC,MAAa,sBAAsB;IAC/B,YACyC,KAAc,EACV,SAAkB,EACxB,eAA0C;QAFxC,UAAK,GAAL,KAAK,CAAS;QACV,cAAS,GAAT,SAAS,CAAS;QAG3D,eAAe,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;KACxD;IAGD,IAAI,QAAQ;QACR,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;KACf;EACJ;;0CAnBQ,MAAM,SAAC,UAAU;0CACjB,MAAM,SAAC,cAAc;YAC8B,yBAAyB,uBAA5E,MAAM,SAAC,yBAAyB;;AAMrC;IADC,WAAW,CAAC,oBAAoB,CAAC;sDAWjC;AApBQ,sBAAsB;IATlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,CAAC;aACd;SACJ;KACJ,CAAC;IAGO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;GAJ7B,sBAAsB,CAqBlC;;IC3BY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAL/B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;QAC9D,OAAO,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;QACzD,eAAe,EAAE,CAAC,sBAAsB,CAAC;KAC5C,CAAC;GACW,mBAAmB,CAAG;;ACVnC;;;;;;"}
|
|
@@ -55,7 +55,7 @@ let TuiRippleStylesComponent = class TuiRippleStylesComponent {
|
|
|
55
55
|
};
|
|
56
56
|
TuiRippleStylesComponent = __decorate([
|
|
57
57
|
Component({
|
|
58
|
-
template:
|
|
58
|
+
template: '',
|
|
59
59
|
encapsulation: ViewEncapsulation.None,
|
|
60
60
|
styles: ["@keyframes tuiRippleOn{from{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@keyframes tuiRippleOff{from{transform:none;opacity:.12}to{transform:none;opacity:0}}[tuiRipple]{position:relative;overflow:hidden}.tui-ripple{position:absolute;z-index:100;border-radius:100%;background:currentColor;transform:scale(0);animation-duration:450ms;animation-fill-mode:forwards;pointer-events:none}"]
|
|
61
61
|
})
|
|
@@ -65,25 +65,25 @@ const TOUCH_MOVE_DELAY = 100;
|
|
|
65
65
|
let TuiRippleDirective = class TuiRippleDirective {
|
|
66
66
|
constructor({ nativeElement }, directiveStyles, renderer, destroy$, start$, end$) {
|
|
67
67
|
directiveStyles.addComponent(TuiRippleStylesComponent);
|
|
68
|
-
const touchEnd$ = typedFromEvent(nativeElement,
|
|
69
|
-
const touchMove$ = typedFromEvent(nativeElement,
|
|
68
|
+
const touchEnd$ = typedFromEvent(nativeElement, 'touchend');
|
|
69
|
+
const touchMove$ = typedFromEvent(nativeElement, 'touchmove');
|
|
70
70
|
end$.subscribe(element => {
|
|
71
71
|
renderer.removeChild(nativeElement, element);
|
|
72
72
|
});
|
|
73
73
|
start$
|
|
74
74
|
.pipe(mergeMap(ripple => {
|
|
75
|
-
const animationEndOn$ = typedFromEvent(ripple,
|
|
75
|
+
const animationEndOn$ = typedFromEvent(ripple, 'animationend');
|
|
76
76
|
return race(timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)), touchEnd$.pipe(mapTo(true))).pipe(take(1),
|
|
77
77
|
// eslint-disable-next-line rxjs/no-unsafe-takeuntil
|
|
78
78
|
takeUntil(touchMove$), tap(() => {
|
|
79
|
-
renderer.setStyle(ripple,
|
|
79
|
+
renderer.setStyle(ripple, 'background', this.tuiRipple || null);
|
|
80
80
|
renderer.appendChild(nativeElement, ripple);
|
|
81
81
|
}), switchMap(isTap => isTap
|
|
82
82
|
? animationEndOn$
|
|
83
83
|
: race(touchEnd$.pipe(switchMapTo(animationEndOn$)), animationEndOn$.pipe(switchMapTo(touchEnd$)))), mapTo(ripple));
|
|
84
84
|
}), takeUntil(destroy$))
|
|
85
85
|
.subscribe(element => {
|
|
86
|
-
renderer.setStyle(element,
|
|
86
|
+
renderer.setStyle(element, 'animationName', RIPPLE_OFF);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
};
|
|
@@ -100,7 +100,7 @@ __decorate([
|
|
|
100
100
|
], TuiRippleDirective.prototype, "tuiRipple", void 0);
|
|
101
101
|
TuiRippleDirective = __decorate([
|
|
102
102
|
Directive({
|
|
103
|
-
selector:
|
|
103
|
+
selector: '[tuiRipple]',
|
|
104
104
|
providers: TUI_RIPPLE_PROVIDERS,
|
|
105
105
|
}),
|
|
106
106
|
__param(0, Inject(ElementRef)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`./ripple.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: `[tuiRipple]`,\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, `touchend`);\n const touchMove$ = typedFromEvent(nativeElement, `touchmove`);\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, `animationend`);\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n `background`,\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, `animationName`, RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;MAWa,SAAS,GAAG,cAAc;MAC1B,UAAU,GAAG,eAAe;MAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACp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SAAS,CAAC;QACP,QAAQ,EAAE,aAAa;QACvB,SAAS,EAAE,oBAAoB;KAClC,CAAC;IAMO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;IACxB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;GAVlB,kBAAkB,CAyD9B;;IC9EY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAL3B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;QAC5D,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,eAAe,EAAE,CAAC,wBAAwB,CAAC;KAC9C,CAAC;GACW,eAAe,CAAG;;ACV/B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: '[tuiRipple]',\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, 'touchend');\n const touchMove$ = typedFromEvent(nativeElement, 'touchmove');\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, 'animationend');\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n 'background',\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, 'animationName', RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;MAWa,SAAS,GAAG,cAAc;MAC1B,UAAU,GAAG,eAAe;MAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACpC;MACW,cAAc,GAAG,IAAI,cAAc,CAC5C,qCAAqC,EACvC;MACW,oBAAoB,GAAe;IAC5C,iBAAiB;IACjB;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC9D,UAAU,EAAE,kBAAkB;KACjC;IACD;QACI,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC;QACtE,UAAU,EAAE,gBAAgB;KAC/B;EACH;AAEF;SACgB,kBAAkB,CAC9B,cAAuB,EACvB,KAAc,EACd,EAAC,aAAa,EAA0B,EACxC,QAAmB;IAEnB,OAAO,KAAK,IAAI,CAAC,cAAc;UACzB,KAAK;UACL,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAC5C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KAC9C,CAAC;GACW,eAAe,CAAG;;ACV/B;;;;;;"}
|
|
@@ -12,7 +12,7 @@ let TuiSidebarDirective = class TuiSidebarDirective extends PolymorpheusTemplate
|
|
|
12
12
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
13
13
|
this.portalService = portalService;
|
|
14
14
|
this.sidebarRef = null;
|
|
15
|
-
this.direction =
|
|
15
|
+
this.direction = 'left';
|
|
16
16
|
this.autoWidth = false;
|
|
17
17
|
}
|
|
18
18
|
set tuiSidebar(open) {
|
|
@@ -50,17 +50,17 @@ TuiSidebarDirective.ctorParameters = () => [
|
|
|
50
50
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
|
|
51
51
|
];
|
|
52
52
|
__decorate([
|
|
53
|
-
Input(
|
|
53
|
+
Input('tuiSidebarDirection')
|
|
54
54
|
], TuiSidebarDirective.prototype, "direction", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
Input(
|
|
56
|
+
Input('tuiSidebarAutoWidth')
|
|
57
57
|
], TuiSidebarDirective.prototype, "autoWidth", void 0);
|
|
58
58
|
__decorate([
|
|
59
59
|
Input()
|
|
60
60
|
], TuiSidebarDirective.prototype, "tuiSidebar", null);
|
|
61
61
|
TuiSidebarDirective = __decorate([
|
|
62
62
|
Directive({
|
|
63
|
-
selector:
|
|
63
|
+
selector: '[tuiSidebar]',
|
|
64
64
|
}),
|
|
65
65
|
__param(0, Inject(TemplateRef)),
|
|
66
66
|
__param(1, Inject(Injector)),
|
|
@@ -74,11 +74,11 @@ let TuiSidebarComponent = class TuiSidebarComponent {
|
|
|
74
74
|
constructor(options, directive) {
|
|
75
75
|
this.options = options;
|
|
76
76
|
this.directive = directive;
|
|
77
|
-
this.left = Object.assign({ value:
|
|
78
|
-
this.right = Object.assign({ value:
|
|
77
|
+
this.left = Object.assign({ value: 'left' }, this.options);
|
|
78
|
+
this.right = Object.assign({ value: 'right' }, this.options);
|
|
79
79
|
}
|
|
80
80
|
get animation() {
|
|
81
|
-
return this.direction ===
|
|
81
|
+
return this.direction === 'left' ? this.left : this.right;
|
|
82
82
|
}
|
|
83
83
|
get directionHostClass() {
|
|
84
84
|
return `t-${this.directive.direction}`;
|
|
@@ -101,14 +101,14 @@ TuiSidebarComponent.ctorParameters = () => [
|
|
|
101
101
|
{ type: TuiSidebarDirective, decorators: [{ type: Inject, args: [TuiSidebarDirective,] }] }
|
|
102
102
|
];
|
|
103
103
|
__decorate([
|
|
104
|
-
HostBinding(
|
|
104
|
+
HostBinding('@tuiSlideIn')
|
|
105
105
|
], TuiSidebarComponent.prototype, "animation", null);
|
|
106
106
|
__decorate([
|
|
107
|
-
HostBinding(
|
|
107
|
+
HostBinding('class')
|
|
108
108
|
], TuiSidebarComponent.prototype, "directionHostClass", null);
|
|
109
109
|
TuiSidebarComponent = __decorate([
|
|
110
110
|
Component({
|
|
111
|
-
selector:
|
|
111
|
+
selector: 'aside[tuiSidebar]',
|
|
112
112
|
template: "<div\n polymorpheus-outlet\n tuiActiveZone\n class=\"t-wrapper\"\n [content]=\"content\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n></div>\n",
|
|
113
113
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
114
|
animations: [tuiSlideIn],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.js","sources":["ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.directive.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.component.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.module.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Inject,\n Injector,\n Input,\n OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPortalService} from '@taiga-ui/cdk';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.js","sources":["ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.directive.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.component.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/sidebar.module.ts","ng://@taiga-ui/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Inject,\n Injector,\n Input,\n OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPortalService} from '@taiga-ui/cdk';\nimport {TuiHorizontalDirection} from '@taiga-ui/core';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n@Directive({\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n autoWidth = false;\n\n @Input()\n set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n constructor(\n @Inject(TemplateRef) readonly content: TemplateRef<T>,\n @Inject(Injector) private readonly injector: Injector,\n @Inject(ComponentFactoryResolver)\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n @Inject(TuiPortalService)\n private readonly portalService: TuiPortalService,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(content, changeDetectorRef);\n }\n\n ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n const componentFactory =\n this.componentFactoryResolver.resolveComponentFactory(TuiSidebarComponent);\n\n this.sidebarRef = this.portalService.add(componentFactory, this.injector);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.portalService.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {\n TUI_ANIMATION_OPTIONS,\n TuiAnimationOptions,\n TuiHorizontalDirection,\n tuiSlideIn,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n// @dynamic\n@Component({\n selector: 'aside[tuiSidebar]',\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly left = {\n value: 'left',\n ...this.options,\n } as const;\n\n private readonly right = {\n value: 'right',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(TuiSidebarDirective) private readonly directive: TuiSidebarDirective,\n ) {}\n\n @HostBinding('@tuiSlideIn')\n get animation(): TuiAnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n @HostBinding('class')\n get directionHostClass(): string {\n return `t-${this.directive.direction}`;\n }\n\n get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n\n ngDoCheck(): void {\n this.directive.check();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n@NgModule({\n imports: [TuiActiveZoneModule, PolymorpheusModule],\n declarations: [TuiSidebarDirective, TuiSidebarComponent],\n entryComponents: [TuiSidebarComponent],\n exports: [TuiSidebarDirective],\n})\nexport class TuiSidebarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;IAoBa,mBAAmB,GAAhC,MAAa,mBACT,SAAQ,oBAAuB;IAoB/B,YACkC,OAAuB,EAClB,QAAkB,EAEpC,wBAAkD,EAElD,aAA+B,EACrB,iBAAoC;QAE/D,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QARJ,YAAO,GAAP,OAAO,CAAgB;QAClB,aAAQ,GAAR,QAAQ,CAAU;QAEpC,6BAAwB,GAAxB,wBAAwB,CAA0B;QAElD,kBAAa,GAAb,aAAa,CAAkB;QAvB5C,eAAU,GAA6C,IAAI,CAAC;QAGpE,cAAS,GAA2B,MAAM,CAAC;QAG3C,cAAS,GAAG,KAAK,CAAC;KAqBjB;IAlBD,IAAI,UAAU,CAAC,IAAa;QACxB,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,IAAI,EAAE,CAAC;SACf;aAAM;YACH,IAAI,CAAC,IAAI,EAAE,CAAC;SACf;KACJ;IAcD,WAAW;QACP,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAEO,IAAI;QACR,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B,OAAO;SACV;QAED,MAAM,gBAAgB,GAClB,IAAI,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;QAE/E,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;KACrD;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7
7
|
import { tap, map, switchMap, filter, take, takeUntil } from 'rxjs/operators';
|
|
8
8
|
|
|
9
9
|
const STYLE = {
|
|
10
|
-
transform:
|
|
11
|
-
opacity:
|
|
12
|
-
background:
|
|
10
|
+
transform: 'scale(0.95)',
|
|
11
|
+
opacity: '0.6',
|
|
12
|
+
background: 'rgba(146, 153, 162, 0.12)',
|
|
13
13
|
};
|
|
14
14
|
let TuiTouchableDirective = class TuiTouchableDirective {
|
|
15
15
|
constructor(elementRef, isIos, { nativeElement }, renderer, destroy$) {
|
|
16
|
-
this.tuiTouchable =
|
|
16
|
+
this.tuiTouchable = '';
|
|
17
17
|
if (!isIos) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
const element = elementRef ? elementRef.nativeElement : nativeElement;
|
|
21
|
-
typedFromEvent(element,
|
|
21
|
+
typedFromEvent(element, 'touchstart', { passive: true })
|
|
22
22
|
.pipe(tap(() => {
|
|
23
23
|
this.onTouchStart(renderer, element);
|
|
24
|
-
}), map(({ touches }) => touches[touches.length - 1].identifier), switchMap(identifier => race(typedFromEvent(element,
|
|
24
|
+
}), map(({ touches }) => touches[touches.length - 1].identifier), switchMap(identifier => race(typedFromEvent(element, 'touchmove', { passive: true }).pipe(filter(({ touches }) => this.hasTouchLeft(element, touches, identifier))), typedFromEvent(element, 'touchend')).pipe(take(1))), takeUntil(destroy$))
|
|
25
25
|
.subscribe(() => {
|
|
26
|
-
renderer.removeStyle(element,
|
|
27
|
-
renderer.removeStyle(element,
|
|
28
|
-
renderer.removeStyle(element,
|
|
26
|
+
renderer.removeStyle(element, 'transform');
|
|
27
|
+
renderer.removeStyle(element, 'opacity');
|
|
28
|
+
renderer.removeStyle(element, 'background');
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
get style() {
|
|
32
|
-
return this.tuiTouchable ||
|
|
32
|
+
return this.tuiTouchable || 'transform';
|
|
33
33
|
}
|
|
34
34
|
hasTouchLeft(element, touches, identifier) {
|
|
35
35
|
const { ownerDocument } = element;
|
|
@@ -41,11 +41,11 @@ let TuiTouchableDirective = class TuiTouchableDirective {
|
|
|
41
41
|
return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));
|
|
42
42
|
}
|
|
43
43
|
onTouchStart(renderer, element) {
|
|
44
|
-
if (this.style !==
|
|
45
|
-
renderer.removeStyle(element,
|
|
44
|
+
if (this.style !== 'transform') {
|
|
45
|
+
renderer.removeStyle(element, 'transition');
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
renderer.setStyle(element,
|
|
48
|
+
renderer.setStyle(element, 'transition', 'transform 0.2s');
|
|
49
49
|
}
|
|
50
50
|
renderer.setStyle(element, this.style, STYLE[this.style]);
|
|
51
51
|
}
|
|
@@ -63,7 +63,7 @@ __decorate([
|
|
|
63
63
|
], TuiTouchableDirective.prototype, "tuiTouchable", void 0);
|
|
64
64
|
TuiTouchableDirective = __decorate([
|
|
65
65
|
Directive({
|
|
66
|
-
selector:
|
|
66
|
+
selector: '[tuiTouchable]',
|
|
67
67
|
providers: [TuiDestroyService],
|
|
68
68
|
}),
|
|
69
69
|
__param(0, Optional()), __param(0, Inject(TUI_ELEMENT_REF)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-touchable.js","sources":["ng://@taiga-ui/addon-mobile/directives/touchable/touchable.directive.ts","ng://@taiga-ui/addon-mobile/directives/touchable/touchable.module.ts","ng://@taiga-ui/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, Optional, Renderer2} from '@angular/core';\nimport {TuiTouchModeT} from '@taiga-ui/addon-mobile/types';\nimport {findTouchIndex} from '@taiga-ui/addon-mobile/utils';\nimport {\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {race} from 'rxjs';\nimport {filter, map, switchMap, take, takeUntil, tap} from 'rxjs/operators';\n\nconst STYLE = {\n transform:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-touchable.js","sources":["ng://@taiga-ui/addon-mobile/directives/touchable/touchable.directive.ts","ng://@taiga-ui/addon-mobile/directives/touchable/touchable.module.ts","ng://@taiga-ui/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, Optional, Renderer2} from '@angular/core';\nimport {TuiTouchModeT} from '@taiga-ui/addon-mobile/types';\nimport {findTouchIndex} from '@taiga-ui/addon-mobile/utils';\nimport {\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core';\nimport {race} from 'rxjs';\nimport {filter, map, switchMap, take, takeUntil, tap} from 'rxjs/operators';\n\nconst STYLE = {\n transform: 'scale(0.95)',\n opacity: '0.6',\n background: 'rgba(146, 153, 162, 0.12)',\n} as const;\n\n@Directive({\n selector: '[tuiTouchable]',\n providers: [TuiDestroyService],\n})\nexport class TuiTouchableDirective {\n @Input()\n @tuiDefaultProp()\n tuiTouchable: TuiTouchModeT | '' = '';\n\n constructor(\n @Optional() @Inject(TUI_ELEMENT_REF) elementRef: ElementRef<HTMLElement> | null,\n @Inject(TUI_IS_IOS) isIos: boolean,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n if (!isIos) {\n return;\n }\n\n const element = elementRef ? elementRef.nativeElement : nativeElement;\n\n typedFromEvent(element, 'touchstart', {passive: true})\n .pipe(\n tap(() => {\n this.onTouchStart(renderer, element);\n }),\n map(({touches}) => touches[touches.length - 1].identifier),\n switchMap(identifier =>\n race(\n typedFromEvent(element, 'touchmove', {passive: true}).pipe(\n filter(({touches}) =>\n this.hasTouchLeft(element, touches, identifier),\n ),\n ),\n typedFromEvent(element, 'touchend'),\n ).pipe(take(1)),\n ),\n takeUntil(destroy$),\n )\n .subscribe(() => {\n renderer.removeStyle(element, 'transform');\n renderer.removeStyle(element, 'opacity');\n renderer.removeStyle(element, 'background');\n });\n }\n\n get style(): TuiTouchModeT {\n return this.tuiTouchable || 'transform';\n }\n\n private hasTouchLeft(\n element: HTMLElement,\n touches: TouchList,\n identifier: number,\n ): boolean {\n const {ownerDocument} = element;\n const id = findTouchIndex(touches, identifier);\n\n if (!ownerDocument || id === -1) {\n return true;\n }\n\n const {clientX, clientY} = touches[id];\n\n return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));\n }\n\n private onTouchStart(renderer: Renderer2, element: HTMLElement): void {\n if (this.style !== 'transform') {\n renderer.removeStyle(element, 'transition');\n } else {\n renderer.setStyle(element, 'transition', 'transform 0.2s');\n }\n\n renderer.setStyle(element, this.style, STYLE[this.style]);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiTouchableDirective} from './touchable.directive';\n\n@NgModule({\n declarations: [TuiTouchableDirective],\n exports: [TuiTouchableDirective],\n})\nexport class TuiTouchableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaA,MAAM,KAAK,GAAG;IACV,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,2BAA2B;CACjC,CAAC;IAME,qBAAqB,GAAlC,MAAa,qBAAqB;IAK9B,YACyC,UAA0C,EAC3D,KAAc,EACd,EAAC,aAAa,EAA0B,EACzC,QAAmB,EACX,QAA2B;QAP1D,iBAAY,GAAuB,EAAE,CAAC;QASlC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO;SACV;QAED,MAAM,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,aAAa,GAAG,aAAa,CAAC;QAEtE,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,I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C,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACRlC;;;;;;"}
|
|
@@ -21,11 +21,11 @@ TuiPrimitiveCalendarMobileComponent.ctorParameters = () => [
|
|
|
21
21
|
];
|
|
22
22
|
TuiPrimitiveCalendarMobileComponent = __decorate([
|
|
23
23
|
Component({
|
|
24
|
-
selector:
|
|
24
|
+
selector: 'tui-primitive-calendar-mobile',
|
|
25
25
|
template: "<ng-container *tuiLet=\"month | tuiCalendarSheet as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n <div\n *tuiRepeatTimes=\"let colIndex of sheet[rowIndex].length\"\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [class.t-cell_today]=\"itemIsToday(sheet[rowIndex][colIndex])\"\n [class.t-cell_interval]=\"itemIsInterval(sheet[rowIndex][colIndex])\"\n [attr.data-state]=\"getItemState(sheet[rowIndex][colIndex])\"\n [attr.data-range]=\"getItemRange(sheet[rowIndex][colIndex])\"\n (click)=\"onItemClick(sheet[rowIndex][colIndex])\"\n >\n {{ sheet[rowIndex][colIndex].day }}\n </div>\n </div>\n</ng-container>\n",
|
|
26
26
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
27
|
host: {
|
|
28
|
-
'[class._ios]':
|
|
28
|
+
'[class._ios]': 'isIOS',
|
|
29
29
|
},
|
|
30
30
|
styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;z-index:0;display:flex;justify-content:space-between}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:after,.t-item:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;width:2.75rem;text-align:center;outline:0;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:2px solid transparent}.t-cell:before{content:'';position:absolute;top:0;left:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%,0);content:'';bottom:.3125rem;border-radius:.375rem;background-color:var(--tui-text-02)}.t-cell_interval:before{background:var(--tui-base-02)}:host._single .t-cell_interval:before{background:var(--tui-secondary-hover)}.t-cell_interval:not(:last-child):before{right:-2.75rem}.t-cell_interval:first-child>.t-item{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background-color:var(--tui-primary-text)}.t-cell[data-range]>.t-item{color:var(--tui-primary-text)}.t-cell[data-range]>.t-item:after,.t-cell[data-range]>.t-item:before{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hovered]>.t-item:after,.t-cell[data-range][data-state=hovered]>.t-item:before{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=pressed]>.t-item:after,.t-cell[data-range][data-state=pressed]>.t-item:before{background-color:var(--tui-primary-active)}.t-cell[data-range=end]>.t-item:before{left:.25rem}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translateX(1.4375rem) scaleY(.6) scaleX(.4) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.25rem}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translateX(-1.4375rem) scaleY(.6) scaleX(.4) rotate(45deg)}.t-cell[data-state=disabled]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-cell[data-state=disabled]>.t-item{opacity:.36}.t-cell[data-state=hovered]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-hover)}.t-cell[data-state=pressed]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-active)}:host{width:20.75rem;max-width:100vw}:host._ios{width:22.625rem}.t-row{height:3rem;justify-content:flex-start}.t-row:first-child{justify-content:flex-end}:host._ios .t-row{height:3.125rem}.t-cell{height:2.75rem;border-radius:100%;margin-right:.25rem}.t-cell:last-child,:host._ios .t-cell:last-child{margin-right:0}.t-cell:before{right:-100vw}.t-cell:first-child:before{left:-100vw}.t-cell_today:after{height:.375rem;width:.375rem;background-color:var(--tui-link)}.t-cell_interval:before{background-color:var(--tui-base-02)}.t-cell_interval:last-child:first-child:before{right:-100vw}.t-cell[data-range=end],.t-cell[data-range=single],.t-cell[data-range=start]{border-radius:100%;background-color:var(--tui-link);color:var(--tui-accent-text);font-weight:500}.t-cell[data-range=end]:after,.t-cell[data-range=single]:after,.t-cell[data-range=start]:after{background-color:var(--tui-base-01)}:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=single],:host._ios .t-cell[data-range=start]{font-weight:600}.t-cell[data-range=start]:before{left:50%;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]:not(:first-child):before{left:50%;background:var(--tui-base-01);border-radius:0}.t-cell[data-range=end]:first-child:before{right:50%;background-color:var(--tui-base-02)}:host._ios .t-cell{margin-right:.5625rem}:host._ios .t-cell:before{border-radius:.5rem}@media screen and (max-width:22.4375rem){.t-cell,:host._ios .t-cell{margin-right:.125rem}.t-cell:last-child,:host._ios .t-cell:last-child{margin-right:0}}"]
|
|
31
31
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js","sources":["ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, TuiPrimitiveCalendarComponent} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\n/**\n * @internal\n * @dynamic\n */\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js","sources":["ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.ts","ng://@taiga-ui/addon-mobile/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, TuiPrimitiveCalendarComponent} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\n/**\n * @internal\n * @dynamic\n */\n@Component({\n selector: 'tui-primitive-calendar-mobile',\n templateUrl: './primitive-calendar-mobile.template.html',\n styleUrls: ['./primitive-calendar-mobile.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiPrimitiveCalendarMobileComponent extends TuiPrimitiveCalendarComponent {\n constructor(\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_ORDERED_SHORT_WEEK_DAYS)\n weekDays$: Observable<[string, string, string, string, string, string, string]>,\n ) {\n super(weekDays$);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiRippleModule} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiLetModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiCalendarSheetPipeModule} from '@taiga-ui/core';\n\nimport {TuiPrimitiveCalendarMobileComponent} from './primitive-calendar-mobile.component';\n\n/**\n * @internal\n */\n@NgModule({\n imports: [\n TuiRepeatTimesModule,\n TuiCalendarSheetPipeModule,\n TuiRippleModule,\n TuiLetModule,\n ],\n declarations: [TuiPrimitiveCalendarMobileComponent],\n exports: [TuiPrimitiveCalendarMobileComponent],\n})\nexport class TuiPrimitiveCalendarMobileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;IAaa,mCAAmC,GAAhD,MAAa,mCAAoC,SAAQ,6BAA6B;IAClF,YACiC,KAAc,EAE3C,SAA+E;QAE/E,KAAK,CAAC,SAAS,CAAC,CAAC;QAJY,UAAK,GAAL,KAAK,CAAS;KAK9C;EACJ;;0CANQ,MAAM,SAAC,UAAU;YAEP,UAAU,uBADpB,MAAM,SAAC,2BAA2B;;AAH9B,mCAAmC;IAT/C,SAAS,CAAC;QACP,QAAQ,EAAE,+BAA+B;QACzC,y5BAAwD;QAExD,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,IAAI,EAAE;YACF,cAAc,EAAE,OAAO;SAC1B;;KACJ,CAAC;IAGO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GAH/B,mCAAmC,CAQ/C;;ACnBD;;;IAaa,gCAAgC,GAA7C,MAAa,gCAAgC;EAAG;AAAnC,gCAAgC;IAV5C,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,oBAAoB;YACpB,0BAA0B;YAC1B,eAAe;YACf,YAAY;SACf;QACD,YAAY,EAAE,CAAC,mCAAmC,CAAC;QACnD,OAAO,EAAE,CAAC,mCAAmC,CAAC;KACjD,CAAC;GACW,gCAAgC,CAAG;;ACpBhD;;;;;;"}
|
|
@@ -47,7 +47,7 @@ var TuiMobileCalendarDialogComponent = /** @class */ (function () {
|
|
|
47
47
|
]; };
|
|
48
48
|
TuiMobileCalendarDialogComponent = __decorate([
|
|
49
49
|
Component({
|
|
50
|
-
selector:
|
|
50
|
+
selector: 'tui-mobile-calendar-dialog',
|
|
51
51
|
template: "<tui-mobile-calendar\n [single]=\"single\"\n [min]=\"min\"\n [max]=\"max\"\n [disabledItemHandler]=\"disabledItemHandler\"\n (cancel)=\"context.$implicit.complete()\"\n (confirm)=\"context.completeWith($event)\"\n></tui-mobile-calendar>\n",
|
|
52
52
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
53
53
|
styles: [":host{display:block;height:100vh;margin:-1.5rem -1.5rem -2rem}"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dialog.js","sources":["ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.component.ts","ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.module.ts","ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiDialogContext} from '@taiga-ui/core';\nimport {TuiMobileCalendarData} from '@taiga-ui/kit';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dialog.js","sources":["ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.component.ts","ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.module.ts","ng://@taiga-ui/addon-mobile/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiDialogContext} from '@taiga-ui/core';\nimport {TuiMobileCalendarData} from '@taiga-ui/kit';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: 'tui-mobile-calendar-dialog',\n templateUrl: './mobile-calendar-dialog.template.html',\n styleUrls: ['./mobile-calendar-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileCalendarDialogComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialogContext<\n TuiDay | TuiDayRange,\n TuiMobileCalendarData | undefined\n >,\n ) {}\n\n get single(): boolean {\n return !this.context.data || this.context.data.single === undefined\n ? true\n : this.context.data.single;\n }\n\n get min(): TuiDay {\n return this.context.data?.min || TUI_FIRST_DAY;\n }\n\n get max(): TuiDay {\n return this.context.data?.max || TUI_LAST_DAY;\n }\n\n get disabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.context.data?.disabledItemHandler || ALWAYS_FALSE_HANDLER;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiMobileCalendarModule} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit';\n\nimport {TuiMobileCalendarDialogComponent} from './mobile-calendar-dialog.component';\n\n// TODO: 3.0 remove in ivy compilation\nexport const MOBILE_CALENDAR_COMPONENT = TuiMobileCalendarDialogComponent;\n\n@NgModule({\n imports: [TuiMobileCalendarModule],\n declarations: [TuiMobileCalendarDialogComponent],\n exports: [TuiMobileCalendarDialogComponent],\n entryComponents: [TuiMobileCalendarDialogComponent],\n providers: [\n {\n provide: TUI_MOBILE_CALENDAR,\n useValue: MOBILE_CALENDAR_COMPONENT,\n },\n ],\n})\nexport class TuiMobileCalendarDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAoBI,0CAEa,OAGR;QAHQ,Y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