@topvisor/ui 1.0.4 → 1.0.7

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.
Files changed (149) hide show
  1. package/.chunks/{datepicker-BJGX0c7G.amd.js → datepicker-CRfiJCmp.amd.js} +2 -2
  2. package/.chunks/{datepicker-BJGX0c7G.amd.js.map → datepicker-CRfiJCmp.amd.js.map} +1 -1
  3. package/.chunks/{datepicker-3uPurK_5.es.js → datepicker-CugKFVIH.es.js} +2 -2
  4. package/.chunks/{datepicker-3uPurK_5.es.js.map → datepicker-CugKFVIH.es.js.map} +1 -1
  5. package/.chunks/{forms-D9r2-H5Y.es.js → forms-CHiMZ8vg.es.js} +758 -743
  6. package/.chunks/forms-CHiMZ8vg.es.js.map +1 -0
  7. package/.chunks/forms-CjYoXTEQ.amd.js +3 -0
  8. package/.chunks/forms-CjYoXTEQ.amd.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js → listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js} +4 -4
  10. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js.map → listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js.map} +1 -1
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js → listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js} +2 -2
  12. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CEF3WDJ_.amd.js.map} +1 -1
  13. package/.chunks/{menu-B0Ul7Kbg.es.js → menu-CHeV29rC.es.js} +2 -2
  14. package/.chunks/{menu-B0Ul7Kbg.es.js.map → menu-CHeV29rC.es.js.map} +1 -1
  15. package/.chunks/{menu-CbhB9e4x.amd.js → menu-D1lnYuWU.amd.js} +2 -2
  16. package/.chunks/{menu-CbhB9e4x.amd.js.map → menu-D1lnYuWU.amd.js.map} +1 -1
  17. package/.chunks/{popup-pQCswyfj.amd.js → popup-C4Tne4qA.amd.js} +5 -5
  18. package/.chunks/{popup-pQCswyfj.amd.js.map → popup-C4Tne4qA.amd.js.map} +1 -1
  19. package/.chunks/{popup-Coq_61yv.es.js → popup-D-G2sXks.es.js} +2 -3
  20. package/.chunks/{popup-Coq_61yv.es.js.map → popup-D-G2sXks.es.js.map} +1 -1
  21. package/.chunks/utils-BOlUthaH.es.js +91 -0
  22. package/.chunks/utils-BOlUthaH.es.js.map +1 -0
  23. package/.chunks/utils-x88W55mf.amd.js +2 -0
  24. package/.chunks/utils-x88W55mf.amd.js.map +1 -0
  25. package/assets/forms.css +1 -1
  26. package/assets/project.css +1 -1
  27. package/assets/themes/dark.css +1 -1
  28. package/assets/themes/light.css +1 -1
  29. package/components/forms/avatar/avatar.vue.d.ts +3 -33
  30. package/components/forms/button/button.vue.d.ts +11 -31
  31. package/components/forms/checkbox/checkbox.vue.d.ts +12 -16
  32. package/components/forms/controlLabel/controlLabel.vue.d.ts +9 -13
  33. package/components/forms/hint/hint.vue.d.ts +2 -11
  34. package/components/forms/input/input.vue.d.ts +13 -31
  35. package/components/forms/inputDate/inputDate.vue.d.ts +6 -27
  36. package/components/forms/inputRange/inputRange.vue.d.ts +10 -5
  37. package/components/forms/loadbar/loadbar.vue.d.ts +2 -2
  38. package/components/forms/radio/radio.vue.d.ts +12 -16
  39. package/components/forms/select/select.vue.d.ts +8 -27
  40. package/components/forms/switcher/switcher.vue.d.ts +12 -16
  41. package/components/forms/textarea/textarea.vue.d.ts +6 -29
  42. package/components/formsExt/editArea/editArea.vue.d.ts +9 -38
  43. package/components/formsExt/editInput/editInput.vue.d.ts +5 -14
  44. package/components/formsExt/menu/menu.vue.d.ts +6 -27
  45. package/components/formsExt/radioGroup/radioGroup.vue.d.ts +8 -27
  46. package/components/formsExt/selector2/api.d.ts +2 -2
  47. package/components/formsExt/selector2/itemMulti.vue.d.ts +5 -14
  48. package/components/formsExt/selector2/selector2.vue.d.ts +107 -35
  49. package/components/popup/alert/alert.vue.d.ts +17 -21
  50. package/components/popup/confirm/confirm.vue.d.ts +19 -23
  51. package/components/popup/popup/listItem.vue.d.ts +10 -28
  52. package/components/popup/popup/opener.vue.d.ts +10 -30
  53. package/components/popup/popup/popup.vue.d.ts +21 -43
  54. package/components/popup/popup/widgetInput.vue.d.ts +11 -29
  55. package/components/popup/prompt/prompt.vue.d.ts +19 -23
  56. package/components/popup/worker.d.ts +0 -4
  57. package/components/project/project.d.ts +2 -0
  58. package/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +6 -27
  59. package/components/project/selectorRegion/composables/compare.d.ts +12 -0
  60. package/components/project/selectorRegion/composables/selectRegion.d.ts +14 -0
  61. package/components/project/selectorRegion/composables/selectSearcher.d.ts +13 -0
  62. package/components/project/selectorRegion/composables/selectorRegion.d.ts +25 -0
  63. package/components/project/selectorRegion/selectorRegion.d.ts +182 -0
  64. package/components/project/selectorRegion/selectorRegion.vue.d.ts +25 -0
  65. package/components/project/selectorRegion/stories/searchers.d.ts +3 -0
  66. package/components/project/selectorRegion/utils/consts.d.ts +20 -0
  67. package/components/project/selectorRegion/utils/utils.d.ts +23 -0
  68. package/components/project/utils.d.ts +1 -0
  69. package/components/tabs/tabs/content.vue.d.ts +9 -13
  70. package/components/tabs/tabs/tab.vue.d.ts +9 -13
  71. package/components/tabs/tabs/tabs.vue.d.ts +11 -15
  72. package/components/tabsView/tabsView/menu.vue.d.ts +17 -20
  73. package/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -2
  74. package/components/tabsView/tabsView/menuItem.vue.d.ts +11 -29
  75. package/components/tabsView/tabsView/menuTitle.vue.d.ts +10 -14
  76. package/components/tabsView/tabsView/store.d.ts +6 -6
  77. package/components/tabsView/tabsView/tabsView.vue.d.ts +15 -31
  78. package/core/app.amd.js +1 -1
  79. package/core/app.amd.js.map +1 -1
  80. package/core/app.js +2 -2
  81. package/core/core/core.d.ts +0 -8
  82. package/core/core.amd.js +1 -1
  83. package/core/core.js +1 -1
  84. package/core/utils/date.d.ts +2 -2
  85. package/core/utils/scroll.d.ts +7 -1
  86. package/core/utils/searchers.d.ts +40 -0
  87. package/forms/forms.amd.js +1 -1
  88. package/forms/forms.js +5 -5
  89. package/formsExt/formsExt.amd.js +1 -1
  90. package/formsExt/formsExt.amd.js.map +1 -1
  91. package/formsExt/formsExt.js +64 -64
  92. package/icomoon/Topvisor icons.json +5846 -0
  93. package/icomoon/demo.html +26 -26
  94. package/icomoon/fonts/Topvisor-2.svg +12 -12
  95. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  96. package/icomoon/fonts/Topvisor-2.woff +0 -0
  97. package/icomoon/selection.json +1 -1
  98. package/icomoon/style.css +16 -16
  99. package/package.json +1 -1
  100. package/popup/popup.amd.js +1 -1
  101. package/popup/popup.amd.js.map +1 -1
  102. package/popup/popup.js +14 -14
  103. package/popup/worker.amd.js +1 -1
  104. package/popup/worker.d.ts +0 -4
  105. package/popup/worker.js +3 -4
  106. package/project/project.amd.js +1 -1
  107. package/project/project.amd.js.map +1 -1
  108. package/project/project.js +366 -45
  109. package/project/project.js.map +1 -1
  110. package/project/utils.amd.js +2 -0
  111. package/project/utils.amd.js.map +1 -0
  112. package/project/utils.d.ts +2 -0
  113. package/project/utils.js +6 -0
  114. package/project/utils.js.map +1 -0
  115. package/tabs/tabs.amd.js +1 -1
  116. package/tabs/tabs.js +1 -1
  117. package/tabsView/tabsView.amd.js +1 -1
  118. package/tabsView/tabsView.amd.js.map +1 -1
  119. package/tabsView/tabsView.js +150 -143
  120. package/tabsView/tabsView.js.map +1 -1
  121. package/utils/date.amd.js +1 -1
  122. package/utils/date.js +1 -1
  123. package/utils/device.amd.js +1 -1
  124. package/utils/device.js +1 -1
  125. package/utils/lodash.amd.js +1 -1
  126. package/utils/lodash.js +4 -4
  127. package/utils/price.amd.js +1 -1
  128. package/utils/price.amd.js.map +1 -1
  129. package/utils/price.js +6 -7
  130. package/utils/price.js.map +1 -1
  131. package/utils/scroll.amd.js +1 -1
  132. package/utils/scroll.amd.js.map +1 -1
  133. package/utils/scroll.js +10 -8
  134. package/utils/scroll.js.map +1 -1
  135. package/utils/searchers.amd.js +2 -0
  136. package/utils/searchers.amd.js.map +1 -0
  137. package/utils/searchers.d.ts +2 -0
  138. package/utils/searchers.js +130 -0
  139. package/utils/searchers.js.map +1 -0
  140. package/utils/string.amd.js +1 -1
  141. package/utils/string.amd.js.map +1 -1
  142. package/utils/string.js +1 -1
  143. package/.chunks/forms-BImXJ_ZO.amd.js +0 -3
  144. package/.chunks/forms-BImXJ_ZO.amd.js.map +0 -1
  145. package/.chunks/forms-D9r2-H5Y.es.js.map +0 -1
  146. package/.chunks/i18n-C_OH9IT3.amd.js +0 -2
  147. package/.chunks/i18n-C_OH9IT3.amd.js.map +0 -1
  148. package/.chunks/i18n-DuTvft1T.es.js +0 -26
  149. package/.chunks/i18n-DuTvft1T.es.js.map +0 -1
