@taiga-ui/addon-mobile 3.58.0 → 3.59.0-canary.10da730
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/components/app-bar/app-bar-back.component.d.ts +1 -1
- package/components/app-bar/app-bar.component.d.ts +1 -1
- package/components/app-bar/app-bar.directive.d.ts +1 -1
- package/components/mobile-calendar/mobile-calendar.component.d.ts +1 -1
- package/components/mobile-calendar-dialog/mobile-calendar-dialog.component.d.ts +1 -1
- package/components/mobile-dialog/mobile-dialog.component.d.ts +1 -1
- package/components/mobile-dialog/mobile-dialog.options.d.ts +1 -1
- package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +1 -1
- package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +1 -1
- package/components/pull-to-refresh/pull-to-refresh.component.d.ts +1 -1
- package/components/sheet/components/sheet/sheet.component.d.ts +1 -1
- package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +1 -1
- package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +1 -1
- package/components/sheet/components/sheets-host/sheets-host.component.d.ts +1 -1
- package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +1 -1
- package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +1 -1
- package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +1 -1
- package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +1 -1
- package/components/sheet/sheet.directive.d.ts +1 -1
- package/components/sheet-dialog/sheet-dialog.component.d.ts +1 -1
- package/components/sheet-dialog/sheet-dialog.directive.d.ts +1 -1
- package/components/sheet-dialog/sheet-dialog.options.d.ts +1 -1
- package/components/tab-bar/tab-bar-item.component.d.ts +1 -1
- package/components/tab-bar/tab-bar-item.directive.d.ts +1 -1
- package/components/tab-bar/tab-bar.component.d.ts +1 -1
- package/components/theme-android/theme-android.component.d.ts +1 -1
- package/components/theme-ios/theme-ios.component.d.ts +1 -1
- package/const/mobile-alert-options.d.ts +3 -3
- package/directives/elastic-sticky/elastic-sticky.directive.d.ts +1 -1
- package/directives/mobile-tabs/mobile-tabs.component.d.ts +1 -1
- package/directives/mobile-tabs/mobile-tabs.directive.d.ts +1 -1
- package/directives/ripple/ripple-styles.component.d.ts +1 -1
- package/directives/ripple/ripple.directive.d.ts +1 -1
- package/directives/sidebar/sidebar.component.d.ts +1 -1
- package/directives/sidebar/sidebar.directive.d.ts +1 -1
- package/directives/touchable/touchable.directive.d.ts +1 -1
- package/esm2020/components/app-bar/app-bar-back.component.mjs +11 -0
- package/esm2020/components/app-bar/app-bar.component.mjs +33 -0
- package/{esm2015/components/app-bar/app-bar.directive.js → esm2020/components/app-bar/app-bar.directive.mjs} +3 -3
- package/{esm2015/components/app-bar/app-bar.module.js → esm2020/components/app-bar/app-bar.module.mjs} +5 -5
- package/esm2020/components/mobile-calendar/mobile-calendar.component.mjs +301 -0
- package/{esm2015/components/mobile-calendar/mobile-calendar.module.js → esm2020/components/mobile-calendar/mobile-calendar.module.mjs} +14 -16
- package/esm2020/components/mobile-calendar/mobile-calendar.providers.mjs +29 -0
- package/esm2020/components/mobile-calendar/mobile-calendar.strategy.mjs +125 -0
- package/esm2020/components/mobile-calendar-dialog/mobile-calendar-dialog.component.mjs +35 -0
- package/{esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js → esm2020/components/mobile-calendar-dialog/mobile-calendar-dialog.module.mjs} +6 -6
- package/esm2020/components/mobile-dialog/mobile-dialog.component.mjs +32 -0
- package/{esm2015/components/mobile-dialog/mobile-dialog.module.js → esm2020/components/mobile-dialog/mobile-dialog.module.mjs} +5 -5
- package/esm2020/components/mobile-dialog/mobile-dialog.service.mjs +29 -0
- package/esm2020/components/pull-to-refresh/loader-android/loader-android.component.mjs +55 -0
- package/esm2020/components/pull-to-refresh/loader-ios/loader-ios.component.mjs +44 -0
- package/esm2020/components/pull-to-refresh/pull-to-refresh.component.mjs +69 -0
- package/{esm2015/components/pull-to-refresh/pull-to-refresh.module.js → esm2020/components/pull-to-refresh/pull-to-refresh.module.mjs} +5 -5
- package/esm2020/components/pull-to-refresh/pull-to-refresh.service.mjs +53 -0
- package/esm2020/components/sheet/components/sheet/sheet.component.mjs +121 -0
- package/esm2020/components/sheet/components/sheet/sheet.providers.mjs +30 -0
- package/{esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js → esm2020/components/sheet/components/sheet-bar/sheet-bar.component.mjs} +7 -12
- package/{esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js → esm2020/components/sheet/components/sheet-heading/sheet-heading.component.mjs} +5 -10
- package/esm2020/components/sheet/components/sheets-host/sheets-host.component.mjs +61 -0
- package/esm2020/components/sheet/directives/sheet-close/sheet-close.directive.mjs +55 -0
- package/esm2020/components/sheet/directives/sheet-stop/sheet-stop.directive.mjs +47 -0
- package/esm2020/components/sheet/directives/sheet-top/sheet-top.directive.mjs +54 -0
- package/esm2020/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.mjs +78 -0
- package/esm2020/components/sheet/ios.hacks.mjs +28 -0
- package/esm2020/components/sheet/sheet-options.mjs +21 -0
- package/esm2020/components/sheet/sheet.directive.mjs +48 -0
- package/{esm2015/components/sheet/sheet.module.js → esm2020/components/sheet/sheet.module.mjs} +10 -12
- package/esm2020/components/sheet/sheet.service.mjs +56 -0
- package/esm2020/components/sheet-dialog/sheet-dialog.component.mjs +132 -0
- package/{esm2015/components/sheet-dialog/sheet-dialog.directive.js → esm2020/components/sheet-dialog/sheet-dialog.directive.mjs} +3 -3
- package/{esm2015/components/sheet-dialog/sheet-dialog.module.js → esm2020/components/sheet-dialog/sheet-dialog.module.mjs} +5 -5
- package/{esm2015/components/sheet-dialog/sheet-dialog.service.js → esm2020/components/sheet-dialog/sheet-dialog.service.mjs} +8 -5
- package/esm2020/components/tab-bar/tab-bar-item.component.mjs +29 -0
- package/esm2020/components/tab-bar/tab-bar-item.directive.mjs +44 -0
- package/esm2020/components/tab-bar/tab-bar.component.mjs +47 -0
- package/{esm2015/components/tab-bar/tab-bar.module.js → esm2020/components/tab-bar/tab-bar.module.mjs} +5 -5
- package/{esm2015/components/theme-android/theme-android.component.js → esm2020/components/theme-android/theme-android.component.mjs} +5 -11
- package/{esm2015/components/theme-android/theme-android.module.js → esm2020/components/theme-android/theme-android.module.mjs} +4 -4
- package/esm2020/components/theme-ios/theme-ios.component.mjs +12 -0
- package/{esm2015/components/theme-ios/theme-ios.module.js → esm2020/components/theme-ios/theme-ios.module.mjs} +4 -4
- package/esm2020/const/mobile-alert-options.mjs +13 -0
- package/{esm2015/directives/elastic-sticky/elastic-sticky.directive.js → esm2020/directives/elastic-sticky/elastic-sticky.directive.mjs} +3 -3
- package/{esm2015/directives/elastic-sticky/elastic-sticky.module.js → esm2020/directives/elastic-sticky/elastic-sticky.module.mjs} +4 -4
- package/esm2020/directives/elastic-sticky/elastic-sticky.service.mjs +40 -0
- package/esm2020/directives/mobile-tabs/mobile-tabs.component.mjs +13 -0
- package/{esm2015/directives/mobile-tabs/mobile-tabs.directive.js → esm2020/directives/mobile-tabs/mobile-tabs.directive.mjs} +3 -3
- package/{esm2015/directives/mobile-tabs/mobile-tabs.module.js → esm2020/directives/mobile-tabs/mobile-tabs.module.mjs} +4 -4
- package/{esm2015/directives/ripple/ripple-styles.component.js → esm2020/directives/ripple/ripple-styles.component.mjs} +6 -12
- package/esm2020/directives/ripple/ripple.directive.mjs +66 -0
- package/{esm2015/directives/ripple/ripple.module.js → esm2020/directives/ripple/ripple.module.mjs} +4 -4
- package/esm2020/directives/ripple/ripple.providers.mjs +42 -0
- package/esm2020/directives/sidebar/sidebar.component.mjs +58 -0
- package/esm2020/directives/sidebar/sidebar.directive.mjs +72 -0
- package/{esm2015/directives/sidebar/sidebar.module.js → esm2020/directives/sidebar/sidebar.module.mjs} +5 -5
- package/esm2020/directives/touchable/touchable.directive.mjs +82 -0
- package/{esm2015/directives/touchable/touchable.module.js → esm2020/directives/touchable/touchable.module.mjs} +4 -4
- package/esm2020/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.mjs +34 -0
- package/{esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js → esm2020/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.mjs} +8 -10
- package/fesm2015/taiga-ui-addon-mobile-components-app-bar.mjs +103 -0
- package/fesm2015/taiga-ui-addon-mobile-components-app-bar.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-components-mobile-calendar-dialog.js → taiga-ui-addon-mobile-components-mobile-calendar-dialog.mjs} +16 -19
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.mjs +539 -0
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.mjs +91 -0
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +257 -0
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-sheet-dialog.mjs +215 -0
- package/fesm2015/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.mjs +687 -0
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components-tab-bar.mjs +137 -0
- package/fesm2015/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-components-theme-android.js → taiga-ui-addon-mobile-components-theme-android.mjs} +9 -15
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-components-theme-ios.js → taiga-ui-addon-mobile-components-theme-ios.mjs} +9 -15
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-components.js → taiga-ui-addon-mobile-components.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-const.js → taiga-ui-addon-mobile-const.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile-const.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +85 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.mjs +87 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.mjs +136 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.mjs +143 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.mjs +104 -0
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-directives.js → taiga-ui-addon-mobile-directives.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile-directives.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-interfaces.mjs +4 -0
- package/fesm2015/taiga-ui-addon-mobile-interfaces.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.mjs +72 -0
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-internal.js → taiga-ui-addon-mobile-internal.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile-internal.mjs.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-types.mjs +4 -0
- package/fesm2015/taiga-ui-addon-mobile-types.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile-utils.js → taiga-ui-addon-mobile-utils.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile-utils.mjs.map +1 -0
- package/fesm2015/{taiga-ui-addon-mobile.js → taiga-ui-addon-mobile.mjs} +1 -1
- package/fesm2015/taiga-ui-addon-mobile.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-app-bar.js → fesm2020/taiga-ui-addon-mobile-components-app-bar.mjs} +19 -34
- package/fesm2020/taiga-ui-addon-mobile-components-app-bar.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-components-mobile-calendar-dialog.mjs +69 -0
- package/fesm2020/taiga-ui-addon-mobile-components-mobile-calendar-dialog.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js → fesm2020/taiga-ui-addon-mobile-components-mobile-calendar.mjs} +36 -51
- package/fesm2020/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js → fesm2020/taiga-ui-addon-mobile-components-mobile-dialog.mjs} +22 -25
- package/fesm2020/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js → fesm2020/taiga-ui-addon-mobile-components-pull-to-refresh.mjs} +25 -42
- package/fesm2020/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-sheet-dialog.js → fesm2020/taiga-ui-addon-mobile-components-sheet-dialog.mjs} +25 -31
- package/fesm2020/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-sheet.js → fesm2020/taiga-ui-addon-mobile-components-sheet.mjs} +86 -108
- package/fesm2020/taiga-ui-addon-mobile-components-sheet.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-components-tab-bar.js → fesm2020/taiga-ui-addon-mobile-components-tab-bar.mjs} +19 -30
- package/fesm2020/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-components-theme-android.mjs +32 -0
- package/fesm2020/taiga-ui-addon-mobile-components-theme-android.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-components-theme-ios.mjs +32 -0
- package/fesm2020/taiga-ui-addon-mobile-components-theme-ios.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-components.mjs +15 -0
- package/fesm2020/taiga-ui-addon-mobile-components.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-const.mjs +19 -0
- package/fesm2020/taiga-ui-addon-mobile-const.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js → fesm2020/taiga-ui-addon-mobile-directives-elastic-sticky.mjs} +12 -13
- package/fesm2020/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-directives-mobile-tabs.mjs +85 -0
- package/fesm2020/taiga-ui-addon-mobile-directives-mobile-tabs.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-directives-ripple.js → fesm2020/taiga-ui-addon-mobile-directives-ripple.mjs} +14 -21
- package/fesm2020/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-directives-sidebar.js → fesm2020/taiga-ui-addon-mobile-directives-sidebar.mjs} +28 -28
- package/fesm2020/taiga-ui-addon-mobile-directives-sidebar.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-directives-touchable.js → fesm2020/taiga-ui-addon-mobile-directives-touchable.mjs} +10 -11
- package/fesm2020/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-directives.mjs +10 -0
- package/fesm2020/taiga-ui-addon-mobile-directives.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-interfaces.mjs +4 -0
- package/fesm2020/taiga-ui-addon-mobile-interfaces.mjs.map +1 -0
- package/{fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js → fesm2020/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.mjs} +13 -21
- package/fesm2020/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-internal.mjs +6 -0
- package/fesm2020/taiga-ui-addon-mobile-internal.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-types.mjs +4 -0
- package/fesm2020/taiga-ui-addon-mobile-types.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile-utils.mjs +16 -0
- package/fesm2020/taiga-ui-addon-mobile-utils.mjs.map +1 -0
- package/fesm2020/taiga-ui-addon-mobile.mjs +11 -0
- package/fesm2020/taiga-ui-addon-mobile.mjs.map +1 -0
- package/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.d.ts +1 -1
- package/package.json +229 -32
- package/styles/android/checkbox.less +16 -12
- package/styles/android/radio.less +5 -3
- package/styles/android/toggle.less +3 -4
- package/styles/ios/checkbox.less +15 -7
- package/styles/ios/toggle.less +8 -11
- package/types/touch-mode.d.ts +1 -1
- package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.js +0 -149
- package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js +0 -129
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +0 -929
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js +0 -450
- package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +0 -677
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet-dialog.umd.js +0 -596
- package/bundles/taiga-ui-addon-mobile-components-sheet-dialog.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +0 -1153
- package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.js +0 -188
- package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +0 -391
- package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +0 -391
- package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-components.umd.js +0 -75
- package/bundles/taiga-ui-addon-mobile-components.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-const.umd.js +0 -24
- package/bundles/taiga-ui-addon-mobile-const.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +0 -437
- package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +0 -131
- package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +0 -195
- package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +0 -524
- package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +0 -144
- package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-directives.umd.js +0 -45
- package/bundles/taiga-ui-addon-mobile-directives.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.js +0 -11
- package/bundles/taiga-ui-addon-mobile-interfaces.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +0 -429
- package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-internal.umd.js +0 -21
- package/bundles/taiga-ui-addon-mobile-internal.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-types.umd.js +0 -11
- package/bundles/taiga-ui-addon-mobile-types.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile-utils.umd.js +0 -26
- package/bundles/taiga-ui-addon-mobile-utils.umd.js.map +0 -1
- package/bundles/taiga-ui-addon-mobile.umd.js +0 -51
- package/bundles/taiga-ui-addon-mobile.umd.js.map +0 -1
- package/components/app-bar/package.json +0 -10
- package/components/app-bar/taiga-ui-addon-mobile-components-app-bar.d.ts +0 -5
- package/components/mobile-calendar/package.json +0 -10
- package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.d.ts +0 -5
- package/components/mobile-calendar-dialog/package.json +0 -10
- package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.d.ts +0 -5
- package/components/mobile-dialog/package.json +0 -10
- package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.d.ts +0 -5
- package/components/package.json +0 -10
- package/components/pull-to-refresh/package.json +0 -10
- package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.d.ts +0 -5
- package/components/sheet/package.json +0 -10
- package/components/sheet/taiga-ui-addon-mobile-components-sheet.d.ts +0 -5
- package/components/sheet-dialog/package.json +0 -10
- package/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.d.ts +0 -5
- package/components/tab-bar/package.json +0 -10
- package/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.d.ts +0 -5
- package/components/taiga-ui-addon-mobile-components.d.ts +0 -5
- package/components/theme-android/package.json +0 -10
- package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.d.ts +0 -5
- package/components/theme-ios/package.json +0 -10
- package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.d.ts +0 -5
- package/const/package.json +0 -10
- package/const/taiga-ui-addon-mobile-const.d.ts +0 -5
- package/directives/elastic-sticky/package.json +0 -10
- package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.d.ts +0 -5
- package/directives/mobile-tabs/package.json +0 -10
- package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.d.ts +0 -5
- package/directives/package.json +0 -10
- package/directives/ripple/package.json +0 -10
- package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.d.ts +0 -5
- package/directives/sidebar/package.json +0 -10
- package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.d.ts +0 -5
- package/directives/taiga-ui-addon-mobile-directives.d.ts +0 -5
- package/directives/touchable/package.json +0 -10
- package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.d.ts +0 -5
- package/esm2015/components/app-bar/app-bar-back.component.js +0 -16
- package/esm2015/components/app-bar/app-bar.component.js +0 -43
- package/esm2015/components/mobile-calendar/mobile-calendar.component.js +0 -314
- package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +0 -30
- package/esm2015/components/mobile-calendar/mobile-calendar.strategy.js +0 -126
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +0 -45
- package/esm2015/components/mobile-dialog/mobile-dialog.component.js +0 -38
- package/esm2015/components/mobile-dialog/mobile-dialog.service.js +0 -26
- package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +0 -60
- package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +0 -49
- package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +0 -75
- package/esm2015/components/pull-to-refresh/pull-to-refresh.service.js +0 -54
- package/esm2015/components/sheet/components/sheet/sheet.component.js +0 -128
- package/esm2015/components/sheet/components/sheet/sheet.providers.js +0 -31
- package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +0 -68
- package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +0 -56
- package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +0 -47
- package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +0 -54
- package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +0 -81
- package/esm2015/components/sheet/ios.hacks.js +0 -29
- package/esm2015/components/sheet/sheet-options.js +0 -19
- package/esm2015/components/sheet/sheet.directive.js +0 -49
- package/esm2015/components/sheet/sheet.service.js +0 -51
- package/esm2015/components/sheet-dialog/sheet-dialog.component.js +0 -141
- package/esm2015/components/tab-bar/tab-bar-item.component.js +0 -35
- package/esm2015/components/tab-bar/tab-bar-item.directive.js +0 -44
- package/esm2015/components/tab-bar/tab-bar.component.js +0 -52
- package/esm2015/components/theme-ios/theme-ios.component.js +0 -18
- package/esm2015/const/mobile-alert-options.js +0 -7
- package/esm2015/directives/elastic-sticky/elastic-sticky.service.js +0 -41
- package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +0 -19
- package/esm2015/directives/ripple/ripple.directive.js +0 -67
- package/esm2015/directives/ripple/ripple.providers.js +0 -43
- package/esm2015/directives/sidebar/sidebar.component.js +0 -58
- package/esm2015/directives/sidebar/sidebar.directive.js +0 -72
- package/esm2015/directives/touchable/touchable.directive.js +0 -83
- package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +0 -40
- package/fesm2015/taiga-ui-addon-mobile-components-app-bar.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-sheet-dialog.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-tab-bar.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-components.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-const.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -91
- package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-directives.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-interfaces.js +0 -4
- package/fesm2015/taiga-ui-addon-mobile-interfaces.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-internal.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-types.js +0 -4
- package/fesm2015/taiga-ui-addon-mobile-types.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile-utils.js.map +0 -1
- package/fesm2015/taiga-ui-addon-mobile.js.map +0 -1
- package/interfaces/package.json +0 -10
- package/interfaces/taiga-ui-addon-mobile-interfaces.d.ts +0 -5
- package/internal/package.json +0 -10
- package/internal/primitive-calendar-mobile/package.json +0 -10
- package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.d.ts +0 -5
- package/internal/taiga-ui-addon-mobile-internal.d.ts +0 -5
- package/taiga-ui-addon-mobile.d.ts +0 -5
- package/types/package.json +0 -10
- package/types/taiga-ui-addon-mobile-types.d.ts +0 -5
- package/utils/package.json +0 -10
- package/utils/taiga-ui-addon-mobile-utils.d.ts +0 -5
- /package/{esm2015/components/app-bar/app-bar.providers.js → esm2020/components/app-bar/app-bar.providers.mjs} +0 -0
- /package/{esm2015/components/app-bar/index.js → esm2020/components/app-bar/index.mjs} +0 -0
- /package/{esm2015/components/app-bar/taiga-ui-addon-mobile-components-app-bar.js → esm2020/components/app-bar/taiga-ui-addon-mobile-components-app-bar.mjs} +0 -0
- /package/{esm2015/components/index.js → esm2020/components/index.mjs} +0 -0
- /package/{esm2015/components/mobile-calendar/index.js → esm2020/components/mobile-calendar/index.mjs} +0 -0
- /package/{esm2015/components/mobile-calendar/mobile-calendar.const.js → esm2020/components/mobile-calendar/mobile-calendar.const.mjs} +0 -0
- /package/{esm2015/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js → esm2020/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.mjs} +0 -0
- /package/{esm2015/components/mobile-calendar-dialog/index.js → esm2020/components/mobile-calendar-dialog/index.mjs} +0 -0
- /package/{esm2015/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js → esm2020/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.mjs} +0 -0
- /package/{esm2015/components/mobile-dialog/index.js → esm2020/components/mobile-dialog/index.mjs} +0 -0
- /package/{esm2015/components/mobile-dialog/mobile-dialog-options.js → esm2020/components/mobile-dialog/mobile-dialog-options.mjs} +0 -0
- /package/{esm2015/components/mobile-dialog/mobile-dialog.options.js → esm2020/components/mobile-dialog/mobile-dialog.options.mjs} +0 -0
- /package/{esm2015/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js → esm2020/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.mjs} +0 -0
- /package/{esm2015/components/pull-to-refresh/index.js → esm2020/components/pull-to-refresh/index.mjs} +0 -0
- /package/{esm2015/components/pull-to-refresh/pull-to-refresh.providers.js → esm2020/components/pull-to-refresh/pull-to-refresh.providers.mjs} +0 -0
- /package/{esm2015/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js → esm2020/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.mjs} +0 -0
- /package/{esm2015/components/sheet/index.js → esm2020/components/sheet/index.mjs} +0 -0
- /package/{esm2015/components/sheet/sheet-tokens.js → esm2020/components/sheet/sheet-tokens.mjs} +0 -0
- /package/{esm2015/components/sheet/sheet.js → esm2020/components/sheet/sheet.mjs} +0 -0
- /package/{esm2015/components/sheet/taiga-ui-addon-mobile-components-sheet.js → esm2020/components/sheet/taiga-ui-addon-mobile-components-sheet.mjs} +0 -0
- /package/{esm2015/components/sheet-dialog/index.js → esm2020/components/sheet-dialog/index.mjs} +0 -0
- /package/{esm2015/components/sheet-dialog/sheet-dialog.options.js → esm2020/components/sheet-dialog/sheet-dialog.options.mjs} +0 -0
- /package/{esm2015/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.js → esm2020/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.mjs} +0 -0
- /package/{esm2015/components/tab-bar/index.js → esm2020/components/tab-bar/index.mjs} +0 -0
- /package/{esm2015/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.js → esm2020/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.mjs} +0 -0
- /package/{esm2015/components/taiga-ui-addon-mobile-components.js → esm2020/components/taiga-ui-addon-mobile-components.mjs} +0 -0
- /package/{esm2015/components/theme-android/index.js → esm2020/components/theme-android/index.mjs} +0 -0
- /package/{esm2015/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js → esm2020/components/theme-android/taiga-ui-addon-mobile-components-theme-android.mjs} +0 -0
- /package/{esm2015/components/theme-ios/index.js → esm2020/components/theme-ios/index.mjs} +0 -0
- /package/{esm2015/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js → esm2020/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.mjs} +0 -0
- /package/{esm2015/const/index.js → esm2020/const/index.mjs} +0 -0
- /package/{esm2015/const/taiga-ui-addon-mobile-const.js → esm2020/const/taiga-ui-addon-mobile-const.mjs} +0 -0
- /package/{esm2015/directives/elastic-sticky/index.js → esm2020/directives/elastic-sticky/index.mjs} +0 -0
- /package/{esm2015/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js → esm2020/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.mjs} +0 -0
- /package/{esm2015/directives/index.js → esm2020/directives/index.mjs} +0 -0
- /package/{esm2015/directives/mobile-tabs/index.js → esm2020/directives/mobile-tabs/index.mjs} +0 -0
- /package/{esm2015/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js → esm2020/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.mjs} +0 -0
- /package/{esm2015/directives/ripple/index.js → esm2020/directives/ripple/index.mjs} +0 -0
- /package/{esm2015/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js → esm2020/directives/ripple/taiga-ui-addon-mobile-directives-ripple.mjs} +0 -0
- /package/{esm2015/directives/sidebar/index.js → esm2020/directives/sidebar/index.mjs} +0 -0
- /package/{esm2015/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js → esm2020/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.mjs} +0 -0
- /package/{esm2015/directives/taiga-ui-addon-mobile-directives.js → esm2020/directives/taiga-ui-addon-mobile-directives.mjs} +0 -0
- /package/{esm2015/directives/touchable/index.js → esm2020/directives/touchable/index.mjs} +0 -0
- /package/{esm2015/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js → esm2020/directives/touchable/taiga-ui-addon-mobile-directives-touchable.mjs} +0 -0
- /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- /package/{esm2015/interfaces/index.js → esm2020/interfaces/index.mjs} +0 -0
- /package/{esm2015/interfaces/mobile-alert-data.js → esm2020/interfaces/mobile-alert-data.mjs} +0 -0
- /package/{esm2015/interfaces/taiga-ui-addon-mobile-interfaces.js → esm2020/interfaces/taiga-ui-addon-mobile-interfaces.mjs} +0 -0
- /package/{esm2015/internal/index.js → esm2020/internal/index.mjs} +0 -0
- /package/{esm2015/internal/primitive-calendar-mobile/index.js → esm2020/internal/primitive-calendar-mobile/index.mjs} +0 -0
- /package/{esm2015/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js → esm2020/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.mjs} +0 -0
- /package/{esm2015/internal/taiga-ui-addon-mobile-internal.js → esm2020/internal/taiga-ui-addon-mobile-internal.mjs} +0 -0
- /package/{esm2015/taiga-ui-addon-mobile.js → esm2020/taiga-ui-addon-mobile.mjs} +0 -0
- /package/{esm2015/types/index.js → esm2020/types/index.mjs} +0 -0
- /package/{esm2015/types/taiga-ui-addon-mobile-types.js → esm2020/types/taiga-ui-addon-mobile-types.mjs} +0 -0
- /package/{esm2015/types/touch-mode.js → esm2020/types/touch-mode.mjs} +0 -0
- /package/{esm2015/utils/find-touch-index.js → esm2020/utils/find-touch-index.mjs} +0 -0
- /package/{esm2015/utils/index.js → esm2020/utils/index.mjs} +0 -0
- /package/{esm2015/utils/taiga-ui-addon-mobile-utils.js → esm2020/utils/taiga-ui-addon-mobile-utils.mjs} +0 -0
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, Optional, ChangeDetectorRef, EventEmitter, NgZone, Component, ChangeDetectionStrategy, Inject, Self, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
5
|
+
import * as i7 from '@taiga-ui/cdk';
|
|
6
|
+
import { MONTHS_IN_YEAR, tuiPure, TuiDestroyService, TuiScrollService, TUI_IS_IOS, tuiWatch, TuiDay, TUI_FIRST_DAY, TUI_LAST_DAY, ALWAYS_FALSE_HANDLER, TuiMonth, TuiDayRange, tuiTypedFromEvent, TUI_IS_E2E, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
7
|
+
import * as i5 from '@taiga-ui/core';
|
|
8
|
+
import { TUI_COMMON_ICONS, TUI_CLOSE_WORD, TUI_SHORT_WEEK_DAYS, TUI_ANIMATIONS_DURATION, TuiLinkModule, TuiButtonModule, TuiMonthPipeModule, TuiOrderWeekDaysPipeModule } from '@taiga-ui/core';
|
|
9
|
+
import { TUI_CALENDAR_DATE_STREAM, tuiImmutableUpdateInputDateMulti, TUI_CANCEL_WORD, TUI_DONE_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS } from '@taiga-ui/kit';
|
|
10
|
+
import * as i8 from 'rxjs';
|
|
11
|
+
import { Subject, distinctUntilChanged, takeUntil, EMPTY, identity, delay, take, windowToggle, mergeMap, map, filter, switchMap, race, timer, debounceTime } from 'rxjs';
|
|
12
|
+
import * as i2 from '@angular/cdk/scrolling';
|
|
13
|
+
import { VIRTUAL_SCROLL_STRATEGY, ScrollingModule } from '@angular/cdk/scrolling';
|
|
14
|
+
import { __decorate } from 'tslib';
|
|
15
|
+
import * as i3 from '@taiga-ui/addon-mobile/directives/touchable';
|
|
16
|
+
import { TuiTouchableModule } from '@taiga-ui/addon-mobile/directives/touchable';
|
|
17
|
+
import * as i4 from '@taiga-ui/addon-mobile/directives/ripple';
|
|
18
|
+
import { TuiRippleModule } from '@taiga-ui/addon-mobile/directives/ripple';
|
|
19
|
+
import * as i6 from '@taiga-ui/addon-mobile/internal/primitive-calendar-mobile';
|
|
20
|
+
import { TuiPrimitiveCalendarMobileModule } from '@taiga-ui/addon-mobile/internal/primitive-calendar-mobile';
|
|
21
|
+
|
|
22
|
+
function getCycle(options) {
|
|
23
|
+
return Array.from({ length: options.yearCycle }, (_, i) => Array.from({ length: MONTHS_IN_YEAR }, (_, month) => options.label +
|
|
24
|
+
weekCount({ year: i, month, startingYear: options.startingYear }) *
|
|
25
|
+
options.week));
|
|
26
|
+
}
|
|
27
|
+
function weekCount(options) {
|
|
28
|
+
const firstOfMonth = new Date(options.year + options.startingYear, options.month, 1);
|
|
29
|
+
const lastOfMonth = new Date(options.year + options.startingYear, options.month + 1, 0);
|
|
30
|
+
const days = lastOfMonth.getDate() + (firstOfMonth.getDay() || 7) - 1;
|
|
31
|
+
return Math.ceil(days / 7);
|
|
32
|
+
}
|
|
33
|
+
const SCROLL_DEBOUNCE_TIME = 80;
|
|
34
|
+
const YEARS_IN_ROW = 5;
|
|
35
|
+
const STARTING_YEAR = 1900;
|
|
36
|
+
const RANGE = 196;
|
|
37
|
+
const BUFFER = 500;
|
|
38
|
+
const ANDROID_LABEL = 64;
|
|
39
|
+
const ANDROID_WEEK = 48;
|
|
40
|
+
const IOS_LABEL = 50;
|
|
41
|
+
const IOS_WEEK = 50;
|
|
42
|
+
const YEARLY_CYCLE = 28;
|
|
43
|
+
const ANDROID_CYCLE = getCycle({
|
|
44
|
+
label: ANDROID_LABEL,
|
|
45
|
+
week: ANDROID_WEEK,
|
|
46
|
+
yearCycle: YEARLY_CYCLE,
|
|
47
|
+
startingYear: STARTING_YEAR,
|
|
48
|
+
});
|
|
49
|
+
const IOS_CYCLE = getCycle({
|
|
50
|
+
label: IOS_LABEL,
|
|
51
|
+
week: IOS_WEEK,
|
|
52
|
+
yearCycle: YEARLY_CYCLE,
|
|
53
|
+
startingYear: STARTING_YEAR,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const ANDROID_CYCLE_HEIGHT = reduceCycle(ANDROID_CYCLE);
|
|
57
|
+
const IOS_CYCLE_HEIGHT = reduceCycle(IOS_CYCLE);
|
|
58
|
+
function reduceCycle(cycle, lastYear = 28, lastMonth = 12) {
|
|
59
|
+
return cycle.reduce((total, year, yearIndex) => yearIndex <= lastYear
|
|
60
|
+
? total +
|
|
61
|
+
year.reduce((sum, month, monthIndex) => yearIndex < lastYear ||
|
|
62
|
+
(yearIndex === lastYear && monthIndex < lastMonth)
|
|
63
|
+
? sum + month
|
|
64
|
+
: sum, 0)
|
|
65
|
+
: total, 0);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* This scroll strategy is hard wired with styles for iOS and Android.
|
|
69
|
+
* It is dependent on month height on those platforms and is designed to
|
|
70
|
+
* work for {@link TuiMobileCalendarComponent} with years 1906 to 2102
|
|
71
|
+
*/
|
|
72
|
+
class TuiMobileCalendarStrategy {
|
|
73
|
+
constructor(isIos, scrollService) {
|
|
74
|
+
this.isIos = isIos;
|
|
75
|
+
this.scrollService = scrollService;
|
|
76
|
+
this.index$ = new Subject();
|
|
77
|
+
this.viewport = null;
|
|
78
|
+
this.destroy$ = new Subject();
|
|
79
|
+
}
|
|
80
|
+
get scrolledIndexChange() {
|
|
81
|
+
return this.index$.pipe(distinctUntilChanged());
|
|
82
|
+
}
|
|
83
|
+
attach(viewport) {
|
|
84
|
+
const cycle = this.isIos ? IOS_CYCLE_HEIGHT : ANDROID_CYCLE_HEIGHT;
|
|
85
|
+
this.viewport = viewport;
|
|
86
|
+
this.viewport.setTotalContentSize(cycle * 7);
|
|
87
|
+
this.updateRenderedRange(this.viewport);
|
|
88
|
+
}
|
|
89
|
+
detach() {
|
|
90
|
+
this.index$.complete();
|
|
91
|
+
this.viewport = null;
|
|
92
|
+
this.destroy$.next();
|
|
93
|
+
this.destroy$.complete();
|
|
94
|
+
}
|
|
95
|
+
onContentScrolled() {
|
|
96
|
+
if (this.viewport) {
|
|
97
|
+
this.updateRenderedRange(this.viewport);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/** These do not matter for this case */
|
|
101
|
+
onDataLengthChanged() { }
|
|
102
|
+
onContentRendered() { }
|
|
103
|
+
onRenderedOffsetChanged() { }
|
|
104
|
+
scrollToIndex(index, behavior) {
|
|
105
|
+
if (!this.viewport) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const scrollTop = this.getOffsetForIndex(index);
|
|
109
|
+
if (behavior !== `smooth`) {
|
|
110
|
+
this.viewport.scrollToOffset(scrollTop, behavior);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.scrollService
|
|
114
|
+
.scroll$(this.viewport.elementRef.nativeElement, scrollTop)
|
|
115
|
+
.pipe(takeUntil(this.destroy$))
|
|
116
|
+
.subscribe();
|
|
117
|
+
}
|
|
118
|
+
getOffsetForIndex(index) {
|
|
119
|
+
const month = index % MONTHS_IN_YEAR;
|
|
120
|
+
const year = (index - month) / MONTHS_IN_YEAR;
|
|
121
|
+
return this.computeHeight(year, month);
|
|
122
|
+
}
|
|
123
|
+
getIndexForOffset(offset) {
|
|
124
|
+
const cycle = this.isIos ? IOS_CYCLE : ANDROID_CYCLE;
|
|
125
|
+
const cycleHeight = this.isIos ? IOS_CYCLE_HEIGHT : ANDROID_CYCLE_HEIGHT;
|
|
126
|
+
const remainder = offset % cycleHeight;
|
|
127
|
+
const years = ((offset - remainder) / cycleHeight) * YEARLY_CYCLE;
|
|
128
|
+
let accumulator = 0;
|
|
129
|
+
for (let year = 0; year < cycle.length; year++) {
|
|
130
|
+
for (let month = 0; month < cycle[year].length; month++) {
|
|
131
|
+
accumulator += cycle[year][month];
|
|
132
|
+
if (accumulator - cycle[year][month] / 2 > remainder) {
|
|
133
|
+
return Math.max((years + year) * MONTHS_IN_YEAR + month, 0);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return RANGE;
|
|
138
|
+
}
|
|
139
|
+
computeHeight(year, month) {
|
|
140
|
+
const cycle = this.isIos ? IOS_CYCLE : ANDROID_CYCLE;
|
|
141
|
+
const remainder = year % YEARLY_CYCLE;
|
|
142
|
+
const remainderHeight = reduceCycle(cycle, remainder, month);
|
|
143
|
+
const fullCycles = (year - remainder) / YEARLY_CYCLE;
|
|
144
|
+
const fullCyclesHeight = this.isIos
|
|
145
|
+
? fullCycles * IOS_CYCLE_HEIGHT
|
|
146
|
+
: fullCycles * ANDROID_CYCLE_HEIGHT;
|
|
147
|
+
return fullCyclesHeight + remainderHeight;
|
|
148
|
+
}
|
|
149
|
+
updateRenderedRange(viewport) {
|
|
150
|
+
const offset = viewport.measureScrollOffset();
|
|
151
|
+
const { start, end } = viewport.getRenderedRange();
|
|
152
|
+
const viewportSize = viewport.getViewportSize();
|
|
153
|
+
const dataLength = viewport.getDataLength();
|
|
154
|
+
const newRange = { start, end };
|
|
155
|
+
const firstVisibleIndex = this.getIndexForOffset(offset);
|
|
156
|
+
const startBuffer = offset - this.getOffsetForIndex(start);
|
|
157
|
+
if (startBuffer < BUFFER && start !== 0) {
|
|
158
|
+
newRange.start = Math.max(0, this.getIndexForOffset(offset - BUFFER * 2));
|
|
159
|
+
newRange.end = Math.min(dataLength, this.getIndexForOffset(offset + viewportSize + BUFFER));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
const endBuffer = this.getOffsetForIndex(end) - offset - viewportSize;
|
|
163
|
+
if (endBuffer < BUFFER && end !== dataLength) {
|
|
164
|
+
newRange.start = Math.max(0, this.getIndexForOffset(offset - BUFFER));
|
|
165
|
+
newRange.end = Math.min(dataLength, this.getIndexForOffset(offset + viewportSize + BUFFER * 2));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
viewport.setRenderedRange(newRange);
|
|
169
|
+
viewport.setRenderedContentOffset(this.getOffsetForIndex(newRange.start));
|
|
170
|
+
this.index$.next(firstVisibleIndex);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
__decorate([
|
|
174
|
+
tuiPure
|
|
175
|
+
], TuiMobileCalendarStrategy.prototype, "scrolledIndexChange", null);
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Stream for updating value
|
|
179
|
+
*/
|
|
180
|
+
const TUI_VALUE_STREAM = new InjectionToken(`[TUI_VALUE_STREAM]`);
|
|
181
|
+
const TUI_MOBILE_CALENDAR_PROVIDERS = [
|
|
182
|
+
TuiDestroyService,
|
|
183
|
+
TuiScrollService,
|
|
184
|
+
{
|
|
185
|
+
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
186
|
+
deps: [TUI_IS_IOS, TuiScrollService],
|
|
187
|
+
useClass: TuiMobileCalendarStrategy,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
provide: TUI_VALUE_STREAM,
|
|
191
|
+
deps: [
|
|
192
|
+
[new Optional(), TUI_CALENDAR_DATE_STREAM],
|
|
193
|
+
TuiDestroyService,
|
|
194
|
+
ChangeDetectorRef,
|
|
195
|
+
],
|
|
196
|
+
useFactory: (value$, destroy$, cdr) => (value$ || EMPTY).pipe(tuiWatch(cdr), takeUntil(destroy$)),
|
|
197
|
+
},
|
|
198
|
+
];
|
|
199
|
+
|
|
200
|
+
class TuiMobileCalendarComponent {
|
|
201
|
+
constructor(isIOS, isE2E, doc, destroy$, valueChanges, icons, closeWord$, cancelWord$, doneWord$, unorderedWeekDays$, chooseDayOrRangeTexts$, duration, ngZone) {
|
|
202
|
+
this.isIOS = isIOS;
|
|
203
|
+
this.isE2E = isE2E;
|
|
204
|
+
this.doc = doc;
|
|
205
|
+
this.destroy$ = destroy$;
|
|
206
|
+
this.icons = icons;
|
|
207
|
+
this.closeWord$ = closeWord$;
|
|
208
|
+
this.cancelWord$ = cancelWord$;
|
|
209
|
+
this.doneWord$ = doneWord$;
|
|
210
|
+
this.unorderedWeekDays$ = unorderedWeekDays$;
|
|
211
|
+
this.chooseDayOrRangeTexts$ = chooseDayOrRangeTexts$;
|
|
212
|
+
this.duration = duration;
|
|
213
|
+
this.ngZone = ngZone;
|
|
214
|
+
this.today = TuiDay.currentLocal();
|
|
215
|
+
this.activeYear = 0;
|
|
216
|
+
this.activeMonth = 0;
|
|
217
|
+
this.single = true;
|
|
218
|
+
this.multi = false;
|
|
219
|
+
this.min = TUI_FIRST_DAY;
|
|
220
|
+
this.max = TUI_LAST_DAY;
|
|
221
|
+
this.disabledItemHandler = ALWAYS_FALSE_HANDLER;
|
|
222
|
+
this.cancel = new EventEmitter();
|
|
223
|
+
this.confirm = new EventEmitter();
|
|
224
|
+
this.value = null;
|
|
225
|
+
this.years = Array.from({ length: RANGE }, (_, i) => i + STARTING_YEAR);
|
|
226
|
+
this.months = Array.from({ length: RANGE * 12 }, (_, i) => new TuiMonth(Math.floor(i / MONTHS_IN_YEAR) + STARTING_YEAR, i % MONTHS_IN_YEAR));
|
|
227
|
+
this.disabledItemHandlerMapper = (disabledItemHandler, min, max) => item => item.dayBefore(min) ||
|
|
228
|
+
(max !== null && item.dayAfter(max)) ||
|
|
229
|
+
disabledItemHandler(item);
|
|
230
|
+
valueChanges.pipe(takeUntil(this.destroy$)).subscribe(value => {
|
|
231
|
+
this.value = value;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
get yearWidth() {
|
|
235
|
+
return this.doc.documentElement.clientWidth / YEARS_IN_ROW;
|
|
236
|
+
}
|
|
237
|
+
ngAfterViewInit() {
|
|
238
|
+
this.activeYear = this.initialYear;
|
|
239
|
+
this.activeMonth = this.initialMonth;
|
|
240
|
+
// Virtual scroll has not yet rendered items even in ngAfterViewInit
|
|
241
|
+
this.waitScrolledChange();
|
|
242
|
+
}
|
|
243
|
+
onClose() {
|
|
244
|
+
this.cancel.emit();
|
|
245
|
+
}
|
|
246
|
+
onConfirm() {
|
|
247
|
+
if (this.value) {
|
|
248
|
+
this.confirm.emit(this.value);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
this.cancel.emit();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
onDayClick(day) {
|
|
255
|
+
if (this.single) {
|
|
256
|
+
this.value = day;
|
|
257
|
+
}
|
|
258
|
+
else if (this.isMultiValue(this.value)) {
|
|
259
|
+
this.value = tuiImmutableUpdateInputDateMulti(this.value, day);
|
|
260
|
+
}
|
|
261
|
+
else if (this.isSingleValue(this.value)) {
|
|
262
|
+
this.value = new TuiDayRange(day, day);
|
|
263
|
+
}
|
|
264
|
+
else if (this.value instanceof TuiDayRange) {
|
|
265
|
+
this.value = TuiDayRange.sort(this.value.from, day);
|
|
266
|
+
}
|
|
267
|
+
else if (!this.value) {
|
|
268
|
+
this.value = new TuiDayRange(day, day);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
getState(index) {
|
|
272
|
+
if (this.isYearActive(index)) {
|
|
273
|
+
return 'active';
|
|
274
|
+
}
|
|
275
|
+
if (this.isYearActive(index - 1) || this.isYearActive(index + 1)) {
|
|
276
|
+
return 'adjacent';
|
|
277
|
+
}
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
onMonthChange(month) {
|
|
281
|
+
// Skipping initial callback where index === 0
|
|
282
|
+
if (!month || this.activeMonth === month) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
this.activeMonth = month;
|
|
286
|
+
const activeYear = this.monthToYear(month);
|
|
287
|
+
if (activeYear === this.activeYear) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.activeYear = activeYear;
|
|
291
|
+
this.scrollToActiveYear();
|
|
292
|
+
}
|
|
293
|
+
setYear(year) {
|
|
294
|
+
if (this.activeYear === year) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
this.activeMonth += this.getMonthOffset(year);
|
|
298
|
+
this.activeYear = year;
|
|
299
|
+
this.scrollToActiveYear('smooth');
|
|
300
|
+
this.ngZone.runOutsideAngular(() => {
|
|
301
|
+
// Delay is required to run months scroll in the next frame to prevent flicker
|
|
302
|
+
setTimeout(() => this.scrollToActiveMonth());
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
isMultiValue(day) {
|
|
306
|
+
return !(day instanceof TuiDay) && !(day instanceof TuiDayRange) && this.multi;
|
|
307
|
+
}
|
|
308
|
+
isSingleValue(day) {
|
|
309
|
+
return day instanceof TuiDay || (day instanceof TuiDayRange && !day.isSingleDay);
|
|
310
|
+
}
|
|
311
|
+
get initialYear() {
|
|
312
|
+
var _a, _b, _c;
|
|
313
|
+
if (!this.value) {
|
|
314
|
+
return this.today.year;
|
|
315
|
+
}
|
|
316
|
+
if (this.value instanceof TuiDay) {
|
|
317
|
+
return this.value.year;
|
|
318
|
+
}
|
|
319
|
+
if (!(this.value instanceof TuiDayRange)) {
|
|
320
|
+
return (_c = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.year) !== null && _c !== void 0 ? _c : this.today.year;
|
|
321
|
+
}
|
|
322
|
+
return this.value.from.year;
|
|
323
|
+
}
|
|
324
|
+
get initialMonth() {
|
|
325
|
+
var _a, _b, _c, _d, _e, _f;
|
|
326
|
+
if (!this.value) {
|
|
327
|
+
return this.today.month + (this.today.year - STARTING_YEAR) * MONTHS_IN_YEAR;
|
|
328
|
+
}
|
|
329
|
+
if (this.value instanceof TuiDay) {
|
|
330
|
+
return this.value.month + (this.value.year - STARTING_YEAR) * MONTHS_IN_YEAR;
|
|
331
|
+
}
|
|
332
|
+
if (!(this.value instanceof TuiDayRange)) {
|
|
333
|
+
return (((_c = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.month) !== null && _c !== void 0 ? _c : this.today.month) +
|
|
334
|
+
(((_f = (_e = (_d = this.value) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.year) !== null && _f !== void 0 ? _f : this.today.year) - STARTING_YEAR) *
|
|
335
|
+
MONTHS_IN_YEAR);
|
|
336
|
+
}
|
|
337
|
+
return (this.value.from.month +
|
|
338
|
+
(this.value.from.year - STARTING_YEAR) * MONTHS_IN_YEAR);
|
|
339
|
+
}
|
|
340
|
+
getYearsViewportSize() {
|
|
341
|
+
var _a;
|
|
342
|
+
return ((_a = this.yearsScrollRef) === null || _a === void 0 ? void 0 : _a.getViewportSize()) || 0;
|
|
343
|
+
}
|
|
344
|
+
updateViewportDimension() {
|
|
345
|
+
var _a, _b;
|
|
346
|
+
(_a = this.yearsScrollRef) === null || _a === void 0 ? void 0 : _a.checkViewportSize();
|
|
347
|
+
(_b = this.monthsScrollRef) === null || _b === void 0 ? void 0 : _b.checkViewportSize();
|
|
348
|
+
}
|
|
349
|
+
lateInit() {
|
|
350
|
+
return this.getYearsViewportSize() > 0 ? identity : delay(200);
|
|
351
|
+
}
|
|
352
|
+
waitScrolledChange() {
|
|
353
|
+
var _a;
|
|
354
|
+
this.updateViewportDimension();
|
|
355
|
+
(_a = this.monthsScrollRef) === null || _a === void 0 ? void 0 : _a.scrolledIndexChange.pipe(delay(this.duration), this.lateInit(), take(1), takeUntil(this.destroy$)).subscribe(() => {
|
|
356
|
+
this.updateViewportDimension();
|
|
357
|
+
this.initYearScroll();
|
|
358
|
+
this.initMonthScroll();
|
|
359
|
+
this.scrollToActiveYear();
|
|
360
|
+
this.scrollToActiveMonth();
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
initYearScroll() {
|
|
364
|
+
const { yearsScrollRef } = this;
|
|
365
|
+
if (!yearsScrollRef) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const touchstart$ = tuiTypedFromEvent(yearsScrollRef.elementRef.nativeElement, 'touchstart', { passive: true });
|
|
369
|
+
const touchend$ = tuiTypedFromEvent(yearsScrollRef.elementRef.nativeElement, 'touchend', { passive: true });
|
|
370
|
+
const click$ = tuiTypedFromEvent(yearsScrollRef.elementRef.nativeElement, 'click');
|
|
371
|
+
// Refresh activeYear
|
|
372
|
+
yearsScrollRef
|
|
373
|
+
.elementScrolled()
|
|
374
|
+
.pipe(
|
|
375
|
+
// Ignore smooth scroll resulting from click on the exact year
|
|
376
|
+
windowToggle(touchstart$, () => click$), mergeMap(x => x),
|
|
377
|
+
// Delay is required to run months scroll in the next frame to prevent flicker
|
|
378
|
+
delay(0), map(() => Math.round(yearsScrollRef.measureScrollOffset() / this.yearWidth) +
|
|
379
|
+
Math.floor(YEARS_IN_ROW / 2) +
|
|
380
|
+
STARTING_YEAR), filter(activeYear => activeYear !== this.activeYear), takeUntil(this.destroy$))
|
|
381
|
+
.subscribe(activeYear => {
|
|
382
|
+
this.activeMonth += this.getMonthOffset(activeYear);
|
|
383
|
+
this.activeYear = activeYear;
|
|
384
|
+
this.scrollToActiveMonth();
|
|
385
|
+
});
|
|
386
|
+
// Smooth scroll to activeYear after scrolling is done
|
|
387
|
+
touchstart$
|
|
388
|
+
.pipe(switchMap(() => touchend$), switchMap(() => race(yearsScrollRef.elementScrolled(), timer(SCROLL_DEBOUNCE_TIME)).pipe(debounceTime(SCROLL_DEBOUNCE_TIME * 2), take(1), takeUntil(touchstart$))), takeUntil(this.destroy$))
|
|
389
|
+
.subscribe(() => this.scrollToActiveYear('smooth'));
|
|
390
|
+
}
|
|
391
|
+
initMonthScroll() {
|
|
392
|
+
const { monthsScrollRef } = this;
|
|
393
|
+
if (!monthsScrollRef) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
const touchstart$ = tuiTypedFromEvent(monthsScrollRef.elementRef.nativeElement, 'touchstart', { passive: true });
|
|
397
|
+
const touchend$ = tuiTypedFromEvent(monthsScrollRef.elementRef.nativeElement, 'touchend', { passive: true });
|
|
398
|
+
// Smooth scroll to the closest month after scrolling is done
|
|
399
|
+
touchstart$
|
|
400
|
+
.pipe(switchMap(() => touchend$), switchMap(() => race(monthsScrollRef.elementScrolled(), timer(SCROLL_DEBOUNCE_TIME)).pipe(debounceTime(SCROLL_DEBOUNCE_TIME * 2), take(1), takeUntil(touchstart$))), takeUntil(this.destroy$))
|
|
401
|
+
.subscribe(() => this.scrollToActiveMonth('smooth'));
|
|
402
|
+
}
|
|
403
|
+
scrollToActiveYear(behavior = 'auto') {
|
|
404
|
+
var _a;
|
|
405
|
+
(_a = this.yearsScrollRef) === null || _a === void 0 ? void 0 : _a.scrollToIndex(Math.max(this.activeYear - STARTING_YEAR - 2, 0), this.isE2E ? 'auto' : behavior);
|
|
406
|
+
}
|
|
407
|
+
scrollToActiveMonth(behavior = 'auto') {
|
|
408
|
+
var _a;
|
|
409
|
+
(_a = this.monthsScrollRef) === null || _a === void 0 ? void 0 : _a.scrollToIndex(this.activeMonth, this.isE2E ? 'auto' : behavior);
|
|
410
|
+
}
|
|
411
|
+
isYearActive(index) {
|
|
412
|
+
return index === this.activeYear;
|
|
413
|
+
}
|
|
414
|
+
monthToYear(month) {
|
|
415
|
+
return Math.ceil((month + 1) / MONTHS_IN_YEAR) + STARTING_YEAR - 1;
|
|
416
|
+
}
|
|
417
|
+
getMonthOffset(year) {
|
|
418
|
+
return (year - this.activeYear) * MONTHS_IN_YEAR;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
TuiMobileCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarComponent, deps: [{ token: TUI_IS_IOS }, { token: TUI_IS_E2E }, { token: DOCUMENT }, { token: TuiDestroyService, self: true }, { token: TUI_VALUE_STREAM }, { token: TUI_COMMON_ICONS }, { token: TUI_CLOSE_WORD }, { token: TUI_CANCEL_WORD }, { token: TUI_DONE_WORD }, { token: TUI_SHORT_WEEK_DAYS }, { token: TUI_CHOOSE_DAY_OR_RANGE_TEXTS }, { token: TUI_ANIMATIONS_DURATION }, { token: NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
422
|
+
TuiMobileCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: { single: "single", multi: "multi", min: "min", max: "max", disabledItemHandler: "disabledItemHandler" }, outputs: { cancel: "cancel", confirm: "confirm" }, host: { properties: { "class._ios": "isIOS" } }, providers: TUI_MOBILE_CALENDAR_PROVIDERS, viewQueries: [{ propertyName: "yearsScrollRef", first: true, predicate: ["yearsScrollRef"], descendants: true }, { propertyName: "monthsScrollRef", first: true, predicate: ["monthsScrollRef"], descendants: true }], ngImport: i0, template: "<header class=\"t-header\">\n <button\n appearance=\"\"\n automation-id=\"tui-mobile-calendar__cancel\"\n shape=\"rounded\"\n tuiIconButton\n tuiRipple\n type=\"button\"\n class=\"t-close\"\n [icon]=\"icons.close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClose()\"\n ></button>\n <button\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link t-link_close\"\n (click)=\"onClose()\"\n >\n {{ cancelWord$ | async }}\n </button>\n <h2\n *ngIf=\"chooseDayOrRangeTexts$ | async as texts\"\n automation-id=\"tui-mobile-calendar__label\"\n class=\"t-label\"\n >\n {{ single ? texts?.[0] : multi ? texts?.[2] : texts?.[1] }}\n </h2>\n <button\n automation-id=\"tui-mobile-calendar__confirm\"\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link\"\n (click)=\"onConfirm()\"\n >\n {{ doneWord$ | async }}\n </button>\n</header>\n<cdk-virtual-scroll-viewport\n #yearsScrollRef\n orientation=\"horizontal\"\n class=\"t-years\"\n [itemSize]=\"yearWidth\"\n>\n <div class=\"t-years-wrapper\">\n <button\n *cdkVirtualFor=\"let index of years\"\n type=\"button\"\n class=\"t-year\"\n [attr.data-state]=\"getState(index)\"\n (click)=\"setYear(index)\"\n >\n {{ index }}\n </button>\n </div>\n</cdk-virtual-scroll-viewport>\n<div class=\"t-week\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-day\"\n >\n {{ day }}\n </div>\n</div>\n<cdk-virtual-scroll-viewport\n #monthsScrollRef\n class=\"t-months\"\n (scrolledIndexChange)=\"onMonthChange($event)\"\n>\n <section\n *cdkVirtualFor=\"let month of months; templateCacheSize: 10\"\n class=\"t-month-wrapper\"\n >\n <h2 class=\"t-month\">{{ month | tuiMonth | async }}</h2>\n <tui-primitive-calendar-mobile\n class=\"t-calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : min : max\"\n [month]=\"month\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar-mobile>\n </section>\n</cdk-virtual-scroll-viewport>\n", styles: [":host{display:block;height:100%;font-family:-apple-system,BlinkMacSystemFont,Roboto,sans-serif;color:var(--tui-text-01);-webkit-tap-highlight-color:transparent}.t-header{position:relative;display:flex;align-items:center;height:3.5rem;padding:0 1rem;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-header{height:2.75rem;border-bottom:none}.t-close{width:1.5rem;height:1.5rem;margin-right:2rem}:host._ios .t-close{display:none}.t-link{margin-left:auto;flex-shrink:0;font-size:.875rem;line-height:1rem;font-weight:500;text-transform:uppercase;color:var(--tui-link)}.t-link_close{display:none}:host._ios .t-link{min-width:3.75rem;text-align:right;font-size:.9375rem;line-height:1.125rem;font-weight:400;letter-spacing:.018125rem;text-transform:none}:host._ios .t-link_close{display:block;margin:0 auto 0 0;text-align:left}.t-label{flex-grow:1;margin:0;font-size:1.25rem;line-height:3.5rem;font-weight:500;letter-spacing:-.0125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-label+.t-link{padding-left:1rem}:host._ios .t-label{font-size:1.0625rem;font-weight:600;letter-spacing:-.025625rem;text-align:center}.t-years{scrollbar-width:none;-ms-overflow-style:none;height:4.0625rem;background-color:var(--tui-base-01);box-shadow:0 .5px var(--tui-base-03)}.t-years::-webkit-scrollbar,.t-years::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._ios .t-years{background-color:transparent}.t-years-wrapper{display:flex;height:4.0625rem}.t-year{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;outline:none;width:20vw;flex-shrink:0;font-size:.9375rem;font-weight:700;letter-spacing:.015625rem;cursor:pointer;opacity:.1;transform:scale(.73);transition:color,opacity,transform .2s}.t-year[data-state=adjacent]{transform:scale(.86);opacity:.3}.t-year[data-state=active]{color:var(--tui-link);opacity:1;transform:scale(1)}.t-week{display:flex;align-items:center;height:1.875rem;width:20.75rem;max-width:100%;margin:0 auto;font-size:.75rem}:host._ios .t-week{width:22.625rem;font-size:.6875rem;font-weight:500;color:var(--tui-text-02)}.t-day{flex:1;text-align:center}.t-months{scrollbar-width:none;-ms-overflow-style:none;height:calc(100% - 9.5rem);box-shadow:0 -1px var(--tui-base-03);overflow-x:hidden}.t-months::-webkit-scrollbar,.t-months::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._ios .t-months{height:calc(100% - 8.75rem)}.t-month-wrapper{margin:.625rem 0 -.625rem}.t-month{height:2.75rem;line-height:2.75rem;padding-left:1rem;font-size:.875rem;font-weight:500;text-transform:uppercase;margin:0 0 1.25rem;box-sizing:border-box;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-month{height:3.125rem;margin:0;border-bottom:none;text-transform:none;font-size:1.375rem;line-height:3.125rem;letter-spacing:.02rem;font-weight:700}.t-calendar{margin:0 auto;font-family:inherit;font-size:1.125rem;transition:opacity .2s}:host._ios .t-calendar{font-size:1.0625rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i3.TuiTouchableDirective, selector: "[tuiTouchable]", inputs: ["tuiTouchable"] }, { kind: "directive", type: i4.TuiRippleDirective, selector: "[tuiRipple]", inputs: ["tuiRipple"] }, { kind: "component", type: i5.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { kind: "component", type: i6.TuiPrimitiveCalendarMobileComponent, selector: "tui-primitive-calendar-mobile" }, { kind: "component", type: i5.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.TuiMapperPipe, name: "tuiMapper" }, { kind: "pipe", type: i5.TuiMonthPipe, name: "tuiMonth" }, { kind: "pipe", type: i5.TuiOrderWeekDaysPipe, name: "tuiOrderWeekDays" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarComponent, decorators: [{
|
|
424
|
+
type: Component,
|
|
425
|
+
args: [{ selector: 'tui-mobile-calendar', changeDetection: ChangeDetectionStrategy.OnPush, providers: TUI_MOBILE_CALENDAR_PROVIDERS, host: { '[class._ios]': 'isIOS' }, template: "<header class=\"t-header\">\n <button\n appearance=\"\"\n automation-id=\"tui-mobile-calendar__cancel\"\n shape=\"rounded\"\n tuiIconButton\n tuiRipple\n type=\"button\"\n class=\"t-close\"\n [icon]=\"icons.close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClose()\"\n ></button>\n <button\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link t-link_close\"\n (click)=\"onClose()\"\n >\n {{ cancelWord$ | async }}\n </button>\n <h2\n *ngIf=\"chooseDayOrRangeTexts$ | async as texts\"\n automation-id=\"tui-mobile-calendar__label\"\n class=\"t-label\"\n >\n {{ single ? texts?.[0] : multi ? texts?.[2] : texts?.[1] }}\n </h2>\n <button\n automation-id=\"tui-mobile-calendar__confirm\"\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link\"\n (click)=\"onConfirm()\"\n >\n {{ doneWord$ | async }}\n </button>\n</header>\n<cdk-virtual-scroll-viewport\n #yearsScrollRef\n orientation=\"horizontal\"\n class=\"t-years\"\n [itemSize]=\"yearWidth\"\n>\n <div class=\"t-years-wrapper\">\n <button\n *cdkVirtualFor=\"let index of years\"\n type=\"button\"\n class=\"t-year\"\n [attr.data-state]=\"getState(index)\"\n (click)=\"setYear(index)\"\n >\n {{ index }}\n </button>\n </div>\n</cdk-virtual-scroll-viewport>\n<div class=\"t-week\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-day\"\n >\n {{ day }}\n </div>\n</div>\n<cdk-virtual-scroll-viewport\n #monthsScrollRef\n class=\"t-months\"\n (scrolledIndexChange)=\"onMonthChange($event)\"\n>\n <section\n *cdkVirtualFor=\"let month of months; templateCacheSize: 10\"\n class=\"t-month-wrapper\"\n >\n <h2 class=\"t-month\">{{ month | tuiMonth | async }}</h2>\n <tui-primitive-calendar-mobile\n class=\"t-calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : min : max\"\n [month]=\"month\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar-mobile>\n </section>\n</cdk-virtual-scroll-viewport>\n", styles: [":host{display:block;height:100%;font-family:-apple-system,BlinkMacSystemFont,Roboto,sans-serif;color:var(--tui-text-01);-webkit-tap-highlight-color:transparent}.t-header{position:relative;display:flex;align-items:center;height:3.5rem;padding:0 1rem;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-header{height:2.75rem;border-bottom:none}.t-close{width:1.5rem;height:1.5rem;margin-right:2rem}:host._ios .t-close{display:none}.t-link{margin-left:auto;flex-shrink:0;font-size:.875rem;line-height:1rem;font-weight:500;text-transform:uppercase;color:var(--tui-link)}.t-link_close{display:none}:host._ios .t-link{min-width:3.75rem;text-align:right;font-size:.9375rem;line-height:1.125rem;font-weight:400;letter-spacing:.018125rem;text-transform:none}:host._ios .t-link_close{display:block;margin:0 auto 0 0;text-align:left}.t-label{flex-grow:1;margin:0;font-size:1.25rem;line-height:3.5rem;font-weight:500;letter-spacing:-.0125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-label+.t-link{padding-left:1rem}:host._ios .t-label{font-size:1.0625rem;font-weight:600;letter-spacing:-.025625rem;text-align:center}.t-years{scrollbar-width:none;-ms-overflow-style:none;height:4.0625rem;background-color:var(--tui-base-01);box-shadow:0 .5px var(--tui-base-03)}.t-years::-webkit-scrollbar,.t-years::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._ios .t-years{background-color:transparent}.t-years-wrapper{display:flex;height:4.0625rem}.t-year{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;outline:none;width:20vw;flex-shrink:0;font-size:.9375rem;font-weight:700;letter-spacing:.015625rem;cursor:pointer;opacity:.1;transform:scale(.73);transition:color,opacity,transform .2s}.t-year[data-state=adjacent]{transform:scale(.86);opacity:.3}.t-year[data-state=active]{color:var(--tui-link);opacity:1;transform:scale(1)}.t-week{display:flex;align-items:center;height:1.875rem;width:20.75rem;max-width:100%;margin:0 auto;font-size:.75rem}:host._ios .t-week{width:22.625rem;font-size:.6875rem;font-weight:500;color:var(--tui-text-02)}.t-day{flex:1;text-align:center}.t-months{scrollbar-width:none;-ms-overflow-style:none;height:calc(100% - 9.5rem);box-shadow:0 -1px var(--tui-base-03);overflow-x:hidden}.t-months::-webkit-scrollbar,.t-months::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._ios .t-months{height:calc(100% - 8.75rem)}.t-month-wrapper{margin:.625rem 0 -.625rem}.t-month{height:2.75rem;line-height:2.75rem;padding-left:1rem;font-size:.875rem;font-weight:500;text-transform:uppercase;margin:0 0 1.25rem;box-sizing:border-box;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-month{height:3.125rem;margin:0;border-bottom:none;text-transform:none;font-size:1.375rem;line-height:3.125rem;letter-spacing:.02rem;font-weight:700}.t-calendar{margin:0 auto;font-family:inherit;font-size:1.125rem;transition:opacity .2s}:host._ios .t-calendar{font-size:1.0625rem}\n"] }]
|
|
426
|
+
}], ctorParameters: function () {
|
|
427
|
+
return [{ type: undefined, decorators: [{
|
|
428
|
+
type: Inject,
|
|
429
|
+
args: [TUI_IS_IOS]
|
|
430
|
+
}] }, { type: undefined, decorators: [{
|
|
431
|
+
type: Inject,
|
|
432
|
+
args: [TUI_IS_E2E]
|
|
433
|
+
}] }, { type: Document, decorators: [{
|
|
434
|
+
type: Inject,
|
|
435
|
+
args: [DOCUMENT]
|
|
436
|
+
}] }, { type: i7.TuiDestroyService, decorators: [{
|
|
437
|
+
type: Self
|
|
438
|
+
}, {
|
|
439
|
+
type: Inject,
|
|
440
|
+
args: [TuiDestroyService]
|
|
441
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
442
|
+
type: Inject,
|
|
443
|
+
args: [TUI_VALUE_STREAM]
|
|
444
|
+
}] }, { type: undefined, decorators: [{
|
|
445
|
+
type: Inject,
|
|
446
|
+
args: [TUI_COMMON_ICONS]
|
|
447
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
448
|
+
type: Inject,
|
|
449
|
+
args: [TUI_CLOSE_WORD]
|
|
450
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
451
|
+
type: Inject,
|
|
452
|
+
args: [TUI_CANCEL_WORD]
|
|
453
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
454
|
+
type: Inject,
|
|
455
|
+
args: [TUI_DONE_WORD]
|
|
456
|
+
}] }, { type: undefined, decorators: [{
|
|
457
|
+
type: Inject,
|
|
458
|
+
args: [TUI_SHORT_WEEK_DAYS]
|
|
459
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
460
|
+
type: Inject,
|
|
461
|
+
args: [TUI_CHOOSE_DAY_OR_RANGE_TEXTS]
|
|
462
|
+
}] }, { type: undefined, decorators: [{
|
|
463
|
+
type: Inject,
|
|
464
|
+
args: [TUI_ANIMATIONS_DURATION]
|
|
465
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
466
|
+
type: Inject,
|
|
467
|
+
args: [NgZone]
|
|
468
|
+
}] }];
|
|
469
|
+
}, propDecorators: { yearsScrollRef: [{
|
|
470
|
+
type: ViewChild,
|
|
471
|
+
args: ['yearsScrollRef']
|
|
472
|
+
}], monthsScrollRef: [{
|
|
473
|
+
type: ViewChild,
|
|
474
|
+
args: ['monthsScrollRef']
|
|
475
|
+
}], single: [{
|
|
476
|
+
type: Input
|
|
477
|
+
}], multi: [{
|
|
478
|
+
type: Input
|
|
479
|
+
}], min: [{
|
|
480
|
+
type: Input
|
|
481
|
+
}], max: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], disabledItemHandler: [{
|
|
484
|
+
type: Input
|
|
485
|
+
}], cancel: [{
|
|
486
|
+
type: Output
|
|
487
|
+
}], confirm: [{
|
|
488
|
+
type: Output
|
|
489
|
+
}] } });
|
|
490
|
+
|
|
491
|
+
class TuiMobileCalendarModule {
|
|
492
|
+
}
|
|
493
|
+
TuiMobileCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
494
|
+
TuiMobileCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarModule, declarations: [TuiMobileCalendarComponent], imports: [CommonModule,
|
|
495
|
+
ScrollingModule,
|
|
496
|
+
TuiTouchableModule,
|
|
497
|
+
TuiRippleModule,
|
|
498
|
+
TuiMapperPipeModule,
|
|
499
|
+
TuiLinkModule,
|
|
500
|
+
TuiPrimitiveCalendarMobileModule,
|
|
501
|
+
TuiButtonModule,
|
|
502
|
+
TuiMonthPipeModule,
|
|
503
|
+
TuiOrderWeekDaysPipeModule], exports: [TuiMobileCalendarComponent] });
|
|
504
|
+
TuiMobileCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarModule, imports: [CommonModule,
|
|
505
|
+
ScrollingModule,
|
|
506
|
+
TuiTouchableModule,
|
|
507
|
+
TuiRippleModule,
|
|
508
|
+
TuiMapperPipeModule,
|
|
509
|
+
TuiLinkModule,
|
|
510
|
+
TuiPrimitiveCalendarMobileModule,
|
|
511
|
+
TuiButtonModule,
|
|
512
|
+
TuiMonthPipeModule,
|
|
513
|
+
TuiOrderWeekDaysPipeModule] });
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TuiMobileCalendarModule, decorators: [{
|
|
515
|
+
type: NgModule,
|
|
516
|
+
args: [{
|
|
517
|
+
imports: [
|
|
518
|
+
CommonModule,
|
|
519
|
+
ScrollingModule,
|
|
520
|
+
TuiTouchableModule,
|
|
521
|
+
TuiRippleModule,
|
|
522
|
+
TuiMapperPipeModule,
|
|
523
|
+
TuiLinkModule,
|
|
524
|
+
TuiPrimitiveCalendarMobileModule,
|
|
525
|
+
TuiButtonModule,
|
|
526
|
+
TuiMonthPipeModule,
|
|
527
|
+
TuiOrderWeekDaysPipeModule,
|
|
528
|
+
],
|
|
529
|
+
declarations: [TuiMobileCalendarComponent],
|
|
530
|
+
exports: [TuiMobileCalendarComponent],
|
|
531
|
+
}]
|
|
532
|
+
}] });
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Generated bundle index. Do not edit.
|
|
536
|
+
*/
|
|
537
|
+
|
|
538
|
+
export { ANDROID_CYCLE, ANDROID_LABEL, ANDROID_WEEK, BUFFER, IOS_CYCLE, IOS_LABEL, IOS_WEEK, RANGE, SCROLL_DEBOUNCE_TIME, STARTING_YEAR, TUI_MOBILE_CALENDAR_PROVIDERS, TUI_VALUE_STREAM, TuiMobileCalendarComponent, TuiMobileCalendarModule, TuiMobileCalendarStrategy, YEARLY_CYCLE, YEARS_IN_ROW };
|
|
539
|
+
//# sourceMappingURL=taiga-ui-addon-mobile-components-mobile-calendar.mjs.map
|