@topvisor/ui 1.1.0 → 1.2.0
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/.gitlab-ci/.gitlab-ci.yml +26 -0
- package/.gitlab-ci/common/install.yml +21 -0
- package/.gitlab-ci/common/lint.yml +14 -0
- package/.gitlab-ci/common/version.yml +23 -0
- package/.gitlab-ci/storybook/build.yml +20 -0
- package/.gitlab-ci/storybook/deploy.yml +49 -0
- package/.gitlab-ci/ui/build.yml +13 -0
- package/.gitlab-ci/ui/deploy.yml +23 -0
- package/.idea/.gitignore +11 -0
- package/.idea/codeStyles/Project.xml +205 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/externalDependencies.xml +6 -0
- package/.idea/inspectionProfiles/Disabled.xml +824 -0
- package/.idea/inspectionProfiles/Project_Default.xml +33 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.storybook/TopTheme.ts +115 -0
- package/.storybook/TopThemeManager.ts +53 -0
- package/.storybook/main.ts +51 -0
- package/.storybook/manager.ts +25 -0
- package/.storybook/preview-head.html +21 -0
- package/.storybook/preview.ts +47 -0
- package/.storybook/vue/coreDecorator.ts +77 -0
- package/.storybook/vue/vModelDecorator.ts +46 -0
- package/.versionrc.json +16 -0
- package/.vscode/extensions.json +11 -0
- package/.vscode/keybindings.example.json +121 -0
- package/.vscode/settings.json +45 -0
- package/CHANGELOG.md +223 -14
- package/NPM.md +25 -0
- package/PUBLISH.md +63 -0
- package/README.md +20 -69
- package/STORYBOOK.md +48 -0
- package/USE_IN_PROJECT.md +32 -0
- package/build/afterBuild.sh +11 -0
- package/build/cssModules.ts +39 -0
- package/build/genDocs.sh +19 -0
- package/build/plugin/amdFix.ts +83 -0
- package/build/plugin/autoloadCSS.ts +155 -0
- package/build/rollup.config.ts +37 -0
- package/package.json +56 -1
- package/public/README.md +82 -0
- package/src/components/charts/charts.ts +8 -0
- package/src/components/charts/miniChart/miniChart.stories.ts +67 -0
- package/src/components/charts/miniChart/miniChart.ts +110 -0
- package/src/components/charts/miniChart/miniChart.vue +158 -0
- package/src/components/charts/miniChart/stories/README.md +9 -0
- package/src/components/charts/miniChart/stories/dummy.ts +25 -0
- package/src/components/charts/miniChart/styles/miniChart.css +87 -0
- package/src/components/charts/miniChart/utils/consts.ts +9 -0
- package/src/components/charts/miniCharts/miniCharts.stories.ts +76 -0
- package/src/components/charts/miniCharts/miniCharts.ts +24 -0
- package/src/components/charts/miniCharts/miniCharts.vue +128 -0
- package/src/components/charts/miniCharts/stories/README.md +18 -0
- package/src/components/charts/miniCharts/stories/dummy.ts +70 -0
- package/src/components/charts/miniCharts/stories/overview.vue +139 -0
- package/src/components/charts/miniCharts/styles/miniCharts.css +32 -0
- package/src/components/component.ts +130 -0
- package/src/components/core/core.mdx +7 -0
- package/src/components/core/notice/item/item.vue +145 -0
- package/src/components/core/notice/item/style.css +70 -0
- package/src/components/core/notice/item/types.ts +71 -0
- package/src/components/core/notice/notice.stories.ts +105 -0
- package/src/components/core/notice/notice.vue +69 -0
- package/src/components/core/notice/stories/README.md +34 -0
- package/src/components/core/notice/types.ts +1 -0
- package/src/components/core/notice/utils.ts +115 -0
- package/src/components/dialog/dialog/Dialog (code).mdx +61 -0
- package/src/components/dialog/dialog/composables/asyncDialogHandle.ts +99 -0
- package/src/components/dialog/dialog/composables/dialogHandle.ts +176 -0
- package/src/components/dialog/dialog/composables/types.ts +12 -0
- package/src/components/dialog/dialog/composables/utils.ts +39 -0
- package/src/components/dialog/dialog/dialog.stories.ts +83 -0
- package/src/components/dialog/dialog/dialog.vue +74 -0
- package/src/components/dialog/dialog/dialogs/dialogs.vue +58 -0
- package/src/components/dialog/dialog/page/page.vue +86 -0
- package/src/components/dialog/dialog/page/types.ts +84 -0
- package/src/components/dialog/dialog/page.stories.ts +27 -0
- package/src/components/dialog/dialog/pageComponent/pageComponent.vue +57 -0
- package/src/components/dialog/dialog/pageComponent/types.ts +21 -0
- package/src/components/dialog/dialog/pageComponent.stories.ts +27 -0
- package/src/components/dialog/dialog/stories/README.md +117 -0
- package/src/components/dialog/dialog/stories/autoload.ts +12 -0
- package/src/components/dialog/dialog/stories/dialog_example/dialog_example.vue +73 -0
- package/src/components/dialog/dialog/stories/dialog_example/pages/async.vue +57 -0
- package/src/components/dialog/dialog/stories/dialog_example/pages/default.vue +64 -0
- package/src/components/dialog/dialog/stories/dialog_example/pages/headerButtons.vue +56 -0
- package/src/components/dialog/dialog/stories/dialog_example/pages/utils.ts +26 -0
- package/src/components/dialog/dialog/stories/dialog_example/pages/withoutCache.vue +64 -0
- package/src/components/dialog/dialog/stories/page/README.md +24 -0
- package/src/components/dialog/dialog/stories/pageComponent/README.md +12 -0
- package/src/components/dialog/dialog/style/dialog.css +316 -0
- package/src/components/dialog/dialog/style/dialog.m.css +40 -0
- package/src/components/dialog/dialog/style/dialog.pc.css +73 -0
- package/src/components/dialog/dialog/style/modern/dialog.css +12 -0
- package/src/components/dialog/dialog/style/modern/dialog.pc.css +3 -0
- package/src/components/dialog/dialog/types.ts +69 -0
- package/src/components/dialog/dialog.ts +7 -0
- package/src/components/dialog/lib/types.ts +26 -0
- package/src/components/dialog/lib/utils.globalEvents.ts +175 -0
- package/src/components/dialog/lib/utils.ts +525 -0
- package/src/components/dialog/lib/worker.ts +273 -0
- package/src/components/forms/README.mdx +10 -0
- package/src/components/forms/avatar/avatar.stories.ts +38 -0
- package/src/components/forms/avatar/avatar.ts +40 -0
- package/src/components/forms/avatar/avatar.vue +77 -0
- package/src/components/forms/avatar/stories/overview.vue +28 -0
- package/src/components/forms/button/button.stories.ts +118 -0
- package/src/components/forms/button/button.vue +111 -0
- package/src/components/forms/button/stories/README.md +9 -0
- package/src/components/forms/button/stories/overview.vue +33 -0
- package/src/components/forms/button/style/button.css +139 -0
- package/src/components/forms/button/style/style-outline.css +129 -0
- package/src/components/forms/button/style/style-soft.css +89 -0
- package/src/components/forms/button/style/style-transparent.css +39 -0
- package/src/components/forms/button/types.ts +66 -0
- package/src/components/forms/checkbox/checkbox.stories.ts +33 -0
- package/src/components/forms/checkbox/checkbox.ts +21 -0
- package/src/components/forms/checkbox/checkbox.vue +114 -0
- package/src/components/forms/checkbox/stories/overview.vue +171 -0
- package/src/components/forms/controlLabel/controlLabel.stories.ts +32 -0
- package/src/components/forms/controlLabel/controlLabel.ts +4 -0
- package/src/components/forms/controlLabel/controlLabel.vue +54 -0
- package/src/components/forms/forms.ts +40 -0
- package/src/components/forms/helpers.ts +11 -0
- package/src/components/forms/hint/hint.stories.ts +41 -0
- package/src/components/forms/hint/hint.ts +8 -0
- package/src/components/forms/hint/hint.vue +32 -0
- package/src/components/forms/input/input.stories.ts +32 -0
- package/src/components/forms/input/input.ts +47 -0
- package/src/components/forms/input/input.vue +189 -0
- package/src/components/forms/input/stories/overview.vue +61 -0
- package/src/components/forms/inputDate/datepicker.css +246 -0
- package/src/components/forms/inputDate/datepicker.ts +101 -0
- package/src/components/forms/inputDate/inputDate.stories.ts +41 -0
- package/src/components/forms/inputDate/inputDate.ts +5 -0
- package/src/components/forms/inputDate/inputDate.vue +133 -0
- package/src/components/forms/inputDate/stories/overview.vue +35 -0
- package/src/components/forms/inputRange/inputRange.stories.ts +53 -0
- package/src/components/forms/inputRange/inputRange.ts +3 -0
- package/src/components/forms/inputRange/inputRange.vue +39 -0
- package/src/components/forms/inputRange/stories/overview.vue +129 -0
- package/src/components/forms/loadbar/loadbar.stories.ts +17 -0
- package/src/components/forms/loadbar/loadbar.vue +37 -0
- package/src/components/forms/radio/radio.stories.ts +34 -0
- package/src/components/forms/radio/radio.ts +15 -0
- package/src/components/forms/radio/radio.vue +97 -0
- package/src/components/forms/radio/stories/overview.vue +79 -0
- package/src/components/forms/select/select.stories.ts +69 -0
- package/src/components/forms/select/select.ts +69 -0
- package/src/components/forms/select/select.vue +300 -0
- package/src/components/forms/select/stories/exampleOptions.ts +61 -0
- package/src/components/forms/select/stories/overview.vue +72 -0
- package/src/components/forms/switcher/stories/overview.vue +139 -0
- package/src/components/forms/switcher/switcher.stories.ts +33 -0
- package/src/components/forms/switcher/switcher.ts +22 -0
- package/src/components/forms/switcher/switcher.vue +118 -0
- package/src/components/forms/textarea/stories/overview.vue +62 -0
- package/src/components/forms/textarea/textarea.stories.ts +34 -0
- package/src/components/forms/textarea/textarea.ts +47 -0
- package/src/components/forms/textarea/textarea.vue +123 -0
- package/src/components/formsExt/README.mdx +5 -0
- package/src/components/formsExt/editArea/editArea.stories.ts +41 -0
- package/src/components/formsExt/editArea/editArea.ts +41 -0
- package/src/components/formsExt/editArea/editArea.vue +198 -0
- package/src/components/formsExt/editArea/stories/README.md +21 -0
- package/src/components/formsExt/editArea/stories/overview.vue +67 -0
- package/src/components/formsExt/editInput/editInput.stories.ts +36 -0
- package/src/components/formsExt/editInput/editInput.ts +20 -0
- package/src/components/formsExt/editInput/editInput.vue +54 -0
- package/src/components/formsExt/editInput/stories/overview.vue +54 -0
- package/src/components/formsExt/formsExt.ts +15 -0
- package/src/components/formsExt/info/info.stories.ts +35 -0
- package/src/components/formsExt/info/info.vue +84 -0
- package/src/components/formsExt/info/stories/overview.vue +29 -0
- package/src/components/formsExt/info/types.ts +25 -0
- package/src/components/formsExt/menu/menu.stories.ts +59 -0
- package/src/components/formsExt/menu/menu.ts +45 -0
- package/src/components/formsExt/menu/menu.vue +321 -0
- package/src/components/formsExt/menu/stories/items.ts +18 -0
- package/src/components/formsExt/menu/stories/overview.vue +52 -0
- package/src/components/formsExt/navigationMenu/item.vue +186 -0
- package/src/components/formsExt/navigationMenu/navigationMenu.stories.ts +37 -0
- package/src/components/formsExt/navigationMenu/navigationMenu.ts +28 -0
- package/src/components/formsExt/navigationMenu/navigationMenu.vue +40 -0
- package/src/components/formsExt/navigationMenu/stories/items.ts +116 -0
- package/src/components/formsExt/radioGroup/radioGroup.stories.ts +51 -0
- package/src/components/formsExt/radioGroup/radioGroup.ts +28 -0
- package/src/components/formsExt/radioGroup/radioGroup.vue +146 -0
- package/src/components/formsExt/radioGroup/stories/overview.vue +78 -0
- package/src/components/formsExt/radioGroup/styles/top-scrollBar.css +52 -0
- package/src/components/formsExt/selector2/api.ts +148 -0
- package/src/components/formsExt/selector2/itemMulti.vue +57 -0
- package/src/components/formsExt/selector2/selector2.stories.ts +48 -0
- package/src/components/formsExt/selector2/selector2.ts +145 -0
- package/src/components/formsExt/selector2/selector2.vue +389 -0
- package/src/components/formsExt/selector2/stories/dummyAPIRequest.ts +58 -0
- package/src/components/formsExt/selector2/stories/overview.vue +93 -0
- package/src/components/helper.js +10 -0
- package/src/components/helpersStories.ts +205 -0
- package/src/components/layout/islandRows/islandRows.stories.ts +139 -0
- package/src/components/layout/islandRows/islandRows.vue +53 -0
- package/src/components/layout/islandRows/islandRowsRow/islandRowsRow.vue +36 -0
- package/src/components/layout/islandRows/islandRowsRow/types.ts +1 -0
- package/src/components/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue +16 -0
- package/src/components/layout/islandRows/stories/README.md +8 -0
- package/src/components/layout/islandRows/types.ts +11 -0
- package/src/components/layout/layout.ts +11 -0
- package/src/components/layout/rows/rows.stories.ts +48 -0
- package/src/components/layout/rows/rows.vue +46 -0
- package/src/components/layout/rows/stories/README.md +10 -0
- package/src/components/layout/rows/types.ts +6 -0
- package/src/components/popup/alert/alert.stories.ts +71 -0
- package/src/components/popup/alert/alert.ts +11 -0
- package/src/components/popup/alert/alert.vue +46 -0
- package/src/components/popup/alert/stories/overview.vue +40 -0
- package/src/components/popup/confirm/confirm.stories.ts +75 -0
- package/src/components/popup/confirm/confirm.ts +26 -0
- package/src/components/popup/confirm/confirm.vue +75 -0
- package/src/components/popup/confirm/stories/overview.vue +62 -0
- package/src/components/popup/lib/popup.globalEvents.ts +239 -0
- package/src/components/popup/lib/popup.ts +790 -0
- package/src/components/popup/lib/worker.globalEvents.ts +97 -0
- package/src/components/popup/lib/worker.ts +286 -0
- package/src/components/popup/popup/listItem.vue +35 -0
- package/src/components/popup/popup/opener.vue +81 -0
- package/src/components/popup/popup/popup.stories.ts +74 -0
- package/src/components/popup/popup/popup.ts +120 -0
- package/src/components/popup/popup/popup.vue +168 -0
- package/src/components/popup/popup/stories/README.md +55 -0
- package/src/components/popup/popup/stories/listItems.vue +44 -0
- package/src/components/popup/popup/stories/listSubItems.vue +47 -0
- package/src/components/popup/popup/stories/overview.vue +210 -0
- package/src/components/popup/popup/style/popup.css +345 -0
- package/src/components/popup/popup/style/popup.m.css +72 -0
- package/src/components/popup/popup/style/popup.pc.css +26 -0
- package/src/components/popup/popup/widgetInput.vue +43 -0
- package/src/components/popup/popup.ts +17 -0
- package/src/components/popup/prompt/prompt.stories.ts +78 -0
- package/src/components/popup/prompt/prompt.ts +26 -0
- package/src/components/popup/prompt/prompt.vue +84 -0
- package/src/components/popup/prompt/stories/overview.vue +50 -0
- package/src/components/popup/worker.ts +1 -0
- package/src/components/project/project.ts +23 -0
- package/src/components/project/selectorCompetitors/composables.ts +21 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.stories.ts +33 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.ts +27 -0
- package/src/components/project/selectorCompetitors/selectorCompetitors.vue +75 -0
- package/src/components/project/selectorCompetitors/stories/README.md +20 -0
- package/src/components/project/selectorCompetitors/stories/items.ts +30 -0
- package/src/components/project/selectorCompetitors/types/competitor.ts +7 -0
- package/src/components/project/selectorRegion/composables/compare.ts +87 -0
- package/src/components/project/selectorRegion/composables/selectRegion.ts +147 -0
- package/src/components/project/selectorRegion/composables/selectSearcher.ts +64 -0
- package/src/components/project/selectorRegion/composables/selectorRegion.ts +167 -0
- package/src/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue +190 -0
- package/src/components/project/selectorRegion/dialog_selectorRegions/style.css +49 -0
- package/src/components/project/selectorRegion/dialog_selectorRegions/types.ts +31 -0
- package/src/components/project/selectorRegion/selectorRegion.stories.ts +85 -0
- package/src/components/project/selectorRegion/selectorRegion.ts +204 -0
- package/src/components/project/selectorRegion/selectorRegion.vue +335 -0
- package/src/components/project/selectorRegion/stories/README.md +36 -0
- package/src/components/project/selectorRegion/stories/searchers.ts +77 -0
- package/src/components/project/selectorRegion/styles/searcherColors.css +41 -0
- package/src/components/project/selectorRegion/utils/consts.ts +73 -0
- package/src/components/project/selectorRegion/utils/utils.ts +167 -0
- package/src/components/project/tagSelector/popupListItem/tagPopupListItem.vue +209 -0
- package/src/components/project/tagSelector/popupListItem/types.ts +40 -0
- package/src/components/project/tagSelector/popupOpener/popupOpener.vue +145 -0
- package/src/components/project/tagSelector/popupOpener/types.ts +71 -0
- package/src/components/project/tagSelector/stories/README.md +62 -0
- package/src/components/project/tagSelector/stories/overview.vue +152 -0
- package/src/components/project/tagSelector/tagIcon/tagIcon.vue +97 -0
- package/src/components/project/tagSelector/tagIcon/types.ts +25 -0
- package/src/components/project/tagSelector/tagSelector.stories.ts +51 -0
- package/src/components/project/tagSelector/tagSelector.vue +359 -0
- package/src/components/project/tagSelector/tagsDefaults.ts +54 -0
- package/src/components/project/tagSelector/types.ts +159 -0
- package/src/components/project/tagSelector/utils/el.ts +151 -0
- package/src/components/project/tagSelector/utils/utils.ts +30 -0
- package/src/components/tabs/tabs/content.vue +24 -0
- package/src/components/tabs/tabs/stories/README.md +12 -0
- package/src/components/tabs/tabs/tab.vue +49 -0
- package/src/components/tabs/tabs/tabs.stories.ts +171 -0
- package/src/components/tabs/tabs/tabs.ts +22 -0
- package/src/components/tabs/tabs/tabs.vue +64 -0
- package/src/components/tabs/tabs.ts +9 -0
- package/src/components/tabsView/tabsView/menu.vue +291 -0
- package/src/components/tabsView/tabsView/menuDelimeter.vue +26 -0
- package/src/components/tabsView/tabsView/menuItem.vue +125 -0
- package/src/components/tabsView/tabsView/menuTitle.vue +46 -0
- package/src/components/tabsView/tabsView/store.ts +60 -0
- package/src/components/tabsView/tabsView/stories/README.md +22 -0
- package/src/components/tabsView/tabsView/tabsView.stories.ts +170 -0
- package/src/components/tabsView/tabsView/tabsView.ts +118 -0
- package/src/components/tabsView/tabsView/tabsView.vue +120 -0
- package/src/components/tabsView/tabsView/utils.ts +27 -0
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.ts +47 -0
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.ts +43 -0
- package/src/components/tabsView/tabsView.ts +9 -0
- package/src/components/types.ts +3 -0
- package/src/core/app.ts +22 -0
- package/src/core/core/core.mdx +36 -0
- package/src/core/core/core.ts +287 -0
- package/src/core/core/events/resize.ts +47 -0
- package/src/core/core/events.ts +6 -0
- package/src/core/core/jQuery.mdx +41 -0
- package/src/core/core/options.ts +51 -0
- package/src/core/core/preloaders.ts +31 -0
- package/src/core/core/state.ts +61 -0
- package/src/core/directives/data.mdx +24 -0
- package/src/core/directives/data.ts +25 -0
- package/src/core/directives/focus.mdx +28 -0
- package/src/core/directives/focus.ts +73 -0
- package/src/core/directives/scrollIntoView.mdx +41 -0
- package/src/core/directives/scrollIntoView.ts +123 -0
- package/src/core/directives/scrollShadow.mdx +23 -0
- package/src/core/directives/scrollShadow.ts +27 -0
- package/src/core/directives/sticky.mdx +29 -0
- package/src/core/directives/sticky.ts +32 -0
- package/src/core/directives/swimUp.mdx +27 -0
- package/src/core/directives/swimUp.ts +95 -0
- package/src/core/directives/tooltip.mdx +13 -0
- package/src/core/directives/tooltip.ts +57 -0
- package/src/core/icons/gallery.vue +70 -0
- package/src/core/icons/icons.mdx +24 -0
- package/src/core/icons/icons.stories.ts +14 -0
- package/src/core/plugins/core.ts +131 -0
- package/src/core/plugins/i18n.ts +184 -0
- package/src/core/plugins/piniaTPA.ts +431 -0
- package/src/core/plugins/plugins.mdx +82 -0
- package/src/core/styles/CSS Variables.stories.ts +17 -0
- package/src/core/styles/styles.mdx +26 -0
- package/src/core/theme/Variables.stories.ts +16 -0
- package/src/core/theme/theme.mdx +117 -0
- package/src/core/utils/References/Docs.mdx +23 -0
- package/src/core/utils/References/check/Docs.mdx +15 -0
- package/src/core/utils/References/check/functions/getDomainRegexp.mdx +15 -0
- package/src/core/utils/References/check/functions/isDomain.mdx +21 -0
- package/src/core/utils/References/check/functions/isEmail.mdx +22 -0
- package/src/core/utils/References/check/functions/isIp.mdx +21 -0
- package/src/core/utils/References/check/functions/validUrl.mdx +22 -0
- package/src/core/utils/References/clipboard/Docs.mdx +11 -0
- package/src/core/utils/References/clipboard/functions/setClipboard.mdx +23 -0
- package/src/core/utils/References/date/Docs.mdx +17 -0
- package/src/core/utils/References/date/functions/dateFormat.mdx +28 -0
- package/src/core/utils/References/date/functions/dateToString.mdx +26 -0
- package/src/core/utils/References/date/functions/dateUnformat.mdx +22 -0
- package/src/core/utils/References/date/functions/genDate.mdx +26 -0
- package/src/core/utils/References/date/functions/genDateMoscow.mdx +22 -0
- package/src/core/utils/References/date/functions/getDayOfWeek.mdx +26 -0
- package/src/core/utils/References/date/functions/stringToDate.mdx +21 -0
- package/src/core/utils/References/device/Docs.mdx +21 -0
- package/src/core/utils/References/device/functions/get$scroll.mdx +15 -0
- package/src/core/utils/References/device/functions/getCommandKeyLabel.mdx +15 -0
- package/src/core/utils/References/device/functions/getElsScroll.mdx +15 -0
- package/src/core/utils/References/device/functions/getOS.mdx +17 -0
- package/src/core/utils/References/device/functions/getOSAsync.mdx +15 -0
- package/src/core/utils/References/device/functions/getScrollTop.mdx +15 -0
- package/src/core/utils/References/device/functions/isApp.mdx +15 -0
- package/src/core/utils/References/device/functions/isMacOS.mdx +15 -0
- package/src/core/utils/References/device/functions/isMobile.mdx +15 -0
- package/src/core/utils/References/device/functions/isRetina.mdx +15 -0
- package/src/core/utils/References/device/functions/isSafari.mdx +15 -0
- package/src/core/utils/References/dom/Docs.mdx +27 -0
- package/src/core/utils/References/dom/functions/css.mdx +24 -0
- package/src/core/utils/References/dom/functions/genEl.mdx +28 -0
- package/src/core/utils/References/dom/functions/isVisible.mdx +23 -0
- package/src/core/utils/References/dom/functions/offset.mdx +35 -0
- package/src/core/utils/References/dom/functions/querySelectorAllArray.mdx +22 -0
- package/src/core/utils/References/dom/functions/querySelectorAllVisible.mdx +22 -0
- package/src/core/utils/References/dom/functions/querySelectorVisible.mdx +22 -0
- package/src/core/utils/References/dom/functions/querySelectorVisibleLast.mdx +22 -0
- package/src/core/utils/References/dom/functions/storage.mdx +28 -0
- package/src/core/utils/References/dom/functions/storageClear.mdx +21 -0
- package/src/core/utils/References/dom/functions/wrap.mdx +22 -0
- package/src/core/utils/References/dom/variables/default.mdx +241 -0
- package/src/core/utils/References/image/Docs.mdx +12 -0
- package/src/core/utils/References/image/functions/downloadImageFromString.mdx +22 -0
- package/src/core/utils/References/image/functions/genFaviconImgHtml.mdx +22 -0
- package/src/core/utils/References/keyboard/Docs.mdx +11 -0
- package/src/core/utils/References/keyboard/functions/invertKeyboardLayout.mdx +21 -0
- package/src/core/utils/References/lodash/Docs.mdx +20 -0
- package/src/core/utils/References/lodash/functions/cloneDeep.mdx +29 -0
- package/src/core/utils/References/lodash/functions/debounce.mdx +76 -0
- package/src/core/utils/References/lodash/functions/memoize.mdx +26 -0
- package/src/core/utils/References/lodash/functions/merge.mdx +200 -0
- package/src/core/utils/References/lodash/functions/throttle.mdx +73 -0
- package/src/core/utils/References/number/Docs.mdx +11 -0
- package/src/core/utils/References/number/functions/percentOfNumber.mdx +26 -0
- package/src/core/utils/References/price/Docs.mdx +11 -0
- package/src/core/utils/References/price/functions/genPrice.mdx +28 -0
- package/src/core/utils/References/route/Docs.mdx +16 -0
- package/src/core/utils/References/route/functions/delHash.mdx +26 -0
- package/src/core/utils/References/route/functions/genHash.mdx +26 -0
- package/src/core/utils/References/route/functions/getHash.mdx +22 -0
- package/src/core/utils/References/route/functions/historySetState.mdx +31 -0
- package/src/core/utils/References/route/functions/setHash.mdx +26 -0
- package/src/core/utils/References/route/functions/setHashs.mdx +22 -0
- package/src/core/utils/References/scroll/Docs.mdx +14 -0
- package/src/core/utils/References/scroll/functions/amountScrolled.mdx +17 -0
- package/src/core/utils/References/scroll/functions/connectScrollShadow.mdx +28 -0
- package/src/core/utils/References/scroll/functions/genHasScroll.mdx +25 -0
- package/src/core/utils/References/scroll/functions/getScrollPercent.mdx +21 -0
- package/src/core/utils/References/searchers/Docs.mdx +19 -0
- package/src/core/utils/References/searchers/functions/genVolumeLabel.mdx +26 -0
- package/src/core/utils/References/searchers/functions/getDeviceGIcon.mdx +21 -0
- package/src/core/utils/References/searchers/functions/getLangLabel.mdx +22 -0
- package/src/core/utils/References/searchers/functions/getSearcherGIcon.mdx +21 -0
- package/src/core/utils/References/searchers/functions/prepareVolumeType.mdx +22 -0
- package/src/core/utils/References/searchers/variables/searchersNames.mdx +97 -0
- package/src/core/utils/References/store/Docs.mdx +18 -0
- package/src/core/utils/References/store/functions/defineStore.mdx +36 -0
- package/src/core/utils/References/store/functions/useStore.mdx +29 -0
- package/src/core/utils/References/store/variables/plugin.mdx +66 -0
- package/src/core/utils/References/string/Docs.mdx +26 -0
- package/src/core/utils/References/string/functions/addCommasWhite.mdx +21 -0
- package/src/core/utils/References/string/functions/addLinkTags.mdx +23 -0
- package/src/core/utils/References/string/functions/camelToSnakeCase.mdx +21 -0
- package/src/core/utils/References/string/functions/ellipsis.mdx +26 -0
- package/src/core/utils/References/string/functions/genFlagLinkByCountryCode.mdx +21 -0
- package/src/core/utils/References/string/functions/genIntHash.mdx +21 -0
- package/src/core/utils/References/string/functions/getRandomHash.mdx +21 -0
- package/src/core/utils/References/string/functions/highlightHtml.mdx +25 -0
- package/src/core/utils/References/string/functions/htmlspecialchars.mdx +21 -0
- package/src/core/utils/References/string/functions/isUrl.mdx +21 -0
- package/src/core/utils/References/string/functions/nl2br.mdx +21 -0
- package/src/core/utils/References/string/functions/numberEnding.mdx +28 -0
- package/src/core/utils/References/string/functions/numberWithWord.mdx +28 -0
- package/src/core/utils/References/string/functions/rusToLatin.mdx +21 -0
- package/src/core/utils/References/string/functions/toCapitalize.mdx +21 -0
- package/src/core/utils/References/string/functions/toRoditPadej.mdx +21 -0
- package/src/core/utils/References/system/Docs.mdx +13 -0
- package/src/core/utils/References/system/functions/sleep.mdx +21 -0
- package/src/core/utils/References/system/functions/sleepWhile.mdx +26 -0
- package/src/core/utils/References/system/functions/waitWhile.mdx +26 -0
- package/src/core/utils/References/url/Docs.mdx +17 -0
- package/src/core/utils/References/url/functions/decode.mdx +21 -0
- package/src/core/utils/References/url/functions/encode.mdx +21 -0
- package/src/core/utils/References/url/functions/fromPuny.mdx +23 -0
- package/src/core/utils/References/url/functions/getHost.mdx +21 -0
- package/src/core/utils/References/url/functions/hostToLowerCase.mdx +21 -0
- package/src/core/utils/References/url/functions/normalize.mdx +21 -0
- package/src/core/utils/References/url/functions/toPuny.mdx +23 -0
- package/src/core/utils/check.ts +88 -0
- package/src/core/utils/clipboard.ts +51 -0
- package/src/core/utils/date.ts +291 -0
- package/src/core/utils/device.ts +139 -0
- package/src/core/utils/dom.ts +182 -0
- package/src/core/utils/image.ts +46 -0
- package/src/core/utils/keyboard.ts +29 -0
- package/src/core/utils/lodash.ts +18 -0
- package/src/core/utils/number.ts +37 -0
- package/src/core/utils/price.ts +24 -0
- package/src/core/utils/route.ts +115 -0
- package/src/core/utils/scroll.ts +120 -0
- package/src/core/utils/searchers.ts +191 -0
- package/src/core/utils/store/localStorage.ts +56 -0
- package/src/core/utils/store/plugin.ts +50 -0
- package/src/core/utils/store/store.ts +77 -0
- package/src/core/utils/store.ts +7 -0
- package/src/core/utils/string.ts +317 -0
- package/src/core/utils/system.ts +72 -0
- package/src/core/utils/url.ts +138 -0
- package/src/core/utils/utils.mdx +6 -0
- package/src/d.ts +12 -0
- package/src/icomoon.d.ts +98 -0
- package/src/resources/styles/core/components.css +111 -0
- package/src/resources/styles/core/core.ts +11 -0
- package/src/resources/styles/core/forms/clear.css +20 -0
- package/src/resources/styles/core/forms/controls.css +20 -0
- package/src/resources/styles/core/forms/focusable.css +26 -0
- package/src/resources/styles/core/forms/forms.css +156 -0
- package/src/resources/styles/core/icon.css +58 -0
- package/src/resources/styles/core/jquery.css +1 -0
- package/src/resources/styles/core/layout.css +59 -0
- package/src/resources/styles/core/modifiers/as.css +9 -0
- package/src/resources/styles/core/modifiers/ellipsis.css +26 -0
- package/src/resources/styles/core/modifiers/modifiers.css +120 -0
- package/src/resources/styles/core/modifiers/only.css +19 -0
- package/src/resources/styles/core/modifiers/scrollShadow.css +50 -0
- package/src/resources/styles/core/select.css +15 -0
- package/src/resources/styles/storybook.css +11 -0
- package/src/resources/styles/themes/dark/dark-layout.css +47 -0
- package/src/resources/styles/themes/dark/dark-positions.css +66 -0
- package/src/resources/styles/themes/dark/dark.css +400 -0
- package/src/resources/styles/themes/dark-positions.ts +1 -0
- package/src/resources/styles/themes/dark-th/dark-th-layout.css +47 -0
- package/src/resources/styles/themes/dark-th/dark-th-positions.css +67 -0
- package/src/resources/styles/themes/dark-th/dark-th.css +400 -0
- package/src/resources/styles/themes/dark-th-positions.ts +1 -0
- package/src/resources/styles/themes/dark-th.ts +3 -0
- package/src/resources/styles/themes/dark.ts +3 -0
- package/src/resources/styles/themes/light/light-layout.css +47 -0
- package/src/resources/styles/themes/light/light-positions.css +66 -0
- package/src/resources/styles/themes/light/light.css +400 -0
- package/src/resources/styles/themes/light-positions.ts +1 -0
- package/src/resources/styles/themes/light.ts +3 -0
- package/src/storybook/components/color.vue +47 -0
- package/src/storybook/components/cssVariables.vue +195 -0
- package/src/storybook/components/icomoon.ts +40 -0
- package/src/storybook/jquery.ts +4 -0
- package/src//320/221/321/213/321/201/321/202/321/200/321/213/320/271 /321/201/321/202/320/260/321/200/321/202.mdx" +181 -0
- package/src//320/230/320/275/321/204/320/276/321/200/320/274/320/260/321/206/320/270/321/217 /320/276 /321/201/320/261/320/276/321/200/320/272/320/265.mdx" +12 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CHANGELOG.md.mdx" +4 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS/FAQ.mdx" +43 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/236/320/261/321/211/320/270/320/265 /320/274/320/276/320/264/320/270/321/204/320/270/320/272/320/260/321/202/320/276/321/200/321/213.mdx" +155 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/237/320/265/321/200/320/265/320/274/320/265/320/275/320/275/321/213/320/265.mdx" +35 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/237/321/200/320/265/320/264/320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/321/200/321/213.mdx" +15 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/240/320/265/320/272/320/276/320/274/320/265/320/275/320/264/320/260/321/206/320/270/320/270 /320/221/320/255/320/234.mdx" +56 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/241/321/202/320/270/320/273/320/270.mdx" +53 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/CSS//320/247/321/202/320/276 /321/202/320/260/320/272/320/276/320/265 css /320/274/320/276/320/264/321/203/320/273/321/214.mdx" +55 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/PUBLISH.md.mdx" +4 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/README.md.mdx" +4 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/STORYBOOK.md.mdx" +4 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)/USE_IN_PROJECT.md.mdx" +3 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/222/320/262/320/265/320/264/320/265/320/275/320/270/320/265 /320/262 NPM.md.mdx" +4 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/224/320/276/320/277/320/276/320/273/320/275/320/270/321/202/320/265/320/273/321/214/320/275/320/260/321/217 /320/273/320/270/321/202/320/265/321/200/320/260/321/202/321/203/321/200/320/260.mdx" +15 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/235/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/260 IDE.mdx" +45 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/236/321/204/320/276/321/200/320/274/320/273/320/265/320/275/320/270/320/265 /320/272/320/276/320/264/320/260.mdx" +31 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260.mdx" +29 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/321/200/321/203/320/272/321/202/321/203/321/200/320/260 UI//320/232/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213//320/232/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213.mdx" +41 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/321/200/321/203/320/272/321/202/321/203/321/200/320/260 UI//320/232/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213//320/241/321/202/320/270/320/273/320/270 /320/272/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213.mdx" +58 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/321/200/321/203/320/272/321/202/321/203/321/200/320/260 UI//320/241/321/202/321/200/321/203/320/272/321/202/321/203/321/200/320/260 UI.mdx" +11 -0
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/241/321/202/321/200/321/203/320/272/321/202/321/203/321/200/320/260 UI//320/243/321/202/320/270/320/273/320/270/321/202/321/213.mdx" +5 -0
- package/storybook-dev.sh +14 -0
- package/tsconfig.json +91 -0
- package/typedoc.json +20 -0
- package/vite.config.ts +148 -0
- package/.chunks/core-CcWs0qYw.amd.js +0 -2
- package/.chunks/core-CcWs0qYw.amd.js.map +0 -1
- package/.chunks/core-Dsl28h7N.es.js +0 -196
- package/.chunks/core-Dsl28h7N.es.js.map +0 -1
- package/.chunks/datepicker-B6kIyIcw.amd.js +0 -2
- package/.chunks/datepicker-B6kIyIcw.amd.js.map +0 -1
- package/.chunks/datepicker-BTiE5Grw.es.js +0 -44
- package/.chunks/datepicker-BTiE5Grw.es.js.map +0 -1
- package/.chunks/dialog_selectorRegions-BZcnnvJM.es.js +0 -140
- package/.chunks/dialog_selectorRegions-BZcnnvJM.es.js.map +0 -1
- package/.chunks/dialog_selectorRegions-CePGUsCo.amd.js +0 -2
- package/.chunks/dialog_selectorRegions-CePGUsCo.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B5hK613K.es.js +0 -266
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B5hK613K.es.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-izSFcRLb.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-izSFcRLb.amd.js.map +0 -1
- package/.chunks/forms-BsuCen2-.es.js +0 -1999
- package/.chunks/forms-BsuCen2-.es.js.map +0 -1
- package/.chunks/forms-BwGakScF.amd.js +0 -3
- package/.chunks/forms-BwGakScF.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CfM8kOV1.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CfM8kOV1.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CszHDnB0.es.js +0 -181
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CszHDnB0.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DQTVNJGq.amd.js +0 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DQTVNJGq.amd.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DmY5w4yr.es.js +0 -109
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DmY5w4yr.es.js.map +0 -1
- package/.chunks/notice-CJdCc72d.amd.js +0 -4
- package/.chunks/notice-CJdCc72d.amd.js.map +0 -1
- package/.chunks/notice-Cqs1dKt8.es.js +0 -175
- package/.chunks/notice-Cqs1dKt8.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-1JWduCTr.amd.js +0 -2
- package/.chunks/page.vue_vue_type_script_setup_true_lang-1JWduCTr.amd.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BCfksgg3.es.js +0 -143
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BCfksgg3.es.js.map +0 -1
- package/.chunks/popup-CLhWWJDe.amd.js +0 -2
- package/.chunks/popup-CLhWWJDe.amd.js.map +0 -1
- package/.chunks/popup-N10MDafw.es.js +0 -416
- package/.chunks/popup-N10MDafw.es.js.map +0 -1
- package/.chunks/punycode.es6-C2yitnNb.amd.js +0 -2
- package/.chunks/punycode.es6-C2yitnNb.amd.js.map +0 -1
- package/.chunks/punycode.es6-CNI-zL6U.es.js +0 -134
- package/.chunks/punycode.es6-CNI-zL6U.es.js.map +0 -1
- package/.chunks/store-CX_6ZXhO.es.js +0 -29
- package/.chunks/store-CX_6ZXhO.es.js.map +0 -1
- package/.chunks/store-esTid5oI.amd.js +0 -2
- package/.chunks/store-esTid5oI.amd.js.map +0 -1
- package/.chunks/utils-B1H3EGkg.es.js +0 -79
- package/.chunks/utils-B1H3EGkg.es.js.map +0 -1
- package/.chunks/utils-B7GVqGBH.amd.js +0 -2
- package/.chunks/utils-B7GVqGBH.amd.js.map +0 -1
- package/.chunks/utils-DIy2mbYd.amd.js +0 -2
- package/.chunks/utils-DIy2mbYd.amd.js.map +0 -1
- package/.chunks/utils-bjr7c5my.es.js +0 -225
- package/.chunks/utils-bjr7c5my.es.js.map +0 -1
- package/assets/charts.css +0 -1
- package/assets/core.css +0 -1
- package/assets/dialog_selectorRegions.css +0 -1
- package/assets/forms.css +0 -1
- package/assets/formsExt.css +0 -1
- package/assets/layout.css +0 -1
- package/assets/listItem.css +0 -1
- package/assets/menu.css +0 -1
- package/assets/notice.css +0 -1
- package/assets/popup.css +0 -1
- package/assets/project.css +0 -1
- package/assets/tabs.css +0 -1
- package/assets/tabsView.css +0 -1
- package/assets/themes/dark-th.css +0 -1
- package/assets/themes/dark.css +0 -1
- package/assets/themes/light.css +0 -1
- package/charts/charts.amd.js +0 -2
- package/charts/charts.amd.js.map +0 -1
- package/charts/charts.d.ts +0 -2
- package/charts/charts.js +0 -178
- package/charts/charts.js.map +0 -1
- package/components/charts/charts.d.ts +0 -5
- package/components/charts/miniChart/miniChart.d.ts +0 -92
- package/components/charts/miniChart/miniChart.vue.d.ts +0 -15
- package/components/charts/miniChart/stories/dummy.d.ts +0 -13
- package/components/charts/miniChart/utils/consts.d.ts +0 -8
- package/components/charts/miniCharts/miniCharts.d.ts +0 -20
- package/components/charts/miniCharts/miniCharts.vue.d.ts +0 -32
- package/components/charts/miniCharts/stories/dummy.d.ts +0 -6
- package/components/core/notice/item/item.vue.d.ts +0 -10
- package/components/core/notice/item/types.d.ts +0 -61
- package/components/core/notice/notice.vue.d.ts +0 -5
- package/components/core/notice/types.d.ts +0 -1
- package/components/core/notice/utils.d.ts +0 -27
- package/components/dialog/dialog/composables/asyncDialogHandle.d.ts +0 -51
- package/components/dialog/dialog/composables/dialogHandle.d.ts +0 -108
- package/components/dialog/dialog/composables/types.d.ts +0 -11
- package/components/dialog/dialog/composables/utils.d.ts +0 -21
- package/components/dialog/dialog/dialog.vue.d.ts +0 -28
- package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +0 -10
- package/components/dialog/dialog/page/page.vue.d.ts +0 -19
- package/components/dialog/dialog/page/types.d.ts +0 -72
- package/components/dialog/dialog/pageComponent/pageComponent.vue.d.ts +0 -6
- package/components/dialog/dialog/pageComponent/types.d.ts +0 -18
- package/components/dialog/dialog/stories/autoload.d.ts +0 -2
- package/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -7
- package/components/dialog/dialog/types.d.ts +0 -58
- package/components/dialog/dialog.d.ts +0 -6
- package/components/dialog/lib/types.d.ts +0 -21
- package/components/dialog/lib/utils.d.ts +0 -14
- package/components/dialog/lib/utils.globalEvents.d.ts +0 -8
- package/components/dialog/lib/worker.d.ts +0 -60
- package/components/forms/avatar/avatar.d.ts +0 -38
- package/components/forms/avatar/avatar.vue.d.ts +0 -10
- package/components/forms/button/button.vue.d.ts +0 -25
- package/components/forms/button/types.d.ts +0 -53
- package/components/forms/checkbox/checkbox.d.ts +0 -21
- package/components/forms/checkbox/checkbox.vue.d.ts +0 -27
- package/components/forms/controlLabel/controlLabel.d.ts +0 -4
- package/components/forms/controlLabel/controlLabel.vue.d.ts +0 -19
- package/components/forms/forms.d.ts +0 -27
- package/components/forms/helpers.d.ts +0 -10
- package/components/forms/hint/hint.d.ts +0 -8
- package/components/forms/hint/hint.vue.d.ts +0 -4
- package/components/forms/input/input.d.ts +0 -34
- package/components/forms/input/input.vue.d.ts +0 -28
- package/components/forms/inputDate/datepicker.d.ts +0 -5
- package/components/forms/inputDate/inputDate.d.ts +0 -3
- package/components/forms/inputDate/inputDate.vue.d.ts +0 -12
- package/components/forms/inputRange/inputRange.d.ts +0 -2
- package/components/forms/inputRange/inputRange.vue.d.ts +0 -19
- package/components/forms/loadbar/loadbar.vue.d.ts +0 -3
- package/components/forms/radio/radio.d.ts +0 -14
- package/components/forms/radio/radio.vue.d.ts +0 -23
- package/components/forms/select/select.d.ts +0 -58
- package/components/forms/select/select.vue.d.ts +0 -18
- package/components/forms/select/stories/exampleOptions.d.ts +0 -5
- package/components/forms/switcher/switcher.d.ts +0 -21
- package/components/forms/switcher/switcher.vue.d.ts +0 -23
- package/components/forms/textarea/textarea.d.ts +0 -40
- package/components/forms/textarea/textarea.vue.d.ts +0 -12
- package/components/formsExt/editArea/editArea.d.ts +0 -33
- package/components/formsExt/editArea/editArea.vue.d.ts +0 -18
- package/components/formsExt/editInput/editInput.d.ts +0 -16
- package/components/formsExt/editInput/editInput.vue.d.ts +0 -8
- package/components/formsExt/formsExt.d.ts +0 -13
- package/components/formsExt/info/info.vue.d.ts +0 -20
- package/components/formsExt/info/types.d.ts +0 -21
- package/components/formsExt/menu/menu.d.ts +0 -37
- package/components/formsExt/menu/menu.vue.d.ts +0 -16
- package/components/formsExt/menu/stories/items.d.ts +0 -3
- package/components/formsExt/navigationMenu/navigationMenu.d.ts +0 -24
- package/components/formsExt/navigationMenu/stories/items.d.ts +0 -3
- package/components/formsExt/radioGroup/radioGroup.d.ts +0 -21
- package/components/formsExt/radioGroup/radioGroup.vue.d.ts +0 -19
- package/components/formsExt/selector2/api.d.ts +0 -8
- package/components/formsExt/selector2/itemMulti.vue.d.ts +0 -8
- package/components/formsExt/selector2/selector2.d.ts +0 -130
- package/components/formsExt/selector2/selector2.vue.d.ts +0 -210
- package/components/formsExt/selector2/stories/dummyAPIRequest.d.ts +0 -10
- package/components/layout/islandRows/islandRows.vue.d.ts +0 -17
- package/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +0 -18
- package/components/layout/islandRows/islandRowsRow/types.d.ts +0 -2
- package/components/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +0 -18
- package/components/layout/islandRows/types.d.ts +0 -10
- package/components/layout/layout.d.ts +0 -9
- package/components/layout/rows/rows.vue.d.ts +0 -21
- package/components/layout/rows/types.d.ts +0 -6
- package/components/popup/alert/alert.d.ts +0 -8
- package/components/popup/alert/alert.vue.d.ts +0 -31
- package/components/popup/confirm/confirm.d.ts +0 -21
- package/components/popup/confirm/confirm.vue.d.ts +0 -33
- package/components/popup/lib/popup.d.ts +0 -83
- package/components/popup/lib/popup.globalEvents.d.ts +0 -26
- package/components/popup/lib/worker.d.ts +0 -75
- package/components/popup/lib/worker.globalEvents.d.ts +0 -19
- package/components/popup/popup/listItem.vue.d.ts +0 -22
- package/components/popup/popup/opener.vue.d.ts +0 -23
- package/components/popup/popup/popup.d.ts +0 -101
- package/components/popup/popup/popup.vue.d.ts +0 -40
- package/components/popup/popup/widgetInput.vue.d.ts +0 -17
- package/components/popup/popup.d.ts +0 -15
- package/components/popup/prompt/prompt.d.ts +0 -21
- package/components/popup/prompt/prompt.vue.d.ts +0 -33
- package/components/popup/worker.d.ts +0 -1
- package/components/project/project.d.ts +0 -15
- package/components/project/selectorCompetitors/composables.d.ts +0 -4
- package/components/project/selectorCompetitors/selectorCompetitors.d.ts +0 -23
- package/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +0 -14
- package/components/project/selectorCompetitors/stories/items.d.ts +0 -3
- package/components/project/selectorCompetitors/types/competitor.d.ts +0 -7
- package/components/project/selectorRegion/composables/compare.d.ts +0 -12
- package/components/project/selectorRegion/composables/selectRegion.d.ts +0 -14
- package/components/project/selectorRegion/composables/selectSearcher.d.ts +0 -13
- package/components/project/selectorRegion/composables/selectorRegion.d.ts +0 -25
- package/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +0 -4
- package/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +0 -26
- package/components/project/selectorRegion/selectorRegion.d.ts +0 -170
- package/components/project/selectorRegion/selectorRegion.vue.d.ts +0 -23
- package/components/project/selectorRegion/stories/searchers.d.ts +0 -3
- package/components/project/selectorRegion/utils/consts.d.ts +0 -18
- package/components/project/selectorRegion/utils/utils.d.ts +0 -32
- package/components/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +0 -20
- package/components/project/tagSelector/popupListItem/types.d.ts +0 -33
- package/components/project/tagSelector/popupOpener/popupOpener.vue.d.ts +0 -27
- package/components/project/tagSelector/popupOpener/types.d.ts +0 -62
- package/components/project/tagSelector/tagIcon/tagIcon.vue.d.ts +0 -4
- package/components/project/tagSelector/tagIcon/types.d.ts +0 -21
- package/components/project/tagSelector/tagSelector.vue.d.ts +0 -37
- package/components/project/tagSelector/tagsDefaults.d.ts +0 -3
- package/components/project/tagSelector/types.d.ts +0 -138
- package/components/project/tagSelector/utils/el.d.ts +0 -19
- package/components/project/tagSelector/utils/utils.d.ts +0 -14
- package/components/tabs/tabs/content.vue.d.ts +0 -19
- package/components/tabs/tabs/tab.vue.d.ts +0 -19
- package/components/tabs/tabs/tabs.d.ts +0 -19
- package/components/tabs/tabs/tabs.vue.d.ts +0 -21
- package/components/tabs/tabs.d.ts +0 -7
- package/components/tabsView/tabsView/menu.vue.d.ts +0 -32
- package/components/tabsView/tabsView/menuDelimeter.vue.d.ts +0 -3
- package/components/tabsView/tabsView/menuItem.vue.d.ts +0 -23
- package/components/tabsView/tabsView/menuTitle.vue.d.ts +0 -20
- package/components/tabsView/tabsView/store.d.ts +0 -192
- package/components/tabsView/tabsView/tabsView.d.ts +0 -98
- package/components/tabsView/tabsView/tabsView.vue.d.ts +0 -34
- package/components/tabsView/tabsView/utils.d.ts +0 -11
- package/components/tabsView/tabsView.d.ts +0 -7
- package/core/app.amd.js +0 -2
- package/core/app.amd.js.map +0 -1
- package/core/app.d.ts +0 -8
- package/core/app.js +0 -214
- package/core/app.js.map +0 -1
- package/core/core/core.d.ts +0 -113
- package/core/core/events/resize.d.ts +0 -16
- package/core/core/events.d.ts +0 -15
- package/core/core/options.d.ts +0 -46
- package/core/core/preloaders.d.ts +0 -19
- package/core/core/state.d.ts +0 -49
- package/core/directives/data.d.ts +0 -10
- package/core/directives/focus.d.ts +0 -10
- package/core/directives/scrollIntoView.d.ts +0 -3
- package/core/directives/scrollShadow.d.ts +0 -15
- package/core/directives/sticky.d.ts +0 -10
- package/core/directives/swimUp.d.ts +0 -15
- package/core/directives/tooltip.d.ts +0 -10
- package/core/plugins/core.d.ts +0 -60
- package/core/plugins/i18n.d.ts +0 -97
- package/core/plugins/piniaTPA.d.ts +0 -17
- package/core/utils/check.d.ts +0 -26
- package/core/utils/clipboard.d.ts +0 -12
- package/core/utils/date.d.ts +0 -52
- package/core/utils/device.d.ts +0 -50
- package/core/utils/dom.d.ts +0 -94
- package/core/utils/image.d.ts +0 -16
- package/core/utils/keyboard.d.ts +0 -8
- package/core/utils/lodash.d.ts +0 -6
- package/core/utils/number.d.ts +0 -17
- package/core/utils/price.d.ts +0 -10
- package/core/utils/route.d.ts +0 -33
- package/core/utils/scroll.d.ts +0 -32
- package/core/utils/searchers.d.ts +0 -38
- package/core/utils/store/localStorage.d.ts +0 -6
- package/core/utils/store/plugin.d.ts +0 -24
- package/core/utils/store/store.d.ts +0 -34
- package/core/utils/store.d.ts +0 -6
- package/core/utils/string.d.ts +0 -88
- package/core/utils/system.d.ts +0 -25
- package/core/utils/url.d.ts +0 -36
- package/dialog/dialog.amd.js +0 -2
- package/dialog/dialog.amd.js.map +0 -1
- package/dialog/dialog.d.ts +0 -2
- package/dialog/dialog.js +0 -60
- package/dialog/dialog.js.map +0 -1
- package/forms/forms.amd.js +0 -2
- package/forms/forms.amd.js.map +0 -1
- package/forms/forms.d.ts +0 -2
- package/forms/forms.js +0 -17
- package/forms/forms.js.map +0 -1
- package/forms/helpers.amd.js +0 -2
- package/forms/helpers.amd.js.map +0 -1
- package/forms/helpers.d.ts +0 -2
- package/forms/helpers.js +0 -10
- package/forms/helpers.js.map +0 -1
- package/formsExt/formsExt.amd.js +0 -2
- package/formsExt/formsExt.amd.js.map +0 -1
- package/formsExt/formsExt.d.ts +0 -2
- package/formsExt/formsExt.js +0 -493
- package/formsExt/formsExt.js.map +0 -1
- package/layout/layout.amd.js +0 -2
- package/layout/layout.amd.js.map +0 -1
- package/layout/layout.d.ts +0 -2
- package/layout/layout.js +0 -62
- package/layout/layout.js.map +0 -1
- package/popup/popup.amd.js +0 -2
- package/popup/popup.amd.js.map +0 -1
- package/popup/popup.d.ts +0 -2
- package/popup/popup.js +0 -244
- package/popup/popup.js.map +0 -1
- package/popup/worker.amd.js +0 -2
- package/popup/worker.amd.js.map +0 -1
- package/popup/worker.d.ts +0 -2
- package/popup/worker.js +0 -129
- package/popup/worker.js.map +0 -1
- package/project/project.amd.js +0 -2
- package/project/project.amd.js.map +0 -1
- package/project/project.d.ts +0 -2
- package/project/project.js +0 -976
- package/project/project.js.map +0 -1
- package/tabs/tabs.amd.js +0 -2
- package/tabs/tabs.amd.js.map +0 -1
- package/tabs/tabs.d.ts +0 -2
- package/tabs/tabs.js +0 -81
- package/tabs/tabs.js.map +0 -1
- package/tabsView/tabsView.amd.js +0 -2
- package/tabsView/tabsView.amd.js.map +0 -1
- package/tabsView/tabsView.d.ts +0 -2
- package/tabsView/tabsView.js +0 -306
- package/tabsView/tabsView.js.map +0 -1
- package/utils/check.amd.js +0 -2
- package/utils/check.amd.js.map +0 -1
- package/utils/check.d.ts +0 -2
- package/utils/check.js +0 -26
- package/utils/check.js.map +0 -1
- package/utils/clipboard.amd.js +0 -6
- package/utils/clipboard.amd.js.map +0 -1
- package/utils/clipboard.d.ts +0 -2
- package/utils/clipboard.js +0 -33
- package/utils/clipboard.js.map +0 -1
- package/utils/date.amd.js +0 -2
- package/utils/date.amd.js.map +0 -1
- package/utils/date.d.ts +0 -2
- package/utils/date.js +0 -11
- package/utils/date.js.map +0 -1
- package/utils/device.amd.js +0 -2
- package/utils/device.amd.js.map +0 -1
- package/utils/device.d.ts +0 -2
- package/utils/device.js +0 -15
- package/utils/device.js.map +0 -1
- package/utils/dom.amd.js +0 -2
- package/utils/dom.amd.js.map +0 -1
- package/utils/dom.d.ts +0 -6
- package/utils/dom.js +0 -75
- package/utils/dom.js.map +0 -1
- package/utils/image.amd.js +0 -12
- package/utils/image.amd.js.map +0 -1
- package/utils/image.d.ts +0 -2
- package/utils/image.js +0 -23
- package/utils/image.js.map +0 -1
- package/utils/keyboard.amd.js +0 -2
- package/utils/keyboard.amd.js.map +0 -1
- package/utils/keyboard.d.ts +0 -2
- package/utils/keyboard.js +0 -12
- package/utils/keyboard.js.map +0 -1
- package/utils/lodash.amd.js +0 -2
- package/utils/lodash.amd.js.map +0 -1
- package/utils/lodash.d.ts +0 -2
- package/utils/lodash.js +0 -9
- package/utils/lodash.js.map +0 -1
- package/utils/number.amd.js +0 -2
- package/utils/number.amd.js.map +0 -1
- package/utils/number.d.ts +0 -2
- package/utils/number.js +0 -13
- package/utils/number.js.map +0 -1
- package/utils/price.amd.js +0 -2
- package/utils/price.amd.js.map +0 -1
- package/utils/price.d.ts +0 -2
- package/utils/price.js +0 -10
- package/utils/price.js.map +0 -1
- package/utils/route.amd.js +0 -2
- package/utils/route.amd.js.map +0 -1
- package/utils/route.d.ts +0 -2
- package/utils/route.js +0 -31
- package/utils/route.js.map +0 -1
- package/utils/scroll.amd.js +0 -2
- package/utils/scroll.amd.js.map +0 -1
- package/utils/scroll.d.ts +0 -2
- package/utils/scroll.js +0 -45
- package/utils/scroll.js.map +0 -1
- package/utils/searchers.amd.js +0 -2
- package/utils/searchers.amd.js.map +0 -1
- package/utils/searchers.d.ts +0 -2
- package/utils/searchers.js +0 -134
- package/utils/searchers.js.map +0 -1
- package/utils/store.amd.js +0 -2
- package/utils/store.amd.js.map +0 -1
- package/utils/store.d.ts +0 -2
- package/utils/store.js +0 -7
- package/utils/store.js.map +0 -1
- package/utils/string.amd.js +0 -2
- package/utils/string.amd.js.map +0 -1
- package/utils/string.d.ts +0 -2
- package/utils/string.js +0 -139
- package/utils/string.js.map +0 -1
- package/utils/system.amd.js +0 -2
- package/utils/system.amd.js.map +0 -1
- package/utils/system.d.ts +0 -2
- package/utils/system.js +0 -29
- package/utils/system.js.map +0 -1
- package/utils/url.amd.js +0 -3
- package/utils/url.amd.js.map +0 -1
- package/utils/url.d.ts +0 -2
- package/utils/url.js +0 -48
- package/utils/url.js.map +0 -1
- /package/{icomoon → public/icomoon}/Read Me.txt +0 -0
- /package/{icomoon → public/icomoon}/Topvisor icons.json +0 -0
- /package/{icomoon → public/icomoon}/demo-files/demo.css +0 -0
- /package/{icomoon → public/icomoon}/demo-files/demo.js +0 -0
- /package/{icomoon → public/icomoon}/demo.html +0 -0
- /package/{icomoon → public/icomoon}/fonts/Topvisor-2.eot +0 -0
- /package/{icomoon → public/icomoon}/fonts/Topvisor-2.svg +0 -0
- /package/{icomoon → public/icomoon}/fonts/Topvisor-2.ttf +0 -0
- /package/{icomoon → public/icomoon}/fonts/Topvisor-2.woff +0 -0
- /package/{icomoon → public/icomoon}/selection.json +0 -0
- /package/{icomoon → public/icomoon}/style.css +0 -0
- /package/{jquery-ui.min.css → public/jquery-ui.min.css} +0 -0
- /package/{require → public/require}/css.amd.js +0 -0
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
import Core from '@/core/core/core';
|
|
2
|
+
import Component from '@/components/component';
|
|
3
|
+
import DOM from '@/core/utils/dom';
|
|
4
|
+
import Worker from '@/components/popup/lib/worker';
|
|
5
|
+
import GlobalEvents from '@/components/popup/lib/popup.globalEvents';
|
|
6
|
+
|
|
7
|
+
import css from '@/components/popup/popup/style/popup.css?inline';
|
|
8
|
+
import cssM from '@/components/popup/popup/style/popup.m.css?inline';
|
|
9
|
+
import cssPC from '@/components/popup/popup/style/popup.pc.css?inline';
|
|
10
|
+
import { useI18n } from '@/core/plugins/i18n';
|
|
11
|
+
|
|
12
|
+
Core.insertStyleToPage(css);
|
|
13
|
+
Core.insertStyleToPage(cssM, 'm');
|
|
14
|
+
Core.insertStyleToPage(cssPC, 'pc');
|
|
15
|
+
|
|
16
|
+
export interface PopupOptions {
|
|
17
|
+
popup?: string,
|
|
18
|
+
id?: string,
|
|
19
|
+
p?: number,
|
|
20
|
+
notch?: boolean,
|
|
21
|
+
class?: string,
|
|
22
|
+
posBy?: 'left' | 'right' | 'fixed' | Element,
|
|
23
|
+
frontSelector?: string,
|
|
24
|
+
invertX?: boolean,
|
|
25
|
+
openByHover?: boolean,
|
|
26
|
+
useOriginal?: boolean,
|
|
27
|
+
transitionDuration?: number,
|
|
28
|
+
isFullScreen?: boolean,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Основной объект js компонента TopPopup
|
|
33
|
+
*
|
|
34
|
+
* Добавляет jQuery события на this.el, если jQuery загружен:
|
|
35
|
+
*
|
|
36
|
+
* - aftershow.top-menu-popup
|
|
37
|
+
* - afterclose.top-menu-popup
|
|
38
|
+
*/
|
|
39
|
+
export class TopLibPopup extends Component {
|
|
40
|
+
|
|
41
|
+
static componentName = 'TopPopup';
|
|
42
|
+
|
|
43
|
+
declare el: HTMLElement; // элемент, вызвавший открытие Popup
|
|
44
|
+
elActiveByDefault: boolean | undefined; // элемент уже имеет класс top-active перед открытием окна
|
|
45
|
+
elPopup: HTMLElement | undefined; // Popup .top-popup-wrapper
|
|
46
|
+
elPopupInner: HTMLElement | undefined; // контентная часть Popup .top-popup
|
|
47
|
+
elPopupHeader: HTMLElement | undefined | null;
|
|
48
|
+
elPopupWidget: HTMLElement | undefined | null;
|
|
49
|
+
elPopupBody: HTMLElement | undefined | null;
|
|
50
|
+
elPopupFooter: HTMLElement | undefined | null;
|
|
51
|
+
elFront: HTMLElement | undefined | null;
|
|
52
|
+
|
|
53
|
+
popupParent: TopLibPopup | undefined;
|
|
54
|
+
|
|
55
|
+
$: JQuery<HTMLElement> | undefined; // только, если есть jQuery
|
|
56
|
+
|
|
57
|
+
elStartPosition: HTMLElement | undefined | null; // используется для useOriginal
|
|
58
|
+
shift = {
|
|
59
|
+
top: 0,
|
|
60
|
+
left: 0,
|
|
61
|
+
};
|
|
62
|
+
isClosed = false; // флаг того, что меню закрыто
|
|
63
|
+
isFirstClick = true;
|
|
64
|
+
type: string | undefined; // selector или html
|
|
65
|
+
|
|
66
|
+
options: PopupOptions = {
|
|
67
|
+
popup: '', // selector, text
|
|
68
|
+
p: 0, // положение меню (0 - над элементом, 1 - сверху, 2 - справа, 3 - снизу, 4 слева)
|
|
69
|
+
notch: false, // отображать ли клювик
|
|
70
|
+
|
|
71
|
+
class: '', // класс, добавляемый меню
|
|
72
|
+
|
|
73
|
+
posBy: 'left', // способ привязки позиционирования меню (left/right - левый/правый край родителя, fixed - по документу)
|
|
74
|
+
frontSelector: '',
|
|
75
|
+
invertX: false, // базовая ордината - правая граница элемента, а не левая
|
|
76
|
+
openByHover: false, // открывать при наведении
|
|
77
|
+
|
|
78
|
+
useOriginal: false, // использовать оригинальный шаблон, без клонирвоания (для сохранения состояния меню)
|
|
79
|
+
|
|
80
|
+
transitionDuration: 100, // значение прописано в css
|
|
81
|
+
|
|
82
|
+
isFullScreen: false,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
events = {};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Создать Popup
|
|
89
|
+
* @param el - элемент, открывающий меню
|
|
90
|
+
* @param options
|
|
91
|
+
*/
|
|
92
|
+
constructor(el: HTMLElement, options: PopupOptions) {
|
|
93
|
+
super();
|
|
94
|
+
|
|
95
|
+
this.init(TopLibPopup.componentName, el, options);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async mount(): Promise<void> {
|
|
99
|
+
if (!(this.el instanceof HTMLElement)) return;
|
|
100
|
+
const vueConnector = this.vueGetComponent();
|
|
101
|
+
|
|
102
|
+
if (this.el.closest('.top-popup-wrapper')) this.popupParent = Worker.getPopup(this.el.closest('.top-popup-wrapper')!);
|
|
103
|
+
|
|
104
|
+
await this.mountJQuery();
|
|
105
|
+
|
|
106
|
+
if (DOM.css(this.el, 'position') !== 'absolute') {
|
|
107
|
+
this.el.style.position = 'relative';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
this.el.dataset.topPopupOpened = 'opened';
|
|
111
|
+
this.elActiveByDefault = this.el.classList.contains('top-active');
|
|
112
|
+
this.el.classList.add('top-active');
|
|
113
|
+
|
|
114
|
+
if (vueConnector) {
|
|
115
|
+
// компонент vue Popup
|
|
116
|
+
this.type = 'vue';
|
|
117
|
+
|
|
118
|
+
this.options.popup = '';
|
|
119
|
+
this.elPopup = DOM.genEl('div', {}, this.options.popup);
|
|
120
|
+
} else if (this.options.popup?.match(/^[#.]/)) {
|
|
121
|
+
// selector
|
|
122
|
+
this.type = 'selector';
|
|
123
|
+
|
|
124
|
+
this.elPopup = document.querySelector<HTMLElement>(`${this.options.popup}.template`) || undefined;
|
|
125
|
+
} else {
|
|
126
|
+
// html
|
|
127
|
+
this.type = 'html';
|
|
128
|
+
|
|
129
|
+
if (this.options.useOriginal) {
|
|
130
|
+
throw ('Option useOriginal not allowed for text templates');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
this.elPopup = DOM.genEl('div', {}, this.options.popup ?? '');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (!this.elPopup || vueConnector?.opened) {
|
|
137
|
+
// возможно шаблон не найден, так как он используется в уже открытом меню
|
|
138
|
+
if (this.options.useOriginal || vueConnector?.opened) {
|
|
139
|
+
// закрыть открытое меню
|
|
140
|
+
if (vueConnector?.opened) {
|
|
141
|
+
this.elPopup = vueConnector.popup.elPopup;
|
|
142
|
+
} else {
|
|
143
|
+
this.elPopup = document.querySelector<HTMLElement>(`${this.options.popup}.top-popup-wrapper-shown`) || undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (this.elPopup) {
|
|
147
|
+
this.el.dataset.topPopupOpened = '';
|
|
148
|
+
|
|
149
|
+
if (!this.elActiveByDefault) {
|
|
150
|
+
this.el.classList.remove('top-active');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
Worker.close(this.elPopup);
|
|
154
|
+
|
|
155
|
+
// повторит попытку открыть меню
|
|
156
|
+
setTimeout(() => this.mount(), this.options.transitionDuration);
|
|
157
|
+
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
throw ('Option useOriginal state allowed only elements .template');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// возможно вместо шаблона используется другой элемент
|
|
165
|
+
this.elPopup = document.querySelector<HTMLElement>(`${this.options.popup}:not(.top-popup-wrapper)`) || undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (!this.elPopup) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (this.options.useOriginal) {
|
|
173
|
+
this.elStartPosition = this.elPopup.closest<HTMLElement>('.top-popup-el-start-position');
|
|
174
|
+
if (!this.elStartPosition) {
|
|
175
|
+
this.elStartPosition = DOM.wrap(this.elPopup, 'i');
|
|
176
|
+
this.elStartPosition.classList.add('top-popup-el-start-position', 'hidden');
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
this.elPopup = this.elPopup.cloneNode(true) as HTMLElement;
|
|
180
|
+
|
|
181
|
+
// вывод в меню копии произвольного элемента
|
|
182
|
+
if (this.type === 'selector' && !this.elPopup.matches('.template')) {
|
|
183
|
+
this.elPopup.classList.remove('hidden');
|
|
184
|
+
|
|
185
|
+
if (!this.elPopup.querySelector(':scope > .top-popup_content')) {
|
|
186
|
+
this.elPopup.classList.add('top-popup_content');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
this.elPopup = DOM.wrap(this.elPopup, 'div');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (this.type === 'html') {
|
|
193
|
+
if (!this.elPopup.querySelector(':scope > .top-popup_content')) {
|
|
194
|
+
this.elPopup.classList.add('top-popup_content');
|
|
195
|
+
|
|
196
|
+
this.elPopup = DOM.wrap(this.elPopup, 'div');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// вложенный Popup
|
|
201
|
+
if (this.type === 'selector' && !this.elPopup.matches('.template') || this.type === 'html' || this.type === 'vue') {
|
|
202
|
+
DOM.querySelectorAllArray(this.elPopup, '[data-top-popup]').forEach(el => {
|
|
203
|
+
if (el instanceof HTMLElement) el.dataset.topPopupPosBy = 'fixed';
|
|
204
|
+
});
|
|
205
|
+
DOM.querySelectorAllArray(this.elPopup, '.top-popup-wrapper').forEach(el => el.remove());
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
Worker.decoratorBeforeOpen(this);
|
|
210
|
+
|
|
211
|
+
if (vueConnector) {
|
|
212
|
+
this.options.class = vueConnector.classRef.value;
|
|
213
|
+
if (vueConnector.transitionDurationRef.value !== undefined) {
|
|
214
|
+
this.options.transitionDuration = vueConnector.transitionDurationRef.value;
|
|
215
|
+
|
|
216
|
+
if (this.elPopup instanceof HTMLElement) {
|
|
217
|
+
this.elPopup.style.setProperty(
|
|
218
|
+
'--top-popup-transition-delay',
|
|
219
|
+
this.options.transitionDuration + 'ms',
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
this.elPopupInner = document.createElement('div');
|
|
226
|
+
this.elPopupInner.classList.add('top-popupPanel', 'top-popup');
|
|
227
|
+
|
|
228
|
+
while (this.elPopup.firstChild) {
|
|
229
|
+
this.elPopupInner.appendChild(this.elPopup.firstChild);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
this.elPopup.append(this.elPopupInner);
|
|
233
|
+
|
|
234
|
+
this.elPopup.classList.add('top-popup-wrapper');
|
|
235
|
+
|
|
236
|
+
if (this.options.class) {
|
|
237
|
+
const classes = this.options.class.split(' ');
|
|
238
|
+
this.elPopup.classList.add(...classes);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (this.options.notch) {
|
|
242
|
+
this.elPopup.classList.add('with_notch');
|
|
243
|
+
this.elPopup.insertAdjacentHTML('beforeend', '<i class="notch notch-border"></i><i class="notch"></i>');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
await this.vueOpen();
|
|
247
|
+
|
|
248
|
+
this.elPopupHeader = this.elPopupInner.querySelector<HTMLElement>('.top-popup_header');
|
|
249
|
+
this.elPopupWidget = this.elPopupInner.querySelector<HTMLElement>('.top-popup_widget');
|
|
250
|
+
this.elPopupBody = this.elPopupInner.querySelector<HTMLElement>('.top-popup_content');
|
|
251
|
+
this.elPopupFooter = this.elPopupInner.querySelector<HTMLElement>('.top-popup_footer');
|
|
252
|
+
|
|
253
|
+
const existsWidgetSearch = !!this.elPopup.querySelector('[data-widget="search"]');
|
|
254
|
+
|
|
255
|
+
if (this.options.isFullScreen && !existsWidgetSearch) {
|
|
256
|
+
const i18n = useI18n();
|
|
257
|
+
|
|
258
|
+
if (!this.elPopupHeader && i18n.Common.Close) {
|
|
259
|
+
this.elPopupHeader = DOM.genEl('i', { class: 'top-popup_header' });
|
|
260
|
+
this.elPopupInner.prepend(this.elPopupHeader);
|
|
261
|
+
|
|
262
|
+
this.elPopupHeader.prepend(DOM.genEl('i', { class: 'a closer' }, i18n.Common.Close));
|
|
263
|
+
this.elPopupHeader.append(DOM.genEl('i', { class: 'top-popup_headerButton' }));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
DOM.storage(this.elPopup, TopLibPopup.componentName, this);
|
|
268
|
+
|
|
269
|
+
if (this.options.frontSelector) {
|
|
270
|
+
this.elFront = document.querySelector<HTMLElement>(this.options.frontSelector);
|
|
271
|
+
}
|
|
272
|
+
if (!this.elFront) {
|
|
273
|
+
this.elFront = this.el.closest<HTMLElement>('.top-popup-front');
|
|
274
|
+
}
|
|
275
|
+
if (!this.elFront) {
|
|
276
|
+
this.elFront = document.body;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (this.elPopup instanceof HTMLElement) {
|
|
280
|
+
this.elPopup.style.width = this.el.offsetWidth + 'px';
|
|
281
|
+
this.elPopup.style.height = this.el.offsetHeight + 'px';
|
|
282
|
+
this.elPopup.style.top = this.el.offsetTop + 'px';
|
|
283
|
+
this.elPopup.style.right = parseInt(this.el.style.right || '0') + 'px';
|
|
284
|
+
this.elPopup.style.bottom = parseInt(this.el.style.bottom || '0') + 'px';
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
this.el.parentElement?.insertBefore(this.elPopup, this.el);
|
|
288
|
+
this.elPopup.classList.remove('template');
|
|
289
|
+
|
|
290
|
+
if (this.options.invertX) {
|
|
291
|
+
this.elPopup.classList.add('invert-x');
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
let fromTop = !!this.el.closest('.modal-header');
|
|
295
|
+
if (!fromTop) {
|
|
296
|
+
fromTop = !!this.el.closest('#top_panel');
|
|
297
|
+
}
|
|
298
|
+
if (!fromTop) {
|
|
299
|
+
fromTop = !!this.el.closest('#secondmenu');
|
|
300
|
+
}
|
|
301
|
+
if (fromTop) {
|
|
302
|
+
this.elPopup.classList.add('p-from-top');
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// появление с анимацией
|
|
306
|
+
setTimeout(() => this.elPopup?.classList.add('top-popup-wrapper-shown'));
|
|
307
|
+
|
|
308
|
+
if (this.elFront && !this.elFront.matches('body')) {
|
|
309
|
+
this.elFront.append(this.elPopup);
|
|
310
|
+
|
|
311
|
+
this.shift.top = DOM.offset(this.el).top - this.el.offsetTop - DOM.offset(this.elFront).top;
|
|
312
|
+
this.shift.left = DOM.offset(this.el).left - this.el.offsetLeft - DOM.offset(this.elFront).left;
|
|
313
|
+
|
|
314
|
+
// position() не учитывает margin, замечено для flex
|
|
315
|
+
this.shift.top -= parseInt(this.el.style['margin-top'] || 0);
|
|
316
|
+
this.shift.left -= parseInt(this.el.style['margin-left'] || 0);
|
|
317
|
+
|
|
318
|
+
if (this.elPopup instanceof HTMLElement) {
|
|
319
|
+
this.elPopup.style.top = parseInt(this.elPopup.style.top || '0') + this.shift.top + 'px';
|
|
320
|
+
this.elPopup.style.left = parseInt(this.elPopup.style.left || '0') + this.shift.left + 'px';
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (this.$ && Core.$) {
|
|
325
|
+
this.$.trigger('aftershow.top-menu-popup', [Core.$(this.elPopup)]);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
this.recalcPosition();
|
|
329
|
+
|
|
330
|
+
this.elPopup.setAttribute('tabindex', '0');
|
|
331
|
+
this.focus();
|
|
332
|
+
|
|
333
|
+
Worker.decoratorAfterOpen(this);
|
|
334
|
+
|
|
335
|
+
this.mountEvents();
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
async mountJQuery() {
|
|
339
|
+
if (!Core.$) return;
|
|
340
|
+
|
|
341
|
+
this.$ = Core.$(this.el);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Выполнить фокусировку на нужный элемент после открытия окна
|
|
346
|
+
*/
|
|
347
|
+
focus(): void {
|
|
348
|
+
let el: Element | null;
|
|
349
|
+
|
|
350
|
+
if (this.elPopup) {
|
|
351
|
+
el = DOM.querySelectorVisible(this.elPopup, '.top-popup-autofocus');
|
|
352
|
+
|
|
353
|
+
// поле ввода
|
|
354
|
+
if (!el) {
|
|
355
|
+
el = DOM.querySelectorVisible(this.elPopup, ':read-write, select:not(:disabled)');
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// кнопка
|
|
359
|
+
if (!el) {
|
|
360
|
+
el = DOM.querySelectorVisible(this.elPopup, '.top-popup_footer .top-button');
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (!el) {
|
|
364
|
+
el = this.elPopup;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// выполнить фокусировку сразу, для применения необъодимых стилей
|
|
368
|
+
if (el instanceof HTMLElement) el.focus();
|
|
369
|
+
|
|
370
|
+
// выполнить фокусировку после завершения анимации открытия popup
|
|
371
|
+
setTimeout(() => {
|
|
372
|
+
if (el instanceof HTMLElement) el.focus();
|
|
373
|
+
}, this.options.transitionDuration);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
mountEvents(): void {
|
|
378
|
+
// закрытие при клике вне контекстного меню
|
|
379
|
+
this.addEventListenerWithUnmount(document, 'mousedown', (e) => this.onMousedown(e as MouseEvent));
|
|
380
|
+
|
|
381
|
+
if (this.elPopup && this.elPopupInner) {
|
|
382
|
+
// закрыть другие меню
|
|
383
|
+
this.addEventListenerWithUnmount(this.elPopup, 'focus', (e) => this.onFocus(e as FocusEvent));
|
|
384
|
+
|
|
385
|
+
// автоматическое закрытие при отведении мыши
|
|
386
|
+
if (this.options.openByHover) {
|
|
387
|
+
this.addEventListenerWithUnmount(this.elPopup, 'mouseleave', (e) => this.onMouseleave(e as MouseEvent));
|
|
388
|
+
this.addEventListenerWithUnmount(this.elPopupInner, 'mouseleave', (e) => this.onMouseleave(e as MouseEvent));
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// не скроллить страницу
|
|
393
|
+
if (this.options.isFullScreen && this.elPopupBody) {
|
|
394
|
+
this.addEventListenerWithUnmount(this.elPopupBody, 'touchmove', (e) => this.onTouchmove(e as TouchEvent));
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Обработка клика вне окна
|
|
400
|
+
*/
|
|
401
|
+
private onMousedown(e: MouseEvent): void {
|
|
402
|
+
// // не оригинальное событие
|
|
403
|
+
// if (!e || !e.originalEvent || !e.originalEvent.isTrusted) {
|
|
404
|
+
// return;
|
|
405
|
+
// }
|
|
406
|
+
|
|
407
|
+
// Popup уже закрыт
|
|
408
|
+
if (!this.elPopup || !(e.target instanceof Element)) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// клик на внешнем элементе
|
|
413
|
+
if (!this.isFirstClick) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
this.isFirstClick = false;
|
|
418
|
+
setTimeout(() => this.isFirstClick = true);
|
|
419
|
+
|
|
420
|
+
// клик не основной кнопкой мыши
|
|
421
|
+
if (e instanceof MouseEvent && e.button !== 0) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// открыто другое меню с posBy = fixed, сначала должно быть закрыто оно
|
|
426
|
+
let elPopupOpened = DOM.querySelectorVisibleLast(document.body, ':scope > .top-popup-wrapper');
|
|
427
|
+
if (elPopupOpened && elPopupOpened !== this.elPopup) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// открыто другое меню в top-popup-front, сначала должно быть закрыто оно
|
|
432
|
+
if (e.target.closest('.top-popup-front')) {
|
|
433
|
+
elPopupOpened = DOM.querySelectorVisibleLast(e.target.closest('.top-popup-front')!, ':scope > .top-popup-wrapper');
|
|
434
|
+
|
|
435
|
+
if (elPopupOpened && elPopupOpened !== this.elPopup) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// клик внутри этого меню
|
|
441
|
+
if (this.elPopup.contains(e.target)) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// клик вне родительского диалогового окна
|
|
446
|
+
if (this.elPopup.closest('.ui-dialog') && !e.target.closest('.ui-dialog')) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (Worker.decoratorIsIgnoreOuterClick(e)) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
Worker.close(this.elPopup);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Закрыть другие Popup при фокусе на элемент формы в текущем
|
|
459
|
+
*/
|
|
460
|
+
private onFocus(e: FocusEvent): void {
|
|
461
|
+
if (e.target instanceof Element && e.target.matches('input')) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// // не оригинальное событие
|
|
466
|
+
// if (!e || !e.originalEvent || !e.originalEvent.isTrusted) {
|
|
467
|
+
// return;
|
|
468
|
+
// }
|
|
469
|
+
|
|
470
|
+
// это окно уже закрывается
|
|
471
|
+
if (this.isClosed) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const elsPopups = Worker.getAllVisible();
|
|
476
|
+
elsPopups.forEach(elPopup => {
|
|
477
|
+
// фокус внутри этого окна
|
|
478
|
+
if (this.elPopup?.contains(elPopup)) {
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// это Popup из которого был открыт Popup с фокусом
|
|
483
|
+
// глубина вложенности: до 3 подменю
|
|
484
|
+
if (
|
|
485
|
+
this.popupParent?.elPopup === elPopup ||
|
|
486
|
+
this.popupParent?.popupParent?.elPopup === elPopup
|
|
487
|
+
) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
Worker.close(elPopup);
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Закрыть Popup при отведении мыши
|
|
497
|
+
*/
|
|
498
|
+
private onMouseleave(_e: MouseEvent): void {
|
|
499
|
+
setTimeout(() => {
|
|
500
|
+
if (this.elPopupInner && this.elPopupInner.matches(':hover') || !this.elPopup) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
Worker.close(this.elPopup);
|
|
505
|
+
}, 100);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Контроль положения Popup при fixed позиционировании
|
|
510
|
+
*/
|
|
511
|
+
private onResize(): void {
|
|
512
|
+
// на android при вызове метода append сбрасывается фокус с input внутри this.elPopup
|
|
513
|
+
if (this.elPopup && this.elPopup.parentElement !== document.body) {
|
|
514
|
+
document.body.append(this.elPopup);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (this.elPopup instanceof HTMLElement) {
|
|
518
|
+
this.elPopup.style.top = DOM.offset(this.el).top + 'px';
|
|
519
|
+
this.elPopup.style.left = DOM.offset(this.el).left + 'px';
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
unmount(): void {
|
|
524
|
+
super.unmount();
|
|
525
|
+
|
|
526
|
+
if (this.el instanceof HTMLElement) this.el.dataset.topPopupOpened = '';
|
|
527
|
+
if (!this.elActiveByDefault) {
|
|
528
|
+
this.el.classList.remove('top-active');
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
let style = this.el.getAttribute('style');
|
|
532
|
+
if (style) {
|
|
533
|
+
style = style.replace(/position:[^;]*;?/g, '');
|
|
534
|
+
this.el.setAttribute('style', style);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// контроль за положением Popup, чтобы оно не вылезало за пределы документа
|
|
539
|
+
recalcPosition(pForce?: typeof this.options.p): void {
|
|
540
|
+
if (!(this.elPopup instanceof HTMLElement)) return;
|
|
541
|
+
|
|
542
|
+
let p = pForce ?? this.options.p;
|
|
543
|
+
let leftPos: number;
|
|
544
|
+
|
|
545
|
+
if (this.el instanceof HTMLElement) {
|
|
546
|
+
this.elPopup.style.height = this.el.offsetHeight + 'px';
|
|
547
|
+
|
|
548
|
+
this.elPopup.classList.remove('p0', 'p1', 'p2', 'p3', 'p4');
|
|
549
|
+
this.elPopup.classList.add('p' + p);
|
|
550
|
+
|
|
551
|
+
switch (this.options.posBy) {
|
|
552
|
+
case 'left':
|
|
553
|
+
leftPos = this.el.offsetLeft + parseInt(this.el.style['margin-left'] || '0');
|
|
554
|
+
leftPos += this.shift.left;
|
|
555
|
+
this.elPopup.style.left = leftPos + 'px';
|
|
556
|
+
|
|
557
|
+
break;
|
|
558
|
+
case 'right':
|
|
559
|
+
if (!(this.el.offsetParent instanceof HTMLElement)) break;
|
|
560
|
+
|
|
561
|
+
leftPos = this.el.offsetLeft + parseInt(this.el.style['margin-left'] || '0');
|
|
562
|
+
this.elPopup.style.right = this.el.offsetParent.offsetWidth - this.el.offsetWidth - leftPos + 'px';
|
|
563
|
+
|
|
564
|
+
break;
|
|
565
|
+
case 'fixed':
|
|
566
|
+
this.addEventListenerWithUnmount(window, 'resize', () => this.onResize());
|
|
567
|
+
|
|
568
|
+
this.onResize();
|
|
569
|
+
|
|
570
|
+
break;
|
|
571
|
+
default:
|
|
572
|
+
this.options.posBy?.append(this.elPopup);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// контроль за пложением Popup, чтобы оно не вылезало за пределы документа
|
|
577
|
+
const boundingClientRect = this.elPopup.getBoundingClientRect();
|
|
578
|
+
this.elPopup.style.setProperty('--top-popup-height', this.elPopup.offsetHeight + 'px');
|
|
579
|
+
this.elPopup.style.setProperty('--top-popup-right-bounding', boundingClientRect.right + 'px');
|
|
580
|
+
this.elPopup.style.setProperty('--top-popup-bottom-bounding', boundingClientRect.bottom + 'px');
|
|
581
|
+
this.elPopup.style.setProperty('--top-popup-top', boundingClientRect.top + 'px');
|
|
582
|
+
this.elPopup.style.setProperty('--top-popup-left', boundingClientRect.left + 'px');
|
|
583
|
+
|
|
584
|
+
if (this.elPopupInner instanceof HTMLElement) {
|
|
585
|
+
this.elPopupInner.style.maxWidth = 'unset';
|
|
586
|
+
this.elPopupInner.style.maxHeight = 'unset';
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
let outTop = false;
|
|
590
|
+
let outRight = false;
|
|
591
|
+
let outBottom = false;
|
|
592
|
+
let outLeft = false;
|
|
593
|
+
|
|
594
|
+
// имеет ли смысл прикреплять окно к другой стороне кнопки
|
|
595
|
+
let usefulInvertX = boundingClientRect.left > window.innerWidth / 2;
|
|
596
|
+
let usefulInvertY = boundingClientRect.top > window.innerHeight / 2;
|
|
597
|
+
|
|
598
|
+
if (p === 4) {
|
|
599
|
+
usefulInvertX = !usefulInvertX;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
if (p === 1) {
|
|
603
|
+
usefulInvertY = !usefulInvertY;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
const contentBoundingClientRect = this.elPopupInner?.getBoundingClientRect();
|
|
607
|
+
|
|
608
|
+
let contentRight: number;
|
|
609
|
+
let contentBottom: number;
|
|
610
|
+
|
|
611
|
+
if (contentBoundingClientRect) {
|
|
612
|
+
contentRight = window.innerWidth - contentBoundingClientRect.right;
|
|
613
|
+
contentBottom = window.innerHeight - contentBoundingClientRect.bottom;
|
|
614
|
+
|
|
615
|
+
const margin = 8;
|
|
616
|
+
|
|
617
|
+
if (contentBoundingClientRect.top < margin) {
|
|
618
|
+
outTop = true;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
if (contentRight < margin) {
|
|
622
|
+
outRight = true;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (contentBottom < margin) {
|
|
626
|
+
outBottom = true;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (contentBoundingClientRect.left < margin) {
|
|
630
|
+
outLeft = true;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
if (outTop && (p === 0 || p === 1) && usefulInvertY) {
|
|
635
|
+
p = 3;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
if (outBottom && p === 3 && usefulInvertY) {
|
|
639
|
+
p = 1;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (outRight && p === 2 && usefulInvertX) {
|
|
643
|
+
p = 4;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
if (outLeft && p === 4 && usefulInvertX) {
|
|
647
|
+
p = 2;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
if (outRight && (p === 0 || p === 1 || p === 3)) {
|
|
651
|
+
this.elPopup.classList.add('invert-x');
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
if (outBottom && (p === 2 || p === 4) && usefulInvertY) {
|
|
655
|
+
// меню справа может перемещаться вверх, толкьо если есть место слева
|
|
656
|
+
if (p === 2 && !usefulInvertX) {
|
|
657
|
+
this.elPopup.classList.add('invert-y');
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// меню слева перемещаясь вверх, должно открываться влево
|
|
661
|
+
if (p === 4 && !usefulInvertX) {
|
|
662
|
+
this.elPopup.classList.add('invert-x');
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
if (!this.elPopup.matches('.invert-y')) {
|
|
666
|
+
p = 1;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
this.elPopup.classList.remove('p0', 'p1', 'p2', 'p3', 'p4');
|
|
671
|
+
this.elPopup.classList.add('p' + p);
|
|
672
|
+
|
|
673
|
+
if (this.elPopupInner instanceof HTMLElement) {
|
|
674
|
+
this.elPopupInner.style.maxWidth = '';
|
|
675
|
+
this.elPopupInner.style.maxHeight = '';
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// if (this.elPopupBody instanceof HTMLElement) {
|
|
679
|
+
// // отобразить popup по вертикали с другой стороны, если с другой стороны больше места
|
|
680
|
+
// const hasScroll = this.elPopupBody.offsetHeight < this.elPopupBody.scrollHeight;
|
|
681
|
+
// vd(this.elPopupBody.scrollHeight);
|
|
682
|
+
// vd(this.elPopupBody.offsetHeight);
|
|
683
|
+
// if (hasScroll && pForce === undefined) {
|
|
684
|
+
// const contentBoundingClientRect = this.elPopupBody?.getBoundingClientRect();
|
|
685
|
+
// if (
|
|
686
|
+
// p === 1 && contentBoundingClientRect.top * 2 < contentBoundingClientRect.bottom ||
|
|
687
|
+
// p === 3 && contentBoundingClientRect.bottom * 2 < contentBoundingClientRect.top
|
|
688
|
+
// ) {
|
|
689
|
+
// this.recalcPosition(p === 1 ? 3 : 1);
|
|
690
|
+
//
|
|
691
|
+
// return;
|
|
692
|
+
// }
|
|
693
|
+
// }
|
|
694
|
+
// }
|
|
695
|
+
|
|
696
|
+
Worker.scrollToActive(this.elPopup);
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
onTouchmove(e: TouchEvent): void {
|
|
700
|
+
if (e.currentTarget instanceof HTMLElement && e.target instanceof HTMLElement) {
|
|
701
|
+
// разрешить горизональный скролл
|
|
702
|
+
let hasScrollX = e.currentTarget.scrollWidth > e.currentTarget.offsetWidth;
|
|
703
|
+
if (hasScrollX) {
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
if (e.target.parentElement?.scrollWidth && e.target.parentElement?.offsetWidth) {
|
|
708
|
+
// разрешить горизональный скролл
|
|
709
|
+
let hasScrollX2 = e.target.parentElement.scrollWidth > e.target.parentElement?.offsetWidth;
|
|
710
|
+
if (hasScrollX2) {
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
if (!e.currentTarget.matches('.has_scroll')) {
|
|
716
|
+
e.preventDefault();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
close(): void {
|
|
722
|
+
if (this.isClosed) {
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
this.isClosed = true;
|
|
727
|
+
|
|
728
|
+
if (this.$ && Core.$ && this.elPopup) {
|
|
729
|
+
this.$.trigger('afterclose.top-menu-popup', [Core.$(this.elPopup)]);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
if (Worker.noClose) {
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
this.unmount();
|
|
737
|
+
|
|
738
|
+
this.elPopup?.classList.add('top-popup-wrapper-closed');
|
|
739
|
+
|
|
740
|
+
setTimeout(() => {
|
|
741
|
+
this.vueClose();
|
|
742
|
+
|
|
743
|
+
if (!this.elPopup) return;
|
|
744
|
+
|
|
745
|
+
if (this.options.useOriginal) {
|
|
746
|
+
this.elPopup.removeAttribute('style');
|
|
747
|
+
this.elPopup.classList.remove('top-popup-wrapper-shown', 'top-popup-wrapper-closed');
|
|
748
|
+
this.elPopup.classList.add('template');
|
|
749
|
+
this.elStartPosition?.append(this.elPopup);
|
|
750
|
+
|
|
751
|
+
this.elPopup.querySelector('div.top-popup_content.top-column')?.classList.remove('top-column');
|
|
752
|
+
this.elPopup.querySelector('.notch-border')?.remove();
|
|
753
|
+
this.elPopup.querySelector('.notch')?.remove();
|
|
754
|
+
|
|
755
|
+
this.elPopupInner?.replaceWith(...this.elPopupInner.childNodes);
|
|
756
|
+
|
|
757
|
+
DOM.storageClear(this.elPopup);
|
|
758
|
+
} else {
|
|
759
|
+
DOM.storageClear(this.elPopup);
|
|
760
|
+
|
|
761
|
+
this.elPopup.remove();
|
|
762
|
+
delete this.elPopup;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
const elsPopups = Worker.getAllVisible();
|
|
766
|
+
const elPopupLast = elsPopups.length && elsPopups[elsPopups.length - 1];
|
|
767
|
+
|
|
768
|
+
if (elPopupLast) {
|
|
769
|
+
Worker.getPopup(elPopupLast).focus();
|
|
770
|
+
} else {
|
|
771
|
+
document.documentElement.classList.remove('with_popup');
|
|
772
|
+
}
|
|
773
|
+
}, this.options.transitionDuration);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
async vueOpen(): Promise<void> {
|
|
777
|
+
await this.vueGetComponent()?.onOpen(this);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
vueClose(): void {
|
|
781
|
+
this.vueGetComponent()?.onClose(this);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
// получить vueConnectors компонента Popup
|
|
785
|
+
vueGetComponent() {
|
|
786
|
+
if (this.el instanceof HTMLElement && this.options.id) return Worker.vueConnectors.get(this.options.id);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
GlobalEvents.init();
|