@xenknight/framework7 0.0.2
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/LICENSE +20 -0
- package/README.md +32 -0
- package/components/accordion/accordion-ios.less +2 -0
- package/components/accordion/accordion-md.less +2 -0
- package/components/accordion/accordion-rtl.css +1 -0
- package/components/accordion/accordion-vars.less +0 -0
- package/components/accordion/accordion.css +1 -0
- package/components/accordion/accordion.d.ts +55 -0
- package/components/accordion/accordion.js +118 -0
- package/components/accordion/accordion.less +215 -0
- package/components/actions/actions-class.js +325 -0
- package/components/actions/actions-ios.less +51 -0
- package/components/actions/actions-md.less +24 -0
- package/components/actions/actions-rtl.css +1 -0
- package/components/actions/actions-vars.less +72 -0
- package/components/actions/actions.css +1 -0
- package/components/actions/actions.d.ts +164 -0
- package/components/actions/actions.js +47 -0
- package/components/actions/actions.less +182 -0
- package/components/app/app-class.d.ts +189 -0
- package/components/app/app-class.js +349 -0
- package/components/app/app-ios.less +23 -0
- package/components/app/app-md.less +8 -0
- package/components/app/app-vars.less +122 -0
- package/components/app/app.less +121 -0
- package/components/app/load-module.js +125 -0
- package/components/area-chart/area-chart-class.js +467 -0
- package/components/area-chart/area-chart-ios.less +2 -0
- package/components/area-chart/area-chart-md.less +2 -0
- package/components/area-chart/area-chart-rtl.css +1 -0
- package/components/area-chart/area-chart-vars.less +35 -0
- package/components/area-chart/area-chart.css +1 -0
- package/components/area-chart/area-chart.d.ts +128 -0
- package/components/area-chart/area-chart.js +44 -0
- package/components/area-chart/area-chart.less +131 -0
- package/components/autocomplete/autocomplete-class.js +813 -0
- package/components/autocomplete/autocomplete-ios.less +9 -0
- package/components/autocomplete/autocomplete-md.less +30 -0
- package/components/autocomplete/autocomplete-rtl.css +1 -0
- package/components/autocomplete/autocomplete-vars.less +36 -0
- package/components/autocomplete/autocomplete.css +1 -0
- package/components/autocomplete/autocomplete.d.ts +193 -0
- package/components/autocomplete/autocomplete.js +81 -0
- package/components/autocomplete/autocomplete.less +102 -0
- package/components/badge/badge-ios.less +2 -0
- package/components/badge/badge-md.less +2 -0
- package/components/badge/badge-vars.less +18 -0
- package/components/badge/badge.d.ts +14 -0
- package/components/badge/badge.js +3 -0
- package/components/badge/badge.less +45 -0
- package/components/block/block-ios.less +2 -0
- package/components/block/block-md.less +2 -0
- package/components/block/block-vars.less +77 -0
- package/components/block/block.d.ts +14 -0
- package/components/block/block.js +3 -0
- package/components/block/block.less +209 -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 +52 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +11 -0
- package/components/breadcrumbs/breadcrumbs.less +91 -0
- package/components/button/button-ios.less +21 -0
- package/components/button/button-md.less +11 -0
- package/components/button/button-vars.less +114 -0
- package/components/button/button.d.ts +14 -0
- package/components/button/button.js +3 -0
- package/components/button/button.less +421 -0
- package/components/calendar/calendar-class.js +1872 -0
- package/components/calendar/calendar-ios.less +2 -0
- package/components/calendar/calendar-md.less +2 -0
- package/components/calendar/calendar-rtl.css +1 -0
- package/components/calendar/calendar-vars.less +108 -0
- package/components/calendar/calendar.css +1 -0
- package/components/calendar/calendar.d.ts +312 -0
- package/components/calendar/calendar.js +118 -0
- package/components/calendar/calendar.less +448 -0
- package/components/card/card-ios.less +2 -0
- package/components/card/card-md.less +2 -0
- package/components/card/card-rtl.css +1 -0
- package/components/card/card-vars.less +80 -0
- package/components/card/card.css +1 -0
- package/components/card/card.d.ts +69 -0
- package/components/card/card.js +504 -0
- package/components/card/card.less +307 -0
- package/components/checkbox/checkbox-ios.less +23 -0
- package/components/checkbox/checkbox-md.less +17 -0
- package/components/checkbox/checkbox-rtl.css +1 -0
- package/components/checkbox/checkbox-vars.less +25 -0
- package/components/checkbox/checkbox.css +1 -0
- package/components/checkbox/checkbox.d.ts +14 -0
- package/components/checkbox/checkbox.js +3 -0
- package/components/checkbox/checkbox.less +155 -0
- package/components/chip/chip-ios.less +25 -0
- package/components/chip/chip-md.less +30 -0
- package/components/chip/chip-rtl.css +1 -0
- package/components/chip/chip-vars.less +42 -0
- package/components/chip/chip.css +1 -0
- package/components/chip/chip.d.ts +14 -0
- package/components/chip/chip.js +3 -0
- package/components/chip/chip.less +106 -0
- package/components/color-picker/color-picker-class.js +871 -0
- package/components/color-picker/color-picker-ios.less +2 -0
- package/components/color-picker/color-picker-md.less +2 -0
- package/components/color-picker/color-picker-rtl.css +1 -0
- package/components/color-picker/color-picker-vars.less +39 -0
- package/components/color-picker/color-picker.css +1 -0
- package/components/color-picker/color-picker.d.ts +233 -0
- package/components/color-picker/color-picker.js +92 -0
- package/components/color-picker/color-picker.less +557 -0
- package/components/color-picker/modules/alpha-slider.js +91 -0
- package/components/color-picker/modules/brightness-slider.js +80 -0
- package/components/color-picker/modules/current-color.js +14 -0
- package/components/color-picker/modules/hex.js +71 -0
- package/components/color-picker/modules/hs-spectrum.js +118 -0
- package/components/color-picker/modules/hsb-sliders.js +191 -0
- package/components/color-picker/modules/hue-slider.js +73 -0
- package/components/color-picker/modules/initial-current-colors.js +43 -0
- package/components/color-picker/modules/palette.js +46 -0
- package/components/color-picker/modules/rgb-bars.js +183 -0
- package/components/color-picker/modules/rgb-sliders.js +185 -0
- package/components/color-picker/modules/sb-spectrum.js +119 -0
- package/components/color-picker/modules/wheel.js +173 -0
- package/components/contacts-list/contacts-list-ios.less +2 -0
- package/components/contacts-list/contacts-list-md.less +21 -0
- package/components/contacts-list/contacts-list-rtl.css +1 -0
- package/components/contacts-list/contacts-list-vars.less +24 -0
- package/components/contacts-list/contacts-list.css +1 -0
- package/components/contacts-list/contacts-list.d.ts +14 -0
- package/components/contacts-list/contacts-list.js +3 -0
- package/components/contacts-list/contacts-list.less +26 -0
- package/components/data-table/data-table-class.js +141 -0
- package/components/data-table/data-table-ios.less +70 -0
- package/components/data-table/data-table-md.less +88 -0
- package/components/data-table/data-table-rtl.css +1 -0
- package/components/data-table/data-table-vars.less +77 -0
- package/components/data-table/data-table.css +1 -0
- package/components/data-table/data-table.d.ts +61 -0
- package/components/data-table/data-table.js +64 -0
- package/components/data-table/data-table.less +429 -0
- package/components/dialog/dialog-class.js +196 -0
- package/components/dialog/dialog-ios.less +94 -0
- package/components/dialog/dialog-md.less +86 -0
- package/components/dialog/dialog-rtl.css +1 -0
- package/components/dialog/dialog-vars.less +93 -0
- package/components/dialog/dialog.css +1 -0
- package/components/dialog/dialog.d.ts +245 -0
- package/components/dialog/dialog.js +242 -0
- package/components/dialog/dialog.less +142 -0
- package/components/fab/fab-ios.less +9 -0
- package/components/fab/fab-md.less +11 -0
- package/components/fab/fab-rtl.css +1 -0
- package/components/fab/fab-vars.less +46 -0
- package/components/fab/fab.css +1 -0
- package/components/fab/fab.d.ts +32 -0
- package/components/fab/fab.js +172 -0
- package/components/fab/fab.less +523 -0
- package/components/form/form-ios.less +0 -0
- package/components/form/form-md.less +0 -0
- package/components/form/form-rtl.css +0 -0
- package/components/form/form.css +0 -0
- package/components/form/form.d.ts +64 -0
- package/components/form/form.js +311 -0
- package/components/form/form.less +7 -0
- package/components/gauge/gauge-class.js +298 -0
- package/components/gauge/gauge-ios.less +2 -0
- package/components/gauge/gauge-md.less +2 -0
- package/components/gauge/gauge-rtl.css +1 -0
- package/components/gauge/gauge.css +1 -0
- package/components/gauge/gauge.d.ts +100 -0
- package/components/gauge/gauge.js +90 -0
- package/components/gauge/gauge.less +24 -0
- package/components/grid/grid-ios.less +2 -0
- package/components/grid/grid-md.less +2 -0
- package/components/grid/grid-rtl.css +1 -0
- package/components/grid/grid-vars.less +3 -0
- package/components/grid/grid.css +1 -0
- package/components/grid/grid.d.ts +15 -0
- package/components/grid/grid.js +3 -0
- package/components/grid/grid.less +78 -0
- package/components/icon/icon-ios.less +44 -0
- package/components/icon/icon-md.less +56 -0
- package/components/icon/icon.d.ts +14 -0
- package/components/icon/icon.js +3 -0
- package/components/icon/icon.less +33 -0
- package/components/infinite-scroll/infinite-scroll-ios.less +11 -0
- package/components/infinite-scroll/infinite-scroll-md.less +6 -0
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -0
- package/components/infinite-scroll/infinite-scroll.css +1 -0
- package/components/infinite-scroll/infinite-scroll.d.ts +27 -0
- package/components/infinite-scroll/infinite-scroll.js +94 -0
- package/components/infinite-scroll/infinite-scroll.less +15 -0
- package/components/input/input-ios.less +129 -0
- package/components/input/input-md.less +171 -0
- package/components/input/input-rtl.css +1 -0
- package/components/input/input-vars.less +94 -0
- package/components/input/input.css +1 -0
- package/components/input/input.d.ts +60 -0
- package/components/input/input.js +339 -0
- package/components/input/input.less +355 -0
- package/components/link/link-ios.less +9 -0
- package/components/link/link-md.less +2 -0
- package/components/link/link-vars.less +9 -0
- package/components/link/link.d.ts +14 -0
- package/components/link/link.js +3 -0
- package/components/link/link.less +37 -0
- package/components/list/list-ios.less +15 -0
- package/components/list/list-md.less +5 -0
- package/components/list/list-vars.less +184 -0
- package/components/list/list.d.ts +14 -0
- package/components/list/list.js +3 -0
- package/components/list/list.less +718 -0
- package/components/list-index/list-index-class.js +333 -0
- package/components/list-index/list-index-ios.less +21 -0
- package/components/list-index/list-index-md.less +7 -0
- package/components/list-index/list-index-rtl.css +1 -0
- package/components/list-index/list-index-vars.less +25 -0
- package/components/list-index/list-index.css +1 -0
- package/components/list-index/list-index.d.ts +101 -0
- package/components/list-index/list-index.js +65 -0
- package/components/list-index/list-index.less +130 -0
- package/components/login-screen/login-screen-class.js +38 -0
- package/components/login-screen/login-screen-ios.less +2 -0
- package/components/login-screen/login-screen-md.less +2 -0
- package/components/login-screen/login-screen-rtl.css +1 -0
- package/components/login-screen/login-screen-vars.less +33 -0
- package/components/login-screen/login-screen.css +1 -0
- package/components/login-screen/login-screen.d.ts +99 -0
- package/components/login-screen/login-screen.js +32 -0
- package/components/login-screen/login-screen.less +100 -0
- package/components/messagebar/messagebar-class.js +367 -0
- package/components/messagebar/messagebar-ios.less +88 -0
- package/components/messagebar/messagebar-md.less +114 -0
- package/components/messagebar/messagebar-rtl.css +1 -0
- package/components/messagebar/messagebar-vars.less +75 -0
- package/components/messagebar/messagebar.css +1 -0
- package/components/messagebar/messagebar.d.ts +165 -0
- package/components/messagebar/messagebar.js +66 -0
- package/components/messagebar/messagebar.less +162 -0
- package/components/messages/messages-class.js +487 -0
- package/components/messages/messages-ios.less +165 -0
- package/components/messages/messages-md.less +140 -0
- package/components/messages/messages-rtl.css +1 -0
- package/components/messages/messages-vars.less +82 -0
- package/components/messages/messages.css +1 -0
- package/components/messages/messages.d.ts +162 -0
- package/components/messages/messages.js +65 -0
- package/components/messages/messages.less +218 -0
- package/components/modal/custom-modal-class.js +66 -0
- package/components/modal/modal-class.js +224 -0
- package/components/modal/modal.d.ts +82 -0
- package/components/modal/modal.js +22 -0
- package/components/modal/modal.less +14 -0
- package/components/navbar/navbar-ios.less +755 -0
- package/components/navbar/navbar-md.less +65 -0
- package/components/navbar/navbar-vars.less +74 -0
- package/components/navbar/navbar.d.ts +77 -0
- package/components/navbar/navbar.js +712 -0
- package/components/navbar/navbar.less +311 -0
- package/components/notification/notification-class.js +212 -0
- package/components/notification/notification-ios.less +55 -0
- package/components/notification/notification-md.less +87 -0
- package/components/notification/notification-rtl.css +1 -0
- package/components/notification/notification-vars.less +75 -0
- package/components/notification/notification.css +1 -0
- package/components/notification/notification.d.ts +122 -0
- package/components/notification/notification.js +33 -0
- package/components/notification/notification.less +94 -0
- package/components/page/page-ios.less +154 -0
- package/components/page/page-md.less +83 -0
- package/components/page/page-transitions/circle.less +107 -0
- package/components/page/page-transitions/cover-v.less +61 -0
- package/components/page/page-transitions/cover.less +71 -0
- package/components/page/page-transitions/dive.less +77 -0
- package/components/page/page-transitions/fade.less +53 -0
- package/components/page/page-transitions/flip.less +91 -0
- package/components/page/page-transitions/parallax.less +75 -0
- package/components/page/page-transitions/push.less +75 -0
- package/components/page/page-vars.less +47 -0
- package/components/page/page.d.ts +14 -0
- package/components/page/page.js +3 -0
- package/components/page/page.less +204 -0
- package/components/panel/panel-class.js +556 -0
- package/components/panel/panel-ios.less +2 -0
- package/components/panel/panel-md.less +11 -0
- package/components/panel/panel-rtl.css +3 -0
- package/components/panel/panel-vars.less +24 -0
- package/components/panel/panel.css +3 -0
- package/components/panel/panel.d.ts +198 -0
- package/components/panel/panel.js +189 -0
- package/components/panel/panel.less +403 -0
- package/components/panel/resizable-panel.js +160 -0
- package/components/panel/swipe-panel.js +311 -0
- package/components/photo-browser/photo-browser-class.js +734 -0
- package/components/photo-browser/photo-browser-ios.less +2 -0
- package/components/photo-browser/photo-browser-md.less +2 -0
- package/components/photo-browser/photo-browser-rtl.css +1 -0
- package/components/photo-browser/photo-browser-vars.less +16 -0
- package/components/photo-browser/photo-browser.css +1 -0
- package/components/photo-browser/photo-browser.d.ts +204 -0
- package/components/photo-browser/photo-browser.js +73 -0
- package/components/photo-browser/photo-browser.less +358 -0
- package/components/picker/picker-class.js +588 -0
- package/components/picker/picker-column.js +121 -0
- package/components/picker/picker-ios.less +12 -0
- package/components/picker/picker-md.less +8 -0
- package/components/picker/picker-rtl.css +1 -0
- package/components/picker/picker-vars.less +35 -0
- package/components/picker/picker.css +1 -0
- package/components/picker/picker.d.ts +209 -0
- package/components/picker/picker.js +59 -0
- package/components/picker/picker.less +180 -0
- package/components/pie-chart/pie-chart-class.js +250 -0
- package/components/pie-chart/pie-chart-ios.less +2 -0
- package/components/pie-chart/pie-chart-md.less +2 -0
- package/components/pie-chart/pie-chart-rtl.css +1 -0
- package/components/pie-chart/pie-chart.css +1 -0
- package/components/pie-chart/pie-chart.d.ts +99 -0
- package/components/pie-chart/pie-chart.js +32 -0
- package/components/pie-chart/pie-chart.less +43 -0
- package/components/popover/popover-class.js +293 -0
- package/components/popover/popover-ios.less +6 -0
- package/components/popover/popover-md.less +41 -0
- package/components/popover/popover-rtl.css +1 -0
- package/components/popover/popover-vars.less +25 -0
- package/components/popover/popover.css +1 -0
- package/components/popover/popover.d.ts +137 -0
- package/components/popover/popover.js +75 -0
- package/components/popover/popover.less +168 -0
- package/components/popup/popup-class.js +329 -0
- package/components/popup/popup-ios.less +2 -0
- package/components/popup/popup-md.less +2 -0
- package/components/popup/popup-rtl.css +1 -0
- package/components/popup/popup-vars.less +21 -0
- package/components/popup/popup.css +1 -0
- package/components/popup/popup.d.ts +143 -0
- package/components/popup/popup.js +46 -0
- package/components/popup/popup.less +204 -0
- package/components/preloader/preloader-ios.less +57 -0
- package/components/preloader/preloader-md.less +114 -0
- package/components/preloader/preloader-rtl.css +1 -0
- package/components/preloader/preloader-vars.less +16 -0
- package/components/preloader/preloader.css +1 -0
- package/components/preloader/preloader.d.ts +26 -0
- package/components/preloader/preloader.js +106 -0
- package/components/preloader/preloader.less +60 -0
- package/components/progressbar/progressbar-ios.less +59 -0
- package/components/progressbar/progressbar-md.less +141 -0
- package/components/progressbar/progressbar-rtl.css +1 -0
- package/components/progressbar/progressbar-vars.less +22 -0
- package/components/progressbar/progressbar.css +1 -0
- package/components/progressbar/progressbar.d.ts +31 -0
- package/components/progressbar/progressbar.js +150 -0
- package/components/progressbar/progressbar.less +111 -0
- package/components/pull-to-refresh/pull-to-refresh-class.js +512 -0
- package/components/pull-to-refresh/pull-to-refresh-ios.less +88 -0
- package/components/pull-to-refresh/pull-to-refresh-md.less +129 -0
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh-vars.less +14 -0
- package/components/pull-to-refresh/pull-to-refresh.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh.d.ts +103 -0
- package/components/pull-to-refresh/pull-to-refresh.js +62 -0
- package/components/pull-to-refresh/pull-to-refresh.less +38 -0
- package/components/radio/radio-ios.less +61 -0
- package/components/radio/radio-md.less +64 -0
- package/components/radio/radio-rtl.css +1 -0
- package/components/radio/radio-vars.less +24 -0
- package/components/radio/radio.css +1 -0
- package/components/radio/radio.d.ts +14 -0
- package/components/radio/radio.js +3 -0
- package/components/radio/radio.less +64 -0
- package/components/range/range-class.js +577 -0
- package/components/range/range-ios.less +9 -0
- package/components/range/range-md.less +41 -0
- package/components/range/range-rtl.css +1 -0
- package/components/range/range-vars.less +61 -0
- package/components/range/range.css +1 -0
- package/components/range/range.d.ts +143 -0
- package/components/range/range.js +75 -0
- package/components/range/range.less +235 -0
- package/components/searchbar/remove-diacritics.js +271 -0
- package/components/searchbar/searchbar-class.js +592 -0
- package/components/searchbar/searchbar-ios.less +107 -0
- package/components/searchbar/searchbar-md.less +147 -0
- package/components/searchbar/searchbar-rtl.css +1 -0
- package/components/searchbar/searchbar-vars.less +77 -0
- package/components/searchbar/searchbar.css +1 -0
- package/components/searchbar/searchbar.d.ts +161 -0
- package/components/searchbar/searchbar.js +122 -0
- package/components/searchbar/searchbar.less +322 -0
- package/components/sheet/sheet-class.js +673 -0
- package/components/sheet/sheet-ios.less +2 -0
- package/components/sheet/sheet-md.less +9 -0
- package/components/sheet/sheet-rtl.css +1 -0
- package/components/sheet/sheet-vars.less +27 -0
- package/components/sheet/sheet.css +1 -0
- package/components/sheet/sheet.d.ts +170 -0
- package/components/sheet/sheet.js +76 -0
- package/components/sheet/sheet.less +196 -0
- package/components/skeleton/skeleton-ios.less +2 -0
- package/components/skeleton/skeleton-md.less +2 -0
- package/components/skeleton/skeleton-rtl.css +1 -0
- package/components/skeleton/skeleton-vars.less +8 -0
- package/components/skeleton/skeleton.css +1 -0
- package/components/skeleton/skeleton.d.ts +14 -0
- package/components/skeleton/skeleton.js +3 -0
- package/components/skeleton/skeleton.less +11 -0
- package/components/smart-select/smart-select-class.js +874 -0
- package/components/smart-select/smart-select-ios.less +2 -0
- package/components/smart-select/smart-select-md.less +2 -0
- package/components/smart-select/smart-select-rtl.css +1 -0
- package/components/smart-select/smart-select-vars.less +6 -0
- package/components/smart-select/smart-select.css +1 -0
- package/components/smart-select/smart-select.d.ts +204 -0
- package/components/smart-select/smart-select.js +138 -0
- package/components/smart-select/smart-select.less +42 -0
- package/components/sortable/sortable-ios.less +7 -0
- package/components/sortable/sortable-md.less +7 -0
- package/components/sortable/sortable-rtl.css +1 -0
- package/components/sortable/sortable-vars.less +22 -0
- package/components/sortable/sortable.css +1 -0
- package/components/sortable/sortable.d.ts +50 -0
- package/components/sortable/sortable.js +286 -0
- package/components/sortable/sortable.less +133 -0
- package/components/statusbar/statusbar-ios.less +2 -0
- package/components/statusbar/statusbar-md.less +2 -0
- package/components/statusbar/statusbar.d.ts +54 -0
- package/components/statusbar/statusbar.js +190 -0
- package/components/statusbar/statusbar.less +7 -0
- package/components/stepper/stepper-class.js +403 -0
- package/components/stepper/stepper-ios.less +36 -0
- package/components/stepper/stepper-md.less +16 -0
- package/components/stepper/stepper-rtl.css +1 -0
- package/components/stepper/stepper-vars.less +40 -0
- package/components/stepper/stepper.css +1 -0
- package/components/stepper/stepper.d.ts +121 -0
- package/components/stepper/stepper.js +82 -0
- package/components/stepper/stepper.less +178 -0
- package/components/subnavbar/subnavbar-ios.less +51 -0
- package/components/subnavbar/subnavbar-md.less +47 -0
- package/components/subnavbar/subnavbar-vars.less +36 -0
- package/components/subnavbar/subnavbar.d.ts +11 -0
- package/components/subnavbar/subnavbar.js +17 -0
- package/components/subnavbar/subnavbar.less +128 -0
- package/components/swipeout/swipeout-ios.less +2 -0
- package/components/swipeout/swipeout-md.less +2 -0
- package/components/swipeout/swipeout-rtl.css +1 -0
- package/components/swipeout/swipeout-vars.less +24 -0
- package/components/swipeout/swipeout.css +1 -0
- package/components/swipeout/swipeout.d.ts +68 -0
- package/components/swipeout/swipeout.js +513 -0
- package/components/swipeout/swipeout.less +109 -0
- package/components/swiper/swiper-ios.less +2 -0
- package/components/swiper/swiper-md.less +2 -0
- package/components/swiper/swiper-rtl.css +1 -0
- package/components/swiper/swiper.css +1 -0
- package/components/swiper/swiper.d.ts +25 -0
- package/components/swiper/swiper.js +141 -0
- package/components/swiper/swiper.less +5 -0
- package/components/tabs/tabs-ios.less +2 -0
- package/components/tabs/tabs-md.less +2 -0
- package/components/tabs/tabs-rtl.css +1 -0
- package/components/tabs/tabs.css +1 -0
- package/components/tabs/tabs.d.ts +39 -0
- package/components/tabs/tabs.js +243 -0
- package/components/tabs/tabs.less +45 -0
- package/components/text-editor/text-editor-class.js +516 -0
- package/components/text-editor/text-editor-ios.less +9 -0
- package/components/text-editor/text-editor-md.less +11 -0
- package/components/text-editor/text-editor-rtl.css +1 -0
- package/components/text-editor/text-editor-vars.less +51 -0
- package/components/text-editor/text-editor.css +1 -0
- package/components/text-editor/text-editor.d.ts +166 -0
- package/components/text-editor/text-editor.js +81 -0
- package/components/text-editor/text-editor.less +153 -0
- package/components/timeline/timeline-ios.less +11 -0
- package/components/timeline/timeline-md.less +7 -0
- package/components/timeline/timeline-rtl.css +1 -0
- package/components/timeline/timeline-vars.less +64 -0
- package/components/timeline/timeline.css +1 -0
- package/components/timeline/timeline.d.ts +14 -0
- package/components/timeline/timeline.js +3 -0
- package/components/timeline/timeline.less +413 -0
- package/components/toast/toast-class.js +105 -0
- package/components/toast/toast-ios.less +81 -0
- package/components/toast/toast-md.less +72 -0
- package/components/toast/toast-rtl.css +1 -0
- package/components/toast/toast-vars.less +24 -0
- package/components/toast/toast.css +1 -0
- package/components/toast/toast.d.ts +121 -0
- package/components/toast/toast.js +40 -0
- package/components/toast/toast.less +62 -0
- package/components/toggle/toggle-class.js +165 -0
- package/components/toggle/toggle-ios.less +70 -0
- package/components/toggle/toggle-md.less +44 -0
- package/components/toggle/toggle-rtl.css +1 -0
- package/components/toggle/toggle-vars.less +30 -0
- package/components/toggle/toggle.css +1 -0
- package/components/toggle/toggle.d.ts +73 -0
- package/components/toggle/toggle.js +57 -0
- package/components/toggle/toggle.less +52 -0
- package/components/toolbar/toolbar-ios.less +47 -0
- package/components/toolbar/toolbar-md.less +77 -0
- package/components/toolbar/toolbar-vars.less +71 -0
- package/components/toolbar/toolbar.d.ts +43 -0
- package/components/toolbar/toolbar.js +198 -0
- package/components/toolbar/toolbar.less +306 -0
- package/components/tooltip/tooltip-class.js +336 -0
- package/components/tooltip/tooltip-ios.less +2 -0
- package/components/tooltip/tooltip-md.less +2 -0
- package/components/tooltip/tooltip-rtl.css +1 -0
- package/components/tooltip/tooltip-vars.less +19 -0
- package/components/tooltip/tooltip.css +1 -0
- package/components/tooltip/tooltip.d.ts +105 -0
- package/components/tooltip/tooltip.js +129 -0
- package/components/tooltip/tooltip.less +39 -0
- package/components/touch-ripple/touch-ripple-class.js +85 -0
- package/components/touch-ripple/touch-ripple-ios.less +2 -0
- package/components/touch-ripple/touch-ripple-md.less +2 -0
- package/components/touch-ripple/touch-ripple-vars.less +8 -0
- package/components/touch-ripple/touch-ripple.d.ts +25 -0
- package/components/touch-ripple/touch-ripple.js +18 -0
- package/components/touch-ripple/touch-ripple.less +114 -0
- package/components/treeview/treeview-ios.less +2 -0
- package/components/treeview/treeview-md.less +2 -0
- package/components/treeview/treeview-rtl.css +1 -0
- package/components/treeview/treeview-vars.less +38 -0
- package/components/treeview/treeview.css +1 -0
- package/components/treeview/treeview.d.ts +42 -0
- package/components/treeview/treeview.js +74 -0
- package/components/treeview/treeview.less +160 -0
- package/components/typography/typography-ios.less +2 -0
- package/components/typography/typography-md.less +2 -0
- package/components/typography/typography-rtl.css +1 -0
- package/components/typography/typography-vars.less +4 -0
- package/components/typography/typography.css +1 -0
- package/components/typography/typography.d.ts +14 -0
- package/components/typography/typography.js +3 -0
- package/components/typography/typography.less +220 -0
- package/components/view/resizable-view.js +125 -0
- package/components/view/view-class.js +206 -0
- package/components/view/view-ios.less +2 -0
- package/components/view/view-md.less +2 -0
- package/components/view/view.d.ts +199 -0
- package/components/view/view.js +173 -0
- package/components/view/view.less +35 -0
- package/components/virtual-list/virtual-list-class.js +583 -0
- package/components/virtual-list/virtual-list-ios.less +2 -0
- package/components/virtual-list/virtual-list-md.less +2 -0
- package/components/virtual-list/virtual-list-rtl.css +0 -0
- package/components/virtual-list/virtual-list.css +0 -0
- package/components/virtual-list/virtual-list.d.ts +142 -0
- package/components/virtual-list/virtual-list.js +17 -0
- package/components/virtual-list/virtual-list.less +7 -0
- package/framework7-bundle-rtl.css +19821 -0
- package/framework7-bundle-rtl.min.css +19 -0
- package/framework7-bundle.css +19802 -0
- package/framework7-bundle.esm.js +93 -0
- package/framework7-bundle.js +48416 -0
- package/framework7-bundle.js.map +1 -0
- package/framework7-bundle.less +92 -0
- package/framework7-bundle.min.css +19 -0
- package/framework7-bundle.min.js +14 -0
- package/framework7-bundle.min.js.map +1 -0
- package/framework7-lite-bundle.esm.js +86 -0
- package/framework7-lite.esm.js +37 -0
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +5252 -0
- package/framework7-rtl.min.css +17 -0
- package/framework7-types.d.ts +336 -0
- package/framework7.css +5245 -0
- package/framework7.d.ts +322 -0
- package/framework7.esm.js +41 -0
- package/framework7.js +42 -0
- package/framework7.less +41 -0
- package/framework7.min.css +17 -0
- package/less/mixins.less +281 -0
- package/less/plugin.js +15 -0
- package/less/vars.less +7 -0
- package/modules/clicks/clicks.d.ts +19 -0
- package/modules/clicks/clicks.js +94 -0
- package/modules/component/$h.js +15 -0
- package/modules/component/$jsx.js +17 -0
- package/modules/component/component-class.js +517 -0
- package/modules/component/component.d.ts +111 -0
- package/modules/component/component.js +44 -0
- package/modules/component/custom-components.js +1 -0
- package/modules/component/eventslisteners.js +74 -0
- package/modules/component/parse-component.js +79 -0
- package/modules/component/patch.js +8 -0
- package/modules/component/snabbdom/h.d.ts +10 -0
- package/modules/component/snabbdom/h.js +50 -0
- package/modules/component/snabbdom/helpers/attachto.d.ts +9 -0
- package/modules/component/snabbdom/helpers/attachto.js +49 -0
- package/modules/component/snabbdom/hooks.d.ts +23 -0
- package/modules/component/snabbdom/hooks.js +0 -0
- package/modules/component/snabbdom/htmldomapi.d.ts +19 -0
- package/modules/component/snabbdom/htmldomapi.js +67 -0
- package/modules/component/snabbdom/is.d.ts +2 -0
- package/modules/component/snabbdom/is.js +4 -0
- package/modules/component/snabbdom/modules/attributes.d.ts +4 -0
- package/modules/component/snabbdom/modules/attributes.js +51 -0
- package/modules/component/snabbdom/modules/class.d.ts +4 -0
- package/modules/component/snabbdom/modules/class.js +27 -0
- package/modules/component/snabbdom/modules/dataset.d.ts +4 -0
- package/modules/component/snabbdom/modules/dataset.js +37 -0
- package/modules/component/snabbdom/modules/eventlisteners.d.ts +8 -0
- package/modules/component/snabbdom/modules/eventlisteners.js +93 -0
- package/modules/component/snabbdom/modules/hero.d.ts +6 -0
- package/modules/component/snabbdom/modules/hero.js +147 -0
- package/modules/component/snabbdom/modules/module.d.ts +9 -0
- package/modules/component/snabbdom/modules/module.js +0 -0
- package/modules/component/snabbdom/modules/props.d.ts +4 -0
- package/modules/component/snabbdom/modules/props.js +29 -0
- package/modules/component/snabbdom/modules/style.d.ts +7 -0
- package/modules/component/snabbdom/modules/style.js +93 -0
- package/modules/component/snabbdom/snabbdom.bundle.d.ts +5 -0
- package/modules/component/snabbdom/snabbdom.bundle.js +13 -0
- package/modules/component/snabbdom/snabbdom.d.ts +6 -0
- package/modules/component/snabbdom/snabbdom.js +282 -0
- package/modules/component/snabbdom/thunk.d.ts +14 -0
- package/modules/component/snabbdom/thunk.js +50 -0
- package/modules/component/snabbdom/tovnode.d.ts +4 -0
- package/modules/component/snabbdom/tovnode.js +40 -0
- package/modules/component/snabbdom/vnode.d.ts +36 -0
- package/modules/component/snabbdom/vnode.js +12 -0
- package/modules/component/vdom.js +319 -0
- package/modules/demo-module.js +44 -0
- package/modules/device/device.d.ts +14 -0
- package/modules/device/device.js +44 -0
- package/modules/history/history.js +12 -0
- package/modules/resize/resize.d.ts +25 -0
- package/modules/resize/resize.js +62 -0
- package/modules/router/app-router-check.js +5 -0
- package/modules/router/async-component.js +27 -0
- package/modules/router/back.js +723 -0
- package/modules/router/clear-previous-history.js +31 -0
- package/modules/router/component-loader.js +200 -0
- package/modules/router/modal.js +223 -0
- package/modules/router/navigate.js +814 -0
- package/modules/router/process-route-queue.js +66 -0
- package/modules/router/redirect.js +38 -0
- package/modules/router/router-class.js +1268 -0
- package/modules/router/router.d.ts +354 -0
- package/modules/router/router.js +26 -0
- package/modules/router/swipe-back.js +589 -0
- package/modules/router/tab.js +230 -0
- package/modules/service-worker/service-worker.d.ts +38 -0
- package/modules/service-worker/service-worker.js +86 -0
- package/modules/store/create-store.js +138 -0
- package/modules/store/store.d.ts +40 -0
- package/modules/store/store.js +11 -0
- package/modules/support/support.d.ts +15 -0
- package/modules/support/support.js +7 -0
- package/modules/touch/touch.d.ts +60 -0
- package/modules/touch/touch.js +482 -0
- package/modules/utils/utils.d.ts +15 -0
- package/modules/utils/utils.js +10 -0
- package/package.json +458 -0
- package/shared/$jsx.js +21 -0
- package/shared/class.js +146 -0
- package/shared/constructor-methods.js +52 -0
- package/shared/dom7.js +7 -0
- package/shared/events-class.js +95 -0
- package/shared/get-device.d.ts +52 -0
- package/shared/get-device.js +147 -0
- package/shared/get-support.d.ts +12 -0
- package/shared/get-support.js +35 -0
- package/shared/history.js +171 -0
- package/shared/material-color-utils.js +1377 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +80 -0
- package/shared/utils.d.ts +88 -0
- package/shared/utils.js +535 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import $ from './dom7.js';
|
|
2
|
+
export default function ConstructorMethods(parameters) {
|
|
3
|
+
if (parameters === void 0) {
|
|
4
|
+
parameters = {};
|
|
5
|
+
}
|
|
6
|
+
const {
|
|
7
|
+
defaultSelector,
|
|
8
|
+
constructor: Constructor,
|
|
9
|
+
domProp,
|
|
10
|
+
app,
|
|
11
|
+
addMethods
|
|
12
|
+
} = parameters;
|
|
13
|
+
const methods = {
|
|
14
|
+
create() {
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
if (app) return new Constructor(app, ...args);
|
|
19
|
+
return new Constructor(...args);
|
|
20
|
+
},
|
|
21
|
+
get(el) {
|
|
22
|
+
if (el === void 0) {
|
|
23
|
+
el = defaultSelector;
|
|
24
|
+
}
|
|
25
|
+
if (el instanceof Constructor) return el;
|
|
26
|
+
const $el = $(el);
|
|
27
|
+
if ($el.length === 0) return undefined;
|
|
28
|
+
return $el[0][domProp];
|
|
29
|
+
},
|
|
30
|
+
destroy(el) {
|
|
31
|
+
const instance = methods.get(el);
|
|
32
|
+
if (instance && instance.destroy) return instance.destroy();
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
if (addMethods && Array.isArray(addMethods)) {
|
|
37
|
+
addMethods.forEach(methodName => {
|
|
38
|
+
methods[methodName] = function (el) {
|
|
39
|
+
if (el === void 0) {
|
|
40
|
+
el = defaultSelector;
|
|
41
|
+
}
|
|
42
|
+
const instance = methods.get(el);
|
|
43
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
44
|
+
args[_key2 - 1] = arguments[_key2];
|
|
45
|
+
}
|
|
46
|
+
if (instance && instance[methodName]) return instance[methodName](...args);
|
|
47
|
+
return undefined;
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return methods;
|
|
52
|
+
}
|
package/shared/dom7.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
class EventsClass {
|
|
2
|
+
constructor(parents) {
|
|
3
|
+
if (parents === void 0) {
|
|
4
|
+
parents = [];
|
|
5
|
+
}
|
|
6
|
+
const self = this;
|
|
7
|
+
self.eventsParents = parents;
|
|
8
|
+
self.eventsListeners = {};
|
|
9
|
+
}
|
|
10
|
+
on(events, handler, priority) {
|
|
11
|
+
const self = this;
|
|
12
|
+
if (typeof handler !== 'function') return self;
|
|
13
|
+
const method = priority ? 'unshift' : 'push';
|
|
14
|
+
events.split(' ').forEach(event => {
|
|
15
|
+
if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
|
|
16
|
+
self.eventsListeners[event][method](handler);
|
|
17
|
+
});
|
|
18
|
+
return self;
|
|
19
|
+
}
|
|
20
|
+
once(events, handler, priority) {
|
|
21
|
+
const self = this;
|
|
22
|
+
if (typeof handler !== 'function') return self;
|
|
23
|
+
function onceHandler() {
|
|
24
|
+
self.off(events, onceHandler);
|
|
25
|
+
if (onceHandler.f7proxy) {
|
|
26
|
+
delete onceHandler.f7proxy;
|
|
27
|
+
}
|
|
28
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
|
+
args[_key] = arguments[_key];
|
|
30
|
+
}
|
|
31
|
+
handler.apply(self, args);
|
|
32
|
+
}
|
|
33
|
+
onceHandler.f7proxy = handler;
|
|
34
|
+
return self.on(events, onceHandler, priority);
|
|
35
|
+
}
|
|
36
|
+
off(events, handler) {
|
|
37
|
+
const self = this;
|
|
38
|
+
if (!self.eventsListeners) return self;
|
|
39
|
+
events.split(' ').forEach(event => {
|
|
40
|
+
if (typeof handler === 'undefined') {
|
|
41
|
+
self.eventsListeners[event] = [];
|
|
42
|
+
} else if (self.eventsListeners[event]) {
|
|
43
|
+
self.eventsListeners[event].forEach((eventHandler, index) => {
|
|
44
|
+
if (eventHandler === handler || eventHandler.f7proxy && eventHandler.f7proxy === handler) {
|
|
45
|
+
self.eventsListeners[event].splice(index, 1);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return self;
|
|
51
|
+
}
|
|
52
|
+
emit() {
|
|
53
|
+
const self = this;
|
|
54
|
+
if (!self.eventsListeners) return self;
|
|
55
|
+
let events;
|
|
56
|
+
let data;
|
|
57
|
+
let context;
|
|
58
|
+
let eventsParents;
|
|
59
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
60
|
+
args[_key2] = arguments[_key2];
|
|
61
|
+
}
|
|
62
|
+
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
63
|
+
events = args[0];
|
|
64
|
+
data = args.slice(1, args.length);
|
|
65
|
+
context = self;
|
|
66
|
+
eventsParents = self.eventsParents;
|
|
67
|
+
} else {
|
|
68
|
+
events = args[0].events;
|
|
69
|
+
data = args[0].data;
|
|
70
|
+
context = args[0].context || self;
|
|
71
|
+
eventsParents = args[0].local ? [] : args[0].parents || self.eventsParents;
|
|
72
|
+
}
|
|
73
|
+
const eventsArray = Array.isArray(events) ? events : events.split(' ');
|
|
74
|
+
const localEvents = eventsArray.map(eventName => eventName.replace('local::', ''));
|
|
75
|
+
const parentEvents = eventsArray.filter(eventName => eventName.indexOf('local::') < 0);
|
|
76
|
+
localEvents.forEach(event => {
|
|
77
|
+
if (self.eventsListeners && self.eventsListeners[event]) {
|
|
78
|
+
const handlers = [];
|
|
79
|
+
self.eventsListeners[event].forEach(eventHandler => {
|
|
80
|
+
handlers.push(eventHandler);
|
|
81
|
+
});
|
|
82
|
+
handlers.forEach(eventHandler => {
|
|
83
|
+
eventHandler.apply(context, data);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (eventsParents && eventsParents.length > 0) {
|
|
88
|
+
eventsParents.forEach(eventsParent => {
|
|
89
|
+
eventsParent.emit(parentEvents, ...data);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return self;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export default EventsClass;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface Device {
|
|
2
|
+
/** true for iOS device */
|
|
3
|
+
ios: boolean;
|
|
4
|
+
/** true for Android device */
|
|
5
|
+
android: boolean;
|
|
6
|
+
/** true for Android Chrome */
|
|
7
|
+
androidChrome: boolean;
|
|
8
|
+
/** true for desktop browser */
|
|
9
|
+
desktop: boolean;
|
|
10
|
+
/** true for iPhone */
|
|
11
|
+
iphone: boolean;
|
|
12
|
+
/** true for iPod */
|
|
13
|
+
ipod: boolean;
|
|
14
|
+
/** true for iPad */
|
|
15
|
+
ipad: boolean;
|
|
16
|
+
/** true for MS Edge browser */
|
|
17
|
+
edge: boolean;
|
|
18
|
+
/** true for Internet Explorer browser */
|
|
19
|
+
ie: boolean;
|
|
20
|
+
/** true for FireFox browser */
|
|
21
|
+
firefox: boolean;
|
|
22
|
+
/** true for desktop macOS */
|
|
23
|
+
macos: boolean;
|
|
24
|
+
/** true for desktop windows */
|
|
25
|
+
windows: boolean;
|
|
26
|
+
/** true when app running in cordova environment */
|
|
27
|
+
cordova: boolean;
|
|
28
|
+
/** true when app running in capacitor environment */
|
|
29
|
+
capacitor: boolean;
|
|
30
|
+
/** true when app is running under Electron environment */
|
|
31
|
+
electron: boolean;
|
|
32
|
+
/** true when app is running under NW.js environment */
|
|
33
|
+
nwjs: boolean;
|
|
34
|
+
/** true if app runs in web view - webapp installed to home screen */
|
|
35
|
+
webView: boolean;
|
|
36
|
+
/** true if app runs in web view - webapp installed to home screen */
|
|
37
|
+
standalone: boolean;
|
|
38
|
+
/** Contains OS can be ios, android, macos, windows */
|
|
39
|
+
os: string;
|
|
40
|
+
/** Contains OS version, e.g. 11.2.0 */
|
|
41
|
+
osVersion: string;
|
|
42
|
+
/** Device pixel ratio */
|
|
43
|
+
pixelRatio: number;
|
|
44
|
+
/** Returns 'dark' or 'light' if (prefers-color-theme) media supported, otherwise returns undefined */
|
|
45
|
+
prefersColorScheme(): string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DeviceParams {
|
|
49
|
+
userAgent: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const getDevice: (overrides?: DeviceParams) => Device;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { getWindow, getDocument } from 'ssr-window';
|
|
2
|
+
import { getSupport } from './get-support.js';
|
|
3
|
+
let deviceCalculated;
|
|
4
|
+
function calcDevice(_temp) {
|
|
5
|
+
let {
|
|
6
|
+
userAgent
|
|
7
|
+
} = _temp === void 0 ? {} : _temp;
|
|
8
|
+
const support = getSupport();
|
|
9
|
+
const window = getWindow();
|
|
10
|
+
const platform = window.navigator.platform;
|
|
11
|
+
const ua = userAgent || window.navigator.userAgent;
|
|
12
|
+
const device = {
|
|
13
|
+
ios: false,
|
|
14
|
+
android: false,
|
|
15
|
+
androidChrome: false,
|
|
16
|
+
desktop: false,
|
|
17
|
+
iphone: false,
|
|
18
|
+
ipod: false,
|
|
19
|
+
ipad: false,
|
|
20
|
+
edge: false,
|
|
21
|
+
ie: false,
|
|
22
|
+
firefox: false,
|
|
23
|
+
macos: false,
|
|
24
|
+
windows: false,
|
|
25
|
+
cordova: !!window.cordova,
|
|
26
|
+
electron: false,
|
|
27
|
+
capacitor: !!window.Capacitor,
|
|
28
|
+
nwjs: false
|
|
29
|
+
};
|
|
30
|
+
const screenWidth = window.screen.width;
|
|
31
|
+
const screenHeight = window.screen.height;
|
|
32
|
+
const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
|
33
|
+
let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
|
34
|
+
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
|
35
|
+
const iphone = !ipad && ua.match(/(iPhone\sOS|iOS|iPhone;\sCPU\sOS)\s([\d_]+)/);
|
|
36
|
+
const ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
|
|
37
|
+
const edge = ua.indexOf('Edge/') >= 0;
|
|
38
|
+
const firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0;
|
|
39
|
+
const windows = platform === 'Win32';
|
|
40
|
+
const electron = ua.toLowerCase().indexOf('electron') >= 0;
|
|
41
|
+
const nwjs = typeof nw !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.nw !== 'undefined';
|
|
42
|
+
let macos = platform === 'MacIntel';
|
|
43
|
+
|
|
44
|
+
// iPadOs 13 fix
|
|
45
|
+
const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];
|
|
46
|
+
if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
|
|
47
|
+
ipad = ua.match(/(Version)\/([\d.]+)/);
|
|
48
|
+
if (!ipad) ipad = [0, 1, '13_0_0'];
|
|
49
|
+
macos = false;
|
|
50
|
+
}
|
|
51
|
+
device.ie = ie;
|
|
52
|
+
device.edge = edge;
|
|
53
|
+
device.firefox = firefox;
|
|
54
|
+
|
|
55
|
+
// Android
|
|
56
|
+
if (android) {
|
|
57
|
+
device.os = 'android';
|
|
58
|
+
device.osVersion = android[2];
|
|
59
|
+
device.android = true;
|
|
60
|
+
device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
|
|
61
|
+
}
|
|
62
|
+
if (ipad || iphone || ipod) {
|
|
63
|
+
device.os = 'ios';
|
|
64
|
+
device.ios = true;
|
|
65
|
+
}
|
|
66
|
+
// iOS
|
|
67
|
+
if (iphone && !ipod) {
|
|
68
|
+
device.osVersion = iphone[2].replace(/_/g, '.');
|
|
69
|
+
device.iphone = true;
|
|
70
|
+
}
|
|
71
|
+
if (ipad) {
|
|
72
|
+
device.osVersion = ipad[2].replace(/_/g, '.');
|
|
73
|
+
device.ipad = true;
|
|
74
|
+
}
|
|
75
|
+
if (ipod) {
|
|
76
|
+
device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
|
|
77
|
+
device.ipod = true;
|
|
78
|
+
}
|
|
79
|
+
// iOS 8+ changed UA
|
|
80
|
+
if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
|
|
81
|
+
if (device.osVersion.split('.')[0] === '10') {
|
|
82
|
+
device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Webview
|
|
87
|
+
device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || window.navigator.standalone)) || window.matchMedia && window.matchMedia('(display-mode: standalone)').matches;
|
|
88
|
+
device.webview = device.webView;
|
|
89
|
+
device.standalone = device.webView;
|
|
90
|
+
|
|
91
|
+
// Desktop
|
|
92
|
+
device.desktop = !(device.ios || device.android) || electron || nwjs;
|
|
93
|
+
if (device.desktop) {
|
|
94
|
+
device.electron = electron;
|
|
95
|
+
device.nwjs = nwjs;
|
|
96
|
+
device.macos = macos;
|
|
97
|
+
device.windows = windows;
|
|
98
|
+
if (device.macos) {
|
|
99
|
+
device.os = 'macos';
|
|
100
|
+
}
|
|
101
|
+
if (device.windows) {
|
|
102
|
+
device.os = 'windows';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Pixel Ratio
|
|
107
|
+
device.pixelRatio = window.devicePixelRatio || 1;
|
|
108
|
+
|
|
109
|
+
// Color Scheme
|
|
110
|
+
const DARK = '(prefers-color-scheme: dark)';
|
|
111
|
+
const LIGHT = '(prefers-color-scheme: light)';
|
|
112
|
+
device.prefersColorScheme = function prefersColorTheme() {
|
|
113
|
+
let theme;
|
|
114
|
+
if (window.matchMedia && window.matchMedia(LIGHT).matches) {
|
|
115
|
+
theme = 'light';
|
|
116
|
+
}
|
|
117
|
+
if (window.matchMedia && window.matchMedia(DARK).matches) {
|
|
118
|
+
theme = 'dark';
|
|
119
|
+
}
|
|
120
|
+
return theme;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// Export object
|
|
124
|
+
return device;
|
|
125
|
+
}
|
|
126
|
+
const IS_BROWSER = (() => {
|
|
127
|
+
const document = getDocument();
|
|
128
|
+
try {
|
|
129
|
+
// eslint-disable-next-line no-restricted-globals
|
|
130
|
+
return Boolean(document && document.body && document.body.getBoundingClientRect && document.body.getBoundingClientRect().width > 0);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
})();
|
|
135
|
+
function getDevice(overrides, reset) {
|
|
136
|
+
if (overrides === void 0) {
|
|
137
|
+
overrides = {};
|
|
138
|
+
}
|
|
139
|
+
if (reset === void 0) {
|
|
140
|
+
reset = IS_BROWSER;
|
|
141
|
+
}
|
|
142
|
+
if (!deviceCalculated || reset) {
|
|
143
|
+
deviceCalculated = calcDevice(overrides);
|
|
144
|
+
}
|
|
145
|
+
return deviceCalculated;
|
|
146
|
+
}
|
|
147
|
+
export { getDevice };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Support {
|
|
2
|
+
/** Touch events support (touchstart, touchmove, touchend) */
|
|
3
|
+
touch: boolean;
|
|
4
|
+
/** Pointer events support */
|
|
5
|
+
pointerEvents: boolean;
|
|
6
|
+
/** Passive event listener support */
|
|
7
|
+
passiveListener: boolean;
|
|
8
|
+
/** Intersection Observer support */
|
|
9
|
+
intersectionObserver: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const getSupport: () => Support;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { getWindow, getDocument } from 'ssr-window';
|
|
2
|
+
let support;
|
|
3
|
+
function calcSupport() {
|
|
4
|
+
const window = getWindow();
|
|
5
|
+
const document = getDocument();
|
|
6
|
+
return {
|
|
7
|
+
touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),
|
|
8
|
+
pointerEvents: !!window.PointerEvent && 'maxTouchPoints' in window.navigator && window.navigator.maxTouchPoints >= 0,
|
|
9
|
+
passiveListener: function checkPassiveListener() {
|
|
10
|
+
let supportsPassive = false;
|
|
11
|
+
try {
|
|
12
|
+
const opts = Object.defineProperty({}, 'passive', {
|
|
13
|
+
// eslint-disable-next-line
|
|
14
|
+
get() {
|
|
15
|
+
supportsPassive = true;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener('testPassiveListener', null, opts);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
// No support
|
|
21
|
+
}
|
|
22
|
+
return supportsPassive;
|
|
23
|
+
}(),
|
|
24
|
+
intersectionObserver: function checkObserver() {
|
|
25
|
+
return 'IntersectionObserver' in window;
|
|
26
|
+
}()
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function getSupport() {
|
|
30
|
+
if (!support) {
|
|
31
|
+
support = calcSupport();
|
|
32
|
+
}
|
|
33
|
+
return support;
|
|
34
|
+
}
|
|
35
|
+
export { getSupport };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { getWindow, getDocument } from 'ssr-window';
|
|
2
|
+
import $ from './dom7.js';
|
|
3
|
+
import { extend } from './utils.js';
|
|
4
|
+
const History = {
|
|
5
|
+
queue: [],
|
|
6
|
+
clearQueue() {
|
|
7
|
+
if (History.queue.length === 0) return;
|
|
8
|
+
const currentQueue = History.queue.shift();
|
|
9
|
+
currentQueue();
|
|
10
|
+
},
|
|
11
|
+
routerQueue: [],
|
|
12
|
+
clearRouterQueue() {
|
|
13
|
+
if (History.routerQueue.length === 0) return;
|
|
14
|
+
const currentQueue = History.routerQueue.pop();
|
|
15
|
+
const {
|
|
16
|
+
router,
|
|
17
|
+
stateUrl,
|
|
18
|
+
action
|
|
19
|
+
} = currentQueue;
|
|
20
|
+
let animate = router.params.animate;
|
|
21
|
+
if (router.params.browserHistoryAnimate === false) animate = false;
|
|
22
|
+
if (action === 'back') {
|
|
23
|
+
router.back({
|
|
24
|
+
animate,
|
|
25
|
+
browserHistory: false
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (action === 'load') {
|
|
29
|
+
router.navigate(stateUrl, {
|
|
30
|
+
animate,
|
|
31
|
+
browserHistory: false
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
handle(e) {
|
|
36
|
+
if (History.blockPopstate) return;
|
|
37
|
+
const app = this;
|
|
38
|
+
// const mainView = app.views.main;
|
|
39
|
+
let state = e.state;
|
|
40
|
+
History.previousState = History.state;
|
|
41
|
+
History.state = state;
|
|
42
|
+
History.allowChange = true;
|
|
43
|
+
History.clearQueue();
|
|
44
|
+
state = History.state;
|
|
45
|
+
if (!state) state = {};
|
|
46
|
+
app.views.forEach(view => {
|
|
47
|
+
const router = view.router;
|
|
48
|
+
let viewState = state[view.id];
|
|
49
|
+
if (!viewState && view.params.browserHistory) {
|
|
50
|
+
viewState = {
|
|
51
|
+
url: view.router.history[0]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (!viewState) return;
|
|
55
|
+
const stateUrl = viewState.url || undefined;
|
|
56
|
+
let animate = router.params.animate;
|
|
57
|
+
if (router.params.browserHistoryAnimate === false) animate = false;
|
|
58
|
+
if (stateUrl !== router.url) {
|
|
59
|
+
if (router.history.indexOf(stateUrl) >= 0) {
|
|
60
|
+
// Go Back
|
|
61
|
+
if (router.allowPageChange) {
|
|
62
|
+
router.back({
|
|
63
|
+
animate,
|
|
64
|
+
browserHistory: false
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
History.routerQueue.push({
|
|
68
|
+
action: 'back',
|
|
69
|
+
router
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
} else if (router.allowPageChange) {
|
|
73
|
+
// Load page
|
|
74
|
+
router.navigate(stateUrl, {
|
|
75
|
+
animate,
|
|
76
|
+
browserHistory: false
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
History.routerQueue.unshift({
|
|
80
|
+
action: 'load',
|
|
81
|
+
stateUrl,
|
|
82
|
+
router
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
initViewState(viewId, viewState) {
|
|
89
|
+
const window = getWindow();
|
|
90
|
+
const newState = extend({}, History.state || {}, {
|
|
91
|
+
[viewId]: viewState
|
|
92
|
+
});
|
|
93
|
+
History.state = newState;
|
|
94
|
+
window.history.replaceState(newState, '');
|
|
95
|
+
},
|
|
96
|
+
push(viewId, viewState, url) {
|
|
97
|
+
const window = getWindow();
|
|
98
|
+
const document = getDocument();
|
|
99
|
+
/* eslint-disable no-param-reassign */
|
|
100
|
+
if (url.substr(-3) === '#!/') {
|
|
101
|
+
url = url.replace('#!/', '');
|
|
102
|
+
if (url === '') {
|
|
103
|
+
url = document.location.href;
|
|
104
|
+
if (url.includes('#!/')) {
|
|
105
|
+
url = document.location.href.split('#!/')[0];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/* eslint-enable no-param-reassign */
|
|
110
|
+
if (!History.allowChange) {
|
|
111
|
+
History.queue.push(() => {
|
|
112
|
+
History.push(viewId, viewState, url);
|
|
113
|
+
});
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
History.previousState = History.state;
|
|
117
|
+
const newState = extend({}, History.previousState || {}, {
|
|
118
|
+
[viewId]: viewState
|
|
119
|
+
});
|
|
120
|
+
History.state = newState;
|
|
121
|
+
window.history.pushState(newState, '', url);
|
|
122
|
+
},
|
|
123
|
+
replace(viewId, viewState, url) {
|
|
124
|
+
const window = getWindow();
|
|
125
|
+
if (url.substr(-3) === '#!/') {
|
|
126
|
+
// eslint-disable-next-line
|
|
127
|
+
url = url.replace('#!/', '');
|
|
128
|
+
}
|
|
129
|
+
if (!History.allowChange) {
|
|
130
|
+
History.queue.push(() => {
|
|
131
|
+
History.replace(viewId, viewState, url);
|
|
132
|
+
});
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
History.previousState = History.state;
|
|
136
|
+
const newState = extend({}, History.previousState || {}, {
|
|
137
|
+
[viewId]: viewState
|
|
138
|
+
});
|
|
139
|
+
History.state = newState;
|
|
140
|
+
window.history.replaceState(newState, '', url);
|
|
141
|
+
},
|
|
142
|
+
go(index) {
|
|
143
|
+
const window = getWindow();
|
|
144
|
+
History.allowChange = false;
|
|
145
|
+
window.history.go(index);
|
|
146
|
+
},
|
|
147
|
+
back() {
|
|
148
|
+
const window = getWindow();
|
|
149
|
+
History.allowChange = false;
|
|
150
|
+
window.history.back();
|
|
151
|
+
},
|
|
152
|
+
allowChange: true,
|
|
153
|
+
previousState: {},
|
|
154
|
+
state: {},
|
|
155
|
+
blockPopstate: true,
|
|
156
|
+
init(app) {
|
|
157
|
+
const window = getWindow();
|
|
158
|
+
const document = getDocument();
|
|
159
|
+
History.state = window.history.state;
|
|
160
|
+
$(window).on('load', () => {
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
History.blockPopstate = false;
|
|
163
|
+
}, 0);
|
|
164
|
+
});
|
|
165
|
+
if (document.readyState && document.readyState === 'complete') {
|
|
166
|
+
History.blockPopstate = false;
|
|
167
|
+
}
|
|
168
|
+
$(window).on('popstate', History.handle.bind(app));
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
export default History;
|