framework7 6.3.15 → 7.0.0-beta.11
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/accordion/accordion.js +132 -1
- package/components/accordion/accordion.lazy.js +1 -0
- package/components/actions/actions-class.js +370 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -0
- package/components/actions/actions.js +43 -1
- package/components/actions/actions.lazy.js +1 -0
- package/components/actions/actions.less +3 -0
- package/components/app/app-class.d.ts +10 -10
- package/{esm/components → components}/app/app-class.js +119 -152
- package/components/app/app.less +3 -3
- package/{esm/components → components}/app/load-module.js +34 -34
- package/components/appbar/appbar.js +3 -1
- package/components/appbar/appbar.lazy.js +1 -0
- package/components/area-chart/area-chart-class.js +507 -0
- package/components/area-chart/area-chart-rtl.css +1 -1
- package/components/area-chart/area-chart.css +1 -1
- package/components/area-chart/area-chart.js +47 -1
- package/components/area-chart/area-chart.lazy.js +1 -0
- package/{esm/components → components}/autocomplete/autocomplete-class.js +246 -258
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.js +86 -1
- package/components/autocomplete/autocomplete.lazy.js +1 -0
- package/{esm/components → components}/badge/badge.js +0 -0
- package/{esm/components → components}/block/block.js +0 -0
- package/components/breadcrumbs/breadcrumbs-aurora.less +2 -0
- package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
- package/components/breadcrumbs/breadcrumbs-md.less +2 -0
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
- package/components/breadcrumbs/breadcrumbs-vars.less +36 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +13 -0
- package/components/breadcrumbs/breadcrumbs.lazy.js +1 -0
- package/components/breadcrumbs/breadcrumbs.less +100 -0
- package/{esm/components → components}/button/button.js +0 -0
- package/{esm/components → components}/calendar/calendar-class.js +828 -728
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +6 -10
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.d.ts +2 -0
- package/components/calendar/calendar.js +112 -1
- package/components/calendar/calendar.lazy.js +1 -0
- package/components/calendar/calendar.less +20 -16
- package/components/card/card-rtl.css +1 -1
- package/components/card/card.css +1 -1
- package/components/card/card.js +592 -1
- package/components/card/card.lazy.js +1 -0
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.js +3 -1
- package/components/checkbox/checkbox.lazy.js +1 -0
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.js +3 -1
- package/components/chip/chip.lazy.js +1 -0
- package/{esm/components → components}/color-picker/color-picker-class.js +354 -367
- package/components/color-picker/color-picker-rtl.css +1 -1
- package/components/color-picker/color-picker.css +1 -1
- package/components/color-picker/color-picker.js +92 -1
- package/components/color-picker/color-picker.lazy.js +1 -0
- package/{esm/components → components}/color-picker/modules/alpha-slider.js +31 -20
- package/{esm/components → components}/color-picker/modules/brightness-slider.js +37 -26
- package/{esm/components → components}/color-picker/modules/current-color.js +5 -3
- package/{esm/components → components}/color-picker/modules/hex.js +28 -17
- package/{esm/components → components}/color-picker/modules/hs-spectrum.js +41 -29
- package/{esm/components → components}/color-picker/modules/hsb-sliders.js +57 -44
- package/{esm/components → components}/color-picker/modules/hue-slider.js +30 -19
- package/{esm/components → components}/color-picker/modules/initial-current-colors.js +15 -10
- package/{esm/components → components}/color-picker/modules/palette.js +16 -13
- package/{esm/components → components}/color-picker/modules/rgb-bars.js +44 -31
- package/{esm/components → components}/color-picker/modules/rgb-sliders.js +49 -36
- package/{esm/components → components}/color-picker/modules/sb-spectrum.js +41 -29
- package/{esm/components → components}/color-picker/modules/wheel.js +62 -50
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.js +3 -1
- package/components/contacts-list/contacts-list.lazy.js +1 -0
- package/{esm/components → components}/data-table/data-table-class.js +43 -62
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +72 -1
- package/components/data-table/data-table.lazy.js +1 -0
- package/{esm/components → components}/dialog/dialog-class.js +63 -72
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.js +254 -1
- package/components/dialog/dialog.lazy.js +1 -0
- package/components/elevation/elevation.js +3 -1
- package/components/elevation/elevation.lazy.js +1 -0
- package/components/fab/fab.js +181 -1
- package/components/fab/fab.lazy.js +1 -0
- package/components/form/form.js +347 -1
- package/components/form/form.lazy.js +1 -0
- package/components/gauge/gauge-class.js +306 -0
- package/components/gauge/gauge.js +99 -1
- package/components/gauge/gauge.lazy.js +1 -0
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.js +227 -1
- package/components/grid/grid.lazy.js +1 -0
- package/{esm/components → components}/icon/icon.js +0 -0
- package/components/infinite-scroll/infinite-scroll.js +110 -1
- package/components/infinite-scroll/infinite-scroll.lazy.js +1 -0
- package/components/input/input-rtl.css +1 -1
- package/components/input/input.css +1 -1
- package/components/input/input.js +394 -1
- package/components/input/input.lazy.js +1 -0
- package/components/input/input.less +1 -1
- package/components/lazy/lazy.js +283 -1
- package/components/lazy/lazy.lazy.js +1 -0
- package/{esm/components → components}/link/link.js +0 -0
- package/{esm/components → components}/list/list.js +0 -0
- package/{esm/components → components}/list-index/list-index-class.js +118 -126
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.d.ts +1 -1
- package/components/list-index/list-index.js +73 -1
- package/components/list-index/list-index.lazy.js +1 -0
- package/components/login-screen/login-screen-class.js +43 -0
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +28 -1
- package/components/login-screen/login-screen.lazy.js +1 -0
- package/components/login-screen/login-screen.less +1 -1
- package/components/menu/menu.js +79 -1
- package/components/menu/menu.lazy.js +1 -0
- package/{esm/components → components}/messagebar/messagebar-class.js +128 -156
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +74 -1
- package/components/messagebar/messagebar.lazy.js +1 -0
- package/{esm/components → components}/messages/messages-class.js +166 -246
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +73 -1
- package/components/messages/messages.lazy.js +1 -0
- package/components/modal/custom-modal-class.js +76 -0
- package/{esm/components → components}/modal/modal-class.js +81 -86
- package/components/modal/modal.js +25 -0
- package/{esm/components → components}/navbar/navbar.js +169 -174
- package/components/notification/notification-aurora.less +1 -1
- package/{esm/components → components}/notification/notification-class.js +69 -82
- package/components/notification/notification-ios.less +1 -1
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.d.ts +4 -4
- package/components/notification/notification.js +35 -1
- package/components/notification/notification.lazy.js +1 -0
- package/components/page/page-vars.less +1 -1
- package/{esm/components → components}/page/page.js +0 -0
- package/{esm/components → components}/panel/panel-class.js +189 -220
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.js +190 -1
- package/components/panel/panel.lazy.js +1 -0
- package/{esm/components → components}/panel/resizable-panel.js +33 -31
- package/{esm/components → components}/panel/swipe-panel.js +48 -46
- package/{esm/components → components}/photo-browser/photo-browser-class.js +210 -238
- package/components/photo-browser/photo-browser.js +73 -1
- package/components/photo-browser/photo-browser.lazy.js +1 -0
- package/{esm/components → components}/picker/picker-class.js +244 -244
- package/components/picker/picker-column.js +141 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.d.ts +2 -13
- package/components/picker/picker.js +59 -1
- package/components/picker/picker.lazy.js +1 -0
- package/components/picker/picker.less +28 -10
- package/components/pie-chart/pie-chart-class.js +264 -0
- package/components/pie-chart/pie-chart.js +35 -1
- package/components/pie-chart/pie-chart.lazy.js +1 -0
- package/{esm/components → components}/popover/popover-class.js +92 -104
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +77 -1
- package/components/popover/popover.lazy.js +1 -0
- package/components/popover/popover.less +3 -0
- package/{esm/components → components}/popup/popup-class.js +78 -88
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.d.ts +4 -0
- package/components/popup/popup.js +42 -1
- package/components/popup/popup.lazy.js +1 -0
- package/components/popup/popup.less +24 -21
- package/components/preloader/preloader.js +115 -1
- package/components/preloader/preloader.lazy.js +1 -0
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +166 -1
- package/components/progressbar/progressbar.lazy.js +1 -0
- package/{esm/components → components}/pull-to-refresh/pull-to-refresh-class.js +107 -124
- package/components/pull-to-refresh/pull-to-refresh.js +70 -1
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -0
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.js +3 -1
- package/components/radio/radio.lazy.js +1 -0
- package/{esm/components → components}/range/range-class.js +196 -197
- package/components/range/range-rtl.css +1 -1
- package/components/range/range.css +1 -1
- package/components/range/range.js +79 -1
- package/components/range/range.lazy.js +1 -0
- package/components/searchbar/remove-diacritics.js +275 -0
- package/{esm/components → components}/searchbar/searchbar-class.js +135 -152
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.js +121 -1
- package/components/searchbar/searchbar.lazy.js +1 -0
- package/components/searchbar/searchbar.less +1 -1
- package/{esm/components → components}/sheet/sheet-class.js +99 -113
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.d.ts +2 -0
- package/components/sheet/sheet.js +69 -1
- package/components/sheet/sheet.lazy.js +1 -0
- package/components/sheet/sheet.less +19 -16
- package/components/skeleton/skeleton-rtl.css +1 -1
- package/components/skeleton/skeleton-vars.less +1 -1
- package/components/skeleton/skeleton.css +1 -1
- package/components/skeleton/skeleton.js +3 -1
- package/components/skeleton/skeleton.lazy.js +1 -0
- package/components/skeleton/skeleton.less +1 -1
- package/{esm/components → components}/smart-select/smart-select-class.js +288 -300
- package/components/smart-select/smart-select.js +149 -1
- package/components/smart-select/smart-select.lazy.js +1 -0
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +306 -1
- package/components/sortable/sortable.lazy.js +1 -0
- package/{esm/components → components}/statusbar/statusbar.js +51 -44
- package/{esm/components → components}/stepper/stepper-class.js +108 -119
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +86 -1
- package/components/stepper/stepper.lazy.js +1 -0
- package/{esm/components → components}/subnavbar/subnavbar.js +4 -3
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +597 -1
- package/components/swipeout/swipeout.lazy.js +1 -0
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +191 -1
- package/components/swiper/swiper.lazy.js +1 -0
- package/components/swiper/swiper.less +1 -1
- package/components/tabs/tabs.js +271 -1
- package/components/tabs/tabs.lazy.js +1 -0
- package/{esm/components → components}/text-editor/text-editor-class.js +174 -186
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +89 -1
- package/components/text-editor/text-editor.lazy.js +1 -0
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.js +3 -1
- package/components/timeline/timeline.lazy.js +1 -0
- package/components/toast/toast-class.js +119 -0
- package/components/toast/toast.d.ts +2 -2
- package/components/toast/toast.js +43 -1
- package/components/toast/toast.lazy.js +1 -0
- package/{esm/components → components}/toggle/toggle-class.js +51 -68
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +65 -1
- package/components/toggle/toggle.lazy.js +1 -0
- package/{esm/components → components}/toolbar/toolbar.js +65 -61
- package/{esm/components → components}/tooltip/tooltip-class.js +100 -111
- package/components/tooltip/tooltip.js +144 -1
- package/components/tooltip/tooltip.lazy.js +1 -0
- package/components/touch-ripple/touch-ripple-class.js +98 -0
- package/components/touch-ripple/touch-ripple-vars.less +1 -1
- package/components/touch-ripple/touch-ripple.js +18 -0
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +83 -1
- package/components/treeview/treeview.lazy.js +1 -0
- package/components/typography/typography.js +3 -1
- package/components/typography/typography.lazy.js +1 -0
- package/{esm/components → components}/view/resizable-view.js +26 -24
- package/{esm/components → components}/view/view-class.js +54 -73
- package/components/view/view.d.ts +2 -0
- package/{esm/components → components}/view/view.js +41 -31
- package/{esm/components → components}/virtual-list/virtual-list-class.js +158 -175
- package/components/virtual-list/virtual-list.js +19 -1
- package/components/virtual-list/virtual-list.lazy.js +1 -0
- package/framework7-bundle-rtl.css +544 -1021
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +544 -1021
- package/framework7-bundle.esm.js +99 -0
- package/framework7-bundle.js +31544 -32007
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +3 -2
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +92 -0
- package/framework7-lite.esm.js +39 -0
- package/framework7-rtl.css +52 -56
- package/framework7-rtl.min.css +3 -3
- package/{types/types.d.ts → framework7-types.d.ts} +5 -1
- package/framework7.css +52 -56
- package/framework7.d.ts +85 -81
- package/framework7.esm.js +43 -0
- package/framework7.js +3405 -4062
- package/framework7.js.map +1 -1
- package/framework7.less +2 -2
- package/framework7.min.css +3 -3
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +2 -2
- package/{esm/modules → modules}/clicks/clicks.js +19 -18
- package/modules/component/$h.js +14 -0
- package/modules/component/$jsx.js +18 -0
- package/modules/component/component-class.js +382 -0
- package/modules/component/component.js +50 -0
- package/{esm/modules → modules}/component/custom-components.js +0 -0
- package/{esm/modules → modules}/component/eventslisteners.js +15 -19
- package/modules/component/parse-component.js +80 -0
- package/modules/component/patch.js +8 -0
- package/{esm/modules → modules}/component/snabbdom/h.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/helpers/attachto.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/hooks.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/htmldomapi.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/is.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/attributes.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/class.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/dataset.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/eventlisteners.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/hero.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/modules/module.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/props.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/style.js +1 -1
- package/modules/component/snabbdom/snabbdom.bundle.js +19 -0
- package/{esm/modules → modules}/component/snabbdom/snabbdom.js +9 -21
- package/{esm/modules → modules}/component/snabbdom/thunk.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/tovnode.js +2 -2
- package/{esm/modules → modules}/component/snabbdom/vnode.js +0 -0
- package/{esm/modules → modules}/component/vdom.js +110 -134
- package/{esm/modules → modules}/demo-module.js +15 -7
- package/{esm/modules → modules}/device/device.js +13 -12
- package/{esm/modules → modules}/history/history.js +3 -2
- package/{esm/modules → modules}/request/request.js +3 -3
- package/modules/resize/resize.js +65 -0
- package/{esm/modules → modules}/router/app-router-check.js +1 -1
- package/{esm/modules → modules}/router/async-component.js +3 -3
- package/{esm/modules → modules}/router/back.js +135 -125
- package/{esm/modules → modules}/router/clear-previous-history.js +10 -10
- package/modules/router/component-loader.js +174 -0
- package/{esm/modules → modules}/router/modal.js +53 -53
- package/{esm/modules → modules}/router/navigate.js +147 -228
- package/{esm/modules → modules}/router/process-route-queue.js +20 -17
- package/{esm/modules → modules}/router/redirect.js +8 -12
- package/{esm/modules → modules}/router/router-class.js +423 -444
- package/{esm/modules → modules}/router/router.js +6 -4
- package/{esm/modules → modules}/router/swipe-back.js +148 -182
- package/{esm/modules → modules}/router/tab.js +52 -52
- package/{esm/modules → modules}/service-worker/service-worker.js +42 -38
- package/modules/store/create-store.js +149 -0
- package/modules/store/store.js +11 -0
- package/modules/support/support.js +7 -0
- package/{esm/modules → modules}/touch/touch.js +75 -74
- package/modules/utils/utils.js +10 -0
- package/package.json +256 -11
- package/shared/$jsx.js +22 -0
- package/shared/class.js +143 -0
- package/shared/constructor-methods.js +42 -0
- package/{esm/shared → shared}/dom7.js +2 -1
- package/shared/events-class.js +100 -0
- package/{types/shared → shared}/get-device.d.ts +0 -0
- package/{esm/shared → shared}/get-device.js +33 -38
- package/{types/shared → shared}/get-support.d.ts +0 -0
- package/{esm/shared → shared}/get-support.js +7 -6
- package/{esm/shared → shared}/history.js +63 -49
- package/shared/modal-methods.js +90 -0
- package/{types/shared → shared}/request.d.ts +0 -0
- package/shared/request.js +474 -0
- package/{types/shared → shared}/utils.d.ts +0 -0
- package/{esm/shared → shared}/utils.js +125 -162
- package/bundle/package.json +0 -8
- package/cjs/components/accordion/accordion.js +0 -136
- package/cjs/components/actions/actions-class.js +0 -383
- package/cjs/components/actions/actions.js +0 -58
- package/cjs/components/app/app-class.js +0 -378
- package/cjs/components/app/load-module.js +0 -155
- package/cjs/components/appbar/appbar.js +0 -8
- package/cjs/components/area-chart/area-chart-class.js +0 -526
- package/cjs/components/area-chart/area-chart.js +0 -56
- package/cjs/components/autocomplete/autocomplete-class.js +0 -975
- package/cjs/components/autocomplete/autocomplete.js +0 -93
- package/cjs/components/badge/badge.js +0 -8
- package/cjs/components/block/block.js +0 -8
- package/cjs/components/button/button.js +0 -8
- package/cjs/components/calendar/calendar-class.js +0 -2095
- package/cjs/components/calendar/calendar.js +0 -124
- package/cjs/components/card/card.js +0 -625
- package/cjs/components/checkbox/checkbox.js +0 -8
- package/cjs/components/chip/chip.js +0 -8
- package/cjs/components/color-picker/color-picker-class.js +0 -1022
- package/cjs/components/color-picker/color-picker.js +0 -105
- package/cjs/components/color-picker/modules/alpha-slider.js +0 -101
- package/cjs/components/color-picker/modules/brightness-slider.js +0 -86
- package/cjs/components/color-picker/modules/current-color.js +0 -23
- package/cjs/components/color-picker/modules/hex.js +0 -81
- package/cjs/components/color-picker/modules/hs-spectrum.js +0 -137
- package/cjs/components/color-picker/modules/hsb-sliders.js +0 -206
- package/cjs/components/color-picker/modules/hue-slider.js +0 -78
- package/cjs/components/color-picker/modules/initial-current-colors.js +0 -54
- package/cjs/components/color-picker/modules/palette.js +0 -61
- package/cjs/components/color-picker/modules/rgb-bars.js +0 -196
- package/cjs/components/color-picker/modules/rgb-sliders.js +0 -198
- package/cjs/components/color-picker/modules/sb-spectrum.js +0 -137
- package/cjs/components/color-picker/modules/wheel.js +0 -198
- package/cjs/components/contacts-list/contacts-list.js +0 -8
- package/cjs/components/data-table/data-table-class.js +0 -188
- package/cjs/components/data-table/data-table.js +0 -75
- package/cjs/components/dialog/dialog-class.js +0 -250
- package/cjs/components/dialog/dialog.js +0 -297
- package/cjs/components/elevation/elevation.js +0 -8
- package/cjs/components/fab/fab.js +0 -195
- package/cjs/components/form/form.js +0 -341
- package/cjs/components/gauge/gauge-class.js +0 -332
- package/cjs/components/gauge/gauge.js +0 -103
- package/cjs/components/grid/grid.js +0 -233
- package/cjs/components/icon/icon.js +0 -8
- package/cjs/components/infinite-scroll/infinite-scroll.js +0 -111
- package/cjs/components/input/input.js +0 -396
- package/cjs/components/lazy/lazy.js +0 -283
- package/cjs/components/link/link.js +0 -8
- package/cjs/components/list/list.js +0 -8
- package/cjs/components/list-index/list-index-class.js +0 -405
- package/cjs/components/list-index/list-index.js +0 -77
- package/cjs/components/login-screen/login-screen-class.js +0 -68
- package/cjs/components/login-screen/login-screen.js +0 -44
- package/cjs/components/menu/menu.js +0 -92
- package/cjs/components/messagebar/messagebar-class.js +0 -446
- package/cjs/components/messagebar/messagebar.js +0 -78
- package/cjs/components/messages/messages-class.js +0 -633
- package/cjs/components/messages/messages.js +0 -76
- package/cjs/components/modal/custom-modal-class.js +0 -99
- package/cjs/components/modal/modal-class.js +0 -277
- package/cjs/components/modal/modal.js +0 -32
- package/cjs/components/navbar/navbar.js +0 -833
- package/cjs/components/notification/notification-class.js +0 -269
- package/cjs/components/notification/notification.js +0 -44
- package/cjs/components/page/page.js +0 -8
- package/cjs/components/panel/panel-class.js +0 -660
- package/cjs/components/panel/panel.js +0 -219
- package/cjs/components/panel/resizable-panel.js +0 -197
- package/cjs/components/panel/swipe-panel.js +0 -363
- package/cjs/components/photo-browser/photo-browser-class.js +0 -781
- package/cjs/components/photo-browser/photo-browser.js +0 -78
- package/cjs/components/picker/picker-class.js +0 -704
- package/cjs/components/picker/picker-column.js +0 -389
- package/cjs/components/picker/picker.js +0 -77
- package/cjs/components/pie-chart/pie-chart-class.js +0 -290
- package/cjs/components/pie-chart/pie-chart.js +0 -44
- package/cjs/components/popover/popover-class.js +0 -365
- package/cjs/components/popover/popover.js +0 -93
- package/cjs/components/popup/popup-class.js +0 -416
- package/cjs/components/popup/popup.js +0 -57
- package/cjs/components/preloader/preloader.js +0 -111
- package/cjs/components/progressbar/progressbar.js +0 -185
- package/cjs/components/pull-to-refresh/pull-to-refresh-class.js +0 -627
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +0 -74
- package/cjs/components/radio/radio.js +0 -8
- package/cjs/components/range/range-class.js +0 -674
- package/cjs/components/range/range.js +0 -93
- package/cjs/components/searchbar/remove-diacritics.js +0 -283
- package/cjs/components/searchbar/searchbar-class.js +0 -739
- package/cjs/components/searchbar/searchbar.js +0 -141
- package/cjs/components/sheet/sheet-class.js +0 -593
- package/cjs/components/sheet/sheet.js +0 -83
- package/cjs/components/skeleton/skeleton.js +0 -8
- package/cjs/components/smart-select/smart-select-class.js +0 -1005
- package/cjs/components/smart-select/smart-select.js +0 -151
- package/cjs/components/sortable/sortable.js +0 -335
- package/cjs/components/statusbar/statusbar.js +0 -226
- package/cjs/components/stepper/stepper-class.js +0 -497
- package/cjs/components/stepper/stepper.js +0 -96
- package/cjs/components/subnavbar/subnavbar.js +0 -28
- package/cjs/components/swipeout/swipeout.js +0 -618
- package/cjs/components/swiper/swiper.js +0 -189
- package/cjs/components/tabs/tabs.js +0 -295
- package/cjs/components/text-editor/text-editor-class.js +0 -627
- package/cjs/components/text-editor/text-editor.js +0 -93
- package/cjs/components/timeline/timeline.js +0 -8
- package/cjs/components/toast/toast-class.js +0 -142
- package/cjs/components/toast/toast.js +0 -51
- package/cjs/components/toggle/toggle-class.js +0 -213
- package/cjs/components/toggle/toggle.js +0 -72
- package/cjs/components/toolbar/toolbar.js +0 -234
- package/cjs/components/tooltip/tooltip-class.js +0 -409
- package/cjs/components/tooltip/tooltip.js +0 -146
- package/cjs/components/touch-ripple/touch-ripple-class.js +0 -110
- package/cjs/components/touch-ripple/touch-ripple.js +0 -34
- package/cjs/components/treeview/treeview.js +0 -88
- package/cjs/components/typography/typography.js +0 -8
- package/cjs/components/view/resizable-view.js +0 -155
- package/cjs/components/view/view-class.js +0 -251
- package/cjs/components/view/view.js +0 -196
- package/cjs/components/virtual-list/virtual-list-class.js +0 -654
- package/cjs/components/virtual-list/virtual-list.js +0 -27
- package/cjs/framework7-bundle.js +0 -208
- package/cjs/framework7-lite-bundle.js +0 -191
- package/cjs/framework7-lite.js +0 -87
- package/cjs/framework7.js +0 -98
- package/cjs/modules/clicks/clicks.js +0 -115
- package/cjs/modules/component/$h.js +0 -31
- package/cjs/modules/component/$jsx.js +0 -31
- package/cjs/modules/component/component-class.js +0 -434
- package/cjs/modules/component/component.js +0 -58
- package/cjs/modules/component/custom-components.js +0 -6
- package/cjs/modules/component/eventslisteners.js +0 -90
- package/cjs/modules/component/parse-component.js +0 -80
- package/cjs/modules/component/patch.js +0 -21
- package/cjs/modules/component/snabbdom/h.js +0 -72
- package/cjs/modules/component/snabbdom/helpers/attachto.js +0 -62
- package/cjs/modules/component/snabbdom/hooks.js +0 -1
- package/cjs/modules/component/snabbdom/htmldomapi.js +0 -90
- package/cjs/modules/component/snabbdom/is.js +0 -11
- package/cjs/modules/component/snabbdom/modules/attributes.js +0 -61
- package/cjs/modules/component/snabbdom/modules/class.js +0 -38
- package/cjs/modules/component/snabbdom/modules/dataset.js +0 -47
- package/cjs/modules/component/snabbdom/modules/eventlisteners.js +0 -106
- package/cjs/modules/component/snabbdom/modules/hero.js +0 -193
- package/cjs/modules/component/snabbdom/modules/module.js +0 -1
- package/cjs/modules/component/snabbdom/modules/props.js +0 -40
- package/cjs/modules/component/snabbdom/modules/style.js +0 -116
- package/cjs/modules/component/snabbdom/snabbdom.bundle.js +0 -33
- package/cjs/modules/component/snabbdom/snabbdom.js +0 -374
- package/cjs/modules/component/snabbdom/thunk.js +0 -66
- package/cjs/modules/component/snabbdom/tovnode.js +0 -57
- package/cjs/modules/component/snabbdom/vnode.js +0 -20
- package/cjs/modules/component/vdom.js +0 -393
- package/cjs/modules/demo-module.js +0 -49
- package/cjs/modules/device/device.js +0 -56
- package/cjs/modules/history/history.js +0 -21
- package/cjs/modules/request/request.js +0 -20
- package/cjs/modules/resize/resize.js +0 -72
- package/cjs/modules/router/app-router-check.js +0 -10
- package/cjs/modules/router/async-component.js +0 -33
- package/cjs/modules/router/back.js +0 -899
- package/cjs/modules/router/clear-previous-history.js +0 -50
- package/cjs/modules/router/component-loader.js +0 -140
- package/cjs/modules/router/modal.js +0 -254
- package/cjs/modules/router/navigate.js +0 -1054
- package/cjs/modules/router/process-route-queue.js +0 -80
- package/cjs/modules/router/redirect.js +0 -52
- package/cjs/modules/router/router-class.js +0 -1500
- package/cjs/modules/router/router.js +0 -36
- package/cjs/modules/router/swipe-back.js +0 -735
- package/cjs/modules/router/tab.js +0 -264
- package/cjs/modules/service-worker/service-worker.js +0 -101
- package/cjs/modules/store/create-store.js +0 -169
- package/cjs/modules/store/store.js +0 -21
- package/cjs/modules/support/support.js +0 -14
- package/cjs/modules/touch/touch.js +0 -585
- package/cjs/modules/utils/utils.js +0 -21
- package/cjs/shared/$jsx.js +0 -39
- package/cjs/shared/class.js +0 -206
- package/cjs/shared/constructor-methods.js +0 -73
- package/cjs/shared/dom7.js +0 -17
- package/cjs/shared/events-class.js +0 -125
- package/cjs/shared/get-device.js +0 -157
- package/cjs/shared/get-support.js +0 -44
- package/cjs/shared/history.js +0 -185
- package/cjs/shared/modal-methods.js +0 -105
- package/cjs/shared/request.js +0 -552
- package/cjs/shared/utils.js +0 -472
- package/components/accordion/package.json +0 -9
- package/components/actions/package.json +0 -9
- package/components/app/package.json +0 -9
- package/components/appbar/package.json +0 -9
- package/components/area-chart/package.json +0 -9
- package/components/autocomplete/package.json +0 -9
- package/components/badge/package.json +0 -9
- package/components/block/package.json +0 -9
- package/components/button/package.json +0 -9
- package/components/calendar/package.json +0 -9
- package/components/card/package.json +0 -9
- package/components/checkbox/package.json +0 -9
- package/components/chip/package.json +0 -9
- package/components/color-picker/package.json +0 -9
- package/components/contacts-list/package.json +0 -9
- package/components/data-table/package.json +0 -9
- package/components/dialog/package.json +0 -9
- package/components/elevation/package.json +0 -9
- package/components/fab/package.json +0 -9
- package/components/form/package.json +0 -9
- package/components/gauge/package.json +0 -9
- package/components/grid/package.json +0 -9
- package/components/icon/package.json +0 -9
- package/components/infinite-scroll/package.json +0 -9
- package/components/input/package.json +0 -9
- package/components/lazy/package.json +0 -9
- package/components/link/package.json +0 -9
- package/components/list/package.json +0 -9
- package/components/list-index/package.json +0 -9
- package/components/login-screen/package.json +0 -9
- package/components/menu/package.json +0 -9
- package/components/messagebar/package.json +0 -9
- package/components/messages/package.json +0 -9
- package/components/modal/package.json +0 -9
- package/components/navbar/package.json +0 -9
- package/components/notification/package.json +0 -9
- package/components/page/package.json +0 -9
- package/components/panel/package.json +0 -9
- package/components/photo-browser/package.json +0 -9
- package/components/picker/package.json +0 -9
- package/components/pie-chart/package.json +0 -9
- package/components/popover/package.json +0 -9
- package/components/popup/package.json +0 -9
- package/components/preloader/package.json +0 -9
- package/components/progressbar/package.json +0 -9
- package/components/pull-to-refresh/package.json +0 -9
- package/components/radio/package.json +0 -9
- package/components/range/package.json +0 -9
- package/components/searchbar/package.json +0 -9
- package/components/sheet/package.json +0 -9
- package/components/skeleton/package.json +0 -9
- package/components/smart-select/package.json +0 -9
- package/components/sortable/package.json +0 -9
- package/components/statusbar/package.json +0 -9
- package/components/stepper/package.json +0 -9
- package/components/subnavbar/package.json +0 -9
- package/components/swipeout/package.json +0 -9
- package/components/swiper/package.json +0 -9
- package/components/tabs/package.json +0 -9
- package/components/text-editor/package.json +0 -9
- package/components/timeline/package.json +0 -9
- package/components/toast/package.json +0 -9
- package/components/toggle/package.json +0 -9
- package/components/toolbar/package.json +0 -9
- package/components/tooltip/package.json +0 -9
- package/components/touch-ripple/package.json +0 -9
- package/components/treeview/package.json +0 -9
- package/components/typography/package.json +0 -9
- package/components/view/package.json +0 -9
- package/components/virtual-list/package.json +0 -9
- package/core/package.json +0 -8
- package/esm/components/accordion/accordion.js +0 -126
- package/esm/components/actions/actions-class.js +0 -373
- package/esm/components/actions/actions.js +0 -48
- package/esm/components/appbar/appbar.js +0 -3
- package/esm/components/area-chart/area-chart-class.js +0 -517
- package/esm/components/area-chart/area-chart.js +0 -45
- package/esm/components/autocomplete/autocomplete.js +0 -82
- package/esm/components/calendar/calendar.js +0 -113
- package/esm/components/card/card.js +0 -612
- package/esm/components/checkbox/checkbox.js +0 -3
- package/esm/components/chip/chip.js +0 -3
- package/esm/components/color-picker/color-picker.js +0 -94
- package/esm/components/contacts-list/contacts-list.js +0 -3
- package/esm/components/data-table/data-table.js +0 -64
- package/esm/components/dialog/dialog.js +0 -286
- package/esm/components/elevation/elevation.js +0 -3
- package/esm/components/fab/fab.js +0 -185
- package/esm/components/form/form.js +0 -330
- package/esm/components/gauge/gauge-class.js +0 -323
- package/esm/components/gauge/gauge.js +0 -91
- package/esm/components/grid/grid.js +0 -223
- package/esm/components/infinite-scroll/infinite-scroll.js +0 -101
- package/esm/components/input/input.js +0 -384
- package/esm/components/lazy/lazy.js +0 -271
- package/esm/components/list-index/list-index.js +0 -65
- package/esm/components/login-screen/login-screen-class.js +0 -58
- package/esm/components/login-screen/login-screen.js +0 -34
- package/esm/components/menu/menu.js +0 -82
- package/esm/components/messagebar/messagebar.js +0 -66
- package/esm/components/messages/messages.js +0 -65
- package/esm/components/modal/custom-modal-class.js +0 -89
- package/esm/components/modal/modal.js +0 -22
- package/esm/components/notification/notification.js +0 -33
- package/esm/components/panel/panel.js +0 -208
- package/esm/components/photo-browser/photo-browser.js +0 -68
- package/esm/components/picker/picker-column.js +0 -379
- package/esm/components/picker/picker.js +0 -66
- package/esm/components/pie-chart/pie-chart-class.js +0 -281
- package/esm/components/pie-chart/pie-chart.js +0 -33
- package/esm/components/popover/popover.js +0 -81
- package/esm/components/popup/popup.js +0 -47
- package/esm/components/preloader/preloader.js +0 -101
- package/esm/components/progressbar/progressbar.js +0 -175
- package/esm/components/pull-to-refresh/pull-to-refresh.js +0 -62
- package/esm/components/radio/radio.js +0 -3
- package/esm/components/range/range.js +0 -81
- package/esm/components/searchbar/remove-diacritics.js +0 -277
- package/esm/components/searchbar/searchbar.js +0 -129
- package/esm/components/sheet/sheet.js +0 -71
- package/esm/components/skeleton/skeleton.js +0 -3
- package/esm/components/smart-select/smart-select.js +0 -139
- package/esm/components/sortable/sortable.js +0 -323
- package/esm/components/stepper/stepper.js +0 -84
- package/esm/components/swipeout/swipeout.js +0 -606
- package/esm/components/swiper/swiper.js +0 -177
- package/esm/components/tabs/tabs.js +0 -285
- package/esm/components/text-editor/text-editor.js +0 -81
- package/esm/components/timeline/timeline.js +0 -3
- package/esm/components/toast/toast-class.js +0 -132
- package/esm/components/toast/toast.js +0 -40
- package/esm/components/toggle/toggle.js +0 -61
- package/esm/components/tooltip/tooltip.js +0 -135
- package/esm/components/touch-ripple/touch-ripple-class.js +0 -103
- package/esm/components/touch-ripple/touch-ripple.js +0 -25
- package/esm/components/treeview/treeview.js +0 -78
- package/esm/components/typography/typography.js +0 -3
- package/esm/components/virtual-list/virtual-list.js +0 -17
- package/esm/framework7-bundle.js +0 -98
- package/esm/framework7-lite-bundle.js +0 -91
- package/esm/framework7-lite.js +0 -39
- package/esm/framework7.js +0 -43
- package/esm/modules/component/$h.js +0 -20
- package/esm/modules/component/$jsx.js +0 -24
- package/esm/modules/component/component-class.js +0 -421
- package/esm/modules/component/component.js +0 -44
- package/esm/modules/component/parse-component.js +0 -70
- package/esm/modules/component/patch.js +0 -8
- package/esm/modules/component/snabbdom/snabbdom.bundle.js +0 -19
- package/esm/modules/resize/resize.js +0 -64
- package/esm/modules/router/component-loader.js +0 -133
- package/esm/modules/store/create-store.js +0 -164
- package/esm/modules/store/store.js +0 -11
- package/esm/modules/support/support.js +0 -7
- package/esm/modules/utils/utils.js +0 -10
- package/esm/shared/$jsx.js +0 -33
- package/esm/shared/class.js +0 -197
- package/esm/shared/constructor-methods.js +0 -65
- package/esm/shared/events-class.js +0 -119
- package/esm/shared/modal-methods.js +0 -95
- package/esm/shared/request.js +0 -545
- package/lite/package.json +0 -8
- package/lite-bundle/package.json +0 -8
- package/modules/clicks/package.json +0 -9
- package/modules/component/package.json +0 -9
- package/modules/device/package.json +0 -9
- package/modules/history/package.json +0 -9
- package/modules/request/package.json +0 -9
- package/modules/resize/package.json +0 -9
- package/modules/router/package.json +0 -9
- package/modules/service-worker/package.json +0 -9
- package/modules/store/package.json +0 -9
- package/modules/support/package.json +0 -9
- package/modules/touch/package.json +0 -9
- package/modules/utils/package.json +0 -9
- package/types/components/accordion/accordion.d.ts +0 -55
- package/types/components/actions/actions.d.ts +0 -158
- package/types/components/app/app-class.d.ts +0 -196
- package/types/components/appbar/appbar.d.ts +0 -10
- package/types/components/area-chart/area-chart.d.ts +0 -124
- package/types/components/autocomplete/autocomplete.d.ts +0 -191
- package/types/components/badge/badge.d.ts +0 -10
- package/types/components/block/block.d.ts +0 -10
- package/types/components/button/button.d.ts +0 -10
- package/types/components/calendar/calendar.d.ts +0 -304
- package/types/components/card/card.d.ts +0 -65
- package/types/components/checkbox/checkbox.d.ts +0 -10
- package/types/components/chip/chip.d.ts +0 -10
- package/types/components/color-picker/color-picker.d.ts +0 -229
- package/types/components/contacts-list/contacts-list.d.ts +0 -10
- package/types/components/data-table/data-table.d.ts +0 -57
- package/types/components/dialog/dialog.d.ts +0 -241
- package/types/components/elevation/elevation.d.ts +0 -10
- package/types/components/fab/fab.d.ts +0 -28
- package/types/components/form/form.d.ts +0 -60
- package/types/components/gauge/gauge.d.ts +0 -96
- package/types/components/grid/grid.d.ts +0 -17
- package/types/components/icon/icon.d.ts +0 -10
- package/types/components/infinite-scroll/infinite-scroll.d.ts +0 -23
- package/types/components/input/input.d.ts +0 -56
- package/types/components/lazy/lazy.d.ts +0 -53
- package/types/components/link/link.d.ts +0 -10
- package/types/components/list/list.d.ts +0 -10
- package/types/components/list-index/list-index.d.ts +0 -99
- package/types/components/login-screen/login-screen.d.ts +0 -95
- package/types/components/menu/menu.d.ts +0 -28
- package/types/components/messagebar/messagebar.d.ts +0 -161
- package/types/components/messages/messages.d.ts +0 -158
- package/types/components/modal/modal.d.ts +0 -78
- package/types/components/navbar/navbar.d.ts +0 -75
- package/types/components/notification/notification.d.ts +0 -118
- package/types/components/page/page.d.ts +0 -10
- package/types/components/panel/panel.d.ts +0 -194
- package/types/components/photo-browser/photo-browser.d.ts +0 -194
- package/types/components/picker/picker.d.ts +0 -216
- package/types/components/pie-chart/pie-chart.d.ts +0 -95
- package/types/components/popover/popover.d.ts +0 -127
- package/types/components/popup/popup.d.ts +0 -135
- package/types/components/preloader/preloader.d.ts +0 -22
- package/types/components/progressbar/progressbar.d.ts +0 -27
- package/types/components/pull-to-refresh/pull-to-refresh.d.ts +0 -99
- package/types/components/radio/radio.d.ts +0 -10
- package/types/components/range/range.d.ts +0 -139
- package/types/components/searchbar/searchbar.d.ts +0 -157
- package/types/components/sheet/sheet.d.ts +0 -149
- package/types/components/skeleton/skeleton.d.ts +0 -10
- package/types/components/smart-select/smart-select.d.ts +0 -199
- package/types/components/sortable/sortable.d.ts +0 -50
- package/types/components/statusbar/statusbar.d.ts +0 -50
- package/types/components/stepper/stepper.d.ts +0 -117
- package/types/components/subnavbar/subnavbar.d.ts +0 -11
- package/types/components/swipeout/swipeout.d.ts +0 -68
- package/types/components/swiper/swiper.d.ts +0 -21
- package/types/components/tabs/tabs.d.ts +0 -39
- package/types/components/text-editor/text-editor.d.ts +0 -162
- package/types/components/timeline/timeline.d.ts +0 -10
- package/types/components/toast/toast.d.ts +0 -117
- package/types/components/toggle/toggle.d.ts +0 -69
- package/types/components/toolbar/toolbar.d.ts +0 -43
- package/types/components/tooltip/tooltip.d.ts +0 -101
- package/types/components/touch-ripple/touch-ripple.d.ts +0 -21
- package/types/components/treeview/treeview.d.ts +0 -38
- package/types/components/typography/typography.d.ts +0 -10
- package/types/components/view/view.d.ts +0 -205
- package/types/components/virtual-list/virtual-list.d.ts +0 -138
- package/types/modules/clicks/clicks.d.ts +0 -19
- package/types/modules/component/component.d.ts +0 -96
- package/types/modules/component/snabbdom/h.d.ts +0 -10
- package/types/modules/component/snabbdom/helpers/attachto.d.ts +0 -9
- package/types/modules/component/snabbdom/hooks.d.ts +0 -23
- package/types/modules/component/snabbdom/htmldomapi.d.ts +0 -19
- package/types/modules/component/snabbdom/is.d.ts +0 -2
- package/types/modules/component/snabbdom/modules/attributes.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/class.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/dataset.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/eventlisteners.d.ts +0 -8
- package/types/modules/component/snabbdom/modules/hero.d.ts +0 -6
- package/types/modules/component/snabbdom/modules/module.d.ts +0 -9
- package/types/modules/component/snabbdom/modules/props.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/style.d.ts +0 -7
- package/types/modules/component/snabbdom/snabbdom.bundle.d.ts +0 -5
- package/types/modules/component/snabbdom/snabbdom.d.ts +0 -6
- package/types/modules/component/snabbdom/thunk.d.ts +0 -14
- package/types/modules/component/snabbdom/tovnode.d.ts +0 -4
- package/types/modules/component/snabbdom/vnode.d.ts +0 -36
- package/types/modules/device/device.d.ts +0 -14
- package/types/modules/request/request.d.ts +0 -15
- package/types/modules/resize/resize.d.ts +0 -25
- package/types/modules/router/router.d.ts +0 -356
- package/types/modules/service-worker/service-worker.d.ts +0 -38
- package/types/modules/store/store.d.ts +0 -40
- package/types/modules/support/support.d.ts +0 -15
- package/types/modules/touch/touch.d.ts +0 -62
- package/types/modules/utils/utils.d.ts +0 -15
- package/types/package.json +0 -6
|
@@ -1,32 +1,16 @@
|
|
|
1
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2
|
-
|
|
3
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4
|
-
|
|
5
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
6
|
-
|
|
7
1
|
import { getDocument } from 'ssr-window';
|
|
8
|
-
import $ from '../../shared/dom7';
|
|
9
|
-
import { extend, deleteProps } from '../../shared/utils';
|
|
10
|
-
import { getSupport } from '../../shared/get-support';
|
|
11
|
-
import Framework7Class from '../../shared/class';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
params = {};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_this = _Framework7Class.call(this, params, [app]) || this;
|
|
24
|
-
|
|
25
|
-
var tooltip = _assertThisInitialized(_this);
|
|
26
|
-
|
|
27
|
-
var support = getSupport();
|
|
28
|
-
var defaults = extend({}, app.params.tooltip);
|
|
29
|
-
var document = getDocument(); // Extend defaults with modules params
|
|
2
|
+
import $ from '../../shared/dom7.js';
|
|
3
|
+
import { extend, deleteProps } from '../../shared/utils.js';
|
|
4
|
+
import { getSupport } from '../../shared/get-support.js';
|
|
5
|
+
import Framework7Class from '../../shared/class.js';
|
|
6
|
+
|
|
7
|
+
class Tooltip extends Framework7Class {
|
|
8
|
+
constructor(app, params = {}) {
|
|
9
|
+
super(params, [app]);
|
|
10
|
+
const tooltip = this;
|
|
11
|
+
const support = getSupport();
|
|
12
|
+
const defaults = extend({}, app.params.tooltip);
|
|
13
|
+
const document = getDocument(); // Extend defaults with modules params
|
|
30
14
|
|
|
31
15
|
tooltip.useModulesParams(defaults);
|
|
32
16
|
tooltip.params = extend(defaults, params);
|
|
@@ -35,35 +19,36 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
35
19
|
tooltip.params.offset = 10;
|
|
36
20
|
}
|
|
37
21
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if ($targetEl
|
|
45
|
-
|
|
22
|
+
const {
|
|
23
|
+
targetEl,
|
|
24
|
+
containerEl
|
|
25
|
+
} = tooltip.params;
|
|
26
|
+
if (!targetEl && !tooltip.params.delegated) return tooltip;
|
|
27
|
+
const $targetEl = $(targetEl);
|
|
28
|
+
if ($targetEl.length === 0 && !tooltip.params.delegated) return tooltip;
|
|
29
|
+
if ($targetEl[0] && $targetEl[0].f7Tooltip && !tooltip.params.delegated) return $targetEl[0].f7Tooltip;
|
|
30
|
+
let $containerEl = $(containerEl || app.$el).eq(0);
|
|
46
31
|
|
|
47
32
|
if ($containerEl.length === 0) {
|
|
48
33
|
$containerEl = app.$el;
|
|
49
34
|
}
|
|
50
35
|
|
|
51
|
-
|
|
36
|
+
const $el = $(tooltip.render()).eq(0);
|
|
52
37
|
extend(tooltip, {
|
|
53
|
-
app
|
|
54
|
-
$targetEl
|
|
38
|
+
app,
|
|
39
|
+
$targetEl,
|
|
55
40
|
targetEl: $targetEl && $targetEl[0],
|
|
56
|
-
$containerEl
|
|
41
|
+
$containerEl,
|
|
57
42
|
containerEl: $containerEl && $containerEl[0],
|
|
58
|
-
$el
|
|
43
|
+
$el,
|
|
59
44
|
el: $el && $el[0],
|
|
60
45
|
text: tooltip.params.text || '',
|
|
61
46
|
visible: false,
|
|
62
47
|
opened: false
|
|
63
48
|
});
|
|
64
49
|
if ($targetEl[0]) $targetEl[0].f7Tooltip = tooltip;
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
const touchesStart = {};
|
|
51
|
+
let isTouched;
|
|
67
52
|
|
|
68
53
|
function handleClick() {
|
|
69
54
|
if (tooltip.opened) tooltip.hide();else tooltip.show(this);
|
|
@@ -84,9 +69,9 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
84
69
|
|
|
85
70
|
function handleTouchMove(e) {
|
|
86
71
|
if (!isTouched) return;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
const x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
73
|
+
const y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
|
74
|
+
const distance = ((x - touchesStart.x) ** 2 + (y - touchesStart.y) ** 2) ** 0.5;
|
|
90
75
|
|
|
91
76
|
if (distance > 50) {
|
|
92
77
|
isTouched = false;
|
|
@@ -131,7 +116,7 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
131
116
|
if (tooltip.params.trigger === 'manual') return;
|
|
132
117
|
|
|
133
118
|
if (support.touch) {
|
|
134
|
-
|
|
119
|
+
const passive = support.passiveListener ? {
|
|
135
120
|
passive: true
|
|
136
121
|
} : false;
|
|
137
122
|
|
|
@@ -172,7 +157,7 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
172
157
|
if (tooltip.params.trigger === 'manual') return;
|
|
173
158
|
|
|
174
159
|
if (support.touch) {
|
|
175
|
-
|
|
160
|
+
const passive = support.passiveListener ? {
|
|
176
161
|
passive: true
|
|
177
162
|
} : false;
|
|
178
163
|
|
|
@@ -199,70 +184,66 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
199
184
|
|
|
200
185
|
tooltip.useModules();
|
|
201
186
|
tooltip.init();
|
|
202
|
-
return tooltip
|
|
187
|
+
return tooltip;
|
|
203
188
|
}
|
|
204
189
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
_proto.setTargetEl = function setTargetEl(targetEl) {
|
|
208
|
-
var tooltip = this;
|
|
190
|
+
setTargetEl(targetEl) {
|
|
191
|
+
const tooltip = this;
|
|
209
192
|
tooltip.detachEvents();
|
|
210
193
|
tooltip.$targetEl = $(targetEl);
|
|
211
194
|
tooltip.targetEl = tooltip.$targetEl[0];
|
|
212
195
|
tooltip.attachEvents();
|
|
213
196
|
return tooltip;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
position(targetEl) {
|
|
200
|
+
const tooltip = this;
|
|
201
|
+
const {
|
|
202
|
+
$el,
|
|
203
|
+
app,
|
|
204
|
+
$containerEl
|
|
205
|
+
} = tooltip;
|
|
206
|
+
const hasContainerEl = !!tooltip.params.containerEl;
|
|
207
|
+
const tooltipOffset = tooltip.params.offset || 0;
|
|
223
208
|
$el.css({
|
|
224
209
|
left: '',
|
|
225
210
|
top: ''
|
|
226
211
|
});
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
width = _ref[0],
|
|
230
|
-
height = _ref[1];
|
|
212
|
+
const $targetEl = $(targetEl || tooltip.targetEl);
|
|
213
|
+
const [width, height] = [$el.width(), $el.height()];
|
|
231
214
|
$el.css({
|
|
232
215
|
left: '',
|
|
233
216
|
top: ''
|
|
234
217
|
});
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
218
|
+
let targetWidth;
|
|
219
|
+
let targetHeight;
|
|
220
|
+
let targetOffsetLeft;
|
|
221
|
+
let targetOffsetTop;
|
|
222
|
+
const boundaries = hasContainerEl && $containerEl.length ? $containerEl[0].getBoundingClientRect() : app;
|
|
240
223
|
|
|
241
224
|
if ($targetEl && $targetEl.length > 0) {
|
|
242
225
|
targetWidth = $targetEl.outerWidth();
|
|
243
226
|
targetHeight = $targetEl.outerHeight();
|
|
244
227
|
|
|
245
228
|
if (typeof targetWidth === 'undefined' && typeof targetHeight === 'undefined') {
|
|
246
|
-
|
|
229
|
+
const clientRect = $targetEl[0].getBoundingClientRect();
|
|
247
230
|
targetWidth = clientRect.width;
|
|
248
231
|
targetHeight = clientRect.height;
|
|
249
232
|
}
|
|
250
233
|
|
|
251
|
-
|
|
234
|
+
const targetOffset = $targetEl.offset();
|
|
252
235
|
targetOffsetLeft = targetOffset.left - boundaries.left;
|
|
253
236
|
targetOffsetTop = targetOffset.top - boundaries.top;
|
|
254
|
-
|
|
237
|
+
const targetParentPage = $targetEl.parents('.page');
|
|
255
238
|
|
|
256
239
|
if (targetParentPage.length > 0) {
|
|
257
240
|
targetOffsetTop -= targetParentPage[0].scrollTop;
|
|
258
241
|
}
|
|
259
242
|
}
|
|
260
243
|
|
|
261
|
-
|
|
262
|
-
left = _ref2[0],
|
|
263
|
-
top = _ref2[1]; // Top Position
|
|
244
|
+
let [left, top] = [0, 0, 0]; // Top Position
|
|
264
245
|
|
|
265
|
-
|
|
246
|
+
let position = 'top';
|
|
266
247
|
|
|
267
248
|
if (height + tooltipOffset < targetOffsetTop) {
|
|
268
249
|
// On top
|
|
@@ -300,23 +281,25 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
300
281
|
|
|
301
282
|
|
|
302
283
|
$el.css({
|
|
303
|
-
top: top
|
|
304
|
-
left: left
|
|
284
|
+
top: `${top}px`,
|
|
285
|
+
left: `${left}px`
|
|
305
286
|
});
|
|
306
|
-
}
|
|
287
|
+
}
|
|
307
288
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
289
|
+
show(aroundEl) {
|
|
290
|
+
const tooltip = this;
|
|
291
|
+
const {
|
|
292
|
+
$el,
|
|
293
|
+
$targetEl,
|
|
294
|
+
$containerEl
|
|
295
|
+
} = tooltip;
|
|
313
296
|
|
|
314
297
|
if ($containerEl[0] && $el[0] && !$containerEl[0].contains($el[0])) {
|
|
315
298
|
$containerEl.append($el);
|
|
316
299
|
}
|
|
317
300
|
|
|
318
301
|
tooltip.position(aroundEl);
|
|
319
|
-
|
|
302
|
+
const $aroundEl = $(aroundEl);
|
|
320
303
|
tooltip.visible = true;
|
|
321
304
|
tooltip.opened = true;
|
|
322
305
|
$targetEl.trigger('tooltip:show');
|
|
@@ -329,12 +312,14 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
329
312
|
tooltip.emit('local::show tooltipShow', tooltip);
|
|
330
313
|
$el.removeClass('tooltip-out').addClass('tooltip-in');
|
|
331
314
|
return tooltip;
|
|
332
|
-
}
|
|
315
|
+
}
|
|
333
316
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
317
|
+
hide() {
|
|
318
|
+
const tooltip = this;
|
|
319
|
+
const {
|
|
320
|
+
$el,
|
|
321
|
+
$targetEl
|
|
322
|
+
} = tooltip;
|
|
338
323
|
tooltip.visible = false;
|
|
339
324
|
tooltip.opened = false;
|
|
340
325
|
$targetEl.trigger('tooltip:hide');
|
|
@@ -342,19 +327,24 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
342
327
|
tooltip.emit('local::hide tooltipHide', tooltip);
|
|
343
328
|
$el.addClass('tooltip-out').removeClass('tooltip-in');
|
|
344
329
|
return tooltip;
|
|
345
|
-
}
|
|
330
|
+
}
|
|
346
331
|
|
|
347
|
-
|
|
348
|
-
|
|
332
|
+
render() {
|
|
333
|
+
const tooltip = this;
|
|
349
334
|
if (tooltip.params.render) return tooltip.params.render.call(tooltip, tooltip);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
335
|
+
const {
|
|
336
|
+
cssClass,
|
|
337
|
+
text
|
|
338
|
+
} = tooltip.params;
|
|
339
|
+
return `
|
|
340
|
+
<div class="tooltip ${cssClass || ''}">
|
|
341
|
+
<div class="tooltip-content">${text || ''}</div>
|
|
342
|
+
</div>
|
|
343
|
+
`.trim();
|
|
344
|
+
}
|
|
355
345
|
|
|
356
|
-
|
|
357
|
-
|
|
346
|
+
setText(newText) {
|
|
347
|
+
const tooltip = this;
|
|
358
348
|
|
|
359
349
|
if (typeof newText === 'undefined') {
|
|
360
350
|
return tooltip;
|
|
@@ -372,15 +362,15 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
372
362
|
}
|
|
373
363
|
|
|
374
364
|
return tooltip;
|
|
375
|
-
}
|
|
365
|
+
}
|
|
376
366
|
|
|
377
|
-
|
|
378
|
-
|
|
367
|
+
init() {
|
|
368
|
+
const tooltip = this;
|
|
379
369
|
tooltip.attachEvents();
|
|
380
|
-
}
|
|
370
|
+
}
|
|
381
371
|
|
|
382
|
-
|
|
383
|
-
|
|
372
|
+
destroy() {
|
|
373
|
+
const tooltip = this;
|
|
384
374
|
if (!tooltip.$targetEl || tooltip.destroyed) return;
|
|
385
375
|
tooltip.$targetEl.trigger('tooltip:beforedestroy');
|
|
386
376
|
tooltip.emit('local::beforeDestroy tooltipBeforeDestroy', tooltip);
|
|
@@ -389,9 +379,8 @@ var Tooltip = /*#__PURE__*/function (_Framework7Class) {
|
|
|
389
379
|
tooltip.detachEvents();
|
|
390
380
|
deleteProps(tooltip);
|
|
391
381
|
tooltip.destroyed = true;
|
|
392
|
-
}
|
|
382
|
+
}
|
|
393
383
|
|
|
394
|
-
|
|
395
|
-
}(Framework7Class);
|
|
384
|
+
}
|
|
396
385
|
|
|
397
386
|
export default Tooltip;
|
|
@@ -1 +1,144 @@
|
|
|
1
|
-
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import Tooltip from './tooltip-class.js';
|
|
3
|
+
import ConstructorMethods from '../../shared/constructor-methods.js';
|
|
4
|
+
export default {
|
|
5
|
+
name: 'tooltip',
|
|
6
|
+
static: {
|
|
7
|
+
Tooltip
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
create() {
|
|
11
|
+
const app = this;
|
|
12
|
+
app.tooltip = ConstructorMethods({
|
|
13
|
+
defaultSelector: '.tooltip',
|
|
14
|
+
constructor: Tooltip,
|
|
15
|
+
app,
|
|
16
|
+
domProp: 'f7Tooltip'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
app.tooltip.show = function show(el) {
|
|
20
|
+
const $el = $(el);
|
|
21
|
+
if ($el.length === 0) return undefined;
|
|
22
|
+
const tooltip = $el[0].f7Tooltip;
|
|
23
|
+
if (!tooltip) return undefined;
|
|
24
|
+
tooltip.show($el[0]);
|
|
25
|
+
return tooltip;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
app.tooltip.hide = function hide(el) {
|
|
29
|
+
const $el = $(el);
|
|
30
|
+
if ($el.length === 0) return undefined;
|
|
31
|
+
const tooltip = $el[0].f7Tooltip;
|
|
32
|
+
if (!tooltip) return undefined;
|
|
33
|
+
tooltip.hide();
|
|
34
|
+
return tooltip;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
app.tooltip.setText = function text(el, newText) {
|
|
38
|
+
const $el = $(el);
|
|
39
|
+
if ($el.length === 0) return undefined;
|
|
40
|
+
const tooltip = $el[0].f7Tooltip;
|
|
41
|
+
if (!tooltip) return undefined;
|
|
42
|
+
tooltip.setText(newText);
|
|
43
|
+
return tooltip;
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
params: {
|
|
48
|
+
tooltip: {
|
|
49
|
+
targetEl: null,
|
|
50
|
+
delegated: false,
|
|
51
|
+
text: null,
|
|
52
|
+
cssClass: null,
|
|
53
|
+
render: null,
|
|
54
|
+
offset: 0,
|
|
55
|
+
trigger: 'hover',
|
|
56
|
+
containerEl: undefined
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
on: {
|
|
60
|
+
tabMounted(tabEl) {
|
|
61
|
+
const app = this;
|
|
62
|
+
$(tabEl).find('.tooltip-init').each(el => {
|
|
63
|
+
const text = $(el).attr('data-tooltip');
|
|
64
|
+
if (!text) return;
|
|
65
|
+
app.tooltip.create({
|
|
66
|
+
targetEl: el,
|
|
67
|
+
text
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
tabBeforeRemove(tabEl) {
|
|
73
|
+
$(tabEl).find('.tooltip-init').each(el => {
|
|
74
|
+
if (el.f7Tooltip) el.f7Tooltip.destroy();
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
pageInit(page) {
|
|
79
|
+
const app = this;
|
|
80
|
+
page.$el.find('.tooltip-init').each(el => {
|
|
81
|
+
const text = $(el).attr('data-tooltip');
|
|
82
|
+
if (!text) return;
|
|
83
|
+
app.tooltip.create({
|
|
84
|
+
targetEl: el,
|
|
85
|
+
text
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {
|
|
90
|
+
page.$navbarEl.find('.tooltip-init').each(el => {
|
|
91
|
+
const text = $(el).attr('data-tooltip');
|
|
92
|
+
if (!text) return;
|
|
93
|
+
app.tooltip.create({
|
|
94
|
+
targetEl: el,
|
|
95
|
+
text
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
pageBeforeRemove(page) {
|
|
102
|
+
const app = this;
|
|
103
|
+
page.$el.find('.tooltip-init').each(el => {
|
|
104
|
+
if (el.f7Tooltip) el.f7Tooltip.destroy();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {
|
|
108
|
+
page.$navbarEl.find('.tooltip-init').each(el => {
|
|
109
|
+
if (el.f7Tooltip) el.f7Tooltip.destroy();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
},
|
|
115
|
+
vnode: {
|
|
116
|
+
'tooltip-init': {
|
|
117
|
+
insert(vnode) {
|
|
118
|
+
const app = this;
|
|
119
|
+
const el = vnode.elm;
|
|
120
|
+
const text = $(el).attr('data-tooltip');
|
|
121
|
+
if (!text) return;
|
|
122
|
+
app.tooltip.create({
|
|
123
|
+
targetEl: el,
|
|
124
|
+
text
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
update(vnode) {
|
|
129
|
+
const el = vnode.elm;
|
|
130
|
+
if (!el.f7Tooltip) return;
|
|
131
|
+
|
|
132
|
+
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['data-tooltip']) {
|
|
133
|
+
el.f7Tooltip.setText(vnode.data.attrs['data-tooltip']);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
destroy(vnode) {
|
|
138
|
+
const el = vnode.elm;
|
|
139
|
+
if (el.f7Tooltip) el.f7Tooltip.destroy();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function framework7ComponentLoader(t,e){void 0===e&&(e=!0);var o=t.$,a=t.utils,i=(t.getDevice,t.getSupport),r=t.Class,n=(t.Modal,t.ConstructorMethods),s=(t.ModalMethods,a.extend),l=a.deleteProps;class p extends r{constructor(t,e={}){super(e,[t]);const a=this,r=i(),n=s({},t.params.tooltip),l=getDocument();a.useModulesParams(n),a.params=s(n,e),void 0===e.offset&&r.touch&&"hover"===a.params.trigger&&(a.params.offset=10);const{targetEl:p,containerEl:c}=a.params;if(!p&&!a.params.delegated)return a;const d=o(p);if(0===d.length&&!a.params.delegated)return a;if(d[0]&&d[0].f7Tooltip&&!a.params.delegated)return d[0].f7Tooltip;let h=o(c||t.$el).eq(0);0===h.length&&(h=t.$el);const g=o(a.render()).eq(0);s(a,{app:t,$targetEl:d,targetEl:d&&d[0],$containerEl:h,containerEl:h&&h[0],$el:g,el:g&&g[0],text:a.params.text||"",visible:!1,opened:!1}),d[0]&&(d[0].f7Tooltip=a);const f={};let u;function m(){a.opened?a.hide():a.show(this)}function v(t){a.opened&&(o(t.target).closest(d).length||o(t.target).closest(a.$el).length)||a.hide()}function E(t){u||(u=!0,f.x="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,f.y="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY,a.show(this))}function $(t){if(!u)return;const e="touchmove"===t.type?t.targetTouches[0].pageX:t.pageX,o="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY;((e-f.x)**2+(o-f.y)**2)**.5>50&&(u=!1,a.hide())}function T(){u&&(u=!1,a.hide())}function w(){a.show(this)}function y(){a.hide()}function x(){g.hasClass("tooltip-in")||g.removeClass("tooltip-out").remove()}return a.attachEvents=function(){if(g.on("transitionend",x),"click"===a.params.trigger)return a.params.delegated?o(l).on("click",a.params.targetEl,m):a.$targetEl.on("click",m),void o("html").on("click",v);if("manual"!==a.params.trigger)if(r.touch){const e=!!r.passiveListener&&{passive:!0};a.params.delegated?o(l).on(t.touchEvents.start,a.params.targetEl,E,e):a.$targetEl.on(t.touchEvents.start,E,e),t.on("touchmove",$),t.on("touchend:passive",T)}else a.params.delegated?(o(l).on(r.pointerEvents?"pointerenter":"mouseenter",a.params.targetEl,w,!0),o(l).on(r.pointerEvents?"pointerleave":"mouseleave",a.params.targetEl,y,!0)):(a.$targetEl.on(r.pointerEvents?"pointerenter":"mouseenter",w),a.$targetEl.on(r.pointerEvents?"pointerleave":"mouseleave",y))},a.detachEvents=function(){if(g.off("transitionend",x),"click"===a.params.trigger)return a.params.delegated?o(l).on("click",a.params.targetEl,m):a.$targetEl.off("click",m),void o("html").off("click",v);if("manual"!==a.params.trigger)if(r.touch){const e=!!r.passiveListener&&{passive:!0};a.params.delegated?o(l).off(t.touchEvents.start,a.params.targetEl,E,e):a.$targetEl.off(t.touchEvents.start,E,e),t.off("touchmove",$),t.off("touchend:passive",T)}else a.params.delegated?(o(l).off(r.pointerEvents?"pointerenter":"mouseenter",a.params.targetEl,w,!0),o(l).off(r.pointerEvents?"pointerleave":"mouseleave",a.params.targetEl,y,!0)):(a.$targetEl.off(r.pointerEvents?"pointerenter":"mouseenter",w),a.$targetEl.off(r.pointerEvents?"pointerleave":"mouseleave",y))},a.useModules(),a.init(),a}setTargetEl(t){const e=this;return e.detachEvents(),e.$targetEl=o(t),e.targetEl=e.$targetEl[0],e.attachEvents(),e}position(t){const e=this,{$el:a,app:i,$containerEl:r}=e,n=!!e.params.containerEl,s=e.params.offset||0;a.css({left:"",top:""});const l=o(t||e.targetEl),[p,c]=[a.width(),a.height()];let d,h,g,f;a.css({left:"",top:""});const u=n&&r.length?r[0].getBoundingClientRect():i;if(l&&l.length>0){if(d=l.outerWidth(),h=l.outerHeight(),void 0===d&&void 0===h){const t=l[0].getBoundingClientRect();d=t.width,h=t.height}const t=l.offset();g=t.left-u.left,f=t.top-u.top;const e=l.parents(".page");e.length>0&&(f-=e[0].scrollTop)}let[m,v]=[0,0,0],E="top";c+s<f?v=f-c-s:c<u.height-f-h?(E="bottom",v=f+h+s):(E="middle",v=h/2+f-c/2,v<=0?v=8:v+c>=u.height&&(v=u.height-c-8)),"top"===E||"bottom"===E?(m=d/2+g-p/2,m<8&&(m=8),m+p>u.width&&(m=u.width-p-8),m<0&&(m=0)):"middle"===E&&(m=g-p,(m<8||m+p>u.width)&&(m<8&&(m=g+d),m+p>u.width&&(m=u.width-p-8))),a.css({top:`${v}px`,left:`${m}px`})}show(t){const e=this,{$el:a,$targetEl:i,$containerEl:r}=e;r[0]&&a[0]&&!r[0].contains(a[0])&&r.append(a),e.position(t);const n=o(t);return e.visible=!0,e.opened=!0,i.trigger("tooltip:show"),a.trigger("tooltip:show"),n.length&&n[0]!==i[0]&&n.trigger("tooltip:show"),e.emit("local::show tooltipShow",e),a.removeClass("tooltip-out").addClass("tooltip-in"),e}hide(){const t=this,{$el:e,$targetEl:o}=t;return t.visible=!1,t.opened=!1,o.trigger("tooltip:hide"),e.trigger("tooltip:hide"),t.emit("local::hide tooltipHide",t),e.addClass("tooltip-out").removeClass("tooltip-in"),t}render(){const t=this;if(t.params.render)return t.params.render.call(t,t);const{cssClass:e,text:o}=t.params;return`\n <div class="tooltip ${e||""}">\n <div class="tooltip-content">${o||""}</div>\n </div>\n `.trim()}setText(t){const e=this;return void 0===t||(e.params.text=t,e.text=t,e.$el&&e.$el.children(".tooltip-content").html(t),e.opened&&e.position()),e}init(){this.attachEvents()}destroy(){const t=this;t.$targetEl&&!t.destroyed&&(t.$targetEl.trigger("tooltip:beforedestroy"),t.emit("local::beforeDestroy tooltipBeforeDestroy",t),t.$el.remove(),t.$targetEl[0]&&delete t.$targetEl[0].f7Tooltip,t.detachEvents(),l(t),t.destroyed=!0)}}var c={name:"tooltip",static:{Tooltip:p},create(){const t=this;t.tooltip=n({defaultSelector:".tooltip",constructor:p,app:t,domProp:"f7Tooltip"}),t.tooltip.show=function(t){const e=o(t);if(0===e.length)return;const a=e[0].f7Tooltip;return a?(a.show(e[0]),a):void 0},t.tooltip.hide=function(t){const e=o(t);if(0===e.length)return;const a=e[0].f7Tooltip;return a?(a.hide(),a):void 0},t.tooltip.setText=function(t,e){const a=o(t);if(0===a.length)return;const i=a[0].f7Tooltip;return i?(i.setText(e),i):void 0}},params:{tooltip:{targetEl:null,delegated:!1,text:null,cssClass:null,render:null,offset:0,trigger:"hover",containerEl:void 0}},on:{tabMounted(t){const e=this;o(t).find(".tooltip-init").each((t=>{const a=o(t).attr("data-tooltip");a&&e.tooltip.create({targetEl:t,text:a})}))},tabBeforeRemove(t){o(t).find(".tooltip-init").each((t=>{t.f7Tooltip&&t.f7Tooltip.destroy()}))},pageInit(t){const e=this;t.$el.find(".tooltip-init").each((t=>{const a=o(t).attr("data-tooltip");a&&e.tooltip.create({targetEl:t,text:a})})),"ios"===e.theme&&t.view&&t.view.router.dynamicNavbar&&t.$navbarEl&&t.$navbarEl.length>0&&t.$navbarEl.find(".tooltip-init").each((t=>{const a=o(t).attr("data-tooltip");a&&e.tooltip.create({targetEl:t,text:a})}))},pageBeforeRemove(t){t.$el.find(".tooltip-init").each((t=>{t.f7Tooltip&&t.f7Tooltip.destroy()})),"ios"===this.theme&&t.view&&t.view.router.dynamicNavbar&&t.$navbarEl&&t.$navbarEl.length>0&&t.$navbarEl.find(".tooltip-init").each((t=>{t.f7Tooltip&&t.f7Tooltip.destroy()}))}},vnode:{"tooltip-init":{insert(t){const e=t.elm,a=o(e).attr("data-tooltip");a&&this.tooltip.create({targetEl:e,text:a})},update(t){const e=t.elm;e.f7Tooltip&&t&&t.data&&t.data.attrs&&t.data.attrs["data-tooltip"]&&e.f7Tooltip.setText(t.data.attrs["data-tooltip"])},destroy(t){const e=t.elm;e.f7Tooltip&&e.f7Tooltip.destroy()}}}};if(e){if(t.prototype.modules&&t.prototype.modules[c.name])return;t.use(c),t.instance&&(t.instance.useModuleParams(c,t.instance.params),t.instance.useModule(c))}return c}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
export default class TouchRipple {
|
|
3
|
+
constructor(app, $el, x, y) {
|
|
4
|
+
const ripple = this;
|
|
5
|
+
if (!$el) return undefined;
|
|
6
|
+
const {
|
|
7
|
+
left,
|
|
8
|
+
top,
|
|
9
|
+
width,
|
|
10
|
+
height
|
|
11
|
+
} = $el[0].getBoundingClientRect();
|
|
12
|
+
const center = {
|
|
13
|
+
x: x - left,
|
|
14
|
+
y: y - top
|
|
15
|
+
};
|
|
16
|
+
let diameter = Math.max((height ** 2 + width ** 2) ** 0.5, 48);
|
|
17
|
+
let isInset = false;
|
|
18
|
+
const insetElements = app.params.touch.touchRippleInsetElements || '';
|
|
19
|
+
|
|
20
|
+
if (insetElements && $el.is(insetElements)) {
|
|
21
|
+
isInset = true;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (isInset) {
|
|
25
|
+
diameter = Math.max(Math.min(width, height), 48);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!isInset && $el.css('overflow') === 'hidden') {
|
|
29
|
+
const distanceFromCenter = ((center.x - width / 2) ** 2 + (center.y - height / 2) ** 2) ** 0.5;
|
|
30
|
+
const scale = (diameter / 2 + distanceFromCenter) / (diameter / 2);
|
|
31
|
+
ripple.rippleTransform = `translate3d(0px, 0px, 0) scale(${scale})`;
|
|
32
|
+
} else {
|
|
33
|
+
// prettier-ignore
|
|
34
|
+
ripple.rippleTransform = `translate3d(${-center.x + width / 2}px, ${-center.y + height / 2}px, 0) scale(1)`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (isInset) {
|
|
38
|
+
$el.addClass('ripple-inset');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ripple.$rippleWaveEl = $(`<div class="ripple-wave" style="width: ${diameter}px; height: ${diameter}px; margin-top:-${diameter / 2}px; margin-left:-${diameter / 2}px; left:${center.x}px; top:${center.y}px; --f7-ripple-transform: ${ripple.rippleTransform}"></div>`);
|
|
42
|
+
$el.prepend(ripple.$rippleWaveEl);
|
|
43
|
+
ripple.$rippleWaveEl.animationEnd(() => {
|
|
44
|
+
if (!ripple.$rippleWaveEl) return;
|
|
45
|
+
if (ripple.$rippleWaveEl.hasClass('ripple-wave-out')) return;
|
|
46
|
+
ripple.$rippleWaveEl.addClass('ripple-wave-in');
|
|
47
|
+
|
|
48
|
+
if (ripple.shouldBeRemoved) {
|
|
49
|
+
ripple.out();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return ripple;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
destroy() {
|
|
56
|
+
let ripple = this;
|
|
57
|
+
|
|
58
|
+
if (ripple.$rippleWaveEl) {
|
|
59
|
+
ripple.$rippleWaveEl.remove();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
Object.keys(ripple).forEach(key => {
|
|
63
|
+
ripple[key] = null;
|
|
64
|
+
delete ripple[key];
|
|
65
|
+
});
|
|
66
|
+
ripple = null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
out() {
|
|
70
|
+
const ripple = this;
|
|
71
|
+
const {
|
|
72
|
+
$rippleWaveEl
|
|
73
|
+
} = this;
|
|
74
|
+
clearTimeout(ripple.removeTimeout);
|
|
75
|
+
$rippleWaveEl.addClass('ripple-wave-out');
|
|
76
|
+
ripple.removeTimeout = setTimeout(() => {
|
|
77
|
+
ripple.destroy();
|
|
78
|
+
}, 300);
|
|
79
|
+
$rippleWaveEl.animationEnd(() => {
|
|
80
|
+
clearTimeout(ripple.removeTimeout);
|
|
81
|
+
ripple.destroy();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
remove() {
|
|
86
|
+
const ripple = this;
|
|
87
|
+
if (ripple.shouldBeRemoved) return;
|
|
88
|
+
ripple.removeTimeout = setTimeout(() => {
|
|
89
|
+
ripple.destroy();
|
|
90
|
+
}, 400);
|
|
91
|
+
ripple.shouldBeRemoved = true;
|
|
92
|
+
|
|
93
|
+
if (ripple.$rippleWaveEl.hasClass('ripple-wave-in')) {
|
|
94
|
+
ripple.out();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import TouchRipple from './touch-ripple-class.js';
|
|
2
|
+
export default {
|
|
3
|
+
name: 'touch-ripple',
|
|
4
|
+
static: {
|
|
5
|
+
TouchRipple
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
create() {
|
|
9
|
+
const app = this;
|
|
10
|
+
app.touchRipple = {
|
|
11
|
+
create(...args) {
|
|
12
|
+
return new TouchRipple(...args);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
};
|