framework7 7.0.9 → 8.0.0-beta.1
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 +2 -16
- package/components/accordion/accordion.less +0 -3
- package/components/actions/actions-class.js +13 -58
- package/components/actions/actions-ios.less +42 -0
- package/components/actions/actions-md.less +12 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions-vars.less +17 -42
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -2
- package/components/actions/actions.js +0 -4
- package/components/actions/actions.lazy.js +1 -1
- package/components/actions/actions.less +5 -35
- package/components/app/app-class.d.ts +14 -12
- package/components/app/app-class.js +93 -75
- package/components/app/app-ios.less +0 -2
- package/components/app/app-md.less +0 -2
- package/components/app/app-vars.less +13 -96
- package/components/app/app.less +1 -4
- package/components/app/load-module.js +17 -36
- package/components/area-chart/area-chart-class.js +8 -64
- package/components/area-chart/area-chart.js +0 -3
- package/components/area-chart/area-chart.less +0 -3
- package/components/autocomplete/autocomplete-class.js +30 -175
- package/components/autocomplete/autocomplete-ios.less +0 -8
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete-vars.less +8 -22
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.d.ts +1 -3
- package/components/autocomplete/autocomplete.js +1 -6
- package/components/autocomplete/autocomplete.lazy.js +1 -1
- package/components/autocomplete/autocomplete.less +6 -18
- package/components/badge/badge-vars.less +3 -6
- package/components/badge/badge.less +1 -3
- package/components/block/block-vars.less +25 -52
- package/components/block/block.less +37 -12
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
- package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
- package/components/breadcrumbs/breadcrumbs.css +1 -1
- package/components/breadcrumbs/breadcrumbs.js +0 -2
- package/components/breadcrumbs/breadcrumbs.less +4 -10
- package/components/button/button-vars.less +42 -43
- package/components/button/button.less +24 -26
- package/components/calendar/calendar-class.js +81 -401
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +32 -46
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +6 -4
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/calendar/calendar.less +10 -21
- package/components/card/card-rtl.css +1 -1
- package/components/card/card-vars.less +41 -44
- package/components/card/card.css +1 -1
- package/components/card/card.js +0 -108
- package/components/card/card.less +18 -24
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox-vars.less +0 -8
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.less +10 -3
- package/components/chip/chip-ios.less +3 -0
- package/components/chip/chip-md.less +4 -3
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip-vars.less +17 -20
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.less +16 -21
- package/components/color-picker/color-picker-class.js +27 -158
- 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 +0 -4
- package/components/color-picker/color-picker.lazy.js +1 -1
- package/components/color-picker/color-picker.less +18 -8
- package/components/color-picker/modules/alpha-slider.js +0 -12
- package/components/color-picker/modules/brightness-slider.js +0 -8
- package/components/color-picker/modules/current-color.js +0 -2
- package/components/color-picker/modules/hex.js +0 -12
- package/components/color-picker/modules/hs-spectrum.js +0 -20
- package/components/color-picker/modules/hsb-sliders.js +0 -18
- package/components/color-picker/modules/hue-slider.js +0 -7
- package/components/color-picker/modules/initial-current-colors.js +0 -7
- package/components/color-picker/modules/palette.js +2 -10
- package/components/color-picker/modules/rgb-bars.js +0 -17
- package/components/color-picker/modules/rgb-sliders.js +0 -17
- package/components/color-picker/modules/sb-spectrum.js +0 -20
- package/components/color-picker/modules/wheel.js +0 -28
- package/components/contacts-list/contacts-list-md.less +4 -3
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list-vars.less +3 -15
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.less +0 -3
- package/components/data-table/data-table-class.js +10 -32
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table-vars.less +6 -39
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +0 -8
- package/components/data-table/data-table.less +0 -3
- package/components/dialog/dialog-class.js +7 -41
- package/components/dialog/dialog-ios.less +0 -3
- package/components/dialog/dialog-md.less +9 -9
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +25 -70
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +12 -48
- package/components/dialog/dialog.lazy.js +1 -1
- package/components/dialog/dialog.less +8 -4
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab-vars.less +20 -14
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +0 -21
- package/components/fab/fab.less +50 -53
- package/components/form/form.d.ts +4 -4
- package/components/form/form.js +58 -94
- package/components/form/form.lazy.js +1 -1
- package/components/form/form.less +0 -3
- package/components/gauge/gauge-class.js +4 -20
- package/components/gauge/gauge.js +0 -9
- package/components/gauge/gauge.less +0 -3
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid-vars.less +0 -7
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.d.ts +2 -8
- package/components/grid/grid.js +1 -225
- package/components/grid/grid.lazy.js +1 -1
- package/components/grid/grid.less +54 -184
- package/components/icon/icon.less +0 -3
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
- package/components/infinite-scroll/infinite-scroll.css +1 -1
- package/components/infinite-scroll/infinite-scroll.js +0 -16
- package/components/infinite-scroll/infinite-scroll.less +0 -3
- package/components/input/input-ios.less +49 -41
- package/components/input/input-md.less +87 -19
- package/components/input/input-rtl.css +1 -1
- package/components/input/input-vars.less +26 -60
- package/components/input/input.css +1 -1
- package/components/input/input.js +8 -67
- package/components/input/input.less +67 -153
- package/components/link/link-vars.less +0 -5
- package/components/link/link.less +3 -3
- package/components/list/list-md.less +0 -7
- package/components/list/list-vars.less +59 -108
- package/components/list/list.less +122 -90
- package/components/list-index/list-index-class.js +12 -69
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index-vars.less +0 -7
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.d.ts +1 -3
- package/components/list-index/list-index.js +0 -8
- package/components/list-index/list-index.lazy.js +1 -1
- package/components/list-index/list-index.less +4 -7
- package/components/login-screen/login-screen-class.js +4 -9
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen-vars.less +13 -12
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +0 -4
- package/components/login-screen/login-screen.less +2 -8
- package/components/messagebar/messagebar-class.js +18 -79
- package/components/messagebar/messagebar-ios.less +36 -0
- package/components/messagebar/messagebar-md.less +96 -16
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar-vars.less +27 -50
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +0 -8
- package/components/messagebar/messagebar.less +11 -42
- package/components/messages/messages-class.js +17 -110
- package/components/messages/messages-ios.less +9 -0
- package/components/messages/messages-md.less +63 -28
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages-vars.less +43 -50
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +0 -8
- package/components/messages/messages.lazy.js +1 -1
- package/components/messages/messages.less +0 -11
- package/components/modal/custom-modal-class.js +4 -14
- package/components/modal/modal-class.js +19 -55
- package/components/modal/modal.js +0 -3
- package/components/navbar/navbar-ios.less +3 -39
- package/components/navbar/navbar-md.less +12 -0
- package/components/navbar/navbar-vars.less +20 -49
- package/components/navbar/navbar.d.ts +0 -2
- package/components/navbar/navbar.js +37 -166
- package/components/navbar/navbar.less +4 -26
- package/components/notification/notification-class.js +4 -39
- package/components/notification/notification-md.less +18 -8
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +15 -54
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.js +0 -2
- package/components/notification/notification.lazy.js +1 -1
- package/components/notification/notification.less +0 -3
- package/components/page/page-md.less +40 -10
- package/components/page/page-transitions/circle.less +15 -9
- package/components/page/page-transitions/fade.less +17 -11
- package/components/page/page-transitions/flip.less +9 -4
- package/components/page/page-vars.less +3 -19
- package/components/page/page.less +2 -10
- package/components/panel/panel-class.js +23 -127
- package/components/panel/panel-md.less +9 -0
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel-vars.less +7 -21
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +0 -34
- package/components/panel/panel.lazy.js +1 -1
- package/components/panel/panel.less +56 -48
- package/components/panel/resizable-panel.js +2 -32
- package/components/panel/swipe-panel.js +16 -71
- package/components/photo-browser/photo-browser-class.js +41 -171
- package/components/photo-browser/photo-browser-rtl.css +1 -1
- package/components/photo-browser/photo-browser-vars.less +0 -3
- package/components/photo-browser/photo-browser.css +1 -1
- package/components/photo-browser/photo-browser.d.ts +2 -4
- package/components/photo-browser/photo-browser.js +1 -6
- package/components/photo-browser/photo-browser.lazy.js +1 -1
- package/components/photo-browser/photo-browser.less +0 -4
- package/components/picker/picker-class.js +26 -133
- package/components/picker/picker-column.js +11 -31
- package/components/picker/picker-ios.less +10 -0
- package/components/picker/picker-md.less +6 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker-vars.less +9 -25
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +0 -4
- package/components/picker/picker.lazy.js +1 -1
- package/components/picker/picker.less +0 -11
- package/components/pie-chart/pie-chart-class.js +8 -31
- package/components/pie-chart/pie-chart.js +0 -3
- package/components/pie-chart/pie-chart.less +0 -3
- package/components/popover/popover-class.js +72 -126
- package/components/popover/popover-ios.less +0 -50
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +6 -23
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +1 -12
- package/components/popover/popover.lazy.js +1 -1
- package/components/popover/popover.less +62 -5
- package/components/popup/popup-class.js +12 -78
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup-vars.less +7 -9
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +0 -4
- package/components/popup/popup.lazy.js +1 -1
- package/components/popup/popup.less +4 -4
- package/components/preloader/preloader-ios.less +3 -1
- package/components/preloader/preloader-md.less +5 -1
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader-vars.less +0 -6
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.js +8 -25
- package/components/preloader/preloader.lazy.js +1 -1
- package/components/preloader/preloader.less +6 -3
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar-vars.less +2 -12
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +2 -31
- package/components/progressbar/progressbar.less +0 -3
- package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
- package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
- package/components/pull-to-refresh/pull-to-refresh.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh.js +0 -8
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
- package/components/pull-to-refresh/pull-to-refresh.less +0 -3
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio-vars.less +0 -7
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.less +12 -5
- package/components/range/range-class.js +27 -112
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +10 -32
- package/components/range/range.css +1 -1
- package/components/range/range.js +0 -12
- package/components/range/range.less +0 -3
- package/components/searchbar/remove-diacritics.js +0 -4
- package/components/searchbar/searchbar-class.js +17 -138
- package/components/searchbar/searchbar-md.less +41 -16
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar-vars.less +25 -76
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.d.ts +2 -2
- package/components/searchbar/searchbar.js +0 -15
- package/components/searchbar/searchbar.lazy.js +1 -1
- package/components/searchbar/searchbar.less +14 -28
- package/components/sheet/sheet-class.js +15 -110
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet-vars.less +17 -6
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +0 -9
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/sheet/sheet.less +10 -3
- package/components/skeleton/skeleton.less +1 -4
- package/components/smart-select/smart-select-class.js +36 -173
- package/components/smart-select/smart-select.d.ts +1 -3
- package/components/smart-select/smart-select.js +1 -14
- package/components/smart-select/smart-select.lazy.js +1 -1
- package/components/smart-select/smart-select.less +0 -3
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable-vars.less +8 -8
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +0 -44
- package/components/sortable/sortable.less +0 -3
- package/components/statusbar/statusbar.js +0 -36
- package/components/statusbar/statusbar.less +0 -3
- package/components/stepper/stepper-class.js +10 -83
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper-vars.less +12 -24
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +0 -12
- package/components/stepper/stepper.less +12 -23
- package/components/subnavbar/subnavbar-vars.less +3 -18
- package/components/subnavbar/subnavbar.js +0 -3
- package/components/subnavbar/subnavbar.less +1 -11
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +7 -6
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +2 -99
- package/components/swipeout/swipeout.less +2 -7
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +9 -30
- package/components/swiper/swiper.lazy.js +1 -1
- package/components/swiper/swiper.less +1 -16
- package/components/tabs/tabs-rtl.css +1 -1
- package/components/tabs/tabs.css +1 -1
- package/components/tabs/tabs.js +23 -60
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/tabs/tabs.less +1 -3
- package/components/text-editor/text-editor-class.js +16 -102
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor-vars.less +12 -16
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +0 -8
- package/components/text-editor/text-editor.lazy.js +1 -1
- package/components/text-editor/text-editor.less +0 -6
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline-vars.less +13 -47
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.less +2 -9
- package/components/toast/toast-class.js +2 -16
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +5 -9
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.js +0 -3
- package/components/toast/toast.less +0 -3
- package/components/toggle/toggle-class.js +6 -30
- package/components/toggle/toggle-ios.less +5 -1
- package/components/toggle/toggle-md.less +27 -11
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle-vars.less +19 -21
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +0 -8
- package/components/toggle/toggle.less +0 -4
- package/components/toolbar/toolbar-ios.less +2 -2
- package/components/toolbar/toolbar-md.less +28 -4
- package/components/toolbar/toolbar-vars.less +17 -52
- package/components/toolbar/toolbar.js +5 -43
- package/components/toolbar/toolbar.less +27 -45
- package/components/tooltip/tooltip-class.js +10 -64
- package/components/tooltip/tooltip-rtl.css +1 -1
- package/components/tooltip/tooltip-vars.less +12 -3
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.js +0 -15
- package/components/tooltip/tooltip.less +0 -3
- package/components/touch-ripple/touch-ripple-class.js +0 -13
- package/components/touch-ripple/touch-ripple.js +0 -4
- package/components/touch-ripple/touch-ripple.less +1 -5
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview-vars.less +0 -3
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +2 -11
- package/components/treeview/treeview.lazy.js +1 -1
- package/components/treeview/treeview.less +0 -3
- package/components/typography/typography-rtl.css +1 -1
- package/components/typography/typography.css +1 -1
- package/components/typography/typography.less +25 -3
- package/components/view/resizable-view.js +2 -24
- package/components/view/view-class.js +28 -53
- package/components/view/view.d.ts +0 -14
- package/components/view/view.js +8 -32
- package/components/view/view.less +1 -4
- package/components/virtual-list/virtual-list-class.js +58 -146
- package/components/virtual-list/virtual-list.d.ts +1 -1
- package/components/virtual-list/virtual-list.js +0 -2
- package/components/virtual-list/virtual-list.lazy.js +1 -1
- package/components/virtual-list/virtual-list.less +0 -3
- package/framework7-bundle-rtl.css +3593 -5977
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +3591 -5978
- package/framework7-bundle.esm.js +4 -10
- package/framework7-bundle.js +6063 -12044
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -27
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +4 -10
- package/framework7-lite.esm.js +4 -6
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +803 -1591
- package/framework7-rtl.min.css +3 -3
- package/framework7-types.d.ts +1 -32
- package/framework7.css +803 -1594
- package/framework7.d.ts +1 -32
- package/framework7.esm.js +4 -6
- package/framework7.js +1770 -3407
- package/framework7.js.map +1 -1
- package/framework7.less +2 -23
- package/framework7.min.css +3 -3
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +7 -88
- package/less/plugin.js +15 -0
- package/modules/clicks/clicks.js +10 -22
- package/modules/component/$h.js +0 -3
- package/modules/component/$jsx.js +0 -5
- package/modules/component/component-class.js +13 -66
- package/modules/component/component.d.ts +1 -2
- package/modules/component/component.js +0 -8
- package/modules/component/eventslisteners.js +12 -20
- package/modules/component/parse-component.js +18 -20
- package/modules/component/snabbdom/h.js +3 -12
- package/modules/component/snabbdom/helpers/attachto.js +9 -14
- package/modules/component/snabbdom/htmldomapi.js +0 -16
- package/modules/component/snabbdom/modules/attributes.js +7 -11
- package/modules/component/snabbdom/modules/class.js +4 -8
- package/modules/component/snabbdom/modules/dataset.js +3 -7
- package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
- package/modules/component/snabbdom/modules/hero.js +4 -44
- package/modules/component/snabbdom/modules/props.js +5 -9
- package/modules/component/snabbdom/modules/style.js +13 -30
- package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
- package/modules/component/snabbdom/snabbdom.js +13 -72
- package/modules/component/snabbdom/thunk.js +3 -11
- package/modules/component/snabbdom/tovnode.js +1 -6
- package/modules/component/vdom.js +4 -62
- package/modules/demo-module.js +0 -8
- package/modules/device/device.js +6 -11
- package/modules/history/history.js +0 -1
- package/modules/resize/resize.js +8 -11
- package/modules/router/async-component.js +0 -3
- package/modules/router/back.js +86 -275
- package/modules/router/clear-previous-history.js +5 -18
- package/modules/router/component-loader.js +4 -25
- package/modules/router/modal.js +16 -43
- package/modules/router/navigate.js +80 -249
- package/modules/router/process-route-queue.js +0 -12
- package/modules/router/redirect.js +0 -8
- package/modules/router/router-class.js +92 -315
- package/modules/router/router.d.ts +3 -5
- package/modules/router/router.js +0 -3
- package/modules/router/swipe-back.js +35 -139
- package/modules/router/tab.js +14 -43
- package/modules/service-worker/service-worker.js +0 -11
- package/modules/store/create-store.js +10 -29
- package/modules/touch/touch.d.ts +2 -4
- package/modules/touch/touch.js +13 -108
- package/package.json +4 -18
- package/shared/$jsx.js +0 -6
- package/shared/class.js +18 -43
- package/shared/constructor-methods.js +0 -11
- package/shared/events-class.js +0 -17
- package/shared/get-device.js +18 -34
- package/shared/get-support.js +2 -8
- package/shared/history.js +2 -30
- package/shared/material-color-utils.js +728 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +0 -18
- package/shared/utils.d.ts +0 -4
- package/shared/utils.js +191 -71
- package/components/accordion/accordion-aurora.less +0 -2
- package/components/actions/actions-aurora.less +0 -9
- package/components/app/app-aurora.less +0 -10
- package/components/appbar/appbar-aurora.less +0 -2
- package/components/appbar/appbar-ios.less +0 -2
- package/components/appbar/appbar-md.less +0 -2
- package/components/appbar/appbar-rtl.css +0 -1
- package/components/appbar/appbar-vars.less +0 -28
- package/components/appbar/appbar.css +0 -1
- package/components/appbar/appbar.d.ts +0 -14
- package/components/appbar/appbar.js +0 -3
- package/components/appbar/appbar.lazy.js +0 -1
- package/components/appbar/appbar.less +0 -106
- package/components/area-chart/area-chart-aurora.less +0 -2
- package/components/autocomplete/autocomplete-aurora.less +0 -17
- package/components/badge/badge-aurora.less +0 -2
- package/components/block/block-aurora.less +0 -2
- package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
- package/components/button/button-aurora.less +0 -25
- package/components/calendar/calendar-aurora.less +0 -2
- package/components/card/card-aurora.less +0 -2
- package/components/checkbox/checkbox-aurora.less +0 -39
- package/components/chip/chip-aurora.less +0 -14
- package/components/color-picker/color-picker-aurora.less +0 -2
- package/components/contacts-list/contacts-list-aurora.less +0 -2
- package/components/data-table/data-table-aurora.less +0 -64
- package/components/dialog/dialog-aurora.less +0 -112
- package/components/elevation/elevation-aurora.less +0 -2
- package/components/elevation/elevation-ios.less +0 -2
- package/components/elevation/elevation-md.less +0 -2
- package/components/elevation/elevation-rtl.css +0 -1
- package/components/elevation/elevation-vars.less +0 -51
- package/components/elevation/elevation.css +0 -1
- package/components/elevation/elevation.d.ts +0 -14
- package/components/elevation/elevation.js +0 -3
- package/components/elevation/elevation.lazy.js +0 -1
- package/components/elevation/elevation.less +0 -54
- package/components/fab/fab-aurora.less +0 -2
- package/components/form/form-aurora.less +0 -0
- package/components/gauge/gauge-aurora.less +0 -2
- package/components/grid/grid-aurora.less +0 -2
- package/components/icon/icon-aurora.less +0 -49
- package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
- package/components/input/input-aurora.less +0 -120
- package/components/lazy/lazy-aurora.less +0 -2
- package/components/lazy/lazy-ios.less +0 -2
- package/components/lazy/lazy-md.less +0 -2
- package/components/lazy/lazy-rtl.css +0 -1
- package/components/lazy/lazy.css +0 -1
- package/components/lazy/lazy.d.ts +0 -57
- package/components/lazy/lazy.js +0 -283
- package/components/lazy/lazy.lazy.js +0 -1
- package/components/lazy/lazy.less +0 -23
- package/components/link/link-aurora.less +0 -15
- package/components/list/list-aurora.less +0 -25
- package/components/list-index/list-index-aurora.less +0 -21
- package/components/login-screen/login-screen-aurora.less +0 -2
- package/components/menu/menu-aurora.less +0 -8
- package/components/menu/menu-ios.less +0 -2
- package/components/menu/menu-md.less +0 -2
- package/components/menu/menu-rtl.css +0 -1
- package/components/menu/menu-vars.less +0 -27
- package/components/menu/menu.css +0 -1
- package/components/menu/menu.d.ts +0 -32
- package/components/menu/menu.js +0 -87
- package/components/menu/menu.lazy.js +0 -1
- package/components/menu/menu.less +0 -232
- package/components/messagebar/messagebar-aurora.less +0 -53
- package/components/messages/messages-aurora.less +0 -137
- package/components/navbar/navbar-aurora.less +0 -70
- package/components/notification/notification-aurora.less +0 -59
- package/components/page/page-aurora.less +0 -49
- package/components/panel/panel-aurora.less +0 -2
- package/components/photo-browser/photo-browser-aurora.less +0 -2
- package/components/picker/picker-aurora.less +0 -2
- package/components/pie-chart/pie-chart-aurora.less +0 -2
- package/components/popover/popover-aurora.less +0 -56
- package/components/popup/popup-aurora.less +0 -2
- package/components/preloader/preloader-aurora.less +0 -53
- package/components/progressbar/progressbar-aurora.less +0 -72
- package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
- package/components/radio/radio-aurora.less +0 -86
- package/components/range/range-aurora.less +0 -9
- package/components/searchbar/searchbar-aurora.less +0 -86
- package/components/sheet/sheet-aurora.less +0 -2
- package/components/skeleton/skeleton-aurora.less +0 -2
- package/components/smart-select/smart-select-aurora.less +0 -2
- package/components/sortable/sortable-aurora.less +0 -7
- package/components/statusbar/statusbar-aurora.less +0 -2
- package/components/stepper/stepper-aurora.less +0 -32
- package/components/subnavbar/subnavbar-aurora.less +0 -51
- package/components/swipeout/swipeout-aurora.less +0 -2
- package/components/swiper/swiper-aurora.less +0 -2
- package/components/tabs/tabs-aurora.less +0 -2
- package/components/text-editor/text-editor-aurora.less +0 -9
- package/components/timeline/timeline-aurora.less +0 -7
- package/components/toast/toast-aurora.less +0 -64
- package/components/toggle/toggle-aurora.less +0 -26
- package/components/toolbar/toolbar-aurora.less +0 -43
- package/components/tooltip/tooltip-aurora.less +0 -2
- package/components/touch-ripple/touch-ripple-aurora.less +0 -2
- package/components/treeview/treeview-aurora.less +0 -31
- package/components/typography/typography-aurora.less +0 -2
- package/components/view/view-aurora.less +0 -2
- package/components/virtual-list/virtual-list-aurora.less +0 -2
- package/modules/request/request.d.ts +0 -15
- package/modules/request/request.js +0 -11
- package/postinstall.js +0 -3
- package/shared/request.d.ts +0 -115
- package/shared/request.js +0 -512
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/* eslint "no-useless-escape": "off" */
|
|
2
2
|
import $ from '../../shared/dom7.js';
|
|
3
|
-
import { extend, id, nextTick, deleteProps, iosPreloaderContent, mdPreloaderContent
|
|
3
|
+
import { extend, id, nextTick, deleteProps, iosPreloaderContent, mdPreloaderContent } from '../../shared/utils.js';
|
|
4
4
|
import { getDevice } from '../../shared/get-device.js';
|
|
5
5
|
import Framework7Class from '../../shared/class.js';
|
|
6
6
|
/** @jsx $jsx */
|
|
7
|
-
|
|
8
7
|
import $jsx from '../../shared/$jsx.js';
|
|
9
|
-
|
|
10
8
|
class Autocomplete extends Framework7Class {
|
|
11
9
|
constructor(app, params) {
|
|
12
10
|
if (params === void 0) {
|
|
13
11
|
params = {};
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
super(params, [app]);
|
|
17
14
|
const ac = this;
|
|
18
15
|
ac.app = app;
|
|
@@ -21,36 +18,26 @@ class Autocomplete extends Framework7Class {
|
|
|
21
18
|
on: {}
|
|
22
19
|
}, app.params.autocomplete);
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
defaults.searchbarDisableButton = app.theme !== 'aurora';
|
|
26
|
-
} // Extend defaults with modules params
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
// Extend defaults with modules params
|
|
29
22
|
ac.useModulesParams(defaults);
|
|
30
23
|
ac.params = extend(defaults, params);
|
|
31
24
|
let $openerEl;
|
|
32
|
-
|
|
33
25
|
if (ac.params.openerEl) {
|
|
34
26
|
$openerEl = $(ac.params.openerEl);
|
|
35
27
|
if ($openerEl.length) $openerEl[0].f7Autocomplete = ac;
|
|
36
28
|
}
|
|
37
|
-
|
|
38
29
|
let $inputEl;
|
|
39
|
-
|
|
40
30
|
if (ac.params.inputEl) {
|
|
41
31
|
$inputEl = $(ac.params.inputEl);
|
|
42
32
|
if ($inputEl.length) $inputEl[0].f7Autocomplete = ac;
|
|
43
33
|
}
|
|
44
|
-
|
|
45
34
|
const uniqueId = id();
|
|
46
35
|
let url = params.url;
|
|
47
|
-
|
|
48
36
|
if (!url && $openerEl && $openerEl.length) {
|
|
49
37
|
if ($openerEl.attr('href')) url = $openerEl.attr('href');else if ($openerEl.find('a').length > 0) {
|
|
50
38
|
url = $openerEl.find('a').attr('href');
|
|
51
39
|
}
|
|
52
40
|
}
|
|
53
|
-
|
|
54
41
|
if (!url || url === '#' || url === '') url = ac.params.url;
|
|
55
42
|
const inputType = ac.params.multiple ? 'checkbox' : 'radio';
|
|
56
43
|
extend(ac, {
|
|
@@ -67,7 +54,6 @@ class Autocomplete extends Framework7Class {
|
|
|
67
54
|
$dropdownEl: undefined
|
|
68
55
|
});
|
|
69
56
|
let previousQuery = '';
|
|
70
|
-
|
|
71
57
|
function onInputChange() {
|
|
72
58
|
let query = ac.$inputEl.val().trim();
|
|
73
59
|
if (!ac.params.source) return;
|
|
@@ -76,73 +62,58 @@ class Autocomplete extends Framework7Class {
|
|
|
76
62
|
const limit = ac.params.limit ? Math.min(ac.params.limit, items.length) : items.length;
|
|
77
63
|
ac.items = items;
|
|
78
64
|
let regExp;
|
|
79
|
-
|
|
80
65
|
if (ac.params.highlightMatches) {
|
|
81
66
|
query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
82
67
|
regExp = new RegExp(`(${query})`, 'i');
|
|
83
68
|
}
|
|
84
|
-
|
|
85
69
|
let firstValue;
|
|
86
70
|
let firstItem;
|
|
87
|
-
|
|
88
71
|
for (let i = 0; i < limit; i += 1) {
|
|
89
72
|
const itemValue = typeof items[i] === 'object' ? items[i][ac.params.valueProperty] : items[i];
|
|
90
73
|
const itemText = typeof items[i] === 'object' ? items[i][ac.params.textProperty] : items[i];
|
|
91
|
-
|
|
92
74
|
if (i === 0) {
|
|
93
75
|
firstValue = itemValue;
|
|
94
76
|
firstItem = ac.items[i];
|
|
95
77
|
}
|
|
96
|
-
|
|
97
78
|
itemsHTML += ac.renderItem({
|
|
98
79
|
value: itemValue,
|
|
99
80
|
text: ac.params.highlightMatches ? itemText.replace(regExp, '<b>$1</b>') : itemText
|
|
100
81
|
}, i);
|
|
101
82
|
}
|
|
102
|
-
|
|
103
83
|
if (itemsHTML === '' && query === '' && ac.params.dropdownPlaceholderText) {
|
|
104
84
|
itemsHTML += ac.renderItem({
|
|
105
85
|
placeholder: true,
|
|
106
86
|
text: ac.params.dropdownPlaceholderText
|
|
107
87
|
});
|
|
108
88
|
}
|
|
109
|
-
|
|
110
89
|
ac.$dropdownEl.find('ul').html(itemsHTML);
|
|
111
|
-
|
|
112
90
|
if (ac.params.typeahead) {
|
|
113
91
|
if (!firstValue || !firstItem) {
|
|
114
92
|
return;
|
|
115
93
|
}
|
|
116
|
-
|
|
117
94
|
if (firstValue.toLowerCase().indexOf(query.toLowerCase()) !== 0) {
|
|
118
95
|
return;
|
|
119
96
|
}
|
|
120
|
-
|
|
121
97
|
if (previousQuery.toLowerCase() === query.toLowerCase()) {
|
|
122
98
|
ac.value = [];
|
|
123
99
|
return;
|
|
124
100
|
}
|
|
125
|
-
|
|
126
101
|
if (previousQuery.toLowerCase().indexOf(query.toLowerCase()) === 0) {
|
|
127
102
|
previousQuery = query;
|
|
128
103
|
ac.value = [];
|
|
129
104
|
return;
|
|
130
105
|
}
|
|
131
|
-
|
|
132
106
|
$inputEl.val(firstValue);
|
|
133
107
|
$inputEl[0].setSelectionRange(query.length, firstValue.length);
|
|
134
108
|
const previousValue = typeof ac.value[0] === 'object' ? ac.value[0][ac.params.valueProperty] : ac.value[0];
|
|
135
|
-
|
|
136
109
|
if (!previousValue || firstValue.toLowerCase() !== previousValue.toLowerCase()) {
|
|
137
110
|
ac.value = [firstItem];
|
|
138
111
|
ac.emit('local::change autocompleteChange', [firstItem]);
|
|
139
112
|
}
|
|
140
113
|
}
|
|
141
|
-
|
|
142
114
|
previousQuery = query;
|
|
143
115
|
});
|
|
144
116
|
}
|
|
145
|
-
|
|
146
117
|
function onPageInputChange() {
|
|
147
118
|
const inputEl = this;
|
|
148
119
|
const value = inputEl.value;
|
|
@@ -150,30 +121,25 @@ class Autocomplete extends Framework7Class {
|
|
|
150
121
|
let item;
|
|
151
122
|
let itemValue;
|
|
152
123
|
let aValue;
|
|
153
|
-
|
|
154
124
|
if (isValues) {
|
|
155
125
|
if (ac.inputType === 'checkbox' && !inputEl.checked) {
|
|
156
126
|
for (let i = 0; i < ac.value.length; i += 1) {
|
|
157
127
|
aValue = typeof ac.value[i] === 'string' ? ac.value[i] : ac.value[i][ac.params.valueProperty];
|
|
158
|
-
|
|
159
128
|
if (aValue === value || aValue * 1 === value * 1) {
|
|
160
129
|
ac.value.splice(i, 1);
|
|
161
130
|
}
|
|
162
131
|
}
|
|
163
|
-
|
|
164
132
|
ac.updateValues();
|
|
165
133
|
ac.emit('local::change autocompleteChange', ac.value);
|
|
166
134
|
}
|
|
167
|
-
|
|
168
135
|
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
136
|
+
}
|
|
171
137
|
|
|
138
|
+
// Find Related Item
|
|
172
139
|
for (let i = 0; i < ac.items.length; i += 1) {
|
|
173
140
|
itemValue = typeof ac.items[i] === 'object' ? ac.items[i][ac.params.valueProperty] : ac.items[i];
|
|
174
141
|
if (itemValue === value || itemValue * 1 === value * 1) item = ac.items[i];
|
|
175
142
|
}
|
|
176
|
-
|
|
177
143
|
if (ac.inputType === 'radio') {
|
|
178
144
|
ac.value = [item];
|
|
179
145
|
} else if (inputEl.checked) {
|
|
@@ -181,169 +147,137 @@ class Autocomplete extends Framework7Class {
|
|
|
181
147
|
} else {
|
|
182
148
|
for (let i = 0; i < ac.value.length; i += 1) {
|
|
183
149
|
aValue = typeof ac.value[i] === 'object' ? ac.value[i][ac.params.valueProperty] : ac.value[i];
|
|
184
|
-
|
|
185
150
|
if (aValue === value || aValue * 1 === value * 1) {
|
|
186
151
|
ac.value.splice(i, 1);
|
|
187
152
|
}
|
|
188
153
|
}
|
|
189
|
-
}
|
|
190
|
-
|
|
154
|
+
}
|
|
191
155
|
|
|
192
|
-
|
|
156
|
+
// Update Values Block
|
|
157
|
+
ac.updateValues();
|
|
193
158
|
|
|
159
|
+
// On Select Callback
|
|
194
160
|
if (ac.inputType === 'radio' && inputEl.checked || ac.inputType === 'checkbox') {
|
|
195
161
|
ac.emit('local::change autocompleteChange', ac.value);
|
|
196
162
|
}
|
|
197
163
|
}
|
|
198
|
-
|
|
199
164
|
function onHtmlClick(e) {
|
|
200
165
|
const $targetEl = $(e.target);
|
|
201
166
|
if ($targetEl.is(ac.$inputEl[0]) || ac.$dropdownEl && $targetEl.closest(ac.$dropdownEl[0]).length) return;
|
|
202
167
|
ac.close();
|
|
203
168
|
}
|
|
204
|
-
|
|
205
169
|
function onOpenerClick() {
|
|
206
170
|
ac.open();
|
|
207
171
|
}
|
|
208
|
-
|
|
209
172
|
function onInputFocus() {
|
|
210
173
|
ac.open();
|
|
211
174
|
}
|
|
212
|
-
|
|
213
175
|
function onInputBlur() {
|
|
214
176
|
if (ac.$dropdownEl.find('label.active-state').length > 0) return;
|
|
215
177
|
setTimeout(() => {
|
|
216
178
|
ac.close();
|
|
217
179
|
}, 0);
|
|
218
180
|
}
|
|
219
|
-
|
|
220
181
|
function onResize() {
|
|
221
182
|
ac.positionDropdown();
|
|
222
183
|
}
|
|
223
|
-
|
|
224
184
|
function onKeyDown(e) {
|
|
225
185
|
if (!ac.opened) return;
|
|
226
|
-
|
|
227
186
|
if (e.keyCode === 27) {
|
|
228
187
|
// ESC
|
|
229
188
|
e.preventDefault();
|
|
230
189
|
ac.$inputEl.blur();
|
|
231
190
|
return;
|
|
232
191
|
}
|
|
233
|
-
|
|
234
192
|
if (e.keyCode === 13) {
|
|
235
193
|
// Enter
|
|
236
194
|
const $selectedItemLabel = ac.$dropdownEl.find('.autocomplete-dropdown-selected label');
|
|
237
|
-
|
|
238
195
|
if ($selectedItemLabel.length) {
|
|
239
196
|
e.preventDefault();
|
|
240
197
|
$selectedItemLabel.trigger('click');
|
|
241
198
|
ac.$inputEl.blur();
|
|
242
199
|
return;
|
|
243
200
|
}
|
|
244
|
-
|
|
245
201
|
if (ac.params.typeahead) {
|
|
246
202
|
e.preventDefault();
|
|
247
203
|
ac.$inputEl.blur();
|
|
248
204
|
}
|
|
249
|
-
|
|
250
205
|
return;
|
|
251
206
|
}
|
|
252
|
-
|
|
253
207
|
if (e.keyCode !== 40 && e.keyCode !== 38) return;
|
|
254
208
|
e.preventDefault();
|
|
255
209
|
const $selectedItem = ac.$dropdownEl.find('.autocomplete-dropdown-selected');
|
|
256
210
|
let $newItem;
|
|
257
|
-
|
|
258
211
|
if ($selectedItem.length) {
|
|
259
212
|
$newItem = $selectedItem[e.keyCode === 40 ? 'next' : 'prev']('li');
|
|
260
|
-
|
|
261
213
|
if (!$newItem.length) {
|
|
262
214
|
$newItem = ac.$dropdownEl.find('li').eq(e.keyCode === 40 ? 0 : ac.$dropdownEl.find('li').length - 1);
|
|
263
215
|
}
|
|
264
216
|
} else {
|
|
265
217
|
$newItem = ac.$dropdownEl.find('li').eq(e.keyCode === 40 ? 0 : ac.$dropdownEl.find('li').length - 1);
|
|
266
218
|
}
|
|
267
|
-
|
|
268
219
|
if ($newItem.hasClass('autocomplete-dropdown-placeholder')) return;
|
|
269
220
|
$selectedItem.removeClass('autocomplete-dropdown-selected');
|
|
270
221
|
$newItem.addClass('autocomplete-dropdown-selected');
|
|
271
222
|
}
|
|
272
|
-
|
|
273
223
|
function onDropdownClick() {
|
|
274
224
|
const $clickedEl = $(this);
|
|
275
225
|
let clickedItem;
|
|
276
|
-
|
|
277
226
|
for (let i = 0; i < ac.items.length; i += 1) {
|
|
278
227
|
const itemValue = typeof ac.items[i] === 'object' ? ac.items[i][ac.params.valueProperty] : ac.items[i];
|
|
279
228
|
const value = $clickedEl.attr('data-value');
|
|
280
|
-
|
|
281
229
|
if (itemValue === value || itemValue * 1 === value * 1) {
|
|
282
230
|
clickedItem = ac.items[i];
|
|
283
231
|
}
|
|
284
232
|
}
|
|
285
|
-
|
|
286
233
|
if (ac.params.updateInputValueOnSelect) {
|
|
287
234
|
ac.$inputEl.val(typeof clickedItem === 'object' ? clickedItem[ac.params.valueProperty] : clickedItem);
|
|
288
235
|
ac.$inputEl.trigger('input change');
|
|
289
236
|
}
|
|
290
|
-
|
|
291
237
|
ac.value = [clickedItem];
|
|
292
238
|
ac.emit('local::change autocompleteChange', [clickedItem]);
|
|
293
239
|
ac.close();
|
|
294
240
|
}
|
|
295
|
-
|
|
296
241
|
ac.attachEvents = function attachEvents() {
|
|
297
242
|
if (ac.params.openIn !== 'dropdown' && ac.$openerEl) {
|
|
298
243
|
ac.$openerEl.on('click', onOpenerClick);
|
|
299
244
|
}
|
|
300
|
-
|
|
301
245
|
if (ac.params.openIn === 'dropdown' && ac.$inputEl) {
|
|
302
246
|
ac.$inputEl.on('focus', onInputFocus);
|
|
303
247
|
ac.$inputEl.on(ac.params.inputEvents, onInputChange);
|
|
304
|
-
|
|
305
248
|
if (device.android) {
|
|
306
249
|
$('html').on('click', onHtmlClick);
|
|
307
250
|
} else {
|
|
308
251
|
ac.$inputEl.on('blur', onInputBlur);
|
|
309
252
|
}
|
|
310
|
-
|
|
311
253
|
ac.$inputEl.on('keydown', onKeyDown);
|
|
312
254
|
}
|
|
313
255
|
};
|
|
314
|
-
|
|
315
256
|
ac.detachEvents = function attachEvents() {
|
|
316
257
|
if (ac.params.openIn !== 'dropdown' && ac.$openerEl) {
|
|
317
258
|
ac.$openerEl.off('click', onOpenerClick);
|
|
318
259
|
}
|
|
319
|
-
|
|
320
260
|
if (ac.params.openIn === 'dropdown' && ac.$inputEl) {
|
|
321
261
|
ac.$inputEl.off('focus', onInputFocus);
|
|
322
262
|
ac.$inputEl.off(ac.params.inputEvents, onInputChange);
|
|
323
|
-
|
|
324
263
|
if (device.android) {
|
|
325
264
|
$('html').off('click', onHtmlClick);
|
|
326
265
|
} else {
|
|
327
266
|
ac.$inputEl.off('blur', onInputBlur);
|
|
328
267
|
}
|
|
329
|
-
|
|
330
268
|
ac.$inputEl.off('keydown', onKeyDown);
|
|
331
269
|
}
|
|
332
270
|
};
|
|
333
|
-
|
|
334
271
|
ac.attachDropdownEvents = function attachDropdownEvents() {
|
|
335
272
|
ac.$dropdownEl.on('click', 'label', onDropdownClick);
|
|
336
273
|
app.on('resize', onResize);
|
|
337
274
|
};
|
|
338
|
-
|
|
339
275
|
ac.detachDropdownEvents = function detachDropdownEvents() {
|
|
340
276
|
ac.$dropdownEl.off('click', 'label', onDropdownClick);
|
|
341
277
|
app.off('resize', onResize);
|
|
342
278
|
};
|
|
343
|
-
|
|
344
279
|
ac.attachPageEvents = function attachPageEvents() {
|
|
345
280
|
ac.$el.on('change', 'input[type="radio"], input[type="checkbox"]', onPageInputChange);
|
|
346
|
-
|
|
347
281
|
if (ac.params.closeOnSelect && !ac.params.multiple) {
|
|
348
282
|
ac.$el.once('click', '.list label', () => {
|
|
349
283
|
nextTick(() => {
|
|
@@ -352,18 +286,17 @@ class Autocomplete extends Framework7Class {
|
|
|
352
286
|
});
|
|
353
287
|
}
|
|
354
288
|
};
|
|
355
|
-
|
|
356
289
|
ac.detachPageEvents = function detachPageEvents() {
|
|
357
290
|
ac.$el.off('change', 'input[type="radio"], input[type="checkbox"]', onPageInputChange);
|
|
358
|
-
};
|
|
359
|
-
|
|
291
|
+
};
|
|
360
292
|
|
|
361
|
-
|
|
293
|
+
// Install Modules
|
|
294
|
+
ac.useModules();
|
|
362
295
|
|
|
296
|
+
// Init
|
|
363
297
|
ac.init();
|
|
364
298
|
return ac;
|
|
365
299
|
}
|
|
366
|
-
|
|
367
300
|
get view() {
|
|
368
301
|
const ac = this;
|
|
369
302
|
const {
|
|
@@ -372,18 +305,15 @@ class Autocomplete extends Framework7Class {
|
|
|
372
305
|
app
|
|
373
306
|
} = ac;
|
|
374
307
|
let view;
|
|
375
|
-
|
|
376
308
|
if (ac.params.view) {
|
|
377
309
|
view = ac.params.view;
|
|
378
310
|
} else if ($openerEl || $inputEl) {
|
|
379
311
|
const $el = $openerEl || $inputEl;
|
|
380
312
|
view = $el.closest('.view').length && $el.closest('.view')[0].f7View;
|
|
381
313
|
}
|
|
382
|
-
|
|
383
314
|
if (!view) view = app.views.main;
|
|
384
315
|
return view;
|
|
385
316
|
}
|
|
386
|
-
|
|
387
317
|
positionDropdown() {
|
|
388
318
|
const ac = this;
|
|
389
319
|
const {
|
|
@@ -411,11 +341,9 @@ class Autocomplete extends Framework7Class {
|
|
|
411
341
|
const maxHeight = $pageContentEl[0].scrollHeight - paddingBottom - (inputOffsetTop + $pageContentEl[0].scrollTop) - $inputEl[0].offsetHeight;
|
|
412
342
|
const paddingProp = app.rtl ? 'padding-right' : 'padding-left';
|
|
413
343
|
let paddingValue;
|
|
414
|
-
|
|
415
|
-
if ($listEl.length && !ac.params.expandInput) {
|
|
344
|
+
if ($listEl.length) {
|
|
416
345
|
paddingValue = (app.rtl ? $listEl[0].offsetWidth - inputOffsetLeft - inputOffsetWidth : inputOffsetLeft) - (app.theme === 'md' ? 16 : 15);
|
|
417
346
|
}
|
|
418
|
-
|
|
419
347
|
$dropdownEl.css({
|
|
420
348
|
left: `${$listEl.length > 0 ? listOffsetLeft : inputOffsetLeft}px`,
|
|
421
349
|
top: `${inputOffsetTop + $pageContentEl[0].scrollTop + inputOffsetHeight}px`,
|
|
@@ -423,15 +351,13 @@ class Autocomplete extends Framework7Class {
|
|
|
423
351
|
});
|
|
424
352
|
$dropdownEl.children('.autocomplete-dropdown-inner').css({
|
|
425
353
|
maxHeight: `${maxHeight}px`,
|
|
426
|
-
[paddingProp]: $listEl.length > 0
|
|
354
|
+
[paddingProp]: $listEl.length > 0 ? `${paddingValue}px` : ''
|
|
427
355
|
});
|
|
428
356
|
}
|
|
429
|
-
|
|
430
357
|
focus() {
|
|
431
358
|
const ac = this;
|
|
432
359
|
ac.$el.find('input[type=search]').focus();
|
|
433
360
|
}
|
|
434
|
-
|
|
435
361
|
source(query) {
|
|
436
362
|
const ac = this;
|
|
437
363
|
if (!ac.params.source) return;
|
|
@@ -442,16 +368,13 @@ class Autocomplete extends Framework7Class {
|
|
|
442
368
|
let itemsHTML = '';
|
|
443
369
|
const limit = ac.params.limit ? Math.min(ac.params.limit, items.length) : items.length;
|
|
444
370
|
ac.items = items;
|
|
445
|
-
|
|
446
371
|
for (let i = 0; i < limit; i += 1) {
|
|
447
372
|
let selected = false;
|
|
448
373
|
const itemValue = typeof items[i] === 'object' ? items[i][ac.params.valueProperty] : items[i];
|
|
449
|
-
|
|
450
374
|
for (let j = 0; j < ac.value.length; j += 1) {
|
|
451
375
|
const aValue = typeof ac.value[j] === 'object' ? ac.value[j][ac.params.valueProperty] : ac.value[j];
|
|
452
376
|
if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true;
|
|
453
377
|
}
|
|
454
|
-
|
|
455
378
|
itemsHTML += ac.renderItem({
|
|
456
379
|
value: itemValue,
|
|
457
380
|
text: typeof items[i] === 'object' ? items[i][ac.params.textProperty] : items[i],
|
|
@@ -461,9 +384,7 @@ class Autocomplete extends Framework7Class {
|
|
|
461
384
|
selected
|
|
462
385
|
}, i);
|
|
463
386
|
}
|
|
464
|
-
|
|
465
387
|
$el.find('.autocomplete-found ul').html(itemsHTML);
|
|
466
|
-
|
|
467
388
|
if (items.length === 0) {
|
|
468
389
|
if (query.length !== 0) {
|
|
469
390
|
$el.find('.autocomplete-not-found').show();
|
|
@@ -478,11 +399,9 @@ class Autocomplete extends Framework7Class {
|
|
|
478
399
|
}
|
|
479
400
|
});
|
|
480
401
|
}
|
|
481
|
-
|
|
482
402
|
updateValues() {
|
|
483
403
|
const ac = this;
|
|
484
404
|
let valuesHTML = '';
|
|
485
|
-
|
|
486
405
|
for (let i = 0; i < ac.value.length; i += 1) {
|
|
487
406
|
valuesHTML += ac.renderItem({
|
|
488
407
|
value: typeof ac.value[i] === 'object' ? ac.value[i][ac.params.valueProperty] : ac.value[i],
|
|
@@ -493,42 +412,34 @@ class Autocomplete extends Framework7Class {
|
|
|
493
412
|
selected: true
|
|
494
413
|
}, i);
|
|
495
414
|
}
|
|
496
|
-
|
|
497
415
|
ac.$el.find('.autocomplete-values ul').html(valuesHTML);
|
|
498
416
|
}
|
|
499
|
-
|
|
500
417
|
preloaderHide() {
|
|
501
418
|
const ac = this;
|
|
502
|
-
|
|
503
419
|
if (ac.params.openIn === 'dropdown' && ac.$dropdownEl) {
|
|
504
420
|
ac.$dropdownEl.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');
|
|
505
421
|
} else {
|
|
506
422
|
$('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');
|
|
507
423
|
}
|
|
508
424
|
}
|
|
509
|
-
|
|
510
425
|
preloaderShow() {
|
|
511
426
|
const ac = this;
|
|
512
|
-
|
|
513
427
|
if (ac.params.openIn === 'dropdown' && ac.$dropdownEl) {
|
|
514
428
|
ac.$dropdownEl.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible');
|
|
515
429
|
} else {
|
|
516
430
|
$('.autocomplete-preloader').addClass('autocomplete-preloader-visible');
|
|
517
431
|
}
|
|
518
432
|
}
|
|
519
|
-
|
|
520
433
|
renderPreloader() {
|
|
521
434
|
const ac = this;
|
|
522
435
|
const preloaders = {
|
|
523
436
|
iosPreloaderContent,
|
|
524
|
-
mdPreloaderContent
|
|
525
|
-
auroraPreloaderContent
|
|
437
|
+
mdPreloaderContent
|
|
526
438
|
};
|
|
527
439
|
return $jsx("div", {
|
|
528
440
|
class: `autocomplete-preloader preloader ${ac.params.preloaderColor ? `color-${ac.params.preloaderColor}` : ''}`
|
|
529
441
|
}, preloaders[`${ac.app.theme}PreloaderContent`] || '');
|
|
530
442
|
}
|
|
531
|
-
|
|
532
443
|
renderSearchbar() {
|
|
533
444
|
const ac = this;
|
|
534
445
|
if (ac.params.renderSearchbar) return ac.params.renderSearchbar.call(ac);
|
|
@@ -550,12 +461,10 @@ class Autocomplete extends Framework7Class {
|
|
|
550
461
|
class: "searchbar-disable-button"
|
|
551
462
|
}, ac.params.searchbarDisableText)));
|
|
552
463
|
}
|
|
553
|
-
|
|
554
464
|
renderItem(item, index) {
|
|
555
465
|
const ac = this;
|
|
556
466
|
if (ac.params.renderItem) return ac.params.renderItem.call(ac, item, index);
|
|
557
467
|
const itemValue = item.value && typeof item.value === 'string' ? item.value.replace(/"/g, '"') : item.value;
|
|
558
|
-
|
|
559
468
|
if (ac.params.openIn !== 'dropdown') {
|
|
560
469
|
return $jsx("li", null, $jsx("label", {
|
|
561
470
|
class: `item-${item.inputType} item-content`
|
|
@@ -571,9 +480,8 @@ class Autocomplete extends Framework7Class {
|
|
|
571
480
|
}, $jsx("div", {
|
|
572
481
|
class: "item-title"
|
|
573
482
|
}, item.text))));
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
483
|
+
}
|
|
484
|
+
// Dropdown
|
|
577
485
|
if (!item.placeholder) {
|
|
578
486
|
return $jsx("li", null, $jsx("label", {
|
|
579
487
|
class: "item-radio item-content",
|
|
@@ -583,9 +491,9 @@ class Autocomplete extends Framework7Class {
|
|
|
583
491
|
}, $jsx("div", {
|
|
584
492
|
class: "item-title"
|
|
585
493
|
}, item.text))));
|
|
586
|
-
}
|
|
587
|
-
|
|
494
|
+
}
|
|
588
495
|
|
|
496
|
+
// Dropwdown placeholder
|
|
589
497
|
return $jsx("li", {
|
|
590
498
|
class: "autocomplete-dropdown-placeholder"
|
|
591
499
|
}, $jsx("label", {
|
|
@@ -596,18 +504,16 @@ class Autocomplete extends Framework7Class {
|
|
|
596
504
|
class: "item-title"
|
|
597
505
|
}, item.text))));
|
|
598
506
|
}
|
|
599
|
-
|
|
600
507
|
renderNavbar() {
|
|
601
508
|
const ac = this;
|
|
602
509
|
if (ac.params.renderNavbar) return ac.params.renderNavbar.call(ac);
|
|
603
510
|
let pageTitle = ac.params.pageTitle;
|
|
604
|
-
|
|
605
511
|
if (typeof pageTitle === 'undefined' && ac.$openerEl && ac.$openerEl.length) {
|
|
606
512
|
pageTitle = ac.$openerEl.find('.item-title').text().trim();
|
|
607
513
|
}
|
|
514
|
+
const inPopup = ac.params.openIn === 'popup';
|
|
608
515
|
|
|
609
|
-
|
|
610
|
-
|
|
516
|
+
// eslint-disable-next-line
|
|
611
517
|
const navbarLeft = inPopup ? ac.params.preloader && $jsx("div", {
|
|
612
518
|
class: "left"
|
|
613
519
|
}, ac.renderPreloader()) : $jsx("div", {
|
|
@@ -639,7 +545,6 @@ class Autocomplete extends Framework7Class {
|
|
|
639
545
|
class: "subnavbar sliding"
|
|
640
546
|
}, ac.renderSearchbar())));
|
|
641
547
|
}
|
|
642
|
-
|
|
643
548
|
renderDropdown() {
|
|
644
549
|
const ac = this;
|
|
645
550
|
if (ac.params.renderDropdown) return ac.params.renderDropdown.call(ac, ac.items);
|
|
@@ -648,10 +553,9 @@ class Autocomplete extends Framework7Class {
|
|
|
648
553
|
}, $jsx("div", {
|
|
649
554
|
class: "autocomplete-dropdown-inner"
|
|
650
555
|
}, $jsx("div", {
|
|
651
|
-
class: `list
|
|
556
|
+
class: `list no-safe-areas`
|
|
652
557
|
}, $jsx("ul", null))), ac.params.preloader && ac.renderPreloader());
|
|
653
558
|
}
|
|
654
|
-
|
|
655
559
|
renderPage(inPopup) {
|
|
656
560
|
const ac = this;
|
|
657
561
|
if (ac.params.renderPage) return ac.params.renderPage.call(ac, ac.items);
|
|
@@ -676,7 +580,6 @@ class Autocomplete extends Framework7Class {
|
|
|
676
580
|
class: "list autocomplete-values"
|
|
677
581
|
}, $jsx("ul", null))));
|
|
678
582
|
}
|
|
679
|
-
|
|
680
583
|
renderPopup() {
|
|
681
584
|
const ac = this;
|
|
682
585
|
if (ac.params.renderPopup) return ac.params.renderPopup.call(ac, ac.items);
|
|
@@ -686,7 +589,6 @@ class Autocomplete extends Framework7Class {
|
|
|
686
589
|
class: "view"
|
|
687
590
|
}, ac.renderPage(true), ";"));
|
|
688
591
|
}
|
|
689
|
-
|
|
690
592
|
onOpen(type, el) {
|
|
691
593
|
const ac = this;
|
|
692
594
|
const app = ac.app;
|
|
@@ -695,7 +597,6 @@ class Autocomplete extends Framework7Class {
|
|
|
695
597
|
ac.el = $el[0];
|
|
696
598
|
ac.openedIn = type;
|
|
697
599
|
ac.opened = true;
|
|
698
|
-
|
|
699
600
|
if (ac.params.openIn === 'dropdown') {
|
|
700
601
|
ac.attachDropdownEvents();
|
|
701
602
|
ac.$dropdownEl.addClass('autocomplete-dropdown-in');
|
|
@@ -703,11 +604,9 @@ class Autocomplete extends Framework7Class {
|
|
|
703
604
|
} else {
|
|
704
605
|
// Init SB
|
|
705
606
|
let $searchbarEl = $el.find('.searchbar');
|
|
706
|
-
|
|
707
607
|
if (ac.params.openIn === 'page' && app.theme === 'ios' && $searchbarEl.length === 0) {
|
|
708
608
|
$searchbarEl = $(app.navbar.getElByPage($el)).find('.searchbar');
|
|
709
609
|
}
|
|
710
|
-
|
|
711
610
|
ac.searchbar = app.searchbar.create({
|
|
712
611
|
el: $searchbarEl,
|
|
713
612
|
backdropEl: $el.find('.searchbar-backdrop'),
|
|
@@ -719,64 +618,54 @@ class Autocomplete extends Framework7Class {
|
|
|
719
618
|
} else {
|
|
720
619
|
ac.searchbar.backdropHide();
|
|
721
620
|
}
|
|
722
|
-
|
|
723
621
|
ac.source(query);
|
|
724
622
|
}
|
|
725
|
-
|
|
726
623
|
}
|
|
727
|
-
});
|
|
624
|
+
});
|
|
728
625
|
|
|
729
|
-
|
|
626
|
+
// Attach page events
|
|
627
|
+
ac.attachPageEvents();
|
|
730
628
|
|
|
731
|
-
|
|
629
|
+
// Update Values On Page Init
|
|
630
|
+
ac.updateValues();
|
|
732
631
|
|
|
632
|
+
// Source on load
|
|
733
633
|
if (ac.params.requestSourceOnOpen) ac.source('');
|
|
734
634
|
}
|
|
735
|
-
|
|
736
635
|
ac.emit('local::open autocompleteOpen', ac);
|
|
737
636
|
}
|
|
738
|
-
|
|
739
637
|
autoFocus() {
|
|
740
638
|
const ac = this;
|
|
741
|
-
|
|
742
639
|
if (ac.searchbar && ac.searchbar.$inputEl) {
|
|
743
640
|
ac.searchbar.$inputEl.focus();
|
|
744
641
|
}
|
|
745
|
-
|
|
746
642
|
return ac;
|
|
747
643
|
}
|
|
748
|
-
|
|
749
644
|
onOpened() {
|
|
750
645
|
const ac = this;
|
|
751
|
-
|
|
752
646
|
if (ac.params.openIn !== 'dropdown' && ac.params.autoFocus) {
|
|
753
647
|
ac.autoFocus();
|
|
754
648
|
}
|
|
755
|
-
|
|
756
649
|
ac.emit('local::opened autocompleteOpened', ac);
|
|
757
650
|
}
|
|
758
|
-
|
|
759
651
|
onClose() {
|
|
760
652
|
const ac = this;
|
|
761
|
-
if (ac.destroyed) return;
|
|
653
|
+
if (ac.destroyed) return;
|
|
762
654
|
|
|
655
|
+
// Destroy SB
|
|
763
656
|
if (ac.searchbar && ac.searchbar.destroy) {
|
|
764
657
|
ac.searchbar.destroy();
|
|
765
658
|
ac.searchbar = null;
|
|
766
659
|
delete ac.searchbar;
|
|
767
660
|
}
|
|
768
|
-
|
|
769
661
|
if (ac.params.openIn === 'dropdown') {
|
|
770
662
|
ac.detachDropdownEvents();
|
|
771
663
|
ac.$dropdownEl.removeClass('autocomplete-dropdown-in').remove();
|
|
772
|
-
ac.$inputEl.parents('.item-content-dropdown-expanded').removeClass('item-content-dropdown-expanded');
|
|
773
664
|
} else {
|
|
774
665
|
ac.detachPageEvents();
|
|
775
666
|
}
|
|
776
|
-
|
|
777
667
|
ac.emit('local::close autocompleteClose', ac);
|
|
778
668
|
}
|
|
779
|
-
|
|
780
669
|
onClosed() {
|
|
781
670
|
const ac = this;
|
|
782
671
|
if (ac.destroyed) return;
|
|
@@ -787,7 +676,6 @@ class Autocomplete extends Framework7Class {
|
|
|
787
676
|
delete ac.el;
|
|
788
677
|
ac.emit('local::closed autocompleteClosed', ac);
|
|
789
678
|
}
|
|
790
|
-
|
|
791
679
|
openPage() {
|
|
792
680
|
const ac = this;
|
|
793
681
|
if (ac.opened) return ac;
|
|
@@ -801,19 +689,15 @@ class Autocomplete extends Framework7Class {
|
|
|
801
689
|
pageBeforeIn(e, page) {
|
|
802
690
|
ac.onOpen('page', page.el);
|
|
803
691
|
},
|
|
804
|
-
|
|
805
692
|
pageAfterIn(e, page) {
|
|
806
693
|
ac.onOpened('page', page.el);
|
|
807
694
|
},
|
|
808
|
-
|
|
809
695
|
pageBeforeOut(e, page) {
|
|
810
696
|
ac.onClose('page', page.el);
|
|
811
697
|
},
|
|
812
|
-
|
|
813
698
|
pageAfterOut(e, page) {
|
|
814
699
|
ac.onClosed('page', page.el);
|
|
815
700
|
}
|
|
816
|
-
|
|
817
701
|
},
|
|
818
702
|
options: {
|
|
819
703
|
animate: ac.params.animate
|
|
@@ -822,7 +706,6 @@ class Autocomplete extends Framework7Class {
|
|
|
822
706
|
});
|
|
823
707
|
return ac;
|
|
824
708
|
}
|
|
825
|
-
|
|
826
709
|
openPopup() {
|
|
827
710
|
const ac = this;
|
|
828
711
|
if (ac.opened) return ac;
|
|
@@ -836,22 +719,17 @@ class Autocomplete extends Framework7Class {
|
|
|
836
719
|
popupOpen(popup) {
|
|
837
720
|
ac.onOpen('popup', popup.el);
|
|
838
721
|
},
|
|
839
|
-
|
|
840
722
|
popupOpened(popup) {
|
|
841
723
|
ac.onOpened('popup', popup.el);
|
|
842
724
|
},
|
|
843
|
-
|
|
844
725
|
popupClose(popup) {
|
|
845
726
|
ac.onClose('popup', popup.el);
|
|
846
727
|
},
|
|
847
|
-
|
|
848
728
|
popupClosed(popup) {
|
|
849
729
|
ac.onClosed('popup', popup.el);
|
|
850
730
|
}
|
|
851
|
-
|
|
852
731
|
}
|
|
853
732
|
};
|
|
854
|
-
|
|
855
733
|
if (ac.params.routableModals && ac.view) {
|
|
856
734
|
ac.view.router.navigate({
|
|
857
735
|
url: ac.url,
|
|
@@ -863,25 +741,14 @@ class Autocomplete extends Framework7Class {
|
|
|
863
741
|
} else {
|
|
864
742
|
ac.modal = ac.app.popup.create(popupParams).open(ac.params.animate);
|
|
865
743
|
}
|
|
866
|
-
|
|
867
744
|
return ac;
|
|
868
745
|
}
|
|
869
|
-
|
|
870
746
|
openDropdown() {
|
|
871
747
|
const ac = this;
|
|
872
|
-
|
|
873
748
|
if (!ac.$dropdownEl) {
|
|
874
749
|
ac.$dropdownEl = $(ac.renderDropdown());
|
|
875
750
|
}
|
|
876
|
-
|
|
877
|
-
const $listEl = ac.$inputEl.parents('.list');
|
|
878
|
-
|
|
879
|
-
if ($listEl.length && ac.$inputEl.parents('.item-content').length > 0 && ac.params.expandInput) {
|
|
880
|
-
ac.$inputEl.parents('.item-content').addClass('item-content-dropdown-expanded');
|
|
881
|
-
}
|
|
882
|
-
|
|
883
751
|
const $pageContentEl = ac.$inputEl.parents('.page-content');
|
|
884
|
-
|
|
885
752
|
if (ac.params.dropdownContainerEl) {
|
|
886
753
|
$(ac.params.dropdownContainerEl).append(ac.$dropdownEl);
|
|
887
754
|
} else if ($pageContentEl.length === 0) {
|
|
@@ -890,11 +757,9 @@ class Autocomplete extends Framework7Class {
|
|
|
890
757
|
ac.positionDropdown();
|
|
891
758
|
$pageContentEl.append(ac.$dropdownEl);
|
|
892
759
|
}
|
|
893
|
-
|
|
894
760
|
ac.onOpen('dropdown', ac.$dropdownEl);
|
|
895
761
|
ac.onOpened('dropdown', ac.$dropdownEl);
|
|
896
762
|
}
|
|
897
|
-
|
|
898
763
|
open() {
|
|
899
764
|
const ac = this;
|
|
900
765
|
if (ac.opened) return ac;
|
|
@@ -905,11 +770,9 @@ class Autocomplete extends Framework7Class {
|
|
|
905
770
|
}).join('')}`]();
|
|
906
771
|
return ac;
|
|
907
772
|
}
|
|
908
|
-
|
|
909
773
|
close() {
|
|
910
774
|
const ac = this;
|
|
911
775
|
if (!ac.opened) return ac;
|
|
912
|
-
|
|
913
776
|
if (ac.params.openIn === 'dropdown') {
|
|
914
777
|
ac.onClose();
|
|
915
778
|
ac.onClosed();
|
|
@@ -927,32 +790,24 @@ class Autocomplete extends Framework7Class {
|
|
|
927
790
|
});
|
|
928
791
|
ac.modal.close();
|
|
929
792
|
}
|
|
930
|
-
|
|
931
793
|
return ac;
|
|
932
794
|
}
|
|
933
|
-
|
|
934
795
|
init() {
|
|
935
796
|
const ac = this;
|
|
936
797
|
ac.attachEvents();
|
|
937
798
|
}
|
|
938
|
-
|
|
939
799
|
destroy() {
|
|
940
800
|
const ac = this;
|
|
941
801
|
ac.emit('local::beforeDestroy autocompleteBeforeDestroy', ac);
|
|
942
802
|
ac.detachEvents();
|
|
943
|
-
|
|
944
803
|
if (ac.$inputEl && ac.$inputEl[0]) {
|
|
945
804
|
delete ac.$inputEl[0].f7Autocomplete;
|
|
946
805
|
}
|
|
947
|
-
|
|
948
806
|
if (ac.$openerEl && ac.$openerEl[0]) {
|
|
949
807
|
delete ac.$openerEl[0].f7Autocomplete;
|
|
950
808
|
}
|
|
951
|
-
|
|
952
809
|
deleteProps(ac);
|
|
953
810
|
ac.destroyed = true;
|
|
954
811
|
}
|
|
955
|
-
|
|
956
812
|
}
|
|
957
|
-
|
|
958
813
|
export default Autocomplete;
|