@topvisor/ui 1.5.0-updates.0 → 1.5.0-updates.10
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/api-CawzY1Cw.amd.js +2 -0
- package/.chunks/api-CawzY1Cw.amd.js.map +1 -0
- package/.chunks/api-CawzY1Cw.esm.js +208 -0
- package/.chunks/api-CawzY1Cw.esm.js.map +1 -0
- package/.chunks/app-CCX-gNqz.amd.js +2 -0
- package/.chunks/app-CCX-gNqz.amd.js.map +1 -0
- package/.chunks/app-CCX-gNqz.esm.js +396 -0
- package/.chunks/app-CCX-gNqz.esm.js.map +1 -0
- package/.chunks/datepicker-BTkZOq7d.amd.js +2 -0
- package/.chunks/datepicker-BTkZOq7d.amd.js.map +1 -0
- package/.chunks/datepicker-BTkZOq7d.esm.js +38 -0
- package/.chunks/datepicker-BTkZOq7d.esm.js.map +1 -0
- package/.chunks/dialog-DeM4SApg.amd.js +2 -0
- package/.chunks/dialog-DeM4SApg.amd.js.map +1 -0
- package/.chunks/dialog-DeM4SApg.esm.js +117 -0
- package/.chunks/dialog-DeM4SApg.esm.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.amd.js +2 -0
- package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.amd.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.esm.js +169 -0
- package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.esm.js.map +1 -0
- package/.chunks/dialogs-CMrERMI7.amd.js +2 -0
- package/.chunks/dialogs-CMrERMI7.amd.js.map +1 -0
- package/.chunks/dialogs-CMrERMI7.esm.js +237 -0
- package/.chunks/dialogs-CMrERMI7.esm.js.map +1 -0
- package/.chunks/field-CjkpGeA7.amd.js +2 -0
- package/.chunks/field-CjkpGeA7.amd.js.map +1 -0
- package/.chunks/field-CjkpGeA7.esm.js +16 -0
- package/.chunks/field-CjkpGeA7.esm.js.map +1 -0
- package/.chunks/forms-CbUt-6Ff.amd.js +2 -0
- package/.chunks/forms-CbUt-6Ff.amd.js.map +1 -0
- package/.chunks/forms-CbUt-6Ff.esm.js +1991 -0
- package/.chunks/forms-CbUt-6Ff.esm.js.map +1 -0
- package/.chunks/formsExt-CrTmBhja.amd.js +2 -0
- package/.chunks/formsExt-CrTmBhja.amd.js.map +1 -0
- package/.chunks/formsExt-CrTmBhja.esm.js +807 -0
- package/.chunks/formsExt-CrTmBhja.esm.js.map +1 -0
- package/.chunks/lazy-CGswTOPj.amd.js +2 -0
- package/.chunks/lazy-CGswTOPj.amd.js.map +1 -0
- package/.chunks/lazy-CGswTOPj.esm.js +68 -0
- package/.chunks/lazy-CGswTOPj.esm.js.map +1 -0
- package/.chunks/mocker-CwZe-g4N.amd.js +2 -0
- package/.chunks/mocker-CwZe-g4N.amd.js.map +1 -0
- package/.chunks/mocker-CwZe-g4N.esm.js +45 -0
- package/.chunks/mocker-CwZe-g4N.esm.js.map +1 -0
- package/.chunks/notice-CslVdVNm.amd.js +4 -0
- package/.chunks/notice-CslVdVNm.amd.js.map +1 -0
- package/.chunks/notice-CslVdVNm.esm.js +191 -0
- package/.chunks/notice-CslVdVNm.esm.js.map +1 -0
- package/.chunks/popup-DrByVU-k.amd.js +2 -0
- package/.chunks/popup-DrByVU-k.amd.js.map +1 -0
- package/.chunks/popup-DrByVU-k.esm.js +444 -0
- package/.chunks/popup-DrByVU-k.esm.js.map +1 -0
- package/.chunks/popup-dNrN-eKi.amd.js +2 -0
- package/.chunks/popup-dNrN-eKi.amd.js.map +1 -0
- package/.chunks/popup-dNrN-eKi.esm.js +323 -0
- package/.chunks/popup-dNrN-eKi.esm.js.map +1 -0
- package/.chunks/punycode.es6-B-5kB2YI.amd.js +2 -0
- package/.chunks/{punycode.es6-CgGegfA_.es.js.map → punycode.es6-B-5kB2YI.amd.js.map} +1 -1
- package/.chunks/punycode.es6-B-5kB2YI.esm.js +105 -0
- package/.chunks/punycode.es6-B-5kB2YI.esm.js.map +1 -0
- package/.chunks/store-DuQpSSLL.amd.js +2 -0
- package/.chunks/store-DuQpSSLL.amd.js.map +1 -0
- package/.chunks/store-DuQpSSLL.esm.js +27 -0
- package/.chunks/store-DuQpSSLL.esm.js.map +1 -0
- package/.chunks/utils-BwiXsV0S.amd.js +2 -0
- package/.chunks/{utils-BNzP9anP.es.js.map → utils-BwiXsV0S.amd.js.map} +1 -1
- package/.chunks/utils-BwiXsV0S.esm.js +43 -0
- package/.chunks/utils-BwiXsV0S.esm.js.map +1 -0
- package/.chunks/utils-Dd0MZgyw.amd.js +2 -0
- package/.chunks/utils-Dd0MZgyw.amd.js.map +1 -0
- package/.chunks/utils-Dd0MZgyw.esm.js +287 -0
- package/.chunks/utils-Dd0MZgyw.esm.js.map +1 -0
- package/.chunks/worker-Db8YrEHo.amd.js +2 -0
- package/.chunks/worker-Db8YrEHo.amd.js.map +1 -0
- package/.chunks/worker-Db8YrEHo.esm.js +100 -0
- package/.chunks/worker-Db8YrEHo.esm.js.map +1 -0
- package/api/additional.amd.js +2 -2
- package/api/additional.amd.js.map +1 -1
- package/api/additional.d.ts +1 -0
- package/api/additional.js +70 -66
- package/api/additional.js.map +1 -1
- package/api/index.amd.js +2 -2
- package/api/index.amd.js.map +1 -1
- package/api/index.d.ts +1 -0
- package/api/index.js +3 -285
- package/assets/charts.css +1 -1
- package/assets/core.css +1 -1
- package/assets/dialog_regionSelectorRegions.css +1 -1
- package/assets/extra.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -0
- package/assets/layout.css +1 -1
- package/assets/notice.css +1 -1
- package/assets/popup.css +1 -0
- package/assets/project.css +1 -1
- package/assets/tabs.css +1 -1
- package/assets/tabsView.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/autoload-css-manifest.amd.json +79 -0
- package/autoload-css-manifest.json +90 -0
- package/charts/charts.amd.js +2 -2
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.d.ts +1 -0
- package/charts/charts.js +146 -174
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +2 -2
- package/core/app.amd.js.map +1 -1
- package/core/app.d.ts +1 -0
- package/core/app.js +5 -213
- package/dialog/dialog.amd.js +2 -2
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.d.ts +1 -0
- package/dialog/dialog.js +4 -60
- package/extra/extra.amd.js +2 -2
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.d.ts +1 -0
- package/extra/extra.js +73 -69
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +2 -2
- package/forms/forms.amd.js.map +1 -1
- package/forms/forms.d.ts +1 -0
- package/forms/forms.js +2 -19
- package/forms/helpers.amd.js +2 -2
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js +0 -2
- package/formsExt/formsExt.amd.js +2 -2
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.d.ts +1 -0
- package/formsExt/formsExt.js +2 -373
- package/icomoon/Topvisor icons.json +259 -231
- package/icomoon/demo-files/demo.amd.js +2 -0
- package/icomoon/demo-files/demo.amd.js.map +1 -0
- package/icomoon/demo.amd.js +2 -0
- package/icomoon/demo.amd.js.map +1 -0
- package/icomoon/demo.html +15 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +1 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +8 -5
- package/layout/layout.amd.js +2 -2
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.d.ts +1 -0
- package/layout/layout.js +41 -57
- package/layout/layout.js.map +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +2 -2
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.d.ts +1 -0
- package/popup/popup.js +2 -282
- package/popup/worker.amd.js +2 -2
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.d.ts +1 -0
- package/popup/worker.js +2 -144
- package/project/project.amd.js +2 -2
- package/project/project.amd.js.map +1 -1
- package/project/project.d.ts +1 -0
- package/project/project.js +1678 -1643
- package/project/project.js.map +1 -1
- package/src/{src/components → components}/charts/miniCharts/miniCharts.d.ts +1 -1
- package/src/{src/components → components}/core/notice/item/types.d.ts +1 -1
- package/src/{src/components → components}/core/notice/utils.d.ts +1 -1
- package/src/{src/components → components}/dialog/dialog/composables/dialogHandle.d.ts +1 -1
- package/src/{src/components → components}/dialog/dialog/dialogs/dialogs.vue.d.ts +2 -2
- package/src/{src/components → components}/dialog/dialog/stories/dialog_example/pages/utils.d.ts +1 -1
- package/src/components/dialog/dialog.d.ts +6 -0
- package/src/{src/components → components}/dialog/lib/worker.d.ts +1 -1
- package/src/{src/components → components}/forms/button/types.d.ts +1 -1
- package/src/{src/components → components}/forms/input/types.d.ts +1 -1
- package/src/components/forms/inputDate/types.d.ts +1 -0
- package/src/{src/components → components}/forms/select/types.d.ts +1 -1
- package/src/{src/components → components}/formsExt/editArea/types.d.ts +1 -1
- package/src/{src/components → components}/formsExt/editInput/types.d.ts +2 -2
- package/src/{src/components → components}/formsExt/libs/optionGroup/types.d.ts +1 -1
- package/src/{src/components → components}/formsExt/menu/types.d.ts +1 -1
- package/src/{src/components → components}/formsExt/policy/policy.vue.d.ts +1 -1
- package/src/{src/components → components}/formsExt/selector2/types.d.ts +3 -3
- package/src/{src/components → components}/popup/lib/popup.d.ts +2 -2
- package/src/{src/components → components}/popup/lib/worker.d.ts +2 -2
- package/src/{src/components → components}/popup/popup/popup.vue.d.ts +1 -1
- package/src/{src/components → components}/popup/popup/widgetInput/widgetInput.vue.d.ts +1 -1
- package/src/{src/components → components}/popup/popupConfirm/popupConfirm.vue.d.ts +1 -1
- package/src/{src/components → components}/project/competitorSelector/composables.d.ts +1 -1
- package/src/{src/components → components}/project/competitorSelector/types.d.ts +1 -1
- package/src/{src/components → components}/project/groupSelector/folders/types.d.ts +2 -2
- package/src/components/project/groupSelector/folders/utils.d.ts +57 -0
- package/src/{src/components → components}/project/groupSelector/groups/groups.vue.d.ts +1 -1
- package/src/{src/components → components}/project/groupSelector/groups/types.d.ts +2 -2
- package/src/components/project/groupSelector/groups/utils.d.ts +78 -0
- package/src/{src/components → components}/project/groupSelector/stories/mocks/index.d.ts +1 -1
- package/src/{src/components → components}/project/projectSelector/cache.d.ts +1 -1
- package/src/{src/components → components}/project/projectSelector/projectSelector.vue.d.ts +1 -1
- package/src/{src/components → components}/project/projectSelector/types.d.ts +2 -2
- package/src/{src/components → components}/project/projectSelector/utils.d.ts +41 -40
- package/src/{src/components → components}/project/regionSelector/composables/selectRegion.d.ts +1 -1
- package/src/{src/components → components}/project/regionSelector/composables/selectSearcher.d.ts +1 -1
- package/src/{src/components → components}/project/regionSelector/dialog_regionSelectorRegions/types.d.ts +1 -1
- package/src/{src/components → components}/project/tagSelector/popupOpener/types.d.ts +1 -1
- package/src/{src/components → components}/project/tagSelector/types.d.ts +1 -1
- package/src/{src/components → components}/project/tagSelector/utils/el.d.ts +1 -1
- package/src/{src/components → components}/tabsView/tabsView/store.d.ts +1 -1
- package/src/{src/core → core}/app.d.ts +2 -2
- package/src/{src/core → core}/core/core.d.ts +3 -3
- package/src/{src/core → core}/plugins/core.d.ts +6 -6
- package/src/{src/core → core}/utils/price.d.ts +2 -2
- package/src/core/utils/store.d.ts +6 -0
- package/tabs/tabs.amd.js +2 -2
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.d.ts +1 -0
- package/tabs/tabs.js +63 -77
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +2 -2
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.d.ts +1 -0
- package/tabsView/tabsView.js +245 -288
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js +2 -2
- package/utils/check.amd.js.map +1 -1
- package/utils/check.d.ts +1 -0
- package/utils/check.js +15 -19
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +6 -6
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.d.ts +1 -0
- package/utils/clipboard.js +26 -31
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +2 -2
- package/utils/date.amd.js.map +1 -1
- package/utils/date.d.ts +1 -0
- package/utils/date.js +2 -12
- package/utils/device.amd.js +2 -2
- package/utils/device.amd.js.map +1 -1
- package/utils/device.d.ts +1 -0
- package/utils/device.js +2 -15
- package/utils/dom.amd.js +2 -2
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.d.ts +5 -0
- package/utils/dom.js +53 -67
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +3 -3
- package/utils/image.amd.js.map +1 -1
- package/utils/image.d.ts +1 -0
- package/utils/image.js +12 -22
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js +2 -2
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.d.ts +1 -0
- package/utils/keyboard.js +10 -11
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +2 -2
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.d.ts +1 -0
- package/utils/lodash.js +2 -9
- package/utils/number.amd.js +2 -2
- package/utils/number.amd.js.map +1 -1
- package/utils/number.d.ts +1 -0
- package/utils/number.js +12 -12
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +2 -2
- package/utils/price.amd.js.map +1 -1
- package/utils/price.d.ts +1 -0
- package/utils/price.js +14 -9
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js +2 -2
- package/utils/route.amd.js.map +1 -1
- package/utils/route.d.ts +1 -0
- package/utils/route.js +33 -37
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js +2 -2
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.d.ts +1 -0
- package/utils/scroll.js +39 -43
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +2 -2
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.d.ts +1 -0
- package/utils/searchers.js +128 -133
- package/utils/searchers.js.map +1 -1
- package/utils/store.amd.js +2 -2
- package/utils/store.amd.js.map +1 -1
- package/utils/store.d.ts +1 -0
- package/utils/store.js +2 -7
- package/utils/string.amd.js +2 -2
- package/utils/string.amd.js.map +1 -1
- package/utils/string.d.ts +1 -0
- package/utils/string.js +120 -147
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js +2 -2
- package/utils/system.amd.js.map +1 -1
- package/utils/system.d.ts +1 -0
- package/utils/system.js +25 -28
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +3 -3
- package/utils/url.amd.js.map +1 -1
- package/utils/url.d.ts +1 -0
- package/utils/url.js +36 -47
- package/utils/url.js.map +1 -1
- package/.chunks/core-Dgj_YGWh.es.js +0 -268
- package/.chunks/core-Dgj_YGWh.es.js.map +0 -1
- package/.chunks/core-DzDFXOdI.amd.js +0 -2
- package/.chunks/core-DzDFXOdI.amd.js.map +0 -1
- package/.chunks/datepicker-oa8ZwRhq.amd.js +0 -2
- package/.chunks/datepicker-oa8ZwRhq.amd.js.map +0 -1
- package/.chunks/datepicker-qToxk2nN.es.js +0 -41
- package/.chunks/datepicker-qToxk2nN.es.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-CZ0tMVSq.amd.js +0 -2
- package/.chunks/dialog_regionSelectorRegions-CZ0tMVSq.amd.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-qDW2Ejsv.es.js +0 -180
- package/.chunks/dialog_regionSelectorRegions-qDW2Ejsv.es.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js +0 -323
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js.map +0 -1
- package/.chunks/field-Cvv0SRcJ.amd.js +0 -2
- package/.chunks/field-Cvv0SRcJ.amd.js.map +0 -1
- package/.chunks/field-CyyFzM-Y.es.js +0 -16
- package/.chunks/field-CyyFzM-Y.es.js.map +0 -1
- package/.chunks/forms-DDNzqU6o.amd.js +0 -3
- package/.chunks/forms-DDNzqU6o.amd.js.map +0 -1
- package/.chunks/forms-DtC-EKJL.es.js +0 -2053
- package/.chunks/forms-DtC-EKJL.es.js.map +0 -1
- package/.chunks/index-DLUtoTUg.amd.js +0 -2
- package/.chunks/index-DLUtoTUg.amd.js.map +0 -1
- package/.chunks/index-DkQWJkMc.es.js +0 -54
- package/.chunks/index-DkQWJkMc.es.js.map +0 -1
- package/.chunks/lazy-DDNqYkXn.amd.js +0 -2
- package/.chunks/lazy-DDNqYkXn.amd.js.map +0 -1
- package/.chunks/lazy-HKSyLh72.es.js +0 -75
- package/.chunks/lazy-HKSyLh72.es.js.map +0 -1
- package/.chunks/notice-BvQl911b.es.js +0 -191
- package/.chunks/notice-BvQl911b.es.js.map +0 -1
- package/.chunks/notice-CJ3WOTCM.amd.js +0 -4
- package/.chunks/notice-CJ3WOTCM.amd.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js +0 -139
- package/.chunks/page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js +0 -2
- package/.chunks/page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js +0 -519
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js.map +0 -1
- package/.chunks/popup-OuDglAOF.es.js +0 -470
- package/.chunks/popup-OuDglAOF.es.js.map +0 -1
- package/.chunks/popup-yXIpyok3.amd.js +0 -2
- package/.chunks/popup-yXIpyok3.amd.js.map +0 -1
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js +0 -2
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js.map +0 -1
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js +0 -209
- package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js.map +0 -1
- package/.chunks/punycode.es6-CNOnFR2-.amd.js +0 -2
- package/.chunks/punycode.es6-CNOnFR2-.amd.js.map +0 -1
- package/.chunks/punycode.es6-CgGegfA_.es.js +0 -134
- package/.chunks/store-CX_6ZXhO.es.js +0 -29
- package/.chunks/store-CX_6ZXhO.es.js.map +0 -1
- package/.chunks/store-YRW59xEF.amd.js +0 -2
- package/.chunks/store-YRW59xEF.amd.js.map +0 -1
- package/.chunks/utils-BNzP9anP.es.js +0 -78
- package/.chunks/utils-CWn_G7OO.amd.js +0 -2
- package/.chunks/utils-CWn_G7OO.amd.js.map +0 -1
- package/.chunks/utils-DIviuVEw.amd.js +0 -2
- package/.chunks/utils-DIviuVEw.amd.js.map +0 -1
- package/.chunks/utils-Dma85ehT.es.js +0 -288
- package/.chunks/utils-Dma85ehT.es.js.map +0 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js +0 -39
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js.map +0 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CkOmb3VD.amd.js +0 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CkOmb3VD.amd.js.map +0 -1
- package/api/index.js.map +0 -1
- package/assets/policy.css +0 -1
- package/assets/popupHint.css +0 -1
- package/core/app.js.map +0 -1
- package/dialog/dialog.js.map +0 -1
- package/forms/forms.js.map +0 -1
- package/forms/helpers.js.map +0 -1
- package/formsExt/formsExt.js.map +0 -1
- package/popup/popup.js.map +0 -1
- package/popup/worker.js.map +0 -1
- package/src/src/components/dialog/dialog.d.ts +0 -6
- package/src/src/components/forms/inputDate/types.d.ts +0 -1
- package/src/src/components/project/groupSelector/folders/utils.d.ts +0 -422
- package/src/src/components/project/groupSelector/groups/utils.d.ts +0 -791
- package/src/src/components/project/groupSelector/utils.d.ts +0 -37
- package/src/src/core/utils/store.d.ts +0 -6
- package/utils/date.js.map +0 -1
- package/utils/device.js.map +0 -1
- package/utils/lodash.js.map +0 -1
- package/utils/store.js.map +0 -1
- package/src/{src/api → api}/api/additional.d.ts +0 -0
- package/src/{src/api → api}/api/client/client.d.ts +0 -0
- package/src/{src/api → api}/api/client/request-options.d.ts +0 -0
- package/src/{src/api → api}/api/client/request.d.ts +0 -0
- package/src/{src/api → api}/api/index.d.ts +0 -0
- package/src/{src/api → api}/api/mocker/index.d.ts +0 -0
- package/src/{src/api → api}/api/tests/types.test-d.d.ts +0 -0
- package/src/{src/api → api}/api/types/api.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/client.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/middleware.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/options.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/request-context.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/request-options.d.ts +0 -0
- package/src/{src/api → api}/api/types/client/request.d.ts +0 -0
- package/src/{src/api → api}/api/types/ext.d.ts +0 -0
- package/src/{src/api → api}/api/types/field.d.ts +0 -0
- package/src/{src/api → api}/api/types/index.d.ts +0 -0
- package/src/{src/api → api}/api/types/mocker.d.ts +0 -0
- package/src/{src/api → api}/api/types/schema.d.ts +0 -0
- package/src/{src/api → api}/api/types/tv.d.ts +0 -0
- package/src/{src/api → api}/api/types/utils.d.ts +0 -0
- package/src/{src/api → api}/api/utils/common.d.ts +0 -0
- package/src/{src/api → api}/api/utils/field.d.ts +0 -0
- package/src/{src/api → api}/api/utils/filters.d.ts +0 -0
- package/src/{src/api → api}/api/utils/lazy.d.ts +0 -0
- package/src/{src/components → components}/charts/charts.d.ts +0 -0
- package/src/{src/components → components}/charts/miniChart/miniChart.vue.d.ts +0 -0
- package/src/{src/components → components}/charts/miniChart/types.d.ts +0 -0
- package/src/{src/components → components}/charts/miniChart/utils/consts.d.ts +0 -0
- package/src/{src/components → components}/charts/miniCharts/miniCharts.vue.d.ts +0 -0
- package/src/{src/components → components}/core/notice/item/item.vue.d.ts +0 -0
- package/src/{src/components → components}/core/notice/notice.vue.d.ts +0 -0
- package/src/{src/components → components}/core/notice/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/composables/asyncDialogHandle.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/composables/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/composables/utils.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/dialog.vue.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/page/page.vue.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/page/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/pageComponent/pageComponent.vue.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/pageComponent/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/dialog/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/lib/types.d.ts +0 -0
- package/src/{src/components → components}/dialog/lib/utils.d.ts +0 -0
- package/src/{src/components → components}/dialog/lib/utils.globalEvents.d.ts +0 -0
- package/src/{src/components → components}/extra/extra.d.ts +0 -0
- package/src/{src/components → components}/extra/rive/rive.vue.d.ts +0 -0
- package/src/{src/components → components}/extra/rive/types.d.ts +0 -0
- package/src/{src/components → components}/forms/avatar/avatar.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/avatar/types.d.ts +0 -0
- package/src/{src/components → components}/forms/button/button.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/caption/caption.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/caption/types.d.ts +0 -0
- package/src/{src/components → components}/forms/checkbox/checkbox.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/checkbox/types.d.ts +0 -0
- package/src/{src/components → components}/forms/controlLabel/controlLabel.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/controlLabel/types.d.ts +0 -0
- package/src/{src/components → components}/forms/forms.d.ts +0 -0
- package/src/{src/components → components}/forms/helpers.d.ts +0 -0
- package/src/{src/components → components}/forms/hint/hint.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/hint/types.d.ts +0 -0
- package/src/{src/components → components}/forms/input/input.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/inputDate/datepicker.d.ts +0 -0
- package/src/{src/components → components}/forms/inputDate/inputDate.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/inputRange/inputRange.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/inputRange/types.d.ts +0 -0
- package/src/{src/components → components}/forms/loadbar/loadbar.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/preloader/preloader.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/preloader/types.d.ts +0 -0
- package/src/{src/components → components}/forms/radio/radio.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/radio/types.d.ts +0 -0
- package/src/{src/components → components}/forms/select/select.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/switcher/switcher.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/switcher/types.d.ts +0 -0
- package/src/{src/components → components}/forms/textarea/textarea.vue.d.ts +0 -0
- package/src/{src/components → components}/forms/textarea/types.d.ts +0 -0
- package/src/{src/components → components}/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/checkboxGroup/types.d.ts +0 -0
- package/src/{src/components → components}/formsExt/editArea/editArea.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/editInput/editInput.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/formsExt.d.ts +0 -0
- package/src/{src/components → components}/formsExt/info/info.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/info/types.d.ts +0 -0
- package/src/{src/components → components}/formsExt/libs/optionGroup/optionGroup.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/menu/menu.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/policy/types.d.ts +0 -0
- package/src/{src/components → components}/formsExt/radioGroup/radioGroup.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/radioGroup/types.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/cache.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/composables/useAPI.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/composables/useMenu.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/itemMulti.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/selector2.vue.d.ts +0 -0
- package/src/{src/components → components}/formsExt/selector2/utils.d.ts +0 -0
- package/src/{src/components → components}/layout/islandRows/islandRows.vue.d.ts +0 -0
- package/src/{src/components → components}/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +0 -0
- package/src/{src/components → components}/layout/islandRows/islandRowsRow/types.d.ts +0 -0
- package/src/{src/components → components}/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +0 -0
- package/src/{src/components → components}/layout/islandRows/types.d.ts +0 -0
- package/src/{src/components → components}/layout/layout.d.ts +0 -0
- package/src/{src/components → components}/layout/rows/rows.vue.d.ts +0 -0
- package/src/{src/components → components}/layout/rows/types.d.ts +0 -0
- package/src/{src/components → components}/popup/lib/popup.globalEvents.d.ts +0 -0
- package/src/{src/components → components}/popup/lib/worker.globalEvents.d.ts +0 -0
- package/src/{src/components → components}/popup/popup/listItem.vue.d.ts +0 -0
- package/src/{src/components → components}/popup/popup/opener/opener.vue.d.ts +0 -0
- package/src/{src/components → components}/popup/popup/opener/types.d.ts +0 -0
- package/src/{src/components → components}/popup/popup/types.d.ts +0 -0
- package/src/{src/components → components}/popup/popup.d.ts +0 -0
- package/src/{src/components → components}/popup/popupAlert/popupAlert.vue.d.ts +0 -0
- package/src/{src/components → components}/popup/popupAlert/types.d.ts +0 -0
- package/src/{src/components → components}/popup/popupConfirm/types.d.ts +0 -0
- package/src/{src/components → components}/popup/popupHint/popupHint.vue.d.ts +0 -0
- package/src/{src/components → components}/popup/popupHint/types.d.ts +0 -0
- package/src/{src/components → components}/popup/popupPrompt/popupPrompt.vue.d.ts +0 -0
- package/src/{src/components → components}/popup/popupPrompt/types.d.ts +0 -0
- package/src/{src/components → components}/popup/worker.d.ts +0 -0
- package/src/{src/components → components}/project/competitorSelector/competitorSelector.vue.d.ts +0 -0
- package/src/{src/components → components}/project/groupSelector/folders/folders.vue.d.ts +0 -0
- package/src/{src/components → components}/project/groupSelector/groupSelector.vue.d.ts +1 -1
- /package/src/{src/components → components}/project/groupSelector/stories/mocks/folders.d.ts +0 -0
- /package/src/{src/components → components}/project/groupSelector/stories/mocks/groups.d.ts +0 -0
- /package/src/{src/components → components}/project/groupSelector/types.d.ts +0 -0
- /package/src/{src/components → components}/project/project.d.ts +0 -0
- /package/src/{src/components → components}/project/projectSelector/submenu/submenu.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/projectSelector/submenu/types.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/composables/compare.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/composables/selectorRegion.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/dialog_regionSelectorRegions/dialog_regionSelectorRegions.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/regionSelector.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/types.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/utils/consts.d.ts +0 -0
- /package/src/{src/components → components}/project/regionSelector/utils/utils.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/popupListItem/types.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/popupOpener/popupOpener.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/tagIcon/tagIcon.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/tagIcon/types.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/tagSelector.vue.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/tagsDefaults.d.ts +0 -0
- /package/src/{src/components → components}/project/tagSelector/utils/utils.d.ts +0 -0
- /package/src/{src/components → components}/tabs/tabs/content.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabs/tabs/tab.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabs/tabs/tabs.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabs/tabs/types.d.ts +0 -0
- /package/src/{src/components → components}/tabs/tabs.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/menu.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/menuDelimeter.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/menuItem.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/menuTitle.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/tabsView.vue.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/types.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView/utils.d.ts +0 -0
- /package/src/{src/components → components}/tabsView/tabsView.d.ts +0 -0
- /package/src/{src/core → core}/core/events/resize.d.ts +0 -0
- /package/src/{src/core → core}/core/events.d.ts +0 -0
- /package/src/{src/core → core}/core/options.d.ts +0 -0
- /package/src/{src/core → core}/core/preloaders.d.ts +0 -0
- /package/src/{src/core → core}/core/state.d.ts +0 -0
- /package/src/{src/core → core}/directives/data.d.ts +0 -0
- /package/src/{src/core → core}/directives/focus.d.ts +0 -0
- /package/src/{src/core → core}/directives/preloader.d.ts +0 -0
- /package/src/{src/core → core}/directives/scrollIntoView.d.ts +0 -0
- /package/src/{src/core → core}/directives/scrollShadow.d.ts +0 -0
- /package/src/{src/core → core}/directives/shortcut.d.ts +0 -0
- /package/src/{src/core → core}/directives/sticky.d.ts +0 -0
- /package/src/{src/core → core}/directives/swimUp.d.ts +0 -0
- /package/src/{src/core → core}/directives/tooltip.d.ts +0 -0
- /package/src/{src/core → core}/plugins/i18n.d.ts +0 -0
- /package/src/{src/core → core}/plugins/piniaTPA.d.ts +0 -0
- /package/src/{src/core → core}/utils/check.d.ts +0 -0
- /package/src/{src/core → core}/utils/clipboard.d.ts +0 -0
- /package/src/{src/core → core}/utils/composables/useWatch.d.ts +0 -0
- /package/src/{src/core → core}/utils/date.d.ts +0 -0
- /package/src/{src/core → core}/utils/device.d.ts +0 -0
- /package/src/{src/core → core}/utils/dom.d.ts +0 -0
- /package/src/{src/core → core}/utils/image.d.ts +0 -0
- /package/src/{src/core → core}/utils/keyboard.d.ts +0 -0
- /package/src/{src/core → core}/utils/lodash.d.ts +0 -0
- /package/src/{src/core → core}/utils/number.d.ts +0 -0
- /package/src/{src/core → core}/utils/route.d.ts +0 -0
- /package/src/{src/core → core}/utils/scroll.d.ts +0 -0
- /package/src/{src/core → core}/utils/searchers.d.ts +0 -0
- /package/src/{src/core → core}/utils/store/localStorage.d.ts +0 -0
- /package/src/{src/core → core}/utils/store/plugin.d.ts +0 -0
- /package/src/{src/core → core}/utils/store/store.d.ts +0 -0
- /package/src/{src/core → core}/utils/string.d.ts +0 -0
- /package/src/{src/core → core}/utils/system.d.ts +0 -0
- /package/src/{src/core → core}/utils/tests/date/dateFormat.test.d.ts +0 -0
- /package/src/{src/core → core}/utils/url.d.ts +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["require","exports","@faker-js/faker"],(function(k,u,a){"use strict";if(typeof M>"u")var M=window.Vue;const y=20,w=async(e,s,t,l)=>{if(e.delay){e.showLog&&console.log("genMock pause",e.delay);const{sleep:n}=await new Promise((c,d)=>k(["../utils/system.amd"],c,d));let o=n(e.delay);l&&(o=Promise.race([o,new Promise((c,d)=>{l.addEventListener("abort",()=>{d(new DOMException("The operation was aborted from API mocker.","AbortError"))})})])),await o}const r={result:g(e,s,t),errors:void 0,nextOffset:void 0,total:void 0};if(delete r.errors,delete r.nextOffset,delete r.total,Array.isArray(r.result)&&e.total&&t&&t.limit){e.useFilter&&(r.result=r.result.filter(o=>e.useFilter?.(o,t)));const n=t.offset??0;r.result.length>t.limit+n&&(r.nextOffset=t.limit+n,r.total=e.total),r.result=r.result.slice(n,n+t.limit)}return e.showLog&&console.log("genMock complete",r),r},g=(e,s,t)=>{let l=e.seed??0;if(l===-1&&(l=Math.random()),e.result instanceof Function)return a.faker.seed(l),f(e.result,0,s,t);if(Array.isArray(e.result)){const r=e.result[0],n=[],o=e.total??t?.limit??y;for(let c=0;c<o;c++)n.push(i(r,c,l,s,t));return n}return i(e.result,0,l,s,t)},i=(e,s,t,l,r)=>{const n={};for(const o in e){const c=e[o];l&&!l.includes(o)||(a.faker.seed(t+s),n[o]=f(c,s,l,r))}return n},f=(e,s=0,t,l)=>e(s,t,l);u.genMockItem=i,u.genMockResponse=w,u.genMockResult=g,u.genMockValue=f,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
-
//# sourceMappingURL=index-DLUtoTUg.amd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DLUtoTUg.amd.js","sources":["../../src/api/api/mocker/index.ts"],"sourcesContent":["import { faker } from '@faker-js/faker';\n\nconst DEFAULT_LIMIT = 20;\n\nexport const genMockResponse = async (\n\toptions: Api.Mocker.Options<any, any>,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n\trequestInitSignal?: ReturnType<Api.ClientRequest<any>['abortByFingerprint']>,\n) => {\n\tif (options.delay) {\n\t\tif (options.showLog) {\n\t\t\tconsole.log('genMock pause', options.delay);\n\t\t}\n\n\t\tconst { sleep } = await import('@/core/utils/system');\n\n\t\tlet promise = sleep(options.delay);\n\n\t\tif (requestInitSignal) {\n\t\t\tpromise = Promise.race<void>([\n\t\t\t\tpromise,\n\n\t\t\t\t// обработчик отмены\n\t\t\t\tnew Promise((_resolve, reject) => {\n\t\t\t\t\trequestInitSignal.addEventListener('abort', () => {\n\t\t\t\t\t\treject(new DOMException('The operation was aborted from API mocker.', 'AbortError'));\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t]);\n\t\t}\n\n\t\tawait promise;\n\t}\n\n\tconst res = {\n\t\tresult: genMockResult(options, fields, params),\n\t\terrors: undefined,\n\t\tnextOffset: undefined as number | undefined,\n\t\ttotal: undefined as number | undefined,\n\t};\n\n\tdelete res.errors;\n\tdelete res.nextOffset;\n\tdelete res.total;\n\n\t// реализация `limit` и `offset`\n\tif (Array.isArray(res.result) && options.total && params && params.limit) {\n\t\tif (options.useFilter) {\n\t\t\tres.result = res.result.filter((resultItem) => options.useFilter?.(resultItem, params));\n\t\t}\n\n\t\tconst offset = params.offset ?? 0;\n\n\t\tif (res.result.length > params.limit + offset) {\n\t\t\tres.nextOffset = params.limit + offset;\n\t\t\tres.total = options.total;\n\t\t}\n\n\t\tres.result = res.result.slice(offset, offset + params.limit);\n\t}\n\n\tif (options.showLog) {\n\t\tconsole.log('genMock complete', res);\n\t}\n\n\treturn res;\n};\n\nexport const genMockResult = <Options extends Api.Mocker.Options<any, any>>(\n\toptions: Options,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockResult<Options['result']> => {\n\tlet seed: number | undefined = options.seed ?? 0;\n\tif (seed === -1) seed = Math.random();\n\n\tif (options.result instanceof Function) {\n\t\tfaker.seed(seed);\n\n\t\treturn genMockValue(options.result, 0, fields, params);\n\t}\n\n\tif (Array.isArray(options.result)) {\n\t\tconst genItem = options.result[0];\n\n\t\tconst result = [] as Api.Mocker.ToMockResult<Options['result']>;\n\n\t\t// для работы `useFilter()` применять `params.limit` можно только после применения фильтра\n\t\tconst total = options.total ?? params?.limit ?? DEFAULT_LIMIT;\n\n\t\tfor (let i = 0; i < total; i++) {\n\t\t\tresult.push(genMockItem(genItem, i, seed, fields, params));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\treturn genMockItem(options.result, 0, seed, fields, params) as Api.Mocker.ToMockResult<Options['result']>;\n};\n\nexport const genMockItem = <T extends Api.Mocker.Item>(\n\tgenItem: T,\n\tn: number,\n\tseed: number,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockItem<T> => {\n\tconst item = {} as Api.Mocker.ToMockItem<T>;\n\n\tfor (const key in genItem) {\n\t\tconst genValue = genItem[key];\n\n\t\tif (fields && !fields.includes(key)) continue;\n\n\t\t// seed для генерации одного объекта всегда одинаковый\n\t\tfaker.seed(seed + n);\n\n\t\titem[key] = genMockValue(genValue, n, fields, params);\n\t}\n\n\treturn item;\n};\n\nexport const genMockValue = <T extends Api.Mocker.Value>(\n\tgenValue: T,\n\tn: number = 0,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockValue<T> => {\n\treturn genValue(n, fields, params);\n};\n"],"names":["genMockResponse","options","fields","params","requestInitSignal","promise","_resolve","reject","res","offset","genMockResult","seed","faker","genMockValue","i","total","result","genMockItem","genItem","n","key","genValue","item"],"mappings":"yHAIOA,EAAA,MAAAC,EAAAC,EAAAC,EAAAC,IAAA,CAMN,GAAAH,EAAA,MAAA,CACCA,EAAA,2IASCI,EAAA,QAAA,KAAA,CAA6BA,EAC5B,IAAA,QAAA,CAAAC,EAAAC,IAAA,CAICH,EAAA,iBAAA,QAAA,IAAA,+EACoF,CAAA,CACnF,CAAA,CACD,CAAA,GAIH,MAAAC,2DAMY,MAAA,QASb,sDAAA,MAAA,QAAAG,EAAA,MAAA,GAAAP,EAAA,OAAAE,GAAAA,EAAA,MAAA,CACCF,EAAA,6DAIA,MAAAQ,EAAAN,EAAA,QAAA,EAEAK,EAAA,OAAA,OAAAL,EAAA,MAAAM,2BAECD,EAAA,MAAAP,EAAA,OAGDO,EAAA,OAAAA,EAAA,OAAA,MAAAC,EAAAA,EAAAN,EAAA,KAAA,EAGD,OAAAF,EAAA,SACC,QAAA,IAAA,mBAAAO,CAAA,EAGDA,CACD,EAEOE,EAAA,CAAAT,EAAAC,EAAAC,IAAA,CAKN,IAAAQ,EAAAV,EAAA,MAAA,EAGA,6BAAAA,EAAA,kBAAA,SACC,OAAAW,EAAA,MAAA,KAAAD,CAAA,EAEAE,EAAAZ,EAAA,OAAA,EAAAC,EAAAC,CAAA,8EAWA,QAAAW,EAAA,EAAAA,EAAAC,EAAAD,IACCE,EAAA,KAAAC,EAAAC,EAAAJ,EAAAH,EAAAT,EAAAC,CAAA,CAAA,EAGD,OAAAa,EAGD,OAAAC,EAAAhB,EAAA,OAAA,EAAAU,EAAAT,EAAAC,CAAA,CACD,EAEOc,EAAA,CAAAC,EAAAC,EAAAR,EAAAT,EAAAC,IAAA,YASN,UAAAiB,KAAAF,EAAA,CACC,MAAAG,EAAAH,EAAAE,CAAA,sBAKAR,EAAA,MAAA,KAAAD,EAAAQ,CAAA,EAEAG,EAAAF,CAAA,EAAAP,EAAAQ,EAAAF,EAAAjB,EAAAC,CAAA,GAGD,OAAAmB,CACD,EAEOT,EAAA,CAAAQ,EAAAF,EAAA,EAAAjB,EAAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { faker as i } from "@faker-js/faker";
|
|
2
|
-
const a = 20, y = async (e, c, t, l) => {
|
|
3
|
-
if (e.delay) {
|
|
4
|
-
e.showLog && console.log("genMock pause", e.delay);
|
|
5
|
-
const { sleep: o } = await import("../utils/system.js");
|
|
6
|
-
let s = o(e.delay);
|
|
7
|
-
l && (s = Promise.race([
|
|
8
|
-
s,
|
|
9
|
-
// обработчик отмены
|
|
10
|
-
new Promise((n, d) => {
|
|
11
|
-
l.addEventListener("abort", () => {
|
|
12
|
-
d(new DOMException("The operation was aborted from API mocker.", "AbortError"));
|
|
13
|
-
});
|
|
14
|
-
})
|
|
15
|
-
])), await s;
|
|
16
|
-
}
|
|
17
|
-
const r = {
|
|
18
|
-
result: g(e, c, t),
|
|
19
|
-
errors: void 0,
|
|
20
|
-
nextOffset: void 0,
|
|
21
|
-
total: void 0
|
|
22
|
-
};
|
|
23
|
-
if (delete r.errors, delete r.nextOffset, delete r.total, Array.isArray(r.result) && e.total && t && t.limit) {
|
|
24
|
-
e.useFilter && (r.result = r.result.filter((s) => e.useFilter?.(s, t)));
|
|
25
|
-
const o = t.offset ?? 0;
|
|
26
|
-
r.result.length > t.limit + o && (r.nextOffset = t.limit + o, r.total = e.total), r.result = r.result.slice(o, o + t.limit);
|
|
27
|
-
}
|
|
28
|
-
return e.showLog && console.log("genMock complete", r), r;
|
|
29
|
-
}, g = (e, c, t) => {
|
|
30
|
-
let l = e.seed ?? 0;
|
|
31
|
-
if (l === -1 && (l = Math.random()), e.result instanceof Function)
|
|
32
|
-
return i.seed(l), f(e.result, 0, c, t);
|
|
33
|
-
if (Array.isArray(e.result)) {
|
|
34
|
-
const r = e.result[0], o = [], s = e.total ?? t?.limit ?? a;
|
|
35
|
-
for (let n = 0; n < s; n++)
|
|
36
|
-
o.push(u(r, n, l, c, t));
|
|
37
|
-
return o;
|
|
38
|
-
}
|
|
39
|
-
return u(e.result, 0, l, c, t);
|
|
40
|
-
}, u = (e, c, t, l, r) => {
|
|
41
|
-
const o = {};
|
|
42
|
-
for (const s in e) {
|
|
43
|
-
const n = e[s];
|
|
44
|
-
l && !l.includes(s) || (i.seed(t + c), o[s] = f(n, c, l, r));
|
|
45
|
-
}
|
|
46
|
-
return o;
|
|
47
|
-
}, f = (e, c = 0, t, l) => e(c, t, l);
|
|
48
|
-
export {
|
|
49
|
-
u as genMockItem,
|
|
50
|
-
y as genMockResponse,
|
|
51
|
-
g as genMockResult,
|
|
52
|
-
f as genMockValue
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=index-DkQWJkMc.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DkQWJkMc.es.js","sources":["../../src/api/api/mocker/index.ts"],"sourcesContent":["import { faker } from '@faker-js/faker';\n\nconst DEFAULT_LIMIT = 20;\n\nexport const genMockResponse = async (\n\toptions: Api.Mocker.Options<any, any>,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n\trequestInitSignal?: ReturnType<Api.ClientRequest<any>['abortByFingerprint']>,\n) => {\n\tif (options.delay) {\n\t\tif (options.showLog) {\n\t\t\tconsole.log('genMock pause', options.delay);\n\t\t}\n\n\t\tconst { sleep } = await import('@/core/utils/system');\n\n\t\tlet promise = sleep(options.delay);\n\n\t\tif (requestInitSignal) {\n\t\t\tpromise = Promise.race<void>([\n\t\t\t\tpromise,\n\n\t\t\t\t// обработчик отмены\n\t\t\t\tnew Promise((_resolve, reject) => {\n\t\t\t\t\trequestInitSignal.addEventListener('abort', () => {\n\t\t\t\t\t\treject(new DOMException('The operation was aborted from API mocker.', 'AbortError'));\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t]);\n\t\t}\n\n\t\tawait promise;\n\t}\n\n\tconst res = {\n\t\tresult: genMockResult(options, fields, params),\n\t\terrors: undefined,\n\t\tnextOffset: undefined as number | undefined,\n\t\ttotal: undefined as number | undefined,\n\t};\n\n\tdelete res.errors;\n\tdelete res.nextOffset;\n\tdelete res.total;\n\n\t// реализация `limit` и `offset`\n\tif (Array.isArray(res.result) && options.total && params && params.limit) {\n\t\tif (options.useFilter) {\n\t\t\tres.result = res.result.filter((resultItem) => options.useFilter?.(resultItem, params));\n\t\t}\n\n\t\tconst offset = params.offset ?? 0;\n\n\t\tif (res.result.length > params.limit + offset) {\n\t\t\tres.nextOffset = params.limit + offset;\n\t\t\tres.total = options.total;\n\t\t}\n\n\t\tres.result = res.result.slice(offset, offset + params.limit);\n\t}\n\n\tif (options.showLog) {\n\t\tconsole.log('genMock complete', res);\n\t}\n\n\treturn res;\n};\n\nexport const genMockResult = <Options extends Api.Mocker.Options<any, any>>(\n\toptions: Options,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockResult<Options['result']> => {\n\tlet seed: number | undefined = options.seed ?? 0;\n\tif (seed === -1) seed = Math.random();\n\n\tif (options.result instanceof Function) {\n\t\tfaker.seed(seed);\n\n\t\treturn genMockValue(options.result, 0, fields, params);\n\t}\n\n\tif (Array.isArray(options.result)) {\n\t\tconst genItem = options.result[0];\n\n\t\tconst result = [] as Api.Mocker.ToMockResult<Options['result']>;\n\n\t\t// для работы `useFilter()` применять `params.limit` можно только после применения фильтра\n\t\tconst total = options.total ?? params?.limit ?? DEFAULT_LIMIT;\n\n\t\tfor (let i = 0; i < total; i++) {\n\t\t\tresult.push(genMockItem(genItem, i, seed, fields, params));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\treturn genMockItem(options.result, 0, seed, fields, params) as Api.Mocker.ToMockResult<Options['result']>;\n};\n\nexport const genMockItem = <T extends Api.Mocker.Item>(\n\tgenItem: T,\n\tn: number,\n\tseed: number,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockItem<T> => {\n\tconst item = {} as Api.Mocker.ToMockItem<T>;\n\n\tfor (const key in genItem) {\n\t\tconst genValue = genItem[key];\n\n\t\tif (fields && !fields.includes(key)) continue;\n\n\t\t// seed для генерации одного объекта всегда одинаковый\n\t\tfaker.seed(seed + n);\n\n\t\titem[key] = genMockValue(genValue, n, fields, params);\n\t}\n\n\treturn item;\n};\n\nexport const genMockValue = <T extends Api.Mocker.Value>(\n\tgenValue: T,\n\tn: number = 0,\n\tfields?: readonly string[],\n\tparams?: Api.Mocker.Params,\n): Api.Mocker.ToMockValue<T> => {\n\treturn genValue(n, fields, params);\n};\n"],"names":["DEFAULT_LIMIT","genMockResponse","options","fields","params","requestInitSignal","sleep","promise","_resolve","reject","res","genMockResult","resultItem","offset","seed","faker","genMockValue","genItem","result","total","i","genMockItem","n","item","key","genValue"],"mappings":";AAEA,MAAMA,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,EAAQ,QAAQ;AAG/C,MAFIY,MAAS,OAAIA,IAAO,KAAK,OAAA,IAEzBZ,EAAQ,kBAAkB;AAC7B,WAAAa,EAAM,KAAKD,CAAI,GAERE,EAAad,EAAQ,QAAQ,GAAGC,GAAQC,CAAM;AAGtD,MAAI,MAAM,QAAQF,EAAQ,MAAM,GAAG;AAClC,UAAMe,IAAUf,EAAQ,OAAO,CAAC,GAE1BgB,IAAS,CAAA,GAGTC,IAAQjB,EAAQ,SAASE,GAAQ,SAASJ;AAEhD,aAASoB,IAAI,GAAGA,IAAID,GAAOC;AAC1B,MAAAF,EAAO,KAAKG,EAAYJ,GAASG,GAAGN,GAAMX,GAAQC,CAAM,CAAC;AAG1D,WAAOc;AAAA,EACR;AAEA,SAAOG,EAAYnB,EAAQ,QAAQ,GAAGY,GAAMX,GAAQC,CAAM;AAC3D,GAEaiB,IAAc,CAC1BJ,GACAK,GACAR,GACAX,GACAC,MAC8B;AAC9B,QAAMmB,IAAO,CAAA;AAEb,aAAWC,KAAOP,GAAS;AAC1B,UAAMQ,IAAWR,EAAQO,CAAG;AAE5B,IAAIrB,KAAU,CAACA,EAAO,SAASqB,CAAG,MAGlCT,EAAM,KAAKD,IAAOQ,CAAC,GAEnBC,EAAKC,CAAG,IAAIR,EAAaS,GAAUH,GAAGnB,GAAQC,CAAM;AAAA,EACrD;AAEA,SAAOmB;AACR,GAEaP,IAAe,CAC3BS,GACAH,IAAY,GACZnB,GACAC,MAEOqB,EAASH,GAAGnB,GAAQC,CAAM;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["require","exports"],(function(y,s){"use strict";if(typeof l>"u")var l=window.Vue;const p="__empty_arrays",u=async(a,t,r)=>{const n=document.createElement("form");n.target=r,n.action=a,n.method="post",d(n,t),document.body.appendChild(n),n.submit(),n.remove()},d=(a,t)=>{const r=f(t);for(const[n,e]of r.entries()){if(e instanceof File)throw new Error("Files can not be manual set in `HTMLFormElement`");const o=document.createElement("input");o.name=n,o.value=String(e),a.appendChild(o)}},f=(a,t=new FormData,r)=>{for(const[n,e]of Object.entries(a)){if(e==null)continue;const o=r?`${r}[${n}]`:n;switch(!0){case e instanceof File:t.append(o,e,e.name);break;case e instanceof FileList:for(let i=0;i<e.length;i++){const c=e.item(i);c&&t.append(o+"[]",c,c.name)}break;case e instanceof Blob:t.append(o,e);break;case Array.isArray(e):if(e.length===0){t.append(p+"[]",o);break}e.forEach((i,c)=>{f({[o+"["+c+"]"]:i},t)});break;case e instanceof Date:t.append(o,e.toISOString());break;case typeof e=="object":f(e,t,o);break;default:t.append(o,String(e))}}return t},m=a=>{const t=new URLSearchParams,r=(n,e)=>{if(e!=null){if(Array.isArray(e)){for(const[o,i]of Object.entries(e))r(`${n}[${o}]`,i);return}if(typeof e=="object"){for(const[o,i]of Object.entries(e))r(`${n}[${o}]`,i);return}t.append(n,String(e))}};for(const[n,e]of Object.entries(a))r(n,e);return t.toString()};s.dataToForm=d,s.formDataSerializer=f,s.postInWindow=u,s.querySerializer=m,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
-
//# sourceMappingURL=lazy-DDNqYkXn.amd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-DDNqYkXn.amd.js","sources":["../../src/api/api/utils/lazy.ts"],"sourcesContent":["/**\n * Общие утилиты, которые должны грузиться в отложенном режиме\n *\n * Все такие утилиты являются асинхронными\n */\n\nconst EMPTY_ARRAYS_FIELD_NAME = '__empty_arrays';\n\n/**\n * Выполнить post запрос в окне браузера\n *\n * @see Api.ClientRequest.callInNewWindow\n * @see Api.ClientRequest.callInSelfWindow\n */\nexport const postInWindow = async (url: string, data: Record<string, any>, target: '_blank' | '_self'): Promise<void> => {\n\tconst form = document.createElement('form');\n\tform.target = target;\n\tform.action = url;\n\tform.method = 'post';\n\n\tdataToForm(form, data);\n\n\tdocument.body.appendChild(form);\n\tform.submit();\n\tform.remove();\n};\n\n/**\n * Вставляет данные в HTML форму\n */\nexport const dataToForm = (elForm: HTMLFormElement, data: Record<string, any>): void => {\n\tconst formData = formDataSerializer(data);\n\n\tfor (const [key, value] of formData.entries()) {\n\t\tif (value instanceof File) {\n\t\t\tthrow new Error('Files can not be manual set in `HTMLFormElement`');\n\t\t}\n\n\t\tconst input = document.createElement('input');\n\t\t// input.type = 'hidden';\n\t\tinput.name = key;\n\t\tinput.value = String(value);\n\t\telForm.appendChild(input);\n\t}\n};\n\n/**\n * Сериализация данных в объект FormData\n *\n * Для отправки файлов или генерации форм\n */\nexport const formDataSerializer = (data: Record<string, any>, formData: FormData = new FormData(), parentKey?: string): FormData => {\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tif (value === undefined || value === null) continue;\n\n\t\tconst fieldKey = parentKey ? `${parentKey}[${key}]` : key;\n\n\t\tswitch (true) {\n\t\t\tcase value instanceof File:\n\t\t\t\tformData.append(fieldKey, value, value.name);\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof FileList:\n\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\tconst file = value.item(i);\n\t\t\t\t\tif (file) {\n\t\t\t\t\t\tformData.append(fieldKey + '[]', file, file.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Blob:\n\t\t\t\tformData.append(fieldKey, value);\n\n\t\t\t\tbreak;\n\t\t\tcase Array.isArray(value):\n\t\t\t\tif (value.length === 0) {\n\t\t\t\t\tformData.append(EMPTY_ARRAYS_FIELD_NAME + '[]', fieldKey);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvalue.forEach((item, key) => {\n\t\t\t\t\tformDataSerializer({ [fieldKey + '[' + key + ']']: item }, formData);\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Date:\n\t\t\t\t// для совместимости с JSON.stringify();\n\t\t\t\tformData.append(fieldKey, value.toISOString());\n\n\t\t\t\tbreak;\n\t\t\tcase typeof value === 'object':\n\t\t\t\tformDataSerializer(value, formData, fieldKey);\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformData.append(fieldKey, String(value));\n\t\t}\n\t}\n\n\treturn formData;\n};\n\n/**\n * Сериализация данных для вставки в виде параметров в url\n */\nexport const querySerializer = (data: Record<string, unknown>): string => {\n\tconst searchParams = new URLSearchParams();\n\n\tconst appendParam = (path: string, currentValue: unknown): void => {\n\t\tif (currentValue == null) return;\n\n\t\tif (Array.isArray(currentValue)) {\n\t\t\tfor (const [key, value] of Object.entries(currentValue)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof currentValue === 'object') {\n\t\t\tfor (const [key, value] of Object.entries(currentValue as Record<string, unknown>)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tsearchParams.append(path, String(currentValue));\n\t};\n\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tappendParam(key, value);\n\t}\n\n\treturn searchParams.toString();\n};\n"],"names":["postInWindow","url","data","target","form","dataToForm","elForm","formData","formDataSerializer","key","value","input","parentKey","fieldKey","file","key2","item","querySerializer","searchParams","appendParam","path","currentValue"],"mappings":"mHAcOA,EAAA,MAAAC,EAAAC,EAAAC,IAAA,wCAENC,EAAA,OAAAD,EACAC,EAAA,OAAAH,EACAG,EAAA,OAAA,OAEAC,EAAAD,EAAAF,CAAA,EAEA,SAAA,KAAA,YAAAE,CAAA,uBAGD,EAKOC,EAAA,CAAAC,EAAAJ,IAAA,CACN,MAAAK,EAAAC,EAAAN,CAAA,EAEA,SAAA,CAAAO,EAAAC,CAAA,IAAAH,EAAA,QAAA,EAAA,CACC,GAAAG,aAAA,KACC,MAAA,IAAA,MAAA,kDAAA,0CAKDC,EAAA,KAAAF,EACAE,EAAA,MAAA,OAAAD,CAAA,EACAJ,EAAA,YAAAK,CAAA,EAEF,EAOOH,EAAA,CAAAN,EAAAK,EAAA,IAAA,SAAAK,IAAA,CACN,SAAA,CAAAH,EAAAC,CAAA,IAAA,OAAA,QAAAR,CAAA,EAAA,qBAGC,MAAAW,EAAAD,EAAA,GAAAA,CAAA,IAAAH,CAAA,IAAAA,EAEA,OAAA,GAAA,8EAME,QAAA,EAAA,EAAA,EAAAC,EAAA,OAAA,IAAA,sBAGEH,EAAA,OAAAM,EAAA,KAAAC,EAAAA,EAAA,IAAA,+BAMFP,EAAA,OAAAM,EAAAH,CAAA,QAEA,KAAA,MAAA,QAAAA,CAAA,EAEA,GAAAA,EAAA,SAAA,EAAA,4CAOCF,EAAA,CAAA,CAAAK,EAAA,IAAAE,EAAA,GAAA,EAAAC,CAAA,EAAAT,CAAA,CAAmE,CAAA,iEAQpE,KAAA,OAAAG,GAAA,SAEAF,EAAAE,EAAAH,EAAAM,CAAA,qCAIuC,EAI1C,OAAAN,CACD,EAKOU,EAAAf,GAAA,CACN,MAAAgB,EAAA,IAAA,gBAEAC,EAAA,CAAAC,EAAAC,IAAA,CACC,GAAAA,GAAA,KAEA,IAAA,MAAA,QAAAA,CAAA,EAAA,CACC,SAAA,CAAAZ,EAAAC,CAAA,IAAA,OAAA,QAAAW,CAAA,EACCF,EAAA,GAAAC,CAAA,IAAAX,CAAA,IAAAC,CAAA,SAKF,GAAA,OAAAW,GAAA,SAAA,CACC,SAAA,CAAAZ,EAAAC,CAAA,IAAA,OAAA,QAAAW,CAAA,EACCF,EAAA,GAAAC,CAAA,IAAAX,CAAA,IAAAC,CAAA,+BAK4C,EAG/C,SAAA,CAAAD,EAAAC,CAAA,IAAA,OAAA,QAAAR,CAAA,EACCiB,EAAAV,EAAAC,CAAA,EAGD,OAAAQ,EAAA,SAAA,CACD"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const f = "__empty_arrays", l = async (i, t, r) => {
|
|
2
|
-
const n = document.createElement("form");
|
|
3
|
-
n.target = r, n.action = i, n.method = "post", p(n, t), document.body.appendChild(n), n.submit(), n.remove();
|
|
4
|
-
}, p = (i, t) => {
|
|
5
|
-
const r = c(t);
|
|
6
|
-
for (const [n, e] of r.entries()) {
|
|
7
|
-
if (e instanceof File)
|
|
8
|
-
throw new Error("Files can not be manual set in `HTMLFormElement`");
|
|
9
|
-
const o = document.createElement("input");
|
|
10
|
-
o.name = n, o.value = String(e), i.appendChild(o);
|
|
11
|
-
}
|
|
12
|
-
}, c = (i, t = new FormData(), r) => {
|
|
13
|
-
for (const [n, e] of Object.entries(i)) {
|
|
14
|
-
if (e == null) continue;
|
|
15
|
-
const o = r ? `${r}[${n}]` : n;
|
|
16
|
-
switch (!0) {
|
|
17
|
-
case e instanceof File:
|
|
18
|
-
t.append(o, e, e.name);
|
|
19
|
-
break;
|
|
20
|
-
case e instanceof FileList:
|
|
21
|
-
for (let a = 0; a < e.length; a++) {
|
|
22
|
-
const s = e.item(a);
|
|
23
|
-
s && t.append(o + "[]", s, s.name);
|
|
24
|
-
}
|
|
25
|
-
break;
|
|
26
|
-
case e instanceof Blob:
|
|
27
|
-
t.append(o, e);
|
|
28
|
-
break;
|
|
29
|
-
case Array.isArray(e):
|
|
30
|
-
if (e.length === 0) {
|
|
31
|
-
t.append(f + "[]", o);
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
e.forEach((a, s) => {
|
|
35
|
-
c({ [o + "[" + s + "]"]: a }, t);
|
|
36
|
-
});
|
|
37
|
-
break;
|
|
38
|
-
case e instanceof Date:
|
|
39
|
-
t.append(o, e.toISOString());
|
|
40
|
-
break;
|
|
41
|
-
case typeof e == "object":
|
|
42
|
-
c(e, t, o);
|
|
43
|
-
break;
|
|
44
|
-
default:
|
|
45
|
-
t.append(o, String(e));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return t;
|
|
49
|
-
}, d = (i) => {
|
|
50
|
-
const t = new URLSearchParams(), r = (n, e) => {
|
|
51
|
-
if (e != null) {
|
|
52
|
-
if (Array.isArray(e)) {
|
|
53
|
-
for (const [o, a] of Object.entries(e))
|
|
54
|
-
r(`${n}[${o}]`, a);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (typeof e == "object") {
|
|
58
|
-
for (const [o, a] of Object.entries(e))
|
|
59
|
-
r(`${n}[${o}]`, a);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
t.append(n, String(e));
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
for (const [n, e] of Object.entries(i))
|
|
66
|
-
r(n, e);
|
|
67
|
-
return t.toString();
|
|
68
|
-
};
|
|
69
|
-
export {
|
|
70
|
-
p as dataToForm,
|
|
71
|
-
c as formDataSerializer,
|
|
72
|
-
l as postInWindow,
|
|
73
|
-
d as querySerializer
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=lazy-HKSyLh72.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-HKSyLh72.es.js","sources":["../../src/api/api/utils/lazy.ts"],"sourcesContent":["/**\n * Общие утилиты, которые должны грузиться в отложенном режиме\n *\n * Все такие утилиты являются асинхронными\n */\n\nconst EMPTY_ARRAYS_FIELD_NAME = '__empty_arrays';\n\n/**\n * Выполнить post запрос в окне браузера\n *\n * @see Api.ClientRequest.callInNewWindow\n * @see Api.ClientRequest.callInSelfWindow\n */\nexport const postInWindow = async (url: string, data: Record<string, any>, target: '_blank' | '_self'): Promise<void> => {\n\tconst form = document.createElement('form');\n\tform.target = target;\n\tform.action = url;\n\tform.method = 'post';\n\n\tdataToForm(form, data);\n\n\tdocument.body.appendChild(form);\n\tform.submit();\n\tform.remove();\n};\n\n/**\n * Вставляет данные в HTML форму\n */\nexport const dataToForm = (elForm: HTMLFormElement, data: Record<string, any>): void => {\n\tconst formData = formDataSerializer(data);\n\n\tfor (const [key, value] of formData.entries()) {\n\t\tif (value instanceof File) {\n\t\t\tthrow new Error('Files can not be manual set in `HTMLFormElement`');\n\t\t}\n\n\t\tconst input = document.createElement('input');\n\t\t// input.type = 'hidden';\n\t\tinput.name = key;\n\t\tinput.value = String(value);\n\t\telForm.appendChild(input);\n\t}\n};\n\n/**\n * Сериализация данных в объект FormData\n *\n * Для отправки файлов или генерации форм\n */\nexport const formDataSerializer = (data: Record<string, any>, formData: FormData = new FormData(), parentKey?: string): FormData => {\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tif (value === undefined || value === null) continue;\n\n\t\tconst fieldKey = parentKey ? `${parentKey}[${key}]` : key;\n\n\t\tswitch (true) {\n\t\t\tcase value instanceof File:\n\t\t\t\tformData.append(fieldKey, value, value.name);\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof FileList:\n\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\tconst file = value.item(i);\n\t\t\t\t\tif (file) {\n\t\t\t\t\t\tformData.append(fieldKey + '[]', file, file.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Blob:\n\t\t\t\tformData.append(fieldKey, value);\n\n\t\t\t\tbreak;\n\t\t\tcase Array.isArray(value):\n\t\t\t\tif (value.length === 0) {\n\t\t\t\t\tformData.append(EMPTY_ARRAYS_FIELD_NAME + '[]', fieldKey);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvalue.forEach((item, key) => {\n\t\t\t\t\tformDataSerializer({ [fieldKey + '[' + key + ']']: item }, formData);\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Date:\n\t\t\t\t// для совместимости с JSON.stringify();\n\t\t\t\tformData.append(fieldKey, value.toISOString());\n\n\t\t\t\tbreak;\n\t\t\tcase typeof value === 'object':\n\t\t\t\tformDataSerializer(value, formData, fieldKey);\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformData.append(fieldKey, String(value));\n\t\t}\n\t}\n\n\treturn formData;\n};\n\n/**\n * Сериализация данных для вставки в виде параметров в url\n */\nexport const querySerializer = (data: Record<string, unknown>): string => {\n\tconst searchParams = new URLSearchParams();\n\n\tconst appendParam = (path: string, currentValue: unknown): void => {\n\t\tif (currentValue == null) return;\n\n\t\tif (Array.isArray(currentValue)) {\n\t\t\tfor (const [key, value] of Object.entries(currentValue)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof currentValue === 'object') {\n\t\t\tfor (const [key, value] of Object.entries(currentValue as Record<string, unknown>)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tsearchParams.append(path, String(currentValue));\n\t};\n\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tappendParam(key, value);\n\t}\n\n\treturn searchParams.toString();\n};\n"],"names":["EMPTY_ARRAYS_FIELD_NAME","postInWindow","url","data","target","form","dataToForm","elForm","formData","formDataSerializer","key","value","input","parentKey","fieldKey","i","file","item","querySerializer","searchParams","appendParam","path","currentValue"],"mappings":"AAMA,MAAMA,IAA0B,kBAQnBC,IAAe,OAAOC,GAAaC,GAA2BC,MAA8C;AACxH,QAAMC,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,SAASD,GACdC,EAAK,SAASH,GACdG,EAAK,SAAS,QAEdC,EAAWD,GAAMF,CAAI,GAErB,SAAS,KAAK,YAAYE,CAAI,GAC9BA,EAAK,OAAA,GACLA,EAAK,OAAA;AACN,GAKaC,IAAa,CAACC,GAAyBJ,MAAoC;AACvF,QAAMK,IAAWC,EAAmBN,CAAI;AAExC,aAAW,CAACO,GAAKC,CAAK,KAAKH,EAAS,WAAW;AAC9C,QAAIG,aAAiB;AACpB,YAAM,IAAI,MAAM,kDAAkD;AAGnE,UAAMC,IAAQ,SAAS,cAAc,OAAO;AAE5C,IAAAA,EAAM,OAAOF,GACbE,EAAM,QAAQ,OAAOD,CAAK,GAC1BJ,EAAO,YAAYK,CAAK;AAAA,EACzB;AACD,GAOaH,IAAqB,CAACN,GAA2BK,IAAqB,IAAI,S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B;AAAA,UAAI,MAAM,QAAQA,CAAY,GAAG;AAChC,mBAAW,CAACZ,GAAKC,CAAK,KAAK,OAAO,QAAQW,CAAY;AACrD,UAAAF,EAAY,GAAGC,CAAI,IAAIX,CAAG,KAAKC,CAAK;AAErC;AAAA,MACD;AAEA,UAAI,OAAOW,KAAiB,UAAU;AACrC,mBAAW,CAACZ,GAAKC,CAAK,KAAK,OAAO,QAAQW,CAAuC;AAChF,UAAAF,EAAY,GAAGC,CAAI,IAAIX,CAAG,KAAKC,CAAK;AAErC;AAAA,MACD;AAEA,MAAAQ,EAAa,OAAOE,GAAM,OAAOC,CAAY,CAAC;AAAA;AAAA,EAC/C;AAEA,aAAW,CAACZ,GAAKC,CAAK,KAAK,OAAO,QAAQR,CAAI;AAC7C,IAAAiB,EAAYV,GAAKC,CAAK;AAGvB,SAAOQ,EAAa,SAAA;AACrB;"}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Core as _autoloadCSSCore } from '../core/app.js';
|
|
3
|
-
const fileNames = ['../assets/notice.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
|
-
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
|
-
|
|
6
|
-
import { reactive as N, defineComponent as B, ref as _, computed as H, resolveComponent as z, withDirectives as D, openBlock as l, createElementBlock as a, normalizeClass as E, createElementVNode as M, createCommentVNode as T, createBlock as C, mergeProps as L, Fragment as S, renderList as x, Teleport as j, unref as O, normalizeStyle as V } from "vue";
|
|
7
|
-
import { C as h } from "./forms-DtC-EKJL.es.js";
|
|
8
|
-
import { genIntHash as A, nl2br as F } from "../utils/string.js";
|
|
9
|
-
const y = 300, u = N(/* @__PURE__ */ new Map()), J = (e, i, t) => "top-notice_" + A(e + i + JSON.stringify(t)), oe = (e, i = "info", t) => {
|
|
10
|
-
let d = "";
|
|
11
|
-
e = String(e);
|
|
12
|
-
const f = J(e, i, t);
|
|
13
|
-
if (t?.title)
|
|
14
|
-
d = t.title;
|
|
15
|
-
else {
|
|
16
|
-
const c = e.split(`
|
|
17
|
-
`);
|
|
18
|
-
c.length && (d = String(c.shift()), e = c.join(`
|
|
19
|
-
`));
|
|
20
|
-
}
|
|
21
|
-
const o = u.get(f);
|
|
22
|
-
if (o) {
|
|
23
|
-
U(o);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const r = {
|
|
27
|
-
id: f,
|
|
28
|
-
title: d,
|
|
29
|
-
text: e,
|
|
30
|
-
style: i,
|
|
31
|
-
buttonProps: t?.buttonProps,
|
|
32
|
-
buttonsProps: t?.buttonsProps,
|
|
33
|
-
metaText: t?.metaText,
|
|
34
|
-
isSafeHTML: t?.isSafeHTML,
|
|
35
|
-
selectToClose: t?.selectToClose,
|
|
36
|
-
onClose: t?.onClose
|
|
37
|
-
};
|
|
38
|
-
if (u.set(r.id, r), u.size > 5) {
|
|
39
|
-
const [c, g] = [...u].at(0) || [];
|
|
40
|
-
g && P(g);
|
|
41
|
-
}
|
|
42
|
-
h.state.isMobile && $("input").one("click", () => P(r));
|
|
43
|
-
}, U = (e) => {
|
|
44
|
-
e.hightlight = !0, setTimeout(() => e.hightlight = !1, y);
|
|
45
|
-
}, P = (e) => {
|
|
46
|
-
e.forceClosed = !0, setTimeout(() => {
|
|
47
|
-
e.onClose?.(), u.delete(e.id);
|
|
48
|
-
}, y);
|
|
49
|
-
}, k = (e) => {
|
|
50
|
-
const i = "hacking was detected";
|
|
51
|
-
return e = e.replace(/<script/g, i), e = e.replace(/<img/g, i), e = e.replace(/<iframe/g, i), e = e.replace(/javascript:/g, i), e = e.replace(/<[^>]+ (@|on)\w+=[^>]+>?/g, i), e;
|
|
52
|
-
}, W = { class: "top-notice_itemTextWrapper" }, q = ["innerHTML"], G = ["innerHTML"], K = {
|
|
53
|
-
key: 1,
|
|
54
|
-
class: "top-notice_itemButtons"
|
|
55
|
-
}, Q = ["innerHTML"], R = ["title"], X = /* @__PURE__ */ B({
|
|
56
|
-
__name: "item",
|
|
57
|
-
props: {
|
|
58
|
-
id: {},
|
|
59
|
-
title: {},
|
|
60
|
-
text: {},
|
|
61
|
-
style: {},
|
|
62
|
-
metaText: {},
|
|
63
|
-
buttonProps: {},
|
|
64
|
-
buttonsProps: {},
|
|
65
|
-
isSafeHTML: { type: Boolean },
|
|
66
|
-
hightlight: { type: Boolean },
|
|
67
|
-
selectToClose: { type: Boolean, default: !0 },
|
|
68
|
-
forceClosed: { type: Boolean }
|
|
69
|
-
},
|
|
70
|
-
emits: ["close"],
|
|
71
|
-
setup(e, { emit: i }) {
|
|
72
|
-
const t = e, d = i, f = _(!1);
|
|
73
|
-
setTimeout(() => f.value = !0, 10);
|
|
74
|
-
const o = _(!1), r = _("right"), c = H(() => {
|
|
75
|
-
let n = t.title.replace(/ {2}/g, " ");
|
|
76
|
-
return t.isSafeHTML || (n = k(n)), n;
|
|
77
|
-
}), g = H(() => {
|
|
78
|
-
let n = F(t.text);
|
|
79
|
-
return n = n.replace(/ {2}/g, " "), t.isSafeHTML || (n = k(n)), n;
|
|
80
|
-
}), m = (n) => {
|
|
81
|
-
o.value = !0, n && (r.value = n), setTimeout(() => d("close"), y);
|
|
82
|
-
}, w = (n) => {
|
|
83
|
-
if (!t.selectToClose) return;
|
|
84
|
-
const { tagName: s } = n.target;
|
|
85
|
-
s === "A" && m(), s === "BUTTON" && m();
|
|
86
|
-
}, I = {
|
|
87
|
-
mounted: (n) => {
|
|
88
|
-
if (!h.state.isMobile || !h.$ || !h.$.ui.draggable) return;
|
|
89
|
-
let s = "right";
|
|
90
|
-
h.$(n).draggable({
|
|
91
|
-
revert: !1,
|
|
92
|
-
axis: "x",
|
|
93
|
-
drag: (p, b) => {
|
|
94
|
-
s = b.position.left > 0 ? "right" : "left";
|
|
95
|
-
},
|
|
96
|
-
stop: (p, b) => {
|
|
97
|
-
m(s);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
return (n, s) => {
|
|
103
|
-
const v = z("TopButton");
|
|
104
|
-
return D((l(), a("div", {
|
|
105
|
-
class: E(["top-notice_item", {
|
|
106
|
-
["top-notice_item-" + e.style]: !0,
|
|
107
|
-
"top-notice_item-hightlight": e.hightlight,
|
|
108
|
-
"top-notice_item-showed": f.value,
|
|
109
|
-
"top-notice_item-closed": o.value || e.forceClosed,
|
|
110
|
-
["top-notice_item-closed_" + r.value]: o.value
|
|
111
|
-
}]),
|
|
112
|
-
onClick: w
|
|
113
|
-
}, [
|
|
114
|
-
M("div", W, [
|
|
115
|
-
c.value ? (l(), a("div", {
|
|
116
|
-
key: 0,
|
|
117
|
-
class: "top-notice_itemTitle",
|
|
118
|
-
innerHTML: c.value
|
|
119
|
-
}, null, 8, q)) : T("", !0),
|
|
120
|
-
g.value ? (l(), a("div", {
|
|
121
|
-
key: 1,
|
|
122
|
-
class: "top-notice_itemText",
|
|
123
|
-
innerHTML: g.value
|
|
124
|
-
}, null, 8, G)) : T("", !0)
|
|
125
|
-
]),
|
|
126
|
-
e.buttonProps ? (l(), C(v, L({
|
|
127
|
-
key: 0,
|
|
128
|
-
class: "top-notice_itemButton",
|
|
129
|
-
size: "s"
|
|
130
|
-
}, e.buttonProps, {
|
|
131
|
-
title: e.buttonProps.title,
|
|
132
|
-
innerHTML: e.buttonProps.default,
|
|
133
|
-
onClick: s[0] || (s[0] = (p) => m())
|
|
134
|
-
}), null, 16, ["title", "innerHTML"])) : T("", !0),
|
|
135
|
-
e.buttonsProps?.length ? (l(), a("div", K, [
|
|
136
|
-
(l(!0), a(S, null, x(e.buttonsProps, (p) => (l(), C(v, L({
|
|
137
|
-
class: "top-notice_itemButton",
|
|
138
|
-
size: "s"
|
|
139
|
-
}, { ref_for: !0 }, p, {
|
|
140
|
-
title: p.title,
|
|
141
|
-
innerHTML: p.default,
|
|
142
|
-
onClick: s[1] || (s[1] = (b) => m())
|
|
143
|
-
}), null, 16, ["title", "innerHTML"]))), 256))
|
|
144
|
-
])) : T("", !0),
|
|
145
|
-
e.metaText ? (l(), a("div", {
|
|
146
|
-
key: 2,
|
|
147
|
-
class: "top-notice_itemMetaText",
|
|
148
|
-
innerHTML: e.metaText
|
|
149
|
-
}, null, 8, Q)) : T("", !0),
|
|
150
|
-
M("div", {
|
|
151
|
-
class: "top-notice_itemClose",
|
|
152
|
-
"data-top-icon": "",
|
|
153
|
-
title: n.$i18n.Common.Close,
|
|
154
|
-
onClick: s[2] || (s[2] = () => m())
|
|
155
|
-
}, null, 8, R)
|
|
156
|
-
], 2)), [
|
|
157
|
-
[I]
|
|
158
|
-
]);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}), Y = { class: "top-notice" }, ne = /* @__PURE__ */ B({
|
|
162
|
-
__name: "notice",
|
|
163
|
-
setup(e) {
|
|
164
|
-
const i = (t) => {
|
|
165
|
-
t.onClose?.(), u.delete(t.id);
|
|
166
|
-
};
|
|
167
|
-
return (t, d) => (l(), C(j, { to: "body" }, [
|
|
168
|
-
M("div", Y, [
|
|
169
|
-
(l(!0), a(S, null, x(O(u), ([f, o]) => (l(), C(X, {
|
|
170
|
-
key: o.id,
|
|
171
|
-
id: o.id,
|
|
172
|
-
title: o.title,
|
|
173
|
-
text: o.text,
|
|
174
|
-
style: V(o.style),
|
|
175
|
-
buttonProps: o.buttonProps,
|
|
176
|
-
buttonsProps: o.buttonsProps,
|
|
177
|
-
metaText: o.metaText,
|
|
178
|
-
isSafeHTML: o.isSafeHTML,
|
|
179
|
-
forceClosed: o.forceClosed,
|
|
180
|
-
hightlight: o.hightlight,
|
|
181
|
-
onClose: (r) => i(o)
|
|
182
|
-
}, null, 8, ["id", "title", "text", "style", "buttonProps", "buttonsProps", "metaText", "isSafeHTML", "forceClosed", "hightlight", "onClose"]))), 128))
|
|
183
|
-
])
|
|
184
|
-
]));
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
export {
|
|
188
|
-
ne as default,
|
|
189
|
-
oe as show
|
|
190
|
-
};
|
|
191
|
-
//# sourceMappingURL=notice-BvQl911b.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notice-BvQl911b.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\tbuttonsProps?: ItemProps['buttonsProps'],\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\tbuttonsProps: options?.buttonsProps,\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\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\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:buttonsProps=\"item.buttonsProps\"\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","Core","close","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","_e","ui","_ui","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_createBlock","_component_TopButton","_mergeProps","_hoisted_4","_Fragment","_renderList","buttonProps","$i18n","onCloseItem","_Teleport","_unref","_index","TopNoticeItem","_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B,SAAK,CAAA6C,MAAEN,EAAYvC,CAAI;AAAA,QAAA;;;;;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
define(["require","exports","vue","./forms-DDNzqU6o.amd","../utils/string.amd","../require/css.amd!../assets/notice.css"],(function(j,T,e,f,v){"use strict";if(typeof e>"u")var e=window.Vue;const h=300,r=e.reactive(new Map),M=(t,i,o)=>"top-notice_"+v.genIntHash(t+i+JSON.stringify(o)),y=(t,i="info",o)=>{let u="";t=String(t);const d=M(t,i,o);if(o?.title)u=o.title;else{const a=t.split(`
|
|
2
|
-
`);a.length&&(u=String(a.shift()),t=a.join(`
|
|
3
|
-
`))}const n=r.get(d);if(n){_(n);return}const c={id:d,title:u,text:t,style:i,buttonProps:o?.buttonProps,buttonsProps:o?.buttonsProps,metaText:o?.metaText,isSafeHTML:o?.isSafeHTML,selectToClose:o?.selectToClose,onClose:o?.onClose};if(r.set(c.id,c),r.size>5){const[a,g]=[...r].at(0)||[];g&&B(g)}f.Core.state.isMobile&&$("input").one("click",()=>B(c))},_=t=>{t.hightlight=!0,setTimeout(()=>t.hightlight=!1,h)},B=t=>{t.forceClosed=!0,setTimeout(()=>{t.onClose?.(),r.delete(t.id)},h)},b=t=>{const i="hacking was detected";return t=t.replace(/<script/g,i),t=t.replace(/<img/g,i),t=t.replace(/<iframe/g,i),t=t.replace(/javascript:/g,i),t=t.replace(/<[^>]+ (@|on)\w+=[^>]+>?/g,i),t},L={class:"top-notice_itemTextWrapper"},H=["innerHTML"],P=["innerHTML"],S={key:1,class:"top-notice_itemButtons"},N=["innerHTML"],w=["title"],E=e.defineComponent({__name:"item",props:{id:{},title:{},text:{},style:{},metaText:{},buttonProps:{},buttonsProps:{},isSafeHTML:{type:Boolean},hightlight:{type:Boolean},selectToClose:{type:Boolean,default:!0},forceClosed:{type:Boolean}},emits:["close"],setup(t,{emit:i}){const o=t,u=i,d=e.ref(!1);setTimeout(()=>d.value=!0,10);const n=e.ref(!1),c=e.ref("right"),a=e.computed(()=>{let l=o.title.replace(/ {2}/g," ");return o.isSafeHTML||(l=b(l)),l}),g=e.computed(()=>{let l=v.nl2br(o.text);return l=l.replace(/ {2}/g," "),o.isSafeHTML||(l=b(l)),l}),m=l=>{n.value=!0,l&&(c.value=l),setTimeout(()=>u("close"),h)},I=l=>{if(!o.selectToClose)return;const{tagName:s}=l.target;s==="A"&&m(),s==="BUTTON"&&m()},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:(p,k)=>{s=k.position.left>0?"right":"left"},stop:(p,k)=>{m(s)}})}};return(l,s)=>{const C=e.resolveComponent("TopButton");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["top-notice_item",{["top-notice_item-"+t.style]:!0,"top-notice_item-hightlight":t.hightlight,"top-notice_item-showed":d.value,"top-notice_item-closed":n.value||t.forceClosed,["top-notice_item-closed_"+c.value]:n.value}]),onClick:I},[e.createElementVNode("div",L,[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-notice_itemTitle",innerHTML:a.value},null,8,H)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"top-notice_itemText",innerHTML:g.value},null,8,P)):e.createCommentVNode("",!0)]),t.buttonProps?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,class:"top-notice_itemButton",size:"s"},t.buttonProps,{title:t.buttonProps.title,innerHTML:t.buttonProps.default,onClick:s[0]||(s[0]=p=>m())}),null,16,["title","innerHTML"])):e.createCommentVNode("",!0),t.buttonsProps?.length?(e.openBlock(),e.createElementBlock("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttonsProps,p=>(e.openBlock(),e.createBlock(C,e.mergeProps({class:"top-notice_itemButton",size:"s"},{ref_for:!0},p,{title:p.title,innerHTML:p.default,onClick:s[1]||(s[1]=k=>m())}),null,16,["title","innerHTML"]))),256))])):e.createCommentVNode("",!0),t.metaText?(e.openBlock(),e.createElementBlock("div",{key:2,class:"top-notice_itemMetaText",innerHTML:t.metaText},null,8,N)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-notice_itemClose","data-top-icon":"",title:l.$i18n.Common.Close,onClick:s[2]||(s[2]=()=>m())},null,8,w)],2)),[[z]])}}}),x={class:"top-notice"},V=e.defineComponent({__name:"notice",setup(t){const i=o=>{o.onClose?.(),r.delete(o.id)};return(o,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),([d,n])=>(e.openBlock(),e.createBlock(E,{key:n.id,id:n.id,title:n.title,text:n.text,style:e.normalizeStyle(n.style),buttonProps:n.buttonProps,buttonsProps:n.buttonsProps,metaText:n.metaText,isSafeHTML:n.isSafeHTML,forceClosed:n.forceClosed,hightlight:n.hightlight,onClose:c=>i(n)},null,8,["id","title","text","style","buttonProps","buttonsProps","metaText","isSafeHTML","forceClosed","hightlight","onClose"]))),128))])]))}});T.default=V,T.show=y,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
4
|
-
//# sourceMappingURL=notice-CJ3WOTCM.amd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notice-CJ3WOTCM.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\tbuttonsProps?: ItemProps['buttonsProps'],\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\tbuttonsProps: options?.buttonsProps,\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\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\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:buttonsProps=\"item.buttonsProps\"\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","__props","_hoisted_2","_hoisted_3","_cache","$event","buttonProps","_hoisted_5","_hoisted_6","onCloseItem","_hoisted_1"],"mappings":"yMASOA,EAAAC,EAAA,SAAA,IAAA,GAAA,aAGN,cAAAC,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,CAAA,EAoBMC,EAAA,CAAAH,EAAAC,EAAA,OAAAC,IAAA,UAGNF,EAAA,OAAAA,CAAA,mBAIA,GAAAE,GAAA,MACCE,EAAAF,EAAA,UAAgB;GAIhBG,EAAA,6BAECL,EAAAK,EAAA,KAAA;AAAA,CAAA,+CAWiB,GAAAC,EAClB,MAAAF,EACA,KAAAJ,EACA,MAAAC,EACA,YAAAC,GAAA,YACsB,aAAAA,GAAA,aACC,SAAAA,GAAA,SACJ,WAAAA,GAAA,WACE,cAAAA,GAAA,kCAOtB,iBAAAL,EAAA,KAAA,EAAA,CACC,KAAA,CAAAU,EAAAC,CAAA,EAAA,CAAA,GAAAX,CAAA,EAAA,GAAA,CAAA,GAAA,CAAA,EACAW,GAAAC,EAAAD,CAAA,EAQDE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as d, unref as a, normalizeStyle as m, normalizeClass as r, createElementVNode as s, renderSlot as n, computed as C, resolveDirective as $, createBlock as p, Teleport as h, withDirectives as k, createCommentVNode as g } from "vue";
|
|
2
|
-
import { g as T } from "./dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js";
|
|
3
|
-
import { C as A } from "./forms-DtC-EKJL.es.js";
|
|
4
|
-
import { b as B } from "./utils-BNzP9anP.es.js";
|
|
5
|
-
const W = ["id", "data-view-page-active", "data-modal", "data-position"], G = /* @__PURE__ */ v({
|
|
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(e) {
|
|
19
|
-
const o = T(e.id);
|
|
20
|
-
if (!o)
|
|
21
|
-
throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");
|
|
22
|
-
return f("dialogWorker", o), w(() => {
|
|
23
|
-
const l = b(), t = l.parent;
|
|
24
|
-
if (t?.parent?.type.name !== "DialogWrapper")
|
|
25
|
-
throw new Error("TopDialog cannot be used in a template, use useTopDialog()");
|
|
26
|
-
if (Array.isArray(t.subTree.children) && t.subTree.children.length !== 1)
|
|
27
|
-
throw new Error("TopDialog can has only one root element");
|
|
28
|
-
o.onMounted(t, l);
|
|
29
|
-
}), D(o.isOpened, () => {
|
|
30
|
-
o.isReady.value = !0;
|
|
31
|
-
}, {
|
|
32
|
-
flush: "post",
|
|
33
|
-
once: !0
|
|
34
|
-
}), (l, t) => (i(), d("div", {
|
|
35
|
-
id: a(o).idAttr,
|
|
36
|
-
class: r(["top-dialog", e.classes]),
|
|
37
|
-
style: m({
|
|
38
|
-
"--top-dialog-width": e.width,
|
|
39
|
-
"--top-dialog-height": e.height
|
|
40
|
-
}),
|
|
41
|
-
tabindex: "-1",
|
|
42
|
-
"data-view-page-active": a(o).pageActive.value,
|
|
43
|
-
"data-modal": e.modal,
|
|
44
|
-
"data-position": e.position
|
|
45
|
-
}, [
|
|
46
|
-
t[0] || (t[0] = s("div", { class: "modal-layer modal-layer-header" }, null, -1)),
|
|
47
|
-
s("div", {
|
|
48
|
-
class: "modal-layer modal-layer-body",
|
|
49
|
-
style: m({ "min-height": e.height + "px" })
|
|
50
|
-
}, null, 4),
|
|
51
|
-
n(l.$slots, "default")
|
|
52
|
-
], 14, W));
|
|
53
|
-
}
|
|
54
|
-
}), E = {
|
|
55
|
-
key: 0,
|
|
56
|
-
style: { display: "none" }
|
|
57
|
-
}, N = ["data-order", "data-view-page"], S = { class: "modal-header" }, L = { class: "top-title" }, M = { class: "buttons" }, P = ["title"], z = ["title"], F = ["data-order", "data-view-page"], R = { class: "modal-body" }, H = /* @__PURE__ */ v({
|
|
58
|
-
__name: "page",
|
|
59
|
-
props: {
|
|
60
|
-
isLoading: { type: Boolean },
|
|
61
|
-
name: {},
|
|
62
|
-
order: { default: 0 },
|
|
63
|
-
prevName: {},
|
|
64
|
-
footerFullWith: { type: Boolean }
|
|
65
|
-
},
|
|
66
|
-
setup(e) {
|
|
67
|
-
const c = e, o = B(), l = C(() => ({
|
|
68
|
-
active: o.pageActive?.value === c.name,
|
|
69
|
-
"i-load-data": c.isLoading || o.isLoadingPage.value
|
|
70
|
-
}));
|
|
71
|
-
return (t, u) => {
|
|
72
|
-
const y = $("top-scroll-shadow");
|
|
73
|
-
return a(o).isReady.value ? (i(), d("div", E, [
|
|
74
|
-
(i(), p(h, {
|
|
75
|
-
to: "#" + a(o).idAttr + " .modal-layer-header",
|
|
76
|
-
disabled: !a(o).needShowPage(e.name)
|
|
77
|
-
}, [
|
|
78
|
-
s("div", {
|
|
79
|
-
"data-order": e.order,
|
|
80
|
-
"data-view-page": e.name,
|
|
81
|
-
class: r(l.value)
|
|
82
|
-
}, [
|
|
83
|
-
s("div", S, [
|
|
84
|
-
s("div", L, [
|
|
85
|
-
n(t.$slots, "header")
|
|
86
|
-
]),
|
|
87
|
-
s("div", M, [
|
|
88
|
-
n(t.$slots, "headerButtons")
|
|
89
|
-
]),
|
|
90
|
-
a(A).state.isMobile && e.prevName ? (i(), d("div", {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "close",
|
|
93
|
-
title: t.$i18n.Common.Back,
|
|
94
|
-
"data-top-icon": "",
|
|
95
|
-
onClick: u[0] || (u[0] = (V) => a(o).open(e.prevName))
|
|
96
|
-
}, null, 8, P)) : (i(), d("div", {
|
|
97
|
-
key: 1,
|
|
98
|
-
class: "close",
|
|
99
|
-
title: t.$i18n.Common.Close,
|
|
100
|
-
"data-top-icon": "",
|
|
101
|
-
"data-action": "top-dialog-close"
|
|
102
|
-
}, null, 8, z))
|
|
103
|
-
])
|
|
104
|
-
], 10, N)
|
|
105
|
-
], 8, ["to", "disabled"])),
|
|
106
|
-
(i(), p(h, {
|
|
107
|
-
to: "#" + a(o).idAttr + " .modal-layer-body",
|
|
108
|
-
disabled: !a(o).needShowPage(e.name)
|
|
109
|
-
}, [
|
|
110
|
-
s("div", {
|
|
111
|
-
"data-order": e.order,
|
|
112
|
-
"data-view-page": e.name,
|
|
113
|
-
class: r(["has_scroll_container", l.value]),
|
|
114
|
-
style: m({ "--top-dialog-footer-height": t.$slots.footer ? void 0 : "0px" })
|
|
115
|
-
}, [
|
|
116
|
-
k((i(), d("div", R, [
|
|
117
|
-
n(t.$slots, "body")
|
|
118
|
-
])), [
|
|
119
|
-
[y]
|
|
120
|
-
]),
|
|
121
|
-
t.$slots.footer ? (i(), d("div", {
|
|
122
|
-
key: 0,
|
|
123
|
-
class: r(["modal-footer", {
|
|
124
|
-
"modal-footer-fullWith": e.footerFullWith
|
|
125
|
-
}])
|
|
126
|
-
}, [
|
|
127
|
-
n(t.$slots, "footer")
|
|
128
|
-
], 2)) : g("", !0)
|
|
129
|
-
], 14, F)
|
|
130
|
-
], 8, ["to", "disabled"]))
|
|
131
|
-
])) : g("", !0);
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
export {
|
|
136
|
-
G as _,
|
|
137
|
-
H as a
|
|
138
|
-
};
|
|
139
|
-
//# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js.map
|