@topvisor/ui 1.1.0-apiClient.29 → 1.1.0-apiClient.31
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-CUCQCH9e.es.js → core-B482nFrw.es.js} +45 -45
- package/.chunks/{core-CUCQCH9e.es.js.map → core-B482nFrw.es.js.map} +1 -1
- package/.chunks/core-BJ8wiRqj.amd.js +2 -0
- package/.chunks/{core-DQ7J2vig.amd.js.map → core-BJ8wiRqj.amd.js.map} +1 -1
- package/.chunks/{datepicker-U31BrqE_.es.js → datepicker-BiaXdEIn.es.js} +2 -2
- package/.chunks/{datepicker-U31BrqE_.es.js.map → datepicker-BiaXdEIn.es.js.map} +1 -1
- package/.chunks/{datepicker-DsKl-YZR.amd.js → datepicker-DUoArkDy.amd.js} +2 -2
- package/.chunks/{datepicker-DsKl-YZR.amd.js.map → datepicker-DUoArkDy.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-C9751c-B.es.js → dialog_selectorRegions-1EF8brzp.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-C9751c-B.es.js.map → dialog_selectorRegions-1EF8brzp.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-DcPd0Spw.amd.js → dialog_selectorRegions-D0pv7wDB.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-DcPd0Spw.amd.js.map → dialog_selectorRegions-D0pv7wDB.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CXghec6S.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CJrXpeqH.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CXghec6S.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-CJrXpeqH.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DjuN_1ox.es.js → dialogs.vue_vue_type_script_setup_true_lang-Tm-wgTkj.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DjuN_1ox.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-Tm-wgTkj.es.js.map} +1 -1
- package/.chunks/{forms-DRhpgERJ.amd.js → forms-CgtkdwgA.amd.js} +3 -3
- package/.chunks/forms-CgtkdwgA.amd.js.map +1 -0
- package/.chunks/{forms-t2AEUjqg.es.js → forms-DarRVke_.es.js} +461 -467
- package/.chunks/forms-DarRVke_.es.js.map +1 -0
- package/.chunks/index-BEI7XZmU.amd.js +2 -0
- package/.chunks/index-BEI7XZmU.amd.js.map +1 -0
- package/.chunks/index-igPkes8X.es.js +48 -0
- package/.chunks/index-igPkes8X.es.js.map +1 -0
- package/.chunks/lazy-BAwNwrGd.amd.js +2 -0
- package/.chunks/lazy-BAwNwrGd.amd.js.map +1 -0
- package/.chunks/lazy-DtvYwspC.es.js +70 -0
- package/.chunks/lazy-DtvYwspC.es.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js → listItem.vue_vue_type_script_setup_true_lang-CT-EXxJj.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CT-EXxJj.amd.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js → listItem.vue_vue_type_script_setup_true_lang-DzJ_pc-d.es.js} +4 -4
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js.map → listItem.vue_vue_type_script_setup_true_lang-DzJ_pc-d.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js → menu.vue_vue_type_style_index_0_lang-BLMYjYLV.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js.map → menu.vue_vue_type_style_index_0_lang-BLMYjYLV.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js → menu.vue_vue_type_style_index_0_lang-COD_4iTy.es.js} +10 -10
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js.map → menu.vue_vue_type_style_index_0_lang-COD_4iTy.es.js.map} +1 -1
- package/.chunks/{notice-DQ9qFyQ2.amd.js → notice-CPtAnc7p.amd.js} +2 -2
- package/.chunks/{notice-DQ9qFyQ2.amd.js.map → notice-CPtAnc7p.amd.js.map} +1 -1
- package/.chunks/{notice-4bdzRXtl.es.js → notice-fno9saBY.es.js} +2 -2
- package/.chunks/{notice-4bdzRXtl.es.js.map → notice-fno9saBY.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DseS_zy8.es.js → page.vue_vue_type_script_setup_true_lang-DC7QbOC6.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DseS_zy8.es.js.map → page.vue_vue_type_script_setup_true_lang-DC7QbOC6.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D4tsfsex.amd.js → page.vue_vue_type_script_setup_true_lang-pvKeKz1R.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D4tsfsex.amd.js.map → page.vue_vue_type_script_setup_true_lang-pvKeKz1R.amd.js.map} +1 -1
- package/.chunks/{popup-DuraSW2f.es.js → popup-AG94kehM.es.js} +2 -2
- package/.chunks/{popup-DuraSW2f.es.js.map → popup-AG94kehM.es.js.map} +1 -1
- package/.chunks/{popup-IcMnYYXr.amd.js → popup-CtvJLWn3.amd.js} +2 -2
- package/.chunks/{popup-IcMnYYXr.amd.js.map → popup-CtvJLWn3.amd.js.map} +1 -1
- package/.chunks/{utils-g7NSc8VW.amd.js → utils-CcwDLCqy.amd.js} +2 -2
- package/.chunks/{utils-g7NSc8VW.amd.js.map → utils-CcwDLCqy.amd.js.map} +1 -1
- package/.chunks/{utils-Ct2fnz3h.es.js → utils-DK64hOew.es.js} +2 -2
- package/.chunks/{utils-Ct2fnz3h.es.js.map → utils-DK64hOew.es.js.map} +1 -1
- package/.chunks/{utils-Bl2P0srR.es.js → utils-HUbJl4_u.es.js} +3 -3
- package/.chunks/{utils-Bl2P0srR.es.js.map → utils-HUbJl4_u.es.js.map} +1 -1
- package/.chunks/{utils-16CqqvVO.amd.js → utils-ankLRpHu.amd.js} +2 -2
- package/.chunks/{utils-16CqqvVO.amd.js.map → utils-ankLRpHu.amd.js.map} +1 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js +2 -0
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js.map +1 -0
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-xwjgBq1L.es.js +39 -0
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-xwjgBq1L.es.js.map +1 -0
- package/.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js +2 -0
- package/.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js.map +1 -0
- package/api/additional.d.ts +2 -0
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.d.ts +2 -0
- package/api/index.js +110 -100
- package/api/index.js.map +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.d.ts +2 -0
- package/charts/charts.js +11 -11
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.d.ts +2 -0
- package/core/app.js +5 -5
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.d.ts +2 -0
- package/dialog/dialog.js +2 -2
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.d.ts +2 -0
- package/extra/extra.js +3 -3
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.d.ts +2 -0
- package/forms/forms.js +7 -7
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.d.ts +2 -0
- package/formsExt/formsExt.js +130 -128
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.d.ts +2 -0
- package/layout/layout.js +29 -29
- package/layout/layout.js.map +1 -1
- package/package.json +4 -13
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.d.ts +2 -0
- package/popup/popup.js +76 -108
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.d.ts +2 -0
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.d.ts +2 -0
- package/project/project.js +244 -244
- package/project/project.js.map +1 -1
- package/src/api/api/tests/types.test-d.d.ts +1 -0
- package/{types → src}/api/api/types/api.d.ts +6 -1
- package/{types → src}/api/api/utils/lazy.d.ts +10 -1
- package/src/components/charts/charts.d.ts +2 -0
- package/src/components/extra/extra.d.ts +1 -0
- package/src/components/forms/forms.d.ts +15 -0
- package/src/components/formsExt/formsExt.d.ts +8 -0
- package/src/components/layout/layout.d.ts +4 -0
- package/src/components/popup/popup.d.ts +7 -0
- package/src/components/project/project.d.ts +9 -0
- package/src/components/tabs/tabs.d.ts +3 -0
- package/src/components/tabsView/tabsView.d.ts +3 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.d.ts +2 -0
- package/tabs/tabs.js +14 -14
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.d.ts +2 -0
- package/tabsView/tabsView.js +48 -47
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.d.ts +2 -0
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.d.ts +2 -0
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.d.ts +2 -0
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.d.ts +2 -0
- package/utils/device.js +4 -4
- package/utils/dom.d.ts +6 -0
- package/utils/image.d.ts +2 -0
- package/utils/keyboard.d.ts +2 -0
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.d.ts +2 -0
- package/utils/lodash.js +1 -1
- package/utils/number.d.ts +2 -0
- package/utils/price.amd.js +1 -1
- package/utils/price.d.ts +2 -0
- package/utils/price.js +1 -1
- package/utils/route.d.ts +2 -0
- package/utils/scroll.d.ts +2 -0
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.d.ts +2 -0
- package/utils/searchers.js +3 -3
- package/utils/store.d.ts +2 -0
- package/utils/string.amd.js +1 -1
- package/utils/string.d.ts +2 -0
- package/utils/string.js +1 -1
- package/utils/system.d.ts +2 -0
- package/utils/url.d.ts +2 -0
- package/.chunks/core-DQ7J2vig.amd.js +0 -2
- package/.chunks/forms-DRhpgERJ.amd.js.map +0 -1
- package/.chunks/forms-t2AEUjqg.es.js.map +0 -1
- package/.chunks/index-BYqko24e.amd.js +0 -2
- package/.chunks/index-BYqko24e.amd.js.map +0 -1
- package/.chunks/index-Dfn40Qy3.es.js +0 -48
- package/.chunks/index-Dfn40Qy3.es.js.map +0 -1
- package/.chunks/lazy-CiM2Ny-s.amd.js +0 -2
- package/.chunks/lazy-CiM2Ny-s.amd.js.map +0 -1
- package/.chunks/lazy-Crun7esL.es.js +0 -39
- package/.chunks/lazy-Crun7esL.es.js.map +0 -1
- package/types/api/additional.d.ts +0 -2
- package/types/api/api/tests/model.d.ts +0 -0
- package/types/api/api/tests/test.d.ts +0 -16
- package/types/api/index.d.ts +0 -2
- package/types/charts/charts.d.ts +0 -2
- package/types/components/charts/charts.d.ts +0 -5
- package/types/components/extra/extra.d.ts +0 -3
- package/types/components/forms/forms.d.ts +0 -31
- package/types/components/formsExt/formsExt.d.ts +0 -17
- package/types/components/layout/layout.d.ts +0 -9
- package/types/components/popup/popup.d.ts +0 -15
- package/types/components/project/project.d.ts +0 -15
- package/types/components/tabs/tabs.d.ts +0 -7
- package/types/components/tabsView/tabsView.d.ts +0 -7
- package/types/dialog/dialog.d.ts +0 -2
- package/types/extra/extra.d.ts +0 -2
- package/types/for-delete/core.d.ts +0 -1
- package/types/for-delete/dark-positions.d.ts +0 -1
- package/types/for-delete/dark-th-positions.d.ts +0 -1
- package/types/for-delete/dark-th.d.ts +0 -1
- package/types/for-delete/dark.d.ts +0 -1
- package/types/for-delete/light-positions.d.ts +0 -1
- package/types/for-delete/light.d.ts +0 -1
- package/types/forms/forms.d.ts +0 -2
- package/types/formsExt/formsExt.d.ts +0 -2
- package/types/layout/layout.d.ts +0 -2
- package/types/popup/popup.d.ts +0 -2
- package/types/popup/worker.d.ts +0 -2
- package/types/project/project.d.ts +0 -2
- package/types/tabs/tabs.d.ts +0 -2
- package/types/tabsView/tabsView.d.ts +0 -2
- package/types/utils/check.d.ts +0 -2
- package/types/utils/clipboard.d.ts +0 -2
- package/types/utils/date.d.ts +0 -2
- package/types/utils/device.d.ts +0 -2
- package/types/utils/dom.d.ts +0 -6
- package/types/utils/image.d.ts +0 -2
- package/types/utils/keyboard.d.ts +0 -2
- package/types/utils/lodash.d.ts +0 -2
- package/types/utils/number.d.ts +0 -2
- package/types/utils/price.d.ts +0 -2
- package/types/utils/route.d.ts +0 -2
- package/types/utils/scroll.d.ts +0 -2
- package/types/utils/searchers.d.ts +0 -2
- package/types/utils/store.d.ts +0 -2
- package/types/utils/string.d.ts +0 -2
- package/types/utils/system.d.ts +0 -2
- package/types/utils/url.d.ts +0 -2
- package/assets/{popup.css → widgetInput.css} +0 -0
- package/{types/forms → forms}/helpers.d.ts +0 -0
- package/{types → src}/api/api/additional.d.ts +0 -0
- package/{types → src}/api/api/client/client.d.ts +0 -0
- package/{types → src}/api/api/client/request-options.d.ts +0 -0
- package/{types → src}/api/api/client/request.d.ts +0 -0
- package/{types → src}/api/api/index.d.ts +0 -0
- package/{types → src}/api/api/mocker/index.d.ts +0 -0
- package/{types → src}/api/api/types/client/client.d.ts +0 -0
- package/{types → src}/api/api/types/client/middleware.d.ts +0 -0
- package/{types → src}/api/api/types/client/options.d.ts +0 -0
- package/{types → src}/api/api/types/client/request-context.d.ts +0 -0
- package/{types → src}/api/api/types/client/request-options.d.ts +0 -0
- package/{types → src}/api/api/types/client/request.d.ts +0 -0
- package/{types → src}/api/api/types/ext.d.ts +0 -0
- package/{types → src}/api/api/types/field.d.ts +0 -0
- package/{types → src}/api/api/types/index.d.ts +0 -0
- package/{types → src}/api/api/types/mocker.d.ts +0 -0
- package/{types → src}/api/api/types/schema.d.ts +0 -0
- package/{types → src}/api/api/types/tv.d.ts +4 -4
- /package/{types → src}/api/api/types/utils.d.ts +0 -0
- /package/{types → src}/api/api/utils/common.d.ts +0 -0
- /package/{types → src}/api/api/utils/field.d.ts +0 -0
- /package/{types → src}/api/api/utils/filters.d.ts +0 -0
- /package/{types → src}/components/charts/miniChart/miniChart.vue.d.ts +0 -0
- /package/{types → src}/components/charts/miniChart/types.d.ts +0 -0
- /package/{types → src}/components/charts/miniChart/utils/consts.d.ts +0 -0
- /package/{types → src}/components/charts/miniCharts/miniCharts.d.ts +0 -0
- /package/{types → src}/components/charts/miniCharts/miniCharts.vue.d.ts +0 -0
- /package/{types → src}/components/core/notice/item/item.vue.d.ts +0 -0
- /package/{types → src}/components/core/notice/item/types.d.ts +0 -0
- /package/{types → src}/components/core/notice/notice.vue.d.ts +0 -0
- /package/{types → src}/components/core/notice/types.d.ts +0 -0
- /package/{types → src}/components/core/notice/utils.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/composables/asyncDialogHandle.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/composables/dialogHandle.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/composables/types.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/composables/utils.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/dialog.vue.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/dialogs/dialogs.vue.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/page/page.vue.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/page/types.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/pageComponent/pageComponent.vue.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/pageComponent/types.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog/types.d.ts +0 -0
- /package/{types → src}/components/dialog/dialog.d.ts +0 -0
- /package/{types → src}/components/dialog/lib/types.d.ts +0 -0
- /package/{types → src}/components/dialog/lib/utils.d.ts +0 -0
- /package/{types → src}/components/dialog/lib/utils.globalEvents.d.ts +0 -0
- /package/{types → src}/components/dialog/lib/worker.d.ts +0 -0
- /package/{types → src}/components/extra/rive/rive.vue.d.ts +0 -0
- /package/{types → src}/components/extra/rive/types.d.ts +0 -0
- /package/{types → src}/components/forms/avatar/avatar.vue.d.ts +0 -0
- /package/{types → src}/components/forms/avatar/types.d.ts +0 -0
- /package/{types → src}/components/forms/button/button.vue.d.ts +0 -0
- /package/{types → src}/components/forms/button/types.d.ts +0 -0
- /package/{types → src}/components/forms/caption/caption.vue.d.ts +0 -0
- /package/{types → src}/components/forms/caption/types.d.ts +0 -0
- /package/{types → src}/components/forms/checkbox/checkbox.vue.d.ts +0 -0
- /package/{types → src}/components/forms/checkbox/types.d.ts +0 -0
- /package/{types → src}/components/forms/controlLabel/controlLabel.vue.d.ts +0 -0
- /package/{types → src}/components/forms/controlLabel/types.d.ts +0 -0
- /package/{types → src}/components/forms/helpers.d.ts +0 -0
- /package/{types → src}/components/forms/hint/hint.vue.d.ts +0 -0
- /package/{types → src}/components/forms/hint/types.d.ts +0 -0
- /package/{types → src}/components/forms/input/input.vue.d.ts +0 -0
- /package/{types → src}/components/forms/input/types.d.ts +0 -0
- /package/{types → src}/components/forms/inputDate/datepicker.d.ts +0 -0
- /package/{types → src}/components/forms/inputDate/inputDate.vue.d.ts +0 -0
- /package/{types → src}/components/forms/inputDate/types.d.ts +0 -0
- /package/{types → src}/components/forms/inputRange/inputRange.vue.d.ts +0 -0
- /package/{types → src}/components/forms/inputRange/types.d.ts +0 -0
- /package/{types → src}/components/forms/loadbar/loadbar.vue.d.ts +0 -0
- /package/{types → src}/components/forms/preloader/preloader.vue.d.ts +0 -0
- /package/{types → src}/components/forms/preloader/types.d.ts +0 -0
- /package/{types → src}/components/forms/radio/radio.vue.d.ts +0 -0
- /package/{types → src}/components/forms/radio/types.d.ts +0 -0
- /package/{types → src}/components/forms/select/select.vue.d.ts +0 -0
- /package/{types → src}/components/forms/select/types.d.ts +0 -0
- /package/{types → src}/components/forms/switcher/switcher.vue.d.ts +0 -0
- /package/{types → src}/components/forms/switcher/types.d.ts +0 -0
- /package/{types → src}/components/forms/textarea/textarea.vue.d.ts +0 -0
- /package/{types → src}/components/forms/textarea/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/checkboxGroup/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/editArea/editArea.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/editArea/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/editInput/editInput.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/editInput/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/info/info.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/info/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/menu/menu.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/menu/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/policy/policy.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/policy/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/radioGroup/radioGroup.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/radioGroup/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/composables/useAPI.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/composables/useMenu.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/itemMulti.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/selector2.vue.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/types.d.ts +0 -0
- /package/{types → src}/components/formsExt/selector2/utils.d.ts +0 -0
- /package/{types → src}/components/layout/islandRows/islandRows.vue.d.ts +0 -0
- /package/{types → src}/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +0 -0
- /package/{types → src}/components/layout/islandRows/islandRowsRow/types.d.ts +0 -0
- /package/{types → src}/components/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +0 -0
- /package/{types → src}/components/layout/islandRows/types.d.ts +0 -0
- /package/{types → src}/components/layout/rows/rows.vue.d.ts +0 -0
- /package/{types → src}/components/layout/rows/types.d.ts +0 -0
- /package/{types → src}/components/popup/alert/alert.vue.d.ts +0 -0
- /package/{types → src}/components/popup/alert/types.d.ts +0 -0
- /package/{types → src}/components/popup/confirm/confirm.vue.d.ts +0 -0
- /package/{types → src}/components/popup/confirm/types.d.ts +0 -0
- /package/{types → src}/components/popup/lib/popup.d.ts +0 -0
- /package/{types → src}/components/popup/lib/popup.globalEvents.d.ts +0 -0
- /package/{types → src}/components/popup/lib/worker.d.ts +0 -0
- /package/{types → src}/components/popup/lib/worker.globalEvents.d.ts +0 -0
- /package/{types → src}/components/popup/popup/listItem.vue.d.ts +0 -0
- /package/{types → src}/components/popup/popup/opener.vue.d.ts +0 -0
- /package/{types → src}/components/popup/popup/popup.vue.d.ts +0 -0
- /package/{types → src}/components/popup/popup/types.d.ts +0 -0
- /package/{types → src}/components/popup/popup/widgetInput.vue.d.ts +0 -0
- /package/{types → src}/components/popup/prompt/prompt.vue.d.ts +0 -0
- /package/{types → src}/components/popup/prompt/types.d.ts +0 -0
- /package/{types → src}/components/popup/worker.d.ts +0 -0
- /package/{types → src}/components/project/selectorCompetitors/composables.d.ts +0 -0
- /package/{types → src}/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +0 -0
- /package/{types → src}/components/project/selectorCompetitors/types.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/composables/compare.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/composables/selectRegion.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/composables/selectSearcher.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/composables/selectorRegion.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/selectorRegion.vue.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/types.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/utils/consts.d.ts +0 -0
- /package/{types → src}/components/project/selectorRegion/utils/utils.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/popupListItem/types.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/popupOpener/popupOpener.vue.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/popupOpener/types.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/tagIcon/tagIcon.vue.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/tagIcon/types.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/tagSelector.vue.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/tagsDefaults.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/types.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/utils/el.d.ts +0 -0
- /package/{types → src}/components/project/tagSelector/utils/utils.d.ts +0 -0
- /package/{types → src}/components/tabs/tabs/content.vue.d.ts +0 -0
- /package/{types → src}/components/tabs/tabs/tab.vue.d.ts +0 -0
- /package/{types → src}/components/tabs/tabs/tabs.vue.d.ts +0 -0
- /package/{types → src}/components/tabs/tabs/types.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/menu.vue.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/menuDelimeter.vue.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/menuItem.vue.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/menuTitle.vue.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/store.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/tabsView.vue.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/types.d.ts +0 -0
- /package/{types → src}/components/tabsView/tabsView/utils.d.ts +0 -0
- /package/{types → src}/core/app.d.ts +0 -0
- /package/{types → src}/core/core/core.d.ts +0 -0
- /package/{types → src}/core/core/events/resize.d.ts +0 -0
- /package/{types → src}/core/core/events.d.ts +0 -0
- /package/{types → src}/core/core/options.d.ts +0 -0
- /package/{types → src}/core/core/preloaders.d.ts +0 -0
- /package/{types → src}/core/core/state.d.ts +0 -0
- /package/{types → src}/core/directives/data.d.ts +0 -0
- /package/{types → src}/core/directives/focus.d.ts +0 -0
- /package/{types → src}/core/directives/preloader.d.ts +0 -0
- /package/{types → src}/core/directives/scrollIntoView.d.ts +0 -0
- /package/{types → src}/core/directives/scrollShadow.d.ts +0 -0
- /package/{types → src}/core/directives/sticky.d.ts +0 -0
- /package/{types → src}/core/directives/swimUp.d.ts +0 -0
- /package/{types → src}/core/directives/tooltip.d.ts +0 -0
- /package/{types → src}/core/plugins/core.d.ts +0 -0
- /package/{types → src}/core/plugins/i18n.d.ts +0 -0
- /package/{types → src}/core/plugins/piniaTPA.d.ts +0 -0
- /package/{types → src}/core/utils/check.d.ts +0 -0
- /package/{types → src}/core/utils/clipboard.d.ts +0 -0
- /package/{types → src}/core/utils/date.d.ts +0 -0
- /package/{types → src}/core/utils/device.d.ts +0 -0
- /package/{types → src}/core/utils/dom.d.ts +0 -0
- /package/{types → src}/core/utils/image.d.ts +0 -0
- /package/{types → src}/core/utils/keyboard.d.ts +0 -0
- /package/{types → src}/core/utils/lodash.d.ts +0 -0
- /package/{types → src}/core/utils/number.d.ts +0 -0
- /package/{types → src}/core/utils/price.d.ts +0 -0
- /package/{types → src}/core/utils/route.d.ts +0 -0
- /package/{types → src}/core/utils/scroll.d.ts +0 -0
- /package/{types → src}/core/utils/searchers.d.ts +0 -0
- /package/{types → src}/core/utils/store/localStorage.d.ts +0 -0
- /package/{types → src}/core/utils/store/plugin.d.ts +0 -0
- /package/{types → src}/core/utils/store/store.d.ts +0 -0
- /package/{types → src}/core/utils/store.d.ts +0 -0
- /package/{types → src}/core/utils/string.d.ts +0 -0
- /package/{types → src}/core/utils/system.d.ts +0 -0
- /package/{types → src}/core/utils/url.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-Bl2P0srR.es.js","sources":["../../src/storybook/jquery.ts","../../src/components/dialog/lib/utils.globalEvents.ts","../../src/components/dialog/lib/utils.ts"],"sourcesContent":["/**\n * см. /.storybook/preview-head.html\n */\nexport default $;\n","import { TopDialogUtils } from './utils';\nimport { TopDialogWorker } from './worker';\nimport { isVisible, querySelectorAllArray, querySelectorVisible } from '@/core/utils/dom';\nimport { historySetState } from '@/core/utils/route';\nimport type { ElTopDialog, ElTopDialogWrapper } from '@/components/dialog/lib/types';\n\nlet inited = false;\n\n/**\n * Инициализация глобальных событий для диалоговых окон\n *\n * Производится один раз при подключении диалогового окна\n *\n * События не размонтируются\n */\nexport const initDialogGlobalEvents = () => {\n\tif (inited) return;\n\tinited = true;\n\n\t/**\n\t * Закрытие диалога по Esc\n\t */\n\tdocument.addEventListener('keydown', (e) => {\n\t\tif (e.key !== 'Escape') return;\n\t\tif (!e.target) return;\n\n\t\tconst el = e.target as HTMLElement;\n\n\t\t// событие произошло вне диалогового окна\n\t\tif (!el.closest('.ui-dialog')) return;\n\n\t\tif (el.contentEditable === 'true' || el.contentEditable === 'plaintext-only') return;\n\n\t\t// не закрывать окно при открытом TopPopup\n\t\tif (querySelectorVisible(document.documentElement, '.top-popup-wrapper')) return;\n\n\t\t// не закрывать окно при работе с jquery autocomplete\n\t\tif (el.classList.contains('autocomplete')) return;\n\n\t\t// не закрывать окно при открытом fancybox\n\t\tif (querySelectorVisible(document.documentElement, '.fancybox-container')) return;\n\n\t\tconst elDialogs = querySelectorAllArray<ElTopDialog>(document, '.ui-dialog-content').filter((elDialog) => {\n\t\t\treturn isVisible(elDialog);\n\t\t});\n\n\t\t$(elDialogs[elDialogs.length - 1]).dialog('close');\n\t});\n\n\t/**\n\t * Закрытие диалога по кнопке закрыть\n\t */\n\tdocument.addEventListener('click', (e) => {\n\t\t// // навигация без истории\n\t\t// var $dialog = $(this).closest('.ui-dialog-content');\n\t\t// var viewName = $dialog.attr('id');\n\t\t// var pageName = getHash('view-' + viewName);\n\t\t// if (!pageName) {\n\t\t// \ttoPrevPage($dialog);\n\t\t//\n\t\t// \treturn;\n\t\t// }\n\t\t//\n\t\t// // навигация по истории\n\t\t// if (Core.state.isMobile && history.length > 1 && $(this).closest('.modal-layer').length) {\n\t\t// \tvar href = location.href;\n\t\t//\n\t\t// \thistory.go(-1);\n\t\t//\n\t\t// \tsetTimeout(() => {\n\t\t// \t\t// это первая страница в истории вкладки браузера\n\t\t// \t\tif (href === location.href) $(e.target).closest('.ui-dialog-content').dialog('close');\n\t\t// \t});\n\t\t// } else {\n\t\t// \t$(this).closest('.ui-dialog-content').dialog('close');\n\t\t// }\n\n\t\tconst el = (e.target as HTMLElement).closest('[data-action=\"top-dialog-close\"]') as HTMLElement | null;\n\t\tif (!el) return;\n\n\t\te.preventDefault();\n\n\t\tconst elDialog = el.closest<ElTopDialog>('.ui-dialog-content');\n\t\tif (!elDialog) return;\n\n\t\t// если к кнопке привязана ссылка, диалоговое окно не нужно закрывать\n\t\tconst toView = el.dataset.toView;\n\n\t\tif (toView == 'toPrevPage()') {\n\t\t\tTopDialogUtils.toPrevPage(elDialog);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (toView) {\n\t\t\tconst viewNameAndPageLink = toView.split('-');\n\t\t\tconst viewName = viewNameAndPageLink.shift();\n\t\t\tconst pageLink = viewNameAndPageLink.join('-');\n\n\t\t\tif (!viewName) return;\n\n\t\t\tconst elDialog = TopDialogUtils.getElDialogById(viewName);\n\t\t\tif (!elDialog) return;\n\n\t\t\tconst elToPages = querySelectorAllArray(elDialog, `[data-view-page=\"${pageLink}\"]`);\n\t\t\tif (!elToPages) return;\n\n\t\t\tif (!isVisible(elToPages[0])) {\n\t\t\t\tconst hash = TopDialogWorker.genViewPageHash(toView, 'prev');\n\n\t\t\t\t// // не убирает кнопку \"Вперед\" в браузере\n\t\t\t\t// history.replaceState(null, '', hash);\n\t\t\t\t// toViewDirty(toView, 'prev');\n\n\t\t\t\t// // добавляет текущую страницу в историю браузера\n\t\t\t\thistorySetState(false, hash);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst $dialog = $(elDialog);\n\n\t\t$dialog.dialog('close');\n\t});\n\n\t/**\n\t * Все submit должны обрабатываться через js\n\t */\n\tdocument.addEventListener('submit', (e) => {\n\t\tconst elForm = e.target as HTMLElement;\n\n\t\tif (elForm.matches('.modal-body > form') || elForm.matches('.modal-layer-body > form')) {\n\t\t\te.preventDefault();\n\t\t}\n\t});\n\n\t/**\n\t * Выполнение действия по нажатию Enter\n\t *\n\t * @todo Убрать `.searcher`\n\t */\n\tdocument.addEventListener('keypress', (e) => {\n\t\tconst eventTarget = e.target as HTMLElement;\n\n\t\tconst elModalBody = eventTarget.closest('.ui-dialog .modal-body');\n\t\tif (!elModalBody) return;\n\n\t\tconst isInput =\n\t\t\teventTarget.matches('input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)')\n\t\t\t|| eventTarget.hasAttribute('contenteditable');\n\t\tif (!isInput) return;\n\n\t\t// if (e.keyCode !== 10 && e.key !== 'ENTER') return;\n\t\tif (e.key !== 'Enter') return;\n\n\t\t// не выполнять submit действий при работе с jquery autocomplete\n\t\tif (eventTarget.classList.contains('autocomplete')) {\n\t\t\te.preventDefault();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventTarget.tagName === 'TEXTAREA') {\n\t\t\tif (!e.ctrlKey && !e.metaKey) return;\n\n\t\t\tconst elForm = eventTarget.closest('form');\n\n\t\t\tif (elForm) {\n\t\t\t\t// Find visible submit buttons\n\t\t\t\tconst elSubmitButton = querySelectorAllArray(elForm, 'button[type=\"submit\"]')\n\t\t\t\t\t.concat(querySelectorAllArray(elForm, 'input[type=\"submit\"]'))\n\t\t\t\t\t.find((elSubmitButton) => {\n\t\t\t\t\t\treturn isVisible(elSubmitButton);\n\t\t\t\t\t});\n\n\t\t\t\telSubmitButton?.click();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Закрытие диалога по клику вне окна\n\t */\n\tdocument.addEventListener('click', function (event) {\n\t\tconst eventTarget = event.target as HTMLElement;\n\n\t\tif (!eventTarget.classList.contains('ui-widget-overlay')) return;\n\n\t\tlet elDialogWrapperWithTopZIndex: ElTopDialogWrapper | undefined;\n\t\tlet topZIndex = 0;\n\n\t\tconst elDialogWrapperVisibles = querySelectorAllArray<ElTopDialogWrapper>(document, '.ui-dialog').filter((elDialogWrapper) => {\n\t\t\treturn isVisible(elDialogWrapper);\n\t\t});\n\n\t\telDialogWrapperVisibles.forEach((elDialogWrapper) => {\n\t\t\tconst zIndex = Number(window.getComputedStyle(elDialogWrapper).zIndex);\n\t\t\tif (zIndex < topZIndex) return;\n\n\t\t\telDialogWrapperWithTopZIndex = elDialogWrapper;\n\t\t\ttopZIndex = zIndex;\n\t\t});\n\n\t\tif (elDialogWrapperWithTopZIndex) {\n\t\t\tconst elDialog = elDialogWrapperWithTopZIndex.querySelector('.ui-dialog-content');\n\n\t\t\t$(elDialog).dialog('close');\n\t\t}\n\t});\n\n\twindow.addEventListener('resize', TopDialogUtils.recalcPositions);\n\tTopDialogUtils.recalcPositions();\n};\n","import 'jquery';\nimport { nextTick } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { TopPopupWorker } from '@/components/popup/worker';\nimport { sleep, waitWhile } from '@/core/utils/system';\nimport { setHashs } from '@/core/utils/route';\nimport { connectScrollShadow } from '@/core/utils/scroll';\n\nimport type { ElTopDialogBody, ElTopDialog, ElTopDialogModalLayer, ElTopDialogPage, MoveDirection, ElTopDialogWrapper } from './types';\nimport { TopDialogWorker } from './worker';\nimport { initDialogGlobalEvents } from './utils.globalEvents';\nimport { getDialogWorker } from '../dialog/dialogs/dialogs.vue';\n\nimport css from '../dialog/style/dialog.css?inline';\nimport cssM from '../dialog/style/dialog.m.css?inline';\nimport cssPC from '../dialog/style/dialog.pc.css?inline';\nimport cssModern from '../dialog/style/modern/dialog.css?inline';\nimport cssModernPC from '../dialog/style/modern/dialog.pc.css?inline';\nimport { isVisible, querySelectorAllArray } from '@/core/utils/dom';\n\nCore.insertStyleToPage(css);\nCore.insertStyleToPage(cssM, 'm');\nCore.insertStyleToPage(cssPC, 'pc');\nCore.insertStyleToPage(cssModern);\nCore.insertStyleToPage(cssModernPC, 'pc');\n\nlet timerClearAnimation: NodeJS.Timeout;\nlet isInited = false;\n\n/**\n * Является ли элемент JQuery<HTMLElement>\n */\nconst isElJQuery = (el: JQuery<HTMLElement> | HTMLElement | HTMLElement[]) => {\n\treturn !!el && typeof el === 'object' && 'jquery' in el;\n};\n\nconst init = () => {\n\t$.extend($.ui.dialog.prototype.options, {\n\t\tfocus: (e: any) => {\n\t\t\te.target.focus();\n\n\t\t\t$('[autofocus]', e.target)[0]?.focus();\n\n\t\t\t// setTimeout(function () {\n\t\t\t// \tif ($('[autofocus]', e.target).length) return;\n\t\t\t// \t$('.modal-footer button:first, .modal-body :input:first', e.target).eq(0).focus();\n\t\t\t//\n\t\t\t// \t// fix пропадающего autocomplete при нажатии на scroll в autocomplete\n\t\t\t// \t$(e.target).add($(e.target).closest('.ui-dialog')).removeAttr('tabindex');\n\t\t\t// });\n\t\t},\n\t\tcreate: (e: any) => onCreate(e.target),\n\t\topen: (e: any) => onOpen(e.target),\n\t\tclose: (e: any) => onClose(e.target),\n\t\tmodal: true,\n\t\tresizable: false,\n\t\tcloseOnEscape: false,\n\t\twidth: 'auto',\n\t\tminHeight: 0,\n\t});\n\n\t$.ui.dialog.prototype._focusTabbable = $.noop;\n\n\t$.ui.dialog.prototype._moveToTopOriginal = $.ui.dialog.prototype._moveToTop;\n\t$.ui.dialog.prototype._moveToTop = function () {\n\t\tthis._moveToTopOriginal();\n\n\t\tconst $dialog = $(this.element);\n\t\t$dialog.trigger('dialogsMoveToTop', [$dialog]);\n\t};\n\n\tinitDialogGlobalEvents();\n\n\tisInited = true;\n};\n\n/**\n * Получить настройки диалогового окна из Vue компонента\n */\nconst genVueOptions = (elDialog: ElTopDialog) => {\n\tconst options: {\n\t\tmodal?: boolean,\n\t\tposition?: any,\n\t} = {};\n\n\tif (elDialog.dataset?.modal === 'false') options.modal = false;\n\tif (elDialog.dataset?.position) options.position = JSON.parse(elDialog.dataset.position);\n\n\treturn options;\n};\n\nconst getElDialogById = (id: string) => {\n\treturn <ElTopDialog | null>document.getElementById(id);\n};\n\n/**\n * Сменить состояние диалогового окна Vue\n */\nconst updatePageVue = async (dialogId: string, pageName?: string, pageNameNext?: string) => {\n\tif (!dialogId.startsWith('dialog_')) return;\n\n\tconst dialog = getDialogWorker(dialogId);\n\tif (!dialog) return;\n\n\tdialog.isOpened.value = true;\n\tif (pageName !== undefined) dialog.pageActive.value = pageName;\n\tif (pageNameNext !== undefined) dialog.pageActiveNext.value = pageNameNext;\n\n\tawait nextTick();\n\n\tif (pageNameNext) {\n\t\tconst elDialog = getElDialogById(dialogId);\n\t\tif (!elDialog) return;\n\n\t\tconst elNextpages = elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`);\n\n\t\tif (!elNextpages.length) {\n\t\t\tawait waitWhile(() => !elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`).length);\n\t\t}\n\t}\n};\n\n/**\n * Callback for jQuery dialog onCreate\n */\nconst onCreate = (elDialog: ElTopDialog) => {\n\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\tif (!elDialogBody) return;\n\n\tconnectScrollShadow(elDialogBody);\n\n\tTopDialogWorker.state.decoratorOnCreate?.(elDialog);\n\n\tinitPopup(elDialog);\n};\n\n/**\n * Инициирование событий TopPopup в диалоговом окне\n */\nconst initPopup = (elDialog: HTMLElement) => {\n\t$(elDialog).on('aftershow.top-menu-popup', '[data-top-popup]', (_e, $popup) => {\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPopup = $popup[0];\n\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPageContents = TopDialogWorker.getPairPage(elPopup);\n\t\telPageContents?.[1]?.prepend(elPopup);\n\t});\n};\n\n/**\n * Callback for jQuery dialog onOpen\n */\nconst onOpen = async (elDialog: ElTopDialog) => {\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tconst w1 = window.innerWidth;\n\n\tCore.state.documentClassModificators.set('top-dialog', 'with_dialog');\n\n\tconst w2 = window.innerWidth;\n\n\tconst scrollBarWidth = w2 - w1;\n\tif (document.documentElement.scrollHeight > window.innerHeight) document.querySelector('html')!.style.marginRight = scrollBarWidth + 'px';\n\n\trecalcPositions();\n\n\tconst dialog = getDialogWorker(elDialog.getAttribute('id')!);\n\tdialog?.emit?.('open', pageName);\n};\n\n/**\n * Callback for jQuery dialog onClose\n */\nconst onClose = async (elDialog: ElTopDialog) => {\n\tconst viewName = elDialog.getAttribute('id');\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName) {\n\t\tconst hashData = {\n\t\t\tvpn: TopDialogWorker.state.viewPageN as number | null,\n\t\t\t['view-' + viewName]: null,\n\t\t};\n\t\thashData['view-' + viewName] = null;\n\n\t\tif (TopDialogWorker.state.viewPageN === 0 || TopDialogWorker.state.viewPageN === 1) {\n\t\t\thashData.vpn = null;\n\t\t}\n\n\t\tsetHashs(hashData, false);\n\t}\n\n\tconst elUiWidgetOverlayVisibles = querySelectorAllArray(document, '.ui-widget-overlay').filter((el) => {\n\t\treturn isVisible(el);\n\t});\n\n\tif (!elUiWidgetOverlayVisibles.length) {\n\t\tCore.state.documentClassModificators.delete('top-dialog');\n\n\t\tdocument.querySelector('html')!.style.marginRight = '';\n\t}\n\n\t$(elDialog).trigger('viewAfterClose', [$(elDialog)]);\n\n\tconst dialog = getDialogWorker(viewName);\n\n\tif (dialog) {\n\t\tdialog.isOpened.value = false;\n\t\tdialog.emit?.('close', pageName);\n\n\t\tif (dialog.onCloseOnce) {\n\t\t\tdialog.onCloseOnce(dialog.props, pageName);\n\t\t\tdialog.onCloseOnce = undefined;\n\t\t}\n\t}\n\n\t// после закрытия диалога может потребоваться пересчет позиций элементов\n\twindow.dispatchEvent(new Event('resize'));\n};\n\n/**\n * Пересчитать положения и размеры открытых диалоговых окон\n */\nconst recalcPositions = () => {\n\tconst elDialogVisibilityes = querySelectorAllArray(document, '.ui-dialog').filter((el) => {\n\t\treturn isVisible(el) && el.querySelector<ElTopDialog>(':scope > .ui-dialog-content');\n\t}).map((el) => {\n\t\treturn el.querySelector<ElTopDialog>(':scope > .ui-dialog-content')!;\n\t});\n\n\telDialogVisibilityes.forEach((elDialog) => {\n\t\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\t\tif (!elDialogBody) return;\n\n\t\tconst elDialogWrapper = elDialog.closest('.ui-dialog');\n\n\t\tconst options = genVueOptions(elDialog);\n\n\t\toptions.position ??= { of: window };\n\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('option', options);\n\n\t\telDialogWrapper.classList.remove('me-tightly');\n\t\tif ((elDialogWrapper.clientHeight ?? 0) > window.innerHeight) elDialogWrapper.classList.add('me-tightly');\n\t});\n};\n\n/**\n * Переход к view page по неразобранной ссылке в формате: {viewName}-{pageName}[:args]\n */\nconst toViewDirty = async (toViewPageName: string, moveDirection?: MoveDirection) => {\n\tconst regexp = /(\\w+)[=-]([\\w-]+)(?::([\\w.:-]+))?/g;\n\tconst toViewParts = regexp.exec(toViewPageName);\n\tif (toViewParts) {\n\t\tconst viewName = toViewParts[1];\n\t\tconst pageName = toViewParts[2];\n\t\tconst argsString = toViewParts[3];\n\n\t\tlet args: string[] = [];\n\t\tif (argsString) args = argsString.split(':');\n\n\t\tawait toView(viewName, pageName, args, moveDirection);\n\t}\n};\n\n/**\n * Открыть диалоговое окно, возможно указать нужную страницу\n * @param viewNameOrElDialog - id страницы окна или элемент окна\n * @param pageName - имя страницы\n * @param args - аргументы, набор проивзольных параметров, которые могут обрабатываться каждым окном по своему\n * @param moveDirection\n * @param callback - функция, которая будет запущена после октытия страницы\n */\nconst toView = async (\n\tviewNameOrElDialog: ElTopDialog | JQuery<ElTopDialog> | string,\n\tpageName?: string,\n\targs?: string[],\n\tmoveDirection?: MoveDirection,\n\tcallback?: Function,\n) => {\n\tif (!isInited) {\n\t\tawait new Promise<void>((resolve, _reject) => {\n\t\t\tconst timer = setInterval(() => {\n\t\t\t\tif (!isInited) return;\n\n\t\t\t\tclearInterval(timer);\n\n\t\t\t\tresolve();\n\t\t\t}, 10000);\n\t\t});\n\t}\n\n\tawait nextTick();\n\n\tlet elDialog: ElTopDialog | null;\n\tif (typeof (viewNameOrElDialog) === 'object') {\n\t\tif (isElJQuery(viewNameOrElDialog)) viewNameOrElDialog = viewNameOrElDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\t\telDialog = viewNameOrElDialog;\n\t} else {\n\t\telDialog = getElDialogById(viewNameOrElDialog);\n\t}\n\n\t// Диалоговое окно еще не загружено\n\tif (!elDialog && typeof (viewNameOrElDialog) == 'string' && TopDialogWorker.state.load) {\n\t\tawait TopDialogWorker.state.load(viewNameOrElDialog);\n\n\t\tawait toView(viewNameOrElDialog, pageName, args, moveDirection, callback);\n\n\t\treturn;\n\t}\n\n\tif (!elDialog) return;\n\n\tawait toViewPage(elDialog, pageName, args, moveDirection);\n\n\tconst $dialog = $(elDialog);\n\n\tif (elDialog?.classList.contains('ui-dialog-content')) {\n\t\t// var zIndexMax = 0;\n\t\t// $.map($('.ui-dialog'), function (el) {\n\t\t// \tvar zIndex = $(el).css('z-index') * 1;\n\t\t// \tif (zIndex > zIndexMax) zIndexMax = zIndex;\n\t\t// });\n\t\t//\n\t\t// if ($dialog.is(':hidden')) $dialog.dialog('open');\n\t\t//\n\t\t// var $dialogWrapper = $dialog.parent();\n\t\t// var $dialogOverlay = $dialogWrapper.next();\n\t\t//\n\t\t// if ($dialogWrapper.css('z-index') * 1 < zIndexMax) {\n\t\t// \t$dialogWrapper.css('z-index', zIndexMax + 2);\n\t\t// \t$dialogOverlay.css('z-index', zIndexMax + 1);\n\t\t// }\n\n\t\t$dialog.dialog('open');\n\t} else {\n\t\tconst options = genVueOptions(elDialog);\n\n\t\t$dialog.dialog(options);\n\t}\n\n\tif (callback) callback($dialog);\n};\n\nconst toViewPage = async (elDialog: ElTopDialog | JQuery<ElTopDialog>, pageName?: string, args?: string[], moveDirection?: MoveDirection) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\tif (pageName === undefined) pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName !== elDialog.dataset.viewPageActive) {\n\t\tconst stopped = stopAnimations(elDialog);\n\t\tif (stopped) await sleep(100);\n\t}\n\n\tif (args === undefined) args = [];\n\n\tawait updatePageVue(elDialog.getAttribute('id') as string, undefined, pageName);\n\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elNextPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elNextPage = elModalLayer.querySelector<ElTopDialogPage>(`:scope > [data-view-page=\"${pageName}\"]`);\n\t\tif (elNextPage) {\n\t\t\tacc.push(elNextPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst argsString = args.join(':');\n\n\tif (moveDirection === undefined) {\n\t\tmoveDirection = 'next';\n\t\tif ((elNextPages[0]?.dataset.order ?? 0) < (elCurrentPages[0]?.dataset.order ?? 0)) moveDirection = 'prev';\n\t}\n\n\tif (!elNextPages.length) return;\n\n\telDialog.dataset.viewPageActive = pageName;\n\n\t// запрашиваемая страница уже открыта\n\tif (elNextPages[0].classList.contains('active')) {\n\t\tif (elNextPages[0].dataset.viewPageArgs !== argsString) {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.dataset.viewPageArgs = argsString;\n\t\t\t});\n\n\t\t\t// dialogs.beforeOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t\t// dialogs.afterOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t}\n\n\t\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\t\treturn;\n\t}\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.dataset.viewPageArgs = argsString;\n\t});\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\tif (elCurrentPage.querySelector('.top-popup-wrapper')) {\n\t\t\tTopPopupWorker.close(elCurrentPage.querySelector('.top-popup-wrapper')!);\n\t\t}\n\t});\n\n\tconst elDialogWrapper = elNextPages[0].closest<ElTopDialogWrapper>('.ui-dialog');\n\n\tif (elDialogWrapper && !isVisible(elDialogWrapper)) moveDirection = 'none';\n\tif (!elCurrentPages.length) moveDirection = 'none';\n\tif (isVisible(elNextPages[0])) moveDirection = 'none';\n\n\tswitch (moveDirection) {\n\t\tcase 'prev': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage.classList.add('right-to-center', 'reverse');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('center-to-left', 'reverse');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive.nextSibling);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage?.classList.add('center-to-left');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('right-to-center');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\telDialog.setAttribute('view-page-active', pageName);\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\telCurrentPage.classList.remove('active');\n\t});\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.classList.add('active');\n\t});\n\n\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\tif (moveDirection) {\n\t\telDialog.classList.add('i-change-page');\n\n\t\tconst delay = Number(window.getComputedStyle(elNextPages[0]).animationDuration.replace('s', '')) * 1000;\n\n\t\ttimerClearAnimation = setTimeout(function () {\n\t\t\tupdatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\t\tstopAnimations(elDialog);\n\t\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\t}, delay);\n\t} else {\n\t\tawait updatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t}\n};\n\n/**\n * К предыдущему представлению\n */\nconst toPrevPage = (elDialog: ElTopDialog) => {\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elPrevPages = elCurrentPages.reduce<ElTopDialogPage[]>((acc, elCurrentPage) => {\n\t\tlet elPrevPage = elCurrentPage.previousElementSibling as ElTopDialogPage | null;\n\t\twhile (elPrevPage && !elPrevPage.hasAttribute('[data-view-page]')) {\n\t\t\telPrevPage = elPrevPage.previousElementSibling as ElTopDialogPage | null;\n\t\t}\n\n\t\tif (elPrevPage) acc.push(elPrevPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tconst prevPageName = (elPrevPages[0])?.dataset.viewPage;\n\n\tif (prevPageName) {\n\t\tvoid toViewPage(elDialog, prevPageName, undefined, 'prev');\n\t} else {\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('close');\n\t}\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst beforeOpenViewPageTimers = new Set();\nconst beforeOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\t// группировка цепочки событий\n\t// запрос на открытие страницы может выполняться несколько раз, чаще такое может быть при открытии, загрузке и переходе сразу к нужной странице\n\tconst eventKey = elDialog.getAttribute('id') + elPages[0].dataset.viewPage + pageName + args.join();\n\n\tif (beforeOpenViewPageTimers.has(eventKey)) return;\n\tbeforeOpenViewPageTimers.add(eventKey);\n\n\tsetTimeout(function () {\n\t\tbeforeOpenViewPageTimers.delete(eventKey);\n\n\t\t$(elDialog).trigger('viewBeforeOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst afterOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\tsetTimeout(function () {\n\t\t$(elDialog).trigger('viewAfterOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Получить состояние: Диалоговое окно находится в состоянии смены страницы\n */\nconst inAnimation = (elDialog: ElTopDialog | JQuery<ElTopDialog>) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elDialog.classList.contains('i-change-page');\n};\n\n/**\n * Остановить анимацию смены страницы\n *\n * @returns Вернет true, если анимация производилась и была остановлена\n */\nconst stopAnimations = (elDialog: ElTopDialog) => {\n\tif (!inAnimation(elDialog)) return false;\n\n\tclearTimeout(timerClearAnimation);\n\n\tconst elModalLayers = querySelectorAllArray(elDialog, '.modal-layer');\n\n\tconst pageName = elDialog.dataset.viewPageActive;\n\telDialog.classList.remove('i-change-page');\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelectorAll(':scope > [data-view-page]').forEach((el) => {\n\t\t\tel.classList.remove('center-to-left', 'right-to-center', 'reverse', 'active');\n\t\t});\n\t});\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelector(`:scope > [data-view-page=\"${pageName}\"]`)?.classList.add('active');\n\t});\n\n\treturn true;\n};\n\n/**\n * Закрыть диалоговое окно\n */\nconst close = function (dialogId: string) {\n\tconst elDialog = getElDialogById(dialogId);\n\tif (!elDialog) return;\n\n\tconst $dialog = $(elDialog);\n\n\tif (!$dialog.dialog('instance')) return;\n\n\t$dialog.dialog('close');\n};\n\n/**\n * Управление props.isLoading\n */\nconst setLoading = (elPages: ElTopDialogPage[] | JQuery<ElTopDialogPage>, isLoading: boolean, duration?: number) => {\n\tif (isElJQuery(elPages)) elPages = elPages.toArray(); // todo: убрать после переписки jquery на сайте\n\n\tconst elPagesVisibleds = elPages.reduce<ElTopDialogPage[]>((acc, elPage) => {\n\t\tif (elPage.hasAttribute('[data-view-page]') && isVisible(elPage)) acc.push(elPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tif (isLoading) {\n\t\tif (duration !== undefined) {\n\t\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', duration + 's');\n\t\t\t});\n\t\t}\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.add('i-load-data');\n\t\t});\n\t} else {\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.remove('i-load-data');\n\t\t});\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', '10s');\n\t\t});\n\t}\n};\n\nconst isLoading = (elPage: ElTopDialogPage | JQuery<ElTopDialogPage>) => {\n\tif (isElJQuery(elPage)) elPage = elPage?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elPage.classList.contains('i-load-data');\n};\n\nexport const TopDialogUtils = {\n\tgetElDialogById,\n\tupdatePageVue,\n\trecalcPositions,\n\ttoViewDirty,\n\ttoView,\n\ttoViewPage,\n\ttoPrevPage,\n\tsetLoading,\n\tisLoading,\n\tinAnimation,\n\tclose,\n};\n\ninit();\n"],"names":["inited","initDialogGlobalEvents","el","querySelectorVisible","elDialogs","querySelectorAllArray","elDialog","isVisible","toView","TopDialogUtils","viewNameAndPageLink","viewName","pageLink","elToPages","hash","TopDialogWorker","historySetState","elForm","eventTarget","elSubmitButton","event","elDialogWrapperWithTopZIndex","topZIndex","elDialogWrapper","zIndex","Core","css","cssM","cssPC","cssModern","cssModernPC","timerClearAnimation","isInited","isElJQuery","init","_a","onCreate","onOpen","onClose","$dialog","genVueOptions","options","_b","getElDialogById","id","updatePageVue","dialogId","pageName","pageNameNext","dialog","getDialogWorker","nextTick","waitWhile","elDialogBody","connectScrollShadow","initPopup","_e","$popup","elPopup","elPageContents","w1","scrollBarWidth","recalcPositions","hashData","setHashs","toViewDirty","toViewPageName","moveDirection","toViewParts","argsString","args","viewNameOrElDialog","callback","resolve","_reject","timer","toViewPage","stopAnimations","sleep","elModalLayers","elCurrentPages","acc","elModalLayer","elCurrentPage","elNextPages","elNextPage","beforeOpenViewPage","afterOpenViewPage","TopPopupWorker","elActive","delay","toPrevPage","prevPageName","elPrevPage","beforeOpenViewPageTimers","elPages","eventKey","inAnimation","close","setLoading","isLoading","duration","elPagesVisibleds","elPage","elPagesVisibled"],"mappings":";;;;;;;;AAGe;ACGf,IAAIA,IAAS;AASN,MAAMC,IAAyB,MAAM;AAC3C,EAAID,MACJA,IAAS,IAKT,SAAS,iBAAiB,WAAW,CAAC,MAAM;AAE3C,QADI,EAAE,QAAQ,YACV,CAAC,EAAE,OAAQ;AAEf,UAAME,IAAK,EAAE;AAcb,QAXI,CAACA,EAAG,QAAQ,YAAY,KAExBA,EAAG,oBAAoB,UAAUA,EAAG,oBAAoB,oBAGxDC,EAAqB,SAAS,iBAAiB,oBAAoB,KAGnED,EAAG,UAAU,SAAS,cAAc,KAGpCC,EAAqB,SAAS,iBAAiB,qBAAqB,EAAG;AAE3E,UAAMC,IAAYC,EAAmC,UAAU,oBAAoB,EAAE,OAAO,CAACC,MACrFC,EAAUD,CAAQ,CACzB;AAED,MAAEF,EAAUA,EAAU,SAAS,CAAC,CAAC,EAAE,OAAO,OAAO;AAAA,EAClD,CAAC,GAKD,SAAS,iBAAiB,SAAS,CAAC,MAAM;AAyBzC,UAAMF,IAAM,EAAE,OAAuB,QAAQ,kCAAkC;AAC/E,QAAI,CAACA,EAAI;AAET,MAAE,eAAA;AAEF,UAAMI,IAAWJ,EAAG,QAAqB,oBAAoB;AAC7D,QAAI,CAACI,EAAU;AAGf,UAAME,IAASN,EAAG,QAAQ;AAE1B,QAAIM,KAAU,gBAAgB;AAC7B,MAAAC,EAAe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;AAAA,EACrE,CAAC;AAEH,GAEMJ,KAAY,CAACG,OACdtE,EAAWsE,CAAM,MAAGA,IAASA,KAAA,gBAAAA,EAAS,KAEnCA,EAAO,UAAU,SAAS,aAAa,IAGlC9F,IAAiB;AAAA,EAC7B,iBAAAkC;AAAA,EACA,eAAAE;AAAA,EACA,iBAAAiB;AAAA,EACA,aAAAG;AAAA,EACA,QAAAzD;AAAA,EACA,YAAAoE;AAAA,EACA,YAAAe;AAAA,EACA,YAAAQ;AAAA,EACA,WAAAC;AAAA,EACA,aAAAH;AAAA,EACA,OAAAC;AACD;AAEAhE,EAAA;"}
|
|
1
|
+
{"version":3,"file":"utils-HUbJl4_u.es.js","sources":["../../src/storybook/jquery.ts","../../src/components/dialog/lib/utils.globalEvents.ts","../../src/components/dialog/lib/utils.ts"],"sourcesContent":["/**\n * см. /.storybook/preview-head.html\n */\nexport default $;\n","import { TopDialogUtils } from './utils';\nimport { TopDialogWorker } from './worker';\nimport { isVisible, querySelectorAllArray, querySelectorVisible } from '@/core/utils/dom';\nimport { historySetState } from '@/core/utils/route';\nimport type { ElTopDialog, ElTopDialogWrapper } from '@/components/dialog/lib/types';\n\nlet inited = false;\n\n/**\n * Инициализация глобальных событий для диалоговых окон\n *\n * Производится один раз при подключении диалогового окна\n *\n * События не размонтируются\n */\nexport const initDialogGlobalEvents = () => {\n\tif (inited) return;\n\tinited = true;\n\n\t/**\n\t * Закрытие диалога по Esc\n\t */\n\tdocument.addEventListener('keydown', (e) => {\n\t\tif (e.key !== 'Escape') return;\n\t\tif (!e.target) return;\n\n\t\tconst el = e.target as HTMLElement;\n\n\t\t// событие произошло вне диалогового окна\n\t\tif (!el.closest('.ui-dialog')) return;\n\n\t\tif (el.contentEditable === 'true' || el.contentEditable === 'plaintext-only') return;\n\n\t\t// не закрывать окно при открытом TopPopup\n\t\tif (querySelectorVisible(document.documentElement, '.top-popup-wrapper')) return;\n\n\t\t// не закрывать окно при работе с jquery autocomplete\n\t\tif (el.classList.contains('autocomplete')) return;\n\n\t\t// не закрывать окно при открытом fancybox\n\t\tif (querySelectorVisible(document.documentElement, '.fancybox-container')) return;\n\n\t\tconst elDialogs = querySelectorAllArray<ElTopDialog>(document, '.ui-dialog-content').filter((elDialog) => {\n\t\t\treturn isVisible(elDialog);\n\t\t});\n\n\t\t$(elDialogs[elDialogs.length - 1]).dialog('close');\n\t});\n\n\t/**\n\t * Закрытие диалога по кнопке закрыть\n\t */\n\tdocument.addEventListener('click', (e) => {\n\t\t// // навигация без истории\n\t\t// var $dialog = $(this).closest('.ui-dialog-content');\n\t\t// var viewName = $dialog.attr('id');\n\t\t// var pageName = getHash('view-' + viewName);\n\t\t// if (!pageName) {\n\t\t// \ttoPrevPage($dialog);\n\t\t//\n\t\t// \treturn;\n\t\t// }\n\t\t//\n\t\t// // навигация по истории\n\t\t// if (Core.state.isMobile && history.length > 1 && $(this).closest('.modal-layer').length) {\n\t\t// \tvar href = location.href;\n\t\t//\n\t\t// \thistory.go(-1);\n\t\t//\n\t\t// \tsetTimeout(() => {\n\t\t// \t\t// это первая страница в истории вкладки браузера\n\t\t// \t\tif (href === location.href) $(e.target).closest('.ui-dialog-content').dialog('close');\n\t\t// \t});\n\t\t// } else {\n\t\t// \t$(this).closest('.ui-dialog-content').dialog('close');\n\t\t// }\n\n\t\tconst el = (e.target as HTMLElement).closest('[data-action=\"top-dialog-close\"]') as HTMLElement | null;\n\t\tif (!el) return;\n\n\t\te.preventDefault();\n\n\t\tconst elDialog = el.closest<ElTopDialog>('.ui-dialog-content');\n\t\tif (!elDialog) return;\n\n\t\t// если к кнопке привязана ссылка, диалоговое окно не нужно закрывать\n\t\tconst toView = el.dataset.toView;\n\n\t\tif (toView == 'toPrevPage()') {\n\t\t\tTopDialogUtils.toPrevPage(elDialog);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (toView) {\n\t\t\tconst viewNameAndPageLink = toView.split('-');\n\t\t\tconst viewName = viewNameAndPageLink.shift();\n\t\t\tconst pageLink = viewNameAndPageLink.join('-');\n\n\t\t\tif (!viewName) return;\n\n\t\t\tconst elDialog = TopDialogUtils.getElDialogById(viewName);\n\t\t\tif (!elDialog) return;\n\n\t\t\tconst elToPages = querySelectorAllArray(elDialog, `[data-view-page=\"${pageLink}\"]`);\n\t\t\tif (!elToPages) return;\n\n\t\t\tif (!isVisible(elToPages[0])) {\n\t\t\t\tconst hash = TopDialogWorker.genViewPageHash(toView, 'prev');\n\n\t\t\t\t// // не убирает кнопку \"Вперед\" в браузере\n\t\t\t\t// history.replaceState(null, '', hash);\n\t\t\t\t// toViewDirty(toView, 'prev');\n\n\t\t\t\t// // добавляет текущую страницу в историю браузера\n\t\t\t\thistorySetState(false, hash);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst $dialog = $(elDialog);\n\n\t\t$dialog.dialog('close');\n\t});\n\n\t/**\n\t * Все submit должны обрабатываться через js\n\t */\n\tdocument.addEventListener('submit', (e) => {\n\t\tconst elForm = e.target as HTMLElement;\n\n\t\tif (elForm.matches('.modal-body > form') || elForm.matches('.modal-layer-body > form')) {\n\t\t\te.preventDefault();\n\t\t}\n\t});\n\n\t/**\n\t * Выполнение действия по нажатию Enter\n\t *\n\t * @todo Убрать `.searcher`\n\t */\n\tdocument.addEventListener('keypress', (e) => {\n\t\tconst eventTarget = e.target as HTMLElement;\n\n\t\tconst elModalBody = eventTarget.closest('.ui-dialog .modal-body');\n\t\tif (!elModalBody) return;\n\n\t\tconst isInput =\n\t\t\teventTarget.matches('input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)')\n\t\t\t|| eventTarget.hasAttribute('contenteditable');\n\t\tif (!isInput) return;\n\n\t\t// if (e.keyCode !== 10 && e.key !== 'ENTER') return;\n\t\tif (e.key !== 'Enter') return;\n\n\t\t// не выполнять submit действий при работе с jquery autocomplete\n\t\tif (eventTarget.classList.contains('autocomplete')) {\n\t\t\te.preventDefault();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventTarget.tagName === 'TEXTAREA') {\n\t\t\tif (!e.ctrlKey && !e.metaKey) return;\n\n\t\t\tconst elForm = eventTarget.closest('form');\n\n\t\t\tif (elForm) {\n\t\t\t\t// Find visible submit buttons\n\t\t\t\tconst elSubmitButton = querySelectorAllArray(elForm, 'button[type=\"submit\"]')\n\t\t\t\t\t.concat(querySelectorAllArray(elForm, 'input[type=\"submit\"]'))\n\t\t\t\t\t.find((elSubmitButton) => {\n\t\t\t\t\t\treturn isVisible(elSubmitButton);\n\t\t\t\t\t});\n\n\t\t\t\telSubmitButton?.click();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Закрытие диалога по клику вне окна\n\t */\n\tdocument.addEventListener('click', function (event) {\n\t\tconst eventTarget = event.target as HTMLElement;\n\n\t\tif (!eventTarget.classList.contains('ui-widget-overlay')) return;\n\n\t\tlet elDialogWrapperWithTopZIndex: ElTopDialogWrapper | undefined;\n\t\tlet topZIndex = 0;\n\n\t\tconst elDialogWrapperVisibles = querySelectorAllArray<ElTopDialogWrapper>(document, '.ui-dialog').filter((elDialogWrapper) => {\n\t\t\treturn isVisible(elDialogWrapper);\n\t\t});\n\n\t\telDialogWrapperVisibles.forEach((elDialogWrapper) => {\n\t\t\tconst zIndex = Number(window.getComputedStyle(elDialogWrapper).zIndex);\n\t\t\tif (zIndex < topZIndex) return;\n\n\t\t\telDialogWrapperWithTopZIndex = elDialogWrapper;\n\t\t\ttopZIndex = zIndex;\n\t\t});\n\n\t\tif (elDialogWrapperWithTopZIndex) {\n\t\t\tconst elDialog = elDialogWrapperWithTopZIndex.querySelector('.ui-dialog-content');\n\n\t\t\t$(elDialog).dialog('close');\n\t\t}\n\t});\n\n\twindow.addEventListener('resize', TopDialogUtils.recalcPositions);\n\tTopDialogUtils.recalcPositions();\n};\n","import 'jquery';\nimport { nextTick } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { TopPopupWorker } from '@/components/popup/worker';\nimport { sleep, waitWhile } from '@/core/utils/system';\nimport { setHashs } from '@/core/utils/route';\nimport { connectScrollShadow } from '@/core/utils/scroll';\n\nimport type { ElTopDialogBody, ElTopDialog, ElTopDialogModalLayer, ElTopDialogPage, MoveDirection, ElTopDialogWrapper } from './types';\nimport { TopDialogWorker } from './worker';\nimport { initDialogGlobalEvents } from './utils.globalEvents';\nimport { getDialogWorker } from '../dialog/dialogs/dialogs.vue';\n\nimport css from '../dialog/style/dialog.css?inline';\nimport cssM from '../dialog/style/dialog.m.css?inline';\nimport cssPC from '../dialog/style/dialog.pc.css?inline';\nimport cssModern from '../dialog/style/modern/dialog.css?inline';\nimport cssModernPC from '../dialog/style/modern/dialog.pc.css?inline';\nimport { isVisible, querySelectorAllArray } from '@/core/utils/dom';\n\nCore.insertStyleToPage(css);\nCore.insertStyleToPage(cssM, 'm');\nCore.insertStyleToPage(cssPC, 'pc');\nCore.insertStyleToPage(cssModern);\nCore.insertStyleToPage(cssModernPC, 'pc');\n\nlet timerClearAnimation: NodeJS.Timeout;\nlet isInited = false;\n\n/**\n * Является ли элемент JQuery<HTMLElement>\n */\nconst isElJQuery = (el: JQuery<HTMLElement> | HTMLElement | HTMLElement[]) => {\n\treturn !!el && typeof el === 'object' && 'jquery' in el;\n};\n\nconst init = () => {\n\t$.extend($.ui.dialog.prototype.options, {\n\t\tfocus: (e: any) => {\n\t\t\te.target.focus();\n\n\t\t\t$('[autofocus]', e.target)[0]?.focus();\n\n\t\t\t// setTimeout(function () {\n\t\t\t// \tif ($('[autofocus]', e.target).length) return;\n\t\t\t// \t$('.modal-footer button:first, .modal-body :input:first', e.target).eq(0).focus();\n\t\t\t//\n\t\t\t// \t// fix пропадающего autocomplete при нажатии на scroll в autocomplete\n\t\t\t// \t$(e.target).add($(e.target).closest('.ui-dialog')).removeAttr('tabindex');\n\t\t\t// });\n\t\t},\n\t\tcreate: (e: any) => onCreate(e.target),\n\t\topen: (e: any) => onOpen(e.target),\n\t\tclose: (e: any) => onClose(e.target),\n\t\tmodal: true,\n\t\tresizable: false,\n\t\tcloseOnEscape: false,\n\t\twidth: 'auto',\n\t\tminHeight: 0,\n\t});\n\n\t$.ui.dialog.prototype._focusTabbable = $.noop;\n\n\t$.ui.dialog.prototype._moveToTopOriginal = $.ui.dialog.prototype._moveToTop;\n\t$.ui.dialog.prototype._moveToTop = function () {\n\t\tthis._moveToTopOriginal();\n\n\t\tconst $dialog = $(this.element);\n\t\t$dialog.trigger('dialogsMoveToTop', [$dialog]);\n\t};\n\n\tinitDialogGlobalEvents();\n\n\tisInited = true;\n};\n\n/**\n * Получить настройки диалогового окна из Vue компонента\n */\nconst genVueOptions = (elDialog: ElTopDialog) => {\n\tconst options: {\n\t\tmodal?: boolean,\n\t\tposition?: any,\n\t} = {};\n\n\tif (elDialog.dataset?.modal === 'false') options.modal = false;\n\tif (elDialog.dataset?.position) options.position = JSON.parse(elDialog.dataset.position);\n\n\treturn options;\n};\n\nconst getElDialogById = (id: string) => {\n\treturn <ElTopDialog | null>document.getElementById(id);\n};\n\n/**\n * Сменить состояние диалогового окна Vue\n */\nconst updatePageVue = async (dialogId: string, pageName?: string, pageNameNext?: string) => {\n\tif (!dialogId.startsWith('dialog_')) return;\n\n\tconst dialog = getDialogWorker(dialogId);\n\tif (!dialog) return;\n\n\tdialog.isOpened.value = true;\n\tif (pageName !== undefined) dialog.pageActive.value = pageName;\n\tif (pageNameNext !== undefined) dialog.pageActiveNext.value = pageNameNext;\n\n\tawait nextTick();\n\n\tif (pageNameNext) {\n\t\tconst elDialog = getElDialogById(dialogId);\n\t\tif (!elDialog) return;\n\n\t\tconst elNextpages = elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`);\n\n\t\tif (!elNextpages.length) {\n\t\t\tawait waitWhile(() => !elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`).length);\n\t\t}\n\t}\n};\n\n/**\n * Callback for jQuery dialog onCreate\n */\nconst onCreate = (elDialog: ElTopDialog) => {\n\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\tif (!elDialogBody) return;\n\n\tconnectScrollShadow(elDialogBody);\n\n\tTopDialogWorker.state.decoratorOnCreate?.(elDialog);\n\n\tinitPopup(elDialog);\n};\n\n/**\n * Инициирование событий TopPopup в диалоговом окне\n */\nconst initPopup = (elDialog: HTMLElement) => {\n\t$(elDialog).on('aftershow.top-menu-popup', '[data-top-popup]', (_e, $popup) => {\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPopup = $popup[0];\n\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPageContents = TopDialogWorker.getPairPage(elPopup);\n\t\telPageContents?.[1]?.prepend(elPopup);\n\t});\n};\n\n/**\n * Callback for jQuery dialog onOpen\n */\nconst onOpen = async (elDialog: ElTopDialog) => {\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tconst w1 = window.innerWidth;\n\n\tCore.state.documentClassModificators.set('top-dialog', 'with_dialog');\n\n\tconst w2 = window.innerWidth;\n\n\tconst scrollBarWidth = w2 - w1;\n\tif (document.documentElement.scrollHeight > window.innerHeight) document.querySelector('html')!.style.marginRight = scrollBarWidth + 'px';\n\n\trecalcPositions();\n\n\tconst dialog = getDialogWorker(elDialog.getAttribute('id')!);\n\tdialog?.emit?.('open', pageName);\n};\n\n/**\n * Callback for jQuery dialog onClose\n */\nconst onClose = async (elDialog: ElTopDialog) => {\n\tconst viewName = elDialog.getAttribute('id');\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName) {\n\t\tconst hashData = {\n\t\t\tvpn: TopDialogWorker.state.viewPageN as number | null,\n\t\t\t['view-' + viewName]: null,\n\t\t};\n\t\thashData['view-' + viewName] = null;\n\n\t\tif (TopDialogWorker.state.viewPageN === 0 || TopDialogWorker.state.viewPageN === 1) {\n\t\t\thashData.vpn = null;\n\t\t}\n\n\t\tsetHashs(hashData, false);\n\t}\n\n\tconst elUiWidgetOverlayVisibles = querySelectorAllArray(document, '.ui-widget-overlay').filter((el) => {\n\t\treturn isVisible(el);\n\t});\n\n\tif (!elUiWidgetOverlayVisibles.length) {\n\t\tCore.state.documentClassModificators.delete('top-dialog');\n\n\t\tdocument.querySelector('html')!.style.marginRight = '';\n\t}\n\n\t$(elDialog).trigger('viewAfterClose', [$(elDialog)]);\n\n\tconst dialog = getDialogWorker(viewName);\n\n\tif (dialog) {\n\t\tdialog.isOpened.value = false;\n\t\tdialog.emit?.('close', pageName);\n\n\t\tif (dialog.onCloseOnce) {\n\t\t\tdialog.onCloseOnce(dialog.props, pageName);\n\t\t\tdialog.onCloseOnce = undefined;\n\t\t}\n\t}\n\n\t// после закрытия диалога может потребоваться пересчет позиций элементов\n\twindow.dispatchEvent(new Event('resize'));\n};\n\n/**\n * Пересчитать положения и размеры открытых диалоговых окон\n */\nconst recalcPositions = () => {\n\tconst elDialogVisibilityes = querySelectorAllArray(document, '.ui-dialog').filter((el) => {\n\t\treturn isVisible(el) && el.querySelector<ElTopDialog>(':scope > .ui-dialog-content');\n\t}).map((el) => {\n\t\treturn el.querySelector<ElTopDialog>(':scope > .ui-dialog-content')!;\n\t});\n\n\telDialogVisibilityes.forEach((elDialog) => {\n\t\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\t\tif (!elDialogBody) return;\n\n\t\tconst elDialogWrapper = elDialog.closest('.ui-dialog');\n\n\t\tconst options = genVueOptions(elDialog);\n\n\t\toptions.position ??= { of: window };\n\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('option', options);\n\n\t\telDialogWrapper.classList.remove('me-tightly');\n\t\tif ((elDialogWrapper.clientHeight ?? 0) > window.innerHeight) elDialogWrapper.classList.add('me-tightly');\n\t});\n};\n\n/**\n * Переход к view page по неразобранной ссылке в формате: {viewName}-{pageName}[:args]\n */\nconst toViewDirty = async (toViewPageName: string, moveDirection?: MoveDirection) => {\n\tconst regexp = /(\\w+)[=-]([\\w-]+)(?::([\\w.:-]+))?/g;\n\tconst toViewParts = regexp.exec(toViewPageName);\n\tif (toViewParts) {\n\t\tconst viewName = toViewParts[1];\n\t\tconst pageName = toViewParts[2];\n\t\tconst argsString = toViewParts[3];\n\n\t\tlet args: string[] = [];\n\t\tif (argsString) args = argsString.split(':');\n\n\t\tawait toView(viewName, pageName, args, moveDirection);\n\t}\n};\n\n/**\n * Открыть диалоговое окно, возможно указать нужную страницу\n * @param viewNameOrElDialog - id страницы окна или элемент окна\n * @param pageName - имя страницы\n * @param args - аргументы, набор проивзольных параметров, которые могут обрабатываться каждым окном по своему\n * @param moveDirection\n * @param callback - функция, которая будет запущена после октытия страницы\n */\nconst toView = async (\n\tviewNameOrElDialog: ElTopDialog | JQuery<ElTopDialog> | string,\n\tpageName?: string,\n\targs?: string[],\n\tmoveDirection?: MoveDirection,\n\tcallback?: Function,\n) => {\n\tif (!isInited) {\n\t\tawait new Promise<void>((resolve, _reject) => {\n\t\t\tconst timer = setInterval(() => {\n\t\t\t\tif (!isInited) return;\n\n\t\t\t\tclearInterval(timer);\n\n\t\t\t\tresolve();\n\t\t\t}, 10000);\n\t\t});\n\t}\n\n\tawait nextTick();\n\n\tlet elDialog: ElTopDialog | null;\n\tif (typeof (viewNameOrElDialog) === 'object') {\n\t\tif (isElJQuery(viewNameOrElDialog)) viewNameOrElDialog = viewNameOrElDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\t\telDialog = viewNameOrElDialog;\n\t} else {\n\t\telDialog = getElDialogById(viewNameOrElDialog);\n\t}\n\n\t// Диалоговое окно еще не загружено\n\tif (!elDialog && typeof (viewNameOrElDialog) == 'string' && TopDialogWorker.state.load) {\n\t\tawait TopDialogWorker.state.load(viewNameOrElDialog);\n\n\t\tawait toView(viewNameOrElDialog, pageName, args, moveDirection, callback);\n\n\t\treturn;\n\t}\n\n\tif (!elDialog) return;\n\n\tawait toViewPage(elDialog, pageName, args, moveDirection);\n\n\tconst $dialog = $(elDialog);\n\n\tif (elDialog?.classList.contains('ui-dialog-content')) {\n\t\t// var zIndexMax = 0;\n\t\t// $.map($('.ui-dialog'), function (el) {\n\t\t// \tvar zIndex = $(el).css('z-index') * 1;\n\t\t// \tif (zIndex > zIndexMax) zIndexMax = zIndex;\n\t\t// });\n\t\t//\n\t\t// if ($dialog.is(':hidden')) $dialog.dialog('open');\n\t\t//\n\t\t// var $dialogWrapper = $dialog.parent();\n\t\t// var $dialogOverlay = $dialogWrapper.next();\n\t\t//\n\t\t// if ($dialogWrapper.css('z-index') * 1 < zIndexMax) {\n\t\t// \t$dialogWrapper.css('z-index', zIndexMax + 2);\n\t\t// \t$dialogOverlay.css('z-index', zIndexMax + 1);\n\t\t// }\n\n\t\t$dialog.dialog('open');\n\t} else {\n\t\tconst options = genVueOptions(elDialog);\n\n\t\t$dialog.dialog(options);\n\t}\n\n\tif (callback) callback($dialog);\n};\n\nconst toViewPage = async (elDialog: ElTopDialog | JQuery<ElTopDialog>, pageName?: string, args?: string[], moveDirection?: MoveDirection) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\tif (pageName === undefined) pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName !== elDialog.dataset.viewPageActive) {\n\t\tconst stopped = stopAnimations(elDialog);\n\t\tif (stopped) await sleep(100);\n\t}\n\n\tif (args === undefined) args = [];\n\n\tawait updatePageVue(elDialog.getAttribute('id') as string, undefined, pageName);\n\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elNextPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elNextPage = elModalLayer.querySelector<ElTopDialogPage>(`:scope > [data-view-page=\"${pageName}\"]`);\n\t\tif (elNextPage) {\n\t\t\tacc.push(elNextPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst argsString = args.join(':');\n\n\tif (moveDirection === undefined) {\n\t\tmoveDirection = 'next';\n\t\tif ((elNextPages[0]?.dataset.order ?? 0) < (elCurrentPages[0]?.dataset.order ?? 0)) moveDirection = 'prev';\n\t}\n\n\tif (!elNextPages.length) return;\n\n\telDialog.dataset.viewPageActive = pageName;\n\n\t// запрашиваемая страница уже открыта\n\tif (elNextPages[0].classList.contains('active')) {\n\t\tif (elNextPages[0].dataset.viewPageArgs !== argsString) {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.dataset.viewPageArgs = argsString;\n\t\t\t});\n\n\t\t\t// dialogs.beforeOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t\t// dialogs.afterOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t}\n\n\t\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\t\treturn;\n\t}\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.dataset.viewPageArgs = argsString;\n\t});\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\tif (elCurrentPage.querySelector('.top-popup-wrapper')) {\n\t\t\tTopPopupWorker.close(elCurrentPage.querySelector('.top-popup-wrapper')!);\n\t\t}\n\t});\n\n\tconst elDialogWrapper = elNextPages[0].closest<ElTopDialogWrapper>('.ui-dialog');\n\n\tif (elDialogWrapper && !isVisible(elDialogWrapper)) moveDirection = 'none';\n\tif (!elCurrentPages.length) moveDirection = 'none';\n\tif (isVisible(elNextPages[0])) moveDirection = 'none';\n\n\tswitch (moveDirection) {\n\t\tcase 'prev': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage.classList.add('right-to-center', 'reverse');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('center-to-left', 'reverse');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive.nextSibling);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage?.classList.add('center-to-left');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('right-to-center');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\telDialog.setAttribute('view-page-active', pageName);\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\telCurrentPage.classList.remove('active');\n\t});\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.classList.add('active');\n\t});\n\n\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\tif (moveDirection) {\n\t\telDialog.classList.add('i-change-page');\n\n\t\tconst delay = Number(window.getComputedStyle(elNextPages[0]).animationDuration.replace('s', '')) * 1000;\n\n\t\ttimerClearAnimation = setTimeout(function () {\n\t\t\tupdatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\t\tstopAnimations(elDialog);\n\t\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\t}, delay);\n\t} else {\n\t\tawait updatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t}\n};\n\n/**\n * К предыдущему представлению\n */\nconst toPrevPage = (elDialog: ElTopDialog) => {\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elPrevPages = elCurrentPages.reduce<ElTopDialogPage[]>((acc, elCurrentPage) => {\n\t\tlet elPrevPage = elCurrentPage.previousElementSibling as ElTopDialogPage | null;\n\t\twhile (elPrevPage && !elPrevPage.hasAttribute('[data-view-page]')) {\n\t\t\telPrevPage = elPrevPage.previousElementSibling as ElTopDialogPage | null;\n\t\t}\n\n\t\tif (elPrevPage) acc.push(elPrevPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tconst prevPageName = (elPrevPages[0])?.dataset.viewPage;\n\n\tif (prevPageName) {\n\t\tvoid toViewPage(elDialog, prevPageName, undefined, 'prev');\n\t} else {\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('close');\n\t}\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst beforeOpenViewPageTimers = new Set();\nconst beforeOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\t// группировка цепочки событий\n\t// запрос на открытие страницы может выполняться несколько раз, чаще такое может быть при открытии, загрузке и переходе сразу к нужной странице\n\tconst eventKey = elDialog.getAttribute('id') + elPages[0].dataset.viewPage + pageName + args.join();\n\n\tif (beforeOpenViewPageTimers.has(eventKey)) return;\n\tbeforeOpenViewPageTimers.add(eventKey);\n\n\tsetTimeout(function () {\n\t\tbeforeOpenViewPageTimers.delete(eventKey);\n\n\t\t$(elDialog).trigger('viewBeforeOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst afterOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\tsetTimeout(function () {\n\t\t$(elDialog).trigger('viewAfterOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Получить состояние: Диалоговое окно находится в состоянии смены страницы\n */\nconst inAnimation = (elDialog: ElTopDialog | JQuery<ElTopDialog>) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elDialog.classList.contains('i-change-page');\n};\n\n/**\n * Остановить анимацию смены страницы\n *\n * @returns Вернет true, если анимация производилась и была остановлена\n */\nconst stopAnimations = (elDialog: ElTopDialog) => {\n\tif (!inAnimation(elDialog)) return false;\n\n\tclearTimeout(timerClearAnimation);\n\n\tconst elModalLayers = querySelectorAllArray(elDialog, '.modal-layer');\n\n\tconst pageName = elDialog.dataset.viewPageActive;\n\telDialog.classList.remove('i-change-page');\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelectorAll(':scope > [data-view-page]').forEach((el) => {\n\t\t\tel.classList.remove('center-to-left', 'right-to-center', 'reverse', 'active');\n\t\t});\n\t});\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelector(`:scope > [data-view-page=\"${pageName}\"]`)?.classList.add('active');\n\t});\n\n\treturn true;\n};\n\n/**\n * Закрыть диалоговое окно\n */\nconst close = function (dialogId: string) {\n\tconst elDialog = getElDialogById(dialogId);\n\tif (!elDialog) return;\n\n\tconst $dialog = $(elDialog);\n\n\tif (!$dialog.dialog('instance')) return;\n\n\t$dialog.dialog('close');\n};\n\n/**\n * Управление props.isLoading\n */\nconst setLoading = (elPages: ElTopDialogPage[] | JQuery<ElTopDialogPage>, isLoading: boolean, duration?: number) => {\n\tif (isElJQuery(elPages)) elPages = elPages.toArray(); // todo: убрать после переписки jquery на сайте\n\n\tconst elPagesVisibleds = elPages.reduce<ElTopDialogPage[]>((acc, elPage) => {\n\t\tif (elPage.hasAttribute('[data-view-page]') && isVisible(elPage)) acc.push(elPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tif (isLoading) {\n\t\tif (duration !== undefined) {\n\t\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', duration + 's');\n\t\t\t});\n\t\t}\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.add('i-load-data');\n\t\t});\n\t} else {\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.remove('i-load-data');\n\t\t});\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', '10s');\n\t\t});\n\t}\n};\n\nconst isLoading = (elPage: ElTopDialogPage | JQuery<ElTopDialogPage>) => {\n\tif (isElJQuery(elPage)) elPage = elPage?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elPage.classList.contains('i-load-data');\n};\n\nexport const TopDialogUtils = {\n\tgetElDialogById,\n\tupdatePageVue,\n\trecalcPositions,\n\ttoViewDirty,\n\ttoView,\n\ttoViewPage,\n\ttoPrevPage,\n\tsetLoading,\n\tisLoading,\n\tinAnimation,\n\tclose,\n};\n\ninit();\n"],"names":["inited","initDialogGlobalEvents","el","querySelectorVisible","elDialogs","querySelectorAllArray","elDialog","isVisible","toView","TopDialogUtils","viewNameAndPageLink","viewName","pageLink","elToPages","hash","TopDialogWorker","historySetState","elForm","eventTarget","elSubmitButton","event","elDialogWrapperWithTopZIndex","topZIndex","elDialogWrapper","zIndex","Core","css","cssM","cssPC","cssModern","cssModernPC","timerClearAnimation","isInited","isElJQuery","init","_a","onCreate","onOpen","onClose","$dialog","genVueOptions","options","_b","getElDialogById","id","updatePageVue","dialogId","pageName","pageNameNext","dialog","getDialogWorker","nextTick","waitWhile","elDialogBody","connectScrollShadow","initPopup","_e","$popup","elPopup","elPageContents","w1","scrollBarWidth","recalcPositions","hashData","setHashs","toViewDirty","toViewPageName","moveDirection","toViewParts","argsString","args","viewNameOrElDialog","callback","resolve","_reject","timer","toViewPage","stopAnimations","sleep","elModalLayers","elCurrentPages","acc","elModalLayer","elCurrentPage","elNextPages","elNextPage","beforeOpenViewPage","afterOpenViewPage","TopPopupWorker","elActive","delay","toPrevPage","prevPageName","elPrevPage","beforeOpenViewPageTimers","elPages","eventKey","inAnimation","close","setLoading","isLoading","duration","elPagesVisibleds","elPage","elPagesVisibled"],"mappings":";;;;;;;;AAGe;ACGf,IAAIA,IAAS;AASN,MAAMC,IAAyB,MAAM;AAC3C,EAAID,MACJA,IAAS,IAKT,SAAS,iBAAiB,WAAW,CAAC,MAAM;AAE3C,QADI,EAAE,QAAQ,YACV,CAAC,EAAE,OAAQ;AAEf,UAAME,IAAK,EAAE;AAcb,QAXI,CAACA,EAAG,QAAQ,YAAY,KAExBA,EAAG,oBAAoB,UAAUA,EAAG,oBAAoB,oBAGxDC,EAAqB,SAAS,iBAAiB,oBAAoB,KAGnED,EAAG,UAAU,SAAS,cAAc,KAGpCC,EAAqB,SAAS,iBAAiB,qBAAqB,EAAG;AAE3E,UAAMC,IAAYC,EAAmC,UAAU,oBAAoB,EAAE,OAAO,CAACC,MACrFC,EAAUD,CAAQ,CACzB;AAED,MAAEF,EAAUA,EAAU,SAAS,CAAC,CAAC,EAAE,OAAO,OAAO;AAAA,EAClD,CAAC,GAKD,SAAS,iBAAiB,SAAS,CAAC,MAAM;AAyBzC,UAAMF,IAAM,EAAE,OAAuB,QAAQ,kCAAkC;AAC/E,QAAI,CAACA,EAAI;AAET,MAAE,eAAA;AAEF,UAAMI,IAAWJ,EAAG,QAAqB,oBAAoB;AAC7D,QAAI,CAACI,EAAU;AAGf,UAAME,IAASN,EAAG,QAAQ;AAE1B,QAAIM,KAAU,gBAAgB;AAC7B,MAAAC,EAAe,WAAWH,CAAQ;AAElC;AAAA,IACD;AAEA,QAAIE,GAAQ;AACX,YAAME,IAAsBF,EAAO,MAAM,GAAG,GACtCG,IAAWD,EAAoB,MAAA,GAC/BE,IAAWF,EAAoB,KAAK,GAAG;AAE7C,UAAI,CAACC,EAAU;AAEf,YAAML,IAAWG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,EACA,iBAAAiB;AAAA,EACA,aAAAG;AAAA,EACA,QAAAzD;AAAA,EACA,YAAAoE;AAAA,EACA,YAAAe;AAAA,EACA,YAAAQ;AAAA,EACA,WAAAC;AAAA,EACA,aAAAH;AAAA,EACA,OAAAC;AACD;AAEAhE,EAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","exports","vue","./forms-DRhpgERJ.amd","../popup/worker.amd","../utils/system.amd","../utils/route.amd","../utils/scroll.amd","./dialogs.vue_vue_type_script_setup_true_lang-CXghec6S.amd","../utils/dom.amd"],(function(ee,L,w,u,I,q,E,O,c,l){"use strict";if(typeof w>"u")var w=window.Vue;$;let V=!1;const H=()=>{V||(V=!0,document.addEventListener("keydown",e=>{if(e.key!=="Escape"||!e.target)return;const t=e.target;if(!t.closest(".ui-dialog")||t.contentEditable==="true"||t.contentEditable==="plaintext-only"||l.querySelectorVisible(document.documentElement,".top-popup-wrapper")||t.classList.contains("autocomplete")||l.querySelectorVisible(document.documentElement,".fancybox-container"))return;const i=l.querySelectorAllArray(document,".ui-dialog-content").filter(o=>l.isVisible(o));$(i[i.length-1]).dialog("close")}),document.addEventListener("click",e=>{const t=e.target.closest('[data-action="top-dialog-close"]');if(!t)return;e.preventDefault();const i=t.closest(".ui-dialog-content");if(!i)return;const o=t.dataset.toView;if(o=="toPrevPage()"){y.toPrevPage(i);return}if(o){const r=o.split("-"),n=r.shift(),s=r.join("-");if(!n)return;const p=y.getElDialogById(n);if(!p)return;const f=l.querySelectorAllArray(p,`[data-view-page="${s}"]`);if(!f)return;if(!l.isVisible(f[0])){const k=c.TopDialogWorker.genViewPageHash(o,"prev");E.historySetState(!1,k);return}}$(i).dialog("close")}),document.addEventListener("submit",e=>{const t=e.target;(t.matches(".modal-body > form")||t.matches(".modal-layer-body > form"))&&e.preventDefault()}),document.addEventListener("keypress",e=>{const t=e.target;if(!(!t.closest(".ui-dialog .modal-body")||!(t.matches("input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)")||t.hasAttribute("contenteditable")))&&e.key==="Enter"){if(t.classList.contains("autocomplete")){e.preventDefault();return}if(t.tagName==="TEXTAREA"){if(!e.ctrlKey&&!e.metaKey)return;const a=t.closest("form");if(a){const r=l.querySelectorAllArray(a,'button[type="submit"]').concat(l.querySelectorAllArray(a,'input[type="submit"]')).find(n=>l.isVisible(n));r==null||r.click()}}}}),document.addEventListener("click",function(e){if(!e.target.classList.contains("ui-widget-overlay"))return;let i,o=0;if(l.querySelectorAllArray(document,".ui-dialog").filter(r=>l.isVisible(r)).forEach(r=>{const n=Number(window.getComputedStyle(r).zIndex);n<o||(i=r,o=n)}),i){const r=i.querySelector(".ui-dialog-content");$(r).dialog("close")}}),window.addEventListener("resize",y.recalcPositions),y.recalcPositions())},F=':root{--dialog-border-color: var(--color-line-1);--dialog-loading-duration: 10s;--top-dialog-footer-height: var(--top-forms-base-height_s)}html.with_dialog{overflow:hidden!important}a[data-to-view]{cursor:pointer}.ui-widget-overlay{background:#040404;opacity:.5;filter:Alpha(Opacity=50)}.ui-dialog{border-radius:8px;border:none;padding:0}.ui-dialog.ui-widget{border:none}.ui-dialog-titlebar{display:none}.ui-dialog .ui-dialog-content{padding:0;overflow:visible}.ui-dialog .project_name{word-break:break-all}.ui-dialog-content{--dialog-header-height: 50px;--dialog-layer-pageSelector: 0px}.ui-dialog-content-withPageSelector{--dialog-layer-pageSelector: 42px}.modal-header,.modal-body,.modal-footer{font-size:14px;position:relative}.modal-body{padding:var(--padding-default)}.modal-body:has(>.topTable:first-child){padding-top:calc(var(--padding-default) / 4)}.modal-header{border-bottom:1px solid var(--dialog-border-color);height:var(--dialog-header-height);padding:0 var(--padding-default);display:flex;justify-content:space-between;align-items:center;gap:var(--top-padding-2)}.modal-header>*{padding:10px 0;font-size:16px}.modal-header>.top-title{margin:0;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1;order:50;display:flex;align-items:center}.modal-header>.top-title>div[class*=icon]{display:none}.modal-header>div:not(.top-title){order:60}.modal-header>div.close{--top-icon-color: var(--color-text-2);cursor:pointer;background:var(--color-layout-front-1);font-size:16px;order:100;animation-name:none!important}.modal-header>div.close:hover{--top-icon-color: var(--color-text-1)}.modal-header .links_icons{position:absolute;right:50px}.modal-header .links_icons [class*=icon-]{width:auto;height:auto;padding:0 5px;color:#d6dee0}.modal-header .links_icons [class*=icon-].active{color:var(--color-bg-warning-1)}.modal-layer-pageSelector{padding:0 10px!important}.modal-body{max-height:calc(var(--100vh) - var(--dialog-header-height) - 1px - var(--dialog-layer-pageSelector) - var(--top-dialog-footer-height) - 1px);overflow-y:auto;overflow-x:hidden;box-sizing:border-box;flex-grow:1}.modal-body hr{margin:16px -15px}.modal-body h4{padding:0;margin:0 0 10px;line-height:normal}.modal-body .inner{padding:var(--padding-default);margin:0 calc(0px - var(--padding-default));position:relative}.modal-body .inner .bt{border-top:1px dashed var(--color-layout-front-primary-3);position:absolute;top:0;right:0;left:0}.modal-body .inner .bb{border-bottom:1px dashed var(--color-layout-front-primary-3);position:absolute;right:0;bottom:0;left:0}.modal-body .inner.color-1{background:var(--color-layout-front-primary-3);color:var(--color-text-1)}.modal-body .inner strong{color:var(--color-text-1)}.modal-body .comment{line-height:18px}.modal-footer{min-height:var(--top-dialog-footer-height);padding:var(--top-gap-2);display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;gap:var(--top-gap-2)}.modal-footer .modal-footer-btn-left{margin-right:auto}.modal-footer>.btn.full_width,.modal-footer>.top-button.full_width{flex-grow:1;align-self:flex-end}.modal-footer-fullWith{flex-wrap:wrap}.modal-footer-fullWith>*{flex-grow:1}.modal-footer-fullWith>.top-info{flex-grow:5}.modal-footer-fullWith>*:empty{flex-grow:0}.ui-dialog-content>.modal-layer>[data-view-page]>input[type=submit]{position:absolute;visibility:hidden}.help_popup .modal-header{display:none}.help_popup .modal-header a{top:2px;z-index:10}.help_popup .modal-header .top-title{display:none}.modal-layer{overflow:hidden}.modal-layer a[data-top-icon]:empty{color:var(--color-text-4);text-decoration:none}.modal-layer>[data-view-page]>div>div.buttons{display:flex;white-space:nowrap;gap:var(--top-padding-1)}.modal-layer>[data-view-page]>div>div.buttons:empty{display:none}.modal-layer>[data-view-page]>div>div.buttons>div,.modal-layer>[data-view-page]>div>div.buttons>a{cursor:pointer;width:auto;height:auto;min-width:auto;min-height:auto;padding:10px 9px;color:var(--color-text-4)}.modal-layer>[data-view-page]>div>div.buttons>div:hover{color:var(--color-text-2)}.modal-layer>[data-view-page]>div>div.buttons>div.hidden{display:none!important}.ui-dialog-content[data-view-page-active]{display:flex!important;flex-direction:column;justify-items:stretch}.ui-dialog-content>.modal-layer{display:flex!important;align-items:stretch;position:relative}.ui-dialog-content.i-change-page>.modal-layer{overflow:hidden}.ui-dialog-content>.modal-layer>[data-view-page]{width:100%;position:relative;display:none;flex-direction:column;justify-content:space-between;animation:.3s cubic-bezier(.4,0,.2,1) forwards}.ui-dialog-content>.modal-layer>[data-view-page].active{display:flex}.ui-dialog-content>.modal-layer>[data-view-page].reverse{animation-direction:reverse}.ui-dialog-content>.modal-layer>[data-view-page].center-to-left,.ui-dialog-content>.modal-layer>[data-view-page].right-to-center{display:flex;position:absolute;inset:0}.ui-dialog-content>.modal-layer>[data-view-page].center-to-left>div,.ui-dialog-content>.modal-layer>[data-view-page].right-to-center>div{overflow:hidden}.ui-dialog-content>.modal-layer-header{border-bottom:1px solid var(--dialog-border-color);min-height:var(--dialog-header-height)}.ui-dialog-content>.modal-layer-header>[data-view-page]>.modal-header{border:none;background:none}.ui-dialog-content>.modal-layer-header>[data-view-page]>.modal-header>*{animation:.3s cubic-bezier(.4,0,.2,1) forwards}.ui-dialog-content>.modal-layer-header>[data-view-page].reverse>.modal-header>*{animation-direction:reverse}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>.top-title{animation-name:dialog-center-to-left-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>.top-title{animation-name:dialog-right-to-center-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>[class*=widget-]{animation-name:dialog-center-to-left-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>[class*=widget-]{animation-name:dialog-right-to-center-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>div{animation-name:dialog-center-to-left-header-icons}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>div{animation-name:dialog-right-to-center-header-icons}.ui-dialog-content>.modal-layer-body{border-radius:0 0 8px 8px;max-height:calc(var(--100vh) - var(--dialog-header-height) - var(--dialog-layer-pageSelector) - var(--toolbar-height));flex-grow:2}.ui-dialog-content.i-change-page>.modal-layer-body>[data-view-page]{background:var(--color-layout-front-1)}.ui-dialog-content>.modal-layer-body>[data-view-page].center-to-left{animation-name:dialog-center-to-left}.ui-dialog-content>.modal-layer-body>[data-view-page].right-to-center{animation-name:dialog-right-to-center}.ui-dialog-content .modal-footer .second_level{box-sizing:border-box;background:var(--color-layout-front-1);width:100%;min-height:25px;display:flex;align-items:center;justify-content:center}.ui-dialog-content .modal-footer .second_level input{border-radius:8px;width:100%;height:var(--top-forms-base-height);padding:var(--top-padding-1) var(--top-padding-3);box-sizing:border-box}.ui-dialog-content>.modal-layer-body>[data-view-page].i-load-data{pointer-events:none}.ui-dialog-content>.modal-layer-body>[data-view-page].i-load-data:before{content:" ";background:#378dc6;width:0;height:4px;position:absolute;top:0;left:0;z-index:100;animation:top-loadbar var(--dialog-loading-duration) forwards}.ui-dialog-content.modal-expanded{width:100vw!important;height:calc(var(--100vh) + 10px)!important}.modal-header>[data-widget]{padding:0 8px;position:absolute;inset:0;opacity:0;overflow:hidden;align-items:center;visibility:hidden;transition:opacity .3s;z-index:1}.modal-header>[data-widget=search] div.cancel{opacity:0;transform:translate(100%);transition:transform,opacity;transition-duration:.3s}[data-view-page].i-show-search .modal-header>:not([data-widget=search]){visibility:hidden}[data-view-page].i-show-search [data-widget=search]{visibility:visible;opacity:1}[data-view-page].i-show-search [data-widget=search] .cancel{transform:translate(0);opacity:1}[data-view-page]>.modal-header>*{transition:opacity .3s}[data-view-page].i-show-search>.modal-header>div.buttons{opacity:0}.modal-layer .top-popup-wrapper{height:100%!important}@keyframes dialog-center-to-left-header-title{0%{transform:translate(0);opacity:1}75%{opacity:0}to{transform:translate(-30%);opacity:0}}@keyframes dialog-right-to-center-header-title{0%{transform:translate(100%);opacity:0}25%{opacity:0}to{transform:translate(0);opacity:1}}@keyframes dialog-center-to-left-header-icons{0%{transform:translate(0);opacity:1}35%{transform:translate(-20%);opacity:0}to{transform:translate(-20%);opacity:0}}@keyframes dialog-right-to-center-header-icons{0%{transform:translate(20%);opacity:0}65%{transform:translate(20%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes dialog-center-to-left{0%{transform:translate(0);filter:brightness(1)}to{transform:translate(-30%);filter:brightness(.9)}}@keyframes dialog-right-to-center{0%{transform:translate(100%);box-shadow:#0000001a 0 0 10px}to{transform:translate(0);box-shadow:#0003 0 0 10px}}@media only screen and (max-width: 1480px){.win_side_panel_opener{display:none}}@media only screen and (min-width: 1480px){.ui-dialog-content.with_side_panel{box-shadow:#0003 0 0 6px}.ui-dialog-content.with_side_panel .modal-layer-body{background:var(--color-layout-front-1)}[data-widget=side_panel]{--side_panel_width: calc((100vw - 900px)/2 - 28px) ;box-sizing:border-box;background:var(--color-layout-front-1);max-width:var(--side_panel_width);padding:18px;position:absolute;top:calc(var(--dialog-header-height) + 1px + var(--dialog-layer-pageSelector));bottom:calc(var(--top-dialog-footer-height) + 1px);z-index:-1;display:block;transition:.2s}.win_side_panel_left{border-radius:8px 0 0 8px;right:100%}.win_side_panel_right{border-radius:0 8px 8px 0;left:100%}.win_side_panel_closed.win_side_panel_left{right:calc(100% - var(--side_panel_width))}.win_side_panel_closed.win_side_panel_right{left:calc(100% - var(--side_panel_width))}[data-widget=side_panel] .template{display:block}[data-widget=side_panel] .template>.header,[data-widget=side_panel] .template>.footer{display:flex}.win_side_panel_opener{cursor:pointer;background:var(--color-cyan);color:#fff;padding:4px;position:absolute;top:20px}.win_side_panel_closed .win_side_panel_opener:not(:hover){opacity:.3}.win_side_panel_left .win_side_panel_opener{border-radius:4px 0 0 4px;right:100%}.win_side_panel_right .win_side_panel_opener{border-radius:0 6px 6px 0;left:100%}}@media only screen and (max-height: 900px){html.with_dialog{background:#f1f1f1;overflow:hidden}.ui-dialog.me-tightly{border-radius:0;height:auto!important;position:fixed;top:0!important;bottom:0!important}.ui-dialog.me-tightly .ui-dialog-content{min-height:100%!important}.ui-dialog.me-tightly>div>.modal-body{position:absolute;top:var(--dialog-header-height);right:0;left:0;bottom:var(--dialog-header-height)}.ui-dialog.me-tightly>div>.modal-body:last-child{bottom:0}.ui-dialog.me-tightly>div>.modal-footer{position:absolute;right:0;bottom:0;left:0}.ui-dialog.me-tightly .modal-layer-body{border-radius:0;min-height:0!important}.ui-dialog.me-tightly .modal-layer-body .modal-footer{min-height:unset}}',U='html.with_dialog body{height:var(--100vh);overflow:hidden}.ui-widget-overlay{height:calc(100% - var(--toolbar-height))}.ui-dialog{border-radius:0;width:auto!important;height:auto!important;position:fixed;inset:0!important}.ui-dialog-content{width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important}.modal-header>.top-title{text-align:center;font-size:14px}.modal-header>div.close{font-size:14px;order:1}.modal-header>div.close:before{content:""}.modal-body:last-child{bottom:0}.modal-footer{bottom:0}.modal-footer .second_level{padding:10px 8px}.modal-layer-body{min-height:0!important}.ui-dialog-content>.modal-layer-body{border-radius:0}.modal-body,.modal-footer{padding-right:12px;padding-left:12px}.modal-footer .btn:last-child{margin-right:12px}.modal-body .inner{padding:12px;margin:0 -12px;position:relative}',K=".modal-menu-opener{order:1!important}.modal-menu-opener:before{--top-icon-size: 20px;--top-icon-color: #FFF;--top-icon-width: var(--top-icon-size);border-radius:50%;background:var(--color-bg-primary-1);padding:3px;transition:transform .1s}.modal-menu-opener:hover:before{background:var(--color-bg-primary-2)}.modal-menu-opener.top-active:before{background:var(--color-bg-primary-2);transform:scale(.8)}.modal-layer .top-popup-wrapper{background:transparent;width:auto!important;padding:0!important;margin:0!important;top:0!important;right:0!important;left:0!important;transition:background .3s}.modal-layer .top-popup-wrapper>.top-popup[class],.modal-layer .top-popup-wrapper.with_notch>.top-popup[class]{border-radius:8px;border:none;margin:12px!important;max-width:100%;max-height:calc(100% - 24px);inset:0 0 auto!important;overflow:auto;display:flex;flex-direction:column;opacity:1;transform:translateY(calc(-100% - 24px));transition:transform .3s}.modal-layer .top-popup>.top-popup_header{background:var(--color-theme-50)}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select{border:none}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select .text{color:#fff}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select .arrow{background:none}.modal-layer .top-popup-wrapper-shown:not(.top-popup-wrapper-closed){background:#34495e40}@media only screen and (min-width: 1480px){.ui-dialog-content.with_side_panel{box-shadow:#0003 0 0 6px}.ui-dialog-content.with_side_panel .modal-layer-body{background:var(--color-layout-front-1)}[data-widget=side_panel]{--side_panel_width: calc((100vw - 900px)/2 - 28px) ;box-sizing:border-box;background:var(--color-layout-front-1);max-width:var(--side_panel_width);padding:18px;display:block;position:absolute;top:51px;bottom:51px;z-index:-1;transition:.2s}.win_side_panel_left{border-radius:8px 0 0 8px;right:100%}.win_side_panel_right{border-radius:0 8px 8px 0;left:100%}.win_side_panel_closed.win_side_panel_left{right:calc(100% - var(--side_panel_width))}.win_side_panel_closed.win_side_panel_right{left:calc(100% - var(--side_panel_width))}[data-widget=side_panel] .template{display:block}[data-widget=side_panel] .template>.header,[data-widget=side_panel] .template>.footer{display:flex}.win_side_panel_opener{cursor:pointer;background:var(--color-cyan);color:#fff;padding:4px;position:absolute;top:20px}.win_side_panel_closed .win_side_panel_opener:not(:hover){opacity:.3}.win_side_panel_left .win_side_panel_opener{border-radius:4px 0 0 4px;right:100%}.win_side_panel_right .win_side_panel_opener{border-radius:0 6px 6px 0;left:100%}}",R="html{--top-dialog-width: auto;--top-dialog-height: auto}.top-dialog{max-width:100vw}.top-dialog .modal-layer-body{height:var(--top-dialog-height)}",J=".top-dialog{width:var(--top-dialog-width)!important}";u.Core.insertStyleToPage(F),u.Core.insertStyleToPage(U,"m"),u.Core.insertStyleToPage(K,"pc"),u.Core.insertStyleToPage(R),u.Core.insertStyleToPage(J,"pc");let W,_=!1;const m=e=>!!e&&typeof e=="object"&&"jquery"in e,Z=()=>{$.extend($.ui.dialog.prototype.options,{focus:e=>{var t;e.target.focus(),(t=$("[autofocus]",e.target)[0])==null||t.focus()},create:e=>G(e.target),open:e=>X(e.target),close:e=>Y(e.target),modal:!0,resizable:!1,closeOnEscape:!1,width:"auto",minHeight:0}),$.ui.dialog.prototype._focusTabbable=$.noop,$.ui.dialog.prototype._moveToTopOriginal=$.ui.dialog.prototype._moveToTop,$.ui.dialog.prototype._moveToTop=function(){this._moveToTopOriginal();const e=$(this.element);e.trigger("dialogsMoveToTop",[e])},H(),_=!0},z=e=>{var i,o;const t={};return((i=e.dataset)==null?void 0:i.modal)==="false"&&(t.modal=!1),(o=e.dataset)!=null&&o.position&&(t.position=JSON.parse(e.dataset.position)),t},b=e=>document.getElementById(e),x=async(e,t,i)=>{if(!e.startsWith("dialog_"))return;const o=c.getDialogWorker(e);if(o&&(o.isOpened.value=!0,t!==void 0&&(o.pageActive.value=t),i!==void 0&&(o.pageActiveNext.value=i),await w.nextTick(),i)){const a=b(e);if(!a)return;a.querySelectorAll(`[data-view-page="${i}"]`).length||await q.waitWhile(()=>!a.querySelectorAll(`[data-view-page="${i}"]`).length)}},G=e=>{var i,o;const t=e.querySelector(".modal-body");t&&(O.connectScrollShadow(t),(o=(i=c.TopDialogWorker.state).decoratorOnCreate)==null||o.call(i,e),Q(e))},Q=e=>{$(e).on("aftershow.top-menu-popup","[data-top-popup]",(t,i)=>{var r;const o=i[0],a=c.TopDialogWorker.getPairPage(o);(r=a==null?void 0:a[1])==null||r.prepend(o)})},X=async e=>{var n;const t=e.dataset.viewPageActive,i=window.innerWidth;u.Core.state.documentClassModificators.set("top-dialog","with_dialog");const a=window.innerWidth-i;document.documentElement.scrollHeight>window.innerHeight&&(document.querySelector("html").style.marginRight=a+"px"),C();const r=c.getDialogWorker(e.getAttribute("id"));(n=r==null?void 0:r.emit)==null||n.call(r,"open",t)},Y=async e=>{var r;const t=e.getAttribute("id"),i=e.dataset.viewPageActive;if(i){const n={vpn:c.TopDialogWorker.state.viewPageN,["view-"+t]:null};n["view-"+t]=null,(c.TopDialogWorker.state.viewPageN===0||c.TopDialogWorker.state.viewPageN===1)&&(n.vpn=null),E.setHashs(n,!1)}l.querySelectorAllArray(document,".ui-widget-overlay").filter(n=>l.isVisible(n)).length||(u.Core.state.documentClassModificators.delete("top-dialog"),document.querySelector("html").style.marginRight=""),$(e).trigger("viewAfterClose",[$(e)]);const a=c.getDialogWorker(t);a&&(a.isOpened.value=!1,(r=a.emit)==null||r.call(a,"close",i),a.onCloseOnce&&(a.onCloseOnce(a.props,i),a.onCloseOnce=void 0)),window.dispatchEvent(new Event("resize"))},C=()=>{l.querySelectorAllArray(document,".ui-dialog").filter(t=>l.isVisible(t)&&t.querySelector(":scope > .ui-dialog-content")).map(t=>t.querySelector(":scope > .ui-dialog-content")).forEach(t=>{if(!t.querySelector(".modal-body"))return;const o=t.closest(".ui-dialog"),a=z(t);a.position??={of:window},$(t).dialog("option",a),o.classList.remove("me-tightly"),(o.clientHeight??0)>window.innerHeight&&o.classList.add("me-tightly")})},N=async(e,t)=>{const o=/(\w+)[=-]([\w-]+)(?::([\w.:-]+))?/g.exec(e);if(o){const a=o[1],r=o[2],n=o[3];let s=[];n&&(s=n.split(":")),await A(a,r,s,t)}},A=async(e,t,i,o,a)=>{_||await new Promise((s,p)=>{const f=setInterval(()=>{_&&(clearInterval(f),s())},1e4)}),await w.nextTick();let r;if(typeof e=="object"?(m(e)&&(e=e==null?void 0:e[0]),r=e):r=b(e),!r&&typeof e=="string"&&c.TopDialogWorker.state.load){await c.TopDialogWorker.state.load(e),await A(e,t,i,o,a);return}if(!r)return;await S(r,t,i,o);const n=$(r);if(r!=null&&r.classList.contains("ui-dialog-content"))n.dialog("open");else{const s=z(r);n.dialog(s)}a&&a(n)},S=async(e,t,i,o)=>{var f,k;m(e)&&(e=e==null?void 0:e[0]),t===void 0&&(t=e.dataset.viewPageActive),t!==e.dataset.viewPageActive&&B(e)&&await q.sleep(100),i===void 0&&(i=[]),await x(e.getAttribute("id"),void 0,t);const a=l.querySelectorAllArray(e,".modal-layer"),r=a.reduce((d,h)=>{const g=h.querySelector(":scope > .active");return g&&d.push(g),d},[]),n=a.reduce((d,h)=>{const g=h.querySelector(`:scope > [data-view-page="${t}"]`);return g&&d.push(g),d},[]),s=i.join(":");if(o===void 0&&(o="next",(((f=n[0])==null?void 0:f.dataset.order)??0)<(((k=r[0])==null?void 0:k.dataset.order)??0)&&(o="prev")),!n.length)return;if(e.dataset.viewPageActive=t,n[0].classList.contains("active")){n[0].dataset.viewPageArgs!==s&&n.forEach(d=>{d.dataset.viewPageArgs=s}),j(e,n,t,i),P(e,n,t,i);return}n.forEach(d=>{d.dataset.viewPageArgs=s}),r.forEach(d=>{d.querySelector(".top-popup-wrapper")&&I.TopPopupWorker.close(d.querySelector(".top-popup-wrapper"))});const p=n[0].closest(".ui-dialog");switch(p&&!l.isVisible(p)&&(o="none"),r.length||(o="none"),l.isVisible(n[0])&&(o="none"),o){case"prev":{n.forEach(d=>{var g,v;const h=(g=d.parentNode)==null?void 0:g.querySelector(":scope > .active");h&&((v=d.parentNode)==null||v.insertBefore(d,h))}),r.forEach(d=>{d.classList.add("right-to-center","reverse")}),n.forEach(d=>{d.classList.add("center-to-left","reverse")});break}case"next":{n.forEach(d=>{var g,v;const h=(g=d.parentNode)==null?void 0:g.querySelector(":scope > .active");h&&((v=d.parentNode)==null||v.insertBefore(d,h.nextSibling))}),r.forEach(d=>{d==null||d.classList.add("center-to-left")}),n.forEach(d=>{d.classList.add("right-to-center")});break}}if(e.setAttribute("view-page-active",t),r.forEach(d=>{d.classList.remove("active")}),n.forEach(d=>{d.classList.add("active")}),j(e,n,t,i),o){e.classList.add("i-change-page");const d=Number(window.getComputedStyle(n[0]).animationDuration.replace("s",""))*1e3;W=setTimeout(function(){x(e.getAttribute("id"),t,""),B(e),P(e,n,t,i)},d)}else await x(e.getAttribute("id"),t,""),P(e,n,t,i)},D=e=>{var r;const a=(r=l.querySelectorAllArray(e,".modal-layer").reduce((n,s)=>{const p=s.querySelector(":scope > .active");return p&&n.push(p),n},[]).reduce((n,s)=>{let p=s.previousElementSibling;for(;p&&!p.hasAttribute("[data-view-page]");)p=p.previousElementSibling;return p&&n.push(p),n},[])[0])==null?void 0:r.dataset.viewPage;a?S(e,a,void 0,"prev"):$(e).dialog("close")},T=new Set,j=(e,t,i,o)=>{const a=e.getAttribute("id")+t[0].dataset.viewPage+i+o.join();T.has(a)||(T.add(a),setTimeout(function(){T.delete(a),$(e).trigger("viewBeforeOpen",[$(e),$(t),i,o])}))},P=(e,t,i,o)=>{setTimeout(function(){$(e).trigger("viewAfterOpen",[$(e),$(t),i,o])})},M=e=>(m(e)&&(e=e==null?void 0:e[0]),e.classList.contains("i-change-page")),B=e=>{if(!M(e))return!1;clearTimeout(W);const t=l.querySelectorAllArray(e,".modal-layer"),i=e.dataset.viewPageActive;return e.classList.remove("i-change-page"),t.forEach(o=>{o.querySelectorAll(":scope > [data-view-page]").forEach(a=>{a.classList.remove("center-to-left","right-to-center","reverse","active")})}),t.forEach(o=>{var a;(a=o.querySelector(`:scope > [data-view-page="${i}"]`))==null||a.classList.add("active")}),!0},y={getElDialogById:b,updatePageVue:x,recalcPositions:C,toViewDirty:N,toView:A,toViewPage:S,toPrevPage:D,setLoading:(e,t,i)=>{m(e)&&(e=e.toArray());const o=e.reduce((a,r)=>(r.hasAttribute("[data-view-page]")&&l.isVisible(r)&&a.push(r),a),[]);t?(i!==void 0&&o.forEach(a=>{a.style.setProperty("--dialog-loading-duration",i+"s")}),o.forEach(a=>{a.classList.add("i-load-data")})):(o.forEach(a=>{a.classList.remove("i-load-data")}),o.forEach(a=>{a.style.setProperty("--dialog-loading-duration","10s")}))},isLoading:e=>(m(e)&&(e=e==null?void 0:e[0]),e.classList.contains("i-load-data")),inAnimation:M,close:function(e){const t=b(e);if(!t)return;const i=$(t);i.dialog("instance")&&i.dialog("close")}};Z(),L.TopDialogUtils=y,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
-
//# sourceMappingURL=utils-
|
|
1
|
+
define(["require","exports","vue","./forms-CgtkdwgA.amd","../popup/worker.amd","../utils/system.amd","../utils/route.amd","../utils/scroll.amd","./dialogs.vue_vue_type_script_setup_true_lang-CJrXpeqH.amd","../utils/dom.amd"],(function(ee,L,w,u,I,q,E,O,c,l){"use strict";if(typeof w>"u")var w=window.Vue;$;let V=!1;const H=()=>{V||(V=!0,document.addEventListener("keydown",e=>{if(e.key!=="Escape"||!e.target)return;const t=e.target;if(!t.closest(".ui-dialog")||t.contentEditable==="true"||t.contentEditable==="plaintext-only"||l.querySelectorVisible(document.documentElement,".top-popup-wrapper")||t.classList.contains("autocomplete")||l.querySelectorVisible(document.documentElement,".fancybox-container"))return;const i=l.querySelectorAllArray(document,".ui-dialog-content").filter(o=>l.isVisible(o));$(i[i.length-1]).dialog("close")}),document.addEventListener("click",e=>{const t=e.target.closest('[data-action="top-dialog-close"]');if(!t)return;e.preventDefault();const i=t.closest(".ui-dialog-content");if(!i)return;const o=t.dataset.toView;if(o=="toPrevPage()"){y.toPrevPage(i);return}if(o){const r=o.split("-"),n=r.shift(),s=r.join("-");if(!n)return;const p=y.getElDialogById(n);if(!p)return;const f=l.querySelectorAllArray(p,`[data-view-page="${s}"]`);if(!f)return;if(!l.isVisible(f[0])){const k=c.TopDialogWorker.genViewPageHash(o,"prev");E.historySetState(!1,k);return}}$(i).dialog("close")}),document.addEventListener("submit",e=>{const t=e.target;(t.matches(".modal-body > form")||t.matches(".modal-layer-body > form"))&&e.preventDefault()}),document.addEventListener("keypress",e=>{const t=e.target;if(!(!t.closest(".ui-dialog .modal-body")||!(t.matches("input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)")||t.hasAttribute("contenteditable")))&&e.key==="Enter"){if(t.classList.contains("autocomplete")){e.preventDefault();return}if(t.tagName==="TEXTAREA"){if(!e.ctrlKey&&!e.metaKey)return;const a=t.closest("form");if(a){const r=l.querySelectorAllArray(a,'button[type="submit"]').concat(l.querySelectorAllArray(a,'input[type="submit"]')).find(n=>l.isVisible(n));r==null||r.click()}}}}),document.addEventListener("click",function(e){if(!e.target.classList.contains("ui-widget-overlay"))return;let i,o=0;if(l.querySelectorAllArray(document,".ui-dialog").filter(r=>l.isVisible(r)).forEach(r=>{const n=Number(window.getComputedStyle(r).zIndex);n<o||(i=r,o=n)}),i){const r=i.querySelector(".ui-dialog-content");$(r).dialog("close")}}),window.addEventListener("resize",y.recalcPositions),y.recalcPositions())},F=':root{--dialog-border-color: var(--color-line-1);--dialog-loading-duration: 10s;--top-dialog-footer-height: var(--top-forms-base-height_s)}html.with_dialog{overflow:hidden!important}a[data-to-view]{cursor:pointer}.ui-widget-overlay{background:#040404;opacity:.5;filter:Alpha(Opacity=50)}.ui-dialog{border-radius:8px;border:none;padding:0}.ui-dialog.ui-widget{border:none}.ui-dialog-titlebar{display:none}.ui-dialog .ui-dialog-content{padding:0;overflow:visible}.ui-dialog .project_name{word-break:break-all}.ui-dialog-content{--dialog-header-height: 50px;--dialog-layer-pageSelector: 0px}.ui-dialog-content-withPageSelector{--dialog-layer-pageSelector: 42px}.modal-header,.modal-body,.modal-footer{font-size:14px;position:relative}.modal-body{padding:var(--padding-default)}.modal-body:has(>.topTable:first-child){padding-top:calc(var(--padding-default) / 4)}.modal-header{border-bottom:1px solid var(--dialog-border-color);height:var(--dialog-header-height);padding:0 var(--padding-default);display:flex;justify-content:space-between;align-items:center;gap:var(--top-padding-2)}.modal-header>*{padding:10px 0;font-size:16px}.modal-header>.top-title{margin:0;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1;order:50;display:flex;align-items:center}.modal-header>.top-title>div[class*=icon]{display:none}.modal-header>div:not(.top-title){order:60}.modal-header>div.close{--top-icon-color: var(--color-text-2);cursor:pointer;background:var(--color-layout-front-1);font-size:16px;order:100;animation-name:none!important}.modal-header>div.close:hover{--top-icon-color: var(--color-text-1)}.modal-header .links_icons{position:absolute;right:50px}.modal-header .links_icons [class*=icon-]{width:auto;height:auto;padding:0 5px;color:#d6dee0}.modal-header .links_icons [class*=icon-].active{color:var(--color-bg-warning-1)}.modal-layer-pageSelector{padding:0 10px!important}.modal-body{max-height:calc(var(--100vh) - var(--dialog-header-height) - 1px - var(--dialog-layer-pageSelector) - var(--top-dialog-footer-height) - 1px);overflow-y:auto;overflow-x:hidden;box-sizing:border-box;flex-grow:1}.modal-body hr{margin:16px -15px}.modal-body h4{padding:0;margin:0 0 10px;line-height:normal}.modal-body .inner{padding:var(--padding-default);margin:0 calc(0px - var(--padding-default));position:relative}.modal-body .inner .bt{border-top:1px dashed var(--color-layout-front-primary-3);position:absolute;top:0;right:0;left:0}.modal-body .inner .bb{border-bottom:1px dashed var(--color-layout-front-primary-3);position:absolute;right:0;bottom:0;left:0}.modal-body .inner.color-1{background:var(--color-layout-front-primary-3);color:var(--color-text-1)}.modal-body .inner strong{color:var(--color-text-1)}.modal-body .comment{line-height:18px}.modal-footer{min-height:var(--top-dialog-footer-height);padding:var(--top-gap-2);display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;gap:var(--top-gap-2)}.modal-footer .modal-footer-btn-left{margin-right:auto}.modal-footer>.btn.full_width,.modal-footer>.top-button.full_width{flex-grow:1;align-self:flex-end}.modal-footer-fullWith{flex-wrap:wrap}.modal-footer-fullWith>*{flex-grow:1}.modal-footer-fullWith>.top-info{flex-grow:5}.modal-footer-fullWith>*:empty{flex-grow:0}.ui-dialog-content>.modal-layer>[data-view-page]>input[type=submit]{position:absolute;visibility:hidden}.help_popup .modal-header{display:none}.help_popup .modal-header a{top:2px;z-index:10}.help_popup .modal-header .top-title{display:none}.modal-layer{overflow:hidden}.modal-layer a[data-top-icon]:empty{color:var(--color-text-4);text-decoration:none}.modal-layer>[data-view-page]>div>div.buttons{display:flex;white-space:nowrap;gap:var(--top-padding-1)}.modal-layer>[data-view-page]>div>div.buttons:empty{display:none}.modal-layer>[data-view-page]>div>div.buttons>div,.modal-layer>[data-view-page]>div>div.buttons>a{cursor:pointer;width:auto;height:auto;min-width:auto;min-height:auto;padding:10px 9px;color:var(--color-text-4)}.modal-layer>[data-view-page]>div>div.buttons>div:hover{color:var(--color-text-2)}.modal-layer>[data-view-page]>div>div.buttons>div.hidden{display:none!important}.ui-dialog-content[data-view-page-active]{display:flex!important;flex-direction:column;justify-items:stretch}.ui-dialog-content>.modal-layer{display:flex!important;align-items:stretch;position:relative}.ui-dialog-content.i-change-page>.modal-layer{overflow:hidden}.ui-dialog-content>.modal-layer>[data-view-page]{width:100%;position:relative;display:none;flex-direction:column;justify-content:space-between;animation:.3s cubic-bezier(.4,0,.2,1) forwards}.ui-dialog-content>.modal-layer>[data-view-page].active{display:flex}.ui-dialog-content>.modal-layer>[data-view-page].reverse{animation-direction:reverse}.ui-dialog-content>.modal-layer>[data-view-page].center-to-left,.ui-dialog-content>.modal-layer>[data-view-page].right-to-center{display:flex;position:absolute;inset:0}.ui-dialog-content>.modal-layer>[data-view-page].center-to-left>div,.ui-dialog-content>.modal-layer>[data-view-page].right-to-center>div{overflow:hidden}.ui-dialog-content>.modal-layer-header{border-bottom:1px solid var(--dialog-border-color);min-height:var(--dialog-header-height)}.ui-dialog-content>.modal-layer-header>[data-view-page]>.modal-header{border:none;background:none}.ui-dialog-content>.modal-layer-header>[data-view-page]>.modal-header>*{animation:.3s cubic-bezier(.4,0,.2,1) forwards}.ui-dialog-content>.modal-layer-header>[data-view-page].reverse>.modal-header>*{animation-direction:reverse}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>.top-title{animation-name:dialog-center-to-left-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>.top-title{animation-name:dialog-right-to-center-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>[class*=widget-]{animation-name:dialog-center-to-left-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>[class*=widget-]{animation-name:dialog-right-to-center-header-title}.ui-dialog-content>.modal-layer-header>[data-view-page].center-to-left>.modal-header>div{animation-name:dialog-center-to-left-header-icons}.ui-dialog-content>.modal-layer-header>[data-view-page].right-to-center>.modal-header>div{animation-name:dialog-right-to-center-header-icons}.ui-dialog-content>.modal-layer-body{border-radius:0 0 8px 8px;max-height:calc(var(--100vh) - var(--dialog-header-height) - var(--dialog-layer-pageSelector) - var(--toolbar-height));flex-grow:2}.ui-dialog-content.i-change-page>.modal-layer-body>[data-view-page]{background:var(--color-layout-front-1)}.ui-dialog-content>.modal-layer-body>[data-view-page].center-to-left{animation-name:dialog-center-to-left}.ui-dialog-content>.modal-layer-body>[data-view-page].right-to-center{animation-name:dialog-right-to-center}.ui-dialog-content .modal-footer .second_level{box-sizing:border-box;background:var(--color-layout-front-1);width:100%;min-height:25px;display:flex;align-items:center;justify-content:center}.ui-dialog-content .modal-footer .second_level input{border-radius:8px;width:100%;height:var(--top-forms-base-height);padding:var(--top-padding-1) var(--top-padding-3);box-sizing:border-box}.ui-dialog-content>.modal-layer-body>[data-view-page].i-load-data{pointer-events:none}.ui-dialog-content>.modal-layer-body>[data-view-page].i-load-data:before{content:" ";background:#378dc6;width:0;height:4px;position:absolute;top:0;left:0;z-index:100;animation:top-loadbar var(--dialog-loading-duration) forwards}.ui-dialog-content.modal-expanded{width:100vw!important;height:calc(var(--100vh) + 10px)!important}.modal-header>[data-widget]{padding:0 8px;position:absolute;inset:0;opacity:0;overflow:hidden;align-items:center;visibility:hidden;transition:opacity .3s;z-index:1}.modal-header>[data-widget=search] div.cancel{opacity:0;transform:translate(100%);transition:transform,opacity;transition-duration:.3s}[data-view-page].i-show-search .modal-header>:not([data-widget=search]){visibility:hidden}[data-view-page].i-show-search [data-widget=search]{visibility:visible;opacity:1}[data-view-page].i-show-search [data-widget=search] .cancel{transform:translate(0);opacity:1}[data-view-page]>.modal-header>*{transition:opacity .3s}[data-view-page].i-show-search>.modal-header>div.buttons{opacity:0}.modal-layer .top-popup-wrapper{height:100%!important}@keyframes dialog-center-to-left-header-title{0%{transform:translate(0);opacity:1}75%{opacity:0}to{transform:translate(-30%);opacity:0}}@keyframes dialog-right-to-center-header-title{0%{transform:translate(100%);opacity:0}25%{opacity:0}to{transform:translate(0);opacity:1}}@keyframes dialog-center-to-left-header-icons{0%{transform:translate(0);opacity:1}35%{transform:translate(-20%);opacity:0}to{transform:translate(-20%);opacity:0}}@keyframes dialog-right-to-center-header-icons{0%{transform:translate(20%);opacity:0}65%{transform:translate(20%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes dialog-center-to-left{0%{transform:translate(0);filter:brightness(1)}to{transform:translate(-30%);filter:brightness(.9)}}@keyframes dialog-right-to-center{0%{transform:translate(100%);box-shadow:#0000001a 0 0 10px}to{transform:translate(0);box-shadow:#0003 0 0 10px}}@media only screen and (max-width: 1480px){.win_side_panel_opener{display:none}}@media only screen and (min-width: 1480px){.ui-dialog-content.with_side_panel{box-shadow:#0003 0 0 6px}.ui-dialog-content.with_side_panel .modal-layer-body{background:var(--color-layout-front-1)}[data-widget=side_panel]{--side_panel_width: calc((100vw - 900px)/2 - 28px) ;box-sizing:border-box;background:var(--color-layout-front-1);max-width:var(--side_panel_width);padding:18px;position:absolute;top:calc(var(--dialog-header-height) + 1px + var(--dialog-layer-pageSelector));bottom:calc(var(--top-dialog-footer-height) + 1px);z-index:-1;display:block;transition:.2s}.win_side_panel_left{border-radius:8px 0 0 8px;right:100%}.win_side_panel_right{border-radius:0 8px 8px 0;left:100%}.win_side_panel_closed.win_side_panel_left{right:calc(100% - var(--side_panel_width))}.win_side_panel_closed.win_side_panel_right{left:calc(100% - var(--side_panel_width))}[data-widget=side_panel] .template{display:block}[data-widget=side_panel] .template>.header,[data-widget=side_panel] .template>.footer{display:flex}.win_side_panel_opener{cursor:pointer;background:var(--color-cyan);color:#fff;padding:4px;position:absolute;top:20px}.win_side_panel_closed .win_side_panel_opener:not(:hover){opacity:.3}.win_side_panel_left .win_side_panel_opener{border-radius:4px 0 0 4px;right:100%}.win_side_panel_right .win_side_panel_opener{border-radius:0 6px 6px 0;left:100%}}@media only screen and (max-height: 900px){html.with_dialog{background:#f1f1f1;overflow:hidden}.ui-dialog.me-tightly{border-radius:0;height:auto!important;position:fixed;top:0!important;bottom:0!important}.ui-dialog.me-tightly .ui-dialog-content{min-height:100%!important}.ui-dialog.me-tightly>div>.modal-body{position:absolute;top:var(--dialog-header-height);right:0;left:0;bottom:var(--dialog-header-height)}.ui-dialog.me-tightly>div>.modal-body:last-child{bottom:0}.ui-dialog.me-tightly>div>.modal-footer{position:absolute;right:0;bottom:0;left:0}.ui-dialog.me-tightly .modal-layer-body{border-radius:0;min-height:0!important}.ui-dialog.me-tightly .modal-layer-body .modal-footer{min-height:unset}}',U='html.with_dialog body{height:var(--100vh);overflow:hidden}.ui-widget-overlay{height:calc(100% - var(--toolbar-height))}.ui-dialog{border-radius:0;width:auto!important;height:auto!important;position:fixed;inset:0!important}.ui-dialog-content{width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important}.modal-header>.top-title{text-align:center;font-size:14px}.modal-header>div.close{font-size:14px;order:1}.modal-header>div.close:before{content:""}.modal-body:last-child{bottom:0}.modal-footer{bottom:0}.modal-footer .second_level{padding:10px 8px}.modal-layer-body{min-height:0!important}.ui-dialog-content>.modal-layer-body{border-radius:0}.modal-body,.modal-footer{padding-right:12px;padding-left:12px}.modal-footer .btn:last-child{margin-right:12px}.modal-body .inner{padding:12px;margin:0 -12px;position:relative}',K=".modal-menu-opener{order:1!important}.modal-menu-opener:before{--top-icon-size: 20px;--top-icon-color: #FFF;--top-icon-width: var(--top-icon-size);border-radius:50%;background:var(--color-bg-primary-1);padding:3px;transition:transform .1s}.modal-menu-opener:hover:before{background:var(--color-bg-primary-2)}.modal-menu-opener.top-active:before{background:var(--color-bg-primary-2);transform:scale(.8)}.modal-layer .top-popup-wrapper{background:transparent;width:auto!important;padding:0!important;margin:0!important;top:0!important;right:0!important;left:0!important;transition:background .3s}.modal-layer .top-popup-wrapper>.top-popup[class],.modal-layer .top-popup-wrapper.with_notch>.top-popup[class]{border-radius:8px;border:none;margin:12px!important;max-width:100%;max-height:calc(100% - 24px);inset:0 0 auto!important;overflow:auto;display:flex;flex-direction:column;opacity:1;transform:translateY(calc(-100% - 24px));transition:transform .3s}.modal-layer .top-popup>.top-popup_header{background:var(--color-theme-50)}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select{border:none}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select .text{color:#fff}.modal-layer .top-theme-lite .top-popup>.top-popup_header .select .arrow{background:none}.modal-layer .top-popup-wrapper-shown:not(.top-popup-wrapper-closed){background:#34495e40}@media only screen and (min-width: 1480px){.ui-dialog-content.with_side_panel{box-shadow:#0003 0 0 6px}.ui-dialog-content.with_side_panel .modal-layer-body{background:var(--color-layout-front-1)}[data-widget=side_panel]{--side_panel_width: calc((100vw - 900px)/2 - 28px) ;box-sizing:border-box;background:var(--color-layout-front-1);max-width:var(--side_panel_width);padding:18px;display:block;position:absolute;top:51px;bottom:51px;z-index:-1;transition:.2s}.win_side_panel_left{border-radius:8px 0 0 8px;right:100%}.win_side_panel_right{border-radius:0 8px 8px 0;left:100%}.win_side_panel_closed.win_side_panel_left{right:calc(100% - var(--side_panel_width))}.win_side_panel_closed.win_side_panel_right{left:calc(100% - var(--side_panel_width))}[data-widget=side_panel] .template{display:block}[data-widget=side_panel] .template>.header,[data-widget=side_panel] .template>.footer{display:flex}.win_side_panel_opener{cursor:pointer;background:var(--color-cyan);color:#fff;padding:4px;position:absolute;top:20px}.win_side_panel_closed .win_side_panel_opener:not(:hover){opacity:.3}.win_side_panel_left .win_side_panel_opener{border-radius:4px 0 0 4px;right:100%}.win_side_panel_right .win_side_panel_opener{border-radius:0 6px 6px 0;left:100%}}",R="html{--top-dialog-width: auto;--top-dialog-height: auto}.top-dialog{max-width:100vw}.top-dialog .modal-layer-body{height:var(--top-dialog-height)}",J=".top-dialog{width:var(--top-dialog-width)!important}";u.Core.insertStyleToPage(F),u.Core.insertStyleToPage(U,"m"),u.Core.insertStyleToPage(K,"pc"),u.Core.insertStyleToPage(R),u.Core.insertStyleToPage(J,"pc");let W,_=!1;const m=e=>!!e&&typeof e=="object"&&"jquery"in e,Z=()=>{$.extend($.ui.dialog.prototype.options,{focus:e=>{var t;e.target.focus(),(t=$("[autofocus]",e.target)[0])==null||t.focus()},create:e=>G(e.target),open:e=>X(e.target),close:e=>Y(e.target),modal:!0,resizable:!1,closeOnEscape:!1,width:"auto",minHeight:0}),$.ui.dialog.prototype._focusTabbable=$.noop,$.ui.dialog.prototype._moveToTopOriginal=$.ui.dialog.prototype._moveToTop,$.ui.dialog.prototype._moveToTop=function(){this._moveToTopOriginal();const e=$(this.element);e.trigger("dialogsMoveToTop",[e])},H(),_=!0},z=e=>{var i,o;const t={};return((i=e.dataset)==null?void 0:i.modal)==="false"&&(t.modal=!1),(o=e.dataset)!=null&&o.position&&(t.position=JSON.parse(e.dataset.position)),t},b=e=>document.getElementById(e),x=async(e,t,i)=>{if(!e.startsWith("dialog_"))return;const o=c.getDialogWorker(e);if(o&&(o.isOpened.value=!0,t!==void 0&&(o.pageActive.value=t),i!==void 0&&(o.pageActiveNext.value=i),await w.nextTick(),i)){const a=b(e);if(!a)return;a.querySelectorAll(`[data-view-page="${i}"]`).length||await q.waitWhile(()=>!a.querySelectorAll(`[data-view-page="${i}"]`).length)}},G=e=>{var i,o;const t=e.querySelector(".modal-body");t&&(O.connectScrollShadow(t),(o=(i=c.TopDialogWorker.state).decoratorOnCreate)==null||o.call(i,e),Q(e))},Q=e=>{$(e).on("aftershow.top-menu-popup","[data-top-popup]",(t,i)=>{var r;const o=i[0],a=c.TopDialogWorker.getPairPage(o);(r=a==null?void 0:a[1])==null||r.prepend(o)})},X=async e=>{var n;const t=e.dataset.viewPageActive,i=window.innerWidth;u.Core.state.documentClassModificators.set("top-dialog","with_dialog");const a=window.innerWidth-i;document.documentElement.scrollHeight>window.innerHeight&&(document.querySelector("html").style.marginRight=a+"px"),C();const r=c.getDialogWorker(e.getAttribute("id"));(n=r==null?void 0:r.emit)==null||n.call(r,"open",t)},Y=async e=>{var r;const t=e.getAttribute("id"),i=e.dataset.viewPageActive;if(i){const n={vpn:c.TopDialogWorker.state.viewPageN,["view-"+t]:null};n["view-"+t]=null,(c.TopDialogWorker.state.viewPageN===0||c.TopDialogWorker.state.viewPageN===1)&&(n.vpn=null),E.setHashs(n,!1)}l.querySelectorAllArray(document,".ui-widget-overlay").filter(n=>l.isVisible(n)).length||(u.Core.state.documentClassModificators.delete("top-dialog"),document.querySelector("html").style.marginRight=""),$(e).trigger("viewAfterClose",[$(e)]);const a=c.getDialogWorker(t);a&&(a.isOpened.value=!1,(r=a.emit)==null||r.call(a,"close",i),a.onCloseOnce&&(a.onCloseOnce(a.props,i),a.onCloseOnce=void 0)),window.dispatchEvent(new Event("resize"))},C=()=>{l.querySelectorAllArray(document,".ui-dialog").filter(t=>l.isVisible(t)&&t.querySelector(":scope > .ui-dialog-content")).map(t=>t.querySelector(":scope > .ui-dialog-content")).forEach(t=>{if(!t.querySelector(".modal-body"))return;const o=t.closest(".ui-dialog"),a=z(t);a.position??={of:window},$(t).dialog("option",a),o.classList.remove("me-tightly"),(o.clientHeight??0)>window.innerHeight&&o.classList.add("me-tightly")})},N=async(e,t)=>{const o=/(\w+)[=-]([\w-]+)(?::([\w.:-]+))?/g.exec(e);if(o){const a=o[1],r=o[2],n=o[3];let s=[];n&&(s=n.split(":")),await A(a,r,s,t)}},A=async(e,t,i,o,a)=>{_||await new Promise((s,p)=>{const f=setInterval(()=>{_&&(clearInterval(f),s())},1e4)}),await w.nextTick();let r;if(typeof e=="object"?(m(e)&&(e=e==null?void 0:e[0]),r=e):r=b(e),!r&&typeof e=="string"&&c.TopDialogWorker.state.load){await c.TopDialogWorker.state.load(e),await A(e,t,i,o,a);return}if(!r)return;await S(r,t,i,o);const n=$(r);if(r!=null&&r.classList.contains("ui-dialog-content"))n.dialog("open");else{const s=z(r);n.dialog(s)}a&&a(n)},S=async(e,t,i,o)=>{var f,k;m(e)&&(e=e==null?void 0:e[0]),t===void 0&&(t=e.dataset.viewPageActive),t!==e.dataset.viewPageActive&&B(e)&&await q.sleep(100),i===void 0&&(i=[]),await x(e.getAttribute("id"),void 0,t);const a=l.querySelectorAllArray(e,".modal-layer"),r=a.reduce((d,h)=>{const g=h.querySelector(":scope > .active");return g&&d.push(g),d},[]),n=a.reduce((d,h)=>{const g=h.querySelector(`:scope > [data-view-page="${t}"]`);return g&&d.push(g),d},[]),s=i.join(":");if(o===void 0&&(o="next",(((f=n[0])==null?void 0:f.dataset.order)??0)<(((k=r[0])==null?void 0:k.dataset.order)??0)&&(o="prev")),!n.length)return;if(e.dataset.viewPageActive=t,n[0].classList.contains("active")){n[0].dataset.viewPageArgs!==s&&n.forEach(d=>{d.dataset.viewPageArgs=s}),j(e,n,t,i),P(e,n,t,i);return}n.forEach(d=>{d.dataset.viewPageArgs=s}),r.forEach(d=>{d.querySelector(".top-popup-wrapper")&&I.TopPopupWorker.close(d.querySelector(".top-popup-wrapper"))});const p=n[0].closest(".ui-dialog");switch(p&&!l.isVisible(p)&&(o="none"),r.length||(o="none"),l.isVisible(n[0])&&(o="none"),o){case"prev":{n.forEach(d=>{var g,v;const h=(g=d.parentNode)==null?void 0:g.querySelector(":scope > .active");h&&((v=d.parentNode)==null||v.insertBefore(d,h))}),r.forEach(d=>{d.classList.add("right-to-center","reverse")}),n.forEach(d=>{d.classList.add("center-to-left","reverse")});break}case"next":{n.forEach(d=>{var g,v;const h=(g=d.parentNode)==null?void 0:g.querySelector(":scope > .active");h&&((v=d.parentNode)==null||v.insertBefore(d,h.nextSibling))}),r.forEach(d=>{d==null||d.classList.add("center-to-left")}),n.forEach(d=>{d.classList.add("right-to-center")});break}}if(e.setAttribute("view-page-active",t),r.forEach(d=>{d.classList.remove("active")}),n.forEach(d=>{d.classList.add("active")}),j(e,n,t,i),o){e.classList.add("i-change-page");const d=Number(window.getComputedStyle(n[0]).animationDuration.replace("s",""))*1e3;W=setTimeout(function(){x(e.getAttribute("id"),t,""),B(e),P(e,n,t,i)},d)}else await x(e.getAttribute("id"),t,""),P(e,n,t,i)},D=e=>{var r;const a=(r=l.querySelectorAllArray(e,".modal-layer").reduce((n,s)=>{const p=s.querySelector(":scope > .active");return p&&n.push(p),n},[]).reduce((n,s)=>{let p=s.previousElementSibling;for(;p&&!p.hasAttribute("[data-view-page]");)p=p.previousElementSibling;return p&&n.push(p),n},[])[0])==null?void 0:r.dataset.viewPage;a?S(e,a,void 0,"prev"):$(e).dialog("close")},T=new Set,j=(e,t,i,o)=>{const a=e.getAttribute("id")+t[0].dataset.viewPage+i+o.join();T.has(a)||(T.add(a),setTimeout(function(){T.delete(a),$(e).trigger("viewBeforeOpen",[$(e),$(t),i,o])}))},P=(e,t,i,o)=>{setTimeout(function(){$(e).trigger("viewAfterOpen",[$(e),$(t),i,o])})},M=e=>(m(e)&&(e=e==null?void 0:e[0]),e.classList.contains("i-change-page")),B=e=>{if(!M(e))return!1;clearTimeout(W);const t=l.querySelectorAllArray(e,".modal-layer"),i=e.dataset.viewPageActive;return e.classList.remove("i-change-page"),t.forEach(o=>{o.querySelectorAll(":scope > [data-view-page]").forEach(a=>{a.classList.remove("center-to-left","right-to-center","reverse","active")})}),t.forEach(o=>{var a;(a=o.querySelector(`:scope > [data-view-page="${i}"]`))==null||a.classList.add("active")}),!0},y={getElDialogById:b,updatePageVue:x,recalcPositions:C,toViewDirty:N,toView:A,toViewPage:S,toPrevPage:D,setLoading:(e,t,i)=>{m(e)&&(e=e.toArray());const o=e.reduce((a,r)=>(r.hasAttribute("[data-view-page]")&&l.isVisible(r)&&a.push(r),a),[]);t?(i!==void 0&&o.forEach(a=>{a.style.setProperty("--dialog-loading-duration",i+"s")}),o.forEach(a=>{a.classList.add("i-load-data")})):(o.forEach(a=>{a.classList.remove("i-load-data")}),o.forEach(a=>{a.style.setProperty("--dialog-loading-duration","10s")}))},isLoading:e=>(m(e)&&(e=e==null?void 0:e[0]),e.classList.contains("i-load-data")),inAnimation:M,close:function(e){const t=b(e);if(!t)return;const i=$(t);i.dialog("instance")&&i.dialog("close")}};Z(),L.TopDialogUtils=y,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
+
//# sourceMappingURL=utils-ankLRpHu.amd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-16CqqvVO.amd.js","sources":["../../src/components/dialog/lib/utils.globalEvents.ts","../../src/components/dialog/lib/utils.ts"],"sourcesContent":["import { TopDialogUtils } from './utils';\nimport { TopDialogWorker } from './worker';\nimport { isVisible, querySelectorAllArray, querySelectorVisible } from '@/core/utils/dom';\nimport { historySetState } from '@/core/utils/route';\nimport type { ElTopDialog, ElTopDialogWrapper } from '@/components/dialog/lib/types';\n\nlet inited = false;\n\n/**\n * Инициализация глобальных событий для диалоговых окон\n *\n * Производится один раз при подключении диалогового окна\n *\n * События не размонтируются\n */\nexport const initDialogGlobalEvents = () => {\n\tif (inited) return;\n\tinited = true;\n\n\t/**\n\t * Закрытие диалога по Esc\n\t */\n\tdocument.addEventListener('keydown', (e) => {\n\t\tif (e.key !== 'Escape') return;\n\t\tif (!e.target) return;\n\n\t\tconst el = e.target as HTMLElement;\n\n\t\t// событие произошло вне диалогового окна\n\t\tif (!el.closest('.ui-dialog')) return;\n\n\t\tif (el.contentEditable === 'true' || el.contentEditable === 'plaintext-only') return;\n\n\t\t// не закрывать окно при открытом TopPopup\n\t\tif (querySelectorVisible(document.documentElement, '.top-popup-wrapper')) return;\n\n\t\t// не закрывать окно при работе с jquery autocomplete\n\t\tif (el.classList.contains('autocomplete')) return;\n\n\t\t// не закрывать окно при открытом fancybox\n\t\tif (querySelectorVisible(document.documentElement, '.fancybox-container')) return;\n\n\t\tconst elDialogs = querySelectorAllArray<ElTopDialog>(document, '.ui-dialog-content').filter((elDialog) => {\n\t\t\treturn isVisible(elDialog);\n\t\t});\n\n\t\t$(elDialogs[elDialogs.length - 1]).dialog('close');\n\t});\n\n\t/**\n\t * Закрытие диалога по кнопке закрыть\n\t */\n\tdocument.addEventListener('click', (e) => {\n\t\t// // навигация без истории\n\t\t// var $dialog = $(this).closest('.ui-dialog-content');\n\t\t// var viewName = $dialog.attr('id');\n\t\t// var pageName = getHash('view-' + viewName);\n\t\t// if (!pageName) {\n\t\t// \ttoPrevPage($dialog);\n\t\t//\n\t\t// \treturn;\n\t\t// }\n\t\t//\n\t\t// // навигация по истории\n\t\t// if (Core.state.isMobile && history.length > 1 && $(this).closest('.modal-layer').length) {\n\t\t// \tvar href = location.href;\n\t\t//\n\t\t// \thistory.go(-1);\n\t\t//\n\t\t// \tsetTimeout(() => {\n\t\t// \t\t// это первая страница в истории вкладки браузера\n\t\t// \t\tif (href === location.href) $(e.target).closest('.ui-dialog-content').dialog('close');\n\t\t// \t});\n\t\t// } else {\n\t\t// \t$(this).closest('.ui-dialog-content').dialog('close');\n\t\t// }\n\n\t\tconst el = (e.target as HTMLElement).closest('[data-action=\"top-dialog-close\"]') as HTMLElement | null;\n\t\tif (!el) return;\n\n\t\te.preventDefault();\n\n\t\tconst elDialog = el.closest<ElTopDialog>('.ui-dialog-content');\n\t\tif (!elDialog) return;\n\n\t\t// если к кнопке привязана ссылка, диалоговое окно не нужно закрывать\n\t\tconst toView = el.dataset.toView;\n\n\t\tif (toView == 'toPrevPage()') {\n\t\t\tTopDialogUtils.toPrevPage(elDialog);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (toView) {\n\t\t\tconst viewNameAndPageLink = toView.split('-');\n\t\t\tconst viewName = viewNameAndPageLink.shift();\n\t\t\tconst pageLink = viewNameAndPageLink.join('-');\n\n\t\t\tif (!viewName) return;\n\n\t\t\tconst elDialog = TopDialogUtils.getElDialogById(viewName);\n\t\t\tif (!elDialog) return;\n\n\t\t\tconst elToPages = querySelectorAllArray(elDialog, `[data-view-page=\"${pageLink}\"]`);\n\t\t\tif (!elToPages) return;\n\n\t\t\tif (!isVisible(elToPages[0])) {\n\t\t\t\tconst hash = TopDialogWorker.genViewPageHash(toView, 'prev');\n\n\t\t\t\t// // не убирает кнопку \"Вперед\" в браузере\n\t\t\t\t// history.replaceState(null, '', hash);\n\t\t\t\t// toViewDirty(toView, 'prev');\n\n\t\t\t\t// // добавляет текущую страницу в историю браузера\n\t\t\t\thistorySetState(false, hash);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst $dialog = $(elDialog);\n\n\t\t$dialog.dialog('close');\n\t});\n\n\t/**\n\t * Все submit должны обрабатываться через js\n\t */\n\tdocument.addEventListener('submit', (e) => {\n\t\tconst elForm = e.target as HTMLElement;\n\n\t\tif (elForm.matches('.modal-body > form') || elForm.matches('.modal-layer-body > form')) {\n\t\t\te.preventDefault();\n\t\t}\n\t});\n\n\t/**\n\t * Выполнение действия по нажатию Enter\n\t *\n\t * @todo Убрать `.searcher`\n\t */\n\tdocument.addEventListener('keypress', (e) => {\n\t\tconst eventTarget = e.target as HTMLElement;\n\n\t\tconst elModalBody = eventTarget.closest('.ui-dialog .modal-body');\n\t\tif (!elModalBody) return;\n\n\t\tconst isInput =\n\t\t\teventTarget.matches('input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)')\n\t\t\t|| eventTarget.hasAttribute('contenteditable');\n\t\tif (!isInput) return;\n\n\t\t// if (e.keyCode !== 10 && e.key !== 'ENTER') return;\n\t\tif (e.key !== 'Enter') return;\n\n\t\t// не выполнять submit действий при работе с jquery autocomplete\n\t\tif (eventTarget.classList.contains('autocomplete')) {\n\t\t\te.preventDefault();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventTarget.tagName === 'TEXTAREA') {\n\t\t\tif (!e.ctrlKey && !e.metaKey) return;\n\n\t\t\tconst elForm = eventTarget.closest('form');\n\n\t\t\tif (elForm) {\n\t\t\t\t// Find visible submit buttons\n\t\t\t\tconst elSubmitButton = querySelectorAllArray(elForm, 'button[type=\"submit\"]')\n\t\t\t\t\t.concat(querySelectorAllArray(elForm, 'input[type=\"submit\"]'))\n\t\t\t\t\t.find((elSubmitButton) => {\n\t\t\t\t\t\treturn isVisible(elSubmitButton);\n\t\t\t\t\t});\n\n\t\t\t\telSubmitButton?.click();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Закрытие диалога по клику вне окна\n\t */\n\tdocument.addEventListener('click', function (event) {\n\t\tconst eventTarget = event.target as HTMLElement;\n\n\t\tif (!eventTarget.classList.contains('ui-widget-overlay')) return;\n\n\t\tlet elDialogWrapperWithTopZIndex: ElTopDialogWrapper | undefined;\n\t\tlet topZIndex = 0;\n\n\t\tconst elDialogWrapperVisibles = querySelectorAllArray<ElTopDialogWrapper>(document, '.ui-dialog').filter((elDialogWrapper) => {\n\t\t\treturn isVisible(elDialogWrapper);\n\t\t});\n\n\t\telDialogWrapperVisibles.forEach((elDialogWrapper) => {\n\t\t\tconst zIndex = Number(window.getComputedStyle(elDialogWrapper).zIndex);\n\t\t\tif (zIndex < topZIndex) return;\n\n\t\t\telDialogWrapperWithTopZIndex = elDialogWrapper;\n\t\t\ttopZIndex = zIndex;\n\t\t});\n\n\t\tif (elDialogWrapperWithTopZIndex) {\n\t\t\tconst elDialog = elDialogWrapperWithTopZIndex.querySelector('.ui-dialog-content');\n\n\t\t\t$(elDialog).dialog('close');\n\t\t}\n\t});\n\n\twindow.addEventListener('resize', TopDialogUtils.recalcPositions);\n\tTopDialogUtils.recalcPositions();\n};\n","import 'jquery';\nimport { nextTick } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { TopPopupWorker } from '@/components/popup/worker';\nimport { sleep, waitWhile } from '@/core/utils/system';\nimport { setHashs } from '@/core/utils/route';\nimport { connectScrollShadow } from '@/core/utils/scroll';\n\nimport type { ElTopDialogBody, ElTopDialog, ElTopDialogModalLayer, ElTopDialogPage, MoveDirection, ElTopDialogWrapper } from './types';\nimport { TopDialogWorker } from './worker';\nimport { initDialogGlobalEvents } from './utils.globalEvents';\nimport { getDialogWorker } from '../dialog/dialogs/dialogs.vue';\n\nimport css from '../dialog/style/dialog.css?inline';\nimport cssM from '../dialog/style/dialog.m.css?inline';\nimport cssPC from '../dialog/style/dialog.pc.css?inline';\nimport cssModern from '../dialog/style/modern/dialog.css?inline';\nimport cssModernPC from '../dialog/style/modern/dialog.pc.css?inline';\nimport { isVisible, querySelectorAllArray } from '@/core/utils/dom';\n\nCore.insertStyleToPage(css);\nCore.insertStyleToPage(cssM, 'm');\nCore.insertStyleToPage(cssPC, 'pc');\nCore.insertStyleToPage(cssModern);\nCore.insertStyleToPage(cssModernPC, 'pc');\n\nlet timerClearAnimation: NodeJS.Timeout;\nlet isInited = false;\n\n/**\n * Является ли элемент JQuery<HTMLElement>\n */\nconst isElJQuery = (el: JQuery<HTMLElement> | HTMLElement | HTMLElement[]) => {\n\treturn !!el && typeof el === 'object' && 'jquery' in el;\n};\n\nconst init = () => {\n\t$.extend($.ui.dialog.prototype.options, {\n\t\tfocus: (e: any) => {\n\t\t\te.target.focus();\n\n\t\t\t$('[autofocus]', e.target)[0]?.focus();\n\n\t\t\t// setTimeout(function () {\n\t\t\t// \tif ($('[autofocus]', e.target).length) return;\n\t\t\t// \t$('.modal-footer button:first, .modal-body :input:first', e.target).eq(0).focus();\n\t\t\t//\n\t\t\t// \t// fix пропадающего autocomplete при нажатии на scroll в autocomplete\n\t\t\t// \t$(e.target).add($(e.target).closest('.ui-dialog')).removeAttr('tabindex');\n\t\t\t// });\n\t\t},\n\t\tcreate: (e: any) => onCreate(e.target),\n\t\topen: (e: any) => onOpen(e.target),\n\t\tclose: (e: any) => onClose(e.target),\n\t\tmodal: true,\n\t\tresizable: false,\n\t\tcloseOnEscape: false,\n\t\twidth: 'auto',\n\t\tminHeight: 0,\n\t});\n\n\t$.ui.dialog.prototype._focusTabbable = $.noop;\n\n\t$.ui.dialog.prototype._moveToTopOriginal = $.ui.dialog.prototype._moveToTop;\n\t$.ui.dialog.prototype._moveToTop = function () {\n\t\tthis._moveToTopOriginal();\n\n\t\tconst $dialog = $(this.element);\n\t\t$dialog.trigger('dialogsMoveToTop', [$dialog]);\n\t};\n\n\tinitDialogGlobalEvents();\n\n\tisInited = true;\n};\n\n/**\n * Получить настройки диалогового окна из Vue компонента\n */\nconst genVueOptions = (elDialog: ElTopDialog) => {\n\tconst options: {\n\t\tmodal?: boolean,\n\t\tposition?: any,\n\t} = {};\n\n\tif (elDialog.dataset?.modal === 'false') options.modal = false;\n\tif (elDialog.dataset?.position) options.position = JSON.parse(elDialog.dataset.position);\n\n\treturn options;\n};\n\nconst getElDialogById = (id: string) => {\n\treturn <ElTopDialog | null>document.getElementById(id);\n};\n\n/**\n * Сменить состояние диалогового окна Vue\n */\nconst updatePageVue = async (dialogId: string, pageName?: string, pageNameNext?: string) => {\n\tif (!dialogId.startsWith('dialog_')) return;\n\n\tconst dialog = getDialogWorker(dialogId);\n\tif (!dialog) return;\n\n\tdialog.isOpened.value = true;\n\tif (pageName !== undefined) dialog.pageActive.value = pageName;\n\tif (pageNameNext !== undefined) dialog.pageActiveNext.value = pageNameNext;\n\n\tawait nextTick();\n\n\tif (pageNameNext) {\n\t\tconst elDialog = getElDialogById(dialogId);\n\t\tif (!elDialog) return;\n\n\t\tconst elNextpages = elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`);\n\n\t\tif (!elNextpages.length) {\n\t\t\tawait waitWhile(() => !elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`).length);\n\t\t}\n\t}\n};\n\n/**\n * Callback for jQuery dialog onCreate\n */\nconst onCreate = (elDialog: ElTopDialog) => {\n\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\tif (!elDialogBody) return;\n\n\tconnectScrollShadow(elDialogBody);\n\n\tTopDialogWorker.state.decoratorOnCreate?.(elDialog);\n\n\tinitPopup(elDialog);\n};\n\n/**\n * Инициирование событий TopPopup в диалоговом окне\n */\nconst initPopup = (elDialog: HTMLElement) => {\n\t$(elDialog).on('aftershow.top-menu-popup', '[data-top-popup]', (_e, $popup) => {\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPopup = $popup[0];\n\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPageContents = TopDialogWorker.getPairPage(elPopup);\n\t\telPageContents?.[1]?.prepend(elPopup);\n\t});\n};\n\n/**\n * Callback for jQuery dialog onOpen\n */\nconst onOpen = async (elDialog: ElTopDialog) => {\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tconst w1 = window.innerWidth;\n\n\tCore.state.documentClassModificators.set('top-dialog', 'with_dialog');\n\n\tconst w2 = window.innerWidth;\n\n\tconst scrollBarWidth = w2 - w1;\n\tif (document.documentElement.scrollHeight > window.innerHeight) document.querySelector('html')!.style.marginRight = scrollBarWidth + 'px';\n\n\trecalcPositions();\n\n\tconst dialog = getDialogWorker(elDialog.getAttribute('id')!);\n\tdialog?.emit?.('open', pageName);\n};\n\n/**\n * Callback for jQuery dialog onClose\n */\nconst onClose = async (elDialog: ElTopDialog) => {\n\tconst viewName = elDialog.getAttribute('id');\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName) {\n\t\tconst hashData = {\n\t\t\tvpn: TopDialogWorker.state.viewPageN as number | null,\n\t\t\t['view-' + viewName]: null,\n\t\t};\n\t\thashData['view-' + viewName] = null;\n\n\t\tif (TopDialogWorker.state.viewPageN === 0 || TopDialogWorker.state.viewPageN === 1) {\n\t\t\thashData.vpn = null;\n\t\t}\n\n\t\tsetHashs(hashData, false);\n\t}\n\n\tconst elUiWidgetOverlayVisibles = querySelectorAllArray(document, '.ui-widget-overlay').filter((el) => {\n\t\treturn isVisible(el);\n\t});\n\n\tif (!elUiWidgetOverlayVisibles.length) {\n\t\tCore.state.documentClassModificators.delete('top-dialog');\n\n\t\tdocument.querySelector('html')!.style.marginRight = '';\n\t}\n\n\t$(elDialog).trigger('viewAfterClose', [$(elDialog)]);\n\n\tconst dialog = getDialogWorker(viewName);\n\n\tif (dialog) {\n\t\tdialog.isOpened.value = false;\n\t\tdialog.emit?.('close', pageName);\n\n\t\tif (dialog.onCloseOnce) {\n\t\t\tdialog.onCloseOnce(dialog.props, pageName);\n\t\t\tdialog.onCloseOnce = undefined;\n\t\t}\n\t}\n\n\t// после закрытия диалога может потребоваться пересчет позиций элементов\n\twindow.dispatchEvent(new Event('resize'));\n};\n\n/**\n * Пересчитать положения и размеры открытых диалоговых окон\n */\nconst recalcPositions = () => {\n\tconst elDialogVisibilityes = querySelectorAllArray(document, '.ui-dialog').filter((el) => {\n\t\treturn isVisible(el) && el.querySelector<ElTopDialog>(':scope > .ui-dialog-content');\n\t}).map((el) => {\n\t\treturn el.querySelector<ElTopDialog>(':scope > .ui-dialog-content')!;\n\t});\n\n\telDialogVisibilityes.forEach((elDialog) => {\n\t\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\t\tif (!elDialogBody) return;\n\n\t\tconst elDialogWrapper = elDialog.closest('.ui-dialog');\n\n\t\tconst options = genVueOptions(elDialog);\n\n\t\toptions.position ??= { of: window };\n\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('option', options);\n\n\t\telDialogWrapper.classList.remove('me-tightly');\n\t\tif ((elDialogWrapper.clientHeight ?? 0) > window.innerHeight) elDialogWrapper.classList.add('me-tightly');\n\t});\n};\n\n/**\n * Переход к view page по неразобранной ссылке в формате: {viewName}-{pageName}[:args]\n */\nconst toViewDirty = async (toViewPageName: string, moveDirection?: MoveDirection) => {\n\tconst regexp = /(\\w+)[=-]([\\w-]+)(?::([\\w.:-]+))?/g;\n\tconst toViewParts = regexp.exec(toViewPageName);\n\tif (toViewParts) {\n\t\tconst viewName = toViewParts[1];\n\t\tconst pageName = toViewParts[2];\n\t\tconst argsString = toViewParts[3];\n\n\t\tlet args: string[] = [];\n\t\tif (argsString) args = argsString.split(':');\n\n\t\tawait toView(viewName, pageName, args, moveDirection);\n\t}\n};\n\n/**\n * Открыть диалоговое окно, возможно указать нужную страницу\n * @param viewNameOrElDialog - id страницы окна или элемент окна\n * @param pageName - имя страницы\n * @param args - аргументы, набор проивзольных параметров, которые могут обрабатываться каждым окном по своему\n * @param moveDirection\n * @param callback - функция, которая будет запущена после октытия страницы\n */\nconst toView = async (\n\tviewNameOrElDialog: ElTopDialog | JQuery<ElTopDialog> | string,\n\tpageName?: string,\n\targs?: string[],\n\tmoveDirection?: MoveDirection,\n\tcallback?: Function,\n) => {\n\tif (!isInited) {\n\t\tawait new Promise<void>((resolve, _reject) => {\n\t\t\tconst timer = setInterval(() => {\n\t\t\t\tif (!isInited) return;\n\n\t\t\t\tclearInterval(timer);\n\n\t\t\t\tresolve();\n\t\t\t}, 10000);\n\t\t});\n\t}\n\n\tawait nextTick();\n\n\tlet elDialog: ElTopDialog | null;\n\tif (typeof (viewNameOrElDialog) === 'object') {\n\t\tif (isElJQuery(viewNameOrElDialog)) viewNameOrElDialog = viewNameOrElDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\t\telDialog = viewNameOrElDialog;\n\t} else {\n\t\telDialog = getElDialogById(viewNameOrElDialog);\n\t}\n\n\t// Диалоговое окно еще не загружено\n\tif (!elDialog && typeof (viewNameOrElDialog) == 'string' && TopDialogWorker.state.load) {\n\t\tawait TopDialogWorker.state.load(viewNameOrElDialog);\n\n\t\tawait toView(viewNameOrElDialog, pageName, args, moveDirection, callback);\n\n\t\treturn;\n\t}\n\n\tif (!elDialog) return;\n\n\tawait toViewPage(elDialog, pageName, args, moveDirection);\n\n\tconst $dialog = $(elDialog);\n\n\tif (elDialog?.classList.contains('ui-dialog-content')) {\n\t\t// var zIndexMax = 0;\n\t\t// $.map($('.ui-dialog'), function (el) {\n\t\t// \tvar zIndex = $(el).css('z-index') * 1;\n\t\t// \tif (zIndex > zIndexMax) zIndexMax = zIndex;\n\t\t// });\n\t\t//\n\t\t// if ($dialog.is(':hidden')) $dialog.dialog('open');\n\t\t//\n\t\t// var $dialogWrapper = $dialog.parent();\n\t\t// var $dialogOverlay = $dialogWrapper.next();\n\t\t//\n\t\t// if ($dialogWrapper.css('z-index') * 1 < zIndexMax) {\n\t\t// \t$dialogWrapper.css('z-index', zIndexMax + 2);\n\t\t// \t$dialogOverlay.css('z-index', zIndexMax + 1);\n\t\t// }\n\n\t\t$dialog.dialog('open');\n\t} else {\n\t\tconst options = genVueOptions(elDialog);\n\n\t\t$dialog.dialog(options);\n\t}\n\n\tif (callback) callback($dialog);\n};\n\nconst toViewPage = async (elDialog: ElTopDialog | JQuery<ElTopDialog>, pageName?: string, args?: string[], moveDirection?: MoveDirection) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\tif (pageName === undefined) pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName !== elDialog.dataset.viewPageActive) {\n\t\tconst stopped = stopAnimations(elDialog);\n\t\tif (stopped) await sleep(100);\n\t}\n\n\tif (args === undefined) args = [];\n\n\tawait updatePageVue(elDialog.getAttribute('id') as string, undefined, pageName);\n\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elNextPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elNextPage = elModalLayer.querySelector<ElTopDialogPage>(`:scope > [data-view-page=\"${pageName}\"]`);\n\t\tif (elNextPage) {\n\t\t\tacc.push(elNextPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst argsString = args.join(':');\n\n\tif (moveDirection === undefined) {\n\t\tmoveDirection = 'next';\n\t\tif ((elNextPages[0]?.dataset.order ?? 0) < (elCurrentPages[0]?.dataset.order ?? 0)) moveDirection = 'prev';\n\t}\n\n\tif (!elNextPages.length) return;\n\n\telDialog.dataset.viewPageActive = pageName;\n\n\t// запрашиваемая страница уже открыта\n\tif (elNextPages[0].classList.contains('active')) {\n\t\tif (elNextPages[0].dataset.viewPageArgs !== argsString) {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.dataset.viewPageArgs = argsString;\n\t\t\t});\n\n\t\t\t// dialogs.beforeOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t\t// dialogs.afterOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t}\n\n\t\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\t\treturn;\n\t}\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.dataset.viewPageArgs = argsString;\n\t});\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\tif (elCurrentPage.querySelector('.top-popup-wrapper')) {\n\t\t\tTopPopupWorker.close(elCurrentPage.querySelector('.top-popup-wrapper')!);\n\t\t}\n\t});\n\n\tconst elDialogWrapper = elNextPages[0].closest<ElTopDialogWrapper>('.ui-dialog');\n\n\tif (elDialogWrapper && !isVisible(elDialogWrapper)) moveDirection = 'none';\n\tif (!elCurrentPages.length) moveDirection = 'none';\n\tif (isVisible(elNextPages[0])) moveDirection = 'none';\n\n\tswitch (moveDirection) {\n\t\tcase 'prev': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage.classList.add('right-to-center', 'reverse');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('center-to-left', 'reverse');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive.nextSibling);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage?.classList.add('center-to-left');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('right-to-center');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\telDialog.setAttribute('view-page-active', pageName);\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\telCurrentPage.classList.remove('active');\n\t});\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.classList.add('active');\n\t});\n\n\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\tif (moveDirection) {\n\t\telDialog.classList.add('i-change-page');\n\n\t\tconst delay = Number(window.getComputedStyle(elNextPages[0]).animationDuration.replace('s', '')) * 1000;\n\n\t\ttimerClearAnimation = setTimeout(function () {\n\t\t\tupdatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\t\tstopAnimations(elDialog);\n\t\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\t}, delay);\n\t} else {\n\t\tawait updatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t}\n};\n\n/**\n * К предыдущему представлению\n */\nconst toPrevPage = (elDialog: ElTopDialog) => {\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elPrevPages = elCurrentPages.reduce<ElTopDialogPage[]>((acc, elCurrentPage) => {\n\t\tlet elPrevPage = elCurrentPage.previousElementSibling as ElTopDialogPage | null;\n\t\twhile (elPrevPage && !elPrevPage.hasAttribute('[data-view-page]')) {\n\t\t\telPrevPage = elPrevPage.previousElementSibling as ElTopDialogPage | null;\n\t\t}\n\n\t\tif (elPrevPage) acc.push(elPrevPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tconst prevPageName = (elPrevPages[0])?.dataset.viewPage;\n\n\tif (prevPageName) {\n\t\tvoid toViewPage(elDialog, prevPageName, undefined, 'prev');\n\t} else {\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('close');\n\t}\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst beforeOpenViewPageTimers = new Set();\nconst beforeOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\t// группировка цепочки событий\n\t// запрос на открытие страницы может выполняться несколько раз, чаще такое может быть при открытии, загрузке и переходе сразу к нужной странице\n\tconst eventKey = elDialog.getAttribute('id') + elPages[0].dataset.viewPage + pageName + args.join();\n\n\tif (beforeOpenViewPageTimers.has(eventKey)) return;\n\tbeforeOpenViewPageTimers.add(eventKey);\n\n\tsetTimeout(function () {\n\t\tbeforeOpenViewPageTimers.delete(eventKey);\n\n\t\t$(elDialog).trigger('viewBeforeOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst afterOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\tsetTimeout(function () {\n\t\t$(elDialog).trigger('viewAfterOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Получить состояние: Диалоговое окно находится в состоянии смены страницы\n */\nconst inAnimation = (elDialog: ElTopDialog | JQuery<ElTopDialog>) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elDialog.classList.contains('i-change-page');\n};\n\n/**\n * Остановить анимацию смены страницы\n *\n * @returns Вернет true, если анимация производилась и была остановлена\n */\nconst stopAnimations = (elDialog: ElTopDialog) => {\n\tif (!inAnimation(elDialog)) return false;\n\n\tclearTimeout(timerClearAnimation);\n\n\tconst elModalLayers = querySelectorAllArray(elDialog, '.modal-layer');\n\n\tconst pageName = elDialog.dataset.viewPageActive;\n\telDialog.classList.remove('i-change-page');\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelectorAll(':scope > [data-view-page]').forEach((el) => {\n\t\t\tel.classList.remove('center-to-left', 'right-to-center', 'reverse', 'active');\n\t\t});\n\t});\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelector(`:scope > [data-view-page=\"${pageName}\"]`)?.classList.add('active');\n\t});\n\n\treturn true;\n};\n\n/**\n * Закрыть диалоговое окно\n */\nconst close = function (dialogId: string) {\n\tconst elDialog = getElDialogById(dialogId);\n\tif (!elDialog) return;\n\n\tconst $dialog = $(elDialog);\n\n\tif (!$dialog.dialog('instance')) return;\n\n\t$dialog.dialog('close');\n};\n\n/**\n * Управление props.isLoading\n */\nconst setLoading = (elPages: ElTopDialogPage[] | JQuery<ElTopDialogPage>, isLoading: boolean, duration?: number) => {\n\tif (isElJQuery(elPages)) elPages = elPages.toArray(); // todo: убрать после переписки jquery на сайте\n\n\tconst elPagesVisibleds = elPages.reduce<ElTopDialogPage[]>((acc, elPage) => {\n\t\tif (elPage.hasAttribute('[data-view-page]') && isVisible(elPage)) acc.push(elPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tif (isLoading) {\n\t\tif (duration !== undefined) {\n\t\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', duration + 's');\n\t\t\t});\n\t\t}\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.add('i-load-data');\n\t\t});\n\t} else {\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.remove('i-load-data');\n\t\t});\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', '10s');\n\t\t});\n\t}\n};\n\nconst isLoading = (elPage: ElTopDialogPage | JQuery<ElTopDialogPage>) => {\n\tif (isElJQuery(elPage)) elPage = elPage?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elPage.classList.contains('i-load-data');\n};\n\nexport const TopDialogUtils = {\n\tgetElDialogById,\n\tupdatePageVue,\n\trecalcPositions,\n\ttoViewDirty,\n\ttoView,\n\ttoViewPage,\n\ttoPrevPage,\n\tsetLoading,\n\tisLoading,\n\tinAnimation,\n\tclose,\n};\n\ninit();\n"],"names":["el","elDialogs","utils_dom","elDialog","toView","TopDialogUtils","viewName","viewNameAndPageLink","elToPages","elDialog2","pageLink","utils_route","hash","elForm","eventTarget","elSubmitButton2","event","elDialogWrapperWithTopZIndex","elDialogWrapper","zIndex","topZIndex","Core","timerClearAnimation","isElJQuery","_a","initDialogGlobalEvents","genVueOptions","options","getElDialogById","id","dialog","dialogs_vue_vue_type_script_setup_true_lang","dialogId","pageNameNext","utils_system","onCreate","_b","initPopup","_e","$popup","elPopup","onOpen","pageName","w1","scrollBarWidth","recalcPositions","onClose","hashData","toViewDirty","toViewPageName","moveDirection","toViewParts","argsString","viewNameOrElDialog","args","callback","timer","resolve","$dialog","stopAnimations","updatePageVue","acc","elCurrentPage","elNextPage","elModalLayer","elNextPages","elCurrentPages","elActive","toPrevPage","elPrevPage","beforeOpenViewPageTimers","eventKey","inAnimation","elModalLayers","toViewPage","elPage","duration","elPagesVisibleds","elPagesVisibled","init"],"mappings":"wXAwBE,GADA,EAAA,MAAA,UACA,CAAA,EAAA,OAAA,OAEA,MAAAA,EAAA,EAAA,oCAKAA,EAAA,kBAAA,QAAAA,EAAA,kBAAA,6MAWA,MAAAC,EAAAC,EAAA,sBAAA,SAAA,oBAAA,EAAA,OAAAC,GACCD,EAAA,UAAAC,CAAA,CAAyB,EAG1B,EAAAF,EAAAA,EAAA,OAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAiD,CAAA,0LAwCjD,MAAAG,EAAAJ,EAAA,QAAA,OAEA,GAAAI,GAAA,eAAA,CACCC,EAAA,WAAAF,CAAA,oCAOAG,EAAAC,EAAA,MAAA,uEAQA,MAAAC,EAAAN,EAAA,sBAAAO,EAAA,oBAAAC,CAAA,IAAA,0FAWCC,EAAA,gBAAA,GAAAC,CAAA,UAMF,EAAAT,CAAA,EAEA,OAAA,OAAA,CAAsB,CAAA,yCAOtB,MAAAU,EAAA,EAAA,QAEAA,EAAA,QAAA,oBAAA,GAAAA,EAAA,QAAA,0BAAA,sBAEA,CAAA,2CASA,MAAAC,EAAA,EAAA,oDAKAA,EAAA,QAAA,6FAAA,GAAAA,EAAA,aAAA,iBAAA,KAMA,EAAA,MAAA,4EASA,GAAAA,EAAA,UAAA,WAAA,+LAUIZ,EAAA,UAAAa,CAAA,CAA+B,uBAKnC,CAAA,oDAOAC,EAAA,sDAIA,IAAAC,SAGAf,EAAA,sBAAA,SAAA,YAAA,EAAA,OAAAgB,GACChB,EAAA,UAAAgB,CAAA,CAAgC,EAGjC,QAAAA,GAAA,CACC,MAAAC,EAAA,OAAA,OAAA,iBAAAD,CAAA,EAAA,MAAA,EACAC,EAAAC,YAGY,CAAA,wEAOb,CAAA,03dC3LFC,EAAAA,KAAAA,kBAAAA,CAAAA,EACAA,EAAAA,KAAAA,kBAAAA,EAAAA,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AAA,SAA6F,CAAA,EAG9F,IAwDMnB,EAAA,CAAuB,gBAAAuB,EAC7B,cAAAgC,EACA,gBAAAf,EACA,YAAAG,EACA,OAAA5C,EACA,WAAAsE,EACA,WAAAN,EACA,oEAvCCO,EAAA,aAAA,kBAAA,GAAAzE,EAAA,UAAAyE,CAAA,GAAAd,EAAA,KAAAc,CAAA,EAEAd,UAIAe,IAAA,QACCC,EAAA,QAAAC,GAAA,uDAC8E,CAAA,EAI/ED,EAAA,QAAAC,GAAA,CACCA,EAAA,UAAA,IAAA,aAAA,CAA2C,CAAA,IAG5CD,EAAA,QAAAC,GAAA,CACCA,EAAA,UAAA,OAAA,aAAA,CAA8C,CAAA,EAG/CD,EAAA,QAAAC,GAAA,uDACqE,CAAA,IAmBtE,UAdDH,uEAeC,YAAAH,QA3DD,SAAAxC,EAAA,CACC,MAAA7B,EAAAyB,EAAAI,CAAA,eAGA,MAAA0B,EAAA,EAAAvD,CAAA,wBAIAuD,EAAA,OAAA,OAAA,EAsDD,EAEAqB,EAAA"}
|
|
1
|
+
{"version":3,"file":"utils-ankLRpHu.amd.js","sources":["../../src/components/dialog/lib/utils.globalEvents.ts","../../src/components/dialog/lib/utils.ts"],"sourcesContent":["import { TopDialogUtils } from './utils';\nimport { TopDialogWorker } from './worker';\nimport { isVisible, querySelectorAllArray, querySelectorVisible } from '@/core/utils/dom';\nimport { historySetState } from '@/core/utils/route';\nimport type { ElTopDialog, ElTopDialogWrapper } from '@/components/dialog/lib/types';\n\nlet inited = false;\n\n/**\n * Инициализация глобальных событий для диалоговых окон\n *\n * Производится один раз при подключении диалогового окна\n *\n * События не размонтируются\n */\nexport const initDialogGlobalEvents = () => {\n\tif (inited) return;\n\tinited = true;\n\n\t/**\n\t * Закрытие диалога по Esc\n\t */\n\tdocument.addEventListener('keydown', (e) => {\n\t\tif (e.key !== 'Escape') return;\n\t\tif (!e.target) return;\n\n\t\tconst el = e.target as HTMLElement;\n\n\t\t// событие произошло вне диалогового окна\n\t\tif (!el.closest('.ui-dialog')) return;\n\n\t\tif (el.contentEditable === 'true' || el.contentEditable === 'plaintext-only') return;\n\n\t\t// не закрывать окно при открытом TopPopup\n\t\tif (querySelectorVisible(document.documentElement, '.top-popup-wrapper')) return;\n\n\t\t// не закрывать окно при работе с jquery autocomplete\n\t\tif (el.classList.contains('autocomplete')) return;\n\n\t\t// не закрывать окно при открытом fancybox\n\t\tif (querySelectorVisible(document.documentElement, '.fancybox-container')) return;\n\n\t\tconst elDialogs = querySelectorAllArray<ElTopDialog>(document, '.ui-dialog-content').filter((elDialog) => {\n\t\t\treturn isVisible(elDialog);\n\t\t});\n\n\t\t$(elDialogs[elDialogs.length - 1]).dialog('close');\n\t});\n\n\t/**\n\t * Закрытие диалога по кнопке закрыть\n\t */\n\tdocument.addEventListener('click', (e) => {\n\t\t// // навигация без истории\n\t\t// var $dialog = $(this).closest('.ui-dialog-content');\n\t\t// var viewName = $dialog.attr('id');\n\t\t// var pageName = getHash('view-' + viewName);\n\t\t// if (!pageName) {\n\t\t// \ttoPrevPage($dialog);\n\t\t//\n\t\t// \treturn;\n\t\t// }\n\t\t//\n\t\t// // навигация по истории\n\t\t// if (Core.state.isMobile && history.length > 1 && $(this).closest('.modal-layer').length) {\n\t\t// \tvar href = location.href;\n\t\t//\n\t\t// \thistory.go(-1);\n\t\t//\n\t\t// \tsetTimeout(() => {\n\t\t// \t\t// это первая страница в истории вкладки браузера\n\t\t// \t\tif (href === location.href) $(e.target).closest('.ui-dialog-content').dialog('close');\n\t\t// \t});\n\t\t// } else {\n\t\t// \t$(this).closest('.ui-dialog-content').dialog('close');\n\t\t// }\n\n\t\tconst el = (e.target as HTMLElement).closest('[data-action=\"top-dialog-close\"]') as HTMLElement | null;\n\t\tif (!el) return;\n\n\t\te.preventDefault();\n\n\t\tconst elDialog = el.closest<ElTopDialog>('.ui-dialog-content');\n\t\tif (!elDialog) return;\n\n\t\t// если к кнопке привязана ссылка, диалоговое окно не нужно закрывать\n\t\tconst toView = el.dataset.toView;\n\n\t\tif (toView == 'toPrevPage()') {\n\t\t\tTopDialogUtils.toPrevPage(elDialog);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (toView) {\n\t\t\tconst viewNameAndPageLink = toView.split('-');\n\t\t\tconst viewName = viewNameAndPageLink.shift();\n\t\t\tconst pageLink = viewNameAndPageLink.join('-');\n\n\t\t\tif (!viewName) return;\n\n\t\t\tconst elDialog = TopDialogUtils.getElDialogById(viewName);\n\t\t\tif (!elDialog) return;\n\n\t\t\tconst elToPages = querySelectorAllArray(elDialog, `[data-view-page=\"${pageLink}\"]`);\n\t\t\tif (!elToPages) return;\n\n\t\t\tif (!isVisible(elToPages[0])) {\n\t\t\t\tconst hash = TopDialogWorker.genViewPageHash(toView, 'prev');\n\n\t\t\t\t// // не убирает кнопку \"Вперед\" в браузере\n\t\t\t\t// history.replaceState(null, '', hash);\n\t\t\t\t// toViewDirty(toView, 'prev');\n\n\t\t\t\t// // добавляет текущую страницу в историю браузера\n\t\t\t\thistorySetState(false, hash);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst $dialog = $(elDialog);\n\n\t\t$dialog.dialog('close');\n\t});\n\n\t/**\n\t * Все submit должны обрабатываться через js\n\t */\n\tdocument.addEventListener('submit', (e) => {\n\t\tconst elForm = e.target as HTMLElement;\n\n\t\tif (elForm.matches('.modal-body > form') || elForm.matches('.modal-layer-body > form')) {\n\t\t\te.preventDefault();\n\t\t}\n\t});\n\n\t/**\n\t * Выполнение действия по нажатию Enter\n\t *\n\t * @todo Убрать `.searcher`\n\t */\n\tdocument.addEventListener('keypress', (e) => {\n\t\tconst eventTarget = e.target as HTMLElement;\n\n\t\tconst elModalBody = eventTarget.closest('.ui-dialog .modal-body');\n\t\tif (!elModalBody) return;\n\n\t\tconst isInput =\n\t\t\teventTarget.matches('input:not(.searcher), textarea:not(.searcher), select:not(.searcher), button:not(.searcher)')\n\t\t\t|| eventTarget.hasAttribute('contenteditable');\n\t\tif (!isInput) return;\n\n\t\t// if (e.keyCode !== 10 && e.key !== 'ENTER') return;\n\t\tif (e.key !== 'Enter') return;\n\n\t\t// не выполнять submit действий при работе с jquery autocomplete\n\t\tif (eventTarget.classList.contains('autocomplete')) {\n\t\t\te.preventDefault();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventTarget.tagName === 'TEXTAREA') {\n\t\t\tif (!e.ctrlKey && !e.metaKey) return;\n\n\t\t\tconst elForm = eventTarget.closest('form');\n\n\t\t\tif (elForm) {\n\t\t\t\t// Find visible submit buttons\n\t\t\t\tconst elSubmitButton = querySelectorAllArray(elForm, 'button[type=\"submit\"]')\n\t\t\t\t\t.concat(querySelectorAllArray(elForm, 'input[type=\"submit\"]'))\n\t\t\t\t\t.find((elSubmitButton) => {\n\t\t\t\t\t\treturn isVisible(elSubmitButton);\n\t\t\t\t\t});\n\n\t\t\t\telSubmitButton?.click();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Закрытие диалога по клику вне окна\n\t */\n\tdocument.addEventListener('click', function (event) {\n\t\tconst eventTarget = event.target as HTMLElement;\n\n\t\tif (!eventTarget.classList.contains('ui-widget-overlay')) return;\n\n\t\tlet elDialogWrapperWithTopZIndex: ElTopDialogWrapper | undefined;\n\t\tlet topZIndex = 0;\n\n\t\tconst elDialogWrapperVisibles = querySelectorAllArray<ElTopDialogWrapper>(document, '.ui-dialog').filter((elDialogWrapper) => {\n\t\t\treturn isVisible(elDialogWrapper);\n\t\t});\n\n\t\telDialogWrapperVisibles.forEach((elDialogWrapper) => {\n\t\t\tconst zIndex = Number(window.getComputedStyle(elDialogWrapper).zIndex);\n\t\t\tif (zIndex < topZIndex) return;\n\n\t\t\telDialogWrapperWithTopZIndex = elDialogWrapper;\n\t\t\ttopZIndex = zIndex;\n\t\t});\n\n\t\tif (elDialogWrapperWithTopZIndex) {\n\t\t\tconst elDialog = elDialogWrapperWithTopZIndex.querySelector('.ui-dialog-content');\n\n\t\t\t$(elDialog).dialog('close');\n\t\t}\n\t});\n\n\twindow.addEventListener('resize', TopDialogUtils.recalcPositions);\n\tTopDialogUtils.recalcPositions();\n};\n","import 'jquery';\nimport { nextTick } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { TopPopupWorker } from '@/components/popup/worker';\nimport { sleep, waitWhile } from '@/core/utils/system';\nimport { setHashs } from '@/core/utils/route';\nimport { connectScrollShadow } from '@/core/utils/scroll';\n\nimport type { ElTopDialogBody, ElTopDialog, ElTopDialogModalLayer, ElTopDialogPage, MoveDirection, ElTopDialogWrapper } from './types';\nimport { TopDialogWorker } from './worker';\nimport { initDialogGlobalEvents } from './utils.globalEvents';\nimport { getDialogWorker } from '../dialog/dialogs/dialogs.vue';\n\nimport css from '../dialog/style/dialog.css?inline';\nimport cssM from '../dialog/style/dialog.m.css?inline';\nimport cssPC from '../dialog/style/dialog.pc.css?inline';\nimport cssModern from '../dialog/style/modern/dialog.css?inline';\nimport cssModernPC from '../dialog/style/modern/dialog.pc.css?inline';\nimport { isVisible, querySelectorAllArray } from '@/core/utils/dom';\n\nCore.insertStyleToPage(css);\nCore.insertStyleToPage(cssM, 'm');\nCore.insertStyleToPage(cssPC, 'pc');\nCore.insertStyleToPage(cssModern);\nCore.insertStyleToPage(cssModernPC, 'pc');\n\nlet timerClearAnimation: NodeJS.Timeout;\nlet isInited = false;\n\n/**\n * Является ли элемент JQuery<HTMLElement>\n */\nconst isElJQuery = (el: JQuery<HTMLElement> | HTMLElement | HTMLElement[]) => {\n\treturn !!el && typeof el === 'object' && 'jquery' in el;\n};\n\nconst init = () => {\n\t$.extend($.ui.dialog.prototype.options, {\n\t\tfocus: (e: any) => {\n\t\t\te.target.focus();\n\n\t\t\t$('[autofocus]', e.target)[0]?.focus();\n\n\t\t\t// setTimeout(function () {\n\t\t\t// \tif ($('[autofocus]', e.target).length) return;\n\t\t\t// \t$('.modal-footer button:first, .modal-body :input:first', e.target).eq(0).focus();\n\t\t\t//\n\t\t\t// \t// fix пропадающего autocomplete при нажатии на scroll в autocomplete\n\t\t\t// \t$(e.target).add($(e.target).closest('.ui-dialog')).removeAttr('tabindex');\n\t\t\t// });\n\t\t},\n\t\tcreate: (e: any) => onCreate(e.target),\n\t\topen: (e: any) => onOpen(e.target),\n\t\tclose: (e: any) => onClose(e.target),\n\t\tmodal: true,\n\t\tresizable: false,\n\t\tcloseOnEscape: false,\n\t\twidth: 'auto',\n\t\tminHeight: 0,\n\t});\n\n\t$.ui.dialog.prototype._focusTabbable = $.noop;\n\n\t$.ui.dialog.prototype._moveToTopOriginal = $.ui.dialog.prototype._moveToTop;\n\t$.ui.dialog.prototype._moveToTop = function () {\n\t\tthis._moveToTopOriginal();\n\n\t\tconst $dialog = $(this.element);\n\t\t$dialog.trigger('dialogsMoveToTop', [$dialog]);\n\t};\n\n\tinitDialogGlobalEvents();\n\n\tisInited = true;\n};\n\n/**\n * Получить настройки диалогового окна из Vue компонента\n */\nconst genVueOptions = (elDialog: ElTopDialog) => {\n\tconst options: {\n\t\tmodal?: boolean,\n\t\tposition?: any,\n\t} = {};\n\n\tif (elDialog.dataset?.modal === 'false') options.modal = false;\n\tif (elDialog.dataset?.position) options.position = JSON.parse(elDialog.dataset.position);\n\n\treturn options;\n};\n\nconst getElDialogById = (id: string) => {\n\treturn <ElTopDialog | null>document.getElementById(id);\n};\n\n/**\n * Сменить состояние диалогового окна Vue\n */\nconst updatePageVue = async (dialogId: string, pageName?: string, pageNameNext?: string) => {\n\tif (!dialogId.startsWith('dialog_')) return;\n\n\tconst dialog = getDialogWorker(dialogId);\n\tif (!dialog) return;\n\n\tdialog.isOpened.value = true;\n\tif (pageName !== undefined) dialog.pageActive.value = pageName;\n\tif (pageNameNext !== undefined) dialog.pageActiveNext.value = pageNameNext;\n\n\tawait nextTick();\n\n\tif (pageNameNext) {\n\t\tconst elDialog = getElDialogById(dialogId);\n\t\tif (!elDialog) return;\n\n\t\tconst elNextpages = elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`);\n\n\t\tif (!elNextpages.length) {\n\t\t\tawait waitWhile(() => !elDialog.querySelectorAll(`[data-view-page=\"${pageNameNext}\"]`).length);\n\t\t}\n\t}\n};\n\n/**\n * Callback for jQuery dialog onCreate\n */\nconst onCreate = (elDialog: ElTopDialog) => {\n\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\tif (!elDialogBody) return;\n\n\tconnectScrollShadow(elDialogBody);\n\n\tTopDialogWorker.state.decoratorOnCreate?.(elDialog);\n\n\tinitPopup(elDialog);\n};\n\n/**\n * Инициирование событий TopPopup в диалоговом окне\n */\nconst initPopup = (elDialog: HTMLElement) => {\n\t$(elDialog).on('aftershow.top-menu-popup', '[data-top-popup]', (_e, $popup) => {\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPopup = $popup[0];\n\n\t\t// перенести popup в корневой элемент страницы диалогового окна\n\t\tconst elPageContents = TopDialogWorker.getPairPage(elPopup);\n\t\telPageContents?.[1]?.prepend(elPopup);\n\t});\n};\n\n/**\n * Callback for jQuery dialog onOpen\n */\nconst onOpen = async (elDialog: ElTopDialog) => {\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tconst w1 = window.innerWidth;\n\n\tCore.state.documentClassModificators.set('top-dialog', 'with_dialog');\n\n\tconst w2 = window.innerWidth;\n\n\tconst scrollBarWidth = w2 - w1;\n\tif (document.documentElement.scrollHeight > window.innerHeight) document.querySelector('html')!.style.marginRight = scrollBarWidth + 'px';\n\n\trecalcPositions();\n\n\tconst dialog = getDialogWorker(elDialog.getAttribute('id')!);\n\tdialog?.emit?.('open', pageName);\n};\n\n/**\n * Callback for jQuery dialog onClose\n */\nconst onClose = async (elDialog: ElTopDialog) => {\n\tconst viewName = elDialog.getAttribute('id');\n\tconst pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName) {\n\t\tconst hashData = {\n\t\t\tvpn: TopDialogWorker.state.viewPageN as number | null,\n\t\t\t['view-' + viewName]: null,\n\t\t};\n\t\thashData['view-' + viewName] = null;\n\n\t\tif (TopDialogWorker.state.viewPageN === 0 || TopDialogWorker.state.viewPageN === 1) {\n\t\t\thashData.vpn = null;\n\t\t}\n\n\t\tsetHashs(hashData, false);\n\t}\n\n\tconst elUiWidgetOverlayVisibles = querySelectorAllArray(document, '.ui-widget-overlay').filter((el) => {\n\t\treturn isVisible(el);\n\t});\n\n\tif (!elUiWidgetOverlayVisibles.length) {\n\t\tCore.state.documentClassModificators.delete('top-dialog');\n\n\t\tdocument.querySelector('html')!.style.marginRight = '';\n\t}\n\n\t$(elDialog).trigger('viewAfterClose', [$(elDialog)]);\n\n\tconst dialog = getDialogWorker(viewName);\n\n\tif (dialog) {\n\t\tdialog.isOpened.value = false;\n\t\tdialog.emit?.('close', pageName);\n\n\t\tif (dialog.onCloseOnce) {\n\t\t\tdialog.onCloseOnce(dialog.props, pageName);\n\t\t\tdialog.onCloseOnce = undefined;\n\t\t}\n\t}\n\n\t// после закрытия диалога может потребоваться пересчет позиций элементов\n\twindow.dispatchEvent(new Event('resize'));\n};\n\n/**\n * Пересчитать положения и размеры открытых диалоговых окон\n */\nconst recalcPositions = () => {\n\tconst elDialogVisibilityes = querySelectorAllArray(document, '.ui-dialog').filter((el) => {\n\t\treturn isVisible(el) && el.querySelector<ElTopDialog>(':scope > .ui-dialog-content');\n\t}).map((el) => {\n\t\treturn el.querySelector<ElTopDialog>(':scope > .ui-dialog-content')!;\n\t});\n\n\telDialogVisibilityes.forEach((elDialog) => {\n\t\tconst elDialogBody = elDialog.querySelector<ElTopDialogBody>('.modal-body');\n\t\tif (!elDialogBody) return;\n\n\t\tconst elDialogWrapper = elDialog.closest('.ui-dialog');\n\n\t\tconst options = genVueOptions(elDialog);\n\n\t\toptions.position ??= { of: window };\n\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('option', options);\n\n\t\telDialogWrapper.classList.remove('me-tightly');\n\t\tif ((elDialogWrapper.clientHeight ?? 0) > window.innerHeight) elDialogWrapper.classList.add('me-tightly');\n\t});\n};\n\n/**\n * Переход к view page по неразобранной ссылке в формате: {viewName}-{pageName}[:args]\n */\nconst toViewDirty = async (toViewPageName: string, moveDirection?: MoveDirection) => {\n\tconst regexp = /(\\w+)[=-]([\\w-]+)(?::([\\w.:-]+))?/g;\n\tconst toViewParts = regexp.exec(toViewPageName);\n\tif (toViewParts) {\n\t\tconst viewName = toViewParts[1];\n\t\tconst pageName = toViewParts[2];\n\t\tconst argsString = toViewParts[3];\n\n\t\tlet args: string[] = [];\n\t\tif (argsString) args = argsString.split(':');\n\n\t\tawait toView(viewName, pageName, args, moveDirection);\n\t}\n};\n\n/**\n * Открыть диалоговое окно, возможно указать нужную страницу\n * @param viewNameOrElDialog - id страницы окна или элемент окна\n * @param pageName - имя страницы\n * @param args - аргументы, набор проивзольных параметров, которые могут обрабатываться каждым окном по своему\n * @param moveDirection\n * @param callback - функция, которая будет запущена после октытия страницы\n */\nconst toView = async (\n\tviewNameOrElDialog: ElTopDialog | JQuery<ElTopDialog> | string,\n\tpageName?: string,\n\targs?: string[],\n\tmoveDirection?: MoveDirection,\n\tcallback?: Function,\n) => {\n\tif (!isInited) {\n\t\tawait new Promise<void>((resolve, _reject) => {\n\t\t\tconst timer = setInterval(() => {\n\t\t\t\tif (!isInited) return;\n\n\t\t\t\tclearInterval(timer);\n\n\t\t\t\tresolve();\n\t\t\t}, 10000);\n\t\t});\n\t}\n\n\tawait nextTick();\n\n\tlet elDialog: ElTopDialog | null;\n\tif (typeof (viewNameOrElDialog) === 'object') {\n\t\tif (isElJQuery(viewNameOrElDialog)) viewNameOrElDialog = viewNameOrElDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\t\telDialog = viewNameOrElDialog;\n\t} else {\n\t\telDialog = getElDialogById(viewNameOrElDialog);\n\t}\n\n\t// Диалоговое окно еще не загружено\n\tif (!elDialog && typeof (viewNameOrElDialog) == 'string' && TopDialogWorker.state.load) {\n\t\tawait TopDialogWorker.state.load(viewNameOrElDialog);\n\n\t\tawait toView(viewNameOrElDialog, pageName, args, moveDirection, callback);\n\n\t\treturn;\n\t}\n\n\tif (!elDialog) return;\n\n\tawait toViewPage(elDialog, pageName, args, moveDirection);\n\n\tconst $dialog = $(elDialog);\n\n\tif (elDialog?.classList.contains('ui-dialog-content')) {\n\t\t// var zIndexMax = 0;\n\t\t// $.map($('.ui-dialog'), function (el) {\n\t\t// \tvar zIndex = $(el).css('z-index') * 1;\n\t\t// \tif (zIndex > zIndexMax) zIndexMax = zIndex;\n\t\t// });\n\t\t//\n\t\t// if ($dialog.is(':hidden')) $dialog.dialog('open');\n\t\t//\n\t\t// var $dialogWrapper = $dialog.parent();\n\t\t// var $dialogOverlay = $dialogWrapper.next();\n\t\t//\n\t\t// if ($dialogWrapper.css('z-index') * 1 < zIndexMax) {\n\t\t// \t$dialogWrapper.css('z-index', zIndexMax + 2);\n\t\t// \t$dialogOverlay.css('z-index', zIndexMax + 1);\n\t\t// }\n\n\t\t$dialog.dialog('open');\n\t} else {\n\t\tconst options = genVueOptions(elDialog);\n\n\t\t$dialog.dialog(options);\n\t}\n\n\tif (callback) callback($dialog);\n};\n\nconst toViewPage = async (elDialog: ElTopDialog | JQuery<ElTopDialog>, pageName?: string, args?: string[], moveDirection?: MoveDirection) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\tif (pageName === undefined) pageName = elDialog.dataset.viewPageActive;\n\n\tif (pageName !== elDialog.dataset.viewPageActive) {\n\t\tconst stopped = stopAnimations(elDialog);\n\t\tif (stopped) await sleep(100);\n\t}\n\n\tif (args === undefined) args = [];\n\n\tawait updatePageVue(elDialog.getAttribute('id') as string, undefined, pageName);\n\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elNextPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elNextPage = elModalLayer.querySelector<ElTopDialogPage>(`:scope > [data-view-page=\"${pageName}\"]`);\n\t\tif (elNextPage) {\n\t\t\tacc.push(elNextPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst argsString = args.join(':');\n\n\tif (moveDirection === undefined) {\n\t\tmoveDirection = 'next';\n\t\tif ((elNextPages[0]?.dataset.order ?? 0) < (elCurrentPages[0]?.dataset.order ?? 0)) moveDirection = 'prev';\n\t}\n\n\tif (!elNextPages.length) return;\n\n\telDialog.dataset.viewPageActive = pageName;\n\n\t// запрашиваемая страница уже открыта\n\tif (elNextPages[0].classList.contains('active')) {\n\t\tif (elNextPages[0].dataset.viewPageArgs !== argsString) {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.dataset.viewPageArgs = argsString;\n\t\t\t});\n\n\t\t\t// dialogs.beforeOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t\t// dialogs.afterOpenViewPage($dialog, $nextPage, pageName, args);\n\t\t}\n\n\t\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\t\treturn;\n\t}\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.dataset.viewPageArgs = argsString;\n\t});\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\tif (elCurrentPage.querySelector('.top-popup-wrapper')) {\n\t\t\tTopPopupWorker.close(elCurrentPage.querySelector('.top-popup-wrapper')!);\n\t\t}\n\t});\n\n\tconst elDialogWrapper = elNextPages[0].closest<ElTopDialogWrapper>('.ui-dialog');\n\n\tif (elDialogWrapper && !isVisible(elDialogWrapper)) moveDirection = 'none';\n\tif (!elCurrentPages.length) moveDirection = 'none';\n\tif (isVisible(elNextPages[0])) moveDirection = 'none';\n\n\tswitch (moveDirection) {\n\t\tcase 'prev': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage.classList.add('right-to-center', 'reverse');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('center-to-left', 'reverse');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\tconst elActive = elNextPage.parentNode?.querySelector(':scope > .active');\n\t\t\t\tif (elActive) elNextPage.parentNode?.insertBefore(elNextPage, elActive.nextSibling);\n\t\t\t});\n\n\t\t\telCurrentPages.forEach((elCurrentPage) => {\n\t\t\t\telCurrentPage?.classList.add('center-to-left');\n\t\t\t});\n\n\t\t\telNextPages.forEach((elNextPage) => {\n\t\t\t\telNextPage.classList.add('right-to-center');\n\t\t\t});\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\telDialog.setAttribute('view-page-active', pageName);\n\n\telCurrentPages.forEach((elCurrentPage) => {\n\t\telCurrentPage.classList.remove('active');\n\t});\n\n\telNextPages.forEach((elNextPage) => {\n\t\telNextPage.classList.add('active');\n\t});\n\n\tbeforeOpenViewPage(elDialog, elNextPages, pageName, args);\n\n\tif (moveDirection) {\n\t\telDialog.classList.add('i-change-page');\n\n\t\tconst delay = Number(window.getComputedStyle(elNextPages[0]).animationDuration.replace('s', '')) * 1000;\n\n\t\ttimerClearAnimation = setTimeout(function () {\n\t\t\tupdatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\t\tstopAnimations(elDialog);\n\t\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t\t}, delay);\n\t} else {\n\t\tawait updatePageVue(elDialog.getAttribute('id'), pageName, '');\n\t\tafterOpenViewPage(elDialog, elNextPages, pageName, args);\n\t}\n};\n\n/**\n * К предыдущему представлению\n */\nconst toPrevPage = (elDialog: ElTopDialog) => {\n\tconst elModalLayers = querySelectorAllArray<ElTopDialogModalLayer>(elDialog, '.modal-layer');\n\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, elModalLayer) => {\n\t\tconst elCurrentPage = elModalLayer.querySelector<ElTopDialogPage>(':scope > .active');\n\n\t\tif (elCurrentPage) {\n\t\t\tacc.push(elCurrentPage);\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n\n\tconst elPrevPages = elCurrentPages.reduce<ElTopDialogPage[]>((acc, elCurrentPage) => {\n\t\tlet elPrevPage = elCurrentPage.previousElementSibling as ElTopDialogPage | null;\n\t\twhile (elPrevPage && !elPrevPage.hasAttribute('[data-view-page]')) {\n\t\t\telPrevPage = elPrevPage.previousElementSibling as ElTopDialogPage | null;\n\t\t}\n\n\t\tif (elPrevPage) acc.push(elPrevPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tconst prevPageName = (elPrevPages[0])?.dataset.viewPage;\n\n\tif (prevPageName) {\n\t\tvoid toViewPage(elDialog, prevPageName, undefined, 'prev');\n\t} else {\n\t\tconst $dialog = $(elDialog);\n\t\t$dialog.dialog('close');\n\t}\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst beforeOpenViewPageTimers = new Set();\nconst beforeOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\t// группировка цепочки событий\n\t// запрос на открытие страницы может выполняться несколько раз, чаще такое может быть при открытии, загрузке и переходе сразу к нужной странице\n\tconst eventKey = elDialog.getAttribute('id') + elPages[0].dataset.viewPage + pageName + args.join();\n\n\tif (beforeOpenViewPageTimers.has(eventKey)) return;\n\tbeforeOpenViewPageTimers.add(eventKey);\n\n\tsetTimeout(function () {\n\t\tbeforeOpenViewPageTimers.delete(eventKey);\n\n\t\t$(elDialog).trigger('viewBeforeOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Для обработки событий вне vue\n */\nconst afterOpenViewPage = (elDialog: ElTopDialog, elPages: ElTopDialogPage[], pageName: string, args: string[]) => {\n\tsetTimeout(function () {\n\t\t$(elDialog).trigger('viewAfterOpen', [$(elDialog), $(elPages), pageName, args]);\n\t});\n};\n\n/**\n * Получить состояние: Диалоговое окно находится в состоянии смены страницы\n */\nconst inAnimation = (elDialog: ElTopDialog | JQuery<ElTopDialog>) => {\n\tif (isElJQuery(elDialog)) elDialog = elDialog?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elDialog.classList.contains('i-change-page');\n};\n\n/**\n * Остановить анимацию смены страницы\n *\n * @returns Вернет true, если анимация производилась и была остановлена\n */\nconst stopAnimations = (elDialog: ElTopDialog) => {\n\tif (!inAnimation(elDialog)) return false;\n\n\tclearTimeout(timerClearAnimation);\n\n\tconst elModalLayers = querySelectorAllArray(elDialog, '.modal-layer');\n\n\tconst pageName = elDialog.dataset.viewPageActive;\n\telDialog.classList.remove('i-change-page');\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelectorAll(':scope > [data-view-page]').forEach((el) => {\n\t\t\tel.classList.remove('center-to-left', 'right-to-center', 'reverse', 'active');\n\t\t});\n\t});\n\n\telModalLayers.forEach((elModalLayer) => {\n\t\telModalLayer.querySelector(`:scope > [data-view-page=\"${pageName}\"]`)?.classList.add('active');\n\t});\n\n\treturn true;\n};\n\n/**\n * Закрыть диалоговое окно\n */\nconst close = function (dialogId: string) {\n\tconst elDialog = getElDialogById(dialogId);\n\tif (!elDialog) return;\n\n\tconst $dialog = $(elDialog);\n\n\tif (!$dialog.dialog('instance')) return;\n\n\t$dialog.dialog('close');\n};\n\n/**\n * Управление props.isLoading\n */\nconst setLoading = (elPages: ElTopDialogPage[] | JQuery<ElTopDialogPage>, isLoading: boolean, duration?: number) => {\n\tif (isElJQuery(elPages)) elPages = elPages.toArray(); // todo: убрать после переписки jquery на сайте\n\n\tconst elPagesVisibleds = elPages.reduce<ElTopDialogPage[]>((acc, elPage) => {\n\t\tif (elPage.hasAttribute('[data-view-page]') && isVisible(elPage)) acc.push(elPage);\n\n\t\treturn acc;\n\t}, []);\n\n\tif (isLoading) {\n\t\tif (duration !== undefined) {\n\t\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', duration + 's');\n\t\t\t});\n\t\t}\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.add('i-load-data');\n\t\t});\n\t} else {\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.classList.remove('i-load-data');\n\t\t});\n\n\t\telPagesVisibleds.forEach((elPagesVisibled) => {\n\t\t\telPagesVisibled.style.setProperty('--dialog-loading-duration', '10s');\n\t\t});\n\t}\n};\n\nconst isLoading = (elPage: ElTopDialogPage | JQuery<ElTopDialogPage>) => {\n\tif (isElJQuery(elPage)) elPage = elPage?.[0]; // todo: убрать после переписки jquery на сайте\n\n\treturn elPage.classList.contains('i-load-data');\n};\n\nexport const TopDialogUtils = {\n\tgetElDialogById,\n\tupdatePageVue,\n\trecalcPositions,\n\ttoViewDirty,\n\ttoView,\n\ttoViewPage,\n\ttoPrevPage,\n\tsetLoading,\n\tisLoading,\n\tinAnimation,\n\tclose,\n};\n\ninit();\n"],"names":["el","elDialogs","utils_dom","elDialog","toView","TopDialogUtils","viewName","viewNameAndPageLink","elToPages","elDialog2","pageLink","utils_route","hash","elForm","eventTarget","elSubmitButton2","event","elDialogWrapperWithTopZIndex","elDialogWrapper","zIndex","topZIndex","Core","timerClearAnimation","isElJQuery","_a","initDialogGlobalEvents","genVueOptions","options","getElDialogById","id","dialog","dialogs_vue_vue_type_script_setup_true_lang","dialogId","pageNameNext","utils_system","onCreate","_b","initPopup","_e","$popup","elPopup","onOpen","pageName","w1","scrollBarWidth","recalcPositions","onClose","hashData","toViewDirty","toViewPageName","moveDirection","toViewParts","argsString","viewNameOrElDialog","args","callback","timer","resolve","$dialog","stopAnimations","updatePageVue","acc","elCurrentPage","elNextPage","elModalLayer","elNextPages","elCurrentPages","elActive","toPrevPage","elPrevPage","beforeOpenViewPageTimers","eventKey","inAnimation","elModalLayers","toViewPage","elPage","duration","elPagesVisibleds","elPagesVisibled","init"],"mappings":"wXAwBE,GADA,EAAA,MAAA,UACA,CAAA,EAAA,OAAA,OAEA,MAAAA,EAAA,EAAA,oCAKAA,EAAA,kBAAA,QAAAA,EAAA,kBAAA,6MAWA,MAAAC,EAAAC,EAAA,sBAAA,SAAA,oBAAA,EAAA,OAAAC,GACCD,EAAA,UAAAC,CAAA,CAAyB,EAG1B,EAAAF,EAAAA,EAAA,OAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAiD,CAAA,0LAwCjD,MAAAG,EAAAJ,EAAA,QAAA,OAEA,GAAAI,GAAA,eAAA,CACCC,EAAA,WAAAF,CAAA,oCAOAG,EAAAC,EAAA,MAAA,uEAQA,MAAAC,EAAAN,EAAA,sBAAAO,EAAA,oBAAAC,CAAA,IAAA,0FAWCC,EAAA,gBAAA,GAAAC,CAAA,UAMF,EAAAT,CAAA,EAEA,OAAA,OAAA,CAAsB,CAAA,yCAOtB,MAAAU,EAAA,EAAA,QAEAA,EAAA,QAAA,oBAAA,GAAAA,EAAA,QAAA,0BAAA,sBAEA,CAAA,2CASA,MAAAC,EAAA,EAAA,oDAKAA,EAAA,QAAA,6FAAA,GAAAA,EAAA,aAAA,iBAAA,KAMA,EAAA,MAAA,4EASA,GAAAA,EAAA,UAAA,WAAA,+LAUIZ,EAAA,UAAAa,CAAA,CAA+B,uBAKnC,CAAA,oDAOAC,EAAA,sDAIA,IAAAC,SAGAf,EAAA,sBAAA,SAAA,YAAA,EAAA,OAAAgB,GACChB,EAAA,UAAAgB,CAAA,CAAgC,EAGjC,QAAAA,GAAA,CACC,MAAAC,EAAA,OAAA,OAAA,iBAAAD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A,CAA4E,CAAA,CAC5E,CAAA,EAGFyE,EAAA,QAAAT,GAAA,QACCxC,EAAAwC,EAAA,cAAA,6BAAAtB,CAAA,IAAA,IAAA,MAAAlB,EAAA,UAAA,IAAA,SAA6F,CAAA,EAG9F,IAwDMnB,EAAA,CAAuB,gBAAAuB,EAC7B,cAAAgC,EACA,gBAAAf,EACA,YAAAG,EACA,OAAA5C,EACA,WAAAsE,EACA,WAAAN,EACA,oEAvCCO,EAAA,aAAA,kBAAA,GAAAzE,EAAA,UAAAyE,CAAA,GAAAd,EAAA,KAAAc,CAAA,EAEAd,UAIAe,IAAA,QACCC,EAAA,QAAAC,GAAA,uDAC8E,CAAA,EAI/ED,EAAA,QAAAC,GAAA,CACCA,EAAA,UAAA,IAAA,aAAA,CAA2C,CAAA,IAG5CD,EAAA,QAAAC,GAAA,CACCA,EAAA,UAAA,OAAA,aAAA,CAA8C,CAAA,EAG/CD,EAAA,QAAAC,GAAA,uDACqE,CAAA,IAmBtE,UAdDH,uEAeC,YAAAH,QA3DD,SAAAxC,EAAA,CACC,MAAA7B,EAAAyB,EAAAI,CAAA,eAGA,MAAA0B,EAAA,EAAAvD,CAAA,wBAIAuD,EAAA,OAAA,OAAA,EAsDD,EAEAqB,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","vue","./forms-CgtkdwgA.amd"],(function(r,n,e,a){"use strict";if(typeof e>"u")var e=window.Vue;const t=e.defineComponent({__name:"widgetInput",props:e.mergeModels({modelValue:{},name:{},disabled:{type:Boolean},readonly:{type:Boolean},modificator:{},size:{},styling:{},isError:{type:Boolean},isLoading:{type:Boolean},icon:{},icon2:{},addCleaner:{type:Boolean,default:!0},title:{},captionType:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(d){const o=e.useModel(d,"modelValue");return(i,l)=>(e.openBlock(),e.createBlock(a._sfc_main,e.mergeProps(i.$props,{modificator:"popupWidgetInput",modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)}),null,16,["modelValue"]))}});n._sfc_main=t}));
|
|
2
|
+
//# sourceMappingURL=widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js","sources":["../../src/components/popup/popup/widgetInput.vue"],"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"],"names":["model","_cache","$event"],"mappings":"woBAiBc,WAAAA,EAAA,MACH,sBAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAAF,EAAA,MAAAE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as n, mergeModels as d, useModel as p, createBlock as i, openBlock as r, mergeProps as m } from "vue";
|
|
2
|
+
import { _ as u } from "./forms-DarRVke_.es.js";
|
|
3
|
+
const f = /* @__PURE__ */ n({
|
|
4
|
+
__name: "widgetInput",
|
|
5
|
+
props: /* @__PURE__ */ d({
|
|
6
|
+
modelValue: {},
|
|
7
|
+
name: {},
|
|
8
|
+
disabled: { type: Boolean },
|
|
9
|
+
readonly: { type: Boolean },
|
|
10
|
+
modificator: {},
|
|
11
|
+
size: {},
|
|
12
|
+
styling: {},
|
|
13
|
+
isError: { type: Boolean },
|
|
14
|
+
isLoading: { type: Boolean },
|
|
15
|
+
icon: {},
|
|
16
|
+
icon2: {},
|
|
17
|
+
addCleaner: { type: Boolean, default: !0 },
|
|
18
|
+
title: {},
|
|
19
|
+
captionType: {}
|
|
20
|
+
}, {
|
|
21
|
+
modelValue: {
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(l) {
|
|
28
|
+
const e = p(l, "modelValue");
|
|
29
|
+
return (a, o) => (r(), i(u, m(a.$props, {
|
|
30
|
+
modificator: "popupWidgetInput",
|
|
31
|
+
modelValue: e.value,
|
|
32
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => e.value = t)
|
|
33
|
+
}), null, 16, ["modelValue"]));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
f as _
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=widgetInput.vue_vue_type_script_setup_true_lang-xwjgBq1L.es.js.map
|