@@ -1,42 +1,22 @@
1
1
  import { OpenerProps } from './popup';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
- default?(_: {}): any;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ attrs: Partial<{}>;
5
9
  };
6
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OpenerProps>, {
7
- pos: string;
8
- notch: boolean;
9
- posBy: string;
10
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OpenerProps>, {
11
- pos: string;
12
- notch: boolean;
13
- posBy: string;
14
- }>>>, {
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: DefineComponent<OpenerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<OpenerProps> & Readonly<{}>, {
15
12
  posBy: "fixed" | "left" | "right";
16
13
  pos: "0" | "1" | "2" | "3" | "4";
17
14
  notch: boolean;
18
- }, {}>;
19
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
15
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
17
  export default _default;
21
- type __VLS_WithDefaults<P, D> = {
22
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
23
- default: D[K];
24
- }> : P[K];
25
- };
26
- type __VLS_Prettify<T> = {
27
- [K in keyof T]: T[K];
28
- } & {};
29
18
  type __VLS_WithTemplateSlots<T, S> = T & {
30
19
  new (): {
31
20
  $slots: S;
32
21
  };
33
22
  };
34
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
- type __VLS_TypePropsToOption<T> = {
36
- [K in keyof T]-?: {} extends Pick<T, K> ? {
37
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
38
- } : {
39
- type: PropType<T[K]>;
40
- required: true;
41
- };
42
- };
@@ -1,61 +1,39 @@
1
1
  import { default as PopupClass } from '../lib/popup';
2
2
  import { Props } from './popup';
3
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
4
  declare function __VLS_template(): {
5
- opener?(_: {}): any;
6
- header?(_: {}): any;
7
- widget?(_: {}): any;
8
- content?(_: {}): any;
9
- contentList?(_: {}): any;
10
- footer?(_: {}): any;
5
+ slots: {
6
+ opener?(_: {}): any;
7
+ header?(_: {}): any;
8
+ widget?(_: {}): any;
9
+ content?(_: {}): any;
10
+ contentList?(_: {}): any;
11
+ footer?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ attrs: Partial<{}>;
11
15
  };
12
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
13
- id: string;
14
- pos: string;
15
- notch: boolean;
16
- posBy: string;
17
- }>, {
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: DefineComponent<Props, {
18
18
  popup: PopupClass | undefined;
19
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
- open: () => void;
21
- close: () => void;
22
- scrollContentList: (value: Event) => void;
23
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
24
- id: string;
25
- pos: string;
26
- notch: boolean;
27
- posBy: string;
28
- }>>> & {
19
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
20
+ close: () => any;
21
+ open: () => any;
22
+ scrollContentList: (value: Event) => any;
23
+ }, string, PublicProps, Readonly<Props> & Readonly<{
29
24
  onClose?: (() => any) | undefined;
30
25
  onOpen?: (() => any) | undefined;
31
26
  onScrollContentList?: ((value: Event) => any) | undefined;
32
- }, {
27
+ }>, {
33
28
  posBy: "fixed" | "left" | "right";
34
29
  id: string;
35
30
  pos: "0" | "1" | "2" | "3" | "4";
36
31
  notch: boolean;
37
- }, {}>;
38
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
32
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
34
  export default _default;
40
- type __VLS_WithDefaults<P, D> = {
41
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
- default: D[K];
43
- }> : P[K];
44
- };
45
- type __VLS_Prettify<T> = {
46
- [K in keyof T]: T[K];
47
- } & {};
48
35
  type __VLS_WithTemplateSlots<T, S> = T & {
49
36
  new (): {
50
37
  $slots: S;
51
38
  };
52
39
  };
53
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
54
- type __VLS_TypePropsToOption<T> = {
55
- [K in keyof T]-?: {} extends Pick<T, K> ? {
56
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
57
- } : {
58
- type: PropType<T[K]>;
59
- required: true;
60
- };
61
- };
@@ -1,35 +1,17 @@
1
1
  import { Props } from '../../forms/input/input';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare let __VLS_typeProps: Props;
4
+ declare const __VLS_defaults: {
5
+ modelValue: string;
6
+ };
4
7
  type __VLS_PublicProps = {
5
- modelValue?: any;
8
+ modelValue?: typeof __VLS_defaults['modelValue'];
6
9
  } & typeof __VLS_typeProps;
7
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
8
- addCleaner: boolean;
9
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
- "update:modelValue": (modelValue: any) => void;
11
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
12
- addCleaner: boolean;
13
- }>>> & {
14
- "onUpdate:modelValue"?: ((modelValue: any) => any) | undefined;
15
- }, {
10
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
11
+ "update:modelValue": (modelValue: string) => any;
12
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
14
+ }>, {
16
15
  addCleaner: boolean;
17
- }, {}>;
16
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
18
17
  export default _default;
