@topvisor/ui 1.0.42-popupPosition.0 → 1.1.0-addNativeDialog.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.chunks/{core-BGKb9a73.es.js → core-DyAbOlfX.es.js} +4 -4
- package/.chunks/{core-BGKb9a73.es.js.map → core-DyAbOlfX.es.js.map} +1 -1
- package/.chunks/core-rNR04ITp.amd.js +2 -0
- package/.chunks/{core-D-etXW3Y.amd.js.map → core-rNR04ITp.amd.js.map} +1 -1
- package/.chunks/datepicker-DsKl-YZR.amd.js +2 -0
- package/.chunks/{datepicker-BWaVsTd0.amd.js.map → datepicker-DsKl-YZR.amd.js.map} +1 -1
- package/.chunks/{datepicker-DCDYQmsc.es.js → datepicker-U31BrqE_.es.js} +2 -2
- package/.chunks/{datepicker-DCDYQmsc.es.js.map → datepicker-U31BrqE_.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-BAK6xG6N.es.js → dialog_selectorRegions-BXNEJotg.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-BAK6xG6N.es.js.map → dialog_selectorRegions-BXNEJotg.es.js.map} +1 -1
- package/.chunks/dialog_selectorRegions-D64IfJEs.amd.js +2 -0
- package/.chunks/{dialog_selectorRegions-CMI1gx5d.amd.js.map → dialog_selectorRegions-D64IfJEs.amd.js.map} +1 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js +622 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DIVnPVQ4.es.js.map +1 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-aLCfJKIO.amd.js.map +1 -0
- package/.chunks/field-Cvv0SRcJ.amd.js +2 -0
- package/.chunks/field-Cvv0SRcJ.amd.js.map +1 -0
- package/.chunks/field-CyyFzM-Y.es.js +16 -0
- package/.chunks/field-CyyFzM-Y.es.js.map +1 -0
- package/.chunks/forms-DRhpgERJ.amd.js +3 -0
- package/.chunks/forms-DRhpgERJ.amd.js.map +1 -0
- package/.chunks/{forms-DOGPN_TR.es.js → forms-t2AEUjqg.es.js} +20 -20
- package/.chunks/forms-t2AEUjqg.es.js.map +1 -0
- package/.chunks/lazy-CiM2Ny-s.amd.js +2 -0
- package/.chunks/lazy-CiM2Ny-s.amd.js.map +1 -0
- package/.chunks/lazy-Crun7esL.es.js +39 -0
- package/.chunks/lazy-Crun7esL.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js +184 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B6psuRkm.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C8PDRggQ.amd.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js +110 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-6kqWYFuX.es.js.map +1 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js +2 -0
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DRHk9iBB.amd.js.map +1 -0
- package/.chunks/{notice-DE88Oe-t.es.js → notice-4bdzRXtl.es.js} +2 -2
- package/.chunks/{notice-DE88Oe-t.es.js.map → notice-4bdzRXtl.es.js.map} +1 -1
- package/.chunks/{notice-C5sXcBql.amd.js → notice-DQ9qFyQ2.amd.js} +3 -3
- package/.chunks/{notice-C5sXcBql.amd.js.map → notice-DQ9qFyQ2.amd.js.map} +1 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js +151 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-BVgw26Vp.es.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js +2 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DGHsC5Ii.amd.js.map +1 -0
- package/.chunks/{popup-BjsK_pMZ.es.js → popup-DuraSW2f.es.js} +84 -77
- package/.chunks/popup-DuraSW2f.es.js.map +1 -0
- package/.chunks/popup-IcMnYYXr.amd.js +2 -0
- package/.chunks/popup-IcMnYYXr.amd.js.map +1 -0
- package/.chunks/punycode.es6-CNOnFR2-.amd.js +2 -0
- package/.chunks/{punycode.es6-C2yitnNb.amd.js.map → punycode.es6-CNOnFR2-.amd.js.map} +1 -1
- package/.chunks/punycode.es6-CgGegfA_.es.js +134 -0
- package/.chunks/{punycode.es6-CNI-zL6U.es.js.map → punycode.es6-CgGegfA_.es.js.map} +1 -1
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-YRW59xEF.amd.js +2 -0
- package/.chunks/{store-esTid5oI.amd.js.map → store-YRW59xEF.amd.js.map} +1 -1
- package/.chunks/{utils-CRPkMfKD.es.js → utils-BR_kFG05.es.js} +2 -2
- package/.chunks/{utils-CRPkMfKD.es.js.map → utils-BR_kFG05.es.js.map} +1 -1
- package/.chunks/utils-BVONc_yb.amd.js +2 -0
- package/.chunks/{utils-BVdq18mg.amd.js.map → utils-BVONc_yb.amd.js.map} +1 -1
- package/api/additional.amd.js +2 -0
- package/api/additional.amd.js.map +1 -0
- package/api/additional.js +66 -0
- package/api/additional.js.map +1 -0
- package/api/index.amd.js +2 -0
- package/api/index.amd.js.map +1 -0
- package/api/index.js +265 -0
- package/api/index.js.map +1 -0
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/assets/project.css +1 -1
- package/assets/themes/dark-th.css +1 -1
- package/assets/themes/dark.css +1 -1
- package/assets/themes/light.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +3 -3
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +18 -16
- package/core/app.js.map +1 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.js.map +1 -1
- package/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +409 -320
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +7 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +125 -109
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +30 -21
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +6 -6
- package/project/project.js.map +1 -1
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +1 -1
- package/tabsView/tabsView.js.map +1 -1
- package/types/api/additional.d.ts +2 -0
- package/types/api/api/additional.d.ts +1 -0
- package/types/api/api/client/client.d.ts +55 -0
- package/types/api/api/client/request-options.d.ts +1 -0
- package/types/api/api/client/request.d.ts +2 -0
- package/types/api/api/index.d.ts +12 -0
- package/types/api/api/tests/model.d.ts +0 -0
- package/types/api/api/tests/test.d.ts +16 -0
- package/types/api/api/types/api.d.ts +139 -0
- package/types/api/api/types/client/client.d.ts +8 -0
- package/types/api/api/types/client/middleware.d.ts +65 -0
- package/types/api/api/types/client/options.d.ts +60 -0
- package/types/api/api/types/client/request-context.d.ts +35 -0
- package/types/api/api/types/client/request-options.d.ts +73 -0
- package/types/api/api/types/client/request.d.ts +85 -0
- package/types/api/api/types/ext.d.ts +51 -0
- package/types/api/api/types/field.d.ts +33 -0
- package/types/api/api/types/index.d.ts +12 -0
- package/types/api/api/types/schema.d.ts +50 -0
- package/types/api/api/types/tv.d.ts +59 -0
- package/types/api/api/types/utils.d.ts +51 -0
- package/types/api/api/utils/common.d.ts +16 -0
- package/types/api/api/utils/field.d.ts +8 -0
- package/types/api/api/utils/filters.d.ts +48 -0
- package/types/api/api/utils/lazy.d.ts +17 -0
- package/types/api/index.d.ts +2 -0
- package/{components → types/components}/dialog/dialog/dialog.vue.d.ts +2 -2
- package/{components → types/components}/dialog/lib/types.d.ts +2 -2
- package/types/components/dialog/lib/utils.d.ts +45 -0
- package/{components → types/components}/dialog/lib/worker.d.ts +2 -2
- package/{components → types/components}/forms/button/button.vue.d.ts +2 -5
- package/{components → types/components}/forms/button/types.d.ts +10 -0
- package/{components → types/components}/forms/checkbox/checkbox.vue.d.ts +2 -2
- package/types/components/formsExt/policy/policy.vue.d.ts +8 -0
- package/types/components/formsExt/policy/types.d.ts +20 -0
- package/{components → types/components}/formsExt/selector2/composables/useAPI.d.ts +1 -1
- package/{components → types/components}/formsExt/selector2/composables/useMenu.d.ts +3 -1
- package/{components → types/components}/formsExt/selector2/selector2.vue.d.ts +11 -3
- package/{components → types/components}/formsExt/selector2/types.d.ts +50 -27
- package/types/components/popup/alert/alert.vue.d.ts +25 -0
- package/types/components/popup/alert/types.d.ts +8 -0
- package/types/components/popup/confirm/confirm.vue.d.ts +26 -0
- package/{components → types/components}/popup/confirm/types.d.ts +2 -2
- package/{components → types/components}/popup/lib/popup.d.ts +6 -2
- package/{components → types/components}/popup/lib/worker.d.ts +6 -4
- package/types/components/popup/popup/opener.vue.d.ts +17 -0
- package/types/components/popup/popup/popup.vue.d.ts +38 -0
- package/{components → types/components}/popup/popup/types.d.ts +20 -11
- package/types/components/popup/prompt/prompt.vue.d.ts +26 -0
- package/{components → types/components}/popup/prompt/types.d.ts +2 -2
- package/{components → types/components}/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +1 -1
- package/{components → types/components}/project/selectorRegion/utils/utils.d.ts +1 -1
- package/{core → types/core}/utils/string.d.ts +1 -1
- package/types/for-delete/dark-positions.d.ts +1 -0
- package/types/for-delete/dark-th-positions.d.ts +1 -0
- package/types/for-delete/dark-th.d.ts +1 -0
- package/types/for-delete/dark.d.ts +1 -0
- package/types/for-delete/light-positions.d.ts +1 -0
- package/types/for-delete/light.d.ts +1 -0
- package/types/forms/helpers.d.ts +1 -0
- package/utils/check.amd.js +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +2 -2
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/dom.amd.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +2 -2
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/number.amd.js +1 -1
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +3 -3
- package/utils/searchers.js.map +1 -1
- package/utils/store.amd.js +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +34 -30
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +2 -2
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js +1 -1
- package/utils/url.js.map +1 -1
- package/.chunks/core-D-etXW3Y.amd.js +0 -2
- package/.chunks/datepicker-BWaVsTd0.amd.js +0 -2
- package/.chunks/dialog_selectorRegions-CMI1gx5d.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js +0 -2
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js.map +0 -1
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js +0 -322
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js.map +0 -1
- package/.chunks/forms-DOGPN_TR.es.js.map +0 -1
- package/.chunks/forms-Gb7ujpmz.amd.js +0 -3
- package/.chunks/forms-Gb7ujpmz.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js +0 -181
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js +0 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js +0 -109
- package/.chunks/menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js +0 -143
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js.map +0 -1
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js +0 -2
- package/.chunks/page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js.map +0 -1
- package/.chunks/popup-B_8bvIsF.amd.js +0 -2
- package/.chunks/popup-B_8bvIsF.amd.js.map +0 -1
- package/.chunks/popup-BjsK_pMZ.es.js.map +0 -1
- package/.chunks/punycode.es6-C2yitnNb.amd.js +0 -2
- package/.chunks/punycode.es6-CNI-zL6U.es.js +0 -134
- package/.chunks/store-esTid5oI.amd.js +0 -2
- package/.chunks/utils-BVdq18mg.amd.js +0 -2
- package/.chunks/utils-CacKxWvO.es.js +0 -303
- package/.chunks/utils-CacKxWvO.es.js.map +0 -1
- package/.chunks/utils-DiQZv1Ae.amd.js +0 -2
- package/.chunks/utils-DiQZv1Ae.amd.js.map +0 -1
- package/components/charts/miniChart/stories/dummy.d.ts +0 -13
- package/components/charts/miniCharts/stories/dummy.d.ts +0 -6
- package/components/dialog/dialog/stories/autoload.d.ts +0 -2
- package/components/dialog/lib/utils.d.ts +0 -14
- package/components/forms/select/stories/exampleOptions.d.ts +0 -5
- package/components/formsExt/checkboxGroup/stories/example.d.ts +0 -15
- package/components/formsExt/menu/stories/items.d.ts +0 -3
- package/components/formsExt/policy/policy.vue.d.ts +0 -4
- package/components/formsExt/policy/types.d.ts +0 -10
- package/components/formsExt/radioGroup/stories/example.d.ts +0 -20
- package/components/formsExt/selector2/stories/dummyAPIRequest.d.ts +0 -10
- package/components/popup/alert/alert.vue.d.ts +0 -31
- package/components/popup/alert/types.d.ts +0 -8
- package/components/popup/confirm/confirm.vue.d.ts +0 -33
- package/components/popup/popup/opener.vue.d.ts +0 -23
- package/components/popup/popup/popup.vue.d.ts +0 -40
- package/components/popup/prompt/prompt.vue.d.ts +0 -33
- package/components/project/selectorCompetitors/stories/items.d.ts +0 -3
- package/components/project/selectorRegion/stories/searchers.d.ts +0 -3
- package/icomoon/Topvisor icons.json +0 -6635
- package/{charts → types/charts}/charts.d.ts +0 -0
- package/{components → types/components}/charts/charts.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/miniChart.vue.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/types.d.ts +0 -0
- package/{components → types/components}/charts/miniChart/utils/consts.d.ts +0 -0
- package/{components → types/components}/charts/miniCharts/miniCharts.d.ts +0 -0
- package/{components → types/components}/charts/miniCharts/miniCharts.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/item/item.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/item/types.d.ts +0 -0
- package/{components → types/components}/core/notice/notice.vue.d.ts +0 -0
- package/{components → types/components}/core/notice/types.d.ts +0 -0
- package/{components → types/components}/core/notice/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/asyncDialogHandle.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/dialogHandle.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/composables/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/dialogs/dialogs.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/page/page.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/page/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/pageComponent/pageComponent.vue.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/pageComponent/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -0
- package/{components → types/components}/dialog/dialog/types.d.ts +0 -0
- package/{components → types/components}/dialog/dialog.d.ts +0 -0
- package/{components → types/components}/dialog/lib/utils.globalEvents.d.ts +0 -0
- package/{components → types/components}/extra/extra.d.ts +0 -0
- package/{components → types/components}/extra/rive/rive.vue.d.ts +0 -0
- package/{components → types/components}/extra/rive/types.d.ts +0 -0
- package/{components → types/components}/forms/avatar/avatar.vue.d.ts +1 -1
- /package/{components → types/components}/forms/avatar/types.d.ts +0 -0
- /package/{components → types/components}/forms/caption/caption.vue.d.ts +0 -0
- /package/{components → types/components}/forms/caption/types.d.ts +0 -0
- /package/{components → types/components}/forms/checkbox/types.d.ts +0 -0
- /package/{components → types/components}/forms/controlLabel/controlLabel.vue.d.ts +0 -0
- /package/{components → types/components}/forms/controlLabel/types.d.ts +0 -0
- /package/{components → types/components}/forms/forms.d.ts +0 -0
- /package/{components → types/components}/forms/helpers.d.ts +0 -0
- /package/{components → types/components}/forms/hint/hint.vue.d.ts +0 -0
- /package/{components → types/components}/forms/hint/types.d.ts +0 -0
- /package/{components → types/components}/forms/input/input.vue.d.ts +0 -0
- /package/{components → types/components}/forms/input/types.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/datepicker.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/inputDate.vue.d.ts +0 -0
- /package/{components → types/components}/forms/inputDate/types.d.ts +0 -0
- /package/{components → types/components}/forms/inputRange/inputRange.vue.d.ts +0 -0
- /package/{components → types/components}/forms/inputRange/types.d.ts +0 -0
- /package/{components → types/components}/forms/loadbar/loadbar.vue.d.ts +0 -0
- /package/{components → types/components}/forms/preloader/preloader.vue.d.ts +0 -0
- /package/{components → types/components}/forms/preloader/types.d.ts +0 -0
- /package/{components → types/components}/forms/radio/radio.vue.d.ts +0 -0
- /package/{components → types/components}/forms/radio/types.d.ts +0 -0
- /package/{components → types/components}/forms/select/select.vue.d.ts +0 -0
- /package/{components → types/components}/forms/select/types.d.ts +0 -0
- /package/{components → types/components}/forms/switcher/switcher.vue.d.ts +0 -0
- /package/{components → types/components}/forms/switcher/types.d.ts +0 -0
- /package/{components → types/components}/forms/textarea/textarea.vue.d.ts +0 -0
- /package/{components → types/components}/forms/textarea/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/checkboxGroup/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/editArea/editArea.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/editArea/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/editInput/editInput.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/editInput/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/formsExt.d.ts +0 -0
- /package/{components → types/components}/formsExt/info/info.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/info/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/menu/menu.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/menu/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/radioGroup/radioGroup.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/radioGroup/types.d.ts +0 -0
- /package/{components → types/components}/formsExt/selector2/itemMulti.vue.d.ts +0 -0
- /package/{components → types/components}/formsExt/selector2/utils.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRows.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsRow/types.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/islandRowsSubTitle/islandRowsSubTitle.vue.d.ts +0 -0
- /package/{components → types/components}/layout/islandRows/types.d.ts +0 -0
- /package/{components → types/components}/layout/layout.d.ts +0 -0
- /package/{components → types/components}/layout/rows/rows.vue.d.ts +0 -0
- /package/{components → types/components}/layout/rows/types.d.ts +0 -0
- /package/{components → types/components}/popup/lib/popup.globalEvents.d.ts +0 -0
- /package/{components → types/components}/popup/lib/worker.globalEvents.d.ts +0 -0
- /package/{components → types/components}/popup/popup/listItem.vue.d.ts +0 -0
- /package/{components → types/components}/popup/popup/widgetInput.vue.d.ts +0 -0
- /package/{components → types/components}/popup/popup.d.ts +0 -0
- /package/{components → types/components}/popup/worker.d.ts +0 -0
- /package/{components → types/components}/project/project.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/composables.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/selectorCompetitors.vue.d.ts +0 -0
- /package/{components → types/components}/project/selectorCompetitors/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/compare.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectRegion.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectSearcher.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/composables/selectorRegion.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/dialog_selectorRegions/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/selectorRegion.vue.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/types.d.ts +0 -0
- /package/{components → types/components}/project/selectorRegion/utils/consts.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupListItem/tagPopupListItem.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupListItem/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupOpener/popupOpener.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/popupOpener/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagIcon/tagIcon.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagIcon/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagSelector.vue.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/tagsDefaults.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/types.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/utils/el.d.ts +0 -0
- /package/{components → types/components}/project/tagSelector/utils/utils.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/content.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/tab.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/tabs.vue.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs/types.d.ts +0 -0
- /package/{components → types/components}/tabs/tabs.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menu.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuDelimeter.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuItem.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/menuTitle.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/store.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/tabsView.vue.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/types.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView/utils.d.ts +0 -0
- /package/{components → types/components}/tabsView/tabsView.d.ts +0 -0
- /package/{core → types/core}/app.d.ts +0 -0
- /package/{core → types/core}/core/core.d.ts +0 -0
- /package/{core → types/core}/core/events/resize.d.ts +0 -0
- /package/{core → types/core}/core/events.d.ts +0 -0
- /package/{core → types/core}/core/options.d.ts +0 -0
- /package/{core → types/core}/core/preloaders.d.ts +0 -0
- /package/{core → types/core}/core/state.d.ts +0 -0
- /package/{core → types/core}/directives/data.d.ts +0 -0
- /package/{core → types/core}/directives/focus.d.ts +0 -0
- /package/{core → types/core}/directives/preloader.d.ts +0 -0
- /package/{core → types/core}/directives/scrollIntoView.d.ts +0 -0
- /package/{core → types/core}/directives/scrollShadow.d.ts +0 -0
- /package/{core → types/core}/directives/sticky.d.ts +0 -0
- /package/{core → types/core}/directives/swimUp.d.ts +0 -0
- /package/{core → types/core}/directives/tooltip.d.ts +0 -0
- /package/{core → types/core}/plugins/core.d.ts +0 -0
- /package/{core → types/core}/plugins/i18n.d.ts +0 -0
- /package/{core → types/core}/plugins/piniaTPA.d.ts +0 -0
- /package/{core → types/core}/utils/check.d.ts +0 -0
- /package/{core → types/core}/utils/clipboard.d.ts +0 -0
- /package/{core → types/core}/utils/date.d.ts +0 -0
- /package/{core → types/core}/utils/device.d.ts +0 -0
- /package/{core → types/core}/utils/dom.d.ts +0 -0
- /package/{core → types/core}/utils/image.d.ts +0 -0
- /package/{core → types/core}/utils/keyboard.d.ts +0 -0
- /package/{core → types/core}/utils/lodash.d.ts +0 -0
- /package/{core → types/core}/utils/number.d.ts +0 -0
- /package/{core → types/core}/utils/price.d.ts +0 -0
- /package/{core → types/core}/utils/route.d.ts +0 -0
- /package/{core → types/core}/utils/scroll.d.ts +0 -0
- /package/{core → types/core}/utils/searchers.d.ts +0 -0
- /package/{core → types/core}/utils/store/localStorage.d.ts +0 -0
- /package/{core → types/core}/utils/store/plugin.d.ts +0 -0
- /package/{core → types/core}/utils/store/store.d.ts +0 -0
- /package/{core → types/core}/utils/store.d.ts +0 -0
- /package/{core → types/core}/utils/system.d.ts +0 -0
- /package/{core → types/core}/utils/url.d.ts +0 -0
- /package/{dialog → types/dialog}/dialog.d.ts +0 -0
- /package/{extra → types/extra}/extra.d.ts +0 -0
- /package/{forms/helpers.d.ts → types/for-delete/core.d.ts} +0 -0
- /package/{forms → types/forms}/forms.d.ts +0 -0
- /package/{formsExt → types/formsExt}/formsExt.d.ts +0 -0
- /package/{layout → types/layout}/layout.d.ts +0 -0
- /package/{popup → types/popup}/popup.d.ts +0 -0
- /package/{popup → types/popup}/worker.d.ts +0 -0
- /package/{project → types/project}/project.d.ts +0 -0
- /package/{tabs → types/tabs}/tabs.d.ts +0 -0
- /package/{tabsView → types/tabsView}/tabsView.d.ts +0 -0
- /package/{utils → types/utils}/check.d.ts +0 -0
- /package/{utils → types/utils}/clipboard.d.ts +0 -0
- /package/{utils → types/utils}/date.d.ts +0 -0
- /package/{utils → types/utils}/device.d.ts +0 -0
- /package/{utils → types/utils}/dom.d.ts +0 -0
- /package/{utils → types/utils}/image.d.ts +0 -0
- /package/{utils → types/utils}/keyboard.d.ts +0 -0
- /package/{utils → types/utils}/lodash.d.ts +0 -0
- /package/{utils → types/utils}/number.d.ts +0 -0
- /package/{utils → types/utils}/price.d.ts +0 -0
- /package/{utils → types/utils}/route.d.ts +0 -0
- /package/{utils → types/utils}/scroll.d.ts +0 -0
- /package/{utils → types/utils}/searchers.d.ts +0 -0
- /package/{utils → types/utils}/store.d.ts +0 -0
- /package/{utils → types/utils}/string.d.ts +0 -0
- /package/{utils → types/utils}/system.d.ts +0 -0
- /package/{utils → types/utils}/url.d.ts +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
type Middleware = {
|
|
4
|
+
onRequest: MiddlewareOnRequest;
|
|
5
|
+
onResponse?: MiddlewareOnResponse;
|
|
6
|
+
onError?: MiddlewareOnError;
|
|
7
|
+
} | {
|
|
8
|
+
onRequest?: MiddlewareOnRequest;
|
|
9
|
+
onResponse: MiddlewareOnResponse;
|
|
10
|
+
onError?: MiddlewareOnError;
|
|
11
|
+
} | {
|
|
12
|
+
onRequest?: MiddlewareOnRequest;
|
|
13
|
+
onResponse?: MiddlewareOnResponse;
|
|
14
|
+
onError: MiddlewareOnError;
|
|
15
|
+
};
|
|
16
|
+
type MiddlewareOnRequest = (ctx: MiddlewareCallbackParams) => void | globalThis.Request | globalThis.Response | undefined | Promise<globalThis.Request | globalThis.Response | undefined | void>;
|
|
17
|
+
type MiddlewareOnResponse = (ctx: MiddlewareCallbackParams & {
|
|
18
|
+
response: globalThis.Response;
|
|
19
|
+
}) => void | globalThis.Response | undefined | Promise<globalThis.Response | undefined | void>;
|
|
20
|
+
type MiddlewareOnError = (ctx: MiddlewareCallbackParams & {
|
|
21
|
+
error: unknown;
|
|
22
|
+
}) => void | globalThis.Response | Error | Promise<void | globalThis.Response | Error>;
|
|
23
|
+
type MiddlewareCallbackParams = {
|
|
24
|
+
readonly useExt: Api.Ext.UseExt;
|
|
25
|
+
readonly requestOptions: Api.ClientRequestOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Параметры запроса
|
|
28
|
+
*
|
|
29
|
+
* Для модификации параметров запроса используйте настройку клиента: `onPrepareData`
|
|
30
|
+
*
|
|
31
|
+
* @see Api.ClientOptions.onPrepareData
|
|
32
|
+
*/
|
|
33
|
+
readonly data: Readonly<Record<string, any>>;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительная информация о запросе
|
|
36
|
+
*
|
|
37
|
+
* Только для middleware
|
|
38
|
+
*/
|
|
39
|
+
middlewareData: Record<string, any>;
|
|
40
|
+
/**
|
|
41
|
+
* Основные параметры клиента API
|
|
42
|
+
*/
|
|
43
|
+
readonly options: Api.BaseOptions;
|
|
44
|
+
/**
|
|
45
|
+
* Путь схемы OpenAPI
|
|
46
|
+
*/
|
|
47
|
+
readonly schemaPath: Api.PathAbstract;
|
|
48
|
+
/**
|
|
49
|
+
* Уникальный идентификатор этого запроса
|
|
50
|
+
*/
|
|
51
|
+
readonly id: string;
|
|
52
|
+
/**
|
|
53
|
+
* Объект запроса, который будет использоваться в `fetch()`
|
|
54
|
+
*/
|
|
55
|
+
request: globalThis.Request;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Ошибка при разборе результата API
|
|
59
|
+
*/
|
|
60
|
+
type FormatError = (SyntaxError | TypeError) & {
|
|
61
|
+
responseText?: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
/**
|
|
4
|
+
* Опции клиента API
|
|
5
|
+
*
|
|
6
|
+
* Опции применяются для всех запросов
|
|
7
|
+
*/
|
|
8
|
+
interface ClientOptions extends BaseOptions, RequestInit {
|
|
9
|
+
/**
|
|
10
|
+
* Расширенные настройки выполнения запроса по умолчанию для всех запросов API клиента
|
|
11
|
+
*/
|
|
12
|
+
requestOptions: Partial<Api.ClientRequestOptions>;
|
|
13
|
+
/**
|
|
14
|
+
* Хук, для модификации параметров запроса
|
|
15
|
+
*
|
|
16
|
+
* Данные `data` безопасно меняются по ссылке
|
|
17
|
+
*
|
|
18
|
+
* Используется перед созданием объекта запроса `Request`
|
|
19
|
+
*
|
|
20
|
+
* Является более оптимальным решением, чем пересоздание запроса через middleware `onRequest()`
|
|
21
|
+
*/
|
|
22
|
+
onPrepareData?: (data: Record<string, any>, options: Omit<Api.MiddlewareCallbackParams, 'request'>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Выводить ли информацию о перехваченных ошибках API с помощью `console`
|
|
25
|
+
*
|
|
26
|
+
* Только при использовании `useExt`
|
|
27
|
+
*
|
|
28
|
+
* @see console
|
|
29
|
+
*/
|
|
30
|
+
useApiConsole?: boolean;
|
|
31
|
+
}
|
|
32
|
+
type BaseOptions = {
|
|
33
|
+
/**
|
|
34
|
+
* Базовый URL для всех API-запросов
|
|
35
|
+
*/
|
|
36
|
+
baseUrl?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Глобальный сериализатор query-параметров
|
|
39
|
+
*/
|
|
40
|
+
querySerializer: (input: Record<string, any>) => Promise<string> | string;
|
|
41
|
+
/**
|
|
42
|
+
* Глобальный сериализатор тела запроса
|
|
43
|
+
*/
|
|
44
|
+
bodySerializer: (input: Record<string, any>) => string;
|
|
45
|
+
/**
|
|
46
|
+
* Пользовательский реализация `Request`
|
|
47
|
+
*
|
|
48
|
+
* @see Request
|
|
49
|
+
*/
|
|
50
|
+
Request: typeof Request;
|
|
51
|
+
/**
|
|
52
|
+
* Пользовательская реализация `fetch`
|
|
53
|
+
*
|
|
54
|
+
* @see fetch
|
|
55
|
+
*/
|
|
56
|
+
fetch: (input: RequestInfo, init?: RequestInit) => Promise<globalThis.Response>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
/**
|
|
4
|
+
* Контекст выполнения запросов
|
|
5
|
+
*/
|
|
6
|
+
interface ClientRequestContext<Paths extends Api.PathsAbstract, Path extends Api.Path<Paths>, UseExt extends Api.Ext.UseExt> {
|
|
7
|
+
/**
|
|
8
|
+
* @see Api.PathsAbstract
|
|
9
|
+
*/
|
|
10
|
+
Paths: Paths;
|
|
11
|
+
/**
|
|
12
|
+
* @see Api.Path
|
|
13
|
+
*/
|
|
14
|
+
Path: Path;
|
|
15
|
+
/**
|
|
16
|
+
* @see Api.Ext.UseExt
|
|
17
|
+
*/
|
|
18
|
+
UseExt: UseExt;
|
|
19
|
+
/**
|
|
20
|
+
* Схема API метода
|
|
21
|
+
*
|
|
22
|
+
* @see Api.PathsAbstract
|
|
23
|
+
* @see https://learn.openapis.org/specification/paths.html#the-path-item-object
|
|
24
|
+
* @see https://spec.openapis.org/oas/v3.1.0#path-item-object
|
|
25
|
+
*/
|
|
26
|
+
Schema: Paths[Path];
|
|
27
|
+
Oper: UseExt extends true ? Api.Oper<Paths, Path> : never;
|
|
28
|
+
Model: Api.Model<Paths, Path>;
|
|
29
|
+
ParamsFetchStyle: [Api.Model<Paths, Path>] extends [never] ? never : Api.ParamsOriginalByPath<Paths, Path> extends {
|
|
30
|
+
fetch_style?: any;
|
|
31
|
+
} ? Api.Ext.Schemas['FetchStyle'] : never;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
/**
|
|
4
|
+
* Расширенные настройки выполнения запроса
|
|
5
|
+
*/
|
|
6
|
+
interface ClientRequestOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Элемент, который получит статус загрузки
|
|
9
|
+
*
|
|
10
|
+
* Для использования в хуке `onLoading()`
|
|
11
|
+
*/
|
|
12
|
+
loadingEl: HTMLElement;
|
|
13
|
+
/**
|
|
14
|
+
* Отображать ли индикатор загрузки
|
|
15
|
+
*
|
|
16
|
+
* Для использования в хуке `onLoading()`
|
|
17
|
+
*/
|
|
18
|
+
loadingShowSpinner: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Событие смены статуса загрузки
|
|
21
|
+
*/
|
|
22
|
+
onLoading?: (isLoading: boolean, ctx: Api.MiddlewareCallbackParams) => void | Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Событие, которое сработает при получении результата API
|
|
25
|
+
*
|
|
26
|
+
* Не путать с результатами `fetch()`
|
|
27
|
+
*
|
|
28
|
+
* Только при использовании `useExt`
|
|
29
|
+
*/
|
|
30
|
+
onApiLoaded?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams) => void | Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Событие, которое сработает при получении ошибки API в `res.errors`
|
|
33
|
+
*
|
|
34
|
+
* Не путать с ошибками `fetch()`
|
|
35
|
+
*
|
|
36
|
+
* Только при использовании `useExt`
|
|
37
|
+
*
|
|
38
|
+
* При переопределении на уровне запроса API, вы можете переиспользовать ранее определенное событие на уровне API клиента:
|
|
39
|
+
* ```
|
|
40
|
+
* onApiError = (res, ctx, prevOnError) => prevOnApiError?.(res, ctx);
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see createClient
|
|
44
|
+
*/
|
|
45
|
+
onApiError?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams & {
|
|
46
|
+
formatError?: FormatError;
|
|
47
|
+
}, prevOnApiError?: this['onApiError']) => void | Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Событие, которое сработает при получении сообщения API в `res.messages`
|
|
50
|
+
*
|
|
51
|
+
* Только при использовании `useExt`
|
|
52
|
+
*/
|
|
53
|
+
onApiMessage?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams) => void | Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Отклонить предыдущий запрос, если запрошен новый с таким же значением `checkFingerprint`
|
|
56
|
+
*
|
|
57
|
+
* В этом случае запрос вернет результат с ошибкой соединения с кодом `0`
|
|
58
|
+
*/
|
|
59
|
+
checkFingerprint?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Метод HTTP запроса
|
|
62
|
+
*
|
|
63
|
+
* @see https://developer.mozilla.org/ru/docs/Web/HTTP/Reference/Methods
|
|
64
|
+
*/
|
|
65
|
+
method: 'GET' | 'POST';
|
|
66
|
+
/**
|
|
67
|
+
* Ожидаемый тип контента в ответе
|
|
68
|
+
*/
|
|
69
|
+
accept: 'application/json' | 'text/csv';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
/**
|
|
4
|
+
* Объект с запросом к конкретному методу API
|
|
5
|
+
*/
|
|
6
|
+
interface ClientRequest<RequestContext extends Api.ClientRequestContext<any, any, any>, FieldsNarrow extends Api.ParamsFields<RequestContext> | undefined = undefined, Params extends Api.Params<RequestContext> = Api.Params<RequestContext>, ParamsFieldsNarrowed extends Api.PropIfExists<Params, 'fields'> = Api.PropIfExists<Params, 'fields'>> {
|
|
7
|
+
/**
|
|
8
|
+
* Имя метода
|
|
9
|
+
*/
|
|
10
|
+
readonly path: Api.PathAbstract;
|
|
11
|
+
/**
|
|
12
|
+
* Url для обращения к методу API
|
|
13
|
+
*
|
|
14
|
+
* Не включает параметры запроса
|
|
15
|
+
*/
|
|
16
|
+
readonly url: string;
|
|
17
|
+
/**
|
|
18
|
+
* Параметры метода API
|
|
19
|
+
*/
|
|
20
|
+
params: Omit<Params, 'fields'> & (Params extends {
|
|
21
|
+
fields: any;
|
|
22
|
+
} ? Readonly<Pick<Params, 'fields'>> : {});
|
|
23
|
+
/**
|
|
24
|
+
* Опции запроса
|
|
25
|
+
*/
|
|
26
|
+
options: Api.ClientRequestOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Признак загрузки
|
|
29
|
+
*/
|
|
30
|
+
inLoading: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Получить флаг загрузки
|
|
33
|
+
*/
|
|
34
|
+
getInLoading(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Переназначить параметры запроса
|
|
37
|
+
*
|
|
38
|
+
* Полностью заменит предыдущее значение параметров
|
|
39
|
+
*/
|
|
40
|
+
setParams(params: Omit<Params, 'fields' | 'fetch_style'>): this;
|
|
41
|
+
/**
|
|
42
|
+
* Изменить параметры запроса
|
|
43
|
+
*/
|
|
44
|
+
changeParams(params: Partial<Omit<Params, 'fields' | 'fetch_style'>>): this;
|
|
45
|
+
/**
|
|
46
|
+
* Установить расширенные настройки запроса
|
|
47
|
+
*/
|
|
48
|
+
setOptions(options: Partial<Api.ClientRequestOptions>): this;
|
|
49
|
+
/**
|
|
50
|
+
* Выполнить обращение к методу API
|
|
51
|
+
*/
|
|
52
|
+
call<Fields extends ParamsFieldsNarrowed & FieldsNarrow>(fields?: Fields): Promise<RequestContext['UseExt'] extends true ? Api.Response<RequestContext, Fields> : Api.ResponseOriginal<RequestContext>>;
|
|
53
|
+
/**
|
|
54
|
+
* Выполнить обращение к методу API с указанием `fetchStyle`
|
|
55
|
+
*/
|
|
56
|
+
callFetch: <Fields extends ParamsFieldsNarrowed & FieldsNarrow, FetchStyle extends RequestContext['ParamsFetchStyle']>(fetchStyle: FetchStyle, fields?: Fields) => Promise<Api.Response<RequestContext, Fields, FetchStyle>>;
|
|
57
|
+
/**
|
|
58
|
+
* Выполнить обращение к методу API в новом окне
|
|
59
|
+
*
|
|
60
|
+
* Примеры использования:
|
|
61
|
+
* - скачивание файлов
|
|
62
|
+
* - печать документов
|
|
63
|
+
*/
|
|
64
|
+
callInNewWindow(fields?: ParamsFieldsNarrowed & FieldsNarrow): void;
|
|
65
|
+
/**
|
|
66
|
+
* Выполнить обращение к методу API в текущем окне
|
|
67
|
+
*
|
|
68
|
+
* Примеры использования:
|
|
69
|
+
* - переход на станицу интеграции, OAuth
|
|
70
|
+
* - открытие формы оплаты
|
|
71
|
+
*/
|
|
72
|
+
callInSelfWindow(fields?: ParamsFieldsNarrowed & FieldsNarrow): void;
|
|
73
|
+
/** Генерация параметров запроса */
|
|
74
|
+
genData<FetchStyle extends RequestContext['ParamsFetchStyle']>(fields?: FieldsNarrow, fetchStyle?: FetchStyle): Record<string, any>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Объект с запросом к методу API, не описанному в OpenAPI
|
|
78
|
+
*/
|
|
79
|
+
interface ClientRequestCustom<useExt extends Api.Ext.UseExt, Params extends Record<string, any>, Result> extends ClientRequest<Api.ClientRequestContext<any, any, useExt>, any[], Params> {
|
|
80
|
+
params: Params;
|
|
81
|
+
call(fields?: any): Promise<useExt extends true ? Api.ResponseCustom<Result> : Result>;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { components as FetchStyleComponents } from 'topvisor-openapi/src/ts/FetchStyle';
|
|
2
|
+
import { components as FieldDirectionComponents } from 'topvisor-openapi/src/ts/FieldDirection';
|
|
3
|
+
import { components as FieldFilterComponents } from 'topvisor-openapi/src/ts/FieldFilter';
|
|
4
|
+
import { components as FieldOperatorComponents } from 'topvisor-openapi/src/ts/FieldOperator';
|
|
5
|
+
import { components as FieldOrderComponents } from 'topvisor-openapi/src/ts/FieldOrder';
|
|
6
|
+
import { components as ResponseErrorComponents } from 'topvisor-openapi/src/ts/ResponseError';
|
|
7
|
+
import { components as ResponseSuccessComponents } from 'topvisor-openapi/src/ts/ResponseSuccess';
|
|
8
|
+
import { components as PaginationComponents } from 'topvisor-openapi/src/ts/Pagination';
|
|
9
|
+
declare global {
|
|
10
|
+
namespace Api {
|
|
11
|
+
/**
|
|
12
|
+
* Схемы расширения спецификации OpenAPI для работы с селектором
|
|
13
|
+
*
|
|
14
|
+
* Эти схемы реализуются с помощью Api клиента и дженериков
|
|
15
|
+
*
|
|
16
|
+
* В данном namespace определяются только базовые схемы без дженериков
|
|
17
|
+
*/
|
|
18
|
+
namespace Ext {
|
|
19
|
+
/**
|
|
20
|
+
* Использовать расширение спецификации OpenAPI с селектором
|
|
21
|
+
*/
|
|
22
|
+
type UseExt = boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Базовые структуры расширения селектора для API без дженериков
|
|
25
|
+
*/
|
|
26
|
+
type Schemas = {
|
|
27
|
+
/**
|
|
28
|
+
* Операция метода API
|
|
29
|
+
*
|
|
30
|
+
* Определяет возможные операции метода API
|
|
31
|
+
*/
|
|
32
|
+
Oper: 'get' | 'edit' | 'add' | 'del';
|
|
33
|
+
} & {
|
|
34
|
+
/**
|
|
35
|
+
* Базовый тип для всех моделей
|
|
36
|
+
*/
|
|
37
|
+
Model: Record<string, any>;
|
|
38
|
+
} & {
|
|
39
|
+
/**
|
|
40
|
+
* Базовый тип списка полей
|
|
41
|
+
*
|
|
42
|
+
* @todo Реализовать тип объектов
|
|
43
|
+
*/
|
|
44
|
+
Fields: readonly string[];
|
|
45
|
+
} & {
|
|
46
|
+
FetchStyle: Extract<FetchStyleComponents['schemas']['FetchStyle'], keyof Api.ResultByModelFetchStyle<any, any>>;
|
|
47
|
+
} & FieldDirectionComponents['schemas'] & FieldFilterComponents['schemas'] & FieldOperatorComponents['schemas'] & FieldOrderComponents['schemas'] & ResponseErrorComponents['schemas'] & ResponseSuccessComponents['schemas'] & PaginationComponents['schemas'];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Api {
|
|
3
|
+
/**
|
|
4
|
+
* Поле - это составляющая часть объектов, которые характеризуются типом, называемым моделью
|
|
5
|
+
*
|
|
6
|
+
* Модель данных обеспечивает доступ и управление к коллекциям
|
|
7
|
+
*
|
|
8
|
+
* Не все API работают с моделью данных
|
|
9
|
+
*/
|
|
10
|
+
namespace Field {
|
|
11
|
+
/**
|
|
12
|
+
* Имя поля
|
|
13
|
+
*/
|
|
14
|
+
type Name<Model extends Api.Ext.Schemas['Model']> = keyof Model;
|
|
15
|
+
/**
|
|
16
|
+
* Фильтр по полю
|
|
17
|
+
*/
|
|
18
|
+
type Filter<Model extends Api.Ext.Schemas['Model'], FieldName extends Api.Field.Name<Model> = Api.Field.Name<Model>> = {
|
|
19
|
+
name: FieldName;
|
|
20
|
+
values: Model[FieldName][];
|
|
21
|
+
} & Omit<Api.Ext.Schemas['FieldFilter'], 'name'>;
|
|
22
|
+
/**
|
|
23
|
+
* Сортировка по полю
|
|
24
|
+
*/
|
|
25
|
+
type Order<Model extends Api.Ext.Schemas['Model'], FieldName extends Api.Field.Name<Model> = Api.Field.Name<Model>> = {
|
|
26
|
+
name: FieldName;
|
|
27
|
+
orderValues?: Model[FieldName][];
|
|
28
|
+
values?: Model[FieldName][];
|
|
29
|
+
} & Omit<Api.Ext.Schemas['FieldOrder'], 'name' | 'orderValues' | 'values'>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './client/client';
|
|
2
|
+
export * from './client/middleware';
|
|
3
|
+
export * from './client/options';
|
|
4
|
+
export * from './client/request-context';
|
|
5
|
+
export * from './client/request-options';
|
|
6
|
+
export * from './client/request';
|
|
7
|
+
export * from './api';
|
|
8
|
+
export * from './ext';
|
|
9
|
+
export * from './field';
|
|
10
|
+
export * from './schema';
|
|
11
|
+
export * from './tv';
|
|
12
|
+
export * from './utils';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
/**
|
|
3
|
+
* Утилиты работы со схемами расширения спецификации OpenAPI для работы с селектором
|
|
4
|
+
*
|
|
5
|
+
* @see Api.Ext
|
|
6
|
+
*/
|
|
7
|
+
namespace Api {
|
|
8
|
+
/**
|
|
9
|
+
* Тип операции метода API
|
|
10
|
+
*/
|
|
11
|
+
type Oper<Paths extends Api.PathsAbstract, Path extends Api.Path<Paths>> = Path extends `/${infer P extends Api.Ext.Schemas['Oper']}/${string}` ? P : never;
|
|
12
|
+
/**
|
|
13
|
+
* Модель данных метода
|
|
14
|
+
*
|
|
15
|
+
* Для метода без модели вернет `null`
|
|
16
|
+
*/
|
|
17
|
+
type Model<Paths extends Api.PathsAbstract, Path extends Api.Path<Paths>> = Paths[Path]['post']['responses'][200]['content'] extends {
|
|
18
|
+
model: infer Model extends Api.Ext.Schemas['Model'];
|
|
19
|
+
} ? Model : never;
|
|
20
|
+
type ModelFields<Model extends Api.Ext.Schemas['Model']> = readonly Api.Field.Name<Model>[];
|
|
21
|
+
/**
|
|
22
|
+
* Результат метода API, выполненного успешно
|
|
23
|
+
*/
|
|
24
|
+
type ResponseSuccess<Result, Oper extends Api.Ext.Schemas['Oper']> = {
|
|
25
|
+
result: Result;
|
|
26
|
+
/**
|
|
27
|
+
* Информация о нативных типах данных в результате
|
|
28
|
+
*
|
|
29
|
+
* Возвращается при работе с БД
|
|
30
|
+
*/
|
|
31
|
+
meta?: any[];
|
|
32
|
+
/**
|
|
33
|
+
* Списка ошибок в успешных запросах быть не может
|
|
34
|
+
*/
|
|
35
|
+
errors: undefined;
|
|
36
|
+
response?: globalThis.Response;
|
|
37
|
+
} & Omit<Api.Ext.Schemas['ResponseSuccess'], 'result' | 'errors'> & ('get' extends Oper ? Api.Ext.Schemas['Pagination'] : {});
|
|
38
|
+
/**
|
|
39
|
+
* Результат метода API с ошибкой
|
|
40
|
+
*/
|
|
41
|
+
type ResponseError<Result> = {
|
|
42
|
+
/**
|
|
43
|
+
* При ошибках результат всегда null
|
|
44
|
+
*/
|
|
45
|
+
result: null | Result;
|
|
46
|
+
response?: globalThis.Response;
|
|
47
|
+
} & Omit<Api.Ext.Schemas['ResponseError'], 'result'>;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { components as ModelsComponents } from 'topvisor-openapi/src/ts/Models';
|
|
2
|
+
import type * as SchemaImported from 'topvisor-openapi/src/ts/Topvisor';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Api {
|
|
5
|
+
/**
|
|
6
|
+
* Схема API OpenAPI TV
|
|
7
|
+
*
|
|
8
|
+
* Также содержит утилиты, которые работают с определяемой схемой и расширением селектора
|
|
9
|
+
*
|
|
10
|
+
* Для определения другого API с расширением селектора необходимо определить такой же namespace с нужными `SchemaImported` и `ModelsComponents`
|
|
11
|
+
*/
|
|
12
|
+
namespace TV {
|
|
13
|
+
namespace Schema {
|
|
14
|
+
type paths = SchemaImported.paths;
|
|
15
|
+
type operations = SchemaImported.operations;
|
|
16
|
+
type components = SchemaImported.components;
|
|
17
|
+
type webhooks = SchemaImported.webhooks;
|
|
18
|
+
type $defs = SchemaImported.$defs;
|
|
19
|
+
}
|
|
20
|
+
type Paths = Api.TV.Schema.paths;
|
|
21
|
+
type Path<Path extends Api.Path<Paths> = Api.Path<Paths>> = Path;
|
|
22
|
+
/**
|
|
23
|
+
* Все схемы моделей данных API
|
|
24
|
+
*/
|
|
25
|
+
type Models = ModelsComponents['schemas'];
|
|
26
|
+
/**
|
|
27
|
+
* Параметр списка полей `fields` конкретного метода API
|
|
28
|
+
*/
|
|
29
|
+
type Fields<Path extends Api.Path<Paths>> = Api.ParamsFields<Api.ClientRequestContext<Paths, Path, true>>;
|
|
30
|
+
/**
|
|
31
|
+
* Модель данных конкретного метода API
|
|
32
|
+
*/
|
|
33
|
+
type Model<Path extends Api.Path<Paths>> = Api.Model<Paths, Path>;
|
|
34
|
+
/**
|
|
35
|
+
* Объект запроса к конкретному методу API
|
|
36
|
+
*
|
|
37
|
+
* Дженерик Fields в чистом TypeScript не будет работать, так как используется tuple, работает при указании значения в самом js
|
|
38
|
+
*
|
|
39
|
+
* @see https://github.com/microsoft/TypeScript/pull/62170
|
|
40
|
+
*
|
|
41
|
+
* @remarks Не использовать, тип запроса API должен определяться `client.gen()`, указывать ему тип вручную не рекомендуется
|
|
42
|
+
*/
|
|
43
|
+
type Request<Path extends Api.Path<Paths>, Fields extends Api.ParamsFields<RequestContext> | undefined = undefined, RequestContext extends Api.ClientRequestContext<Paths, Path, true> = Api.ClientRequestContext<Paths, Path, true>> = Api.ClientRequest<RequestContext, Fields>;
|
|
44
|
+
/**
|
|
45
|
+
* Параметры запроса к конкретному методу API
|
|
46
|
+
*/
|
|
47
|
+
type Params<Path extends Api.Path<Paths>, Fields extends Api.ParamsFields<RequestContext> | undefined = undefined, RequestContext extends Api.ClientRequestContext<Paths, Path, true> = Api.ClientRequestContext<Paths, Path, true>> = Api.Params<RequestContext, Fields>;
|
|
48
|
+
/**
|
|
49
|
+
* Результат конкретного метода API
|
|
50
|
+
*/
|
|
51
|
+
type ResponseSuccess<Path extends Api.Path<Paths>, Fields extends Api.ParamsFields<RequestContext> | undefined = undefined, FetchStyle extends RequestContext['ParamsFetchStyle'] | null = null, RequestContext extends Api.ClientRequestContext<Paths, Path, true> = Api.ClientRequestContext<Paths, Path, true>, Result extends Api.Result<RequestContext, Fields, FetchStyle> = Api.Result<RequestContext, Fields, FetchStyle>> = Api.ResponseSuccess<Result, RequestContext['Oper']>;
|
|
52
|
+
/**
|
|
53
|
+
* Результат `res.result` конкретного метода API
|
|
54
|
+
*/
|
|
55
|
+
type Result<Path extends Api.Path<Paths>, Fields extends Api.ParamsFields<RequestContext> | undefined = undefined, FetchStyle extends RequestContext['ParamsFetchStyle'] | null = null, RequestContext extends Api.ClientRequestContext<Paths, Path, true> = Api.ClientRequestContext<Paths, Path, true>> = Api.Result<RequestContext, Fields, FetchStyle>;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
/**
|
|
3
|
+
* Общие утилиты
|
|
4
|
+
*/
|
|
5
|
+
namespace Api {
|
|
6
|
+
/**
|
|
7
|
+
* Интерфейс `paths` в схеме openAPI
|
|
8
|
+
*
|
|
9
|
+
* Общий интерфейс для разных API
|
|
10
|
+
*
|
|
11
|
+
* В данной реализации строго не типизирован
|
|
12
|
+
*
|
|
13
|
+
* @see https://learn.openapis.org/specification/structure.html
|
|
14
|
+
* @see https://spec.openapis.org/oas/v3.1.0#paths-object
|
|
15
|
+
*/
|
|
16
|
+
type PathsAbstract = Record<string, any>;
|
|
17
|
+
type PathAbstract = `/${string}` | '';
|
|
18
|
+
/**
|
|
19
|
+
* Путь метода API
|
|
20
|
+
*
|
|
21
|
+
* Определяет возможные значения пути метода API
|
|
22
|
+
*
|
|
23
|
+
* @template T Интерфейс `paths` в схеме openAPI
|
|
24
|
+
*
|
|
25
|
+
* @see Api.PathsAbstract
|
|
26
|
+
*/
|
|
27
|
+
type Path<T extends Api.PathsAbstract> = Extract<keyof T, string>;
|
|
28
|
+
/**
|
|
29
|
+
* Создает новый тип на основе T с заменой типа свойства K на NewType, только если ключ K присутствует в T.
|
|
30
|
+
*
|
|
31
|
+
* Если ключа нет — возвращается пустой объект.
|
|
32
|
+
*
|
|
33
|
+
* Используется для расширения простых типов такими же, но с дженериками
|
|
34
|
+
*/
|
|
35
|
+
type PickAndRetype<T extends object, K extends PropertyKey, NewType> = K extends keyof T ? undefined extends T[K] ? {
|
|
36
|
+
[P in K]?: NewType;
|
|
37
|
+
} : {
|
|
38
|
+
[P in K]: NewType;
|
|
39
|
+
} : {};
|
|
40
|
+
type PropIfExists<T, K extends PropertyKey> = K extends keyof T ? T[K] : never;
|
|
41
|
+
/**
|
|
42
|
+
* Сужение возможных значений массива
|
|
43
|
+
*/
|
|
44
|
+
type ArrowNarrow<T extends readonly any[], FieldsNarrow extends readonly any[]> = Extract<T[number], FieldsNarrow[number]>[] & T;
|
|
45
|
+
/**
|
|
46
|
+
* Утилита для условной установки типа по входным условиям
|
|
47
|
+
*/
|
|
48
|
+
type IfAllTrue<T extends boolean[], Then, Else = never> = false extends T[number] ? Else : Then;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Сгенерировать объект ответа в формате расширения OpenAPI
|
|
3
|
+
*
|
|
4
|
+
* @see Api.Ext
|
|
5
|
+
*/
|
|
6
|
+
export declare const genExtRes: (result: any, errors?: Api.Ext.Schemas["ResponseError"]["errors"], response?: Response) => Api.Response<any>;
|
|
7
|
+
/**
|
|
8
|
+
* Это публичное API, к которому открыт доступ по прямой ссылке через GET
|
|
9
|
+
*
|
|
10
|
+
* Используется для кеширования и генерации файлов через API
|
|
11
|
+
*/
|
|
12
|
+
export declare const isPublicAPI: (path: Api.PathAbstract) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Сгенерировать baseUrl на основе текущего домена
|
|
15
|
+
*/
|
|
16
|
+
export declare const getBaseDomainUrl: (useMainDomain?: boolean, input?: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Сгенерировать объект API фильтра
|
|
3
|
+
*/
|
|
4
|
+
export declare const genFieldFilter: <Model extends Api.Ext.Schemas["Model"], FieldName extends Api.Field.Name<Model> = Api.Field.Name<Model>>(name: FieldName, operator: Api.Field.Filter<Model, FieldName>["operator"], values: Api.Field.Filter<Model, FieldName>["values"]) => Api.Field.Filter<Model, FieldName>;
|
|
5
|
+
/**
|
|
6
|
+
* Сгенерировать объект сортировки
|
|
7
|
+
*/
|
|
8
|
+
export declare const genFieldOrder: <Model extends Api.Ext.Schemas["Model"], FieldName extends Api.Field.Name<Model> = Api.Field.Name<Model>>(name: FieldName, direction: Api.Field.Order<Model, FieldName>["direction"], orderValues?: Api.Field.Order<Model, FieldName>["orderValues"], operator?: Api.Field.Order<Model, FieldName>["operator"], values?: Api.Field.Order<Model, FieldName>["values"]) => Api.Field.Order<Model, FieldName>;
|