@topvisor/ui 1.0.42-popupPosition.0 → 1.1.0-addNativeDialog.11
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-BGKb9a73.es.js → core-DyAbOlfX.es.js} +4 -4
- package/.chunks/{core-BGKb9a73.es.js.map → core-DyAbOlfX.es.js.map} +1 -1
- package/.chunks/core-rNR04ITp.amd.js +2 -0
- package/.chunks/{core-D-etXW3Y.amd.js.map → core-rNR04ITp.amd.js.map} +1 -1
- package/.chunks/datepicker-DsKl-YZR.amd.js +2 -0
- package/.chunks/{datepicker-BWaVsTd0.amd.js.map → datepicker-DsKl-YZR.amd.js.map} +1 -1
- package/.chunks/{datepicker-DCDYQmsc.es.js → datepicker-U31BrqE_.es.js} +2 -2
- package/.chunks/{datepicker-DCDYQmsc.es.js.map → datepicker-U31BrqE_.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-BAK6xG6N.es.js → dialog_selectorRegions-BXNEJotg.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-BAK6xG6N.es.js.map → dialog_selectorRegions-BXNEJotg.es.js.map} +1 -1
- package/.chunks/dialog_selectorRegions-D64IfJEs.amd.js +2 -0
- package/.chunks/{dialog_selectorRegions-CMI1gx5d.amd.js.map → dialog_selectorRegions-D64IfJEs.amd.js.map} +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js +622 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js.map +1 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js.map +1 -0
- package/.chunks/field-Cvv0SRcJ.amd.js +2 -0
- package/.chunks/field-Cvv0SRcJ.amd.js.map +1 -0
- package/.chunks/field-CyyFzM-Y.es.js +16 -0
- package/.chunks/field-CyyFzM-Y.es.js.map +1 -0
- package/.chunks/forms-DRhpgERJ.amd.js +3 -0
- package/.chunks/forms-DRhpgERJ.amd.js.map +1 -0
- package/.chunks/{forms-DOGPN_TR.es.js → forms-t2AEUjqg.es.js} +20 -20
- package/.chunks/forms-t2AEUjqg.es.js.map +1 -0
- package/.chunks/lazy-CiM2Ny-s.amd.js +2 -0
- package/.chunks/lazy-CiM2Ny-s.amd.js.map +1 -0
- package/.chunks/lazy-Crun7esL.es.js +39 -0
- package/.chunks/lazy-Crun7esL.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js +184 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js +110 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js +2 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js.map +1 -0
- package/.chunks/{notice-DE88Oe-t.es.js → notice-4bdzRXtl.es.js} +2 -2
- package/.chunks/{notice-DE88Oe-t.es.js.map → notice-4bdzRXtl.es.js.map} +1 -1
- package/.chunks/{notice-C5sXcBql.amd.js → notice-DQ9qFyQ2.amd.js} +3 -3
- package/.chunks/{notice-C5sXcBql.amd.js.map → notice-DQ9qFyQ2.amd.js.map} +1 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js +151 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js +2 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js.map +1 -0
- package/.chunks/{popup-BjsK_pMZ.es.js → popup-DuraSW2f.es.js} +84 -77
- package/.chunks/popup-DuraSW2f.es.js.map +1 -0
- package/.chunks/popup-IcMnYYXr.amd.js +2 -0
- package/.chunks/popup-IcMnYYXr.amd.js.map +1 -0
- package/.chunks/punycode.es6-CNOnFR2-.amd.js +2 -0
- package/.chunks/{punycode.es6-C2yitnNb.amd.js.map → punycode.es6-CNOnFR2-.amd.js.map} +1 -1
- package/.chunks/punycode.es6-CgGegfA_.es.js +134 -0
- package/.chunks/{punycode.es6-CNI-zL6U.es.js.map → punycode.es6-CgGegfA_.es.js.map} +1 -1
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-YRW59xEF.amd.js +2 -0
- package/.chunks/{store-esTid5oI.amd.js.map → store-YRW59xEF.amd.js.map} +1 -1
- package/.chunks/{utils-CRPkMfKD.es.js → utils-BR_kFG05.es.js} +2 -2
- package/.chunks/{utils-CRPkMfKD.es.js.map → utils-BR_kFG05.es.js.map} +1 -1
- package/.chunks/utils-BVONc_yb.amd.js +2 -0
- package/.chunks/{utils-BVdq18mg.amd.js.map → utils-BVONc_yb.amd.js.map} +1 -1
- package/api/additional.amd.js +2 -0
- package/api/additional.amd.js.map +1 -0
- package/api/additional.js +66 -0
- package/api/additional.js.map +1 -0
- package/api/index.amd.js +2 -0
- package/api/index.amd.js.map +1 -0
- package/api/index.js +265 -0
- package/api/index.js.map +1 -0
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/project.css +1 -1
- package/assets/themes/dark-th.css +1 -1
- package/assets/themes/dark.css +1 -1
- package/assets/themes/light.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +3 -3
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +18 -16
- package/core/app.js.map +1 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.js.map +1 -1
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +409 -320
- 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.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +7 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +125 -109
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +30 -21
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +6 -6
- package/project/project.js.map +1 -1
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- 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.js +1 -1
- package/tabsView/tabsView.js.map +1 -1
- package/types/api/additional.d.ts +2 -0
- package/types/api/api/additional.d.ts +1 -0
- package/types/api/api/client/client.d.ts +55 -0
- package/types/api/api/client/request-options.d.ts +1 -0
- package/types/api/api/client/request.d.ts +2 -0
- package/types/api/api/index.d.ts +12 -0
- package/types/api/api/tests/model.d.ts +0 -0
- package/types/api/api/tests/test.d.ts +16 -0
- package/types/api/api/types/api.d.ts +139 -0
- package/types/api/api/types/client/client.d.ts +8 -0
- package/types/api/api/types/client/middleware.d.ts +65 -0
- package/types/api/api/types/client/options.d.ts +60 -0
- package/types/api/api/types/client/request-context.d.ts +35 -0
- package/types/api/api/types/client/request-options.d.ts +73 -0
- package/types/api/api/types/client/request.d.ts +85 -0
- package/types/api/api/types/ext.d.ts +51 -0
- package/types/api/api/types/field.d.ts +33 -0
- package/types/api/api/types/index.d.ts +12 -0
- package/types/api/api/types/schema.d.ts +50 -0
- package/types/api/api/types/tv.d.ts +59 -0
- package/types/api/api/types/utils.d.ts +51 -0
- package/types/api/api/utils/common.d.ts +16 -0
- package/types/api/api/utils/field.d.ts +8 -0
- package/types/api/api/utils/filters.d.ts +48 -0
- package/types/api/api/utils/lazy.d.ts +17 -0
- package/types/api/index.d.ts +2 -0
- package/{components → types/components}/dialog/dialog/dialog.vue.d.ts +2 -2
- package/{components → types/components}/dialog/lib/types.d.ts +2 -2
- package/types/components/dialog/lib/utils.d.ts +45 -0
- package/{components → types/components}/dialog/lib/worker.d.ts +2 -2
- package/{components → types/components}/forms/button/button.vue.d.ts +2 -5
- package/{components → types/components}/forms/button/types.d.ts +10 -0
- package/{components → types/components}/forms/checkbox/checkbox.vue.d.ts +2 -2
- package/types/components/formsExt/policy/policy.vue.d.ts +8 -0
- package/types/components/formsExt/policy/types.d.ts +20 -0
- package/{components → types/components}/formsExt/selector2/composables/useAPI.d.ts +1 -1
- package/{components → types/components}/formsExt/selector2/composables/useMenu.d.ts +3 -1
- package/{components → types/components}/formsExt/selector2/selector2.vue.d.ts +11 -3
- package/{components → types/components}/formsExt/selector2/types.d.ts +50 -27
- package/types/components/popup/alert/alert.vue.d.ts +25 -0
- package/types/components/popup/alert/types.d.ts +8 -0
- package/types/components/popup/confirm/confirm.vue.d.ts +26 -0
- package/{components → types/components}/popup/confirm/types.d.ts +2 -2
- package/{components → types/components}/popup/lib/popup.d.ts +6 -2
- package/{components → types/components}/popup/lib/worker.d.ts +6 -4
- package/types/components/popup/popup/opener.vue.d.ts +17 -0
- package/types/components/popup/popup/popup.vue.d.ts +38 -0
- package/{components → types/components}/popup/popup/types.d.ts +20 -11
- package/types/components/popup/prompt/prompt.vue.d.ts +26 -0
- package/{components → types/components}/popup/prompt/types.d.ts +2 -2
- package/{components → types/components}/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +1 -1
- package/{components → types/components}/project/selectorRegion/utils/utils.d.ts +1 -1
- package/{core → types/core}/utils/string.d.ts +1 -1
- package/types/for-delete/dark-positions.d.ts +1 -0
- package/types/for-delete/dark-th-positions.d.ts +1 -0
- package/types/for-delete/dark-th.d.ts +1 -0
- package/types/for-delete/dark.d.ts +1 -0
- package/types/for-delete/light-positions.d.ts +1 -0
- package/types/for-delete/light.d.ts +1 -0
- package/types/forms/helpers.d.ts +1 -0
- package/utils/check.amd.js +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +2 -2
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/dom.amd.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +2 -2
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/number.amd.js +1 -1
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +3 -3
- package/utils/searchers.js.map +1 -1
- package/utils/store.amd.js +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +34 -30
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +2 -2
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js +1 -1
- package/utils/url.js.map +1 -1
- package/.chunks/core-D-etXW3Y.amd.js +0 -2
- package/.chunks/datepicker-BWaVsTd0.amd.js +0 -2
- package/.chunks/dialog_selectorRegions-CMI1gx5d.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js +0 -322
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js.map +0 -1
- package/.chunks/forms-DOGPN_TR.es.js.map +0 -1
- package/.chunks/forms-Gb7ujpmz.amd.js +0 -3
- package/.chunks/forms-Gb7ujpmz.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js +0 -181
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js +0 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js +0 -109
- package/.chunks/menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js +0 -143
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js +0 -2
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js.map +0 -1
- package/.chunks/popup-B_8bvIsF.amd.js +0 -2
- package/.chunks/popup-B_8bvIsF.amd.js.map +0 -1
- package/.chunks/popup-BjsK_pMZ.es.js.map +0 -1
- package/.chunks/punycode.es6-C2yitnNb.amd.js +0 -2
- package/.chunks/punycode.es6-CNI-zL6U.es.js +0 -134
- package/.chunks/store-esTid5oI.amd.js +0 -2
- package/.chunks/utils-BVdq18mg.amd.js +0 -2
- package/.chunks/utils-CacKxWvO.es.js +0 -303
- package/.chunks/utils-CacKxWvO.es.js.map +0 -1
- package/.chunks/utils-DiQZv1Ae.amd.js +0 -2
- package/.chunks/utils-DiQZv1Ae.amd.js.map +0 -1
- package/components/charts/miniChart/stories/dummy.d.ts +0 -13
- package/components/charts/miniCharts/stories/dummy.d.ts +0 -6
- package/components/dialog/dialog/stories/autoload.d.ts +0 -2
- package/components/dialog/lib/utils.d.ts +0 -14
- package/components/forms/select/stories/exampleOptions.d.ts +0 -5
- package/components/formsExt/checkboxGroup/stories/example.d.ts +0 -15
- package/components/formsExt/menu/stories/items.d.ts +0 -3
- package/components/formsExt/policy/policy.vue.d.ts +0 -4
- package/components/formsExt/policy/types.d.ts +0 -10
- package/components/formsExt/radioGroup/stories/example.d.ts +0 -20
- package/components/formsExt/selector2/stories/dummyAPIRequest.d.ts +0 -10
- package/components/popup/alert/alert.vue.d.ts +0 -31
- package/components/popup/alert/types.d.ts +0 -8
- package/components/popup/confirm/confirm.vue.d.ts +0 -33
- package/components/popup/popup/opener.vue.d.ts +0 -23
- package/components/popup/popup/popup.vue.d.ts +0 -40
- package/components/popup/prompt/prompt.vue.d.ts +0 -33
- package/components/project/selectorCompetitors/stories/items.d.ts +0 -3
- package/components/project/selectorRegion/stories/searchers.d.ts +0 -3
- package/icomoon/Topvisor icons.json +0 -6635
- package/{charts → types/charts}/charts.d.ts +0 -0
- package/{components → types/components}/charts/charts.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/miniChart.vue.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/types.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/utils/consts.d.ts +0 -0
- package/{components → types/components}/charts/miniCharts/miniCharts.d.ts +0 -0
- package/{components → types/components}/charts/miniCharts/miniCharts.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/item/item.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/item/types.d.ts +0 -0
- package/{components → types/components}/core/notice/notice.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/types.d.ts +0 -0
- package/{components → types/components}/core/notice/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/asyncDialogHandle.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/dialogHandle.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/dialogs/dialogs.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/page/page.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/page/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/pageComponent/pageComponent.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/pageComponent/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog.d.ts +0 -0
- package/{components → types/components}/dialog/lib/utils.globalEvents.d.ts +0 -0
- package/{components → types/components}/extra/extra.d.ts +0 -0
- package/{components → types/components}/extra/rive/rive.vue.d.ts +0 -0
- package/{components → types/components}/extra/rive/types.d.ts +0 -0
- package/{components → types/components}/forms/avatar/avatar.vue.d.ts +1 -1
- /package/{components → types/components}/forms/avatar/types.d.ts +0 -0
- /package/{components → types/components}/forms/caption/caption.vue.d.ts +0 -0
- /package/{components → types/components}/forms/caption/types.d.ts +0 -0
- /package/{components → types/components}/forms/checkbox/types.d.ts +0 -0
- /package/{components → types/components}/forms/controlLabel/controlLabel.vue.d.ts +0 -0
- /package/{components → types/components}/forms/controlLabel/types.d.ts +0 -0
- /package/{components → types/components}/forms/forms.d.ts +0 -0
- /package/{components → types/components}/forms/helpers.d.ts +0 -0
- /package/{components → types/components}/forms/hint/hint.vue.d.ts +0 -0
- /package/{components → types/components}/forms/hint/types.d.ts +0 -0
- /package/{components → types/components}/forms/input/input.vue.d.ts +0 -0
- /package/{components → types/components}/forms/input/types.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/datepicker.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/inputDate.vue.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/types.d.ts +0 -0
- /package/{components → types/components}/forms/inputRange/inputRange.vue.d.ts +0 -0
- /package/{components → types/components}/forms/inputRange/types.d.ts +0 -0
- /package/{components → types/components}/forms/loadbar/loadbar.vue.d.ts +0 -0
- /package/{components → types/components}/forms/preloader/preloader.vue.d.ts +0 -0
- /package/{components → types/components}/forms/preloader/types.d.ts +0 -0
- /package/{components → types/components}/forms/radio/radio.vue.d.ts +0 -0
- /package/{components → types/components}/forms/radio/types.d.ts +0 -0
- /package/{components → types/components}/forms/select/select.vue.d.ts +0 -0
- /package/{components → types/components}/forms/select/types.d.ts +0 -0
- /package/{components → types/components}/forms/switcher/switcher.vue.d.ts +0 -0
- /package/{components → types/components}/forms/switcher/types.d.ts +0 -0
- /package/{components → types/components}/forms/textarea/textarea.vue.d.ts +0 -0
- /package/{components → types/components}/forms/textarea/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/checkboxGroup/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/editArea/editArea.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/editArea/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/editInput/editInput.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/editInput/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/formsExt.d.ts +0 -0
- /package/{components → types/components}/formsExt/info/info.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/info/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/menu/menu.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/menu/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/radioGroup/radioGroup.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/radioGroup/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/selector2/itemMulti.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/selector2/utils.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRows.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsRow/types.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/types.d.ts +0 -0
- /package/{components → types/components}/layout/layout.d.ts +0 -0
- /package/{components → types/components}/layout/rows/rows.vue.d.ts +0 -0
- /package/{components → types/components}/layout/rows/types.d.ts +0 -0
- /package/{components → types/components}/popup/lib/popup.globalEvents.d.ts +0 -0
- /package/{components → types/components}/popup/lib/worker.globalEvents.d.ts +0 -0
- /package/{components → types/components}/popup/popup/listItem.vue.d.ts +0 -0
- /package/{components → types/components}/popup/popup/widgetInput.vue.d.ts +0 -0
- /package/{components → types/components}/popup/popup.d.ts +0 -0
- /package/{components → types/components}/popup/worker.d.ts +0 -0
- /package/{components → types/components}/project/project.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/composables.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/selectorCompetitors.vue.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/compare.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectRegion.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectSearcher.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectorRegion.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/dialog_selectorRegions/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/selectorRegion.vue.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/utils/consts.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupListItem/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupOpener/popupOpener.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupOpener/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagIcon/tagIcon.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagIcon/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagSelector.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagsDefaults.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/utils/el.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/utils/utils.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/content.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/tab.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/tabs.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/types.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menu.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuDelimeter.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuItem.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuTitle.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/store.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/tabsView.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/types.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/utils.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView.d.ts +0 -0
- /package/{core → types/core}/app.d.ts +0 -0
- /package/{core → types/core}/core/core.d.ts +0 -0
- /package/{core → types/core}/core/events/resize.d.ts +0 -0
- /package/{core → types/core}/core/events.d.ts +0 -0
- /package/{core → types/core}/core/options.d.ts +0 -0
- /package/{core → types/core}/core/preloaders.d.ts +0 -0
- /package/{core → types/core}/core/state.d.ts +0 -0
- /package/{core → types/core}/directives/data.d.ts +0 -0
- /package/{core → types/core}/directives/focus.d.ts +0 -0
- /package/{core → types/core}/directives/preloader.d.ts +0 -0
- /package/{core → types/core}/directives/scrollIntoView.d.ts +0 -0
- /package/{core → types/core}/directives/scrollShadow.d.ts +0 -0
- /package/{core → types/core}/directives/sticky.d.ts +0 -0
- /package/{core → types/core}/directives/swimUp.d.ts +0 -0
- /package/{core → types/core}/directives/tooltip.d.ts +0 -0
- /package/{core → types/core}/plugins/core.d.ts +0 -0
- /package/{core → types/core}/plugins/i18n.d.ts +0 -0
- /package/{core → types/core}/plugins/piniaTPA.d.ts +0 -0
- /package/{core → types/core}/utils/check.d.ts +0 -0
- /package/{core → types/core}/utils/clipboard.d.ts +0 -0
- /package/{core → types/core}/utils/date.d.ts +0 -0
- /package/{core → types/core}/utils/device.d.ts +0 -0
- /package/{core → types/core}/utils/dom.d.ts +0 -0
- /package/{core → types/core}/utils/image.d.ts +0 -0
- /package/{core → types/core}/utils/keyboard.d.ts +0 -0
- /package/{core → types/core}/utils/lodash.d.ts +0 -0
- /package/{core → types/core}/utils/number.d.ts +0 -0
- /package/{core → types/core}/utils/price.d.ts +0 -0
- /package/{core → types/core}/utils/route.d.ts +0 -0
- /package/{core → types/core}/utils/scroll.d.ts +0 -0
- /package/{core → types/core}/utils/searchers.d.ts +0 -0
- /package/{core → types/core}/utils/store/localStorage.d.ts +0 -0
- /package/{core → types/core}/utils/store/plugin.d.ts +0 -0
- /package/{core → types/core}/utils/store/store.d.ts +0 -0
- /package/{core → types/core}/utils/store.d.ts +0 -0
- /package/{core → types/core}/utils/system.d.ts +0 -0
- /package/{core → types/core}/utils/url.d.ts +0 -0
- /package/{dialog → types/dialog}/dialog.d.ts +0 -0
- /package/{extra → types/extra}/extra.d.ts +0 -0
- /package/{forms/helpers.d.ts → types/for-delete/core.d.ts} +0 -0
- /package/{forms → types/forms}/forms.d.ts +0 -0
- /package/{formsExt → types/formsExt}/formsExt.d.ts +0 -0
- /package/{layout → types/layout}/layout.d.ts +0 -0
- /package/{popup → types/popup}/popup.d.ts +0 -0
- /package/{popup → types/popup}/worker.d.ts +0 -0
- /package/{project → types/project}/project.d.ts +0 -0
- /package/{tabs → types/tabs}/tabs.d.ts +0 -0
- /package/{tabsView → types/tabsView}/tabsView.d.ts +0 -0
- /package/{utils → types/utils}/check.d.ts +0 -0
- /package/{utils → types/utils}/clipboard.d.ts +0 -0
- /package/{utils → types/utils}/date.d.ts +0 -0
- /package/{utils → types/utils}/device.d.ts +0 -0
- /package/{utils → types/utils}/dom.d.ts +0 -0
- /package/{utils → types/utils}/image.d.ts +0 -0
- /package/{utils → types/utils}/keyboard.d.ts +0 -0
- /package/{utils → types/utils}/lodash.d.ts +0 -0
- /package/{utils → types/utils}/number.d.ts +0 -0
- /package/{utils → types/utils}/price.d.ts +0 -0
- /package/{utils → types/utils}/route.d.ts +0 -0
- /package/{utils → types/utils}/scroll.d.ts +0 -0
- /package/{utils → types/utils}/searchers.d.ts +0 -0
- /package/{utils → types/utils}/store.d.ts +0 -0
- /package/{utils → types/utils}/string.d.ts +0 -0
- /package/{utils → types/utils}/system.d.ts +0 -0
- /package/{utils → types/utils}/url.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["require","exports","vue","./forms-
|
|
1
|
+
define(["require","exports","vue","./forms-DRhpgERJ.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
|
-
`))}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-
|
|
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-DQ9qFyQ2.amd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-C5sXcBql.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","onCloseItem"],"mappings":"wMASOA,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,EACD,mCAOA,UAGkB,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,CAA8B,CAQ/BE,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,OAOWE,EAAAb,GAAA,2LASZA,mXCjGDc,EAAAhB,EAAA,IAAA,EAAA,gCAIA,MAAAiB,EAAAjB,EAAA,IAAA,EAAA,EACAkB,EAAAlB,EAAA,IAAA,OAAA,EAEAM,EAAAN,EAAA,SAAA,IAAA,CACC,IAAAmB,EAAAC,EAAA,MAAA,QAAA,QAAA,QAAA,gCAIAD,CAAO,CAAA,EAGRjB,EAAAF,EAAA,SAAA,IAAA,mFAOCmB,CAAO,CAAA,EAGRR,EAAAU,GAAA,CACCJ,EAAA,MAAA,OAGCC,EAAA,MAAAG,iCAMFC,EAAAC,GAAA,CACC,GAAA,CAAAH,EAAA,cAAA,OAEA,KAAA,CAAA,QAAAI,CAAA,EAAAD,EAAA,OAEAC,IAAA,KAAAb,EAAA,EACAa,IAAA,UAAAb,EAAA,MAGc,QAAAc,GAAA,CAIb,GAFA,CAAAb,EAAA,KAAA,MAAA,UAEA,CAAAA,EAAA,KAAA,GAAA,CAAAA,EAAA,KAAA,EAAA,GAAA,UAAA,sDAQS,SACR,KAAA,CAAAc,EAAAC,IAAA,CAGEN,EAAAM,EAAA,SAAA,KAAA,EAAA,QAAA,QAIF,KAAA,CAAAD,EAAAE,IAAA,KAEgB,CAChB,CAAA,CACA,s0CCtEH,MAAAC,EAAAhB,GAAA,sCAGCd,EAAA,OAAAc,EAAA,EAAA"}
|
|
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":"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"}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 c, 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-DIVnPVQ4.es.js";
|
|
3
|
+
import { C as h, _ as f } from "./forms-t2AEUjqg.es.js";
|
|
4
|
+
import { b as S } from "./utils-BR_kFG05.es.js";
|
|
5
|
+
const P = ["id", "data-view-page-active", "data-modal", "data-position"], H = /* @__PURE__ */ w({
|
|
6
|
+
__name: "dialog",
|
|
7
|
+
props: {
|
|
8
|
+
id: {},
|
|
9
|
+
pageActive: {},
|
|
10
|
+
width: { default: "600px" },
|
|
11
|
+
height: { default: "auto" },
|
|
12
|
+
modal: { type: Boolean, default: !0 },
|
|
13
|
+
position: {},
|
|
14
|
+
historyType: { default: "push" },
|
|
15
|
+
classes: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["open", "close"],
|
|
18
|
+
setup(p) {
|
|
19
|
+
const o = M(p.id);
|
|
20
|
+
if (!o)
|
|
21
|
+
throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");
|
|
22
|
+
const r = N(o.idAttr, o.pageActive.value), e = $(r);
|
|
23
|
+
return A("dialogWorker", o), D(() => {
|
|
24
|
+
var u;
|
|
25
|
+
const a = k(), t = a.parent;
|
|
26
|
+
if (((u = t == null ? void 0 : t.parent) == null ? void 0 : u.type.name) !== "DialogWrapper")
|
|
27
|
+
throw new Error("TopDialog cannot be used in a template, use useTopDialog()");
|
|
28
|
+
if (Array.isArray(t.subTree.children) && t.subTree.children.length !== 1)
|
|
29
|
+
throw new Error("TopDialog can has only one root element");
|
|
30
|
+
o.onMounted(t, a);
|
|
31
|
+
}), T(o.isOpened, () => {
|
|
32
|
+
o.isReady.value = !0;
|
|
33
|
+
}, {
|
|
34
|
+
flush: "post",
|
|
35
|
+
once: !0
|
|
36
|
+
}), C(() => {
|
|
37
|
+
r == null || r.remove();
|
|
38
|
+
}), (a, t) => (l(), d(v, { to: e.value }, [
|
|
39
|
+
i("div", B({
|
|
40
|
+
id: s(o).idAttr,
|
|
41
|
+
class: ["top-dialog ui-dialog-content", a.classes],
|
|
42
|
+
style: {
|
|
43
|
+
"--top-dialog-width": a.width,
|
|
44
|
+
"--top-dialog-height": a.height
|
|
45
|
+
},
|
|
46
|
+
tabindex: "-1",
|
|
47
|
+
"data-view-page-active": s(o).pageActive.value,
|
|
48
|
+
"data-modal": a.modal,
|
|
49
|
+
"data-position": a.position,
|
|
50
|
+
"data-vue-dialog": "true"
|
|
51
|
+
}, a.$attrs), [
|
|
52
|
+
t[0] || (t[0] = i("div", { class: "modal-layer modal-layer-header" }, null, -1)),
|
|
53
|
+
i("div", {
|
|
54
|
+
class: "modal-layer modal-layer-body",
|
|
55
|
+
style: b({ "min-height": a.height + "px" })
|
|
56
|
+
}, null, 4),
|
|
57
|
+
n(a.$slots, "default")
|
|
58
|
+
], 16, P)
|
|
59
|
+
], 8, ["to"]));
|
|
60
|
+
}
|
|
61
|
+
}), L = {
|
|
62
|
+
key: 0,
|
|
63
|
+
style: { display: "none" }
|
|
64
|
+
}, R = ["data-order", "data-view-page"], z = { class: "modal-header" }, F = { class: "top-title" }, V = { class: "buttons" }, I = ["data-order", "data-view-page"], O = { class: "modal-body" }, J = /* @__PURE__ */ w({
|
|
65
|
+
__name: "page",
|
|
66
|
+
props: {
|
|
67
|
+
isLoading: { type: Boolean },
|
|
68
|
+
name: {},
|
|
69
|
+
order: { default: 0 },
|
|
70
|
+
prevName: {},
|
|
71
|
+
footerFullWith: { type: Boolean }
|
|
72
|
+
},
|
|
73
|
+
setup(p) {
|
|
74
|
+
const m = p, o = S(), r = _(() => {
|
|
75
|
+
var e;
|
|
76
|
+
return {
|
|
77
|
+
active: ((e = o.pageActive) == null ? void 0 : e.value) === m.name,
|
|
78
|
+
"i-load-data": m.isLoading || o.isLoadingPage.value
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
return (e, a) => {
|
|
82
|
+
const t = W("top-scroll-shadow");
|
|
83
|
+
return s(o).isReady.value ? (l(), c("div", L, [
|
|
84
|
+
(l(), d(v, {
|
|
85
|
+
to: "#" + s(o).idAttr + " .modal-layer-header",
|
|
86
|
+
disabled: !s(o).needShowPage(e.name)
|
|
87
|
+
}, [
|
|
88
|
+
i("div", {
|
|
89
|
+
"data-order": e.order,
|
|
90
|
+
"data-view-page": e.name,
|
|
91
|
+
class: g(r.value)
|
|
92
|
+
}, [
|
|
93
|
+
i("div", z, [
|
|
94
|
+
i("div", F, [
|
|
95
|
+
n(e.$slots, "header")
|
|
96
|
+
]),
|
|
97
|
+
i("div", V, [
|
|
98
|
+
n(e.$slots, "headerButtons")
|
|
99
|
+
]),
|
|
100
|
+
s(h).state.isMobile && e.prevName ? (l(), d(f, {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: "close",
|
|
103
|
+
title: e.$i18n.Common.Back,
|
|
104
|
+
icon: s(h).state.isMobile ? "" : "",
|
|
105
|
+
color: "theme",
|
|
106
|
+
onClick: a[0] || (a[0] = (u) => s(o).open(e.prevName))
|
|
107
|
+
}, null, 8, ["title", "icon"])) : (l(), d(f, {
|
|
108
|
+
key: 1,
|
|
109
|
+
class: "close",
|
|
110
|
+
title: e.$i18n.Common.Close,
|
|
111
|
+
icon: s(h).state.isMobile ? "" : "",
|
|
112
|
+
color: "theme",
|
|
113
|
+
"data-action": "top-dialog-close"
|
|
114
|
+
}, null, 8, ["title", "icon"]))
|
|
115
|
+
])
|
|
116
|
+
], 10, R)
|
|
117
|
+
], 8, ["to", "disabled"])),
|
|
118
|
+
(l(), d(v, {
|
|
119
|
+
to: "#" + s(o).idAttr + " .modal-layer-body",
|
|
120
|
+
disabled: !s(o).needShowPage(e.name)
|
|
121
|
+
}, [
|
|
122
|
+
i("div", {
|
|
123
|
+
"data-order": e.order,
|
|
124
|
+
"data-view-page": e.name,
|
|
125
|
+
class: g(["has_scroll_container", r.value]),
|
|
126
|
+
style: b({ "--top-dialog-footer-height": e.$slots.footer ? void 0 : "0px" })
|
|
127
|
+
}, [
|
|
128
|
+
E((l(), c("div", O, [
|
|
129
|
+
n(e.$slots, "body")
|
|
130
|
+
])), [
|
|
131
|
+
[t]
|
|
132
|
+
]),
|
|
133
|
+
e.$slots.footer ? (l(), c("div", {
|
|
134
|
+
key: 0,
|
|
135
|
+
class: g(["modal-footer", {
|
|
136
|
+
"modal-footer-fullWith": e.footerFullWith
|
|
137
|
+
}])
|
|
138
|
+
}, [
|
|
139
|
+
n(e.$slots, "footer")
|
|
140
|
+
], 2)) : y("", !0)
|
|
141
|
+
], 14, I)
|
|
142
|
+
], 8, ["to", "disabled"]))
|
|
143
|
+
])) : y("", !0);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
export {
|
|
148
|
+
H as _,
|
|
149
|
+
J as a
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-BVgw26Vp.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,EAAmB,QAAQ,SAAS,WAAW;AACxG,cAAM,IAAI,MAAM,yCAAyC;AAG1D,MAAAX,EAAO,UAAUW,GAAoBF,CAAsB;AAAA,IAC5D,CAAC,GAEDI,EAAMb,EAAO,UAAU,MAAM;AAC5B,MAAAA,EAAO,QAAQ,QAAQ;AAAA,IACxB,GAAG;AAAA,MACF,OAAO;AAAA,MACP,MAAM;AAAA,IAAA,CACN,GAEDc,EAAY,MAAM;AACjB,MAAAX,KAAA,QAAAA,EAAiB;AAAA,IAClB,CAAC,mBAIAY,EAuBWC,GAAA,EAvBA,IAAIX,EAAA,SAAkB;AAAA,MAEhCY,EAoBM,OApBNC,EAoBM;AAAA,QAnBJ,IAAIC,EAAAnB,CAAA,EAAO;AAAA,QACZ,OAAK,CAAC,gCACEoB,EAAAA,OAAO;AAAA,QACd,OAAK;AAAA,gCAA+BC,EAAAA;AAAAA,iCAAmCC,EAAAA;AAAAA,QAAAA;AAAAA,QAIxE,UAAS;AAAA,QACR,yBAAuBH,EAAAnB,CAAA,EAAO,WAAW;AAAA,QACzC,cAAYuB,EAAAA;AAAAA,QACZ,iBAAeC,EAAAA;AAAAA,QAChB,mBAAgB;AAAA,MAAA,GACRC,EAAAA,MAAM,GAAA;AAAA,wBAEdR,EAAkD,OAAA,EAA7C,OAAM,iCAAA,GAAgC,MAAA,EAAA;AAAA,QAE3CA,EAAuF,OAAA;AAAA,UAAlF,OAAM;AAAA,UAAgC,yBAAsBK,EAAAA,SAAM,MAAA;AAAA,QAAA;QAEvEI,EAA4BC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;;;;;AC7E/B,UAAMC,IAAQ1B,GAMRF,IAAS6B,EAAA,GAETT,IAAUU,EAAS,MAAM;;AAC9B,aAAO;AAAA,QACN,UAAQlB,IAAAZ,EAAO,eAAP,gBAAAY,EAAmB,WAAUgB,EAAM;AAAA,QAC3C,eAAeA,EAAM,aAAa5B,EAAO,cAAc;AAAA,MAAA;AAAA,IAEzD,CAAC;;;aAMOmB,EAAAnB,CAAA,EAAO,QAAQ,SAFtB+B,KAAAC,EA+DM,OA/DNC,GA+DM;AAAA,cA3DLlB,EAkCWC,GAAA;AAAA,UAlCA,IAAE,MAAQG,EAAAnB,CAAA,EAAO,SAAM;AAAA,UAA4B,UAAQ,CAAGmB,EAAAnB,CAAA,EAAO,aAAakC,EAAAA,IAAI;AAAA,QAAA;UAChGjB,EAgCM,OAAA;AAAA,YA/BJ,cAAYkB,EAAAA;AAAAA,YACZ,kBAAgBD,EAAAA;AAAAA,YAChB,SAAOd,EAAA,KAAO;AAAA,UAAA;YAEfH,EA0BM,OA1BNmB,GA0BM;AAAA,cAzBLnB,EAEM,OAFNoB,GAEM;AAAA,gBADLX,EAA2BC,EAAA,QAAA,QAAA;AAAA,cAAA;cAG5BV,EAEM,OAFNqB,GAEM;AAAA,gBADLZ,EAAkCC,EAAA,QAAA,eAAA;AAAA,cAAA;cAI5BR,EAAAoB,CAAA,EAAK,MAAM,YAAYC,EAAAA,iBAD9BzB,EAOE0B,GAAA;AAAA;gBALD,OAAM;AAAA,gBACL,OAAOC,EAAAA,MAAM,OAAO;AAAA,gBACpB,MAAMvB,EAAAoB,CAAA,EAAK,MAAM,WAAQ,MAAA;AAAA,gBAC1B,OAAM;AAAA,gBACL,SAAKI,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEzB,EAAAnB,CAAA,EAAO,KAAKwC,EAAAA,QAAQ;AAAA,cAAA,wCAG7BzB,EAOE0B,GAAA;AAAA;gBALD,OAAM;AAAA,gBACL,OAAOC,EAAAA,MAAM,OAAO;AAAA,gBACpB,MAAMvB,EAAAoB,CAAA,EAAK,MAAM,WAAQ,MAAA;AAAA,gBAC1B,OAAM;AAAA,gBACN,eAAY;AAAA,cAAA;;;;cAMhBxB,EAsBWC,GAAA;AAAA,UAtBA,IAAE,MAAQG,EAAAnB,CAAA,EAAO,SAAM;AAAA,UAA0B,UAAQ,CAAGmB,EAAAnB,CAAA,EAAO,aAAakC,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;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd","./forms-DRhpgERJ.amd","./utils-BVONc_yb.amd"],(function(C,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,{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,{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-DGHsC5Ii.amd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.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,CAAA,EAKA,OAAAI,EAAA,QAAA,eAAAF,CAAA,yBAMC,MAAAG,EAAAD,EAAA,mBAAA,EACAE,EAAAD,EAAA,mFAGC,MAAA,IAAA,MAAA,4DAAA,sEAIA,MAAA,IAAA,MAAA,yCAAA,EAGDH,EAAA,UAAAI,EAAAD,CAAA,CAA2D,CAAA,EAG5DD,EAAA,MAAAF,EAAA,SAAA,IAAA,CACCA,EAAA,QAAA,MAAA,EAAuB,EAAA,cAEhB,KAAA,EACD,CAAA,wCAIkB,CAAA,+DAKSE,EAAA,mBAAA,MAAAA,EAAA,WAAA,CAsB1B,GAAAA,EAAA,MAAAF,CAAA,EAAA,wDAjBU,MAAA,CACT,qBAAAK,EAAA,wGAKoC,aAAAA,EAAA,MAC7BC,gBAAAA,EAAAA,SACGC,kBAAAA,MACA,EAAAF,EAAA,MAAA,EAAA,4JAKL,MAAAH,EAAA,eAAA,CAAA,aAAAG,EAAA,OAAA,IAAA,CAAA,CAA4D,EAAA,KAAA,CAAA,mZCrE1EL,EAAAQ,EAAA,iBAAA,EAEAC,EAAAP,EAAA,SAAA,IAAA,OACC,MAAA,0GAGA,CAAA,8IAoEMA,EAAA,UAAA,EAAAA,EAAA,YAAAA,EAAA,SAAA,iDA3D6B,SAAA,CAAAA,EAAA,MAAAF,CAAA,EAAA,aAAAK,EAAA,IAAA,CAA+D,EAAA,6BAiC1F,aAAAA,EAAA,MA/BQK,iBAAAA,EAAAA,KACIC,MAAAA,EAAAA,eAAAA,EAAAA,KAAAA,CACF,EAAA,+BA4BTT,EAAA,mBAAA,MAAAU,EAAA,CAvBCV,EAAA,WAAAG,EAAA,OAAA,QAAA,CADsB,CAAA,gCAKtBH,EAAA,WAAAG,EAAA,OAAA,eAAA,CAD6B,CAAA,qIAMb,KAAAH,EAAA,MAAAW,EAAA,IAAA,EAAA,MAAA,SAAA,IAAA,qEAGO,EAAA,KAAA,EAAA,CAAA,QAAA,MAAA,CAAA,IAAAX,EAAA,UAAA,EAAAA,EAAA,YAAAW,EAAA,UAAA,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"}
|