19
- type __VLS_WithDefaults<P, D> = {
20
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
21
- default: D[K];
22
- }> : P[K];
23
- };
24
- type __VLS_Prettify<T> = {
25
- [K in keyof T]: T[K];
26
- } & {};
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -1,35 +1,31 @@
1
1
  import { Props } from './prompt';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
- opener?(_: {}): any;
5
- header?(_: {}): any;
6
- default?(_: {}): any;
7
- footer?(_: {}): any;
4
+ slots: {
5
+ opener?(_: {}): any;
6
+ header?(_: {}): any;
7
+ default?(_: {}): any;
8
+ footer?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ attrs: Partial<{}>;
8
12
  };
9
- declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
- open: () => void;
11
- close: () => void;
12
- scrollContentList: (value: Event) => void;
13
- submit: (value: string) => void;
14
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
15
- onSubmit?: ((value: string) => any) | undefined;
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
15
+ close: () => any;
16
+ open: () => any;
17
+ submit: (value: string) => any;
18
+ scrollContentList: (value: Event) => any;
19
+ }, string, PublicProps, Readonly<Props> & Readonly<{
16
20
  onClose?: (() => any) | undefined;
17
21
  onOpen?: (() => any) | undefined;
22
+ onSubmit?: ((value: string) => any) | undefined;
18
23
  onScrollContentList?: ((value: Event) => any) | undefined;
19
- }, {}, {}>;
20
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
24
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
26
  export default _default;
