framework7 6.3.4 → 7.0.0-beta.3
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.umd.js +1 -0
- package/components/actions/actions-class.js +365 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.js +42 -1
- package/components/actions/actions.umd.js +1 -0
- package/components/app/app-class.d.ts +10 -10
- package/{esm/components → components}/app/app-class.js +107 -140
- package/components/app/app.less +3 -3
- package/{esm/components → components}/app/load-module.js +32 -32
- package/components/appbar/appbar.js +3 -1
- package/components/appbar/appbar.umd.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.umd.js +1 -0
- package/{esm/components → components}/autocomplete/autocomplete-class.js +241 -253
- 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.umd.js +1 -0
- package/{esm/components → components}/badge/badge.js +0 -0
- package/{esm/components → components}/block/block.js +0 -0
- package/{esm/components → components}/button/button.js +0 -0
- package/{esm/components → components}/calendar/calendar-class.js +676 -643
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +111 -1
- package/components/calendar/calendar.umd.js +1 -0
- 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.umd.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.umd.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.umd.js +1 -0
- package/{esm/components → components}/color-picker/color-picker-class.js +336 -349
- 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.umd.js +1 -0
- package/{esm/components → components}/color-picker/modules/alpha-slider.js +30 -19
- package/{esm/components → components}/color-picker/modules/brightness-slider.js +35 -24
- package/{esm/components → components}/color-picker/modules/current-color.js +4 -2
- package/{esm/components → components}/color-picker/modules/hex.js +27 -16
- package/{esm/components → components}/color-picker/modules/hs-spectrum.js +37 -25
- package/{esm/components → components}/color-picker/modules/hsb-sliders.js +54 -41
- package/{esm/components → components}/color-picker/modules/hue-slider.js +29 -18
- package/{esm/components → components}/color-picker/modules/initial-current-colors.js +14 -9
- package/{esm/components → components}/color-picker/modules/palette.js +14 -11
- package/{esm/components → components}/color-picker/modules/rgb-bars.js +42 -29
- package/{esm/components → components}/color-picker/modules/rgb-sliders.js +47 -34
- package/{esm/components → components}/color-picker/modules/sb-spectrum.js +38 -26
- package/{esm/components → components}/color-picker/modules/wheel.js +59 -47
- 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.umd.js +1 -0
- package/{esm/components → components}/data-table/data-table-class.js +40 -59
- 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.umd.js +1 -0
- package/{esm/components → components}/dialog/dialog-class.js +58 -67
- 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.umd.js +1 -0
- package/components/elevation/elevation.js +3 -1
- package/components/elevation/elevation.umd.js +1 -0
- package/components/fab/fab.js +181 -1
- package/components/fab/fab.umd.js +1 -0
- package/components/form/form.js +347 -1
- package/components/form/form.umd.js +1 -0
- package/components/gauge/gauge-class.js +306 -0
- package/components/gauge/gauge.js +99 -1
- package/components/gauge/gauge.umd.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.umd.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.umd.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.less +1 -1
- package/components/input/input.umd.js +1 -0
- package/components/lazy/lazy.js +283 -1
- package/components/lazy/lazy.umd.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 +113 -121
- 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.js +73 -1
- package/components/list-index/list-index.umd.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.less +1 -1
- package/components/login-screen/login-screen.umd.js +1 -0
- package/components/menu/menu.js +79 -1
- package/components/menu/menu.umd.js +1 -0
- package/{esm/components → components}/messagebar/messagebar-class.js +124 -152
- 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.umd.js +1 -0
- package/{esm/components → components}/messages/messages-class.js +162 -242
- 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.umd.js +1 -0
- package/{esm/components → components}/modal/custom-modal-class.js +16 -29
- package/{esm/components → components}/modal/modal-class.js +68 -83
- package/{esm/components → components}/modal/modal.js +8 -5
- package/{esm/components → components}/navbar/navbar.js +166 -171
- package/components/notification/notification-aurora.less +1 -1
- package/{esm/components → components}/notification/notification-class.js +65 -78
- 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.js +35 -1
- package/components/notification/notification.umd.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 +183 -214
- 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.umd.js +1 -0
- package/{esm/components → components}/panel/resizable-panel.js +30 -28
- package/{esm/components → components}/panel/swipe-panel.js +46 -44
- package/{esm/components → components}/photo-browser/photo-browser-class.js +206 -234
- package/components/photo-browser/photo-browser.js +73 -1
- package/components/photo-browser/photo-browser.umd.js +1 -0
- package/{esm/components → components}/picker/picker-class.js +233 -233
- package/{esm/components → components}/picker/picker-column.js +70 -72
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +64 -1
- package/components/picker/picker.umd.js +1 -0
- 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.umd.js +1 -0
- package/{esm/components → components}/popover/popover-class.js +72 -97
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.js +76 -1
- package/components/popover/popover.umd.js +1 -0
- package/{esm/components → components}/popup/popup-class.js +66 -81
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +41 -1
- package/components/popup/popup.less +21 -21
- package/components/popup/popup.umd.js +1 -0
- package/components/preloader/preloader.js +115 -1
- package/components/preloader/preloader.umd.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.umd.js +1 -0
- package/{esm/components → components}/pull-to-refresh/pull-to-refresh-class.js +101 -118
- package/components/pull-to-refresh/pull-to-refresh.js +70 -1
- package/components/pull-to-refresh/pull-to-refresh.umd.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.umd.js +1 -0
- package/{esm/components → components}/range/range-class.js +191 -192
- 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.umd.js +1 -0
- package/components/searchbar/remove-diacritics.js +275 -0
- package/{esm/components → components}/searchbar/searchbar-class.js +129 -146
- 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.less +1 -1
- package/components/searchbar/searchbar.umd.js +1 -0
- package/{esm/components → components}/sheet/sheet-class.js +87 -106
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +68 -1
- package/components/sheet/sheet.less +16 -16
- package/components/sheet/sheet.umd.js +1 -0
- 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.less +1 -1
- package/components/skeleton/skeleton.umd.js +1 -0
- package/{esm/components → components}/smart-select/smart-select-class.js +284 -296
- package/components/smart-select/smart-select.js +149 -1
- package/components/smart-select/smart-select.umd.js +1 -0
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +293 -1
- package/components/sortable/sortable.umd.js +1 -0
- package/{esm/components → components}/statusbar/statusbar.js +48 -41
- package/{esm/components → components}/stepper/stepper-class.js +104 -115
- 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.umd.js +1 -0
- package/{esm/components → components}/subnavbar/subnavbar.js +3 -2
- 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.umd.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.less +1 -1
- package/components/swiper/swiper.umd.js +1 -0
- package/components/tabs/tabs.js +272 -1
- package/components/tabs/tabs.umd.js +1 -0
- package/{esm/components → components}/text-editor/text-editor-class.js +170 -182
- 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.umd.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.umd.js +1 -0
- package/components/toast/toast-class.js +119 -0
- package/components/toast/toast.js +43 -1
- package/components/toast/toast.umd.js +1 -0
- package/{esm/components → components}/toggle/toggle-class.js +46 -63
- 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.umd.js +1 -0
- package/{esm/components → components}/toolbar/toolbar.js +63 -59
- package/{esm/components → components}/tooltip/tooltip-class.js +95 -106
- package/components/tooltip/tooltip.js +144 -1
- package/components/tooltip/tooltip.umd.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.umd.js +1 -0
- package/components/typography/typography.js +3 -1
- package/components/typography/typography.umd.js +1 -0
- package/{esm/components → components}/view/resizable-view.js +23 -21
- package/{esm/components → components}/view/view-class.js +48 -67
- package/{esm/components → components}/view/view.js +37 -28
- package/{esm/components → components}/virtual-list/virtual-list-class.js +153 -170
- package/components/virtual-list/virtual-list.js +19 -1
- package/components/virtual-list/virtual-list.umd.js +1 -0
- package/framework7-bundle-rtl.css +268 -852
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +268 -852
- package/{esm/framework7-bundle.js → framework7-bundle.esm.js} +2 -2
- package/framework7-bundle.js +30782 -31429
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -2
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/{esm/framework7-lite-bundle.js → framework7-lite-bundle.esm.js} +2 -2
- package/{esm/framework7-lite.js → framework7-lite.esm.js} +2 -2
- package/framework7-rtl.css +52 -56
- package/framework7-rtl.min.css +3 -3
- package/{types/types.d.ts → framework7-types.d.ts} +0 -0
- package/framework7.css +52 -56
- package/framework7.d.ts +81 -81
- package/{esm/framework7.js → framework7.esm.js} +2 -2
- package/framework7.js +3386 -4049
- 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 +17 -16
- 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.d.ts +2 -0
- package/{esm/modules → modules}/component/component.js +23 -17
- package/{esm/modules → modules}/component/custom-components.js +0 -0
- package/{esm/modules → modules}/component/eventslisteners.js +14 -18
- package/modules/component/parse-component.js +80 -0
- package/{esm/modules → modules}/component/patch.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/h.js +0 -0
- 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/{esm/modules → modules}/component/snabbdom/snabbdom.bundle.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/snabbdom.js +6 -18
- package/{esm/modules → modules}/component/snabbdom/thunk.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/tovnode.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/vnode.js +0 -0
- package/{esm/modules → modules}/component/vdom.js +106 -130
- package/{esm/modules → modules}/demo-module.js +15 -7
- package/{esm/modules → modules}/device/device.js +12 -11
- package/{esm/modules → modules}/history/history.js +2 -1
- package/{esm/modules → modules}/request/request.js +2 -2
- 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 +117 -117
- package/{esm/modules → modules}/router/clear-previous-history.js +8 -8
- package/modules/router/component-loader.js +174 -0
- package/{esm/modules → modules}/router/modal.js +49 -49
- package/{esm/modules → modules}/router/navigate.js +140 -221
- package/{esm/modules → modules}/router/process-route-queue.js +20 -17
- package/{esm/modules → modules}/router/redirect.js +7 -11
- package/{esm/modules → modules}/router/router-class.js +411 -432
- package/{esm/modules → modules}/router/router.js +5 -3
- package/{esm/modules → modules}/router/swipe-back.js +143 -177
- package/{esm/modules → modules}/router/tab.js +46 -46
- package/{esm/modules → modules}/service-worker/service-worker.js +41 -37
- package/modules/store/create-store.js +149 -0
- package/{esm/modules → modules}/store/store.js +2 -2
- package/{esm/modules → modules}/support/support.js +1 -1
- package/{esm/modules → modules}/touch/touch.js +71 -70
- package/{esm/modules → modules}/utils/utils.js +2 -2
- package/package.json +252 -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 +32 -37
- 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 +61 -47
- 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 -2078
- 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 -583
- 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 -322
- 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 -296
- 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 -415
- 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/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.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 -310
- 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 -286
- 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/modules/component/$h.js +0 -20
- package/esm/modules/component/$jsx.js +0 -24
- package/esm/modules/component/component-class.js +0 -402
- package/esm/modules/component/parse-component.js +0 -70
- 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/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 -18
- 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 -121
- 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 -46
- 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 -94
- 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,94 +0,0 @@
|
|
|
1
|
-
import $ from '../../shared/dom7';
|
|
2
|
-
import ConstructorMethods from '../../shared/constructor-methods';
|
|
3
|
-
import ColorPicker from './color-picker-class';
|
|
4
|
-
export default {
|
|
5
|
-
name: 'colorPicker',
|
|
6
|
-
static: {
|
|
7
|
-
ColorPicker: ColorPicker
|
|
8
|
-
},
|
|
9
|
-
create: function create() {
|
|
10
|
-
var app = this;
|
|
11
|
-
app.colorPicker = ConstructorMethods({
|
|
12
|
-
defaultSelector: '.color-picker',
|
|
13
|
-
constructor: ColorPicker,
|
|
14
|
-
app: app,
|
|
15
|
-
domProp: 'f7ColorPicker'
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
app.colorPicker.close = function close(el) {
|
|
19
|
-
if (el === void 0) {
|
|
20
|
-
el = '.color-picker';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var $el = $(el);
|
|
24
|
-
if ($el.length === 0) return;
|
|
25
|
-
var colorPicker = $el[0].f7ColorPicker;
|
|
26
|
-
if (!colorPicker || colorPicker && !colorPicker.opened) return;
|
|
27
|
-
colorPicker.close();
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
params: {
|
|
31
|
-
colorPicker: {
|
|
32
|
-
// Color picker settings
|
|
33
|
-
value: null,
|
|
34
|
-
modules: ['wheel'],
|
|
35
|
-
palette: [['#FFEBEE', '#FFCDD2', '#EF9A9A', '#E57373', '#EF5350', '#F44336', '#E53935', '#D32F2F', '#C62828', '#B71C1C'], ['#F3E5F5', '#E1BEE7', '#CE93D8', '#BA68C8', '#AB47BC', '#9C27B0', '#8E24AA', '#7B1FA2', '#6A1B9A', '#4A148C'], ['#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E'], ['#E1F5FE', '#B3E5FC', '#81D4FA', '#4FC3F7', '#29B6F6', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B'], ['#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40'], ['#F1F8E9', '#DCEDC8', '#C5E1A5', '#AED581', '#9CCC65', '#8BC34A', '#7CB342', '#689F38', '#558B2F', '#33691E'], ['#FFFDE7', '#FFF9C4', '#FFF59D', '#FFF176', '#FFEE58', '#FFEB3B', '#FDD835', '#FBC02D', '#F9A825', '#F57F17'], ['#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100']],
|
|
36
|
-
groupedModules: false,
|
|
37
|
-
centerModules: true,
|
|
38
|
-
sliderLabel: false,
|
|
39
|
-
sliderValue: false,
|
|
40
|
-
sliderValueEdiable: false,
|
|
41
|
-
barLabel: false,
|
|
42
|
-
barValue: false,
|
|
43
|
-
barValueEdiable: false,
|
|
44
|
-
hexLabel: false,
|
|
45
|
-
hexValueEditable: false,
|
|
46
|
-
redLabelText: 'R',
|
|
47
|
-
greenLabelText: 'G',
|
|
48
|
-
blueLabelText: 'B',
|
|
49
|
-
hueLabelText: 'H',
|
|
50
|
-
saturationLabelText: 'S',
|
|
51
|
-
brightnessLabelText: 'B',
|
|
52
|
-
hexLabelText: 'HEX',
|
|
53
|
-
alphaLabelText: 'A',
|
|
54
|
-
// Common opener settings
|
|
55
|
-
containerEl: null,
|
|
56
|
-
openIn: 'popover',
|
|
57
|
-
// or 'popover' or 'sheet' or 'popup' or 'page' or 'auto'
|
|
58
|
-
openInPhone: 'popup',
|
|
59
|
-
// or 'popover' or 'sheet' or 'popup' or 'page'
|
|
60
|
-
popupPush: false,
|
|
61
|
-
popupSwipeToClose: undefined,
|
|
62
|
-
sheetPush: false,
|
|
63
|
-
sheetSwipeToClose: undefined,
|
|
64
|
-
formatValue: null,
|
|
65
|
-
targetEl: null,
|
|
66
|
-
targetElSetBackgroundColor: false,
|
|
67
|
-
inputEl: null,
|
|
68
|
-
inputReadOnly: true,
|
|
69
|
-
closeByOutsideClick: true,
|
|
70
|
-
scrollToInput: true,
|
|
71
|
-
toolbarSheet: true,
|
|
72
|
-
toolbarPopover: false,
|
|
73
|
-
toolbarCloseText: 'Done',
|
|
74
|
-
navbarPopup: true,
|
|
75
|
-
navbarCloseText: 'Done',
|
|
76
|
-
navbarTitleText: 'Color',
|
|
77
|
-
navbarBackLinkText: 'Back',
|
|
78
|
-
cssClass: null,
|
|
79
|
-
routableModals: false,
|
|
80
|
-
view: null,
|
|
81
|
-
url: 'color/',
|
|
82
|
-
backdrop: null,
|
|
83
|
-
closeByBackdropClick: true,
|
|
84
|
-
// Render functions
|
|
85
|
-
renderToolbar: null,
|
|
86
|
-
renderNavbar: null,
|
|
87
|
-
renderInline: null,
|
|
88
|
-
renderPopover: null,
|
|
89
|
-
renderSheet: null,
|
|
90
|
-
renderPopup: null,
|
|
91
|
-
render: null
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import $ from '../../shared/dom7';
|
|
2
|
-
import DataTable from './data-table-class';
|
|
3
|
-
import ConstructorMethods from '../../shared/constructor-methods';
|
|
4
|
-
export default {
|
|
5
|
-
name: 'dataTable',
|
|
6
|
-
static: {
|
|
7
|
-
DataTable: DataTable
|
|
8
|
-
},
|
|
9
|
-
create: function create() {
|
|
10
|
-
var app = this;
|
|
11
|
-
app.dataTable = ConstructorMethods({
|
|
12
|
-
defaultSelector: '.data-table',
|
|
13
|
-
constructor: DataTable,
|
|
14
|
-
app: app,
|
|
15
|
-
domProp: 'f7DataTable'
|
|
16
|
-
});
|
|
17
|
-
},
|
|
18
|
-
on: {
|
|
19
|
-
tabBeforeRemove: function tabBeforeRemove(tabEl) {
|
|
20
|
-
var app = this;
|
|
21
|
-
$(tabEl).find('.data-table-init').each(function (tableEl) {
|
|
22
|
-
app.dataTable.destroy(tableEl);
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
tabMounted: function tabMounted(tabEl) {
|
|
26
|
-
var app = this;
|
|
27
|
-
$(tabEl).find('.data-table-init').each(function (tableEl) {
|
|
28
|
-
app.dataTable.create({
|
|
29
|
-
el: tableEl
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
pageBeforeRemove: function pageBeforeRemove(page) {
|
|
34
|
-
var app = this;
|
|
35
|
-
page.$el.find('.data-table-init').each(function (tableEl) {
|
|
36
|
-
app.dataTable.destroy(tableEl);
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
pageInit: function pageInit(page) {
|
|
40
|
-
var app = this;
|
|
41
|
-
page.$el.find('.data-table-init').each(function (tableEl) {
|
|
42
|
-
app.dataTable.create({
|
|
43
|
-
el: tableEl
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
vnode: {
|
|
49
|
-
'data-table-init': {
|
|
50
|
-
insert: function insert(vnode) {
|
|
51
|
-
var app = this;
|
|
52
|
-
var tableEl = vnode.elm;
|
|
53
|
-
app.dataTable.create({
|
|
54
|
-
el: tableEl
|
|
55
|
-
});
|
|
56
|
-
},
|
|
57
|
-
destroy: function destroy(vnode) {
|
|
58
|
-
var app = this;
|
|
59
|
-
var tableEl = vnode.elm;
|
|
60
|
-
app.dataTable.destroy(tableEl);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import { extend, iosPreloaderContent, mdPreloaderContent, auroraPreloaderContent } from '../../shared/utils';
|
|
4
|
-
import Dialog from './dialog-class';
|
|
5
|
-
import ModalMethods from '../../shared/modal-methods';
|
|
6
|
-
export default {
|
|
7
|
-
name: 'dialog',
|
|
8
|
-
params: {
|
|
9
|
-
dialog: {
|
|
10
|
-
title: undefined,
|
|
11
|
-
buttonOk: 'OK',
|
|
12
|
-
buttonCancel: 'Cancel',
|
|
13
|
-
usernamePlaceholder: 'Username',
|
|
14
|
-
passwordPlaceholder: 'Password',
|
|
15
|
-
preloaderTitle: 'Loading... ',
|
|
16
|
-
progressTitle: 'Loading... ',
|
|
17
|
-
backdrop: true,
|
|
18
|
-
closeByBackdropClick: false,
|
|
19
|
-
destroyPredefinedDialogs: true,
|
|
20
|
-
keyboardActions: true,
|
|
21
|
-
autoFocus: true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
static: {
|
|
25
|
-
Dialog: Dialog
|
|
26
|
-
},
|
|
27
|
-
create: function create() {
|
|
28
|
-
var app = this;
|
|
29
|
-
|
|
30
|
-
function defaultDialogTitle() {
|
|
31
|
-
return app.params.dialog.title || app.name;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var destroyOnClose = app.params.dialog.destroyPredefinedDialogs;
|
|
35
|
-
var keyboardActions = app.params.dialog.keyboardActions;
|
|
36
|
-
var autoFocus = app.params.dialog.autoFocus;
|
|
37
|
-
var autoFocusHandler = autoFocus ? {
|
|
38
|
-
on: {
|
|
39
|
-
opened: function opened(dialog) {
|
|
40
|
-
dialog.$el.find('input').eq(0).focus();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} : {};
|
|
44
|
-
app.dialog = extend(ModalMethods({
|
|
45
|
-
app: app,
|
|
46
|
-
constructor: Dialog,
|
|
47
|
-
defaultSelector: '.dialog.modal-in'
|
|
48
|
-
}), {
|
|
49
|
-
// Shortcuts
|
|
50
|
-
alert: function alert() {
|
|
51
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
|
-
args[_key] = arguments[_key];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var text = args[0],
|
|
56
|
-
title = args[1],
|
|
57
|
-
callbackOk = args[2];
|
|
58
|
-
|
|
59
|
-
if (args.length === 2 && typeof args[1] === 'function') {
|
|
60
|
-
text = args[0];
|
|
61
|
-
callbackOk = args[1];
|
|
62
|
-
title = args[2];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return new Dialog(app, {
|
|
66
|
-
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
|
|
67
|
-
text: text,
|
|
68
|
-
buttons: [{
|
|
69
|
-
text: app.params.dialog.buttonOk,
|
|
70
|
-
bold: true,
|
|
71
|
-
onClick: callbackOk,
|
|
72
|
-
keyCodes: keyboardActions ? [13, 27] : null
|
|
73
|
-
}],
|
|
74
|
-
destroyOnClose: destroyOnClose
|
|
75
|
-
}).open();
|
|
76
|
-
},
|
|
77
|
-
prompt: function prompt() {
|
|
78
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
79
|
-
args[_key2] = arguments[_key2];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
var text = args[0],
|
|
83
|
-
title = args[1],
|
|
84
|
-
callbackOk = args[2],
|
|
85
|
-
callbackCancel = args[3],
|
|
86
|
-
defaultValue = args[4];
|
|
87
|
-
|
|
88
|
-
if (typeof args[1] === 'function') {
|
|
89
|
-
text = args[0];
|
|
90
|
-
callbackOk = args[1];
|
|
91
|
-
callbackCancel = args[2];
|
|
92
|
-
defaultValue = args[3];
|
|
93
|
-
title = args[4];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
defaultValue = typeof defaultValue === 'undefined' || defaultValue === null ? '' : defaultValue;
|
|
97
|
-
return new Dialog(app, _extends({
|
|
98
|
-
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
|
|
99
|
-
text: text,
|
|
100
|
-
content: "<div class=\"dialog-input-field input\"><input type=\"text\" class=\"dialog-input\" value=\"" + defaultValue + "\"></div>",
|
|
101
|
-
buttons: [{
|
|
102
|
-
text: app.params.dialog.buttonCancel,
|
|
103
|
-
keyCodes: keyboardActions ? [27] : null,
|
|
104
|
-
color: app.theme === 'aurora' ? 'gray' : null
|
|
105
|
-
}, {
|
|
106
|
-
text: app.params.dialog.buttonOk,
|
|
107
|
-
bold: true,
|
|
108
|
-
keyCodes: keyboardActions ? [13] : null
|
|
109
|
-
}],
|
|
110
|
-
onClick: function onClick(dialog, index) {
|
|
111
|
-
var inputValue = dialog.$el.find('.dialog-input').val();
|
|
112
|
-
if (index === 0 && callbackCancel) callbackCancel(inputValue);
|
|
113
|
-
if (index === 1 && callbackOk) callbackOk(inputValue);
|
|
114
|
-
},
|
|
115
|
-
destroyOnClose: destroyOnClose
|
|
116
|
-
}, autoFocusHandler)).open();
|
|
117
|
-
},
|
|
118
|
-
confirm: function confirm() {
|
|
119
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
120
|
-
args[_key3] = arguments[_key3];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var text = args[0],
|
|
124
|
-
title = args[1],
|
|
125
|
-
callbackOk = args[2],
|
|
126
|
-
callbackCancel = args[3];
|
|
127
|
-
|
|
128
|
-
if (typeof args[1] === 'function') {
|
|
129
|
-
text = args[0];
|
|
130
|
-
callbackOk = args[1];
|
|
131
|
-
callbackCancel = args[2];
|
|
132
|
-
title = args[3];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return new Dialog(app, {
|
|
136
|
-
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
|
|
137
|
-
text: text,
|
|
138
|
-
buttons: [{
|
|
139
|
-
text: app.params.dialog.buttonCancel,
|
|
140
|
-
onClick: callbackCancel,
|
|
141
|
-
keyCodes: keyboardActions ? [27] : null,
|
|
142
|
-
color: app.theme === 'aurora' ? 'gray' : null
|
|
143
|
-
}, {
|
|
144
|
-
text: app.params.dialog.buttonOk,
|
|
145
|
-
bold: true,
|
|
146
|
-
onClick: callbackOk,
|
|
147
|
-
keyCodes: keyboardActions ? [13] : null
|
|
148
|
-
}],
|
|
149
|
-
destroyOnClose: destroyOnClose
|
|
150
|
-
}).open();
|
|
151
|
-
},
|
|
152
|
-
login: function login() {
|
|
153
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
154
|
-
args[_key4] = arguments[_key4];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
var text = args[0],
|
|
158
|
-
title = args[1],
|
|
159
|
-
callbackOk = args[2],
|
|
160
|
-
callbackCancel = args[3];
|
|
161
|
-
|
|
162
|
-
if (typeof args[1] === 'function') {
|
|
163
|
-
text = args[0];
|
|
164
|
-
callbackOk = args[1];
|
|
165
|
-
callbackCancel = args[2];
|
|
166
|
-
title = args[3];
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return new Dialog(app, _extends({
|
|
170
|
-
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
|
|
171
|
-
text: text,
|
|
172
|
-
// prettier-ignore
|
|
173
|
-
content: "\n <div class=\"dialog-input-field dialog-input-double input\">\n <input type=\"text\" name=\"dialog-username\" placeholder=\"" + app.params.dialog.usernamePlaceholder + "\" class=\"dialog-input\">\n </div>\n <div class=\"dialog-input-field dialog-input-double input\">\n <input type=\"password\" name=\"dialog-password\" placeholder=\"" + app.params.dialog.passwordPlaceholder + "\" class=\"dialog-input\">\n </div>",
|
|
174
|
-
buttons: [{
|
|
175
|
-
text: app.params.dialog.buttonCancel,
|
|
176
|
-
keyCodes: keyboardActions ? [27] : null,
|
|
177
|
-
color: app.theme === 'aurora' ? 'gray' : null
|
|
178
|
-
}, {
|
|
179
|
-
text: app.params.dialog.buttonOk,
|
|
180
|
-
bold: true,
|
|
181
|
-
keyCodes: keyboardActions ? [13] : null
|
|
182
|
-
}],
|
|
183
|
-
onClick: function onClick(dialog, index) {
|
|
184
|
-
var username = dialog.$el.find('[name="dialog-username"]').val();
|
|
185
|
-
var password = dialog.$el.find('[name="dialog-password"]').val();
|
|
186
|
-
if (index === 0 && callbackCancel) callbackCancel(username, password);
|
|
187
|
-
if (index === 1 && callbackOk) callbackOk(username, password);
|
|
188
|
-
},
|
|
189
|
-
destroyOnClose: destroyOnClose
|
|
190
|
-
}, autoFocusHandler)).open();
|
|
191
|
-
},
|
|
192
|
-
password: function password() {
|
|
193
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
194
|
-
args[_key5] = arguments[_key5];
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
var text = args[0],
|
|
198
|
-
title = args[1],
|
|
199
|
-
callbackOk = args[2],
|
|
200
|
-
callbackCancel = args[3];
|
|
201
|
-
|
|
202
|
-
if (typeof args[1] === 'function') {
|
|
203
|
-
text = args[0];
|
|
204
|
-
callbackOk = args[1];
|
|
205
|
-
callbackCancel = args[2];
|
|
206
|
-
title = args[3];
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return new Dialog(app, _extends({
|
|
210
|
-
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
|
|
211
|
-
text: text,
|
|
212
|
-
// prettier-ignore
|
|
213
|
-
content: "\n <div class=\"dialog-input-field input\">\n <input type=\"password\" name=\"dialog-password\" placeholder=\"" + app.params.dialog.passwordPlaceholder + "\" class=\"dialog-input\">\n </div>",
|
|
214
|
-
buttons: [{
|
|
215
|
-
text: app.params.dialog.buttonCancel,
|
|
216
|
-
keyCodes: keyboardActions ? [27] : null,
|
|
217
|
-
color: app.theme === 'aurora' ? 'gray' : null
|
|
218
|
-
}, {
|
|
219
|
-
text: app.params.dialog.buttonOk,
|
|
220
|
-
bold: true,
|
|
221
|
-
keyCodes: keyboardActions ? [13] : null
|
|
222
|
-
}],
|
|
223
|
-
onClick: function onClick(dialog, index) {
|
|
224
|
-
var password = dialog.$el.find('[name="dialog-password"]').val();
|
|
225
|
-
if (index === 0 && callbackCancel) callbackCancel(password);
|
|
226
|
-
if (index === 1 && callbackOk) callbackOk(password);
|
|
227
|
-
},
|
|
228
|
-
destroyOnClose: destroyOnClose
|
|
229
|
-
}, autoFocusHandler)).open();
|
|
230
|
-
},
|
|
231
|
-
preloader: function preloader(title, color) {
|
|
232
|
-
var preloaders = {
|
|
233
|
-
iosPreloaderContent: iosPreloaderContent,
|
|
234
|
-
mdPreloaderContent: mdPreloaderContent,
|
|
235
|
-
auroraPreloaderContent: auroraPreloaderContent
|
|
236
|
-
};
|
|
237
|
-
var preloaderInner = preloaders[app.theme + "PreloaderContent"] || '';
|
|
238
|
-
return new Dialog(app, {
|
|
239
|
-
title: typeof title === 'undefined' || title === null ? app.params.dialog.preloaderTitle : title,
|
|
240
|
-
// prettier-ignore
|
|
241
|
-
content: "<div class=\"preloader" + (color ? " color-" + color : '') + "\">" + preloaderInner + "</div>",
|
|
242
|
-
cssClass: 'dialog-preloader',
|
|
243
|
-
destroyOnClose: destroyOnClose
|
|
244
|
-
}).open();
|
|
245
|
-
},
|
|
246
|
-
progress: function progress() {
|
|
247
|
-
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
248
|
-
args[_key6] = arguments[_key6];
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
var title = args[0],
|
|
252
|
-
progress = args[1],
|
|
253
|
-
color = args[2];
|
|
254
|
-
|
|
255
|
-
if (args.length === 2) {
|
|
256
|
-
if (typeof args[0] === 'number') {
|
|
257
|
-
progress = args[0];
|
|
258
|
-
color = args[1];
|
|
259
|
-
title = args[2];
|
|
260
|
-
} else if (typeof args[0] === 'string' && typeof args[1] === 'string') {
|
|
261
|
-
title = args[0];
|
|
262
|
-
color = args[1];
|
|
263
|
-
progress = args[2];
|
|
264
|
-
}
|
|
265
|
-
} else if (args.length === 1) {
|
|
266
|
-
if (typeof args[0] === 'number') {
|
|
267
|
-
progress = args[0];
|
|
268
|
-
title = args[1];
|
|
269
|
-
color = args[2];
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
var infinite = typeof progress === 'undefined';
|
|
274
|
-
var dialog = new Dialog(app, {
|
|
275
|
-
title: typeof title === 'undefined' ? app.params.dialog.progressTitle : title,
|
|
276
|
-
cssClass: 'dialog-progress',
|
|
277
|
-
// prettier-ignore
|
|
278
|
-
content: "\n <div class=\"progressbar" + (infinite ? '-infinite' : '') + (color ? " color-" + color : '') + "\">\n " + (!infinite ? '<span></span>' : '') + "\n </div>\n ",
|
|
279
|
-
destroyOnClose: destroyOnClose
|
|
280
|
-
});
|
|
281
|
-
if (!infinite) dialog.setProgress(progress);
|
|
282
|
-
return dialog.open();
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import $ from '../../shared/dom7';
|
|
4
|
-
import { bindMethods, getTranslate, nextFrame } from '../../shared/utils';
|
|
5
|
-
var Fab = {
|
|
6
|
-
morphOpen: function morphOpen(fabEl, targetEl) {
|
|
7
|
-
var app = this;
|
|
8
|
-
var $fabEl = $(fabEl);
|
|
9
|
-
var $targetEl = $(targetEl);
|
|
10
|
-
if ($targetEl.length === 0) return;
|
|
11
|
-
$targetEl.transition(0).addClass('fab-morph-target-visible');
|
|
12
|
-
var target = {
|
|
13
|
-
width: $targetEl[0].offsetWidth,
|
|
14
|
-
height: $targetEl[0].offsetHeight,
|
|
15
|
-
offset: $targetEl.offset(),
|
|
16
|
-
borderRadius: $targetEl.css('border-radius'),
|
|
17
|
-
zIndex: $targetEl.css('z-index')
|
|
18
|
-
};
|
|
19
|
-
var fab = {
|
|
20
|
-
width: $fabEl[0].offsetWidth,
|
|
21
|
-
height: $fabEl[0].offsetHeight,
|
|
22
|
-
offset: $fabEl.offset(),
|
|
23
|
-
translateX: getTranslate($fabEl[0], 'x'),
|
|
24
|
-
translateY: getTranslate($fabEl[0], 'y')
|
|
25
|
-
};
|
|
26
|
-
$fabEl[0].f7FabMorphData = {
|
|
27
|
-
$targetEl: $targetEl,
|
|
28
|
-
target: target,
|
|
29
|
-
fab: fab
|
|
30
|
-
};
|
|
31
|
-
var diffX = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;
|
|
32
|
-
var diffY = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;
|
|
33
|
-
var scaleX = target.width / fab.width;
|
|
34
|
-
var scaleY = target.height / fab.height;
|
|
35
|
-
var borderRadius = Math.ceil(parseInt(target.borderRadius, 10) / Math.max(scaleX, scaleY));
|
|
36
|
-
if (borderRadius > 0) borderRadius += 2;
|
|
37
|
-
|
|
38
|
-
$fabEl[0].f7FabMorphResizeHandler = function resizeHandler() {
|
|
39
|
-
$fabEl.transition(0).transform('');
|
|
40
|
-
$targetEl.transition(0);
|
|
41
|
-
target.width = $targetEl[0].offsetWidth;
|
|
42
|
-
target.height = $targetEl[0].offsetHeight;
|
|
43
|
-
target.offset = $targetEl.offset();
|
|
44
|
-
fab.offset = $fabEl.offset();
|
|
45
|
-
var diffXNew = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;
|
|
46
|
-
var diffYNew = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;
|
|
47
|
-
var scaleXNew = target.width / fab.width;
|
|
48
|
-
var scaleYNew = target.height / fab.height;
|
|
49
|
-
$fabEl.transform("translate3d(" + -diffXNew + "px, " + -diffYNew + "px, 0) scale(" + scaleXNew + ", " + scaleYNew + ")");
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
$targetEl.css('opacity', 0).transform("scale(" + 1 / scaleX + ", " + 1 / scaleY + ")");
|
|
53
|
-
$fabEl.addClass('fab-opened').css('z-index', target.zIndex - 1).transform("translate3d(" + -diffX + "px, " + -diffY + "px, 0)");
|
|
54
|
-
$fabEl.transitionEnd(function () {
|
|
55
|
-
$targetEl.transition('');
|
|
56
|
-
nextFrame(function () {
|
|
57
|
-
$targetEl.css('opacity', 1).transform('scale(1,1)');
|
|
58
|
-
$fabEl.transform("translate3d(" + -diffX + "px, " + -diffY + "px, 0) scale(" + scaleX + ", " + scaleY + ")").css('border-radius', borderRadius + "px").css('box-shadow', 'none').css('opacity', '0');
|
|
59
|
-
});
|
|
60
|
-
app.on('resize', $fabEl[0].f7FabMorphResizeHandler);
|
|
61
|
-
|
|
62
|
-
if ($targetEl.parents('.page-content').length > 0) {
|
|
63
|
-
$targetEl.parents('.page-content').on('scroll', $fabEl[0].f7FabMorphResizeHandler);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
morphClose: function morphClose(fabEl) {
|
|
68
|
-
var app = this;
|
|
69
|
-
var $fabEl = $(fabEl);
|
|
70
|
-
var morphData = $fabEl[0].f7FabMorphData;
|
|
71
|
-
if (!morphData) return;
|
|
72
|
-
var $targetEl = morphData.$targetEl,
|
|
73
|
-
target = morphData.target,
|
|
74
|
-
fab = morphData.fab;
|
|
75
|
-
if ($targetEl.length === 0) return;
|
|
76
|
-
var diffX = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;
|
|
77
|
-
var diffY = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;
|
|
78
|
-
var scaleX = target.width / fab.width;
|
|
79
|
-
var scaleY = target.height / fab.height;
|
|
80
|
-
app.off('resize', $fabEl[0].f7FabMorphResizeHandler);
|
|
81
|
-
|
|
82
|
-
if ($targetEl.parents('.page-content').length > 0) {
|
|
83
|
-
$targetEl.parents('.page-content').off('scroll', $fabEl[0].f7FabMorphResizeHandler);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
$targetEl.css('opacity', 0).transform("scale(" + 1 / scaleX + ", " + 1 / scaleY + ")");
|
|
87
|
-
$fabEl.transition('').css('box-shadow', '').css('border-radius', '').css('opacity', '1').transform("translate3d(" + -diffX + "px, " + -diffY + "px, 0)");
|
|
88
|
-
$fabEl.transitionEnd(function () {
|
|
89
|
-
$fabEl.css('z-index', '').removeClass('fab-opened').transform('');
|
|
90
|
-
nextFrame(function () {
|
|
91
|
-
$fabEl.transitionEnd(function () {
|
|
92
|
-
$targetEl.removeClass('fab-morph-target-visible').css('opacity', '').transform('').transition('');
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
},
|
|
97
|
-
open: function open(fabEl, targetEl) {
|
|
98
|
-
var app = this;
|
|
99
|
-
var $fabEl = $(fabEl).eq(0);
|
|
100
|
-
var $buttonsEl = $fabEl.find('.fab-buttons');
|
|
101
|
-
if (!$fabEl.length) return;
|
|
102
|
-
if ($fabEl.hasClass('fab-opened')) return;
|
|
103
|
-
if (!$buttonsEl.length && !$fabEl.hasClass('fab-morph')) return;
|
|
104
|
-
|
|
105
|
-
if (app.fab.openedEl) {
|
|
106
|
-
if (app.fab.openedEl === $fabEl[0]) return;
|
|
107
|
-
app.fab.close(app.fab.openedEl);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
app.fab.openedEl = $fabEl[0];
|
|
111
|
-
|
|
112
|
-
if ($fabEl.hasClass('fab-morph')) {
|
|
113
|
-
app.fab.morphOpen($fabEl, targetEl || $fabEl.attr('data-morph-to'));
|
|
114
|
-
} else {
|
|
115
|
-
$fabEl.addClass('fab-opened');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
$fabEl.siblings('.fab-backdrop').addClass('backdrop-in');
|
|
119
|
-
$fabEl.trigger('fab:open');
|
|
120
|
-
},
|
|
121
|
-
close: function close(fabEl) {
|
|
122
|
-
if (fabEl === void 0) {
|
|
123
|
-
fabEl = '.fab-opened';
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
var app = this;
|
|
127
|
-
var $fabEl = $(fabEl).eq(0);
|
|
128
|
-
var $buttonsEl = $fabEl.find('.fab-buttons');
|
|
129
|
-
if (!$fabEl.length) return;
|
|
130
|
-
if (!$fabEl.hasClass('fab-opened')) return;
|
|
131
|
-
if (!$buttonsEl.length && !$fabEl.hasClass('fab-morph')) return;
|
|
132
|
-
app.fab.openedEl = null;
|
|
133
|
-
|
|
134
|
-
if ($fabEl.hasClass('fab-morph')) {
|
|
135
|
-
app.fab.morphClose($fabEl);
|
|
136
|
-
} else {
|
|
137
|
-
$fabEl.removeClass('fab-opened');
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
$fabEl.siblings('.fab-backdrop').removeClass('backdrop-in');
|
|
141
|
-
$fabEl.trigger('fab:close');
|
|
142
|
-
},
|
|
143
|
-
toggle: function toggle(fabEl) {
|
|
144
|
-
var app = this;
|
|
145
|
-
var $fabEl = $(fabEl);
|
|
146
|
-
if (!$fabEl.hasClass('fab-opened')) app.fab.open(fabEl);else app.fab.close(fabEl);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
export default {
|
|
150
|
-
name: 'fab',
|
|
151
|
-
create: function create() {
|
|
152
|
-
var app = this;
|
|
153
|
-
bindMethods(app, {
|
|
154
|
-
fab: _extends({
|
|
155
|
-
openedEl: null
|
|
156
|
-
}, Fab)
|
|
157
|
-
});
|
|
158
|
-
},
|
|
159
|
-
clicks: {
|
|
160
|
-
'.fab > a': function open($clickedEl) {
|
|
161
|
-
var app = this;
|
|
162
|
-
app.fab.toggle($clickedEl.parents('.fab'));
|
|
163
|
-
},
|
|
164
|
-
'.fab-open': function open($clickedEl, data) {
|
|
165
|
-
if (data === void 0) {
|
|
166
|
-
data = {};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
var app = this;
|
|
170
|
-
app.fab.open(data.fab);
|
|
171
|
-
},
|
|
172
|
-
'.fab-close': function close($clickedEl, data) {
|
|
173
|
-
if (data === void 0) {
|
|
174
|
-
data = {};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
var app = this;
|
|
178
|
-
app.fab.close(data.fab);
|
|
179
|
-
},
|
|
180
|
-
'.fab-backdrop': function close() {
|
|
181
|
-
var app = this;
|
|
182
|
-
app.fab.close();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|