@topvisor/ui 1.0.42-dev.2 → 1.0.42-policy.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/.chunks/core-BCV4xehV.es.js +197 -0
- package/.chunks/core-BCV4xehV.es.js.map +1 -0
- package/.chunks/core-SEtL6T0A.amd.js +2 -0
- package/.chunks/core-SEtL6T0A.amd.js.map +1 -0
- package/.chunks/datepicker-Ba8QPoiv.amd.js +2 -0
- package/.chunks/datepicker-Ba8QPoiv.amd.js.map +1 -0
- package/.chunks/datepicker-DHxSFb-9.es.js +44 -0
- package/.chunks/datepicker-DHxSFb-9.es.js.map +1 -0
- package/.chunks/dialog_selectorRegions-Cd7_dHoH.es.js +188 -0
- package/.chunks/dialog_selectorRegions-Cd7_dHoH.es.js.map +1 -0
- package/.chunks/dialog_selectorRegions-CiWJsA9r.amd.js +2 -0
- package/.chunks/dialog_selectorRegions-CiWJsA9r.amd.js.map +1 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C-wpHg-4.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C-wpHg-4.amd.js.map +1 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Deg17t8D.es.js +322 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Deg17t8D.es.js.map +1 -0
- package/.chunks/forms-DC7ffuv2.es.js +2051 -0
- package/.chunks/forms-DC7ffuv2.es.js.map +1 -0
- package/.chunks/forms-L6BGV_om.amd.js +3 -0
- package/.chunks/forms-L6BGV_om.amd.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CXp02bYr.es.js +184 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CXp02bYr.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-M0ZTpQlF.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-M0ZTpQlF.amd.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DNsbNhVH.es.js +110 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DNsbNhVH.es.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DepdFfhE.amd.js +2 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DepdFfhE.amd.js.map +1 -0
- package/.chunks/notice-DQXlrM4Y.es.js +175 -0
- package/.chunks/notice-DQXlrM4Y.es.js.map +1 -0
- package/.chunks/notice-ZTC1xm1R.amd.js +4 -0
- package/.chunks/notice-ZTC1xm1R.amd.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CDgPLGAn.es.js +143 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CDgPLGAn.es.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-ZB87yGeU.amd.js +2 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-ZB87yGeU.amd.js.map +1 -0
- package/.chunks/popup-B7GI-vlM.es.js +459 -0
- package/.chunks/popup-B7GI-vlM.es.js.map +1 -0
- package/.chunks/popup-Kvk7IPNI.amd.js +2 -0
- package/.chunks/popup-Kvk7IPNI.amd.js.map +1 -0
- package/.chunks/punycode.es6-C2yitnNb.amd.js +2 -0
- package/.chunks/punycode.es6-C2yitnNb.amd.js.map +1 -0
- package/.chunks/punycode.es6-CNI-zL6U.es.js +134 -0
- package/.chunks/punycode.es6-CNI-zL6U.es.js.map +1 -0
- package/.chunks/store-CX_6ZXhO.es.js +29 -0
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -0
- package/.chunks/store-esTid5oI.amd.js +2 -0
- package/.chunks/store-esTid5oI.amd.js.map +1 -0
- package/.chunks/utils-BKooGtxR.amd.js +2 -0
- package/.chunks/utils-BKooGtxR.amd.js.map +1 -0
- package/.chunks/utils-Bg7IV0KZ.amd.js +2 -0
- package/.chunks/utils-Bg7IV0KZ.amd.js.map +1 -0
- package/.chunks/utils-BkchlCXw.es.js +79 -0
- package/.chunks/utils-BkchlCXw.es.js.map +1 -0
- package/.chunks/utils-CyqZFHE6.es.js +304 -0
- package/.chunks/utils-CyqZFHE6.es.js.map +1 -0
- package/README.md +59 -37
- package/assets/charts.css +1 -0
- package/assets/core.css +1 -0
- package/assets/dialog_selectorRegions.css +1 -0
- package/assets/extra.css +1 -0
- package/assets/forms.css +1 -0
- package/assets/formsExt.css +1 -0
- package/assets/layout.css +1 -0
- package/assets/listItem.css +1 -0
- package/assets/menu.css +1 -0
- package/assets/notice.css +1 -0
- package/assets/popup.css +1 -0
- package/assets/project.css +1 -0
- package/assets/tabs.css +1 -0
- package/assets/tabsView.css +1 -0
- package/assets/themes/dark-th.css +1 -0
- package/assets/themes/dark.css +1 -0
- package/assets/themes/light.css +1 -0
- package/charts/charts.amd.js +2 -0
- package/charts/charts.amd.js.map +1 -0
- package/charts/charts.d.ts +2 -0
- package/charts/charts.js +178 -0
- package/charts/charts.js.map +1 -0
- package/components/charts/charts.d.ts +5 -0
- package/components/charts/miniChart/miniChart.vue.d.ts +15 -0
- package/components/charts/miniChart/stories/dummy.d.ts +13 -0
- package/components/charts/miniChart/types.d.ts +92 -0
- package/components/charts/miniChart/utils/consts.d.ts +8 -0
- package/components/charts/miniCharts/miniCharts.d.ts +20 -0
- package/components/charts/miniCharts/miniCharts.vue.d.ts +32 -0
- package/components/charts/miniCharts/stories/dummy.d.ts +6 -0
- package/components/core/notice/item/item.vue.d.ts +10 -0
- package/components/core/notice/item/types.d.ts +63 -0
- package/components/core/notice/notice.vue.d.ts +5 -0
- package/components/core/notice/utils.d.ts +27 -0
- package/components/dialog/dialog/composables/asyncDialogHandle.d.ts +51 -0
- package/components/dialog/dialog/composables/dialogHandle.d.ts +108 -0
- package/components/dialog/dialog/composables/types.d.ts +11 -0
- package/components/dialog/dialog/composables/utils.d.ts +21 -0
- package/components/dialog/dialog/dialog.vue.d.ts +28 -0
- package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +13 -0
- package/components/dialog/dialog/page/page.vue.d.ts +19 -0
- package/components/dialog/dialog/page/types.d.ts +72 -0
- package/components/dialog/dialog/pageComponent/pageComponent.vue.d.ts +6 -0
- package/components/dialog/dialog/pageComponent/types.d.ts +18 -0
- package/components/dialog/dialog/stories/autoload.d.ts +2 -0
- package/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +7 -0
- package/components/dialog/dialog/types.d.ts +58 -0
- package/components/dialog/dialog.d.ts +6 -0
- package/components/dialog/lib/types.d.ts +44 -0
- package/components/dialog/lib/utils.d.ts +14 -0
- package/components/dialog/lib/utils.globalEvents.d.ts +8 -0
- package/components/dialog/lib/worker.d.ts +76 -0
- package/components/extra/extra.d.ts +3 -0
- package/components/extra/rive/rive.vue.d.ts +11 -0
- package/components/extra/rive/types.d.ts +7 -0
- package/components/forms/avatar/avatar.vue.d.ts +10 -0
- package/components/forms/avatar/types.d.ts +32 -0
- package/components/forms/button/button.vue.d.ts +21 -0
- package/components/forms/button/types.d.ts +49 -0
- package/components/forms/caption/caption.vue.d.ts +17 -0
- package/components/forms/caption/types.d.ts +9 -0
- package/components/forms/checkbox/checkbox.vue.d.ts +27 -0
- package/components/forms/checkbox/types.d.ts +21 -0
- package/components/forms/controlLabel/controlLabel.vue.d.ts +19 -0
- package/components/forms/controlLabel/types.d.ts +4 -0
- package/components/forms/forms.d.ts +31 -0
- package/components/forms/hint/hint.vue.d.ts +4 -0
- package/components/forms/hint/types.d.ts +8 -0
- package/components/forms/input/input.vue.d.ts +27 -0
- package/components/forms/input/types.d.ts +23 -0
- package/components/forms/inputDate/datepicker.d.ts +5 -0
- package/components/forms/inputDate/inputDate.vue.d.ts +12 -0
- package/components/forms/inputDate/types.d.ts +1 -0
- package/components/forms/inputRange/inputRange.vue.d.ts +19 -0
- package/components/forms/inputRange/types.d.ts +2 -0
- package/components/forms/loadbar/loadbar.vue.d.ts +3 -0
- package/components/forms/preloader/preloader.vue.d.ts +4 -0
- package/components/forms/preloader/types.d.ts +3 -0
- package/components/forms/radio/radio.vue.d.ts +23 -0
- package/components/forms/radio/types.d.ts +14 -0
- package/components/forms/select/select.vue.d.ts +17 -0
- package/components/forms/select/stories/exampleOptions.d.ts +5 -0
- package/components/forms/select/types.d.ts +58 -0
- package/components/forms/switcher/switcher.vue.d.ts +23 -0
- package/components/forms/switcher/types.d.ts +21 -0
- package/components/forms/textarea/textarea.vue.d.ts +12 -0
- package/components/forms/textarea/types.d.ts +44 -0
- package/components/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +16 -0
- package/components/formsExt/checkboxGroup/stories/example.d.ts +15 -0
- package/components/formsExt/checkboxGroup/types.d.ts +19 -0
- package/components/formsExt/editArea/editArea.vue.d.ts +18 -0
- package/components/formsExt/editArea/types.d.ts +33 -0
- package/components/formsExt/editInput/editInput.vue.d.ts +8 -0
- package/components/formsExt/editInput/types.d.ts +16 -0
- package/components/formsExt/formsExt.d.ts +17 -0
- package/components/formsExt/info/info.vue.d.ts +20 -0
- package/components/formsExt/info/types.d.ts +21 -0
- package/components/formsExt/menu/menu.vue.d.ts +16 -0
- package/components/formsExt/menu/stories/items.d.ts +3 -0
- package/components/formsExt/menu/types.d.ts +37 -0
- package/components/formsExt/policy/policy.vue.d.ts +21 -0
- package/components/formsExt/policy/types.d.ts +24 -0
- package/components/formsExt/radioGroup/radioGroup.vue.d.ts +16 -0
- package/components/formsExt/radioGroup/stories/example.d.ts +20 -0
- package/components/formsExt/radioGroup/types.d.ts +21 -0
- package/components/formsExt/selector2/composables/useAPI.d.ts +30 -0
- package/components/formsExt/selector2/composables/useMenu.d.ts +16 -0
- package/components/formsExt/selector2/itemMulti.vue.d.ts +8 -0
- package/components/formsExt/selector2/selector2.vue.d.ts +43 -0
- package/components/formsExt/selector2/stories/dummyAPIRequest.d.ts +9 -0
- package/components/formsExt/selector2/types.d.ts +166 -0
- package/components/formsExt/selector2/utils.d.ts +6 -0
- package/components/layout/islandRows/islandRows.vue.d.ts +17 -0
- package/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +18 -0
- package/components/layout/islandRows/islandRowsRow/types.d.ts +2 -0
- package/components/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +18 -0
- package/components/layout/islandRows/types.d.ts +10 -0
- package/components/layout/layout.d.ts +9 -0
- package/components/layout/rows/rows.vue.d.ts +21 -0
- package/components/layout/rows/types.d.ts +6 -0
- package/components/popup/alert/alert.vue.d.ts +25 -0
- package/components/popup/alert/types.d.ts +8 -0
- package/components/popup/confirm/confirm.vue.d.ts +26 -0
- package/components/popup/confirm/types.d.ts +21 -0
- package/components/popup/lib/popup.d.ts +87 -0
- package/components/popup/lib/popup.globalEvents.d.ts +32 -0
- package/components/popup/lib/worker.d.ts +77 -0
- package/components/popup/lib/worker.globalEvents.d.ts +19 -0
- package/components/popup/popup/listItem.vue.d.ts +22 -0
- package/components/popup/popup/opener.vue.d.ts +17 -0
- package/components/popup/popup/popup.vue.d.ts +38 -0
- package/components/popup/popup/types.d.ts +110 -0
- package/components/popup/popup/widgetInput.vue.d.ts +17 -0
- package/components/popup/popup.d.ts +15 -0
- package/components/popup/prompt/prompt.vue.d.ts +26 -0
- package/components/popup/prompt/types.d.ts +21 -0
- package/components/project/project.d.ts +15 -0
- package/components/project/selectorCompetitors/composables.d.ts +3 -0
- package/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +14 -0
- package/components/project/selectorCompetitors/stories/items.d.ts +3 -0
- package/components/project/selectorCompetitors/types.d.ts +30 -0
- package/components/project/selectorRegion/composables/compare.d.ts +12 -0
- package/components/project/selectorRegion/composables/selectRegion.d.ts +13 -0
- package/components/project/selectorRegion/composables/selectSearcher.d.ts +13 -0
- package/components/project/selectorRegion/composables/selectorRegion.d.ts +25 -0
- package/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +6 -0
- package/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +26 -0
- package/components/project/selectorRegion/selectorRegion.vue.d.ts +23 -0
- package/components/project/selectorRegion/stories/searchers.d.ts +3 -0
- package/components/project/selectorRegion/types.d.ts +172 -0
- package/components/project/selectorRegion/utils/consts.d.ts +31 -0
- package/components/project/selectorRegion/utils/utils.d.ts +34 -0
- package/components/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +20 -0
- package/components/project/tagSelector/popupListItem/types.d.ts +33 -0
- package/components/project/tagSelector/popupOpener/popupOpener.vue.d.ts +27 -0
- package/components/project/tagSelector/popupOpener/types.d.ts +64 -0
- package/components/project/tagSelector/tagIcon/tagIcon.vue.d.ts +4 -0
- package/components/project/tagSelector/tagIcon/types.d.ts +21 -0
- package/components/project/tagSelector/tagSelector.vue.d.ts +37 -0
- package/components/project/tagSelector/tagsDefaults.d.ts +3 -0
- package/components/project/tagSelector/types.d.ts +140 -0
- package/components/project/tagSelector/utils/el.d.ts +19 -0
- package/components/project/tagSelector/utils/utils.d.ts +14 -0
- package/components/tabs/tabs/content.vue.d.ts +19 -0
- package/components/tabs/tabs/tab.vue.d.ts +19 -0
- package/components/tabs/tabs/tabs.vue.d.ts +21 -0
- package/components/tabs/tabs/types.d.ts +19 -0
- package/components/tabs/tabs.d.ts +7 -0
- package/components/tabsView/tabsView/menu.vue.d.ts +32 -0
- package/components/tabsView/tabsView/menuDelimeter.vue.d.ts +3 -0
- package/components/tabsView/tabsView/menuItem.vue.d.ts +23 -0
- package/components/tabsView/tabsView/menuTitle.vue.d.ts +20 -0
- package/components/tabsView/tabsView/store.d.ts +12 -0
- package/components/tabsView/tabsView/tabsView.vue.d.ts +34 -0
- package/components/tabsView/tabsView/types.d.ts +98 -0
- package/components/tabsView/tabsView/utils.d.ts +11 -0
- package/components/tabsView/tabsView.d.ts +7 -0
- package/core/app.amd.js +2 -0
- package/core/app.amd.js.map +1 -0
- package/core/app.d.ts +8 -0
- package/core/app.js +214 -0
- package/core/app.js.map +1 -0
- package/core/core/core.d.ts +113 -0
- package/core/core/events/resize.d.ts +16 -0
- package/core/core/events.d.ts +15 -0
- package/core/core/options.d.ts +47 -0
- package/core/core/preloaders.d.ts +19 -0
- package/core/core/state.d.ts +49 -0
- package/core/directives/data.d.ts +10 -0
- package/core/directives/focus.d.ts +10 -0
- package/core/directives/preloader.d.ts +8 -0
- package/core/directives/scrollIntoView.d.ts +3 -0
- package/core/directives/scrollShadow.d.ts +15 -0
- package/core/directives/sticky.d.ts +10 -0
- package/core/directives/swimUp.d.ts +15 -0
- package/core/directives/tooltip.d.ts +10 -0
- package/core/plugins/core.d.ts +60 -0
- package/core/plugins/i18n.d.ts +97 -0
- package/core/plugins/piniaTPA.d.ts +17 -0
- package/core/utils/check.d.ts +26 -0
- package/core/utils/clipboard.d.ts +12 -0
- package/core/utils/date.d.ts +70 -0
- package/core/utils/device.d.ts +50 -0
- package/core/utils/dom.d.ts +104 -0
- package/core/utils/image.d.ts +16 -0
- package/core/utils/keyboard.d.ts +8 -0
- package/core/utils/lodash.d.ts +6 -0
- package/core/utils/number.d.ts +17 -0
- package/core/utils/price.d.ts +10 -0
- package/core/utils/route.d.ts +33 -0
- package/core/utils/scroll.d.ts +32 -0
- package/core/utils/searchers.d.ts +38 -0
- package/core/utils/store/localStorage.d.ts +6 -0
- package/core/utils/store/plugin.d.ts +24 -0
- package/core/utils/store/store.d.ts +34 -0
- package/core/utils/store.d.ts +6 -0
- package/core/utils/string.d.ts +100 -0
- package/core/utils/system.d.ts +25 -0
- package/core/utils/url.d.ts +36 -0
- package/dialog/dialog.amd.js +2 -0
- package/dialog/dialog.amd.js.map +1 -0
- package/dialog/dialog.d.ts +2 -0
- package/dialog/dialog.js +60 -0
- package/dialog/dialog.js.map +1 -0
- package/extra/extra.amd.js +2 -0
- package/extra/extra.amd.js.map +1 -0
- package/extra/extra.d.ts +2 -0
- package/extra/extra.js +72 -0
- package/extra/extra.js.map +1 -0
- package/forms/forms.amd.js +2 -0
- package/forms/forms.amd.js.map +1 -0
- package/forms/forms.d.ts +2 -0
- package/forms/forms.js +19 -0
- package/forms/forms.js.map +1 -0
- package/forms/helpers.amd.js +2 -0
- package/forms/helpers.amd.js.map +1 -0
- package/forms/helpers.d.ts +1 -0
- package/forms/helpers.js +2 -0
- package/forms/helpers.js.map +1 -0
- package/formsExt/formsExt.amd.js +2 -0
- package/formsExt/formsExt.amd.js.map +1 -0
- package/formsExt/formsExt.d.ts +2 -0
- package/formsExt/formsExt.js +689 -0
- package/formsExt/formsExt.js.map +1 -0
- package/layout/layout.amd.js +2 -0
- package/layout/layout.amd.js.map +1 -0
- package/layout/layout.d.ts +2 -0
- package/layout/layout.js +62 -0
- package/layout/layout.js.map +1 -0
- package/package.json +4 -62
- package/popup/popup.amd.js +2 -0
- package/popup/popup.amd.js.map +1 -0
- package/popup/popup.d.ts +2 -0
- package/popup/popup.js +260 -0
- package/popup/popup.js.map +1 -0
- package/popup/worker.amd.js +2 -0
- package/popup/worker.amd.js.map +1 -0
- package/popup/worker.d.ts +2 -0
- package/popup/worker.js +138 -0
- package/popup/worker.js.map +1 -0
- package/project/project.amd.js +2 -0
- package/project/project.amd.js.map +1 -0
- package/project/project.d.ts +2 -0
- package/project/project.js +986 -0
- package/project/project.js.map +1 -0
- package/tabs/tabs.amd.js +2 -0
- package/tabs/tabs.amd.js.map +1 -0
- package/tabs/tabs.d.ts +2 -0
- package/tabs/tabs.js +81 -0
- package/tabs/tabs.js.map +1 -0
- package/tabsView/tabsView.amd.js +2 -0
- package/tabsView/tabsView.amd.js.map +1 -0
- package/tabsView/tabsView.d.ts +2 -0
- package/tabsView/tabsView.js +306 -0
- package/tabsView/tabsView.js.map +1 -0
- package/utils/check.amd.js +2 -0
- package/utils/check.amd.js.map +1 -0
- package/utils/check.d.ts +2 -0
- package/utils/check.js +26 -0
- package/utils/check.js.map +1 -0
- package/utils/clipboard.amd.js +6 -0
- package/utils/clipboard.amd.js.map +1 -0
- package/utils/clipboard.d.ts +2 -0
- package/utils/clipboard.js +33 -0
- package/utils/clipboard.js.map +1 -0
- package/utils/date.amd.js +2 -0
- package/utils/date.amd.js.map +1 -0
- package/utils/date.d.ts +2 -0
- package/utils/date.js +12 -0
- package/utils/date.js.map +1 -0
- package/utils/device.amd.js +2 -0
- package/utils/device.amd.js.map +1 -0
- package/utils/device.d.ts +2 -0
- package/utils/device.js +15 -0
- package/utils/device.js.map +1 -0
- package/utils/dom.amd.js +2 -0
- package/utils/dom.amd.js.map +1 -0
- package/utils/dom.d.ts +6 -0
- package/utils/dom.js +80 -0
- package/utils/dom.js.map +1 -0
- package/utils/image.amd.js +12 -0
- package/utils/image.amd.js.map +1 -0
- package/utils/image.d.ts +2 -0
- package/utils/image.js +23 -0
- package/utils/image.js.map +1 -0
- package/utils/keyboard.amd.js +2 -0
- package/utils/keyboard.amd.js.map +1 -0
- package/utils/keyboard.d.ts +2 -0
- package/utils/keyboard.js +12 -0
- package/utils/keyboard.js.map +1 -0
- package/utils/lodash.amd.js +2 -0
- package/utils/lodash.amd.js.map +1 -0
- package/utils/lodash.d.ts +2 -0
- package/utils/lodash.js +9 -0
- package/utils/lodash.js.map +1 -0
- package/utils/number.amd.js +2 -0
- package/utils/number.amd.js.map +1 -0
- package/utils/number.d.ts +2 -0
- package/utils/number.js +13 -0
- package/utils/number.js.map +1 -0
- package/utils/price.amd.js +2 -0
- package/utils/price.amd.js.map +1 -0
- package/utils/price.d.ts +2 -0
- package/utils/price.js +10 -0
- package/utils/price.js.map +1 -0
- package/utils/route.amd.js +2 -0
- package/utils/route.amd.js.map +1 -0
- package/utils/route.d.ts +2 -0
- package/utils/route.js +38 -0
- package/utils/route.js.map +1 -0
- package/utils/scroll.amd.js +2 -0
- package/utils/scroll.amd.js.map +1 -0
- package/utils/scroll.d.ts +2 -0
- package/utils/scroll.js +45 -0
- package/utils/scroll.js.map +1 -0
- package/utils/searchers.amd.js +2 -0
- package/utils/searchers.amd.js.map +1 -0
- package/utils/searchers.d.ts +2 -0
- package/utils/searchers.js +134 -0
- package/utils/searchers.js.map +1 -0
- package/utils/store.amd.js +2 -0
- package/utils/store.amd.js.map +1 -0
- package/utils/store.d.ts +2 -0
- package/utils/store.js +7 -0
- package/utils/store.js.map +1 -0
- package/utils/string.amd.js +2 -0
- package/utils/string.amd.js.map +1 -0
- package/utils/string.d.ts +2 -0
- package/utils/string.js +152 -0
- package/utils/string.js.map +1 -0
- package/utils/system.amd.js +2 -0
- package/utils/system.amd.js.map +1 -0
- package/utils/system.d.ts +2 -0
- package/utils/system.js +29 -0
- package/utils/system.js.map +1 -0
- package/utils/url.amd.js +3 -0
- package/utils/url.amd.js.map +1 -0
- package/utils/url.d.ts +2 -0
- package/utils/url.js +48 -0
- package/utils/url.js.map +1 -0
- package/.env_example +0 -1
- package/.gitlab-ci/.gitlab-ci.yml +0 -27
- package/.gitlab-ci/README.md +0 -59
- package/.gitlab-ci/common/install.yml +0 -21
- package/.gitlab-ci/common/lint.yml +0 -11
- package/.gitlab-ci/common/redmine.yml +0 -12
- package/.gitlab-ci/common/version.yml +0 -34
- package/.gitlab-ci/storybook/build.yml +0 -18
- package/.gitlab-ci/storybook/deploy.yml +0 -50
- package/.gitlab-ci/ui/build.yml +0 -12
- package/.gitlab-ci/ui/deploy-dist.yml +0 -89
- package/.gitlab-ci/ui/deploy.yml +0 -19
- package/.idea/.gitignore +0 -11
- package/.idea/codeStyles/Project.xml +0 -205
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/externalDependencies.xml +0 -6
- package/.idea/icon.svg +0 -5
- package/.idea/inspectionProfiles/Disabled.xml +0 -824
- package/.idea/inspectionProfiles/Project_Default.xml +0 -33
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -19
- package/.idea/ui.iml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.storybook/TopTheme.ts +0 -115
- package/.storybook/TopThemeManager.ts +0 -53
- package/.storybook/argsArrayDecorator.ts +0 -120
- package/.storybook/main.ts +0 -78
- package/.storybook/manager.ts +0 -25
- package/.storybook/preview-head.html +0 -21
- package/.storybook/preview.ts +0 -50
- package/.storybook/vue/coreDecorator.ts +0 -86
- package/.storybook/vue/vModelDecorator.ts +0 -46
- package/.versionrc.json +0 -16
- package/.vscode/extensions.json +0 -11
- package/.vscode/keybindings.example.json +0 -121
- package/.vscode/settings.json +0 -45
- package/CHANGELOG.md +0 -428
- package/NPM.md +0 -25
- package/PUBLISH.md +0 -88
- package/STORYBOOK.md +0 -41
- package/USE_IN_PROJECT.md +0 -32
- package/public/README.md +0 -82
- package/rollup.config.ts +0 -38
- package/scripts/afterBuild.sh +0 -13
- package/scripts/cssModules.ts +0 -39
- package/scripts/genDocs.sh +0 -20
- package/scripts/plugin/amdFix.ts +0 -83
- package/scripts/plugin/autoloadCSS.ts +0 -155
- package/src/CHANGELOG.md.mdx +0 -4
- package/src/components/charts/charts.ts +0 -8
- package/src/components/charts/miniChart/miniChart.stories.ts +0 -66
- package/src/components/charts/miniChart/miniChart.vue +0 -158
- package/src/components/charts/miniChart/stories/README.md +0 -9
- package/src/components/charts/miniChart/stories/dummy.ts +0 -25
- package/src/components/charts/miniChart/styles/miniChart.css +0 -87
- package/src/components/charts/miniChart/types.ts +0 -110
- package/src/components/charts/miniChart/utils/consts.ts +0 -9
- package/src/components/charts/miniCharts/miniCharts.stories.ts +0 -75
- package/src/components/charts/miniCharts/miniCharts.ts +0 -24
- package/src/components/charts/miniCharts/miniCharts.vue +0 -124
- package/src/components/charts/miniCharts/stories/README.md +0 -18
- package/src/components/charts/miniCharts/stories/dummy.ts +0 -70
- package/src/components/charts/miniCharts/stories/overview.vue +0 -139
- package/src/components/charts/miniCharts/styles/miniCharts.css +0 -32
- package/src/components/component.ts +0 -130
- package/src/components/core/core.mdx +0 -7
- package/src/components/core/notice/item/item.vue +0 -145
- package/src/components/core/notice/item/style.css +0 -70
- package/src/components/core/notice/item/types.ts +0 -74
- package/src/components/core/notice/notice.stories.ts +0 -104
- package/src/components/core/notice/notice.vue +0 -69
- package/src/components/core/notice/stories/README.md +0 -34
- package/src/components/core/notice/utils.ts +0 -115
- package/src/components/dialog/dialog/Dialog (code).mdx +0 -61
- package/src/components/dialog/dialog/composables/asyncDialogHandle.ts +0 -99
- package/src/components/dialog/dialog/composables/dialogHandle.ts +0 -178
- package/src/components/dialog/dialog/composables/types.ts +0 -12
- package/src/components/dialog/dialog/composables/utils.ts +0 -39
- package/src/components/dialog/dialog/dialog.stories.ts +0 -82
- package/src/components/dialog/dialog/dialog.vue +0 -74
- package/src/components/dialog/dialog/dialogs/dialogs.vue +0 -61
- package/src/components/dialog/dialog/page/page.vue +0 -86
- package/src/components/dialog/dialog/page/types.ts +0 -84
- package/src/components/dialog/dialog/page.stories.ts +0 -26
- package/src/components/dialog/dialog/pageComponent/pageComponent.vue +0 -57
- package/src/components/dialog/dialog/pageComponent/types.ts +0 -21
- package/src/components/dialog/dialog/pageComponent.stories.ts +0 -26
- package/src/components/dialog/dialog/stories/README.md +0 -117
- package/src/components/dialog/dialog/stories/autoload.ts +0 -12
- package/src/components/dialog/dialog/stories/dialog_example/dialog_example.vue +0 -77
- package/src/components/dialog/dialog/stories/dialog_example/pages/async.vue +0 -57
- package/src/components/dialog/dialog/stories/dialog_example/pages/default.vue +0 -56
- package/src/components/dialog/dialog/stories/dialog_example/pages/headerButtons.vue +0 -56
- package/src/components/dialog/dialog/stories/dialog_example/pages/utils.ts +0 -26
- package/src/components/dialog/dialog/stories/dialog_example/pages/withoutCache.vue +0 -56
- package/src/components/dialog/dialog/stories/page/README.md +0 -24
- package/src/components/dialog/dialog/stories/pageComponent/README.md +0 -12
- package/src/components/dialog/dialog/style/dialog.css +0 -319
- package/src/components/dialog/dialog/style/dialog.m.css +0 -40
- package/src/components/dialog/dialog/style/dialog.pc.css +0 -73
- package/src/components/dialog/dialog/style/modern/dialog.css +0 -12
- package/src/components/dialog/dialog/style/modern/dialog.pc.css +0 -3
- package/src/components/dialog/dialog/types.ts +0 -69
- package/src/components/dialog/dialog.ts +0 -7
- package/src/components/dialog/lib/types.ts +0 -42
- package/src/components/dialog/lib/utils.globalEvents.ts +0 -214
- package/src/components/dialog/lib/utils.ts +0 -656
- package/src/components/dialog/lib/worker.ts +0 -362
- package/src/components/extra/extra.ts +0 -5
- package/src/components/extra/rive/rive.vue +0 -56
- package/src/components/extra/rive/rives.stories.ts +0 -65
- package/src/components/extra/rive/stories/README.md +0 -40
- package/src/components/extra/rive/stories/nope.riv +0 -0
- package/src/components/extra/rive/stories/sadness.riv +0 -0
- package/src/components/extra/rive/types.ts +0 -8
- package/src/components/forms/README.mdx +0 -10
- package/src/components/forms/avatar/avatar.stories.ts +0 -37
- package/src/components/forms/avatar/avatar.vue +0 -77
- package/src/components/forms/avatar/stories/overview.vue +0 -30
- package/src/components/forms/avatar/types.ts +0 -38
- package/src/components/forms/button/button.stories.ts +0 -117
- package/src/components/forms/button/button.vue +0 -111
- package/src/components/forms/button/stories/README.md +0 -9
- package/src/components/forms/button/stories/overview.vue +0 -36
- package/src/components/forms/button/style/button.css +0 -146
- package/src/components/forms/button/style/style-outline.css +0 -129
- package/src/components/forms/button/style/style-soft.css +0 -89
- package/src/components/forms/button/style/style-transparent.css +0 -39
- package/src/components/forms/button/types.ts +0 -59
- package/src/components/forms/caption/caption.stories.ts +0 -108
- package/src/components/forms/caption/caption.vue +0 -29
- package/src/components/forms/caption/types.ts +0 -10
- package/src/components/forms/checkbox/checkbox.stories.ts +0 -32
- package/src/components/forms/checkbox/checkbox.vue +0 -115
- package/src/components/forms/checkbox/stories/overview.vue +0 -171
- package/src/components/forms/checkbox/types.ts +0 -21
- package/src/components/forms/controlLabel/controlLabel.stories.ts +0 -31
- package/src/components/forms/controlLabel/controlLabel.vue +0 -54
- package/src/components/forms/controlLabel/types.ts +0 -4
- package/src/components/forms/forms.ts +0 -44
- package/src/components/forms/hint/hint.stories.ts +0 -40
- package/src/components/forms/hint/hint.vue +0 -32
- package/src/components/forms/hint/types.ts +0 -8
- package/src/components/forms/input/input.stories.ts +0 -31
- package/src/components/forms/input/input.vue +0 -178
- package/src/components/forms/input/stories/overview.vue +0 -63
- package/src/components/forms/input/types.ts +0 -31
- package/src/components/forms/inputDate/datepicker.css +0 -246
- package/src/components/forms/inputDate/datepicker.ts +0 -101
- package/src/components/forms/inputDate/inputDate.stories.ts +0 -40
- package/src/components/forms/inputDate/inputDate.vue +0 -133
- package/src/components/forms/inputDate/stories/overview.vue +0 -35
- package/src/components/forms/inputDate/types.ts +0 -1
- package/src/components/forms/inputRange/inputRange.stories.ts +0 -52
- package/src/components/forms/inputRange/inputRange.vue +0 -39
- package/src/components/forms/inputRange/stories/overview.vue +0 -129
- package/src/components/forms/inputRange/types.ts +0 -3
- package/src/components/forms/loadbar/loadbar.stories.ts +0 -22
- package/src/components/forms/loadbar/loadbar.vue +0 -37
- package/src/components/forms/loadbar/stories/README.md +0 -6
- package/src/components/forms/preloader/preloader.stories.ts +0 -46
- package/src/components/forms/preloader/preloader.vue +0 -103
- package/src/components/forms/preloader/stories/README.md +0 -26
- package/src/components/forms/preloader/types.ts +0 -3
- package/src/components/forms/radio/radio.stories.ts +0 -33
- package/src/components/forms/radio/radio.vue +0 -97
- package/src/components/forms/radio/stories/overview.vue +0 -79
- package/src/components/forms/radio/types.ts +0 -15
- package/src/components/forms/select/select.stories.ts +0 -68
- package/src/components/forms/select/select.vue +0 -299
- package/src/components/forms/select/stories/exampleOptions.ts +0 -61
- package/src/components/forms/select/stories/overview.vue +0 -72
- package/src/components/forms/select/types.ts +0 -68
- package/src/components/forms/switcher/stories/overview.vue +0 -139
- package/src/components/forms/switcher/switcher.stories.ts +0 -32
- package/src/components/forms/switcher/switcher.vue +0 -118
- package/src/components/forms/switcher/types.ts +0 -22
- package/src/components/forms/textarea/stories/overview.vue +0 -89
- package/src/components/forms/textarea/textarea.stories.ts +0 -33
- package/src/components/forms/textarea/textarea.vue +0 -143
- package/src/components/forms/textarea/types.ts +0 -52
- package/src/components/formsExt/README.mdx +0 -5
- package/src/components/formsExt/checkboxGroup/checkboxGroup.stories.ts +0 -36
- package/src/components/formsExt/checkboxGroup/checkboxGroup.vue +0 -159
- package/src/components/formsExt/checkboxGroup/stories/example.ts +0 -42
- package/src/components/formsExt/checkboxGroup/stories/overview.vue +0 -36
- package/src/components/formsExt/checkboxGroup/types.ts +0 -23
- package/src/components/formsExt/editArea/editArea.stories.ts +0 -40
- package/src/components/formsExt/editArea/editArea.vue +0 -194
- package/src/components/formsExt/editArea/stories/README.md +0 -21
- package/src/components/formsExt/editArea/stories/overview.vue +0 -67
- package/src/components/formsExt/editArea/types.ts +0 -41
- package/src/components/formsExt/editInput/editInput.stories.ts +0 -35
- package/src/components/formsExt/editInput/editInput.vue +0 -54
- package/src/components/formsExt/editInput/stories/overview.vue +0 -54
- package/src/components/formsExt/editInput/types.ts +0 -20
- package/src/components/formsExt/formsExt.ts +0 -19
- package/src/components/formsExt/info/info.stories.ts +0 -34
- package/src/components/formsExt/info/info.vue +0 -84
- package/src/components/formsExt/info/stories/overview.vue +0 -29
- package/src/components/formsExt/info/types.ts +0 -25
- package/src/components/formsExt/menu/menu.stories.ts +0 -58
- package/src/components/formsExt/menu/menu.vue +0 -324
- package/src/components/formsExt/menu/stories/items.ts +0 -18
- package/src/components/formsExt/menu/stories/overview.vue +0 -52
- package/src/components/formsExt/menu/types.ts +0 -45
- package/src/components/formsExt/policy/policy.stories.ts +0 -66
- package/src/components/formsExt/policy/policy.vue +0 -75
- package/src/components/formsExt/policy/types.ts +0 -11
- package/src/components/formsExt/radioGroup/radioGroup.stories.ts +0 -35
- package/src/components/formsExt/radioGroup/radioGroup.vue +0 -142
- package/src/components/formsExt/radioGroup/stories/example.ts +0 -43
- package/src/components/formsExt/radioGroup/stories/overview.vue +0 -35
- package/src/components/formsExt/radioGroup/types.ts +0 -27
- package/src/components/formsExt/selector2/composables/useAPI.ts +0 -151
- package/src/components/formsExt/selector2/composables/useMenu.ts +0 -165
- package/src/components/formsExt/selector2/itemMulti.vue +0 -57
- package/src/components/formsExt/selector2/selector2.stories.ts +0 -123
- package/src/components/formsExt/selector2/selector2.vue +0 -448
- package/src/components/formsExt/selector2/stories/README.md +0 -146
- package/src/components/formsExt/selector2/stories/dummyAPIRequest.ts +0 -57
- package/src/components/formsExt/selector2/stories/overview.vue +0 -95
- package/src/components/formsExt/selector2/types.ts +0 -184
- package/src/components/formsExt/selector2/utils.ts +0 -22
- package/src/components/helpersStories.ts +0 -331
- package/src/components/layout/islandRows/islandRows.stories.ts +0 -138
- package/src/components/layout/islandRows/islandRows.vue +0 -53
- package/src/components/layout/islandRows/islandRowsRow/islandRowsRow.vue +0 -36
- package/src/components/layout/islandRows/islandRowsRow/types.ts +0 -1
- package/src/components/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue +0 -16
- package/src/components/layout/islandRows/stories/README.md +0 -8
- package/src/components/layout/islandRows/types.ts +0 -11
- package/src/components/layout/layout.ts +0 -11
- package/src/components/layout/rows/rows.stories.ts +0 -47
- package/src/components/layout/rows/rows.vue +0 -46
- package/src/components/layout/rows/stories/README.md +0 -10
- package/src/components/layout/rows/types.ts +0 -6
- package/src/components/popup/alert/alert.stories.ts +0 -70
- package/src/components/popup/alert/alert.vue +0 -49
- package/src/components/popup/alert/stories/overview.vue +0 -40
- package/src/components/popup/alert/types.ts +0 -11
- package/src/components/popup/confirm/confirm.stories.ts +0 -74
- package/src/components/popup/confirm/confirm.vue +0 -78
- package/src/components/popup/confirm/stories/overview.vue +0 -62
- package/src/components/popup/confirm/types.ts +0 -26
- package/src/components/popup/lib/popup.globalEvents.ts +0 -271
- package/src/components/popup/lib/popup.ts +0 -858
- package/src/components/popup/lib/worker.globalEvents.ts +0 -101
- package/src/components/popup/lib/worker.ts +0 -305
- package/src/components/popup/popup/listItem.vue +0 -35
- package/src/components/popup/popup/opener.vue +0 -82
- package/src/components/popup/popup/popup.stories.ts +0 -73
- package/src/components/popup/popup/popup.vue +0 -176
- package/src/components/popup/popup/stories/README.md +0 -145
- package/src/components/popup/popup/stories/listItems.vue +0 -69
- package/src/components/popup/popup/stories/listSubItems.vue +0 -47
- package/src/components/popup/popup/stories/overview.vue +0 -224
- package/src/components/popup/popup/style/popup.css +0 -355
- package/src/components/popup/popup/style/popup.m.css +0 -70
- package/src/components/popup/popup/style/popup.pc.css +0 -26
- package/src/components/popup/popup/types.ts +0 -131
- package/src/components/popup/popup/widgetInput.vue +0 -43
- package/src/components/popup/popup.ts +0 -17
- package/src/components/popup/prompt/prompt.stories.ts +0 -76
- package/src/components/popup/prompt/prompt.vue +0 -87
- package/src/components/popup/prompt/stories/overview.vue +0 -50
- package/src/components/popup/prompt/types.ts +0 -26
- package/src/components/project/project.ts +0 -23
- package/src/components/project/selectorCompetitors/composables.ts +0 -20
- package/src/components/project/selectorCompetitors/selectorCompetitors.stories.ts +0 -32
- package/src/components/project/selectorCompetitors/selectorCompetitors.vue +0 -75
- package/src/components/project/selectorCompetitors/stories/README.md +0 -20
- package/src/components/project/selectorCompetitors/stories/items.ts +0 -30
- package/src/components/project/selectorCompetitors/types.ts +0 -35
- package/src/components/project/selectorRegion/composables/compare.ts +0 -87
- package/src/components/project/selectorRegion/composables/selectRegion.ts +0 -146
- package/src/components/project/selectorRegion/composables/selectSearcher.ts +0 -64
- package/src/components/project/selectorRegion/composables/selectorRegion.ts +0 -167
- package/src/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue +0 -252
- package/src/components/project/selectorRegion/dialog_selectorRegions/style.css +0 -49
- package/src/components/project/selectorRegion/dialog_selectorRegions/types.ts +0 -31
- package/src/components/project/selectorRegion/selectorRegion.stories.ts +0 -84
- package/src/components/project/selectorRegion/selectorRegion.vue +0 -365
- package/src/components/project/selectorRegion/stories/README.md +0 -36
- package/src/components/project/selectorRegion/stories/searchers.ts +0 -77
- package/src/components/project/selectorRegion/styles/searcherColors.css +0 -41
- package/src/components/project/selectorRegion/types.ts +0 -206
- package/src/components/project/selectorRegion/utils/consts.ts +0 -88
- package/src/components/project/selectorRegion/utils/utils.ts +0 -178
- package/src/components/project/tagSelector/popupListItem/tagPopupListItem.vue +0 -209
- package/src/components/project/tagSelector/popupListItem/types.ts +0 -40
- package/src/components/project/tagSelector/popupOpener/popupOpener.vue +0 -140
- package/src/components/project/tagSelector/popupOpener/types.ts +0 -74
- package/src/components/project/tagSelector/stories/README.md +0 -62
- package/src/components/project/tagSelector/stories/overview.vue +0 -152
- package/src/components/project/tagSelector/tagIcon/tagIcon.vue +0 -96
- package/src/components/project/tagSelector/tagIcon/types.ts +0 -25
- package/src/components/project/tagSelector/tagSelector.stories.ts +0 -50
- package/src/components/project/tagSelector/tagSelector.vue +0 -360
- package/src/components/project/tagSelector/tagsDefaults.ts +0 -54
- package/src/components/project/tagSelector/types.ts +0 -162
- package/src/components/project/tagSelector/utils/el.ts +0 -151
- package/src/components/project/tagSelector/utils/utils.ts +0 -30
- package/src/components/tabs/tabs/content.vue +0 -24
- package/src/components/tabs/tabs/stories/README.md +0 -12
- package/src/components/tabs/tabs/tab.vue +0 -49
- package/src/components/tabs/tabs/tabs.stories.ts +0 -170
- package/src/components/tabs/tabs/tabs.vue +0 -64
- package/src/components/tabs/tabs/types.ts +0 -22
- package/src/components/tabs/tabs.ts +0 -9
- package/src/components/tabsView/tabsView/menu.vue +0 -291
- package/src/components/tabsView/tabsView/menuDelimeter.vue +0 -26
- package/src/components/tabsView/tabsView/menuItem.vue +0 -125
- package/src/components/tabsView/tabsView/menuTitle.vue +0 -46
- package/src/components/tabsView/tabsView/store.ts +0 -60
- package/src/components/tabsView/tabsView/stories/README.md +0 -22
- package/src/components/tabsView/tabsView/tabsView.stories.ts +0 -169
- package/src/components/tabsView/tabsView/tabsView.vue +0 -120
- package/src/components/tabsView/tabsView/types.ts +0 -118
- package/src/components/tabsView/tabsView/utils.ts +0 -27
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.ts +0 -46
- package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.ts +0 -42
- package/src/components/tabsView/tabsView.ts +0 -9
- package/src/components/types.ts +0 -6
- package/src/core/app.ts +0 -22
- package/src/core/core/core.mdx +0 -36
- package/src/core/core/core.ts +0 -287
- package/src/core/core/events/resize.ts +0 -47
- package/src/core/core/events.ts +0 -6
- package/src/core/core/jQuery.mdx +0 -41
- package/src/core/core/options.ts +0 -52
- package/src/core/core/preloaders.ts +0 -31
- package/src/core/core/state.ts +0 -61
- package/src/core/directives/data.mdx +0 -24
- package/src/core/directives/data.ts +0 -25
- package/src/core/directives/focus.mdx +0 -28
- package/src/core/directives/focus.ts +0 -73
- package/src/core/directives/preloader.ts +0 -23
- package/src/core/directives/scrollIntoView.mdx +0 -41
- package/src/core/directives/scrollIntoView.ts +0 -123
- package/src/core/directives/scrollShadow.mdx +0 -23
- package/src/core/directives/scrollShadow.ts +0 -27
- package/src/core/directives/sticky.mdx +0 -29
- package/src/core/directives/sticky.ts +0 -32
- package/src/core/directives/swimUp.mdx +0 -27
- package/src/core/directives/swimUp.ts +0 -95
- package/src/core/directives/tooltip.mdx +0 -13
- package/src/core/directives/tooltip.ts +0 -57
- package/src/core/icons/gallery.vue +0 -70
- package/src/core/icons/icons.mdx +0 -24
- package/src/core/icons/icons.stories.ts +0 -14
- package/src/core/plugins/core.ts +0 -131
- package/src/core/plugins/i18n.ts +0 -189
- package/src/core/plugins/piniaTPA.ts +0 -432
- package/src/core/plugins/plugins.mdx +0 -82
- package/src/core/styles/CSS Variables.stories.ts +0 -17
- package/src/core/styles/styles.mdx +0 -26
- package/src/core/theme/Variables.stories.ts +0 -16
- package/src/core/theme/theme.mdx +0 -117
- package/src/core/utils/References/Docs.mdx +0 -23
- package/src/core/utils/References/check/Docs.mdx +0 -13
- package/src/core/utils/References/check/functions/getDomainRegexp.mdx +0 -13
- package/src/core/utils/References/check/functions/isDomain.mdx +0 -19
- package/src/core/utils/References/check/functions/isEmail.mdx +0 -20
- package/src/core/utils/References/check/functions/isIp.mdx +0 -19
- package/src/core/utils/References/check/functions/validUrl.mdx +0 -20
- package/src/core/utils/References/clipboard/Docs.mdx +0 -8
- package/src/core/utils/References/clipboard/functions/guestLinkToClipboard.mdx +0 -19
- package/src/core/utils/References/clipboard/functions/setClipboard.mdx +0 -20
- package/src/core/utils/References/date/Docs.mdx +0 -15
- package/src/core/utils/References/date/functions/dateFormat.mdx +0 -26
- package/src/core/utils/References/date/functions/dateToString.mdx +0 -24
- package/src/core/utils/References/date/functions/dateUnformat.mdx +0 -20
- package/src/core/utils/References/date/functions/genDate.mdx +0 -24
- package/src/core/utils/References/date/functions/genDateMoscow.mdx +0 -20
- package/src/core/utils/References/date/functions/getDayOfWeek.mdx +0 -24
- package/src/core/utils/References/date/functions/stringToDate.mdx +0 -19
- package/src/core/utils/References/device/Docs.mdx +0 -19
- package/src/core/utils/References/device/functions/get$scroll.mdx +0 -13
- package/src/core/utils/References/device/functions/getCommandKeyLabel.mdx +0 -13
- package/src/core/utils/References/device/functions/getElsScroll.mdx +0 -13
- package/src/core/utils/References/device/functions/getOS.mdx +0 -15
- package/src/core/utils/References/device/functions/getOSAsync.mdx +0 -13
- package/src/core/utils/References/device/functions/getScrollTop.mdx +0 -13
- package/src/core/utils/References/device/functions/isApp.mdx +0 -13
- package/src/core/utils/References/device/functions/isMacOS.mdx +0 -13
- package/src/core/utils/References/device/functions/isMobile.mdx +0 -13
- package/src/core/utils/References/device/functions/isRetina.mdx +0 -13
- package/src/core/utils/References/device/functions/isSafari.mdx +0 -13
- package/src/core/utils/References/dom/Docs.mdx +0 -25
- package/src/core/utils/References/dom/functions/css.mdx +0 -22
- package/src/core/utils/References/dom/functions/genEl.mdx +0 -26
- package/src/core/utils/References/dom/functions/isVisible.mdx +0 -21
- package/src/core/utils/References/dom/functions/offset.mdx +0 -33
- package/src/core/utils/References/dom/functions/querySelectorAllArray.mdx +0 -20
- package/src/core/utils/References/dom/functions/querySelectorAllVisible.mdx +0 -20
- package/src/core/utils/References/dom/functions/querySelectorVisible.mdx +0 -23
- package/src/core/utils/References/dom/functions/querySelectorVisibleLast.mdx +0 -23
- package/src/core/utils/References/dom/functions/storage.mdx +0 -26
- package/src/core/utils/References/dom/functions/storageClear.mdx +0 -19
- package/src/core/utils/References/dom/functions/wrap.mdx +0 -20
- package/src/core/utils/References/dom/variables/default.mdx +0 -245
- package/src/core/utils/References/image/Docs.mdx +0 -10
- package/src/core/utils/References/image/functions/downloadImageFromString.mdx +0 -20
- package/src/core/utils/References/image/functions/genFaviconImgHtml.mdx +0 -20
- package/src/core/utils/References/keyboard/Docs.mdx +0 -9
- package/src/core/utils/References/keyboard/functions/invertKeyboardLayout.mdx +0 -19
- package/src/core/utils/References/lodash/Docs.mdx +0 -18
- package/src/core/utils/References/lodash/functions/cloneDeep.mdx +0 -27
- package/src/core/utils/References/lodash/functions/debounce.mdx +0 -72
- package/src/core/utils/References/lodash/functions/merge.mdx +0 -190
- package/src/core/utils/References/lodash/functions/throttle.mdx +0 -69
- package/src/core/utils/References/lodash/variables/memoize.mdx +0 -42
- package/src/core/utils/References/number/Docs.mdx +0 -10
- package/src/core/utils/References/number/functions/percentOfNumber.mdx +0 -24
- package/src/core/utils/References/number/functions/randomBySeed.mdx +0 -21
- package/src/core/utils/References/price/Docs.mdx +0 -9
- package/src/core/utils/References/price/functions/genPrice.mdx +0 -26
- package/src/core/utils/References/route/Docs.mdx +0 -14
- package/src/core/utils/References/route/functions/delHash.mdx +0 -24
- package/src/core/utils/References/route/functions/genHash.mdx +0 -24
- package/src/core/utils/References/route/functions/getHash.mdx +0 -20
- package/src/core/utils/References/route/functions/historySetState.mdx +0 -29
- package/src/core/utils/References/route/functions/setHash.mdx +0 -24
- package/src/core/utils/References/route/functions/setHashs.mdx +0 -20
- package/src/core/utils/References/scroll/Docs.mdx +0 -13
- package/src/core/utils/References/scroll/functions/amountScrolled.mdx +0 -15
- package/src/core/utils/References/scroll/functions/connectScrollShadow.mdx +0 -26
- package/src/core/utils/References/scroll/functions/genHasScroll.mdx +0 -23
- package/src/core/utils/References/scroll/functions/getScrollPercent.mdx +0 -19
- package/src/core/utils/References/scroll/functions/unconnectScrollShadow.mdx +0 -17
- package/src/core/utils/References/searchers/Docs.mdx +0 -17
- package/src/core/utils/References/searchers/functions/genVolumeLabel.mdx +0 -24
- package/src/core/utils/References/searchers/functions/getDeviceGIcon.mdx +0 -19
- package/src/core/utils/References/searchers/functions/getLangLabel.mdx +0 -20
- package/src/core/utils/References/searchers/functions/getSearcherGIcon.mdx +0 -19
- package/src/core/utils/References/searchers/functions/prepareVolumeType.mdx +0 -20
- package/src/core/utils/References/searchers/variables/searchersNames.mdx +0 -83
- package/src/core/utils/References/store/Docs.mdx +0 -22
- package/src/core/utils/References/store/functions/defineStore.mdx +0 -34
- package/src/core/utils/References/store/functions/useStore.mdx +0 -27
- package/src/core/utils/References/store/interfaces/Store.mdx +0 -29
- package/src/core/utils/References/store/variables/plugin.mdx +0 -64
- package/src/core/utils/References/string/Docs.mdx +0 -24
- package/src/core/utils/References/string/functions/addCommasWhite.mdx +0 -19
- package/src/core/utils/References/string/functions/addLinkTags.mdx +0 -21
- package/src/core/utils/References/string/functions/camelToSnakeCase.mdx +0 -19
- package/src/core/utils/References/string/functions/ellipsis.mdx +0 -24
- package/src/core/utils/References/string/functions/genFlagLinkByCountryCode.mdx +0 -23
- package/src/core/utils/References/string/functions/genIntHash.mdx +0 -19
- package/src/core/utils/References/string/functions/getRandomHash.mdx +0 -19
- package/src/core/utils/References/string/functions/highlightHtml.mdx +0 -23
- package/src/core/utils/References/string/functions/htmlspecialchars.mdx +0 -19
- package/src/core/utils/References/string/functions/isUrl.mdx +0 -19
- package/src/core/utils/References/string/functions/nl2br.mdx +0 -19
- package/src/core/utils/References/string/functions/numberEnding.mdx +0 -26
- package/src/core/utils/References/string/functions/numberWithWord.mdx +0 -26
- package/src/core/utils/References/string/functions/rusToLatin.mdx +0 -19
- package/src/core/utils/References/string/functions/toCapitalize.mdx +0 -19
- package/src/core/utils/References/string/functions/toRoditPadej.mdx +0 -19
- package/src/core/utils/References/system/Docs.mdx +0 -11
- package/src/core/utils/References/system/functions/sleep.mdx +0 -19
- package/src/core/utils/References/system/functions/sleepWhile.mdx +0 -27
- package/src/core/utils/References/system/functions/waitWhile.mdx +0 -27
- package/src/core/utils/References/url/Docs.mdx +0 -15
- package/src/core/utils/References/url/functions/decode.mdx +0 -19
- package/src/core/utils/References/url/functions/encode.mdx +0 -19
- package/src/core/utils/References/url/functions/fromPuny.mdx +0 -21
- package/src/core/utils/References/url/functions/getHost.mdx +0 -19
- package/src/core/utils/References/url/functions/hostToLowerCase.mdx +0 -19
- package/src/core/utils/References/url/functions/normalize.mdx +0 -19
- package/src/core/utils/References/url/functions/toPuny.mdx +0 -21
- package/src/core/utils/check.ts +0 -88
- package/src/core/utils/clipboard.ts +0 -51
- package/src/core/utils/date.ts +0 -334
- package/src/core/utils/device.ts +0 -139
- package/src/core/utils/dom.ts +0 -195
- package/src/core/utils/image.ts +0 -46
- package/src/core/utils/keyboard.ts +0 -29
- package/src/core/utils/lodash.ts +0 -18
- package/src/core/utils/number.ts +0 -37
- package/src/core/utils/price.ts +0 -24
- package/src/core/utils/route.ts +0 -130
- package/src/core/utils/scroll.ts +0 -120
- package/src/core/utils/searchers.ts +0 -191
- package/src/core/utils/store/localStorage.ts +0 -56
- package/src/core/utils/store/plugin.ts +0 -50
- package/src/core/utils/store/store.ts +0 -77
- package/src/core/utils/store.ts +0 -7
- package/src/core/utils/string.ts +0 -349
- package/src/core/utils/system.ts +0 -72
- package/src/core/utils/url.ts +0 -138
- package/src/core/utils/utils.mdx +0 -6
- package/src/d.ts +0 -12
- package/src/icomoon.d.ts +0 -98
- package/src/resources/styles/core/components/bage.css +0 -16
- package/src/resources/styles/core/components/components.css +0 -94
- package/src/resources/styles/core/components/formsCaption.css +0 -43
- package/src/resources/styles/core/components/jquery.css +0 -19
- package/src/resources/styles/core/core.ts +0 -14
- package/src/resources/styles/core/forms/clear.css +0 -20
- package/src/resources/styles/core/forms/controls.css +0 -20
- package/src/resources/styles/core/forms/focusable.css +0 -27
- package/src/resources/styles/core/forms/forms.css +0 -178
- package/src/resources/styles/core/icon.css +0 -58
- package/src/resources/styles/core/jquery.css +0 -1
- package/src/resources/styles/core/layout.css +0 -59
- package/src/resources/styles/core/modifiers/as.css +0 -33
- package/src/resources/styles/core/modifiers/ellipsis.css +0 -26
- package/src/resources/styles/core/modifiers/modifiers.css +0 -120
- package/src/resources/styles/core/modifiers/only.css +0 -23
- package/src/resources/styles/core/modifiers/scrollBar.css +0 -52
- package/src/resources/styles/core/modifiers/scrollShadow.css +0 -50
- package/src/resources/styles/storybook.css +0 -11
- package/src/resources/styles/themes/dark/dark-layout.css +0 -47
- package/src/resources/styles/themes/dark/dark-positions.css +0 -66
- package/src/resources/styles/themes/dark/dark.css +0 -405
- package/src/resources/styles/themes/dark-positions.ts +0 -1
- package/src/resources/styles/themes/dark-th/dark-th-layout.css +0 -47
- package/src/resources/styles/themes/dark-th/dark-th-positions.css +0 -67
- package/src/resources/styles/themes/dark-th/dark-th.css +0 -405
- package/src/resources/styles/themes/dark-th-positions.ts +0 -1
- package/src/resources/styles/themes/dark-th.ts +0 -3
- package/src/resources/styles/themes/dark.ts +0 -3
- package/src/resources/styles/themes/light/light-layout.css +0 -47
- package/src/resources/styles/themes/light/light-positions.css +0 -66
- package/src/resources/styles/themes/light/light.css +0 -405
- package/src/resources/styles/themes/light-positions.ts +0 -1
- package/src/resources/styles/themes/light.ts +0 -3
- package/src/storybook/components/color.vue +0 -47
- package/src/storybook/components/cssVariables.vue +0 -195
- package/src/storybook/components/icomoon.ts +0 -40
- package/src/storybook/jquery.ts +0 -4
- 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" +0 -181
- package/src//320/223/320/260/320/271/320/264/320/273/320/260/320/271/320/275.mdx +0 -120
- 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" +0 -14
- 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" +0 -43
- 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" +0 -155
- 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" +0 -35
- 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" +0 -15
- 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" +0 -56
- 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" +0 -53
- 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" +0 -55
- 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" +0 -4
- 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" +0 -4
- 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" +0 -4
- 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" +0 -15
- package/src//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 (Contributing)//320/230/321/201/320/277/320/276/320/273/321/214/320/267/320/276/320/262/320/260/320/275/320/270/320/265 /320/262 /320/277/321/200/320/276/320/265/320/272/321/202/320/260/321/205.mdx" +0 -3
- 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" +0 -45
- 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" +0 -33
- 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" +0 -29
- 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" +0 -66
- 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" +0 -58
- 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" +0 -11
- 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" +0 -5
- package/storybook-dev.sh +0 -14
- package/tsconfig.json +0 -91
- package/typedoc.json +0 -20
- package/vite.config.ts +0 -150
- /package/{src/components/core/notice/types.ts → components/core/notice/types.d.ts} +0 -0
- /package/{src/components/forms/helpers.ts → components/forms/helpers.d.ts} +0 -0
- /package/{src/components/popup/worker.ts → components/popup/worker.d.ts} +0 -0
- /package/{public/icomoon → icomoon}/Read Me.txt +0 -0
- /package/{public/icomoon → icomoon}/demo-files/demo.css +0 -0
- /package/{public/icomoon → icomoon}/demo-files/demo.js +0 -0
- /package/{public/icomoon → icomoon}/demo.css +0 -0
- /package/{public/icomoon → icomoon}/demo.html +0 -0
- /package/{public/icomoon → icomoon}/demo.js +0 -0
- /package/{public/icomoon → icomoon}/fonts/Topvisor-2.eot +0 -0
- /package/{public/icomoon → icomoon}/fonts/Topvisor-2.svg +0 -0
- /package/{public/icomoon → icomoon}/fonts/Topvisor-2.ttf +0 -0
- /package/{public/icomoon → icomoon}/fonts/Topvisor-2.woff +0 -0
- /package/{public/icomoon → icomoon}/selection.json +0 -0
- /package/{public/icomoon → icomoon}/style.css +0 -0
- /package/{public/jquery-ui.min.css → jquery-ui.min.css} +0 -0
- /package/{public/require → require}/css.amd.js +0 -0
package/popup/popup.js
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { Core as M } from "../core/app.js";
|
|
2
|
+
import { _ as B, a as w, b as H } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-CXp02bYr.es.js";
|
|
3
|
+
import { defineComponent as T, mergeModels as N, useModel as A, createBlock as b, openBlock as S, mergeProps as V, createSlots as D, withCtx as t, renderSlot as p, createVNode as $, createTextVNode as c, toDisplayString as y, unref as C, ref as O, watch as U } from "vue";
|
|
4
|
+
import { f as z, _ as v } from "../.chunks/forms-DC7ffuv2.es.js";
|
|
5
|
+
const W = ["../assets/popup.css"].map((a) => import.meta.resolve(a));
|
|
6
|
+
M.insertCSSLinkToPage(W, !0);
|
|
7
|
+
const I = /* @__PURE__ */ T({
|
|
8
|
+
__name: "widgetInput",
|
|
9
|
+
props: /* @__PURE__ */ N({
|
|
10
|
+
modelValue: {},
|
|
11
|
+
name: {},
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
readonly: { type: Boolean },
|
|
14
|
+
modificator: {},
|
|
15
|
+
size: {},
|
|
16
|
+
styling: {},
|
|
17
|
+
isError: { type: Boolean },
|
|
18
|
+
isLoading: { type: Boolean },
|
|
19
|
+
icon: {},
|
|
20
|
+
icon2: {},
|
|
21
|
+
addCleaner: { type: Boolean, default: !0 },
|
|
22
|
+
title: {},
|
|
23
|
+
captionType: {}
|
|
24
|
+
}, {
|
|
25
|
+
modelValue: {
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
modelModifiers: {}
|
|
29
|
+
}),
|
|
30
|
+
emits: ["update:modelValue"],
|
|
31
|
+
setup(a) {
|
|
32
|
+
const u = A(a, "modelValue");
|
|
33
|
+
return (i, r) => (S(), b(z, V(i.$props, {
|
|
34
|
+
modificator: "popupWidgetInput",
|
|
35
|
+
modelValue: u.value,
|
|
36
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => u.value = o)
|
|
37
|
+
}), null, 16, ["modelValue"]));
|
|
38
|
+
}
|
|
39
|
+
}), E = /* @__PURE__ */ T({
|
|
40
|
+
__name: "alert",
|
|
41
|
+
props: {
|
|
42
|
+
submitText: {},
|
|
43
|
+
id: {},
|
|
44
|
+
class: {},
|
|
45
|
+
transitionDuration: {},
|
|
46
|
+
footerSupportLink: {},
|
|
47
|
+
pos: {},
|
|
48
|
+
notch: { type: Boolean },
|
|
49
|
+
openByHover: { type: Boolean },
|
|
50
|
+
posBy: {},
|
|
51
|
+
data: {}
|
|
52
|
+
},
|
|
53
|
+
emits: ["open", "close", "scrollContentList"],
|
|
54
|
+
setup(a) {
|
|
55
|
+
const u = a, {
|
|
56
|
+
submitText: i,
|
|
57
|
+
...r
|
|
58
|
+
} = u;
|
|
59
|
+
return (o, s) => (S(), b(B, V({ class: "top-popupAlert" }, r, {
|
|
60
|
+
onOpen: s[0] || (s[0] = (l) => o.$emit("open", l)),
|
|
61
|
+
onClose: s[1] || (s[1] = (l) => o.$emit("close", l)),
|
|
62
|
+
onScrollContentList: s[2] || (s[2] = (...l) => o.$emit("scrollContentList", ...l))
|
|
63
|
+
}), D({
|
|
64
|
+
opener: t(() => [
|
|
65
|
+
p(o.$slots, "opener")
|
|
66
|
+
]),
|
|
67
|
+
footer: t(() => [
|
|
68
|
+
p(o.$slots, "footer"),
|
|
69
|
+
$(v, null, {
|
|
70
|
+
default: t(() => [
|
|
71
|
+
c(y(C(i) || o.$i18n.Common.Close), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
]),
|
|
76
|
+
_: 2
|
|
77
|
+
}, [
|
|
78
|
+
o.$slots.header ? {
|
|
79
|
+
name: "header",
|
|
80
|
+
fn: t(() => [
|
|
81
|
+
p(o.$slots, "header")
|
|
82
|
+
]),
|
|
83
|
+
key: "0"
|
|
84
|
+
} : void 0,
|
|
85
|
+
o.$slots.default ? {
|
|
86
|
+
name: "content",
|
|
87
|
+
fn: t(() => [
|
|
88
|
+
p(o.$slots, "default")
|
|
89
|
+
]),
|
|
90
|
+
key: "1"
|
|
91
|
+
} : void 0
|
|
92
|
+
]), 1040));
|
|
93
|
+
}
|
|
94
|
+
}), K = /* @__PURE__ */ T({
|
|
95
|
+
__name: "confirm",
|
|
96
|
+
props: {
|
|
97
|
+
cancelText: {},
|
|
98
|
+
submitText: {},
|
|
99
|
+
isWarning: { type: Boolean },
|
|
100
|
+
id: {},
|
|
101
|
+
class: {},
|
|
102
|
+
transitionDuration: {},
|
|
103
|
+
footerSupportLink: {},
|
|
104
|
+
pos: {},
|
|
105
|
+
notch: { type: Boolean },
|
|
106
|
+
openByHover: { type: Boolean },
|
|
107
|
+
posBy: {},
|
|
108
|
+
data: {}
|
|
109
|
+
},
|
|
110
|
+
emits: ["open", "close", "scrollContentList", "submit"],
|
|
111
|
+
setup(a, { emit: u }) {
|
|
112
|
+
const i = a, r = u, o = O(!1), s = () => {
|
|
113
|
+
o.value = !0, r("submit");
|
|
114
|
+
}, l = (n) => {
|
|
115
|
+
if (o.value) {
|
|
116
|
+
o.value = !1;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
r("close", n);
|
|
120
|
+
}, {
|
|
121
|
+
submitText: L,
|
|
122
|
+
cancelText: k,
|
|
123
|
+
isWarning: P,
|
|
124
|
+
...g
|
|
125
|
+
} = i;
|
|
126
|
+
return (n, m) => (S(), b(B, V({ class: "top-popupConfirm" }, g, {
|
|
127
|
+
onOpen: m[0] || (m[0] = (e) => n.$emit("open", e)),
|
|
128
|
+
onClose: m[1] || (m[1] = (e) => l(e)),
|
|
129
|
+
onScrollContentList: m[2] || (m[2] = (...e) => n.$emit("scrollContentList", ...e))
|
|
130
|
+
}), D({
|
|
131
|
+
opener: t(() => [
|
|
132
|
+
p(n.$slots, "opener")
|
|
133
|
+
]),
|
|
134
|
+
footer: t(() => [
|
|
135
|
+
p(n.$slots, "footer"),
|
|
136
|
+
$(v, { color: "theme" }, {
|
|
137
|
+
default: t(() => [
|
|
138
|
+
c(y(C(k) || n.$i18n.Common.Cancel), 1)
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}),
|
|
142
|
+
$(v, {
|
|
143
|
+
onClick: s,
|
|
144
|
+
color: C(P) ? "red" : "blue"
|
|
145
|
+
}, {
|
|
146
|
+
default: t(() => [
|
|
147
|
+
c(y(C(L) || n.$i18n.Common.Continue), 1)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["color"])
|
|
151
|
+
]),
|
|
152
|
+
_: 2
|
|
153
|
+
}, [
|
|
154
|
+
n.$slots.header ? {
|
|
155
|
+
name: "header",
|
|
156
|
+
fn: t(() => [
|
|
157
|
+
p(n.$slots, "header")
|
|
158
|
+
]),
|
|
159
|
+
key: "0"
|
|
160
|
+
} : void 0,
|
|
161
|
+
n.$slots.default ? {
|
|
162
|
+
name: "content",
|
|
163
|
+
fn: t(() => [
|
|
164
|
+
p(n.$slots, "default")
|
|
165
|
+
]),
|
|
166
|
+
key: "1"
|
|
167
|
+
} : void 0
|
|
168
|
+
]), 1040));
|
|
169
|
+
}
|
|
170
|
+
}), j = /* @__PURE__ */ T({
|
|
171
|
+
__name: "prompt",
|
|
172
|
+
props: {
|
|
173
|
+
submitText: {},
|
|
174
|
+
cancelText: {},
|
|
175
|
+
defaultValue: {},
|
|
176
|
+
id: {},
|
|
177
|
+
class: {},
|
|
178
|
+
transitionDuration: {},
|
|
179
|
+
footerSupportLink: {},
|
|
180
|
+
pos: {},
|
|
181
|
+
notch: { type: Boolean },
|
|
182
|
+
openByHover: { type: Boolean },
|
|
183
|
+
posBy: {},
|
|
184
|
+
data: {}
|
|
185
|
+
},
|
|
186
|
+
emits: ["open", "close", "scrollContentList", "submit"],
|
|
187
|
+
setup(a, { emit: u }) {
|
|
188
|
+
const i = a, r = u, o = () => l.value = i.defaultValue ?? "", s = O(!1), l = O();
|
|
189
|
+
U(() => i.defaultValue, () => o(), { immediate: !0 });
|
|
190
|
+
const L = () => {
|
|
191
|
+
s.value = !0;
|
|
192
|
+
}, k = (e) => {
|
|
193
|
+
if (s.value) {
|
|
194
|
+
s.value = !1, r("submit", l.value), o();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
o(), r("close", e);
|
|
198
|
+
}, {
|
|
199
|
+
submitText: P,
|
|
200
|
+
cancelText: g,
|
|
201
|
+
defaultValue: n,
|
|
202
|
+
...m
|
|
203
|
+
} = i;
|
|
204
|
+
return (e, d) => (S(), b(B, V({ class: "top-popupPrompt" }, m, {
|
|
205
|
+
onOpen: d[1] || (d[1] = (f) => e.$emit("open", f)),
|
|
206
|
+
onClose: d[2] || (d[2] = (f) => k(f)),
|
|
207
|
+
onScrollContentList: d[3] || (d[3] = (...f) => e.$emit("scrollContentList", ...f))
|
|
208
|
+
}), D({
|
|
209
|
+
opener: t(() => [
|
|
210
|
+
p(e.$slots, "opener")
|
|
211
|
+
]),
|
|
212
|
+
footer: t(() => [
|
|
213
|
+
p(e.$slots, "footer"),
|
|
214
|
+
$(v, { color: "theme" }, {
|
|
215
|
+
default: t(() => [
|
|
216
|
+
c(y(C(g) || e.$i18n.Common.Cancel), 1)
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}),
|
|
220
|
+
$(v, { onClick: L }, {
|
|
221
|
+
default: t(() => [
|
|
222
|
+
c(y(C(P) || e.$i18n.Common.OK), 1)
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
})
|
|
226
|
+
]),
|
|
227
|
+
_: 2
|
|
228
|
+
}, [
|
|
229
|
+
e.$slots.header ? {
|
|
230
|
+
name: "header",
|
|
231
|
+
fn: t(() => [
|
|
232
|
+
p(e.$slots, "header")
|
|
233
|
+
]),
|
|
234
|
+
key: "0"
|
|
235
|
+
} : void 0,
|
|
236
|
+
e.$slots.default ? {
|
|
237
|
+
name: "content",
|
|
238
|
+
fn: t(() => [
|
|
239
|
+
p(e.$slots, "default"),
|
|
240
|
+
$(I, {
|
|
241
|
+
modelValue: l.value,
|
|
242
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => l.value = f),
|
|
243
|
+
modelModifiers: { trim: !0 }
|
|
244
|
+
}, null, 8, ["modelValue"])
|
|
245
|
+
]),
|
|
246
|
+
key: "1"
|
|
247
|
+
} : void 0
|
|
248
|
+
]), 1040));
|
|
249
|
+
}
|
|
250
|
+
}), Q = B, R = H, X = w, Y = I, Z = E, h = K, _ = j;
|
|
251
|
+
export {
|
|
252
|
+
Q as TopPopup,
|
|
253
|
+
Z as TopPopupAlert,
|
|
254
|
+
h as TopPopupConfirm,
|
|
255
|
+
X as TopPopupListItem,
|
|
256
|
+
R as TopPopupOpener,
|
|
257
|
+
_ as TopPopupPrompt,
|
|
258
|
+
Y as TopPopupWidgetInput
|
|
259
|
+
};
|
|
260
|
+
//# sourceMappingURL=popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup.js","sources":["../../src/components/popup/popup/widgetInput.vue","../../src/components/popup/alert/alert.vue","../../src/components/popup/confirm/confirm.vue","../../src/components/popup/prompt/prompt.vue","../../src/components/popup/popup.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ModelRef } from 'vue';\nimport type { Props } from '@/components/forms/input/types';\nimport TopInput from '@/components/forms/input/input.vue';\n\nwithDefaults(defineProps<Props>(), {\n\taddCleaner: true,\n});\n\nconst model: ModelRef<string> = defineModel({\n\tdefault: '',\n});\n</script>\n\n<template>\n\t<TopInput\n\t\t:=\"$props\"\n\t\tmodificator=\"popupWidgetInput\"\n\t\tv-model=\"model\"\n\t/>\n</template>\n\n<style>\n.top-input-popupWidgetInput {\n\t--top-loadbar-color: var(--color-line-2);\n\n\twidth: 100%;\n}\n\n.top-input_input-popupWidgetInput {\n\tborder: none;\n\tbackground: var(--color-layer-1);\n}\n\n.top-input_input-popupWidgetInput:hover {\n\tbackground: var(--color-layer-2);\n}\n\n.top-input_input-popupWidgetInput:focus {\n\tbackground: var(--color-layer-1);\n\toutline: unset;\n}\n</style>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\ndefineEmits<Emits<T>>();\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupAlert\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия Popup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton>\n\t\t\t\t{{ submitText || $i18n.Common.Close }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst isSubmit = ref(false);\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n\n\temit('submit');\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\treturn;\n\t}\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tisWarning,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupConfirm\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton\n\t\t\t\t@click=\"onSubmit\"\n\t\t\t\t:color=\"isWarning ? 'red' : 'blue'\"\n\t\t\t>\n\t\t\t\t{{ submitText || $i18n.Common.Continue }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref, watch } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\nimport TopPopupWidgetInput from '@/components/popup/popup/widgetInput.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst reset = () => localValue.value = props.defaultValue ?? '';\n\nconst isSubmit = ref(false);\n\nconst localValue = ref();\nwatch(() => props.defaultValue, () => reset(), { immediate: true });\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\temit('submit', localValue.value);\n\n\t\treset();\n\n\t\treturn;\n\t}\n\n\treset();\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tdefaultValue,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupPrompt\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\n\t\t\t<TopPopupWidgetInput v-model.trim=\"localValue\"/>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t{{ submitText || $i18n.Common.OK }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","import type { ComponentCustomProps } from 'vue';\n\nimport Popup from './popup/popup.vue';\nimport PopupOpener from './popup/opener.vue';\nimport PopupListItem from './popup/listItem.vue';\nimport PopupWidgetInput from './popup/widgetInput.vue';\nimport PopupAlert from './alert/alert.vue';\nimport PopupConfirm from './confirm/confirm.vue';\nimport PopupPrompt from './prompt/prompt.vue';\n\nexport const TopPopup = Popup as typeof Popup & ComponentCustomProps;\nexport const TopPopupOpener = PopupOpener as typeof PopupOpener & ComponentCustomProps;\nexport const TopPopupListItem = PopupListItem as typeof PopupListItem & ComponentCustomProps;\nexport const TopPopupWidgetInput = PopupWidgetInput as typeof PopupWidgetInput & ComponentCustomProps;\nexport const TopPopupAlert = PopupAlert as typeof PopupAlert & ComponentCustomProps;\nexport const TopPopupConfirm = PopupConfirm as typeof PopupConfirm & ComponentCustomProps;\nexport const TopPopupPrompt = PopupPrompt as typeof PopupPrompt & ComponentCustomProps;\n"],"names":["model","useModel","__props","_cache","$event","props","submitText","propsPopup","openBlock","createBlock","_sfc_main$5","mergeProps","_ctx","args","createSlots","renderSlot","createVNode","_sfc_main$6","withCtx","createTextVNode","toDisplayString","unref","emit","__emit","isSubmit","ref","onSubmit","onClose","popupEvent","cancelText","isWarning","reset","localValue","watch","defaultValue","_sfc_main$3","TopPopup","TopPopupOpener","_sfc_main$8","TopPopupListItem","_sfc_main$7","TopPopupWidgetInput","TopPopupAlert","_sfc_main$2","TopPopupConfirm","_sfc_main$1","TopPopupPrompt","_sfc_main"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","../.chunks/forms-L6BGV_om.amd","../utils/dom.amd"],function(require,exports,forms,utils_dom){"use strict";if(typeof vue>"u")var vue=window.Vue;class Worker{static noClose=!1;static vueConnectors=new Map;static options={};static getPopup(t){return utils_dom.default.storage(t,"TopPopup")}static getElPopupOpener(t){return t.closest("[data-top-popup]")}static getPopupFromOpener(t){const o=Worker.getElPopupOpener(t);return o?utils_dom.default.storage(o,"#TopPopup"):null}static getAll(){return utils_dom.default.querySelectorAllArray(document,".top-popup-wrapper")}static getAllVisible(){return utils_dom.default.querySelectorAllVisible(document,".top-popup-wrapper")}static async openByOpener(t){if(!(t instanceof HTMLElement))return;const o={};return o.popup=t.dataset.topPopup,o.id=t.dataset.topPopupId,t.dataset.topPopupP&&(o.p=parseInt(t.dataset.topPopupP)),t.dataset.topPopupPos&&(o.p=parseInt(t.dataset.topPopupPos)),t.dataset.topPopupNotch&&(o.notch=t.dataset.topPopupNotch==="true"||t.dataset.topPopupNotch==="1"),t.dataset.topPopupClass&&(o.class=t.dataset.topPopupClass),t.dataset.topPopupPosBy&&(o.posBy=t.dataset.topPopupPosBy),t.dataset.topPopupFront&&(o.frontSelector=t.dataset.topPopupFront),t.dataset.topPopupInvertX&&(o.invertX=t.dataset.topPopupInvertX==="true"||t.dataset.topPopupInvertX==="1"),t.dataset.topPopupOpenByHover&&(o.openByHover=t.dataset.topPopupOpenByHover==="true"||t.dataset.topPopupOpenByHover==="1"),t.dataset.topPopupUseOriginal&&(o.useOriginal=t.dataset.topPopupUseOriginal==="true"||t.dataset.topPopupUseOriginal==="1"),await Worker.open(t,o)}static async open(elOpener,options){elOpener instanceof HTMLElement&&(elOpener.dataset.topPopupOpened="opened");const{TopLibPopup}=await new Promise((t,o)=>require(["../.chunks/popup-Kvk7IPNI.amd"],t,o));if(forms.Core.$){const $elOpener=forms.Core.$(elOpener);if($elOpener.data("aftershow")){let afterShow=$elOpener.data("aftershow");typeof afterShow=="string"&&(afterShow=eval(afterShow.replace(/\W/g,""))),$elOpener.one("aftershow.top-menu-popup",afterShow)}if($elOpener.data("afterclose")){let afterclose=$elOpener.data("afterclose");typeof afterclose=="string"&&(afterclose=eval(afterclose.replace(/\W/g,""))),$elOpener.one("afterclose.top-menu-popup",afterclose)}}return options.isFullScreen=forms.Core.state.isMobile,new TopLibPopup(elOpener,options)}static close(t,o=!0){const e=Worker.getPopup(t);e&&(e.close(),o&&setTimeout(()=>{e.el.focus()}))}static recalcPosition(t){const o=Worker.getPopup(t);o&&o.elPopupBody instanceof HTMLElement&&o.recalcPosition()}static scrollToActive(t){if(!utils_dom.default.querySelectorVisible(t,"ul.top-popup_content > li > .top-active"))return;const e=t.querySelector("ul.top-popup_content"),s=utils_dom.default.querySelectorAllVisible(t,"ul.top-popup_content > li");t.classList.add("top-popup-wrapper-no_animate"),setTimeout(()=>t.classList.remove("top-popup-wrapper-no_animate"),100);let r=100;for(const p of s){if(p.querySelector(":scope > .top-active"))break;p instanceof HTMLElement&&(r+=p.offsetHeight)}if(e instanceof HTMLElement){const p=e.offsetHeight;r>p?e.scrollTop=r-p:e.scrollTop=0}}static decoratorBeforeOpen(t){this.options.decoratorBeforeOpen&&this.options.decoratorBeforeOpen(t)}static decoratorAfterOpen(t){this.options.decoratorAfterOpen&&this.options.decoratorAfterOpen(t)}static decoratorIsIgnoreOuterClick(t){return this.options.decoratorIsIgnoreOuterClick?this.options.decoratorIsIgnoreOuterClick(t):!1}static regVueComponent(t,o){if(Worker.vueConnectors.get(t))throw"Vue component Popup use duplicated id: "+t;Worker.vueConnectors.set(t,o)}static unregVueComponent(t){Worker.vueConnectors.delete(t)}static genElPopupOpener(t,o,...e){const s=utils_dom.default.genEl(t,{},...e);s.dataset.topPopup="#"+o.id;for(let r in o){const p="topPopup"+r.charAt(0).toUpperCase()+r.slice(1);s.dataset[p]=o[r]}return s.__TopPopupOpenerProps=o,s}}exports.TopPopupWorker=Worker,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
//# sourceMappingURL=worker.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.amd.js","sources":["../../src/components/popup/lib/worker.ts"],"sourcesContent":["/**\n * PopupWorker управляет работой Popup\n *\n * Должен грузить TopLibPopup только в отложенном режиме\n */\n\nimport Core from '@/core/core/core';\nimport DOM from '@/core/utils/dom';\nimport type { PopupOptions, TopLibPopup } from '@/components/popup/lib/popup';\nimport type { OpenerProps } from '@/components/popup/popup/types';\n\nexport type Options = {\n\t/**\n\t * Глобальное событие, которое будет вызвано перед открытием TopPopup\n\t */\n\tdecoratorBeforeOpen?: (popup: TopLibPopup) => void,\n\n\t/**\n\t * Глобальное событие, которое будет вызвано после открытия TopPopup\n\t */\n\tdecoratorAfterOpen?: (popup: TopLibPopup) => void;\n\n\t/**\n\t * Определитель того, что клик вне Popup нужно игнорировать\n\t * @returns {boolean} - если true, то click не приведет к закрытию Popup\n\t */\n\tdecoratorIsIgnoreOuterClick?: (e: MouseEvent) => boolean\n}\n\nclass Worker {\n\n\t/**\n\t * Глобальное выключение закрытия меню, используется при различных оверлеях\n\t */\n\tstatic noClose = false;\n\n\t/**\n\t * Для взаимодействия с vue\n\t */\n\tstatic vueConnectors = new Map();\n\n\tstatic options: Options = {};\n\n\t/**\n\t * Вернуть объект компонента popup, привязанный к элементу\n\t */\n\tstatic getPopup(elPopup: HTMLElement): TopLibPopup {\n\t\treturn DOM.storage(elPopup, 'TopPopup') as TopLibPopup;\n\t}\n\n\tstatic getElPopupOpener(el: Element): HTMLElement | null {\n\t\treturn el.closest<HTMLElement>('[data-top-popup]');\n\t}\n\n\tstatic getPopupFromOpener(el: HTMLElement): TopLibPopup | null {\n\t\tconst elOpener = Worker.getElPopupOpener(el);\n\t\tif (!elOpener) return null;\n\n\t\treturn DOM.storage(elOpener, '#TopPopup');\n\t}\n\n\t/**\n\t * Вернуть все элементы с Popup\n\t */\n\tstatic getAll(): HTMLElement[] {\n\t\treturn DOM.querySelectorAllArray(document, '.top-popup-wrapper');\n\t}\n\n\t/**\n\t * Вернуть все элементы с открытыми Popup\n\t */\n\tstatic getAllVisible(): HTMLElement[] {\n\t\treturn DOM.querySelectorAllVisible(document, '.top-popup-wrapper');\n\t}\n\n\t/**\n\t * Открыть Popup от указанного elOpener\n\t * @param {HTMLElement} elOpener - элемент, который должен вызвать открытие Popup\n\t */\n\tstatic async openByOpener(elOpener: HTMLElement): Promise<TopLibPopup | undefined> {\n\t\tif (!(elOpener instanceof HTMLElement)) return;\n\n\t\tconst options: PopupOptions = {};\n\n\t\toptions.popup = elOpener.dataset.topPopup;\n\n\t\toptions.id = elOpener.dataset.topPopupId;\n\n\t\t/**\n\t\t * @deprecated topPopupP - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupP) {\n\t\t\toptions.p = parseInt(elOpener.dataset.topPopupP);\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupPos) {\n\t\t\toptions.p = parseInt(elOpener.dataset.topPopupPos);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupNotch) {\n\t\t\toptions.notch = elOpener.dataset.topPopupNotch === 'true' || elOpener.dataset.topPopupNotch === '1';\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupClass) {\n\t\t\toptions.class = elOpener.dataset.topPopupClass;\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupPosBy) {\n\t\t\toptions.posBy = elOpener.dataset.topPopupPosBy as PopupOptions['posBy'];\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupFront) {\n\t\t\toptions.frontSelector = elOpener.dataset.topPopupFront;\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupInvertX) {\n\t\t\toptions.invertX = elOpener.dataset.topPopupInvertX === 'true' || elOpener.dataset.topPopupInvertX === '1';\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupOpenByHover) {\n\t\t\toptions.openByHover = elOpener.dataset.topPopupOpenByHover === 'true' || elOpener.dataset.topPopupOpenByHover === '1';\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupUseOriginal) {\n\t\t\toptions.useOriginal = elOpener.dataset.topPopupUseOriginal === 'true' || elOpener.dataset.topPopupUseOriginal === '1';\n\t\t}\n\n\t\treturn await Worker.open(elOpener, options);\n\t}\n\n\t/**\n\t * Создать и открыть Popup\n\t * @param elOpener - элемент, вызвавший открытие Popup\n\t * @param options - опции Popup\n\t */\n\tprivate static async open(elOpener: HTMLElement, options: PopupOptions): Promise<TopLibPopup> {\n\t\tif (elOpener instanceof HTMLElement) elOpener.dataset.topPopupOpened = 'opened';\n\n\t\tconst { TopLibPopup } = await import('./popup');\n\n\t\tif (Core.$) {\n\t\t\tconst $elOpener = Core.$(elOpener);\n\n\t\t\t// deprecated, используется aftershow.top-menu-popup\n\t\t\tif ($elOpener.data('aftershow')) {\n\t\t\t\tlet afterShow = $elOpener.data('aftershow');\n\t\t\t\tif (typeof (afterShow) == 'string') {\n\t\t\t\t\t// TODO: Удалить с сайта указание кода функции в html\n\t\t\t\t\t// @deprecated\n\t\t\t\t\tafterShow = eval(afterShow.replace(/\\W/g, ''));\n\t\t\t\t}\n\n\t\t\t\t$elOpener.one('aftershow.top-menu-popup', afterShow);\n\t\t\t}\n\n\t\t\t// deprecated, используется afterclose.top-menu-popup\n\t\t\tif ($elOpener.data('afterclose')) {\n\t\t\t\tlet afterclose = $elOpener.data('afterclose');\n\t\t\t\tif (typeof (afterclose) == 'string') {\n\t\t\t\t\t// TODO: Удалить с сайта указание кода функции в html\n\t\t\t\t\t// @deprecated\n\t\t\t\t\tafterclose = eval(afterclose.replace(/\\W/g, ''));\n\t\t\t\t}\n\n\t\t\t\t$elOpener.one('afterclose.top-menu-popup', afterclose);\n\t\t\t}\n\t\t}\n\n\t\toptions.isFullScreen = Core.state.isMobile;\n\n\t\treturn new TopLibPopup(elOpener, options);\n\t}\n\n\tstatic close(elPopup: HTMLElement, restoreFocus = true): void {\n\t\tconst popup = Worker.getPopup(elPopup);\n\t\tif (popup) {\n\t\t\tpopup.close();\n\n\t\t\tif (restoreFocus) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tpopup.el.focus();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic recalcPosition(elPopup: HTMLElement): void {\n\t\tconst popup = Worker.getPopup(elPopup);\n\t\tif (popup && popup.elPopupBody instanceof HTMLElement) {\n\t\t\tpopup.recalcPosition();\n\t\t}\n\t}\n\n\t/**\n\t * Скролл к активному элементу списка\n\t */\n\tstatic scrollToActive(elPopup: HTMLElement): void {\n\t\tconst elItemActive = DOM.querySelectorVisible(elPopup, 'ul.top-popup_content > li > .top-active');\n\t\tif (!elItemActive) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elUl = elPopup.querySelector('ul.top-popup_content');\n\t\tconst elsLi = DOM.querySelectorAllVisible(elPopup, 'ul.top-popup_content > li');\n\n\t\telPopup.classList.add('top-popup-wrapper-no_animate');\n\t\tsetTimeout(() => elPopup.classList.remove('top-popup-wrapper-no_animate'), 100);\n\n\t\tlet top = 100;\n\t\tfor (const elLi of elsLi) {\n\t\t\tif (elLi.querySelector(':scope > .top-active')) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (elLi instanceof HTMLElement) top += elLi.offsetHeight;\n\t\t}\n\n\t\tif (elUl instanceof HTMLElement) {\n\t\t\tconst heightWrapper = elUl.offsetHeight;\n\t\t\tif (top > heightWrapper) {\n\t\t\t\telUl.scrollTop = top - heightWrapper;\n\t\t\t} else {\n\t\t\t\telUl.scrollTop = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic decoratorBeforeOpen(popup: TopLibPopup<any>): void {\n\t\tif (this.options.decoratorBeforeOpen) {\n\t\t\tthis.options.decoratorBeforeOpen(popup);\n\t\t}\n\t};\n\n\tstatic decoratorAfterOpen(popup: TopLibPopup<any>): void {\n\t\tif (this.options.decoratorAfterOpen) {\n\t\t\tthis.options.decoratorAfterOpen(popup);\n\t\t}\n\t};\n\n\tstatic decoratorIsIgnoreOuterClick(e: MouseEvent): boolean {\n\t\tif (this.options.decoratorIsIgnoreOuterClick) {\n\t\t\treturn this.options.decoratorIsIgnoreOuterClick(e);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Зарегистрировать Vue компонент\n\t *\n\t * Каждый экземляр Popup регистрируется в словаре vueConnectors для последующего доступа из js\n\t */\n\tstatic regVueComponent(id: string, vueConnector: any): void {\n\t\tif (Worker.vueConnectors.get(id)) {\n\t\t\tthrow 'Vue component Popup use duplicated id: ' + id;\n\t\t}\n\n\t\tWorker.vueConnectors.set(id, vueConnector);\n\t}\n\n\t/**\n\t * Снять с регистрации Vue компонент\n\t */\n\tstatic unregVueComponent(id: string): void {\n\t\tWorker.vueConnectors.delete(id);\n\t}\n\n\t/**\n\t * Сгенерировать элемент для открытия popup\n\t */\n\tstatic genElPopupOpener(tagName: string, props: OpenerProps, ...elsChildrens: HTMLElement[] | string[]): HTMLElement {\n\t\tconst el = DOM.genEl(tagName, {}, ...elsChildrens) as TopLibPopup['el'];\n\n\t\tel.dataset.topPopup = '#' + props.id;\n\n\t\t// if (props.pos === undefined) props.pos = '3';\n\t\t// if (props.notch === undefined) props.notch = true;\n\t\t// if (props.posBy === undefined) props.posBy = 'fixed';\n\n\t\tfor (let name in props) {\n\t\t\tconst attrName = 'topPopup' + name.charAt(0).toUpperCase() + name.slice(1);\n\n\t\t\tel.dataset[attrName] = props[name];\n\t\t}\n\n\t\tel.__TopPopupOpenerProps = props;\n\n\t\treturn el;\n\t}\n\n}\n\nexport default Worker;\n"],"names":["elPopup","el","elOpener2","options2","popup","elLi","elsLi","elUl","heightWrapper","top","e","id","vueConnector","tagName","elsChildrens","name","props"],"mappings":"4KA6BA,MAAA,MAAA,mBAKkB,OAAA,cAAA,IAAA,sBAOU,OAAA,SAAAA,EAAA,+CAMY,CACvC,OAAA,iBAAAC,EAAA,CAGC,OAAAA,EAAA,QAAA,kBAAA,CAAiD,CAClD,OAAA,mBAAAA,EAAA,oCAIC,OAAAC,2CAAA,IAEwC,8FAOuB,uGAOE,CAClE,aAAA,aAAAA,EAAA,CAOC,GAAA,EAAAA,aAAA,aAAA,8EAWAA,EAAA,QAAA,+CAIAA,EAAA,QAAA,mDAOAA,EAAA,QAAA,gBACCC,EAAA,MAAAD,EAAA,QAAA,gBAAA,QAAAA,EAAA,QAAA,gBAAA,KAGDA,EAAA,QAAA,iDAIAA,EAAA,QAAA,iDAIAA,EAAA,QAAA,yDAOAA,EAAA,QAAA,kBACCC,EAAA,QAAAD,EAAA,QAAA,kBAAA,QAAAA,EAAA,QAAA,kBAAA,KAMDA,EAAA,QAAA,sBACCC,EAAA,YAAAD,EAAA,QAAA,sBAAA,QAAAA,EAAA,QAAA,sBAAA,KAMDA,EAAA,QAAA,sBACCC,EAAA,YAAAD,EAAA,QAAA,sBAAA,QAAAA,EAAA,QAAA,sBAAA,2BAGyC,CAC3C,aAAA,KAAA,SAAA,QAAA,yKAYC,GAAA,MAAA,KAAA,EAAA,wCAIC,GAAA,UAAA,KAAA,WAAA,EAAA,2CAEC,OAAA,WAAA,WAGC,UAAA,KAAA,UAAA,QAAA,MAAA,EAAA,CAAA,GAGD,UAAA,IAAA,2BAAA,SAAA,CAAmD,CAIpD,GAAA,UAAA,KAAA,YAAA,EAAA,6CAEC,OAAA,YAAA,WAGC,WAAA,KAAA,WAAA,QAAA,MAAA,EAAA,CAAA,GAGD,UAAA,IAAA,4BAAA,UAAA,CAAqD,CACtD,uDAKD,IAAA,YAAA,SAAA,OAAA,CAAwC,kFAUrCE,EAAA,GAAA,MAAA,CAAe,CAAA,EAGlB,CACD,OAAA,eAAAJ,EAAA,uFAMC,CACD,OAAA,eAAAA,EAAA,2NAcCA,EAAA,UAAA,IAAA,8BAAA,EACA,WAAA,IAAAA,EAAA,UAAA,OAAA,8BAAA,EAAA,GAAA,YAGA,UAAAK,KAAAC,EAAA,CACC,GAAAD,EAAA,cAAA,sBAAA,qDAI6C,CAG9C,GAAAE,aAAA,YAAA,CACC,MAAAC,EAAAD,EAAA,aACAE,EAAAD,EACCD,EAAA,UAAAE,EAAAD,EAEAD,EAAA,UAAA,CACD,CACD,CACD,OAAA,oBAAAH,EAAA,CAGC,KAAA,QAAA,qBACC,KAAA,QAAA,oBAAAA,CAAA,CACD,CACD,OAAA,mBAAAA,EAAA,CAGC,KAAA,QAAA,oBACC,KAAA,QAAA,mBAAAA,CAAA,CACD,CACD,OAAA,4BAAAM,EAAA,CAGC,OAAA,KAAA,QAAA,wEAIA,EAAO,CACR,OAAA,gBAAAC,EAAAC,EAAA,8GAY0C,CAC1C,OAAA,kBAAAD,EAAA,CAMC,OAAA,cAAA,OAAAA,CAAA,CAA8B,mCAO9B,MAAAV,EAAA,UAAA,QAAA,MAAAY,EAAA,CAAA,EAAA,GAAAC,CAAA,8BAQA,QAAAC,KAAAC,EAAA,0EAGkC,CAGlC,OAAAf,EAAA,sBAAAe,EAEAf,CAAO,CAGT"}
|
package/popup/worker.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { C as Core } from "../.chunks/forms-DC7ffuv2.es.js";
|
|
2
|
+
import DOM from "../utils/dom.js";
|
|
3
|
+
class Worker {
|
|
4
|
+
/**
|
|
5
|
+
* Глобальное выключение закрытия меню, используется при различных оверлеях
|
|
6
|
+
*/
|
|
7
|
+
static noClose = !1;
|
|
8
|
+
/**
|
|
9
|
+
* Для взаимодействия с vue
|
|
10
|
+
*/
|
|
11
|
+
static vueConnectors = /* @__PURE__ */ new Map();
|
|
12
|
+
static options = {};
|
|
13
|
+
/**
|
|
14
|
+
* Вернуть объект компонента popup, привязанный к элементу
|
|
15
|
+
*/
|
|
16
|
+
static getPopup(t) {
|
|
17
|
+
return DOM.storage(t, "TopPopup");
|
|
18
|
+
}
|
|
19
|
+
static getElPopupOpener(t) {
|
|
20
|
+
return t.closest("[data-top-popup]");
|
|
21
|
+
}
|
|
22
|
+
static getPopupFromOpener(t) {
|
|
23
|
+
const o = Worker.getElPopupOpener(t);
|
|
24
|
+
return o ? DOM.storage(o, "#TopPopup") : null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Вернуть все элементы с Popup
|
|
28
|
+
*/
|
|
29
|
+
static getAll() {
|
|
30
|
+
return DOM.querySelectorAllArray(document, ".top-popup-wrapper");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Вернуть все элементы с открытыми Popup
|
|
34
|
+
*/
|
|
35
|
+
static getAllVisible() {
|
|
36
|
+
return DOM.querySelectorAllVisible(document, ".top-popup-wrapper");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Открыть Popup от указанного elOpener
|
|
40
|
+
* @param {HTMLElement} elOpener - элемент, который должен вызвать открытие Popup
|
|
41
|
+
*/
|
|
42
|
+
static async openByOpener(t) {
|
|
43
|
+
if (!(t instanceof HTMLElement)) return;
|
|
44
|
+
const o = {};
|
|
45
|
+
return o.popup = t.dataset.topPopup, o.id = t.dataset.topPopupId, t.dataset.topPopupP && (o.p = parseInt(t.dataset.topPopupP)), t.dataset.topPopupPos && (o.p = parseInt(t.dataset.topPopupPos)), t.dataset.topPopupNotch && (o.notch = t.dataset.topPopupNotch === "true" || t.dataset.topPopupNotch === "1"), t.dataset.topPopupClass && (o.class = t.dataset.topPopupClass), t.dataset.topPopupPosBy && (o.posBy = t.dataset.topPopupPosBy), t.dataset.topPopupFront && (o.frontSelector = t.dataset.topPopupFront), t.dataset.topPopupInvertX && (o.invertX = t.dataset.topPopupInvertX === "true" || t.dataset.topPopupInvertX === "1"), t.dataset.topPopupOpenByHover && (o.openByHover = t.dataset.topPopupOpenByHover === "true" || t.dataset.topPopupOpenByHover === "1"), t.dataset.topPopupUseOriginal && (o.useOriginal = t.dataset.topPopupUseOriginal === "true" || t.dataset.topPopupUseOriginal === "1"), await Worker.open(t, o);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Создать и открыть Popup
|
|
49
|
+
* @param elOpener - элемент, вызвавший открытие Popup
|
|
50
|
+
* @param options - опции Popup
|
|
51
|
+
*/
|
|
52
|
+
static async open(elOpener, options) {
|
|
53
|
+
elOpener instanceof HTMLElement && (elOpener.dataset.topPopupOpened = "opened");
|
|
54
|
+
const { TopLibPopup } = await import("../.chunks/popup-B7GI-vlM.es.js");
|
|
55
|
+
if (Core.$) {
|
|
56
|
+
const $elOpener = Core.$(elOpener);
|
|
57
|
+
if ($elOpener.data("aftershow")) {
|
|
58
|
+
let afterShow = $elOpener.data("aftershow");
|
|
59
|
+
typeof afterShow == "string" && (afterShow = eval(afterShow.replace(/\W/g, ""))), $elOpener.one("aftershow.top-menu-popup", afterShow);
|
|
60
|
+
}
|
|
61
|
+
if ($elOpener.data("afterclose")) {
|
|
62
|
+
let afterclose = $elOpener.data("afterclose");
|
|
63
|
+
typeof afterclose == "string" && (afterclose = eval(afterclose.replace(/\W/g, ""))), $elOpener.one("afterclose.top-menu-popup", afterclose);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return options.isFullScreen = Core.state.isMobile, new TopLibPopup(elOpener, options);
|
|
67
|
+
}
|
|
68
|
+
static close(t, o = !0) {
|
|
69
|
+
const e = Worker.getPopup(t);
|
|
70
|
+
e && (e.close(), o && setTimeout(() => {
|
|
71
|
+
e.el.focus();
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
static recalcPosition(t) {
|
|
75
|
+
const o = Worker.getPopup(t);
|
|
76
|
+
o && o.elPopupBody instanceof HTMLElement && o.recalcPosition();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Скролл к активному элементу списка
|
|
80
|
+
*/
|
|
81
|
+
static scrollToActive(t) {
|
|
82
|
+
if (!DOM.querySelectorVisible(t, "ul.top-popup_content > li > .top-active"))
|
|
83
|
+
return;
|
|
84
|
+
const e = t.querySelector("ul.top-popup_content"), a = DOM.querySelectorAllVisible(t, "ul.top-popup_content > li");
|
|
85
|
+
t.classList.add("top-popup-wrapper-no_animate"), setTimeout(() => t.classList.remove("top-popup-wrapper-no_animate"), 100);
|
|
86
|
+
let r = 100;
|
|
87
|
+
for (const p of a) {
|
|
88
|
+
if (p.querySelector(":scope > .top-active"))
|
|
89
|
+
break;
|
|
90
|
+
p instanceof HTMLElement && (r += p.offsetHeight);
|
|
91
|
+
}
|
|
92
|
+
if (e instanceof HTMLElement) {
|
|
93
|
+
const p = e.offsetHeight;
|
|
94
|
+
r > p ? e.scrollTop = r - p : e.scrollTop = 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static decoratorBeforeOpen(t) {
|
|
98
|
+
this.options.decoratorBeforeOpen && this.options.decoratorBeforeOpen(t);
|
|
99
|
+
}
|
|
100
|
+
static decoratorAfterOpen(t) {
|
|
101
|
+
this.options.decoratorAfterOpen && this.options.decoratorAfterOpen(t);
|
|
102
|
+
}
|
|
103
|
+
static decoratorIsIgnoreOuterClick(t) {
|
|
104
|
+
return this.options.decoratorIsIgnoreOuterClick ? this.options.decoratorIsIgnoreOuterClick(t) : !1;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Зарегистрировать Vue компонент
|
|
108
|
+
*
|
|
109
|
+
* Каждый экземляр Popup регистрируется в словаре vueConnectors для последующего доступа из js
|
|
110
|
+
*/
|
|
111
|
+
static regVueComponent(t, o) {
|
|
112
|
+
if (Worker.vueConnectors.get(t))
|
|
113
|
+
throw "Vue component Popup use duplicated id: " + t;
|
|
114
|
+
Worker.vueConnectors.set(t, o);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Снять с регистрации Vue компонент
|
|
118
|
+
*/
|
|
119
|
+
static unregVueComponent(t) {
|
|
120
|
+
Worker.vueConnectors.delete(t);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Сгенерировать элемент для открытия popup
|
|
124
|
+
*/
|
|
125
|
+
static genElPopupOpener(t, o, ...e) {
|
|
126
|
+
const a = DOM.genEl(t, {}, ...e);
|
|
127
|
+
a.dataset.topPopup = "#" + o.id;
|
|
128
|
+
for (let r in o) {
|
|
129
|
+
const p = "topPopup" + r.charAt(0).toUpperCase() + r.slice(1);
|
|
130
|
+
a.dataset[p] = o[r];
|
|
131
|
+
}
|
|
132
|
+
return a.__TopPopupOpenerProps = o, a;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
Worker as TopPopupWorker
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sources":["../../src/components/popup/lib/worker.ts"],"sourcesContent":["/**\n * PopupWorker управляет работой Popup\n *\n * Должен грузить TopLibPopup только в отложенном режиме\n */\n\nimport Core from '@/core/core/core';\nimport DOM from '@/core/utils/dom';\nimport type { PopupOptions, TopLibPopup } from '@/components/popup/lib/popup';\nimport type { OpenerProps } from '@/components/popup/popup/types';\n\nexport type Options = {\n\t/**\n\t * Глобальное событие, которое будет вызвано перед открытием TopPopup\n\t */\n\tdecoratorBeforeOpen?: (popup: TopLibPopup) => void,\n\n\t/**\n\t * Глобальное событие, которое будет вызвано после открытия TopPopup\n\t */\n\tdecoratorAfterOpen?: (popup: TopLibPopup) => void;\n\n\t/**\n\t * Определитель того, что клик вне Popup нужно игнорировать\n\t * @returns {boolean} - если true, то click не приведет к закрытию Popup\n\t */\n\tdecoratorIsIgnoreOuterClick?: (e: MouseEvent) => boolean\n}\n\nclass Worker {\n\n\t/**\n\t * Глобальное выключение закрытия меню, используется при различных оверлеях\n\t */\n\tstatic noClose = false;\n\n\t/**\n\t * Для взаимодействия с vue\n\t */\n\tstatic vueConnectors = new Map();\n\n\tstatic options: Options = {};\n\n\t/**\n\t * Вернуть объект компонента popup, привязанный к элементу\n\t */\n\tstatic getPopup(elPopup: HTMLElement): TopLibPopup {\n\t\treturn DOM.storage(elPopup, 'TopPopup') as TopLibPopup;\n\t}\n\n\tstatic getElPopupOpener(el: Element): HTMLElement | null {\n\t\treturn el.closest<HTMLElement>('[data-top-popup]');\n\t}\n\n\tstatic getPopupFromOpener(el: HTMLElement): TopLibPopup | null {\n\t\tconst elOpener = Worker.getElPopupOpener(el);\n\t\tif (!elOpener) return null;\n\n\t\treturn DOM.storage(elOpener, '#TopPopup');\n\t}\n\n\t/**\n\t * Вернуть все элементы с Popup\n\t */\n\tstatic getAll(): HTMLElement[] {\n\t\treturn DOM.querySelectorAllArray(document, '.top-popup-wrapper');\n\t}\n\n\t/**\n\t * Вернуть все элементы с открытыми Popup\n\t */\n\tstatic getAllVisible(): HTMLElement[] {\n\t\treturn DOM.querySelectorAllVisible(document, '.top-popup-wrapper');\n\t}\n\n\t/**\n\t * Открыть Popup от указанного elOpener\n\t * @param {HTMLElement} elOpener - элемент, который должен вызвать открытие Popup\n\t */\n\tstatic async openByOpener(elOpener: HTMLElement): Promise<TopLibPopup | undefined> {\n\t\tif (!(elOpener instanceof HTMLElement)) return;\n\n\t\tconst options: PopupOptions = {};\n\n\t\toptions.popup = elOpener.dataset.topPopup;\n\n\t\toptions.id = elOpener.dataset.topPopupId;\n\n\t\t/**\n\t\t * @deprecated topPopupP - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupP) {\n\t\t\toptions.p = parseInt(elOpener.dataset.topPopupP);\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupPos) {\n\t\t\toptions.p = parseInt(elOpener.dataset.topPopupPos);\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupNotch) {\n\t\t\toptions.notch = elOpener.dataset.topPopupNotch === 'true' || elOpener.dataset.topPopupNotch === '1';\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupClass) {\n\t\t\toptions.class = elOpener.dataset.topPopupClass;\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupPosBy) {\n\t\t\toptions.posBy = elOpener.dataset.topPopupPosBy as PopupOptions['posBy'];\n\t\t}\n\n\t\tif (elOpener.dataset.topPopupFront) {\n\t\t\toptions.frontSelector = elOpener.dataset.topPopupFront;\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupInvertX) {\n\t\t\toptions.invertX = elOpener.dataset.topPopupInvertX === 'true' || elOpener.dataset.topPopupInvertX === '1';\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupOpenByHover) {\n\t\t\toptions.openByHover = elOpener.dataset.topPopupOpenByHover === 'true' || elOpener.dataset.topPopupOpenByHover === '1';\n\t\t}\n\n\t\t/**\n\t\t * @deprecated '1' - добавлено для обратной совместимости\n\t\t */\n\t\tif (elOpener.dataset.topPopupUseOriginal) {\n\t\t\toptions.useOriginal = elOpener.dataset.topPopupUseOriginal === 'true' || elOpener.dataset.topPopupUseOriginal === '1';\n\t\t}\n\n\t\treturn await Worker.open(elOpener, options);\n\t}\n\n\t/**\n\t * Создать и открыть Popup\n\t * @param elOpener - элемент, вызвавший открытие Popup\n\t * @param options - опции Popup\n\t */\n\tprivate static async open(elOpener: HTMLElement, options: PopupOptions): Promise<TopLibPopup> {\n\t\tif (elOpener instanceof HTMLElement) elOpener.dataset.topPopupOpened = 'opened';\n\n\t\tconst { TopLibPopup } = await import('./popup');\n\n\t\tif (Core.$) {\n\t\t\tconst $elOpener = Core.$(elOpener);\n\n\t\t\t// deprecated, используется aftershow.top-menu-popup\n\t\t\tif ($elOpener.data('aftershow')) {\n\t\t\t\tlet afterShow = $elOpener.data('aftershow');\n\t\t\t\tif (typeof (afterShow) == 'string') {\n\t\t\t\t\t// TODO: Удалить с сайта указание кода функции в html\n\t\t\t\t\t// @deprecated\n\t\t\t\t\tafterShow = eval(afterShow.replace(/\\W/g, ''));\n\t\t\t\t}\n\n\t\t\t\t$elOpener.one('aftershow.top-menu-popup', afterShow);\n\t\t\t}\n\n\t\t\t// deprecated, используется afterclose.top-menu-popup\n\t\t\tif ($elOpener.data('afterclose')) {\n\t\t\t\tlet afterclose = $elOpener.data('afterclose');\n\t\t\t\tif (typeof (afterclose) == 'string') {\n\t\t\t\t\t// TODO: Удалить с сайта указание кода функции в html\n\t\t\t\t\t// @deprecated\n\t\t\t\t\tafterclose = eval(afterclose.replace(/\\W/g, ''));\n\t\t\t\t}\n\n\t\t\t\t$elOpener.one('afterclose.top-menu-popup', afterclose);\n\t\t\t}\n\t\t}\n\n\t\toptions.isFullScreen = Core.state.isMobile;\n\n\t\treturn new TopLibPopup(elOpener, options);\n\t}\n\n\tstatic close(elPopup: HTMLElement, restoreFocus = true): void {\n\t\tconst popup = Worker.getPopup(elPopup);\n\t\tif (popup) {\n\t\t\tpopup.close();\n\n\t\t\tif (restoreFocus) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tpopup.el.focus();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic recalcPosition(elPopup: HTMLElement): void {\n\t\tconst popup = Worker.getPopup(elPopup);\n\t\tif (popup && popup.elPopupBody instanceof HTMLElement) {\n\t\t\tpopup.recalcPosition();\n\t\t}\n\t}\n\n\t/**\n\t * Скролл к активному элементу списка\n\t */\n\tstatic scrollToActive(elPopup: HTMLElement): void {\n\t\tconst elItemActive = DOM.querySelectorVisible(elPopup, 'ul.top-popup_content > li > .top-active');\n\t\tif (!elItemActive) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elUl = elPopup.querySelector('ul.top-popup_content');\n\t\tconst elsLi = DOM.querySelectorAllVisible(elPopup, 'ul.top-popup_content > li');\n\n\t\telPopup.classList.add('top-popup-wrapper-no_animate');\n\t\tsetTimeout(() => elPopup.classList.remove('top-popup-wrapper-no_animate'), 100);\n\n\t\tlet top = 100;\n\t\tfor (const elLi of elsLi) {\n\t\t\tif (elLi.querySelector(':scope > .top-active')) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (elLi instanceof HTMLElement) top += elLi.offsetHeight;\n\t\t}\n\n\t\tif (elUl instanceof HTMLElement) {\n\t\t\tconst heightWrapper = elUl.offsetHeight;\n\t\t\tif (top > heightWrapper) {\n\t\t\t\telUl.scrollTop = top - heightWrapper;\n\t\t\t} else {\n\t\t\t\telUl.scrollTop = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic decoratorBeforeOpen(popup: TopLibPopup<any>): void {\n\t\tif (this.options.decoratorBeforeOpen) {\n\t\t\tthis.options.decoratorBeforeOpen(popup);\n\t\t}\n\t};\n\n\tstatic decoratorAfterOpen(popup: TopLibPopup<any>): void {\n\t\tif (this.options.decoratorAfterOpen) {\n\t\t\tthis.options.decoratorAfterOpen(popup);\n\t\t}\n\t};\n\n\tstatic decoratorIsIgnoreOuterClick(e: MouseEvent): boolean {\n\t\tif (this.options.decoratorIsIgnoreOuterClick) {\n\t\t\treturn this.options.decoratorIsIgnoreOuterClick(e);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Зарегистрировать Vue компонент\n\t *\n\t * Каждый экземляр Popup регистрируется в словаре vueConnectors для последующего доступа из js\n\t */\n\tstatic regVueComponent(id: string, vueConnector: any): void {\n\t\tif (Worker.vueConnectors.get(id)) {\n\t\t\tthrow 'Vue component Popup use duplicated id: ' + id;\n\t\t}\n\n\t\tWorker.vueConnectors.set(id, vueConnector);\n\t}\n\n\t/**\n\t * Снять с регистрации Vue компонент\n\t */\n\tstatic unregVueComponent(id: string): void {\n\t\tWorker.vueConnectors.delete(id);\n\t}\n\n\t/**\n\t * Сгенерировать элемент для открытия popup\n\t */\n\tstatic genElPopupOpener(tagName: string, props: OpenerProps, ...elsChildrens: HTMLElement[] | string[]): HTMLElement {\n\t\tconst el = DOM.genEl(tagName, {}, ...elsChildrens) as TopLibPopup['el'];\n\n\t\tel.dataset.topPopup = '#' + props.id;\n\n\t\t// if (props.pos === undefined) props.pos = '3';\n\t\t// if (props.notch === undefined) props.notch = true;\n\t\t// if (props.posBy === undefined) props.posBy = 'fixed';\n\n\t\tfor (let name in props) {\n\t\t\tconst attrName = 'topPopup' + name.charAt(0).toUpperCase() + name.slice(1);\n\n\t\t\tel.dataset[attrName] = props[name];\n\t\t}\n\n\t\tel.__TopPopupOpenerProps = props;\n\n\t\treturn el;\n\t}\n\n}\n\nexport default Worker;\n"],"names":["elPopup","el","elOpener","options","restoreFocus","popup","elUl","elsLi","top","elLi","heightWrapper","e","id","vueConnector","tagName","props","elsChildrens","name","attrName"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","vue","../.chunks/forms-L6BGV_om.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-M0ZTpQlF.amd","../.chunks/menu.vue_vue_type_style_index_0_lang-DepdFfhE.amd","../.chunks/utils-Bg7IV0KZ.amd","../utils/searchers.amd","../utils/dom.amd","../popup/worker.amd","../require/css.amd!../assets/project.css"],function(ne,T,e,x,E,oe,le,P,_,ae){"use strict";if(typeof e>"u")var e=window.Vue;const re={class:"top-selectorCompetitors"},ie={class:"top-ellipsis1"},de=e.defineComponent({__name:"selectorCompetitors",props:e.mergeModels({modelValue:{},items:{},showSelectAllItem:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=e.computed(()=>{if(l.showSelectAllItem)return{icon:"",title:x.useI18n().Common.Select_all,value:"all",content:""}});return(d,o)=>(e.openBlock(),e.createElementBlock("div",re,[e.unref(x.Core).state.isMobile?(e.openBlock(),e.createBlock(E._sfc_main,{key:0},{opener:e.withCtx(()=>[e.createVNode(x._sfc_main,{class:"top-selectorCompetitors_opener",color:"theme",icon:"",icon2:""},{default:e.withCtx(()=>{var a;return[e.createTextVNode(e.toDisplayString((a=d.items.find(u=>{var v;return u.value===((v=r.value)==null?void 0:v[0])}))==null?void 0:a.content),1)]}),_:1})]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,a=>{var u;return e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-active":(u=r.value)==null?void 0:u.includes(a.value)}),"data-top-icon":a.icon,title:a.title,onClick:()=>r.value=[a.value]},{default:e.withCtx(()=>[e.createElementVNode("span",ie,e.toDisplayString(a.content),1)]),_:2},1032,["class","data-top-icon","title","onClick"])}),256))]),_:1})):(e.openBlock(),e.createBlock(oe._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),items:d.items,isMultiple:!0,styling:"bar",canBeEmptyMultiple:!1,selectAllItem:t.value},null,8,["modelValue","items","selectAllItem"]))]))}}),w=-1,p=-2,L=-1,se={0:"Yandex",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GoogleStore",20:"Yandex.com",21:"Yandex.com.tr"},J={key:p,name:"--",index:p},G={key:p,name:"--",regions:[J],regionByIndex:new Map([[p,J]])},A={key:p,name:"Autoselect",index:p},U={key:p,name:"Autoselect",regions:[A],regionByIndex:new Map([[p,A]])},Y={countryCode:"00",depth:1,device:0,key:L,index:L,lang:"ru",name:"Without region"},ue=()=>(A.name=x.useI18n().Common.Autoselect,A),ce=()=>(ue(),U.name=x.useI18n().Common.Autoselect,console.log(U),U),ge=()=>(Y.name=x.useI18n().Keywords.Without_region,Y),z=(n=!1,l=!1,r=[])=>{let t;return n?t=me(r):t=W(r),l&&t.set(p,ce()),t.size||t.set(p,G),t},W=(n,l=!0,r=[],t=!1)=>{const d=new Map;return n.forEach(o=>{if(!o.enabled||t&&typeof o.key=="number"&&o.key>1)return;const a={...o};a.regionByIndex=new Map,o.regions&&o.regions.forEach(u=>{if(l&&!u.enabled)return;const v={...u};a.regionByIndex.set(v.index,v)}),!a.regionByIndex.size&&r.length,(!o.regions||a.regionByIndex.size||r.length)&&typeof a.key=="number"&&d.set(a.key,a)}),r.forEach(o=>{if(d.has(o))return;const a={key:o,name:se[o],regions:[],regionByIndex:new Map};d.set(a.key,a)}),d},me=n=>{const l=W(n,!1,[0,1],!0);if(l.has(2)){const r=l.get(2);r&&(r.regionByIndex=new Map)}return l.forEach(r=>{if(!r.regionByIndex)return;const t={...ge()};r.regionByIndex.set(t.index,t)}),l},H=(n,l,r=[])=>{const t=z(n,!1,r);let d;return t.forEach(o=>{if(!(l.searcher_key!==void 0&&l.searcher_key!=o.key)&&o.regions&&(o.regions.forEach(a=>{if(!d&&!(l.key!==void 0&&l.key!=a.key)&&!(l.index!==void 0&&l.index!=a.index)&&!(!n&&(l.lang!==void 0&&l.lang!=a.lang||l.device!==void 0&&l.device!=a.device)))return a.searcher_key=o.key,d=a,!1}),d))return!1}),d},Q=le.useAsyncTopDialog(()=>new Promise((n,l)=>ne(["../.chunks/dialog_selectorRegions-CiWJsA9r.amd"],n,l))),fe=(n,l)=>{const r=x.useI18n(),t=e.ref(l.value.keys().next().value??p),d=e.computed(()=>{const o=new Map;if(l.value.forEach(a=>{let u={value:a.key,title:a.name};n.addSearcherIcon&&(u.icon=P.getSearcherGIcon(a.key)),o.set(a.key,u)}),n.addCompare&&!o.has(p)){const a={value:"",title:"--------------------",disabled:!0};o.set(a.value,a);const u={value:w,title:r.Common.Compare};o.set(u.value,u)}return o});return{searcherKey:t,optionBySearcherKey:d}},ve=(n,l)=>{var o,a,u;const r=x.useI18n(),t=e.ref(p);n.modelValue.length===1&&(t.value=n.modelValue[0]),t.value===p&&(n.forFrequency?t.value=((a=(o=l.value)==null?void 0:o.regionByIndex.values().next().value)==null?void 0:a.key)??p:t.value=((u=l.value)==null?void 0:u.regionByIndex.keys().next().value)??p);const d=e.computed(()=>{var h;const v=new Map;return(h=l.value.regionByIndex)==null||h.forEach(S=>{let i=S.name;if(n.forFrequency){const I={value:S.key,title:i};v.has(S.key)||v.set(S.key,I);return}S.device&&(i+=" ("+r.Common["Device_"+S.device]+")");const m=P.getLangLabel(l.value.key||0,S.lang??"");m&&(i+=" / "+m);const c={value:S.index,title:i,icon:S.device?P.getDeviceGIcon(S.device):void 0};v.set(S.index,c)}),v});return e.watch(d,(v,h)=>{var c;if(n.onlySearcher||t.value!==void 0&&v.get(t.value))return;let S=v.keys().next().value;if(t.value===p||S===p){t.value=S;return}let i=((c=h==null?void 0:h.get(t.value))==null?void 0:c.title)||"",m=-1;for(const[I,B]of v.entries()){const C=B.title;if(typeof C!="string"||typeof I=="string")break;if(C===i){S=I;break}const V=new RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`);let f=i,s=3;C.indexOf(f)===-1&&(f=i.replace(/^[^a-zа-я]/i,"").replace(V,""),s--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),s--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),f=f.replace(/^[^a-zа-я]/i,"").replace(V,""),s--),C.indexOf(f)!==-1&&(s<=m||(m=s,S=I))}t.value=S}),{regionIndex:t,optionByRegionIndex:d}},ye=(n,l,r)=>{const t=e.ref([]),d=()=>{if(n.onlySearcher&&l.value){t.value=Array.from(l.value.keys());return}let a=[];if(n.modelValue.length>1)a=[...n.modelValue];else try{a=JSON.parse(localStorage.getItem("ui:project:regionSelector"+n.projectId+":regionsIndexes"))??[]}catch{}a.length&&(a=a.filter(u=>r.value.has(u))),a.length||(a=Array.from(r.value)),t.value=[...a]},o=()=>{t.value.length?localStorage.setItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes",JSON.stringify(t.value)):localStorage.removeItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes")};return e.watch(t,()=>{o()}),n.addCompare&&d(),{regionsIndexes:t}},pe=n=>{const l=e.computed(()=>z(n.forFrequency,n.autoRegion,n.searchers)),r=e.computed(()=>l.value.get(d.searcherKey.value)||G),t=e.computed(()=>{const i=new Set;return l.value.forEach(m=>{m.regionByIndex.forEach(c=>{c.index!==L&&c.index!==p&&i.add(c.index)})}),i}),d=fe(n,l),o=ve(n,r),a=ye(n,l,t);e.watch(l,()=>{var m,c,I,B;if(n.onlySearcher?a.regionsIndexes.value=Array.from(l.value.keys()):a.regionsIndexes.value=a.regionsIndexes.value.filter(C=>t.value.has(C)),d.searcherKey.value===w)return;let i=l.value.keys().next().value;l.value.forEach(C=>{var V,f,s;if(n.onlySearcher&&C.key===d.searcherKey.value){i=d.searcherKey.value;return}if(o.regionIndex.value&&((V=C.regionByIndex)!=null&&V.has(o.regionIndex.value))&&(i=C.key),!n.onlySearcher){let g;i!==void 0&&(g=(f=l.value.get(i))==null?void 0:f.regionByIndex);const y=(s=l.value.get(C.key))==null?void 0:s.regionByIndex;g!=null&&g.has(p)&&!(y!=null&&y.has(p))&&(i=C.key)}}),i!==void 0&&(d.searcherKey.value=i),o.regionIndex.value!==void 0&&!((c=(m=r.value)==null?void 0:m.regionByIndex)!=null&&c.has(o.regionIndex.value))&&(o.regionIndex.value=(B=(I=r.value)==null?void 0:I.regions)==null?void 0:B.keys().next().value)},{immediate:!0});const u=()=>{if(!(d.searcherKey.value===w||d.searcherKey.value===p))return d.searcherKey.value},v=()=>{if(n.onlySearcher||o.regionIndex.value===p)return;let i=o.regionIndex.value;if(n.forFrequency){const m=o.regionIndex.value,c=H(n.forFrequency,{searcher_key:u(),key:m},n.searchers);i=c==null?void 0:c.index}return i},h=()=>{const i=u();if(i!==void 0)return l.value.get(i)};return{selectSearcher:d,selectRegion:o,compare:a,searcherByKey:l,allRegionsIndexes:t,getSearcher:h,getRegion:()=>{var m,c;const i=v();if(i!==void 0)return(c=(m=h())==null?void 0:m.regionByIndex)==null?void 0:c.get(i)}}},he=e.defineComponent({__name:"selectorRegion",props:e.mergeModels({projectId:{},searchers:{default:()=>[]},modelValue:{},modelValueSingle:{},addCompare:{type:Boolean},forFrequency:{type:Boolean},autoRegion:{type:Boolean},onlySearcher:{type:Boolean},addChanger:{type:Boolean,default:!0},addSearcherIcon:{type:Boolean,default:!0},addRegionIcon:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{},modelValueSingle:{},modelValueSingleModifiers:{}}),emits:["update:modelValue","update:modelValueSingle"],setup(n,{expose:l}){const r=n,t=e.useModel(n,"modelValue"),d=e.useModel(n,"modelValueSingle"),{selectSearcher:o,selectRegion:a,compare:u,searcherByKey:v,allRegionsIndexes:h,getSearcher:S,getRegion:i}=pe(r),m=()=>{const c=[];v.value.forEach(I=>{I.enabled&&I.regions.forEach(B=>{B.enabled&&c.push(B)})}),Q.open("selectorRegions",{regions:c,regionsIndexes:u.regionsIndexes.value,"@update:regionsIndexes":I=>u.regionsIndexes.value=I})};return e.watch([a.regionIndex,o.searcherKey,u.regionsIndexes],()=>{if(o.searcherKey.value===w&&u.regionsIndexes.value.length){if(JSON.stringify(t.value)===JSON.stringify(u.regionsIndexes.value))return;t.value=[...u.regionsIndexes.value]}else r.onlySearcher?(t.value=[o.searcherKey.value],o.searcherKey.value===p&&!r.autoRegion&&(t.value.length=0)):(t.value=[a.regionIndex.value],a.regionIndex.value===p&&!r.autoRegion&&(t.value.length=0));!r.onlySearcher&&!h.value.size&&(o.searcherKey.value=p)}),d.value&&e.watch(d,()=>{d.value&&(t.value=[d.value])},{immediate:!0}),e.watch(t,()=>{var c,I,B,C,V;if(t.value[0]&&(d.value=t.value[0]),r.onlySearcher){if(!t.value.length||t.value.length===1&&!v.value.has(t.value[0])||t.value.length===1&&t.value[0]===p&&!r.autoRegion){let f=v.value.keys().next().value;f===p&&!r.autoRegion&&(f=void 0,d.value=p),f!==void 0?t.value=[f]:t.value.length=0;return}if(t.value.length>1&&JSON.stringify(t.value)!==JSON.stringify(u.regionsIndexes.value)){t.value=[...u.regionsIndexes.value];return}}else{let f=[...new Set(t.value)],s=(I=(c=v.value.values().next().value)==null?void 0:c.regionByIndex)==null?void 0:I.keys().next().value;if(r.forFrequency&&(s=(V=(C=(B=v.value.values().next().value)==null?void 0:B.regionByIndex)==null?void 0:C.values().next().value)==null?void 0:V.key),s===p&&!r.autoRegion&&(s=void 0,d.value=p),!f.length)s!==void 0&&f.push(s);else if(f.length===1){let g=h.value;r.forFrequency&&(g=new Set,v.value.forEach(y=>{y.regionByIndex.forEach(k=>{k.index!==L&&k.index!==p&&g.add(k.key)})})),g.has(f[0])||(f=[],s!==void 0&&f.push(s))}else f=f.filter(g=>h.value.has(g)),!f.length&&s!==void 0&&f.push(s);if(JSON.stringify(t.value)!==JSON.stringify(f)){t.value=f;return}}if(!(t.value.length===1&&t.value[0]===(r.onlySearcher?o.searcherKey.value:a.regionIndex.value)))if(r.onlySearcher){if(t.value.length===1){o.searcherKey.value=t.value[0];return}o.searcherKey.value=w;return}else{if(!t.value.length)return;if(t.value.length===1&&o.searcherKey.value!==w){a.regionIndex.value=t.value[0];let f;for(const s of v.value.values()){for(const g of s.regionByIndex.values())if((r.forFrequency?g.key:g.index)===a.regionIndex.value){f=s.key;break}if(f!==void 0)break}f!==void 0&&(o.searcherKey.value=f)}else o.searcherKey.value=w,u.regionsIndexes.value=[...t.value]}},{immediate:!0}),l({getSearcher:S,getRegion:i}),(c,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-selectorRegion":!0,"top-selectorRegion-onlySearcher":c.onlySearcher})},[e.createVNode(x._sfc_main$4,{options:e.unref(o).optionBySearcherKey.value,modelValue:e.unref(o).searcherKey.value,"onUpdate:modelValue":I[0]||(I[0]=B=>e.unref(o).searcherKey.value=B),name:"searcher_key",addChanger:c.addChanger},null,8,["options","modelValue","addChanger"]),!c.onlySearcher&&e.unref(o).searcherKey.value!==e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$4,{key:0,class:"top-select-region",options:e.unref(a).optionByRegionIndex.value,modelValue:e.unref(a).regionIndex.value,"onUpdate:modelValue":I[1]||(I[1]=B=>e.unref(a).regionIndex.value=B),name:c.forFrequency?"region_key":"region_index",addChanger:c.addChanger,"data-top-icon":c.addRegionIcon?"":void 0},null,8,["options","modelValue","name","addChanger","data-top-icon"])):e.createCommentVNode("",!0),c.addCompare&&!c.onlySearcher&&e.unref(o).searcherKey.value===e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main,{key:1,name:"compare",onClick:m,"data-count-compare-regions-indexes":e.unref(u).regionsIndexes.value.length},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$i18n.Common.Selected_regions),1)]),_:1},8,["data-count-compare-regions-indexes"])):e.createCommentVNode("",!0)],2))}}),Se=[{id:"1",name:"Without Tag",color_id:"1"},{id:"2",name:"Red",color_id:"2"},{id:"3",name:"Orange",color_id:"3"},{id:"4",name:"Yellow",color_id:"4"},{id:"5",name:"Blue",color_id:"5"},{id:"6",name:"Purple",color_id:"6"},{id:"7",name:"Green",color_id:"7"},{id:"8",name:"Magenta",color_id:"8"},{id:"9",name:"Dark blue",color_id:"9"},{id:"10",name:"Turquoise",color_id:"10"}],X=n=>"-"+n,K=n=>n[0]==="-"?n.substring(1):n,O=(n,l)=>{n=K(n);const r=l.find(t=>t.id===n);if(r)return r},ke=["data-tag_id","data-tag_color_id","title"],D=e.defineComponent({__name:"tagIcon",props:{id:{},colorId:{},name:{},state:{}},setup(n){return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tagSelector_tagIcon":!0,"top-tagSelector-active":!!l.state,"top-tagSelector-excluded":l.state==="excluded"}),"data-tag_id":l.id,"data-tag_color_id":l.colorId,title:l.name},null,10,ke))}}),Ie=["contenteditable","onKeydown"],Z=e.defineComponent({__name:"tagPopupListItem",props:e.mergeModels({editable:{type:Boolean},disabled:{type:Boolean},canExclude:{type:Boolean},id:{},colorId:{},name:{},state:{}},{name:{required:!0},nameModifiers:{}}),emits:e.mergeModels(["update:name","unselect","exclude","select"],["update:name"]),setup(n,{emit:l}){const r=n,t=l,d=e.useModel(n,"name"),o=e.ref(null),a=e.computed(()=>navigator.userAgent.indexOf("Firefox")!=-1?{contenteditable:u.value,onpaste:m=>m.preventDefault()}:{}),u=e.ref(!1),v=async()=>{var m;u.value=!0,await e.nextTick(),(m=o.value)==null||m.focus()},h=()=>{var c;const m=(c=o.value)==null?void 0:c.innerText;if(!m)return S();o.value&&(o.value.innerText=m),u.value=!1,t("update:name",m)},S=async()=>{o.value&&(o.value.innerText=r.name),u.value=!1},i=m=>{if(u.value||r.disabled)return;let c="selected";r.canExclude&&(m.ctrlKey||m.metaKey)&&(c="excluded"),r.state==c&&(c=""),c===""&&t("unselect"),c==="selected"&&t("select"),c==="excluded"&&t("exclude")};return(m,c)=>(e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-tagSelector_tagListItem":!0,"top-tagSelector_tagListItem-inEdit":u.value,"top-tagSelector_tagListItem-disabled":m.disabled,"top-tagSelector_tagListItem-canExclude":m.canExclude,"top-tagSelector-active":!!m.state,"top-tagSelector-excluded":m.state==="excluded"}),onClick:e.withModifiers(i,["stop"])},{default:e.withCtx(()=>[e.createVNode(D,{id:m.id,name:d.value,colorId:m.colorId,state:m.state},null,8,["id","name","colorId","state"]),e.createElementVNode("span",e.mergeProps({ref_key:"elName",ref:o,class:"top-tagSelector_tagListItemName",contenteditable:u.value?"plaintext-only":!1},a.value,{onKeydown:[e.withKeys(e.withModifiers(h,["stop"]),["enter"]),e.withKeys(e.withModifiers(S,["stop"]),["esc"])]}),e.toDisplayString(d.value),17,Ie),m.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.value?(e.openBlock(),e.createElementBlock("span",{key:1,"data-top-icon":"",class:"top-tagSelector_edit",onClick:e.withModifiers(h,["stop"])})):(e.openBlock(),e.createElementBlock("span",{key:0,"data-top-icon":"",class:"top-tagSelector_edit",onClick:v}))],64)):e.createCommentVNode("",!0)]),_:1},8,["class"]))}}),xe={key:1},ee=e.defineComponent({inheritAttrs:!1,__name:"popupOpener",props:e.mergeModels({modelValue:{},id:{},tags:{},mode:{},targetId:{},filters:{},useTopButton:{type:Boolean},payload:{},styling:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=l.useTopButton?x._sfc_main:"div",d=l.useTopButton?"html":"default",o={model:r,mode:l.mode,targetId:l.targetId,filters:l.filters,payload:l.payload};return(a,u)=>{const v=e.resolveDirective("top-data");return e.openBlock(),e.createBlock(E._sfc_main$2,{id:a.id},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),e.mergeProps({class:{"top-tagSelector":!0,"top-tagSelector-filter":l.mode==="filter","top-tagSelector-setter_single":l.mode==="setter"&&!a.filters,"top-tagSelector-setter_several":l.mode==="setter"&&a.filters,"top-tagSelector-selectedOne":!r.value.length||r.value.length===1,"top-tagSelector-toTwoLine":r.value.length>5},color:"theme",styling:a.styling},a.$attrs),{[e.unref(d)]:e.withCtx(()=>[!r.value.length&&a.mode==="filter"?(e.openBlock(),e.createBlock(D,{key:0,id:"all",colorId:"",name:a.$i18n.Common.All_tags??"",state:""},null,8,["name"])):e.createCommentVNode("",!0),a.mode==="setter"&&a.filters?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(a.$slots,"default")])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(r.value,h=>{var S,i;return e.openBlock(),e.createBlock(D,{id:e.unref(K)(h),colorId:((S=e.unref(O)(h,a.tags))==null?void 0:S.color_id)??"",name:((i=e.unref(O)(h,a.tags))==null?void 0:i.name)??"",state:e.unref(K)(h)===h?"selected":"excluded"},null,8,["id","colorId","name","state"])}),256))]),_:2},1040,["class","styling"])),[[v,o,"topTagSelectorTarget"]])]),_:3},8,["id"])}}}),Ce=e.defineComponent({__name:"tagSelector",props:e.mergeModels({modelValue:{},tags:{},tagsEditable:{type:Boolean},tagsMax:{default:10},id:{},singleMode:{type:Boolean},requiredForSetter:{type:Boolean,default:!0},maxTagsForSetter:{},emitDelay:{default:500},styling:{}},{modelValue:{required:!0},modelModifiers:{},tags:{default:e.reactive(Se)},tagsModifiers:{}}),emits:e.mergeModels(["selector","setter","tagsChanged"],["update:modelValue","update:tags"]),setup(n,{emit:l}){const r=x.useI18n(),t=n,d=e.useModel(n,"modelValue"),o=e.useModel(n,"tags"),a=l,u=x.debounce((s,g)=>{a(s,g)},t.emitDelay);t.singleMode&&!d.value.length&&(d.value=[o.value[0].id]);const v=t.id??"top-popup-id-"+Math.random(),h=e.ref("add"),S=()=>{var y;const s=" "+((y=r.Common.Tags)==null?void 0:y.toLowerCase()),g=new Map;return g.set("add",{value:"add",title:r.Common.Add+s}),g.set("replace",{value:"replace",title:r.Common.Replace+s}),g.set("delete",{value:"delete",title:r.Common.Delete+s}),g};let i=e.shallowRef({model:d,mode:"filter",targetId:void 0,filters:void 0,payload:void 0});e.watch(d,()=>{u("selector",d.value)});const m=e.computed(()=>{if(i.value.mode==="setter"&&t.maxTagsForSetter&&!i.value.filters)return i.value.model.value.length>=t.maxTagsForSetter}),c=s=>{if(s!=="all"){if(i.value.model.value.includes(s))return"selected";if(i.value.model.value.includes(X(s)))return"excluded"}return s==="all"&&!i.value.model.value.length?"selected":""},I=(s,g)=>{const y=X(s);let k=i.value.model.value.filter(M=>M!==s&&M!==y);g==="select"&&k.push(s),g==="exclude"&&k.push(y),i.value.mode==="setter"&&i.value.targetId!==void 0&&t.requiredForSetter&&(k.length||k.push("1"),k.length===2&&i.value.model.value.length===1&&i.value.model.value[0]==="1"&&(k=k.filter(M=>M!=="1"))),t.singleMode&&!i.value.filters&&(k.length||(k=i.value.model.value),k.length>1&&(k=[k[k.length-1]])),k.sort((M,N)=>{if(!t.tags)return 0;const q=t.tags.findIndex(b=>b.id===M),R=t.tags.findIndex(b=>b.id===N);return q-R}),i.value.model.value=k,i.value.mode==="setter"&&i.value.targetId!==void 0&&u("setter",{tagsIds:k,targetId:i.value.targetId,payload:i.value.payload})},B=e.computed(()=>{let s="top-tagSelector_popup";return i.value.mode==="filter"&&(s+=" top-tagSelector_popup-filter"),i.value.mode==="setter"&&(s+=" top-tagSelector_popup-setter"),s}),C=()=>{const s=prompt("","New tag");if(!s||s==="New tag")return;const g=o.value.length+1;o.value.push({id:String(g),name:s,color_id:String((g-1)%10+1)}),a("tagsChanged",o.value)},V=s=>{var g;if(i.value=_.storage(s.elPopupOpener,"topTagSelectorTarget"),!i.value)throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");if(i.value.filters&&(h.value="add",i.value.model.value=[]),!((g=x.Core.$)!=null&&g.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}!x.Core.state.isMobile&&!x.Core.state.isMobileUA&&o.value&&$(s.elPopup).sortable({items:'li:has([data-tag_id]:not([data-tag_id="all"]))',cancel:'[contenteditable="plaintext-only"], [contenteditable="true"]',distance:10,stop:function(y,k){if(!o.value)return;const M=$(k.item).parent().find("[data-tag_id]"),N=[];M.each((q,R)=>{if(!o.value)return;const b=$(R).attr("data-tag_id");N.push(b)}),o.value.sort((q,R)=>{const b=N.findIndex(j=>j===q.id),Ke=N.findIndex(j=>j===R.id);return b-Ke}),u("tagsChanged",o.value)}})},f=s=>{var g;(g=x.Core.$)!=null&&g.ui.sortable&&$(s.elPopup).data("ui-sortable")&&$(s.elPopup).sortable("destroy")};return(s,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ee,{class:"top-as-selector",modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=y=>d.value=y),id:e.unref(v),tags:o.value,styling:s.styling,mode:"filter",useTopButton:""},null,8,["modelValue","id","tags","styling"]),e.createVNode(E._sfc_main,{id:e.unref(v),class:e.normalizeClass(B.value),onOpen:g[4]||(g[4]=y=>V(y)),onClose:g[5]||(g[5]=y=>f(y)),"transition-duration":50},e.createSlots({contentList:e.withCtx(()=>[e.unref(i).mode==="filter"&&!s.singleMode?(e.openBlock(),e.createBlock(Z,{key:0,id:"all",colorId:"",name:s.$i18n.Common.All_tags??"",state:e.unref(i).model.value.length?"":"selected",onSelect:g[3]||(g[3]=y=>e.unref(i).model.value=[])},null,8,["name","state"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createBlock(Z,{key:y.id,id:y.id,colorId:y.color_id,name:y.name,state:c(y.id),canExclude:e.unref(i).mode==="filter"&&!s.singleMode,editable:s.tagsEditable,disabled:m.value&&c(y.id)==="",onUnselect:k=>I(y.id,"unselect"),onSelect:k=>I(y.id,"select"),onExclude:k=>I(y.id,"exclude"),"onUpdate:name":k=>{y.name=k,e.unref(u)("tagsChanged",o.value)}},null,8,["id","colorId","name","state","canExclude","editable","disabled","onUnselect","onSelect","onExclude","onUpdate:name"]))),128)),s.tagsEditable&&o.value.length<s.tagsMax&&o.value.length<20?(e.openBlock(),e.createBlock(E._sfc_main$1,{key:1,"data-top-icon":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$i18n.Common.Add),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"header",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$4,{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=y=>h.value=y),options:S()},null,8,["modelValue","options"])]),key:"0"}:void 0,e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"footer",fn:e.withCtx(()=>[e.createVNode(x._sfc_main,{color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$i18n.Common.Cancel),1)]),_:1}),e.createVNode(x._sfc_main,{onClick:g[2]||(g[2]=y=>e.unref(u)("setter",{tagsIds:e.unref(i).model.value,filters:e.unref(i).filters,filtersAction:h.value,payload:e.unref(i).payload}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value==="add"?s.$i18n.Common.Add:"")+" "+e.toDisplayString(h.value==="replace"?s.$i18n.Common.Replace:"")+" "+e.toDisplayString(h.value==="delete"?s.$i18n.Common.Remove:""),1)]),_:1})]),key:"1"}:void 0]),1032,["id","class"])],64))}}),Be=(n,l)=>e.computed(()=>e.toValue(n).filter(d=>d.on>=0||d.id===l).map(d=>({value:d.id,title:d.url+` [${d.id}]`,icon:d.id===e.toValue(l)?"":"",content:d.name}))),Te=(n,l,r)=>{l||(l={id:n.id}),l.id=n.id;const t=ae.TopPopupWorker.genElPopupOpener("div",l);return t.classList.add("top-tagSelector"),n.useTopButton&&t.classList.add("top-button","top-color_theme"),n.mode==="filter"&&t.classList.add("top-tagSelector-filter"),n.mode==="setter"&&!n.filters&&t.classList.add("top-tagSelector-setter_single"),n.mode==="setter"&&n.filters&&t.classList.add("top-tagSelector-setter_several"),t.onclick=d=>{d.preventDefault(),d.stopPropagation(),t.onclick=null;const o=e.ref(n.modelValue),a={model:o,mode:n.mode,targetId:n.targetId,filters:n.filters,payload:n.payload};_.storage(t,"topTagSelectorTarget",a),delete t.dataset.topPopupDisabled,e.isRef(n.modelValue)||e.watch(o,()=>{n.modelValue=o.value,F(t,n,r)}),t.click()},e.isRef(n.modelValue)?e.watch(n.modelValue,()=>F(t,n,r)):_.storage(t,"topTagSelectorRender",d=>{n.modelValue=d;const o=_.storage(t,"topTagSelectorTarget");o&&(o.model.value=d),F(t,n,r)}),F(t,n,r),t},Ve=(n,l)=>{var r;(r=_.storage(n,"topTagSelectorRender"))==null||r(l)},F=(n,l,r)=>{var d;const t=e.unref(l.modelValue);if(n.classList.toggle("top-tagSelector-selectedOne",!t.length||t.length===1),n.classList.toggle("top-tagSelector-toTwoLine",t.length>5),l.mode==="setter"&&l.filters){n.innerHTML=`<div>${r}</div>`;return}if(n.innerHTML="",!t.length&&l.mode==="filter"){const o=te({id:"all",colorId:"",name:((d=x.useI18n().Common)==null?void 0:d.All_tags)??"",state:""});n.append(o)}t.forEach(o=>{var u,v;const a=te({id:K(o),colorId:((u=O(o,l.tags))==null?void 0:u.color_id)??"",name:((v=O(o,l.tags))==null?void 0:v.name)??"",state:K(o)===o?"selected":"excluded"});n.append(a)})},te=n=>{const l=document.createElement("div");return l.classList.add("top-tagSelector_tagIcon"),l.classList.toggle("top-tagSelector-active",!!n.state),l.classList.toggle("top-tagSelector-excluded",n.state==="excluded"),l.dataset.tag_id=n.id,l.dataset.tag_color_id=n.colorId,l.title=n.name,l},we=de,Me=he,be=Ce,Ee=ee,_e=D;T.TopSelectorCompetitors=we,T.TopSelectorRegion=Me,T.TopTagSelector=be,T.TopTagSelectorPopupOpener=Ee,T.TopTagSelectorTagIcon=_e,T.dialogSelectorRegions=Q,T.findRegion=H,T.genElTopTagSelectorPopupOpener=Te,T.genSearcherByKey=z,T.renderElTopTagSelectorPopupOpener=Ve,T.useItemsFromCompetitors=Be,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
//# sourceMappingURL=project.amd.js.map
|