22
27
  type __VLS_WithTemplateSlots<T, S> = T & {
23
28
  new (): {
24
29
  $slots: S;
25
30
  };
26
31
  };
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -1,5 +1 @@
1
1
  export { default as TopPopupWorker } from './lib/worker';
2
- /**
3
- * @deprecated
4
- */
5
- export { default } from './lib/worker';
@@ -1,3 +1,5 @@
1
1
  import { ComponentCustomProps } from 'vue';
2
2
  import { default as SelectorCompetitors } from './selectorCompetitors/selectorCompetitors.vue';
3
+ import { default as SelectorRegion } from './selectorRegion/selectorRegion.vue';
3
4
  export declare const TopSelectorCompetitors: typeof SelectorCompetitors & ComponentCustomProps;
5
+ export declare const TopSelectorRegion: typeof SelectorRegion & ComponentCustomProps;
@@ -1,35 +1,14 @@
1
1
  import { Props } from './selectorCompetitors';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare let __VLS_typeProps: Props;
4
4
  type __VLS_PublicProps = {
5
5
  modelValue?: Props['modelValue'];
6
6
  } & typeof __VLS_typeProps;
7
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
8
- showSelectAllItem: boolean;
9
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
- "update:modelValue": (modelValue: number[]) => void;
11
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
12
- showSelectAllItem: boolean;
13
- }>>> & {
7
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
+ "update:modelValue": (modelValue: number[]) => any;
9
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
10
  "onUpdate:modelValue"?: ((modelValue: number[]) => any) | undefined;
15
- }, {
11
+ }>, {
16
12
  showSelectAllItem: boolean;
17
- }, {}>;
13
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
18
14
  export default _default;
