@topvisor/ui 1.1.0-addNativeDialog.11 → 1.1.0-addNativeDialog.12
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-DyAbOlfX.es.js → core-DwmZJeKo.es.js} +45 -45
- package/.chunks/{core-DyAbOlfX.es.js.map → core-DwmZJeKo.es.js.map} +1 -1
- package/.chunks/core-uFZ53eDz.amd.js +2 -0
- package/.chunks/{core-rNR04ITp.amd.js.map → core-uFZ53eDz.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-D64IfJEs.amd.js → dialog_selectorRegions--uU_HPMU.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-D64IfJEs.amd.js.map → dialog_selectorRegions--uU_HPMU.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-BXNEJotg.es.js → dialog_selectorRegions-DKdrXyjJ.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-BXNEJotg.es.js.map → dialog_selectorRegions-DKdrXyjJ.es.js.map} +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C7vi1i47.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C7vi1i47.amd.js.map +1 -0
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js → dialogs.vue_vue_type_script_setup_true_lang-xvod3Gmp.es.js} +311 -307
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-xvod3Gmp.es.js.map +1 -0
- 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-BBcejshh.amd.js +2 -0
- package/.chunks/lazy-BBcejshh.amd.js.map +1 -0
- package/.chunks/lazy-gcvTGQlK.es.js +71 -0
- package/.chunks/lazy-gcvTGQlK.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-BVgw26Vp.es.js → page.vue_vue_type_script_setup_true_lang-DRvRAOmG.es.js} +14 -14
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js.map → page.vue_vue_type_script_setup_true_lang-DRvRAOmG.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js → page.vue_vue_type_script_setup_true_lang-jdOhWtvA.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js.map → page.vue_vue_type_script_setup_true_lang-jdOhWtvA.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-BVONc_yb.amd.js → utils-BmI_WbPx.amd.js} +2 -2
- package/.chunks/{utils-BVONc_yb.amd.js.map → utils-BmI_WbPx.amd.js.map} +1 -1
- package/.chunks/{utils-BR_kFG05.es.js → utils-CjdLXxom.es.js} +2 -2
- package/.chunks/{utils-BR_kFG05.es.js.map → utils-CjdLXxom.es.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 +117 -102
- package/api/index.js.map +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.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 +9 -9
- 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 +331 -322
- 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 +5 -10
- 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/mocker/index.d.ts +9 -0
- package/src/api/api/tests/types.test-d.d.ts +1 -0
- package/{types → src}/api/api/types/api.d.ts +11 -6
- package/{types → src}/api/api/types/client/request.d.ts +6 -0
- package/{types → src}/api/api/types/field.d.ts +1 -1
- package/{types → src}/api/api/types/index.d.ts +1 -0
- package/src/api/api/types/mocker.d.ts +106 -0
- package/{types → src}/api/api/utils/common.d.ts +1 -1
- package/{types → src}/api/api/utils/filters.d.ts +1 -1
- package/{types → src}/api/api/utils/lazy.d.ts +10 -1
- package/src/components/charts/charts.d.ts +2 -0
- package/src/components/dialog/lib/types.d.ts +77 -0
- package/{types → src}/components/dialog/lib/utils.d.ts +8 -7
- package/{types → src}/components/dialog/lib/worker.d.ts +8 -4
- 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/formsExt/selector2/composables/useAPI.d.ts +18 -0
- package/{types → src}/components/formsExt/selector2/types.d.ts +15 -19
- 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-rNR04ITp.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js.map +0 -1
- package/.chunks/forms-DRhpgERJ.amd.js.map +0 -1
- package/.chunks/forms-t2AEUjqg.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/dialog/lib/types.d.ts +0 -44
- 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/formsExt/selector2/composables/useAPI.d.ts +0 -30
- 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/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/ext.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/field.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/utils.globalEvents.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/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/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,4 +1,4 @@
|
|
|
1
|
-
define(["require","exports","vue","./forms-
|
|
1
|
+
define(["require","exports","vue","./forms-CgtkdwgA.amd","../utils/string.amd","../require/css.amd!../assets/notice.css"],(function(j,p,e,f,T){"use strict";if(typeof e>"u")var e=window.Vue;const h=300,c=e.reactive(new Map),y=(o,r,t)=>"top-notice_"+T.genIntHash(o+r+JSON.stringify(t)),M=(o,r="info",t)=>{let i="";o=String(o);const d=y(o,r,t);if(t!=null&&t.title)i=t.title;else{const u=o.split(`
|
|
2
2
|
`);u.length&&(i=String(u.shift()),o=u.join(`
|
|
3
3
|
`))}const n=c.get(d);if(n){b(n);return}const a={id:d,title:i,text:o,style:r,buttonProps:t==null?void 0:t.buttonProps,metaText:t==null?void 0:t.metaText,isSafeHTML:t==null?void 0:t.isSafeHTML,selectToClose:t==null?void 0:t.selectToClose,onClose:t==null?void 0:t.onClose};if(c.set(a.id,a),c.size>5){const[u,m]=[...c].at(0)||[];m&&C(m)}f.Core.state.isMobile&&$("input").one("click",()=>C(a))},b=o=>{o.hightlight=!0,setTimeout(()=>o.hightlight=!1,h)},C=o=>{o.forceClosed=!0,setTimeout(()=>{var r;(r=o.onClose)==null||r.call(o),c.delete(o.id)},h)},_=o=>{const r="hacking was detected";return o=o.replace(/<script/g,r),o=o.replace(/<img/g,r),o=o.replace(/<iframe/g,r),o=o.replace(/javascript:/g,r),o=o.replace(/<[^>]+ (@|on)\w+=[^>]+>?/g,r),o},H={class:"top-notice_itemTextWrapper"},L=["innerHTML"],S=["innerHTML"],P=["innerHTML"],w=["title"],N=e.defineComponent({__name:"item",props:{id:{},title:{},text:{},style:{},metaText:{},buttonProps:{},isSafeHTML:{type:Boolean},hightlight:{type:Boolean},selectToClose:{type:Boolean,default:!0},forceClosed:{type:Boolean}},emits:["close"],setup(o,{emit:r}){const t=o,i=r,d=e.ref(!1);setTimeout(()=>d.value=!0,10);const n=e.ref(!1),a=e.ref("right"),u=e.computed(()=>{let l=t.title.replace(/ {2}/g," ");return t.isSafeHTML||(l=_(l)),l}),m=e.computed(()=>{let l=T.nl2br(t.text);return l=l.replace(/ {2}/g," "),t.isSafeHTML||(l=_(l)),l}),g=l=>{n.value=!0,l&&(a.value=l),setTimeout(()=>i("close"),h)},I=l=>{if(!t.selectToClose)return;const{tagName:s}=l.target;s==="A"&&g(),s==="BUTTON"&&g()},z={mounted:l=>{if(!f.Core.state.isMobile||!f.Core.$||!f.Core.$.ui.draggable)return;let s="right";f.Core.$(l).draggable({revert:!1,axis:"x",drag:(k,B)=>{s=B.position.left>0?"right":"left"},stop:(k,B)=>{g(s)}})}};return(l,s)=>{const v=e.resolveComponent("TopButton");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["top-notice_item",{["top-notice_item-"+l.style]:!0,"top-notice_item-hightlight":l.hightlight,"top-notice_item-showed":d.value,"top-notice_item-closed":n.value||l.forceClosed,["top-notice_item-closed_"+a.value]:n.value}]),onClick:I},[e.createElementVNode("div",H,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-notice_itemTitle",innerHTML:u.value},null,8,L)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"top-notice_itemText",innerHTML:m.value},null,8,S)):e.createCommentVNode("",!0)]),l.buttonProps?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0,class:"top-notice_itemButton",size:"s"},l.buttonProps,{title:l.buttonProps.title,innerHTML:l.buttonProps.default,onClick:s[0]||(s[0]=k=>g())}),null,16,["title","innerHTML"])):e.createCommentVNode("",!0),l.metaText?(e.openBlock(),e.createElementBlock("div",{key:1,class:"top-notice_itemMetaText",innerHTML:l.metaText},null,8,P)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-notice_itemClose","data-top-icon":"",title:l.$i18n.Common.Close,onClick:s[1]||(s[1]=()=>g())},null,8,w)],2)),[[z]])}}}),E={class:"top-notice"},V=e.defineComponent({__name:"notice",setup(o){const r=t=>{var i;(i=t.onClose)==null||i.call(t),c.delete(t.id)};return(t,i)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),([d,n])=>(e.openBlock(),e.createBlock(N,{key:n.id,id:n.id,title:n.title,text:n.text,style:e.normalizeStyle(n.style),buttonProps:n.buttonProps,metaText:n.metaText,isSafeHTML:n.isSafeHTML,forceClosed:n.forceClosed,hightlight:n.hightlight,onClose:a=>r(n)},null,8,["id","title","text","style","buttonProps","metaText","isSafeHTML","forceClosed","hightlight","onClose"]))),128))])]))}});p.default=V,p.show=M,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
|
|
4
|
-
//# sourceMappingURL=notice-
|
|
4
|
+
//# sourceMappingURL=notice-CPtAnc7p.amd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-DQ9qFyQ2.amd.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["itemById","vue","utils_string","text","style","options","show","title","chunks","id","_firstId","firstItem","close","forms","item","hightlight","prepareText","showed","closed","closedDirection","res","props","direction","onClick","e","tagName","el","_e","ui","_ui","_ctx","_hoisted_2","_hoisted_3","_cache","$event","metaText","_hoisted_5","onCloseItem","_hoisted_1"],"mappings":"yMASOA,EAAAC,EAAA,SAAA,IAAA,GAAA,aAGN,cAAAC,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,CAAA,EAmBMC,EAAA,CAAAH,EAAAC,EAAA,OAAAC,IAAA,UAGNF,EAAA,OAAAA,CAAA,mBAIA,GAAAE,GAAA,MAAAA,EAAA,MACCE,EAAAF,EAAA,UAAgB;GAIhBG,EAAA,6BAECL,EAAAK,EAAA,KAAA;AAAA,CAAA,+CAWiB,GAAAC,EAClB,MAAAF,EACA,KAAAJ,EACA,MAAAC,EACA,YAAAC,GAAA,YAAAA,EAAA,YACsB,SAAAA,GAAA,YAAAA,EAAA,SACH,WAAAA,GAAA,YAAAA,EAAA,WACE,cAAAA,GAAA,YAAAA,EAAA,gDAOtB,iBAAAL,EAAA,KAAA,EAAA,CACC,KAAA,CAAAU,EAAAC,CAAA,EAAA,CAAA,GAAAX,CAAA,EAAA,GAAA,CAAA,GAAA,CAAA,EACAW,GAAAC,EAAAD,CAAA,EAQDE,EAAA,KAAA,MAAA,UACC,EAAA,OAAA,EAAA,IAAA,QAAA,IAAAD,EAAAE,CAAA,CAAA,CAEF,EAEAC,EAAAD,GAAA,CACCA,EAAA,WAAA,sCAKDF,EAAAE,GAAA,CACCA,EAAA,YAAA,wDAKCd,EAAA,OAAAc,EAAA,EAAA,OAOKE,EAAAb,GAAA,2LASNA,mXCjGDc,EAAAhB,EAAA,IAAA,EAAA,gCAIA,MAAAiB,EAAAjB,EAAA,IAAA,EAAA,EACAkB,EAAAlB,EAAA,IAAA,OAAA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A,mBAAAA,GAAAA,EAAAA,0GAKvC,QAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,IAAArB,EAAA,EACF,EAAA,KAAA,EAAAwB,CAAA,uFC3HtB,MAAAC,EAAAvB,GAAA,sCAGCd,EAAA,OAAAc,EAAA,EAAA,CAAuB,oEAKJb,EAAA,mBAAA,MAAAqC,EAAA,wHAef,IAAAxB,EAAA,GAXU,GAAAA,EAAA,GACD,MAAAA,EAAA,MACG,KAAAA,EAAA,KACD,MAAAb,EAAA,eAAAa,EAAA,KAAA,EACM,YAAAA,EAAA,YACC,SAAAA,EAAA,SACH,WAAAA,EAAA,WACE,YAAAA,EAAA,YACC,WAAAA,EAAA,WACD,QAAAoB,GAAAG,EAAAvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"notice-CPtAnc7p.amd.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["itemById","vue","utils_string","text","style","options","show","title","chunks","id","_firstId","firstItem","close","forms","item","hightlight","prepareText","showed","closed","closedDirection","res","props","direction","onClick","e","tagName","el","_e","ui","_ui","_ctx","_hoisted_2","_hoisted_3","_cache","$event","metaText","_hoisted_5","onCloseItem","_hoisted_1"],"mappings":"yMASOA,EAAAC,EAAA,SAAA,IAAA,GAAA,aAGN,cAAAC,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,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SAAAA,EAAA,SACH,WAAAA,EAAA,WACE,YAAAA,EAAA,YACC,WAAAA,EAAA,WACD,QAAAoB,GAAAG,EAAAvB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Core as w } from "../core/app.js";
|
|
2
2
|
import { reactive as N, defineComponent as k, ref as T, computed as L, resolveComponent as z, withDirectives as D, createElementBlock as m, openBlock as r, normalizeClass as E, createElementVNode as _, createBlock as C, createCommentVNode as p, mergeProps as j, Teleport as x, Fragment as O, renderList as V, unref as A, normalizeStyle as F } from "vue";
|
|
3
|
-
import { C as h } from "./forms-
|
|
3
|
+
import { C as h } from "./forms-DarRVke_.es.js";
|
|
4
4
|
import { genIntHash as J, nl2br as U } from "../utils/string.js";
|
|
5
5
|
const I = ["../assets/notice.css"].map((e) => import.meta.resolve(e));
|
|
6
6
|
w.insertCSSLinkToPage(I, !0);
|
|
@@ -172,4 +172,4 @@ export {
|
|
|
172
172
|
ne as default,
|
|
173
173
|
se as show
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=notice-
|
|
175
|
+
//# sourceMappingURL=notice-fno9saBY.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-4bdzRXtl.es.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["transitionDuration","itemById","reactive","genItemId","text","style","options","genIntHash","show","title","id","chunks","itemExists","hightlight","item","_firstId","firstItem","close","Core","_a","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","_e","ui","_ui","normalizeClass","_ctx","forceClosed","openBlock","createElementBlock","_hoisted_2","createCommentVNode","_hoisted_3","_cache","$event","metaText","_hoisted_5","onCloseItem","createElementVNode","_hoisted_1","Fragment","renderList","unref","_index","normalizeStyle"],"mappings":";;;;;;AAKO,MAAAA,IAAA,KAIAC,IAAAC,EAAA,oBAAA,IAAA,CAAA,GAEPC,IAAA,CAAAC,GAAAC,GAAAC,MACC,gBAAAC,EAAAH,IAAAC,IAAA,KAAA,UAAAC,CAAA,CAAA,GAmBME,KAAA,CAAAJ,GAAAC,IAAA,QAAAC,MAAA;AACN,MAAAG,IAAA;AAEA,EAAAL,IAAA,OAAAA,CAAA;AAEA,QAAAM,IAAAP,EAAAC,GAAAC,GAAAC,CAAA;AAEA,MAAAA,KAAA,QAAAA,EAAA;AACC,IAAAG,IAAAH,EAAA;AAAA,OAAgB;AAEhB,UAAAK,IAAAP,EAAA,MAAA;AAAA,CAAA;AAEA,IAAAO,EAAA,WACCF,IAAA,OAAAE,EAAA,MAAA,CAAA,GACAP,IAAAO,EAAA,KAAA;AAAA,CAAA;AAAA,EACD;AAGD,QAAAC,IAAAX,EAAA,IAAAS,CAAA;AACA,MAAAE,GAAA;AACC,IAAAC,EAAAD,CAAA;AAEA;AAAA,EAAA;AAGD,QAAAE,IAAA;AAAA,IAAmB,IAAAJ;AAAA,IAClB,OAAAD;AAAA,IACA,MAAAL;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC,KAAA,gBAAAA,EAAA;AAAA,IACsB,UAAAA,KAAA,gBAAAA,EAAA;AAAA,IACH,YAAAA,KAAA,gBAAAA,EAAA;AAAA,IACE,eAAAA,KAAA,gBAAAA,EAAA;AAAA,IACG,SAAAA,KAAA,gBAAAA,EAAA;AAAA,EACN;AAKn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EAAA/C,EAAA,KAAA;AAAA,UACM,aAAAA,EAAA;AAAA,UACC,UAAAA,EAAA;AAAA,UACH,YAAAA,EAAA;AAAA,UACE,aAAAA,EAAA;AAAA,UACC,YAAAA,EAAA;AAAA,UACD,SAAA,CAAAqC,MAAAG,EAAAxC,CAAA;AAAA,QACM,GAAA,MAAA,GAAA,CAAA,MAAA,SAAA,QAAA,SAAA,eAAA,YAAA,cAAA,eAAA,cAAA,SAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"notice-fno9saBY.es.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, ' ');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["transitionDuration","itemById","reactive","genItemId","text","style","options","genIntHash","show","title","id","chunks","itemExists","hightlight","item","_firstId","firstItem","close","Core","_a","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","_e","ui","_ui","normalizeClass","_ctx","forceClosed","openBlock","createElementBlock","_hoisted_2","createCommentVNode","_hoisted_3","_cache","$event","metaText","_hoisted_5","onCloseItem","createElementVNode","_hoisted_1","Fragment","renderList","unref","_index","normalizeStyle"],"mappings":";;;;;;AAKO,MAAAA,IAAA,KAIAC,IAAAC,EAAA,oBAAA,IAAA,CAAA,GAEPC,IAAA,CAAAC,GAAAC,GAAAC,MACC,gBAAAC,EAAAH,IAAAC,IAAA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MAAAlC,EAAA;AAAA,QACP,CAAA,GAAA,MAAA,IAAA,CAAA,SAAA,WAAA,CAAA,KAAA+B,EAAA,IAAA,EAAA;AAAA;UAG+D,KAAA;AAAA;UAAlD,WAAAL,EAAA;AAAA,QAAkCS,GAAAA,MAAAA,GAAAA,CAAAA,KAAAA,EAAAA,IAAAA,EAAAA;AAAAA;UAOtD,OAAA;AAAA,UAJA,iBAAA;AAAA,UACQ,OAAAT,EAAA,MAAA,OAAA;AAAA,UACO,SAAAO,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,MAAAjC,EAAA;AAAA,QACF,GAAA,MAAA,GAAAoC,CAAA;AAAA;;;;;;;;AC3HtB,UAAAC,IAAA,CAAAxC,MAAA;;AACC,OAAAK,IAAAL,EAAA,YAAA,QAAAK,EAAA,KAAAL,IAEAb,EAAA,OAAAa,EAAA,EAAA;AAAA,IAAuB;;MAKJyC,EAAA,OAAAC,GAAA;AAAA,SAgBZX,EAAA,EAAA,GAAAC,EAAAW,GAAA,MAAAC,EAAAC,EAAA1D,CAAA,GAAA,CAAA,CAAA2D,GAAA9C,CAAA;UADH,KAAAA,EAAA;AAAA,UAXU,IAAAA,EAAA;AAAA,UACD,OAAAA,EAAA;AAAA,UACG,MAAAA,EAAA;AAAA,UACD,OAAA+C,EAAA/C,EAAA,KAAA;AAAA,UACM,aAAAA,EAAA;AAAA,UACC,UAAAA,EAAA;AAAA,UACH,YAAAA,EAAA;AAAA,UACE,aAAAA,EAAA;AAAA,UACC,YAAAA,EAAA;AAAA,UACD,SAAA,CAAAqC,MAAAG,EAAAxC,CAAA;AAAA,QACM,GAAA,MAAA,GAAA,CAAA,MAAA,SAAA,QAAA,SAAA,eAAA,YAAA,cAAA,eAAA,cAAA,SAAA,CAAA;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as w, ref as $, provide as A, onMounted as D, getCurrentInstance as k, watch as T, onUnmounted as C, createBlock as d, openBlock as l, Teleport as v, createElementVNode as i, mergeProps as B, unref as s, renderSlot as n, normalizeStyle as b, computed as _, resolveDirective as W, createElementBlock as
|
|
2
|
-
import { g as M, c as N } from "./dialogs.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { C as h,
|
|
4
|
-
import { b as S } from "./utils-
|
|
1
|
+
import { defineComponent as w, ref as $, provide as A, onMounted as D, getCurrentInstance as k, watch as T, onUnmounted as C, createBlock as d, openBlock as l, Teleport as v, createElementVNode as i, mergeProps as B, unref as s, renderSlot as n, normalizeStyle as b, computed as _, resolveDirective as W, createElementBlock as u, createCommentVNode as y, normalizeClass as g, withDirectives as E } from "vue";
|
|
2
|
+
import { g as M, c as N } from "./dialogs.vue_vue_type_script_setup_true_lang-xvod3Gmp.es.js";
|
|
3
|
+
import { C as h, c as f } from "./forms-DarRVke_.es.js";
|
|
4
|
+
import { b as S } from "./utils-CjdLXxom.es.js";
|
|
5
5
|
const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /* @__PURE__ */ w({
|
|
6
6
|
__name: "dialog",
|
|
7
7
|
props: {
|
|
@@ -21,9 +21,9 @@ const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /*
|
|
|
21
21
|
throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");
|
|
22
22
|
const r = N(o.idAttr, o.pageActive.value), e = $(r);
|
|
23
23
|
return A("dialogWorker", o), D(() => {
|
|
24
|
-
var
|
|
24
|
+
var m;
|
|
25
25
|
const a = k(), t = a.parent;
|
|
26
|
-
if (((
|
|
26
|
+
if (((m = t == null ? void 0 : t.parent) == null ? void 0 : m.type.name) !== "DialogWrapper")
|
|
27
27
|
throw new Error("TopDialog cannot be used in a template, use useTopDialog()");
|
|
28
28
|
if (Array.isArray(t.subTree.children) && t.subTree.children.length !== 1)
|
|
29
29
|
throw new Error("TopDialog can has only one root element");
|
|
@@ -71,16 +71,16 @@ const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /*
|
|
|
71
71
|
footerFullWith: { type: Boolean }
|
|
72
72
|
},
|
|
73
73
|
setup(p) {
|
|
74
|
-
const
|
|
74
|
+
const c = p, o = S(), r = _(() => {
|
|
75
75
|
var e;
|
|
76
76
|
return {
|
|
77
|
-
active: ((e = o.pageActive) == null ? void 0 : e.value) ===
|
|
78
|
-
"i-load-data":
|
|
77
|
+
active: ((e = o.pageActive) == null ? void 0 : e.value) === c.name,
|
|
78
|
+
"i-load-data": c.isLoading || o.isLoadingPage.value
|
|
79
79
|
};
|
|
80
80
|
});
|
|
81
81
|
return (e, a) => {
|
|
82
82
|
const t = W("top-scroll-shadow");
|
|
83
|
-
return s(o).isReady.value ? (l(),
|
|
83
|
+
return s(o).isReady.value ? (l(), u("div", L, [
|
|
84
84
|
(l(), d(v, {
|
|
85
85
|
to: "#" + s(o).idAttr + " .modal-layer-header",
|
|
86
86
|
disabled: !s(o).needShowPage(e.name)
|
|
@@ -103,7 +103,7 @@ const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /*
|
|
|
103
103
|
title: e.$i18n.Common.Back,
|
|
104
104
|
icon: s(h).state.isMobile ? "" : "",
|
|
105
105
|
color: "theme",
|
|
106
|
-
onClick: a[0] || (a[0] = (
|
|
106
|
+
onClick: a[0] || (a[0] = (m) => s(o).open(e.prevName))
|
|
107
107
|
}, null, 8, ["title", "icon"])) : (l(), d(f, {
|
|
108
108
|
key: 1,
|
|
109
109
|
class: "close",
|
|
@@ -125,12 +125,12 @@ const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /*
|
|
|
125
125
|
class: g(["has_scroll_container", r.value]),
|
|
126
126
|
style: b({ "--top-dialog-footer-height": e.$slots.footer ? void 0 : "0px" })
|
|
127
127
|
}, [
|
|
128
|
-
E((l(),
|
|
128
|
+
E((l(), u("div", O, [
|
|
129
129
|
n(e.$slots, "body")
|
|
130
130
|
])), [
|
|
131
131
|
[t]
|
|
132
132
|
]),
|
|
133
|
-
e.$slots.footer ? (l(),
|
|
133
|
+
e.$slots.footer ? (l(), u("div", {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: g(["modal-footer", {
|
|
136
136
|
"modal-footer-fullWith": e.footerFullWith
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
H as _,
|
|
149
149
|
J as a
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-
|
|
151
|
+
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-DRvRAOmG.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-DRvRAOmG.es.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, ref, onUnmounted, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport { createAndMountElDialogWrapper } from '@/components/dialog/lib/utils';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\nconst elDialogWrapper = createAndMountElDialogWrapper(dialog.idAttr, dialog.pageActive.value);\n\nconst elDialogWrapperRef = ref(elDialogWrapper);\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n\nonUnmounted(() => {\n\telDialogWrapper?.remove();\n});\n</script>\n\n<template>\n\t<Teleport :to=\"elDialogWrapperRef\">\n\t\t<!-- Классы \"ui-<...>\" добавлены для обратной совместимости стилей диалоговых (преимущественно старых) окон -->\n\t\t<div\n\t\t\t:id=\"dialog.idAttr\"\n\t\t\tclass=\"top-dialog ui-dialog-content\"\n\t\t\t:class=\"classes\"\n\t\t\t:style=\"{\n\t\t\t\t\t'--top-dialog-width': width,\n\t\t\t\t\t'--top-dialog-height': height,\n\t\t\t\t}\"\n\t\t\ttabindex=\"-1\"\n\t\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t\t:data-modal=\"modal\"\n\t\t\t:data-position=\"position\"\n\t\t\tdata-vue-dialog=\"true\"\n\t\t\tv-bind=\"$attrs\"\n\t\t>\n\t\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t\t<slot name=\"default\"></slot>\n\t\t</div>\n\t</Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport TopButton from '@/components/forms/button/button.vue';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\t:icon=\"Core.state.isMobile ? '' : ''\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\t:icon=\"Core.state.isMobile ? '' : ''\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["dialog","getDialogWorker","__props","elDialogWrapper","createAndMountElDialogWrapper","elDialogWrapperRef","ref","provide","onMounted","topDialogBaseComponent","getCurrentInstance","topDialogComponent","_a","watch","onUnmounted","_createBlock","_Teleport","_createElementVNode","_mergeProps","_unref","classes","width","height","modal","position","$attrs","_renderSlot","_ctx","props","useTopDialogSelf","computed","_openBlock","_createElementBlock","_hoisted_1","name","order","_hoisted_3","_hoisted_4","_hoisted_5","Core","prevName","TopButton","$i18n","_cache","$event","_normalizeClass","_normalizeStyle","$slots","_withDirectives","_hoisted_7","footerFullWith"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,UAAMA,IAASC,EAXDC,EAWuB,EAAE;AACvC,QAAI,CAACF;AACJ,YAAM,IAAI,MAAM,kFAAkF;AAGnG,UAAMG,IAAkBC,EAA8BJ,EAAO,QAAQA,EAAO,WAAW,KAAK,GAEtFK,IAAqBC,EAAIH,CAAe;AAK9C,WAAAI,EAAQ,gBAAgBP,CAAM,GAK9BQ,EAAU,MAAM;;AACf,YAAMC,IAAyBC,EAAA,GACzBC,IAAqBF,EAAuB;AAElD,YAAIG,IAAAD,KAAA,gBAAAA,EAAoB,WAApB,gBAAAC,EAA4B,KAAK,UAAS;AAC7C,cAAM,IAAI,MAAM,4DAA4D;AAG7E,UAAI,MAAM,QAAQD,EAAmB,QAAQ,QAAQ,KAAKA,EAAm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AakC,EAAAA,IAAI;AAAA,QAAA;UAC9FjB,EAoBM,OAAA;AAAA,YAnBJ,cAAYkB,EAAAA;AAAAA,YACZ,kBAAgBD,EAAAA;AAAAA,YACjB,OAAKW,EAAA,CAAC,wBACEzB,EAAA,KAAO,CAAA;AAAA,YACd,OAAK0B,EAAA,EAAA,8BAAiCC,EAAAA,OAAO,SAAS,SAAS,MAAA,CAAA;AAAA,UAAA;YAEhEC,GAAAjB,EAAA,GAAAC,EAEM,OAFNiB,GAEM;AAAA,cADLvB,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;YAQnBoB,EAAAA,OAAO,eALdf,EAQM,OAAA;AAAA;cAPL,UAAM,gBAAc;AAAA,yCACqBkB,EAAAA;AAAAA,cAAAA;;cAKzCxB,EAA2BC,EAAA,QAAA,QAAA;AAAA,YAAA;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang-C7vi1i47.amd","./forms-CgtkdwgA.amd","./utils-BmI_WbPx.amd"],(function($,c,e,p,r,u){"use strict";if(typeof e>"u")var e=window.Vue;const m=["id","data-view-page-active","data-modal","data-position"],v=e.defineComponent({__name:"dialog",props:{id:{},pageActive:{},width:{default:"600px"},height:{default:"auto"},modal:{type:Boolean,default:!0},position:{},historyType:{default:"push"},classes:{}},emits:["open","close"],setup(s){const i=s,t=p.getDialogWorker(i.id);if(!t)throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");const n=p.createAndMountElDialogWrapper(t.idAttr,t.pageActive.value),o=e.ref(n);return e.provide("dialogWorker",t),e.onMounted(()=>{var d;const a=e.getCurrentInstance(),l=a.parent;if(((d=l==null?void 0:l.parent)==null?void 0:d.type.name)!=="DialogWrapper")throw new Error("TopDialog cannot be used in a template, use useTopDialog()");if(Array.isArray(l.subTree.children)&&l.subTree.children.length!==1)throw new Error("TopDialog can has only one root element");t.onMounted(l,a)}),e.watch(t.isOpened,()=>{t.isReady.value=!0},{flush:"post",once:!0}),e.onUnmounted(()=>{n==null||n.remove()}),(a,l)=>(e.openBlock(),e.createBlock(e.Teleport,{to:o.value},[e.createElementVNode("div",e.mergeProps({id:e.unref(t).idAttr,class:["top-dialog ui-dialog-content",a.classes],style:{"--top-dialog-width":a.width,"--top-dialog-height":a.height},tabindex:"-1","data-view-page-active":e.unref(t).pageActive.value,"data-modal":a.modal,"data-position":a.position,"data-vue-dialog":"true"},a.$attrs),[l[0]||(l[0]=e.createElementVNode("div",{class:"modal-layer modal-layer-header"},null,-1)),e.createElementVNode("div",{class:"modal-layer modal-layer-body",style:e.normalizeStyle({"min-height":a.height+"px"})},null,4),e.renderSlot(a.$slots,"default")],16,m)],8,["to"]))}}),g={key:0,style:{display:"none"}},h=["data-order","data-view-page"],f={class:"modal-header"},y={class:"top-title"},k={class:"buttons"},w=["data-order","data-view-page"],B={class:"modal-body"},b=e.defineComponent({__name:"page",props:{isLoading:{type:Boolean},name:{},order:{default:0},prevName:{},footerFullWith:{type:Boolean}},setup(s){const i=s,t=u.useTopDialogSelf(),n=e.computed(()=>{var o;return{active:((o=t.pageActive)==null?void 0:o.value)===i.name,"i-load-data":i.isLoading||t.isLoadingPage.value}});return(o,a)=>{const l=e.resolveDirective("top-scroll-shadow");return e.unref(t).isReady.value?(e.openBlock(),e.createElementBlock("div",g,[(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-header",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(n.value)},[e.createElementVNode("div",f,[e.createElementVNode("div",y,[e.renderSlot(o.$slots,"header")]),e.createElementVNode("div",k,[e.renderSlot(o.$slots,"headerButtons")]),e.unref(r.Core).state.isMobile&&o.prevName?(e.openBlock(),e.createBlock(r._sfc_main$1,{key:0,class:"close",title:o.$i18n.Common.Back,icon:e.unref(r.Core).state.isMobile?"":"",color:"theme",onClick:a[0]||(a[0]=d=>e.unref(t).open(o.prevName))},null,8,["title","icon"])):(e.openBlock(),e.createBlock(r._sfc_main$1,{key:1,class:"close",title:o.$i18n.Common.Close,icon:e.unref(r.Core).state.isMobile?"":"",color:"theme","data-action":"top-dialog-close"},null,8,["title","icon"]))])],10,h)],8,["to","disabled"])),(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-body",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(["has_scroll_container",n.value]),style:e.normalizeStyle({"--top-dialog-footer-height":o.$slots.footer?void 0:"0px"})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(o.$slots,"body")])),[[l]]),o.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal-footer",{"modal-footer-fullWith":o.footerFullWith}])},[e.renderSlot(o.$slots,"footer")],2)):e.createCommentVNode("",!0)],14,w)],8,["to","disabled"]))])):e.createCommentVNode("",!0)}}});c._sfc_main=v,c._sfc_main$1=b}));
|
|
2
|
+
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-jdOhWtvA.amd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-jdOhWtvA.amd.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, ref, onUnmounted, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport { createAndMountElDialogWrapper } from '@/components/dialog/lib/utils';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\nconst elDialogWrapper = createAndMountElDialogWrapper(dialog.idAttr, dialog.pageActive.value);\n\nconst elDialogWrapperRef = ref(elDialogWrapper);\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n\nonUnmounted(() => {\n\telDialogWrapper?.remove();\n});\n</script>\n\n<template>\n\t<Teleport :to=\"elDialogWrapperRef\">\n\t\t<!-- Классы \"ui-<...>\" добавлены для обратной совместимости стилей диалоговых (преимущественно старых) окон -->\n\t\t<div\n\t\t\t:id=\"dialog.idAttr\"\n\t\t\tclass=\"top-dialog ui-dialog-content\"\n\t\t\t:class=\"classes\"\n\t\t\t:style=\"{\n\t\t\t\t\t'--top-dialog-width': width,\n\t\t\t\t\t'--top-dialog-height': height,\n\t\t\t\t}\"\n\t\t\ttabindex=\"-1\"\n\t\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t\t:data-modal=\"modal\"\n\t\t\t:data-position=\"position\"\n\t\t\tdata-vue-dialog=\"true\"\n\t\t\tv-bind=\"$attrs\"\n\t\t>\n\t\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t\t<slot name=\"default\"></slot>\n\t\t</div>\n\t</Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport TopButton from '@/components/forms/button/button.vue';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\t:icon=\"Core.state.isMobile ? '' : ''\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\t:icon=\"Core.state.isMobile ? '' : ''\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["elDialogWrapper","dialogs_vue_vue_type_script_setup_true_lang","dialog","elDialogWrapperRef","vue","topDialogBaseComponent","topDialogComponent","_ctx","modal","position","utils","classes","order","name","_hoisted_4","forms","footerFullWith"],"mappings":"siBAoBC,MAAA,IAAA,MAAA,kFAAA,EAGD,MAAAA,EAAAC,EAAA,8BAAAC,EAAA,OAAAA,EAAA,WAAA,KAAA,EAEAC,EAAAC,EAAA,IAAAJ,C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AAAW,EAAA,YAAA,gDAMP,KAAAX,EAAA,MAAAW,EAAA,IAAA,EAAA,MAAA,SAAA,IAAA,kBAEf,cAAA,qKAOwB,SAAA,CAAAX,EAAA,MAAAF,CAAA,EAAA,aAAAK,EAAA,IAAA,CAA6D,EAAA,6BAqBxF,aAAAA,EAAA,MAnBQK,iBAAAA,EAAAA,8DAGE,MAAAR,EAAA,eAAA,CAAA,6BAAAG,EAAA,OAAA,OAAA,OAAA,KAAA,CAAA,CACiD,EAAA,+DAI1DH,EAAA,WAAAG,EAAA,OAAA,MAAA,CADoB,CAAA,GAAA,wJAKgBS,CAAAA,CAAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as k, C as f } from "./forms-
|
|
1
|
+
import { u as k, C as f } from "./forms-DarRVke_.es.js";
|
|
2
2
|
import i from "../utils/dom.js";
|
|
3
3
|
import { TopPopupWorker as s } from "../popup/worker.js";
|
|
4
4
|
class w {
|
|
@@ -456,4 +456,4 @@ I.init();
|
|
|
456
456
|
export {
|
|
457
457
|
P as TopLibPopup
|
|
458
458
|
};
|
|
459
|
-
//# sourceMappingURL=popup-
|
|
459
|
+
//# sourceMappingURL=popup-AG94kehM.es.js.map
|