@taiga-ui/addon-mobile 2.55.0 → 3.0.0-rc.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 +69 -283
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +538 -406
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js +417 -294
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +437 -324
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +878 -688
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +374 -265
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +374 -265
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components.umd.js +17 -31
- package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.js +10 -255
- package/bundles/taiga-ui-addon-mobile-const.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +418 -305
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +119 -325
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +103 -314
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +435 -315
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +414 -298
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-directives.umd.js +13 -23
- package/bundles/taiga-ui-addon-mobile-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.js +2 -2
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +405 -282
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-internal.umd.js +5 -7
- package/bundles/taiga-ui-addon-mobile-internal.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-tokens.umd.js +8 -4
- package/bundles/taiga-ui-addon-mobile-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-types.umd.js +2 -2
- package/bundles/taiga-ui-addon-mobile-types.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.js +8 -10
- package/bundles/taiga-ui-addon-mobile-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile.umd.js +24 -30
- package/bundles/taiga-ui-addon-mobile.umd.js.map +1 -1
- package/components/mobile-calendar/mobile-calendar.component.d.ts +21 -2
- package/components/mobile-calendar/mobile-calendar.module.d.ts +12 -0
- package/components/mobile-calendar/package.json +2 -5
- package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.d.ts +1 -0
- package/components/mobile-calendar-dialog/mobile-calendar-dialog.component.d.ts +3 -0
- package/components/mobile-calendar-dialog/mobile-calendar-dialog.module.d.ts +6 -2
- package/components/mobile-calendar-dialog/package.json +2 -5
- package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.d.ts +1 -0
- package/components/mobile-dialog/mobile-dialog.component.d.ts +3 -0
- package/components/mobile-dialog/mobile-dialog.module.d.ts +9 -0
- package/components/mobile-dialog/mobile-dialog.service.d.ts +4 -1
- package/components/mobile-dialog/package.json +2 -5
- package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.d.ts +1 -0
- package/components/package.json +2 -5
- package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +3 -0
- package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +3 -0
- package/components/pull-to-refresh/package.json +2 -5
- package/components/pull-to-refresh/pull-to-refresh.component.d.ts +3 -0
- package/components/pull-to-refresh/pull-to-refresh.module.d.ts +10 -0
- package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.d.ts +1 -0
- package/components/sheet/components/sheet/sheet.component.d.ts +5 -2
- package/components/sheet/components/sheet/sheet.providers.d.ts +1 -5
- package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +5 -2
- package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +3 -0
- package/components/sheet/components/sheets-host/sheets-host.component.d.ts +3 -0
- package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +3 -0
- package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +3 -0
- package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +5 -2
- package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +3 -0
- package/components/sheet/package.json +2 -5
- package/components/sheet/sheet-options.d.ts +1 -1
- package/components/sheet/sheet-tokens.d.ts +5 -0
- package/components/sheet/sheet.d.ts +4 -0
- package/components/sheet/sheet.directive.d.ts +3 -0
- package/components/sheet/sheet.module.d.ts +17 -0
- package/components/sheet/sheet.service.d.ts +3 -0
- package/components/sheet/taiga-ui-addon-mobile-components-sheet.d.ts +1 -0
- package/components/taiga-ui-addon-mobile-components.d.ts +1 -0
- package/components/theme-android/package.json +2 -5
- package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.d.ts +1 -0
- package/components/theme-android/theme-android.component.d.ts +3 -0
- package/components/theme-android/theme-android.module.d.ts +5 -0
- package/components/theme-ios/package.json +2 -5
- package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.d.ts +1 -0
- package/components/theme-ios/theme-ios.component.d.ts +3 -0
- package/components/theme-ios/theme-ios.module.d.ts +5 -0
- package/const/package.json +2 -5
- package/const/taiga-ui-addon-mobile-const.d.ts +1 -0
- package/directives/elastic-sticky/elastic-sticky.directive.d.ts +3 -0
- package/directives/elastic-sticky/elastic-sticky.module.d.ts +5 -0
- package/directives/elastic-sticky/elastic-sticky.service.d.ts +3 -0
- package/directives/elastic-sticky/package.json +2 -5
- package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.d.ts +1 -0
- package/directives/mobile-tabs/mobile-tabs.component.d.ts +3 -0
- package/directives/mobile-tabs/mobile-tabs.directive.d.ts +3 -0
- package/directives/mobile-tabs/mobile-tabs.module.d.ts +6 -0
- package/directives/mobile-tabs/package.json +2 -5
- package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.d.ts +1 -0
- package/directives/package.json +2 -5
- package/directives/ripple/package.json +2 -5
- package/directives/ripple/ripple-styles.component.d.ts +3 -0
- package/directives/ripple/ripple.directive.d.ts +3 -0
- package/directives/ripple/ripple.module.d.ts +6 -0
- package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.d.ts +1 -1
- package/directives/sidebar/package.json +2 -5
- package/directives/sidebar/sidebar.component.d.ts +3 -0
- package/directives/sidebar/sidebar.directive.d.ts +5 -2
- package/directives/sidebar/sidebar.module.d.ts +8 -0
- package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.d.ts +1 -0
- package/directives/taiga-ui-addon-mobile-directives.d.ts +1 -0
- package/directives/touchable/package.json +2 -5
- package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.d.ts +1 -0
- package/directives/touchable/touchable.directive.d.ts +6 -3
- package/directives/touchable/touchable.module.d.ts +5 -0
- package/esm2015/components/index.js +1 -1
- package/esm2015/components/mobile-calendar/index.js +1 -1
- package/esm2015/components/mobile-calendar/mobile-calendar.component.js +83 -63
- package/esm2015/components/mobile-calendar/mobile-calendar.const.js +1 -1
- package/esm2015/components/mobile-calendar/mobile-calendar.module.js +34 -13
- package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +2 -2
- package/esm2015/components/mobile-calendar/mobile-calendar.strategy.js +2 -2
- package/esm2015/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -1
- package/esm2015/components/mobile-calendar-dialog/index.js +1 -1
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +19 -17
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +27 -21
- package/esm2015/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
- package/esm2015/components/mobile-dialog/index.js +2 -1
- package/esm2015/components/mobile-dialog/mobile-dialog-options.js +2 -1
- package/esm2015/components/mobile-dialog/mobile-dialog.component.js +28 -22
- package/esm2015/components/mobile-dialog/mobile-dialog.module.js +29 -20
- package/esm2015/components/mobile-dialog/mobile-dialog.service.js +13 -14
- package/esm2015/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +1 -1
- package/esm2015/components/pull-to-refresh/index.js +1 -1
- package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +21 -19
- package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +19 -16
- package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +31 -24
- package/esm2015/components/pull-to-refresh/pull-to-refresh.module.js +21 -16
- package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +3 -3
- package/esm2015/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -1
- package/esm2015/components/sheet/components/sheet/sheet.component.js +67 -55
- package/esm2015/components/sheet/components/sheet/sheet.providers.js +10 -10
- package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +29 -26
- package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +31 -25
- package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +33 -23
- package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +36 -29
- package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +33 -28
- package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +36 -31
- package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +38 -36
- package/esm2015/components/sheet/index.js +2 -1
- package/esm2015/components/sheet/ios.hacks.js +9 -9
- package/esm2015/components/sheet/sheet-options.js +5 -6
- package/esm2015/components/sheet/sheet-tokens.js +5 -0
- package/esm2015/components/sheet/sheet.directive.js +30 -23
- package/esm2015/components/sheet/sheet.js +2 -1
- package/esm2015/components/sheet/sheet.module.js +55 -29
- package/esm2015/components/sheet/sheet.service.js +14 -16
- package/esm2015/components/sheet/taiga-ui-addon-mobile-components-sheet.js +1 -1
- package/esm2015/components/taiga-ui-addon-mobile-components.js +1 -1
- package/esm2015/components/theme-android/index.js +1 -1
- package/esm2015/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +1 -1
- package/esm2015/components/theme-android/theme-android.component.js +16 -14
- package/esm2015/components/theme-android/theme-android.module.js +14 -11
- package/esm2015/components/theme-ios/index.js +1 -1
- package/esm2015/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +1 -1
- package/esm2015/components/theme-ios/theme-ios.component.js +16 -14
- package/esm2015/components/theme-ios/theme-ios.module.js +14 -11
- package/esm2015/const/index.js +1 -1
- package/esm2015/const/mobile-alert-options.js +2 -2
- package/esm2015/const/taiga-ui-addon-mobile-const.js +1 -1
- package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +20 -19
- package/esm2015/directives/elastic-sticky/elastic-sticky.module.js +14 -11
- package/esm2015/directives/elastic-sticky/elastic-sticky.service.js +29 -24
- package/esm2015/directives/elastic-sticky/index.js +1 -1
- package/esm2015/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +1 -1
- package/esm2015/directives/index.js +1 -1
- package/esm2015/directives/mobile-tabs/index.js +1 -1
- package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +14 -12
- package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +38 -29
- package/esm2015/directives/mobile-tabs/mobile-tabs.module.js +15 -12
- package/esm2015/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +1 -1
- package/esm2015/directives/ripple/index.js +1 -1
- package/esm2015/directives/ripple/ripple-styles.component.js +14 -12
- package/esm2015/directives/ripple/ripple.directive.js +41 -34
- package/esm2015/directives/ripple/ripple.module.js +15 -12
- package/esm2015/directives/ripple/ripple.providers.js +10 -10
- package/esm2015/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +1 -2
- package/esm2015/directives/sidebar/index.js +1 -1
- package/esm2015/directives/sidebar/sidebar.component.js +34 -29
- package/esm2015/directives/sidebar/sidebar.directive.js +39 -34
- package/esm2015/directives/sidebar/sidebar.module.js +16 -13
- package/esm2015/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
- package/esm2015/directives/taiga-ui-addon-mobile-directives.js +1 -1
- package/esm2015/directives/touchable/index.js +1 -1
- package/esm2015/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +1 -1
- package/esm2015/directives/touchable/touchable.directive.js +49 -39
- package/esm2015/directives/touchable/touchable.module.js +14 -11
- package/esm2015/index.js +3 -2
- package/esm2015/interfaces/index.js +2 -1
- package/esm2015/interfaces/mobile-alert-data.js +2 -1
- package/esm2015/interfaces/taiga-ui-addon-mobile-interfaces.js +2 -1
- package/esm2015/internal/index.js +1 -1
- package/esm2015/internal/primitive-calendar-mobile/index.js +1 -1
- package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +28 -23
- package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +24 -13
- package/esm2015/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +1 -1
- package/esm2015/internal/taiga-ui-addon-mobile-internal.js +1 -1
- package/esm2015/taiga-ui-addon-mobile.js +1 -1
- package/esm2015/tokens/index.js +1 -1
- package/esm2015/tokens/loaded.js +2 -2
- package/esm2015/tokens/taiga-ui-addon-mobile-tokens.js +1 -1
- package/esm2015/types/index.js +2 -1
- package/esm2015/types/taiga-ui-addon-mobile-types.js +2 -1
- package/esm2015/types/touch-mode.js +2 -1
- package/esm2015/utils/find-touch-index.js +2 -7
- package/esm2015/utils/index.js +1 -1
- package/esm2015/utils/taiga-ui-addon-mobile-utils.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +45 -35
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +117 -74
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +68 -50
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +84 -68
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +444 -366
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +27 -20
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +27 -20
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-const.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +58 -47
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +63 -46
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +76 -61
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +82 -68
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +61 -46
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-interfaces.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +50 -32
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-internal.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-tokens.js +1 -1
- package/fesm2015/taiga-ui-addon-mobile-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-types.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-utils.js +2 -7
- package/fesm2015/taiga-ui-addon-mobile-utils.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile.js +2 -1
- package/fesm2015/taiga-ui-addon-mobile.js.map +1 -1
- package/index.d.ts +0 -1
- package/interfaces/package.json +2 -5
- package/interfaces/taiga-ui-addon-mobile-interfaces.d.ts +1 -0
- package/internal/package.json +2 -5
- package/internal/primitive-calendar-mobile/package.json +2 -5
- package/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.d.ts +3 -0
- package/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.d.ts +8 -0
- package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.d.ts +1 -0
- package/internal/taiga-ui-addon-mobile-internal.d.ts +1 -0
- package/package.json +12 -15
- package/taiga-ui-addon-mobile.d.ts +1 -0
- package/tokens/package.json +2 -5
- package/tokens/taiga-ui-addon-mobile-tokens.d.ts +1 -0
- package/types/package.json +2 -5
- package/types/taiga-ui-addon-mobile-types.d.ts +1 -0
- package/types/touch-mode.d.ts +1 -1
- package/utils/find-touch-index.d.ts +1 -5
- package/utils/package.json +2 -5
- package/utils/taiga-ui-addon-mobile-utils.d.ts +1 -0
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-components.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-directives.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-enums.umd.js +0 -20
- package/bundles/taiga-ui-addon-mobile-enums.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-enums.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-enums.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-internal.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-internal.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-types.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-types.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile-utils.umd.min.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-mobile.umd.min.js.map +0 -1
- package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.metadata.json +0 -1
- package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.metadata.json +0 -1
- package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.metadata.json +0 -1
- package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.metadata.json +0 -1
- package/components/sheet/taiga-ui-addon-mobile-components-sheet.metadata.json +0 -1
- package/components/taiga-ui-addon-mobile-components.metadata.json +0 -1
- package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.metadata.json +0 -1
- package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.metadata.json +0 -1
- package/const/taiga-ui-addon-mobile-const.metadata.json +0 -1
- package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.metadata.json +0 -1
- package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.metadata.json +0 -1
- package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.metadata.json +0 -1
- package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.metadata.json +0 -1
- package/directives/taiga-ui-addon-mobile-directives.metadata.json +0 -1
- package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.metadata.json +0 -1
- package/enums/index.d.ts +0 -1
- package/enums/package.json +0 -13
- package/enums/taiga-ui-addon-mobile-enums.d.ts +0 -4
- package/enums/taiga-ui-addon-mobile-enums.metadata.json +0 -1
- package/enums/touch-mode.d.ts +0 -8
- package/esm2015/enums/index.js +0 -2
- package/esm2015/enums/taiga-ui-addon-mobile-enums.js +0 -5
- package/esm2015/enums/touch-mode.js +0 -10
- package/esm5/components/index.js +0 -8
- package/esm5/components/mobile-calendar/index.js +0 -6
- package/esm5/components/mobile-calendar/mobile-calendar.component.js +0 -295
- package/esm5/components/mobile-calendar/mobile-calendar.const.js +0 -25
- package/esm5/components/mobile-calendar/mobile-calendar.module.js +0 -34
- package/esm5/components/mobile-calendar/mobile-calendar.providers.js +0 -31
- package/esm5/components/mobile-calendar/mobile-calendar.strategy.js +0 -134
- package/esm5/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -5
- package/esm5/components/mobile-calendar-dialog/index.js +0 -3
- package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +0 -57
- package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +0 -28
- package/esm5/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -5
- package/esm5/components/mobile-dialog/index.js +0 -4
- package/esm5/components/mobile-dialog/mobile-dialog-options.js +0 -1
- package/esm5/components/mobile-dialog/mobile-dialog.component.js +0 -34
- package/esm5/components/mobile-dialog/mobile-dialog.module.js +0 -31
- package/esm5/components/mobile-dialog/mobile-dialog.service.js +0 -34
- package/esm5/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -5
- package/esm5/components/pull-to-refresh/index.js +0 -6
- package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +0 -43
- package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +0 -41
- package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +0 -56
- package/esm5/components/pull-to-refresh/pull-to-refresh.module.js +0 -26
- package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +0 -32
- package/esm5/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -5
- package/esm5/components/sheet/components/sheet/sheet.component.js +0 -150
- package/esm5/components/sheet/components/sheet/sheet.providers.js +0 -42
- package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +0 -43
- package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +0 -40
- package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +0 -40
- package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +0 -56
- package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +0 -46
- package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +0 -56
- package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +0 -93
- package/esm5/components/sheet/index.js +0 -15
- package/esm5/components/sheet/ios.hacks.js +0 -42
- package/esm5/components/sheet/sheet-options.js +0 -16
- package/esm5/components/sheet/sheet.directive.js +0 -58
- package/esm5/components/sheet/sheet.js +0 -1
- package/esm5/components/sheet/sheet.module.js +0 -52
- package/esm5/components/sheet/sheet.service.js +0 -42
- package/esm5/components/sheet/taiga-ui-addon-mobile-components-sheet.js +0 -5
- package/esm5/components/taiga-ui-addon-mobile-components.js +0 -5
- package/esm5/components/theme-android/index.js +0 -3
- package/esm5/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +0 -5
- package/esm5/components/theme-android/theme-android.component.js +0 -22
- package/esm5/components/theme-android/theme-android.module.js +0 -16
- package/esm5/components/theme-ios/index.js +0 -3
- package/esm5/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +0 -5
- package/esm5/components/theme-ios/theme-ios.component.js +0 -22
- package/esm5/components/theme-ios/theme-ios.module.js +0 -16
- package/esm5/const/index.js +0 -2
- package/esm5/const/mobile-alert-options.js +0 -8
- package/esm5/const/taiga-ui-addon-mobile-const.js +0 -5
- package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +0 -26
- package/esm5/directives/elastic-sticky/elastic-sticky.module.js +0 -16
- package/esm5/directives/elastic-sticky/elastic-sticky.service.js +0 -58
- package/esm5/directives/elastic-sticky/index.js +0 -4
- package/esm5/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -5
- package/esm5/directives/index.js +0 -6
- package/esm5/directives/mobile-tabs/index.js +0 -4
- package/esm5/directives/mobile-tabs/mobile-tabs.component.js +0 -16
- package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +0 -51
- package/esm5/directives/mobile-tabs/mobile-tabs.module.js +0 -18
- package/esm5/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -5
- package/esm5/directives/ripple/index.js +0 -4
- package/esm5/directives/ripple/ripple-styles.component.js +0 -16
- package/esm5/directives/ripple/ripple.directive.js +0 -63
- package/esm5/directives/ripple/ripple.module.js +0 -18
- package/esm5/directives/ripple/ripple.providers.js +0 -54
- package/esm5/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +0 -6
- package/esm5/directives/sidebar/index.js +0 -4
- package/esm5/directives/sidebar/sidebar.component.js +0 -68
- package/esm5/directives/sidebar/sidebar.directive.js +0 -78
- package/esm5/directives/sidebar/sidebar.module.js +0 -21
- package/esm5/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +0 -5
- package/esm5/directives/taiga-ui-addon-mobile-directives.js +0 -5
- package/esm5/directives/touchable/index.js +0 -3
- package/esm5/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +0 -5
- package/esm5/directives/touchable/touchable.directive.js +0 -90
- package/esm5/directives/touchable/touchable.module.js +0 -16
- package/esm5/enums/index.js +0 -2
- package/esm5/enums/taiga-ui-addon-mobile-enums.js +0 -5
- package/esm5/enums/touch-mode.js +0 -10
- package/esm5/index.js +0 -7
- package/esm5/interfaces/index.js +0 -1
- package/esm5/interfaces/mobile-alert-data.js +0 -1
- package/esm5/interfaces/taiga-ui-addon-mobile-interfaces.js +0 -4
- package/esm5/internal/index.js +0 -2
- package/esm5/internal/primitive-calendar-mobile/index.js +0 -3
- package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +0 -37
- package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +0 -28
- package/esm5/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -5
- package/esm5/internal/taiga-ui-addon-mobile-internal.js +0 -5
- package/esm5/taiga-ui-addon-mobile.js +0 -5
- package/esm5/tokens/index.js +0 -2
- package/esm5/tokens/loaded.js +0 -6
- package/esm5/tokens/taiga-ui-addon-mobile-tokens.js +0 -5
- package/esm5/types/index.js +0 -1
- package/esm5/types/taiga-ui-addon-mobile-types.js +0 -4
- package/esm5/types/touch-mode.js +0 -1
- package/esm5/utils/find-touch-index.js +0 -15
- package/esm5/utils/index.js +0 -2
- package/esm5/utils/taiga-ui-addon-mobile-utils.js +0 -5
- package/fesm2015/taiga-ui-addon-mobile-enums.js +0 -16
- package/fesm2015/taiga-ui-addon-mobile-enums.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -87
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -502
- package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -91
- package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -185
- package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js +0 -680
- package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +0 -40
- package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +0 -40
- package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-components.js +0 -12
- package/fesm5/taiga-ui-addon-mobile-components.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-const.js +0 -15
- package/fesm5/taiga-ui-addon-mobile-const.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -97
- package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -82
- package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +0 -143
- package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +0 -161
- package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +0 -108
- package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-directives.js +0 -10
- package/fesm5/taiga-ui-addon-mobile-directives.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-enums.js +0 -16
- package/fesm5/taiga-ui-addon-mobile-enums.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-interfaces.js +0 -4
- package/fesm5/taiga-ui-addon-mobile-interfaces.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -65
- package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-internal.js +0 -6
- package/fesm5/taiga-ui-addon-mobile-internal.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-tokens.js +0 -13
- package/fesm5/taiga-ui-addon-mobile-tokens.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-types.js +0 -4
- package/fesm5/taiga-ui-addon-mobile-types.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile-utils.js +0 -21
- package/fesm5/taiga-ui-addon-mobile-utils.js.map +0 -1
- package/fesm5/taiga-ui-addon-mobile.js +0 -11
- package/fesm5/taiga-ui-addon-mobile.js.map +0 -1
- package/interfaces/taiga-ui-addon-mobile-interfaces.metadata.json +0 -1
- package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.metadata.json +0 -1
- package/internal/taiga-ui-addon-mobile-internal.metadata.json +0 -1
- package/taiga-ui-addon-mobile.metadata.json +0 -1
- package/tokens/taiga-ui-addon-mobile-tokens.metadata.json +0 -1
- package/types/taiga-ui-addon-mobile-types.metadata.json +0 -1
- package/utils/taiga-ui-addon-mobile-utils.metadata.json +0 -1
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy, Inject, NgZone, forwardRef, Directive, Input, ViewChild, ViewChildren, HostListener, Injectable, ContentChild, Output, ChangeDetectorRef, TemplateRef, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
4
|
+
import * as i3 from '@taiga-ui/cdk';
|
|
5
|
+
import { typedFromEvent, tuiZonefree, TuiIdService, TUI_IS_IOS, clamp, tuiDefaultProp, TuiDestroyService, EMPTY_QUERY, tuiZonefull, tuiPure, TUI_WINDOW_HEIGHT, tuiRequiredSetter, TuiLetModule, TuiOverscrollModule } from '@taiga-ui/cdk';
|
|
6
|
+
import * as i1 from '@taiga-ui/core';
|
|
7
|
+
import { TUI_CLOSE_WORD, TUI_SCROLL_REF, tuiZonefulMap, tuiSlideInTop, TUI_ANIMATION_OPTIONS, tuiFadeIn, TuiButtonModule, TuiScrollbarModule } from '@taiga-ui/core';
|
|
5
8
|
import { TUI_MORE_WORD } from '@taiga-ui/kit';
|
|
6
|
-
import { merge, concat, zip, race, timer, Observable, BehaviorSubject, EMPTY, Subject } from 'rxjs';
|
|
7
9
|
import { map, delay, switchMap, takeUntil, take, share, filter, debounceTime, mapTo, switchMapTo, startWith, distinctUntilChanged, withLatestFrom, throttleTime, ignoreElements, endWith } from 'rxjs/operators';
|
|
10
|
+
import * as i1$1 from 'rxjs';
|
|
11
|
+
import { merge, concat, zip, race, timer, BehaviorSubject, Observable, EMPTY, Subject } from 'rxjs';
|
|
12
|
+
import * as i2 from '@angular/common';
|
|
8
13
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
14
|
import { WINDOW } from '@ng-web-apis/common';
|
|
15
|
+
import * as i5 from '@tinkoff/ng-polymorpheus';
|
|
10
16
|
import { PolymorpheusTemplate, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
11
17
|
|
|
12
18
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
19
|
function iosScrollFactory(element, documentRef, ngZone) {
|
|
14
|
-
const load$ = typedFromEvent(element,
|
|
15
|
-
const touchstart$ = typedFromEvent(element,
|
|
16
|
-
const touchmove$ = typedFromEvent(documentRef,
|
|
17
|
-
const touchend$ = typedFromEvent(documentRef,
|
|
18
|
-
const scroll$ = typedFromEvent(element,
|
|
20
|
+
const load$ = typedFromEvent(element, `load`, { capture: true });
|
|
21
|
+
const touchstart$ = typedFromEvent(element, `touchstart`, { passive: true });
|
|
22
|
+
const touchmove$ = typedFromEvent(documentRef, `touchmove`, { passive: true });
|
|
23
|
+
const touchend$ = typedFromEvent(documentRef, `touchend`);
|
|
24
|
+
const scroll$ = typedFromEvent(element, `scroll`).pipe(map(() => element.scrollTop));
|
|
19
25
|
const result$ = merge(load$.pipe(delay(0), map(() => element.scrollTop)), touchstart$.pipe(switchMap(({ touches }) => {
|
|
20
26
|
const { screenY } = touches[0];
|
|
21
27
|
const { scrollTop } = element;
|
|
@@ -34,17 +40,21 @@ function processDragged(dragged$, scroll$) {
|
|
|
34
40
|
}
|
|
35
41
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
36
42
|
function fakeSmoothScroll({ style }, offset) {
|
|
37
|
-
style.transition =
|
|
43
|
+
style.transition = `none`;
|
|
38
44
|
style.transform = `scaleX(-1) translate3d(0, ${offset}px, 0)`;
|
|
39
45
|
setTimeout(() => {
|
|
40
|
-
style.transition =
|
|
41
|
-
style.transform =
|
|
46
|
+
style.transition = ``;
|
|
47
|
+
style.transform = ``;
|
|
42
48
|
});
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
51
|
+
const TUI_SHEET = new InjectionToken(`[TUI_SHEET] Sheet main component`);
|
|
52
|
+
const TUI_SHEET_SCROLL = new InjectionToken(`Current scrollTop of a sheet`);
|
|
53
|
+
const TUI_SHEET_DRAGGED = new InjectionToken(`The sheet is being dragged`);
|
|
54
|
+
|
|
55
|
+
const TUI_SHEET_CLOSE = `tui-sheet-close`;
|
|
56
|
+
const TUI_SHEET_ID = `tui-sheet-id`;
|
|
57
|
+
class TuiSheetHeadingComponent {
|
|
48
58
|
constructor(idService, elementRef, closeWord$) {
|
|
49
59
|
this.idService = idService;
|
|
50
60
|
this.elementRef = elementRef;
|
|
@@ -57,30 +67,28 @@ let TuiSheetHeadingComponent = class TuiSheetHeadingComponent {
|
|
|
57
67
|
onClick() {
|
|
58
68
|
this.elementRef.nativeElement.dispatchEvent(new CustomEvent(TUI_SHEET_CLOSE, { bubbles: true }));
|
|
59
69
|
}
|
|
60
|
-
}
|
|
61
|
-
TuiSheetHeadingComponent
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]
|
|
70
|
+
}
|
|
71
|
+
TuiSheetHeadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetHeadingComponent, deps: [{ token: TuiIdService }, { token: ElementRef }, { token: TUI_CLOSE_WORD }], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
TuiSheetHeadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetHeadingComponent, selector: "[tuiSheetHeading]", ngImport: i0, template: "<button\n tuiIconButton\n size=\"xs\"\n appearance=\"icon\"\n icon=\"tuiIconCloseLarge\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClick()\"\n></button>\n<span [id]=\"id\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{position:-webkit-sticky;position:sticky;top:0;z-index:1;min-height:2rem;box-sizing:border-box;margin:-1.25rem -1rem 0;padding:1.5rem 1rem 1rem;background:var(--tui-base-01);border-radius:.75rem .75rem 0 0;font:var(--tui-font-heading-6);box-shadow:inset 0 1px rgba(255,255,255,.25)}:host:after{content:\"\";position:absolute;top:100%;left:0;right:0;height:1px;background:var(--tui-base-03);opacity:0}:host :host-context(._stuck):after{opacity:1}.t-close{display:none;float:right;margin-right:-.25rem}:host-context(.t-wrapper_closeable) .t-close{display:block}\n"], components: [{ type: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetHeadingComponent, decorators: [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{
|
|
76
|
+
selector: `[tuiSheetHeading]`,
|
|
77
|
+
templateUrl: `sheet-heading.template.html`,
|
|
78
|
+
styleUrls: [`sheet-heading.style.less`],
|
|
79
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
80
|
+
}]
|
|
81
|
+
}], ctorParameters: function () { return [{ type: i3.TuiIdService, decorators: [{
|
|
82
|
+
type: Inject,
|
|
83
|
+
args: [TuiIdService]
|
|
84
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
85
|
+
type: Inject,
|
|
86
|
+
args: [ElementRef]
|
|
87
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
88
|
+
type: Inject,
|
|
89
|
+
args: [TUI_CLOSE_WORD]
|
|
90
|
+
}] }]; } });
|
|
77
91
|
|
|
78
|
-
const TUI_SHEET_SCROLL = new InjectionToken('Current scrollTop of a sheet');
|
|
79
|
-
const TUI_SHEET_DRAGGED = new InjectionToken('The sheet is being dragged');
|
|
80
|
-
/** @deprecated use option argument for each Sheet */
|
|
81
|
-
const TUI_SHEET_OFFSET = new InjectionToken('Offset from the top at which the sheet stops', {
|
|
82
|
-
factory: () => 16,
|
|
83
|
-
});
|
|
84
92
|
const TUI_SHEET_PROVIDERS = [
|
|
85
93
|
{
|
|
86
94
|
provide: TUI_SHEET_DRAGGED,
|
|
@@ -96,20 +104,146 @@ const TUI_SHEET_PROVIDERS = [
|
|
|
96
104
|
provide: TUI_SCROLL_REF,
|
|
97
105
|
useExisting: ElementRef,
|
|
98
106
|
},
|
|
107
|
+
{
|
|
108
|
+
provide: TUI_SHEET,
|
|
109
|
+
useExisting: forwardRef(() => TuiSheetComponent),
|
|
110
|
+
},
|
|
99
111
|
];
|
|
100
112
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
101
113
|
function sheetDraggedFactory({ nativeElement, }) {
|
|
102
|
-
return merge(typedFromEvent(nativeElement,
|
|
114
|
+
return merge(typedFromEvent(nativeElement, `touchstart`, { passive: true }).pipe(mapTo(true)), typedFromEvent(nativeElement, `touchend`).pipe(mapTo(false)));
|
|
103
115
|
}
|
|
104
116
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
105
117
|
function sheetScrollFactory({ nativeElement }, ngZone, documentRef, isIos) {
|
|
106
118
|
return isIos
|
|
107
119
|
? iosScrollFactory(nativeElement, documentRef, ngZone)
|
|
108
|
-
: merge(typedFromEvent(nativeElement,
|
|
120
|
+
: merge(typedFromEvent(nativeElement, `scroll`), typedFromEvent(nativeElement, `load`, { capture: true })).pipe(map(() => nativeElement.scrollTop), tuiZonefree(ngZone), share());
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
class TuiSheetBarComponent {
|
|
124
|
+
constructor(sheet, scroll$, ngZone) {
|
|
125
|
+
this.sheet = sheet;
|
|
126
|
+
this.scroll$ = scroll$;
|
|
127
|
+
this.ngZone = ngZone;
|
|
128
|
+
this.rotate$ = this.scroll$.pipe(tuiZonefulMap(y => clamp(10 - (y - this.stop) / 5, 0, 10), this.ngZone));
|
|
129
|
+
}
|
|
130
|
+
get stop() {
|
|
131
|
+
return this.sheet.stops[0] || 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
TuiSheetBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetBarComponent, deps: [{ token: TUI_SHEET }, { token: TUI_SHEET_SCROLL }, { token: NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
135
|
+
TuiSheetBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetBarComponent, selector: "tui-sheet-bar", ngImport: i0, template: "<ng-container *tuiLet=\"rotate$ | async as deg\">\n <div\n style=\"transform: rotate(-{{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n <ng-content *ngIf=\"deg\"></ng-content>\n <div\n style=\"transform: rotate({{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n</ng-container>\n", styles: [":host{transition-property:border-radius;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:2;display:flex;height:1.25rem;align-items:center;justify-content:center;opacity:.3}.t-bar{content:\"\";height:.25rem;width:1rem;background:var(--tui-base-09);pointer-events:none}:host-context(._ios:not(._dragged)) .t-bar{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-bar:first-child{border-radius:1rem 0 0 1rem;transform-origin:top right}.t-bar:last-child{border-radius:0 1rem 1rem 0;transform-origin:top left}\n"], directives: [{ type: i3.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetBarComponent, decorators: [{
|
|
137
|
+
type: Component,
|
|
138
|
+
args: [{
|
|
139
|
+
selector: `tui-sheet-bar`,
|
|
140
|
+
templateUrl: `sheet-bar.template.html`,
|
|
141
|
+
styleUrls: [`sheet-bar.style.less`],
|
|
142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
|
+
}]
|
|
144
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
145
|
+
type: Inject,
|
|
146
|
+
args: [TUI_SHEET]
|
|
147
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
148
|
+
type: Inject,
|
|
149
|
+
args: [TUI_SHEET_SCROLL]
|
|
150
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
151
|
+
type: Inject,
|
|
152
|
+
args: [NgZone]
|
|
153
|
+
}] }]; } });
|
|
154
|
+
|
|
155
|
+
// So that borders get rounded when image is visible for at least 10px
|
|
156
|
+
const OFFSET$1 = 10;
|
|
157
|
+
// @dynamic
|
|
158
|
+
class TuiSheetTopDirective {
|
|
159
|
+
constructor(scroll$, component, windowRef) {
|
|
160
|
+
this.scroll$ = scroll$;
|
|
161
|
+
this.component = component;
|
|
162
|
+
this.windowRef = windowRef;
|
|
163
|
+
this.stop = 0;
|
|
164
|
+
this.transform$ = this.scroll$.pipe(map(y => `translateY(${this.getY(y)}%) scaleX(-1)`));
|
|
165
|
+
this.rounded$ = this.scroll$.pipe(map(y => y < this.stop + OFFSET$1));
|
|
166
|
+
this.clickthrough$ = this.scroll$.pipe(map(y => !!Math.round(this.getY(y))));
|
|
167
|
+
}
|
|
168
|
+
getY(scrollTop) {
|
|
169
|
+
const value = scrollTop - this.stop;
|
|
170
|
+
const total = this.windowRef.innerHeight - this.component.item.offset - this.stop;
|
|
171
|
+
return this.stop && clamp(100 - (value / total) * 100, 0, 100);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
TuiSheetTopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetTopDirective, deps: [{ token: TUI_SHEET_SCROLL }, { token: TUI_SHEET }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
|
|
175
|
+
TuiSheetTopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetTopDirective, selector: "[tuiSheetTop]", inputs: { stop: ["tuiSheetTop", "stop"] }, host: { listeners: { "$.style.transform": "transform$", "$.class._rounded": "rounded$", "$.class._clickthrough": "clickthrough$" }, properties: { "$.style.transform": "transform$", "$.class._rounded": "rounded$", "$.class._clickthrough": "clickthrough$" } }, ngImport: i0 });
|
|
176
|
+
__decorate([
|
|
177
|
+
tuiDefaultProp()
|
|
178
|
+
], TuiSheetTopDirective.prototype, "stop", void 0);
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetTopDirective, decorators: [{
|
|
180
|
+
type: Directive,
|
|
181
|
+
args: [{
|
|
182
|
+
selector: `[tuiSheetTop]`,
|
|
183
|
+
host: {
|
|
184
|
+
'[$.style.transform]': `transform$`,
|
|
185
|
+
'($.style.transform)': `transform$`,
|
|
186
|
+
'[$.class._rounded]': `rounded$`,
|
|
187
|
+
'($.class._rounded)': `rounded$`,
|
|
188
|
+
'[$.class._clickthrough]': `clickthrough$`,
|
|
189
|
+
'($.class._clickthrough)': `clickthrough$`,
|
|
190
|
+
},
|
|
191
|
+
}]
|
|
192
|
+
}], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
|
|
193
|
+
type: Inject,
|
|
194
|
+
args: [TUI_SHEET_SCROLL]
|
|
195
|
+
}] }, { type: undefined, decorators: [{
|
|
196
|
+
type: Inject,
|
|
197
|
+
args: [TUI_SHEET]
|
|
198
|
+
}] }, { type: Window, decorators: [{
|
|
199
|
+
type: Inject,
|
|
200
|
+
args: [WINDOW]
|
|
201
|
+
}] }]; }, propDecorators: { stop: [{
|
|
202
|
+
type: Input,
|
|
203
|
+
args: [`tuiSheetTop`]
|
|
204
|
+
}] } });
|
|
205
|
+
|
|
206
|
+
class TuiSheetStopDirective {
|
|
207
|
+
constructor(elementRef, destroy$, dragged$, scroll$, { nativeElement }) {
|
|
208
|
+
scroll$
|
|
209
|
+
.pipe(map(y => Math.floor(y) > elementRef.nativeElement.offsetTop), distinctUntilChanged(), withLatestFrom(dragged$), map(([above, dragged]) => !above && !dragged), filter(Boolean), throttleTime(100), takeUntil(destroy$))
|
|
210
|
+
.subscribe(() => {
|
|
211
|
+
nativeElement.style.overflow = `hidden`;
|
|
212
|
+
nativeElement.classList.remove(`_stuck`); // iOS
|
|
213
|
+
nativeElement.scrollTop = elementRef.nativeElement.offsetTop;
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
nativeElement.style.overflow = ``;
|
|
216
|
+
}, 100);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
109
219
|
}
|
|
220
|
+
TuiSheetStopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetStopDirective, deps: [{ token: ElementRef }, { token: TuiDestroyService }, { token: TUI_SHEET_DRAGGED }, { token: TUI_SHEET_SCROLL }, { token: TUI_SCROLL_REF }], target: i0.ɵɵFactoryTarget.Directive });
|
|
221
|
+
TuiSheetStopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetStopDirective, selector: "[tuiSheetStop]", providers: [TuiDestroyService], ngImport: i0 });
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetStopDirective, decorators: [{
|
|
223
|
+
type: Directive,
|
|
224
|
+
args: [{
|
|
225
|
+
selector: `[tuiSheetStop]`,
|
|
226
|
+
providers: [TuiDestroyService],
|
|
227
|
+
}]
|
|
228
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
229
|
+
type: Inject,
|
|
230
|
+
args: [ElementRef]
|
|
231
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
232
|
+
type: Inject,
|
|
233
|
+
args: [TuiDestroyService]
|
|
234
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
235
|
+
type: Inject,
|
|
236
|
+
args: [TUI_SHEET_DRAGGED]
|
|
237
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
238
|
+
type: Inject,
|
|
239
|
+
args: [TUI_SHEET_SCROLL]
|
|
240
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
241
|
+
type: Inject,
|
|
242
|
+
args: [TUI_SCROLL_REF]
|
|
243
|
+
}] }]; } });
|
|
110
244
|
|
|
111
245
|
// @dynamic
|
|
112
|
-
|
|
246
|
+
class TuiSheetComponent {
|
|
113
247
|
constructor(scroll$, elementRef, ngZone, isIos, moreWord$) {
|
|
114
248
|
this.scroll$ = scroll$;
|
|
115
249
|
this.elementRef = elementRef;
|
|
@@ -117,7 +251,7 @@ let TuiSheetComponent = class TuiSheetComponent {
|
|
|
117
251
|
this.isIos = isIos;
|
|
118
252
|
this.moreWord$ = moreWord$;
|
|
119
253
|
this.stopsRefs = EMPTY_QUERY;
|
|
120
|
-
this.id =
|
|
254
|
+
this.id = ``;
|
|
121
255
|
this.stuck$ = this.scroll$.pipe(map(y => Math.floor(y) > this.contentTop));
|
|
122
256
|
}
|
|
123
257
|
get stops() {
|
|
@@ -144,7 +278,7 @@ let TuiSheetComponent = class TuiSheetComponent {
|
|
|
144
278
|
if (this.isIos) {
|
|
145
279
|
fakeSmoothScroll(nativeElement, top - nativeElement.scrollTop - 16);
|
|
146
280
|
}
|
|
147
|
-
nativeElement.scrollTo({ top, behavior:
|
|
281
|
+
nativeElement.scrollTo({ top, behavior: `smooth` });
|
|
148
282
|
}
|
|
149
283
|
close() {
|
|
150
284
|
if (this.context.closeable) {
|
|
@@ -164,90 +298,66 @@ let TuiSheetComponent = class TuiSheetComponent {
|
|
|
164
298
|
.toArray()
|
|
165
299
|
.map(({ nativeElement }) => nativeElement.offsetTop + nativeElement.clientHeight);
|
|
166
300
|
}
|
|
167
|
-
}
|
|
168
|
-
TuiSheetComponent
|
|
169
|
-
{ type:
|
|
170
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
171
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
172
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
|
|
173
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_MORE_WORD,] }] }
|
|
174
|
-
];
|
|
175
|
-
__decorate([
|
|
176
|
-
ViewChild('sheet')
|
|
177
|
-
], TuiSheetComponent.prototype, "sheet", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
ViewChild('content')
|
|
180
|
-
], TuiSheetComponent.prototype, "content", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
ViewChildren('stops')
|
|
183
|
-
], TuiSheetComponent.prototype, "stopsRefs", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
Input()
|
|
186
|
-
], TuiSheetComponent.prototype, "item", void 0);
|
|
301
|
+
}
|
|
302
|
+
TuiSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetComponent, deps: [{ token: TUI_SHEET_SCROLL }, { token: ElementRef }, { token: NgZone }, { token: TUI_IS_IOS }, { token: TUI_MORE_WORD }], target: i0.ɵɵFactoryTarget.Component });
|
|
303
|
+
TuiSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetComponent, selector: "tui-sheet", inputs: { item: "item" }, host: { attributes: { "role": "dialog" }, listeners: { "$.class._stuck": "stuck$", "tui-sheet-id": "onId($event.detail)" }, properties: { "attr.aria-labelledby": "id", "class._ios": "isIos", "$.class._stuck": "stuck$" } }, providers: TUI_SHEET_PROVIDERS, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "stopsRefs", predicate: ["stops"], descendants: true }], ngImport: i0, template: "<div\n class=\"t-bumpers\"\n (click)=\"close()\"\n>\n <div\n *ngFor=\"let stop of item.stops\"\n #stops\n class=\"t-bumper\"\n [style.marginTop]=\"stop\"\n ></div>\n</div>\n<div\n #sheet\n class=\"t-wrapper\"\n [class.t-wrapper_shadow]=\"!item.image\"\n>\n <header\n *ngIf=\"item.image\"\n class=\"t-top\"\n [tuiSheetTop]=\"imageStop\"\n >\n <img\n *polymorpheusOutlet=\"item.image as src; context: context\"\n alt=\"\"\n class=\"t-image\"\n [src]=\"src\"\n />\n </header>\n <section\n #content\n tuiSheetStop\n class=\"t-sheet\"\n >\n <div class=\"t-bar\"></div>\n <tui-sheet-bar>\n <button\n class=\"t-button\"\n [title]=\"moreWord$ | async\"\n (click)=\"scrollTo(stops[1])\"\n ></button>\n </tui-sheet-bar>\n <div class=\"t-content\">\n <h2\n *polymorpheusOutlet=\"item.content as text; context: context\"\n tuiSheetHeading\n class=\"t-heading\"\n >\n {{ text }}\n </h2>\n </div>\n </section>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:0;left:0;bottom:0;right:0;transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;top:auto;border-radius:.75rem .75rem 0 0;overflow-y:auto;overflow-x:hidden;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;box-shadow:0 4rem var(--tui-base-01);padding-right:1rem;margin-left:-1rem;transform:scaleX(-1);-webkit-clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0);clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._stuck{-webkit-scroll-snap-type:none;-ms-scroll-snap-type:none;scroll-snap-type:none}.t-bumpers{display:flex;height:100%}:host-context(.t-wrapper_closeable) .t-bumpers{scroll-snap-stop:always;scroll-snap-align:start;scroll-margin:-1px}.t-bumper{scroll-snap-stop:always;scroll-snap-align:start;height:1rem;width:1rem}.t-wrapper{border-radius:inherit;pointer-events:auto;scroll-snap-stop:always;scroll-snap-align:start}.t-wrapper_shadow{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12)}.t-top{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12);position:-webkit-sticky;position:sticky;top:0;pointer-events:auto;border-radius:.8rem .8rem 0 0;transform:scaleX(-1);overflow:hidden}.t-top._clickthrough{pointer-events:none}:host-context(._overlay:not(._visible)) .t-top{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;transform:scaleX(-1)!important}.t-image{display:block;width:100%}.t-sheet{position:relative;border-radius:inherit;scroll-snap-stop:always;scroll-snap-align:start;transform:scaleX(-1);box-shadow:0 4rem var(--tui-base-01)}.t-top:not(._rounded)~.t-sheet .t-bar{border-radius:0}.t-bar{transition-property:border-radius;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:1;height:1.5rem;margin-bottom:-1.5rem;border-radius:inherit;background:var(--tui-elevation-01);box-shadow:inset 0 1px rgba(255,255,255,.25)}.t-button{position:absolute;top:0;height:1.5rem;width:3rem;padding:0;border:0;opacity:0}.t-content{padding:1rem;margin-top:-1rem;border-radius:inherit;background:var(--tui-elevation-01)}.t-heading{padding-bottom:.5rem;background:var(--tui-elevation-01)}\n"], components: [{ type: TuiSheetBarComponent, selector: "tui-sheet-bar" }, { type: TuiSheetHeadingComponent, selector: "[tuiSheetHeading]" }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TuiSheetTopDirective, selector: "[tuiSheetTop]", inputs: ["tuiSheetTop"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: TuiSheetStopDirective, selector: "[tuiSheetStop]" }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
187
304
|
__decorate([
|
|
188
305
|
tuiPure
|
|
189
306
|
], TuiSheetComponent.prototype, "context", null);
|
|
190
|
-
__decorate([
|
|
191
|
-
HostListener(TUI_SHEET_ID, ['$event.detail'])
|
|
192
|
-
], TuiSheetComponent.prototype, "onId", null);
|
|
193
307
|
__decorate([
|
|
194
308
|
tuiPure
|
|
195
309
|
], TuiSheetComponent.prototype, "getStops", null);
|
|
196
|
-
TuiSheetComponent
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
__param(0, Inject(TuiSheetComponent)),
|
|
245
|
-
__param(1, Inject(TUI_SHEET_SCROLL)),
|
|
246
|
-
__param(2, Inject(NgZone))
|
|
247
|
-
], TuiSheetBarComponent);
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetComponent, decorators: [{
|
|
311
|
+
type: Component,
|
|
312
|
+
args: [{
|
|
313
|
+
selector: `tui-sheet`,
|
|
314
|
+
templateUrl: `sheet.template.html`,
|
|
315
|
+
styleUrls: [`sheet.style.less`],
|
|
316
|
+
providers: TUI_SHEET_PROVIDERS,
|
|
317
|
+
animations: [tuiSlideInTop],
|
|
318
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
319
|
+
host: {
|
|
320
|
+
role: `dialog`,
|
|
321
|
+
'[attr.aria-labelledby]': `id`,
|
|
322
|
+
'[class._ios]': `isIos`,
|
|
323
|
+
// '[class._stuck]': 'true', // Initially disable snapping for Firefox
|
|
324
|
+
'[$.class._stuck]': `stuck$`,
|
|
325
|
+
'($.class._stuck)': `stuck$`,
|
|
326
|
+
},
|
|
327
|
+
}]
|
|
328
|
+
}], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
|
|
329
|
+
type: Inject,
|
|
330
|
+
args: [TUI_SHEET_SCROLL]
|
|
331
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
332
|
+
type: Inject,
|
|
333
|
+
args: [ElementRef]
|
|
334
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
335
|
+
type: Inject,
|
|
336
|
+
args: [NgZone]
|
|
337
|
+
}] }, { type: undefined, decorators: [{
|
|
338
|
+
type: Inject,
|
|
339
|
+
args: [TUI_IS_IOS]
|
|
340
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
341
|
+
type: Inject,
|
|
342
|
+
args: [TUI_MORE_WORD]
|
|
343
|
+
}] }]; }, propDecorators: { sheet: [{
|
|
344
|
+
type: ViewChild,
|
|
345
|
+
args: [`sheet`]
|
|
346
|
+
}], content: [{
|
|
347
|
+
type: ViewChild,
|
|
348
|
+
args: [`content`]
|
|
349
|
+
}], stopsRefs: [{
|
|
350
|
+
type: ViewChildren,
|
|
351
|
+
args: [`stops`]
|
|
352
|
+
}], item: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], context: [], onId: [{
|
|
355
|
+
type: HostListener,
|
|
356
|
+
args: [TUI_SHEET_ID, [`$event.detail`]]
|
|
357
|
+
}], getStops: [] } });
|
|
248
358
|
|
|
249
359
|
const TUI_SHEET_DEFAULT_OPTIONS = {
|
|
250
|
-
image:
|
|
360
|
+
image: ``,
|
|
251
361
|
imageSlide: true,
|
|
252
362
|
stops: [],
|
|
253
363
|
initial: 0,
|
|
@@ -255,11 +365,11 @@ const TUI_SHEET_DEFAULT_OPTIONS = {
|
|
|
255
365
|
closeable: true,
|
|
256
366
|
overlay: false,
|
|
257
367
|
};
|
|
258
|
-
const TUI_SHEET_OPTIONS = new InjectionToken(
|
|
259
|
-
factory: () => (Object.assign(
|
|
368
|
+
const TUI_SHEET_OPTIONS = new InjectionToken(`Default parameters for sheet component`, {
|
|
369
|
+
factory: () => (Object.assign({}, TUI_SHEET_DEFAULT_OPTIONS)),
|
|
260
370
|
});
|
|
261
371
|
|
|
262
|
-
|
|
372
|
+
class TuiSheetService {
|
|
263
373
|
constructor(options) {
|
|
264
374
|
this.options = options;
|
|
265
375
|
this.sheets$ = new BehaviorSubject([]);
|
|
@@ -279,173 +389,23 @@ let TuiSheetService = class TuiSheetService {
|
|
|
279
389
|
};
|
|
280
390
|
});
|
|
281
391
|
}
|
|
282
|
-
}
|
|
283
|
-
TuiSheetService
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
]
|
|
293
|
-
|
|
294
|
-
// @dynamic
|
|
295
|
-
let TuiSheetsHostComponent = class TuiSheetsHostComponent {
|
|
296
|
-
constructor(options, service, height$) {
|
|
297
|
-
this.options = options;
|
|
298
|
-
this.service = service;
|
|
299
|
-
this.height$ = height$;
|
|
300
|
-
}
|
|
301
|
-
close({ closeable, $implicit }) {
|
|
302
|
-
if (closeable) {
|
|
303
|
-
$implicit.complete();
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
TuiSheetsHostComponent.ctorParameters = () => [
|
|
308
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
|
|
309
|
-
{ type: TuiSheetService, decorators: [{ type: Inject, args: [TuiSheetService,] }] },
|
|
310
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_WINDOW_HEIGHT,] }] }
|
|
311
|
-
];
|
|
312
|
-
TuiSheetsHostComponent = __decorate([
|
|
313
|
-
Component({
|
|
314
|
-
selector: 'tui-sheets-host',
|
|
315
|
-
template: "<ng-container *ngIf=\"service.sheets$ | async as items\">\n <div\n *ngFor=\"let item of items\"\n class=\"t-wrapper\"\n [@tuiSlideInTop]=\"options\"\n [@tuiFadeIn]=\"options\"\n [tuiSheetWrapper]=\"item.offset\"\n [class.t-wrapper_overlay]=\"item.overlay\"\n [class.t-wrapper_closeable]=\"item.closeable\"\n (click.self)=\"close(item)\"\n >\n <tui-sheet\n tuiScrollRef\n tuiOverscroll=\"all\"\n [style.height.px]=\"((height$ | async) || 0) - item.offset\"\n [item]=\"item\"\n (close)=\"close(item)\"\n ></tui-sheet>\n </div>\n <div\n class=\"t-overlay\"\n (click)=\"close(items[0])\"\n ></div>\n</ng-container>\n",
|
|
316
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
317
|
-
animations: [tuiSlideInTop, tuiFadeIn],
|
|
318
|
-
styles: [":host{position:-webkit-sticky;position:sticky;bottom:0;display:block;height:0}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:fixed;top:0;left:0;width:100%;z-index:-1;height:100%;background:#000;opacity:.001;pointer-events:none}._overlay~.t-overlay,.t-wrapper_overlay~.t-overlay{opacity:.8;pointer-events:auto;touch-action:none}.t-wrapper{position:absolute;bottom:0;z-index:0;width:100%;height:100vh;overflow:hidden}.t-wrapper._overlay,.t-wrapper._visible,.t-wrapper_overlay{overflow:visible}"]
|
|
319
|
-
}),
|
|
320
|
-
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
321
|
-
__param(1, Inject(TuiSheetService)),
|
|
322
|
-
__param(2, Inject(TUI_WINDOW_HEIGHT))
|
|
323
|
-
], TuiSheetsHostComponent);
|
|
324
|
-
|
|
325
|
-
// @dynamic
|
|
326
|
-
let TuiSheetCloseDirective = class TuiSheetCloseDirective {
|
|
327
|
-
constructor(ngZone, dragged$, scroll$, windowRef, elementRef, sheet) {
|
|
328
|
-
this.ngZone = ngZone;
|
|
329
|
-
this.dragged$ = dragged$;
|
|
330
|
-
this.scroll$ = scroll$;
|
|
331
|
-
this.windowRef = windowRef;
|
|
332
|
-
this.elementRef = elementRef;
|
|
333
|
-
this.sheet = sheet;
|
|
334
|
-
this.close = merge(typedFromEvent(this.elementRef.nativeElement, TUI_SHEET_CLOSE), this.dragged$.pipe(startWith(false), switchMap(dragged => dragged
|
|
335
|
-
? EMPTY
|
|
336
|
-
: this.scroll$.pipe(startWith(this.elementRef.nativeElement.scrollTop))), filter(y => { var _a; return ((_a = this.sheet.item) === null || _a === void 0 ? void 0 : _a.closeable) && this.shouldClose(y); }), distinctUntilChanged(), tuiZonefull(this.ngZone)));
|
|
337
|
-
}
|
|
338
|
-
shouldClose(scrollTop) {
|
|
339
|
-
const height = Math.min(this.windowRef.innerHeight, this.elementRef.nativeElement.scrollHeight - this.windowRef.innerHeight);
|
|
340
|
-
const min = Math.min(height, this.sheet.stops[0] || Infinity);
|
|
341
|
-
return scrollTop < min / 2;
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
TuiSheetCloseDirective.ctorParameters = () => [
|
|
345
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
346
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_DRAGGED,] }] },
|
|
347
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
|
|
348
|
-
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] },
|
|
349
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
350
|
-
{ type: TuiSheetComponent, decorators: [{ type: Inject, args: [TuiSheetComponent,] }] }
|
|
351
|
-
];
|
|
352
|
-
__decorate([
|
|
353
|
-
Output()
|
|
354
|
-
], TuiSheetCloseDirective.prototype, "close", void 0);
|
|
355
|
-
TuiSheetCloseDirective = __decorate([
|
|
356
|
-
Directive({
|
|
357
|
-
selector: 'tui-sheet[close]',
|
|
358
|
-
}),
|
|
359
|
-
__param(0, Inject(NgZone)),
|
|
360
|
-
__param(1, Inject(TUI_SHEET_DRAGGED)),
|
|
361
|
-
__param(2, Inject(TUI_SHEET_SCROLL)),
|
|
362
|
-
__param(3, Inject(WINDOW)),
|
|
363
|
-
__param(4, Inject(ElementRef)),
|
|
364
|
-
__param(5, Inject(TuiSheetComponent))
|
|
365
|
-
], TuiSheetCloseDirective);
|
|
366
|
-
|
|
367
|
-
let TuiSheetStopDirective = class TuiSheetStopDirective {
|
|
368
|
-
constructor(elementRef, destroy$, dragged$, scroll$, { nativeElement }) {
|
|
369
|
-
scroll$
|
|
370
|
-
.pipe(map(y => Math.floor(y) > elementRef.nativeElement.offsetTop), distinctUntilChanged(), withLatestFrom(dragged$), map(([above, dragged]) => !above && !dragged), filter(Boolean), throttleTime(100), takeUntil(destroy$))
|
|
371
|
-
.subscribe(() => {
|
|
372
|
-
nativeElement.style.overflow = 'hidden';
|
|
373
|
-
nativeElement.classList.remove('_stuck'); // iOS
|
|
374
|
-
nativeElement.scrollTop = elementRef.nativeElement.offsetTop;
|
|
375
|
-
setTimeout(() => {
|
|
376
|
-
nativeElement.style.overflow = '';
|
|
377
|
-
}, 100);
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
TuiSheetStopDirective.ctorParameters = () => [
|
|
382
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
383
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
384
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_DRAGGED,] }] },
|
|
385
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
|
|
386
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [TUI_SCROLL_REF,] }] }
|
|
387
|
-
];
|
|
388
|
-
TuiSheetStopDirective = __decorate([
|
|
389
|
-
Directive({
|
|
390
|
-
selector: '[tuiSheetStop]',
|
|
391
|
-
providers: [TuiDestroyService],
|
|
392
|
-
}),
|
|
393
|
-
__param(0, Inject(ElementRef)),
|
|
394
|
-
__param(1, Inject(TuiDestroyService)),
|
|
395
|
-
__param(2, Inject(TUI_SHEET_DRAGGED)),
|
|
396
|
-
__param(3, Inject(TUI_SHEET_SCROLL)),
|
|
397
|
-
__param(4, Inject(TUI_SCROLL_REF))
|
|
398
|
-
], TuiSheetStopDirective);
|
|
399
|
-
|
|
400
|
-
// So that borders get rounded when image is visible for at least 10px
|
|
401
|
-
const OFFSET = 10;
|
|
402
|
-
// @dynamic
|
|
403
|
-
let TuiSheetTopDirective = class TuiSheetTopDirective {
|
|
404
|
-
constructor(scroll$, component, windowRef) {
|
|
405
|
-
this.scroll$ = scroll$;
|
|
406
|
-
this.component = component;
|
|
407
|
-
this.windowRef = windowRef;
|
|
408
|
-
this.stop = 0;
|
|
409
|
-
this.transform$ = this.scroll$.pipe(map(y => `translateY(${this.getY(y)}%) scaleX(-1)`));
|
|
410
|
-
this.rounded$ = this.scroll$.pipe(map(y => y < this.stop + OFFSET));
|
|
411
|
-
this.clickthrough$ = this.scroll$.pipe(map(y => !!Math.round(this.getY(y))));
|
|
412
|
-
}
|
|
413
|
-
getY(scrollTop) {
|
|
414
|
-
const value = scrollTop - this.stop;
|
|
415
|
-
const total = this.windowRef.innerHeight - this.component.item.offset - this.stop;
|
|
416
|
-
return this.stop && clamp(100 - (value / total) * 100, 0, 100);
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
TuiSheetTopDirective.ctorParameters = () => [
|
|
420
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
|
|
421
|
-
{ type: TuiSheetComponent, decorators: [{ type: Inject, args: [forwardRef(() => TuiSheetComponent),] }] },
|
|
422
|
-
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
423
|
-
];
|
|
424
|
-
__decorate([
|
|
425
|
-
Input('tuiSheetTop'),
|
|
426
|
-
tuiDefaultProp()
|
|
427
|
-
], TuiSheetTopDirective.prototype, "stop", void 0);
|
|
428
|
-
TuiSheetTopDirective = __decorate([
|
|
429
|
-
Directive({
|
|
430
|
-
selector: '[tuiSheetTop]',
|
|
431
|
-
host: {
|
|
432
|
-
'[$.style.transform]': 'transform$',
|
|
433
|
-
'($.style.transform)': 'transform$',
|
|
434
|
-
'[$.class._rounded]': 'rounded$',
|
|
435
|
-
'($.class._rounded)': 'rounded$',
|
|
436
|
-
'[$.class._clickthrough]': 'clickthrough$',
|
|
437
|
-
'($.class._clickthrough)': 'clickthrough$',
|
|
438
|
-
},
|
|
439
|
-
}),
|
|
440
|
-
__param(0, Inject(TUI_SHEET_SCROLL)),
|
|
441
|
-
__param(1, Inject(forwardRef(() => TuiSheetComponent))),
|
|
442
|
-
__param(2, Inject(WINDOW))
|
|
443
|
-
], TuiSheetTopDirective);
|
|
392
|
+
}
|
|
393
|
+
TuiSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, deps: [{ token: TUI_SHEET_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
394
|
+
TuiSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, providedIn: `root` });
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, decorators: [{
|
|
396
|
+
type: Injectable,
|
|
397
|
+
args: [{
|
|
398
|
+
providedIn: `root`,
|
|
399
|
+
}]
|
|
400
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
401
|
+
type: Inject,
|
|
402
|
+
args: [TUI_SHEET_OPTIONS]
|
|
403
|
+
}] }]; } });
|
|
444
404
|
|
|
445
405
|
// Safety offset for shadow
|
|
446
|
-
const OFFSET
|
|
406
|
+
const OFFSET = 16;
|
|
447
407
|
// @dynamic
|
|
448
|
-
|
|
408
|
+
class TuiSheetWrapperDirective {
|
|
449
409
|
constructor(windowRef) {
|
|
450
410
|
this.windowRef = windowRef;
|
|
451
411
|
this.tuiSheetWrapper = 16;
|
|
@@ -463,8 +423,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
|
|
|
463
423
|
}
|
|
464
424
|
getHeight(value) {
|
|
465
425
|
var _a;
|
|
466
|
-
return ((_a = this.sheet) === null || _a === void 0 ? void 0 : _a.context.overlay)
|
|
467
|
-
|
|
426
|
+
return ((_a = this.sheet) === null || _a === void 0 ? void 0 : _a.context.overlay)
|
|
427
|
+
? null
|
|
428
|
+
: clamp(this.withImage(value) + OFFSET, OFFSET, this.windowRef.innerHeight);
|
|
468
429
|
}
|
|
469
430
|
withImage(value) {
|
|
470
431
|
var _a;
|
|
@@ -472,22 +433,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
|
|
|
472
433
|
? value
|
|
473
434
|
: value - this.sheet.imageHeight;
|
|
474
435
|
}
|
|
475
|
-
}
|
|
476
|
-
TuiSheetWrapperDirective
|
|
477
|
-
|
|
478
|
-
];
|
|
479
|
-
__decorate([
|
|
480
|
-
ContentChild(TuiSheetComponent)
|
|
481
|
-
], TuiSheetWrapperDirective.prototype, "sheet", void 0);
|
|
482
|
-
__decorate([
|
|
483
|
-
ContentChild(TuiSheetComponent, { read: TUI_SHEET_DRAGGED })
|
|
484
|
-
], TuiSheetWrapperDirective.prototype, "dragged$", void 0);
|
|
485
|
-
__decorate([
|
|
486
|
-
ContentChild(TuiSheetComponent, { read: TUI_SHEET_SCROLL })
|
|
487
|
-
], TuiSheetWrapperDirective.prototype, "scroll$", void 0);
|
|
488
|
-
__decorate([
|
|
489
|
-
Input()
|
|
490
|
-
], TuiSheetWrapperDirective.prototype, "tuiSheetWrapper", void 0);
|
|
436
|
+
}
|
|
437
|
+
TuiSheetWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, deps: [{ token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
|
|
438
|
+
TuiSheetWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetWrapperDirective, selector: "[tuiSheetWrapper]", inputs: { tuiSheetWrapper: "tuiSheetWrapper" }, host: { listeners: { "$.class._overlay": "overlay$", "$.class._visible": "visible$", "$.style.height.px": "height$" }, properties: { "$.class._overlay": "overlay$", "$.class._visible": "visible$", "$.style.height.px": "height$" } }, queries: [{ propertyName: "sheet", first: true, predicate: TuiSheetComponent, descendants: true }, { propertyName: "dragged$", first: true, predicate: TuiSheetComponent, descendants: true, read: TUI_SHEET_DRAGGED }, { propertyName: "scroll$", first: true, predicate: TuiSheetComponent, descendants: true, read: TUI_SHEET_SCROLL }], ngImport: i0 });
|
|
491
439
|
__decorate([
|
|
492
440
|
tuiPure
|
|
493
441
|
], TuiSheetWrapperDirective.prototype, "overlay$", null);
|
|
@@ -497,22 +445,119 @@ __decorate([
|
|
|
497
445
|
__decorate([
|
|
498
446
|
tuiPure
|
|
499
447
|
], TuiSheetWrapperDirective.prototype, "height$", null);
|
|
500
|
-
TuiSheetWrapperDirective
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
],
|
|
448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, decorators: [{
|
|
449
|
+
type: Directive,
|
|
450
|
+
args: [{
|
|
451
|
+
selector: `[tuiSheetWrapper]`,
|
|
452
|
+
host: {
|
|
453
|
+
'[$.class._overlay]': `overlay$`,
|
|
454
|
+
'($.class._overlay)': `overlay$`,
|
|
455
|
+
'[$.class._visible]': `visible$`,
|
|
456
|
+
'($.class._visible)': `visible$`,
|
|
457
|
+
'[$.style.height.px]': `height$`,
|
|
458
|
+
'($.style.height.px)': `height$`,
|
|
459
|
+
},
|
|
460
|
+
}]
|
|
461
|
+
}], ctorParameters: function () { return [{ type: Window, decorators: [{
|
|
462
|
+
type: Inject,
|
|
463
|
+
args: [WINDOW]
|
|
464
|
+
}] }]; }, propDecorators: { sheet: [{
|
|
465
|
+
type: ContentChild,
|
|
466
|
+
args: [TuiSheetComponent]
|
|
467
|
+
}], dragged$: [{
|
|
468
|
+
type: ContentChild,
|
|
469
|
+
args: [TuiSheetComponent, { read: TUI_SHEET_DRAGGED }]
|
|
470
|
+
}], scroll$: [{
|
|
471
|
+
type: ContentChild,
|
|
472
|
+
args: [TuiSheetComponent, { read: TUI_SHEET_SCROLL }]
|
|
473
|
+
}], tuiSheetWrapper: [{
|
|
474
|
+
type: Input
|
|
475
|
+
}], overlay$: [], visible$: [], height$: [] } });
|
|
476
|
+
|
|
477
|
+
// @dynamic
|
|
478
|
+
class TuiSheetCloseDirective {
|
|
479
|
+
constructor(ngZone, dragged$, scroll$, windowRef, elementRef, sheet) {
|
|
480
|
+
this.ngZone = ngZone;
|
|
481
|
+
this.dragged$ = dragged$;
|
|
482
|
+
this.scroll$ = scroll$;
|
|
483
|
+
this.windowRef = windowRef;
|
|
484
|
+
this.elementRef = elementRef;
|
|
485
|
+
this.sheet = sheet;
|
|
486
|
+
this.close = merge(typedFromEvent(this.elementRef.nativeElement, TUI_SHEET_CLOSE), this.dragged$.pipe(startWith(false), switchMap(dragged => dragged
|
|
487
|
+
? EMPTY
|
|
488
|
+
: this.scroll$.pipe(startWith(this.elementRef.nativeElement.scrollTop))), filter(y => { var _a; return ((_a = this.sheet.item) === null || _a === void 0 ? void 0 : _a.closeable) && this.shouldClose(y); }), distinctUntilChanged(), tuiZonefull(this.ngZone)));
|
|
489
|
+
}
|
|
490
|
+
shouldClose(scrollTop) {
|
|
491
|
+
const height = Math.min(this.windowRef.innerHeight, this.elementRef.nativeElement.scrollHeight - this.windowRef.innerHeight);
|
|
492
|
+
const min = Math.min(height, this.sheet.stops[0] || Infinity);
|
|
493
|
+
return scrollTop < min / 2;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
TuiSheetCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetCloseDirective, deps: [{ token: NgZone }, { token: TUI_SHEET_DRAGGED }, { token: TUI_SHEET_SCROLL }, { token: WINDOW }, { token: ElementRef }, { token: TuiSheetComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
497
|
+
TuiSheetCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetCloseDirective, selector: "tui-sheet[close]", outputs: { close: "close" }, ngImport: i0 });
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetCloseDirective, decorators: [{
|
|
499
|
+
type: Directive,
|
|
500
|
+
args: [{
|
|
501
|
+
selector: `tui-sheet[close]`,
|
|
502
|
+
}]
|
|
503
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
|
|
504
|
+
type: Inject,
|
|
505
|
+
args: [NgZone]
|
|
506
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
507
|
+
type: Inject,
|
|
508
|
+
args: [TUI_SHEET_DRAGGED]
|
|
509
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
510
|
+
type: Inject,
|
|
511
|
+
args: [TUI_SHEET_SCROLL]
|
|
512
|
+
}] }, { type: Window, decorators: [{
|
|
513
|
+
type: Inject,
|
|
514
|
+
args: [WINDOW]
|
|
515
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
516
|
+
type: Inject,
|
|
517
|
+
args: [ElementRef]
|
|
518
|
+
}] }, { type: TuiSheetComponent, decorators: [{
|
|
519
|
+
type: Inject,
|
|
520
|
+
args: [TuiSheetComponent]
|
|
521
|
+
}] }]; }, propDecorators: { close: [{
|
|
522
|
+
type: Output
|
|
523
|
+
}] } });
|
|
514
524
|
|
|
515
|
-
|
|
525
|
+
// @dynamic
|
|
526
|
+
class TuiSheetsHostComponent {
|
|
527
|
+
constructor(options, service, height$) {
|
|
528
|
+
this.options = options;
|
|
529
|
+
this.service = service;
|
|
530
|
+
this.height$ = height$;
|
|
531
|
+
}
|
|
532
|
+
close({ closeable, $implicit }) {
|
|
533
|
+
if (closeable) {
|
|
534
|
+
$implicit.complete();
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
TuiSheetsHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetsHostComponent, deps: [{ token: TUI_ANIMATION_OPTIONS }, { token: TuiSheetService }, { token: TUI_WINDOW_HEIGHT }], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
TuiSheetsHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetsHostComponent, selector: "tui-sheets-host", ngImport: i0, template: "<ng-container *ngIf=\"service.sheets$ | async as items\">\n <div\n *ngFor=\"let item of items\"\n class=\"t-wrapper\"\n [@tuiSlideInTop]=\"options\"\n [@tuiFadeIn]=\"options\"\n [tuiSheetWrapper]=\"item.offset\"\n [class.t-wrapper_overlay]=\"item.overlay\"\n [class.t-wrapper_closeable]=\"item.closeable\"\n (click.self)=\"close(item)\"\n >\n <tui-sheet\n tuiScrollRef\n tuiOverscroll=\"all\"\n [style.height.px]=\"((height$ | async) || 0) - item.offset\"\n [item]=\"item\"\n (close)=\"close(item)\"\n ></tui-sheet>\n </div>\n <div\n class=\"t-overlay\"\n (click)=\"close(items[0])\"\n ></div>\n</ng-container>\n", styles: [":host{position:-webkit-sticky;position:sticky;bottom:0;display:block;height:0}.t-overlay{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:0;left:0;width:100%;z-index:-1;height:100%;background:#000;opacity:.001;pointer-events:none}._overlay~.t-overlay,.t-wrapper_overlay~.t-overlay{opacity:.8;pointer-events:auto;touch-action:none}.t-wrapper{position:absolute;bottom:0;z-index:0;width:100%;height:100vh;overflow:hidden}.t-wrapper_overlay,.t-wrapper._visible,.t-wrapper._overlay{overflow:visible}\n"], components: [{ type: TuiSheetComponent, selector: "tui-sheet", inputs: ["item"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TuiSheetWrapperDirective, selector: "[tuiSheetWrapper]", inputs: ["tuiSheetWrapper"] }, { type: TuiSheetCloseDirective, selector: "tui-sheet[close]", outputs: ["close"] }, { type: i1.TuiScrollRefDirective, selector: "[tuiScrollRef]" }, { type: i3.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetsHostComponent, decorators: [{
|
|
541
|
+
type: Component,
|
|
542
|
+
args: [{
|
|
543
|
+
selector: `tui-sheets-host`,
|
|
544
|
+
templateUrl: `sheets-host.template.html`,
|
|
545
|
+
styleUrls: [`sheets-host.style.less`],
|
|
546
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
547
|
+
animations: [tuiSlideInTop, tuiFadeIn],
|
|
548
|
+
}]
|
|
549
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
550
|
+
type: Inject,
|
|
551
|
+
args: [TUI_ANIMATION_OPTIONS]
|
|
552
|
+
}] }, { type: TuiSheetService, decorators: [{
|
|
553
|
+
type: Inject,
|
|
554
|
+
args: [TuiSheetService]
|
|
555
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
556
|
+
type: Inject,
|
|
557
|
+
args: [TUI_WINDOW_HEIGHT]
|
|
558
|
+
}] }]; } });
|
|
559
|
+
|
|
560
|
+
class TuiSheetDirective extends PolymorpheusTemplate {
|
|
516
561
|
constructor(changeDetectorRef, templateRef, service) {
|
|
517
562
|
super(templateRef, changeDetectorRef);
|
|
518
563
|
this.service = service;
|
|
@@ -527,68 +572,101 @@ let TuiSheetDirective = class TuiSheetDirective extends PolymorpheusTemplate {
|
|
|
527
572
|
set tuiSheet(open) {
|
|
528
573
|
this.open$.next(open);
|
|
529
574
|
}
|
|
530
|
-
}
|
|
531
|
-
TuiSheetDirective
|
|
532
|
-
|
|
533
|
-
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
|
|
534
|
-
{ type: TuiSheetService, decorators: [{ type: Inject, args: [TuiSheetService,] }] }
|
|
535
|
-
];
|
|
575
|
+
}
|
|
576
|
+
TuiSheetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetDirective, deps: [{ token: ChangeDetectorRef }, { token: TemplateRef }, { token: TuiSheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
577
|
+
TuiSheetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetDirective, selector: "ng-template[tuiSheet]", inputs: { options: ["tuiSheetOptions", "options"], tuiSheet: "tuiSheet" }, outputs: { tuiSheetChange: "tuiSheetChange" }, usesInheritance: true, ngImport: i0 });
|
|
536
578
|
__decorate([
|
|
537
|
-
Input('tuiSheetOptions'),
|
|
538
579
|
tuiDefaultProp()
|
|
539
580
|
], TuiSheetDirective.prototype, "options", void 0);
|
|
540
581
|
__decorate([
|
|
541
|
-
Input(),
|
|
542
582
|
tuiRequiredSetter()
|
|
543
583
|
], TuiSheetDirective.prototype, "tuiSheet", null);
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
]
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetDirective, decorators: [{
|
|
585
|
+
type: Directive,
|
|
586
|
+
args: [{
|
|
587
|
+
selector: `ng-template[tuiSheet]`,
|
|
588
|
+
}]
|
|
589
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
590
|
+
type: Inject,
|
|
591
|
+
args: [ChangeDetectorRef]
|
|
592
|
+
}] }, { type: i0.TemplateRef, decorators: [{
|
|
593
|
+
type: Inject,
|
|
594
|
+
args: [TemplateRef]
|
|
595
|
+
}] }, { type: TuiSheetService, decorators: [{
|
|
596
|
+
type: Inject,
|
|
597
|
+
args: [TuiSheetService]
|
|
598
|
+
}] }]; }, propDecorators: { options: [{
|
|
599
|
+
type: Input,
|
|
600
|
+
args: [`tuiSheetOptions`]
|
|
601
|
+
}], tuiSheet: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], tuiSheetChange: [{
|
|
604
|
+
type: Output
|
|
605
|
+
}] } });
|
|
555
606
|
|
|
556
|
-
|
|
557
|
-
}
|
|
558
|
-
TuiSheetModule =
|
|
559
|
-
|
|
560
|
-
|
|
607
|
+
class TuiSheetModule {
|
|
608
|
+
}
|
|
609
|
+
TuiSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
610
|
+
TuiSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, declarations: [TuiSheetsHostComponent,
|
|
611
|
+
TuiSheetComponent,
|
|
612
|
+
TuiSheetBarComponent,
|
|
613
|
+
TuiSheetHeadingComponent,
|
|
614
|
+
TuiSheetTopDirective,
|
|
615
|
+
TuiSheetDirective,
|
|
616
|
+
TuiSheetWrapperDirective,
|
|
617
|
+
TuiSheetCloseDirective,
|
|
618
|
+
TuiSheetStopDirective], imports: [CommonModule,
|
|
619
|
+
PolymorpheusModule,
|
|
620
|
+
TuiLetModule,
|
|
621
|
+
TuiButtonModule,
|
|
622
|
+
TuiOverscrollModule,
|
|
623
|
+
TuiScrollbarModule], exports: [TuiSheetsHostComponent,
|
|
624
|
+
TuiSheetComponent,
|
|
625
|
+
TuiSheetHeadingComponent,
|
|
626
|
+
TuiSheetDirective] });
|
|
627
|
+
TuiSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, imports: [[
|
|
561
628
|
CommonModule,
|
|
562
629
|
PolymorpheusModule,
|
|
563
630
|
TuiLetModule,
|
|
564
631
|
TuiButtonModule,
|
|
565
632
|
TuiOverscrollModule,
|
|
566
633
|
TuiScrollbarModule,
|
|
567
|
-
]
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
634
|
+
]] });
|
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, decorators: [{
|
|
636
|
+
type: NgModule,
|
|
637
|
+
args: [{
|
|
638
|
+
imports: [
|
|
639
|
+
CommonModule,
|
|
640
|
+
PolymorpheusModule,
|
|
641
|
+
TuiLetModule,
|
|
642
|
+
TuiButtonModule,
|
|
643
|
+
TuiOverscrollModule,
|
|
644
|
+
TuiScrollbarModule,
|
|
645
|
+
],
|
|
646
|
+
declarations: [
|
|
647
|
+
TuiSheetsHostComponent,
|
|
648
|
+
TuiSheetComponent,
|
|
649
|
+
TuiSheetBarComponent,
|
|
650
|
+
TuiSheetHeadingComponent,
|
|
651
|
+
TuiSheetTopDirective,
|
|
652
|
+
TuiSheetDirective,
|
|
653
|
+
TuiSheetWrapperDirective,
|
|
654
|
+
TuiSheetCloseDirective,
|
|
655
|
+
TuiSheetStopDirective,
|
|
656
|
+
],
|
|
657
|
+
exports: [
|
|
658
|
+
TuiSheetsHostComponent,
|
|
659
|
+
TuiSheetComponent,
|
|
660
|
+
TuiSheetHeadingComponent,
|
|
661
|
+
TuiSheetDirective,
|
|
662
|
+
],
|
|
663
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
664
|
+
}]
|
|
665
|
+
}] });
|
|
588
666
|
|
|
589
667
|
/**
|
|
590
668
|
* Generated bundle index. Do not edit.
|
|
591
669
|
*/
|
|
592
670
|
|
|
593
|
-
export { TUI_SHEET_CLOSE, TUI_SHEET_DEFAULT_OPTIONS,
|
|
671
|
+
export { TUI_SHEET_CLOSE, TUI_SHEET_DEFAULT_OPTIONS, TUI_SHEET_ID, TUI_SHEET_OPTIONS, TUI_SHEET_PROVIDERS, TuiSheetBarComponent, TuiSheetCloseDirective, TuiSheetComponent, TuiSheetDirective, TuiSheetHeadingComponent, TuiSheetModule, TuiSheetService, TuiSheetStopDirective, TuiSheetTopDirective, TuiSheetWrapperDirective, TuiSheetsHostComponent, fakeSmoothScroll, iosScrollFactory, processDragged, sheetDraggedFactory, sheetScrollFactory };
|
|
594
672
|
//# sourceMappingURL=taiga-ui-addon-mobile-components-sheet.js.map
|