19
- type __VLS_WithDefaults<P, D> = {
20
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
21
- default: D[K];
22
- }> : P[K];
23
- };
24
- type __VLS_Prettify<T> = {
25
- [K in keyof T]: T[K];
26
- } & {};
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -0,0 +1,12 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { Props, SearcherByKey } from '../selectorRegion';
3
+ /**
4
+ * Создание и управление реактивными переменными для сравнения
5
+ *
6
+ * @param props - входные props компонента
7
+ * @param searcherByKey - Map ПС (реактивная)
8
+ * @param allRegionsIndexes - Все доступные индексы регионов (реактивная)
9
+ */
10
+ export declare const useCompare: (props: Props, searcherByKey: ComputedRef<SearcherByKey>, allRegionsIndexes: ComputedRef<Set<number>>) => {
11
+ regionsIndexes: Ref<number[], number[]>;
12
+ };
@@ -0,0 +1,14 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { Option } from '../../../forms/select/select';
3
+ import { Props, SearcherIndexed } from '../selectorRegion';
4
+ /**
5
+ * Создание и управление реактивными переменными для выбора региона
6
+ *
7
+ * @param props - входные props компонента
8
+ * @param activeSearcherIndexed - объект активной поисковой системы (реактивная)
9
+ * @param regionsIndexes - входные индексы регионов/ПС
10
+ */
11
+ export declare const useSelectRegion: (props: Props, activeSearcherIndexed: ComputedRef<SearcherIndexed>) => {
12
+ regionIndex: Ref<number, number>;
13
+ optionByRegionIndex: ComputedRef<Map<number, Option>>;
14
+ };
@@ -0,0 +1,13 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { Props, SearcherByKey } from '../selectorRegion';
3
+ import { Options } from '../../../forms/select/select';
4
+ /**
5
+ * Создание и управление реактивными переменными для выбора ПС
6
+ *
7
+ * @param props - входные props компонента
8
+ * @param mapSearchers - Map ПС (реактивная)
9
+ */
10
+ export declare const useSelectSearcher: (props: Props, mapSearchers: ComputedRef<SearcherByKey>) => {
11
+ searcherKey: Ref<number, number>;
12
+ optionBySearcherKey: ComputedRef<Options>;
13
+ };
@@ -0,0 +1,25 @@
1
+ import { Props, Region, SearcherIndexed, SearcherByKey } from '../selectorRegion';
2
+ import { Ref, ComputedRef } from 'vue';
3
+ import { Options, Option } from '../../../forms/select/select';
4
+ /**
5
+ * Создание и управления рективными переменными компонента
6
+ *
7
+ * @param props - входные props компонента
8
+ */
9
+ export declare const useSelectorRegion: (props: Props) => {
10
+ selectSearcher: {
11
+ searcherKey: Ref<number, number>;
12
+ optionBySearcherKey: ComputedRef<Options>;
13
+ };
14
+ selectRegion: {
15
+ regionIndex: Ref<number, number>;
16
+ optionByRegionIndex: ComputedRef<Map<number, Option>>;
17
+ };
18
+ compare: {
19
+ regionsIndexes: Ref<number[], number[]>;
20
+ };
21
+ searcherByKey: ComputedRef<SearcherByKey>;
22
+ allRegionsIndexes: ComputedRef<Set<number>>;
23
+ getSearcher: () => SearcherIndexed | undefined;
24
+ getRegion: () => Region | undefined;
25
+ };
@@ -0,0 +1,182 @@
1
+ export interface Props {
2
+ projectId: number;
3
+ searchers: Searcher[];
4
+ /**
5
+ * Список выбранных значений
6
+ * *
7
+ * - при `onlySearcher = false`:
8
+ * - при `forFrequency = false`: массив `regionIndex`
9
+ * - при `forFrequency = true`: массив `regionKey`
10
+ * - при `onlySearcher = true` массив `searcherKey`
11
+ *
12
+ * Обратите внимание, всегда является массивом, даже если не предпогается получить несколько значений
13
+ *
14
+ * Если не нужно работать с массивом можно указать `modelValue = []` и использовать `modelValueSingle`
15
+ */
16
+ modelValue: number[];
17
+ /**
18
+ * Выбранное значение
19
+ *
20
+ * Шорткат к `modelValue[0]`, если не нужно работать с массивом (для случаев без сравнений)
21
+ *
22
+ * Нельзя добавить динамически
23
+ */
24
+ modelValueSingle?: number;
25
+ /**
26
+ * Добавить режим сравнения
27
+ *
28
+ * В режиме сравнения выбранные значения длиной массива > 1 сохраняются с привязкой к projectId
29
+ *
30
+ * Чтобы изменить сохраненное значение в режиме сравнения необходимо указать modelValue с длиной массива > 1
31
+ *
32
+ * Выбор регионов для сравнения требуется настраивать отдельно, см. emit `compareRegions`
33
+ */
34
+ addCompare?: boolean;
35
+ /**
36
+ * Режим выбора регионов для работы с частотой
37
+ */
38
+ forFrequency?: boolean;
39
+ /**
40
+ * Добавить элемент `Автовыбор` с ключем `-2`, который в API заменяется на нужный ключ в зависимости от контекста
41
+ */
42
+ autoRegion?: boolean;
43
+ /**
44
+ * В этом режиме в regionIndex будет сохраняться searcherKey
45
+ */
46
+ onlySearcher?: boolean;
47
+ /**
48
+ * См. addChanger в TopSelect
49
+ */
50
+ addChanger?: boolean;
51
+ /**
52
+ * Добавить значок ПС
53
+ */
54
+ addSearcherIcon?: boolean;
55
+ /**
56
+ * Добавить значок региона
57
+ */
58
+ addRegionIcon?: boolean;
59
+ }
60
+ /**
61
+ * @todo: Вынести в topvisor-openapi
62
+ */
63
+ export interface Searcher {
64
+ /**
65
+ * Состояние включения поисковой системы
66
+ */
67
+ enabled?: 0 | 1;
68
+ /**
69
+ * Id поисковой системы
70
+ */
71
+ id?: number;
72
+ /**
73
+ * Ключ поисковой системы
74
+ */
75
+ key: number;
76
+ /**
77
+ * Название поисковой системы
78
+ */
79
+ name: string;
80
+ /**
81
+ * Порядок поисковой систеимы
82
+ */
83
+ ord?: number;
84
+ /**
85
+ * Id проекта
86
+ */
87
+ project_id?: number;
88
+ /**
89
+ * Регионы поисковой системы
90
+ */
91
+ regions: Region[];
92
+ /**
93
+ * Ключ поисковой системы
94
+ */
95
+ searcher?: number;
96
+ }
97
+ /**
98
+ * Индексирвоанные поисковики с быстрым доступом к ПС и их регионам по словарю
99
+ */
100
+ export type SearcherByKey = Map<Searcher['key'], SearcherIndexed>;
101
+ /**
102
+ * Индексирвоанный поисковик с быстрым доступом к регоинам по словарю
103
+ */
104
+ export type SearcherIndexed = Searcher & {
105
+ regionByIndex: Map<Region['index'], Region>;
106
+ };
107
+ /**
108
+ * @todo: Вынести в topvisor-openapi
109
+ */
110
+ export interface Region {
111
+ /**
112
+ * Название области
113
+ */
114
+ areaName?: string;
115
+ /**
116
+ * Код страны
117
+ */
118
+ countryCode?: string;
119
+ /**
120
+ * Глубина поиска
121
+ */
122
+ depth?: number;
123
+ /**
124
+ * Id устройства
125
+ * 0 - ПК
126
+ * 1 - Планшет
127
+ * 2 - Смартфон
128
+ */
129
+ device?: 0 | 1 | 2;
130
+ /**
131
+ * Домен верхнего уровня
132
+ */
133
+ domain?: string;
134
+ /**
135
+ * Состояние включения региона
136
+ */
137
+ enabled?: 0 | 1;
138
+ /**
139
+ * Необходим для поддержания сортировки
140
+ */
141
+ id?: number;
142
+ /**
143
+ * Уникальный идентификатор настройки региона (ПС + регион + настройки региона)
144
+ */
145
+ index: number;
146
+ /**
147
+ * Ключ региона
148
+ */
149
+ key: number;
150
+ /**
151
+ * Код языка
152
+ */
153
+ lang?: string;
154
+ /**
155
+ * Название региона
156
+ */
157
+ name: string;
158
+ /**
159
+ * Id родительского региона
160
+ */
161
+ parentId?: number;
162
+ /**
163
+ * Ключ поисковой системы
164
+ */
165
+ searcher_key?: Searcher['key'];
166
+ /**
167
+ * Тип
168
+ */
169
+ type?: string;
170
+ }
171
+ export type Emits = {
172
+ /**
173
+ * Запрошен выбор регионов
174
+ *
175
+ * При вызове необходимо отобразить диалоговое окно и вывести список регионов
176
+ *
177
+ * Выбранные регионы устанвоить в `modelValue`
178
+ *
179
+ * Так делается по причине отсутствия диалоговых окон в UI
180
+ */
181
+ compareRegions: [searcherByKey: SearcherByKey];
182
+ };
@@ -0,0 +1,25 @@
1
+ import { Props, Region, SearcherIndexed, SearcherByKey, Searcher } from './selectorRegion';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare let __VLS_typeProps: Props;
4
+ type __VLS_PublicProps = {
5
+ modelValue: Props['modelValue'];
6
+ 'modelValueSingle'?: Props['modelValueSingle'];
7
+ } & typeof __VLS_typeProps;
8
+ declare const _default: DefineComponent<__VLS_PublicProps, {
9
+ getSearcher: () => SearcherIndexed | undefined;
10
+ getRegion: () => Region | undefined;
11
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
+ "update:modelValue": (modelValue: number[]) => any;
13
+ compareRegions: (searcherByKey: SearcherByKey) => any;
14
+ "update:modelValueSingle": (modelValueSingle: number | undefined) => any;
15
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((modelValue: number[]) => any) | undefined;
17
+ onCompareRegions?: ((searcherByKey: SearcherByKey) => any) | undefined;
18
+ "onUpdate:modelValueSingle"?: ((modelValueSingle: number | undefined) => any) | undefined;
19
+ }>, {
20
+ addChanger: boolean;
21
+ searchers: Searcher[];
22
+ addSearcherIcon: boolean;
23
+ addRegionIcon: boolean;
24
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
25
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Searcher } from '../selectorRegion';
2
+ declare const searchers: Searcher[];
3
+ export default searchers;
@@ -0,0 +1,20 @@
1
+ import { Region, SearcherIndexed } from '../selectorRegion';
2
+ export declare const dummyIndex = -2;
3
+ export declare const searchersNames: {
4
+ 0: string;
5
+ 1: string;
6
+ 2: string;
7
+ 4: string;
8
+ 5: string;
9
+ 6: string;
10
+ 7: string;
11
+ 8: string;
12
+ 9: string;
13
+ 20: string;
14
+ 21: string;
15
+ };
16
+ export declare const regionUndefined: Region;
17
+ export declare const searcherUndefined: SearcherIndexed;
18
+ export declare const getRegionAuto: () => Region;
19
+ export declare const getSearcherAuto: () => SearcherIndexed;
20
+ export declare const getRegionGlobal: () => Region;
@@ -0,0 +1,23 @@
1
+ import { Region, Searcher, SearcherByKey } from '../selectorRegion';
2
+ /**
3
+ * Генерация Map ПС с Map регионов из массива searchers
4
+ * - ключ для ПС - searcherKey
5
+ * - ключ для региона - regionIndex
6
+ *
7
+ * Если поисковиков в списке нет, в список будет добавлен searcherUndefined
8
+ *
9
+ * Если регионов в списке нет, в список будет добавлен regionUndefined
10
+ *
11
+ * @param forFrequency - получить массив для просмотра частоты (или ставок)
12
+ * @param autoRegion - добавить элемент с ключем -2, который в API заменяется на нужный ключ в зависимости от контекста
13
+ * @param searchers - поисковики с регионами проекта, см.: get/projects_2/projects, show_searchers_and_regions = 1
14
+ */
15
+ export declare const genSearcherByKey: (forFrequency?: boolean, autoRegion?: boolean, searchers?: Searcher[]) => SearcherByKey;
16
+ /**
17
+ * Поиск региона по заданному критерию из списка поисковиков проекта
18
+ *
19
+ * @param forFrequency - поиск региона для просмотра частоты или ставок
20
+ * @param searchRegion - объект с параметрами региона, который следует найти
21
+ * @param searchers
22
+ */
23
+ export declare const findRegion: (forFrequency: boolean, searchRegion: Region, searchers?: Searcher[]) => Region | undefined;
@@ -0,0 +1 @@
1
+ export { findRegion, genSearcherByKey } from './selectorRegion/utils/utils';
@@ -1,22 +1,18 @@
1
1
  import { PropsContent } from './tabs';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
- default?(_: {}): any;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ attrs: Partial<{}>;
5
9
  };
6
- declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<PropsContent>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<PropsContent>>>, {}, {}>;
7
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: DefineComponent<PropsContent, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PropsContent> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
8
13
  export default _default;
9
14
  type __VLS_WithTemplateSlots<T, S> = T & {
10
15
  new (): {
11
16
  $slots: S;
12
17
  };
13
18
  };
14
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
- type __VLS_TypePropsToOption<T> = {
16
- [K in keyof T]-?: {} extends Pick<T, K> ? {
17
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
18
- } : {
19
- type: PropType<T[K]>;
20
- required: true;
21
- };
22
- };