@topvisor/ui 1.0.0-rc-1 → 1.0.0-rc-3
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/{datepicker-tHefOW_3.es.js → datepicker-CS24dmLk.es.js} +2 -2
- package/.chunks/{datepicker-tHefOW_3.es.js.map → datepicker-CS24dmLk.es.js.map} +1 -1
- package/.chunks/{datepicker-B1O2dXDP.amd.js → datepicker-DsMs2YKL.amd.js} +2 -2
- package/.chunks/{datepicker-B1O2dXDP.amd.js.map → datepicker-DsMs2YKL.amd.js.map} +1 -1
- package/.chunks/{forms-ById2XG3.amd.js → forms-DKL0e9tp.amd.js} +3 -3
- package/.chunks/{forms-ById2XG3.amd.js.map → forms-DKL0e9tp.amd.js.map} +1 -1
- package/.chunks/{forms-BXL9jNnO.es.js → forms-DT_fsN6V.es.js} +30 -29
- package/.chunks/{forms-BXL9jNnO.es.js.map → forms-DT_fsN6V.es.js.map} +1 -1
- package/.chunks/i18n-C_OH9IT3.amd.js +2 -0
- package/.chunks/{i18n-e0RWAonB.amd.js.map → i18n-C_OH9IT3.amd.js.map} +1 -1
- package/.chunks/{i18n-BOfwnWEJ.es.js → i18n-DuTvft1T.es.js} +12 -12
- package/.chunks/{i18n-BOfwnWEJ.es.js.map → i18n-DuTvft1T.es.js.map} +1 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js +174 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js.map +1 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js +2 -0
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js.map +1 -0
- package/.chunks/{menu-DLu4YIFo.es.js → menu-CcyqVSfg.es.js} +2 -2
- package/.chunks/{menu-DLu4YIFo.es.js.map → menu-CcyqVSfg.es.js.map} +1 -1
- package/.chunks/{menu-DsNT8QIC.amd.js → menu-DTbsTDGK.amd.js} +2 -2
- package/.chunks/{menu-DsNT8QIC.amd.js.map → menu-DTbsTDGK.amd.js.map} +1 -1
- package/.chunks/{popup-BfA-88r7.es.js → popup-C5yk4q8p.es.js} +35 -18
- package/.chunks/popup-C5yk4q8p.es.js.map +1 -0
- package/.chunks/popup-DAruCfQv.amd.js +447 -0
- package/.chunks/popup-DAruCfQv.amd.js.map +1 -0
- package/assets/listItem.css +1 -1
- package/components/formsExt/editArea/editArea.vue.d.ts +2 -2
- package/components/popup/alert/alert.d.ts +8 -0
- package/components/popup/alert/alert.vue.d.ts +33 -0
- package/components/popup/confirm/confirm.d.ts +21 -0
- package/components/popup/confirm/confirm.vue.d.ts +35 -0
- package/components/popup/lib/popup.d.ts +11 -5
- package/components/popup/lib/popup.globalEvents.d.ts +10 -3
- package/components/popup/lib/worker.d.ts +40 -21
- package/components/popup/lib/worker.globalEvents.d.ts +9 -2
- package/components/popup/popup/opener.vue.d.ts +3 -3
- package/components/popup/popup/popup.d.ts +25 -15
- package/components/popup/popup/popup.vue.d.ts +3 -3
- package/components/popup/popup.d.ts +6 -0
- package/components/popup/prompt/prompt.d.ts +21 -0
- package/components/popup/prompt/prompt.vue.d.ts +35 -0
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +102 -61
- package/core/app.js.map +1 -1
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/core/plugins/core.d.ts +4 -1
- package/core/utils/dom.d.ts +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +2 -2
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +219 -21
- 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 +52 -74
- 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 +20 -20
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +2 -2
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +2 -2
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
- package/.chunks/i18n-e0RWAonB.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-MnlZ62d8.es.js +0 -161
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-MnlZ62d8.es.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-UtYu0iBq.amd.js +0 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-UtYu0iBq.amd.js.map +0 -1
- package/.chunks/popup-BfA-88r7.es.js.map +0 -1
- package/.chunks/popup-DG309bnz.amd.js +0 -441
- package/.chunks/popup-DG309bnz.amd.js.map +0 -1
|
@@ -23,9 +23,9 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
23
23
|
}, {
|
|
24
24
|
closeText: string;
|
|
25
25
|
expandable: boolean;
|
|
26
|
-
defaultValue: string;
|
|
27
|
-
cancelText: string;
|
|
28
26
|
submitText: string;
|
|
27
|
+
cancelText: string;
|
|
28
|
+
defaultValue: string;
|
|
29
29
|
}, {}>;
|
|
30
30
|
export default _default;
|
|
31
31
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Props } from './alert';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
opener?(_: {}): any;
|
|
5
|
+
header?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
footer?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
10
|
+
open: () => void;
|
|
11
|
+
close: () => void;
|
|
12
|
+
scrollContentList: (value: Event) => void;
|
|
13
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
|
|
14
|
+
onClose?: (() => any) | undefined;
|
|
15
|
+
onOpen?: (() => any) | undefined;
|
|
16
|
+
onScrollContentList?: ((value: Event) => any) | undefined;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
+
type __VLS_TypePropsToOption<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
+
} : {
|
|
30
|
+
type: PropType<T[K]>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Emits as PopupEmits, Props as PopupProps } from '../popup/popup';
|
|
2
|
+
export interface Props extends PopupProps {
|
|
3
|
+
/**
|
|
4
|
+
* Текст кнопки отмены
|
|
5
|
+
*/
|
|
6
|
+
cancelText?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Текст кнопки подтверждения
|
|
9
|
+
*/
|
|
10
|
+
submitText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Если true, кнопка подтверждения будет красной
|
|
13
|
+
*/
|
|
14
|
+
isWarning?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type Emits = PopupEmits & {
|
|
17
|
+
/**
|
|
18
|
+
* Будет вызвано при нажатии кнопок или закрытии окна
|
|
19
|
+
*/
|
|
20
|
+
(e: 'submit'): void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Props } from './confirm';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
opener?(_: {}): any;
|
|
5
|
+
header?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
footer?(_: {}): any;
|
|
8
|
+
};
|
|
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: () => void;
|
|
14
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
|
|
15
|
+
onSubmit?: (() => any) | undefined;
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onOpen?: (() => any) | undefined;
|
|
18
|
+
onScrollContentList?: ((value: Event) => any) | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import { default as Component } from '../../component';
|
|
2
2
|
export interface PopupOptions {
|
|
3
3
|
popup?: string;
|
|
4
|
+
id?: string;
|
|
4
5
|
p?: number;
|
|
5
6
|
notch?: boolean;
|
|
6
7
|
class?: string;
|
|
@@ -43,6 +44,11 @@ export declare class Popup extends Component {
|
|
|
43
44
|
type: string | undefined;
|
|
44
45
|
options: PopupOptions;
|
|
45
46
|
events: {};
|
|
47
|
+
/**
|
|
48
|
+
* Создать Popup
|
|
49
|
+
* @param el - элемент, открывающий меню
|
|
50
|
+
* @param options
|
|
51
|
+
*/
|
|
46
52
|
constructor(el: HTMLElement, options: PopupOptions);
|
|
47
53
|
mount(): Promise<void>;
|
|
48
54
|
mountJQuery(): Promise<void>;
|
|
@@ -54,22 +60,22 @@ export declare class Popup extends Component {
|
|
|
54
60
|
/**
|
|
55
61
|
* Обработка клика вне окна
|
|
56
62
|
*/
|
|
57
|
-
onMousedown
|
|
63
|
+
private onMousedown;
|
|
58
64
|
/**
|
|
59
65
|
* Закрыть другие Popup при фокусе на элемент формы в текущем
|
|
60
66
|
*/
|
|
61
|
-
onFocus
|
|
67
|
+
private onFocus;
|
|
62
68
|
/**
|
|
63
69
|
* Закрыть Popup при отведении мыши
|
|
64
70
|
*/
|
|
65
|
-
onMouseleave
|
|
71
|
+
private onMouseleave;
|
|
66
72
|
/**
|
|
67
73
|
* Контроль положения Popup при fixed позиционировании
|
|
68
74
|
*/
|
|
69
|
-
onResize
|
|
75
|
+
private onResize;
|
|
70
76
|
unmount(): void;
|
|
71
77
|
recalcPosition(): void;
|
|
72
|
-
onTouchmove(e:
|
|
78
|
+
onTouchmove(e: TouchEvent): void;
|
|
73
79
|
close(): void;
|
|
74
80
|
vueOpen(): Promise<void>;
|
|
75
81
|
vueClose(): void;
|
|
@@ -5,15 +5,22 @@
|
|
|
5
5
|
* Если в меню встречает класс .preloader, то событие нажатия на кнопку через enter будет остановлено
|
|
6
6
|
*/
|
|
7
7
|
declare class GlobalEvents {
|
|
8
|
+
private static isInited;
|
|
9
|
+
/**
|
|
10
|
+
* Добавить глобальные обработчики
|
|
11
|
+
*
|
|
12
|
+
* Добавляются на страницу один раз и навсегда
|
|
13
|
+
*/
|
|
8
14
|
static init(): void;
|
|
9
15
|
/**
|
|
10
16
|
* Глобальный обработчик кликов
|
|
11
|
-
*
|
|
17
|
+
*
|
|
18
|
+
* Обрабатывает клики внутри Popup
|
|
12
19
|
*/
|
|
13
|
-
static onclick
|
|
20
|
+
private static onclick;
|
|
14
21
|
/**
|
|
15
22
|
* Глобальный обработчик нажатия кнопки на клавиатуре
|
|
16
23
|
*/
|
|
17
|
-
static onkeydown
|
|
24
|
+
private static onkeydown;
|
|
18
25
|
}
|
|
19
26
|
export default GlobalEvents;
|
|
@@ -1,25 +1,41 @@
|
|
|
1
|
-
import { Popup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Popup } from './popup';
|
|
2
|
+
import { OpenerProps } from '../popup/popup';
|
|
3
|
+
export type Options = {
|
|
4
|
+
/**
|
|
5
|
+
* Глобальное событие, которое будет вызвано перед открытием TopPopup
|
|
6
|
+
*/
|
|
7
|
+
decoratorBeforeOpen?: (TopPopupInstance: Popup) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Глобальное событие, которое будет вызвано после открытия TopPopup
|
|
10
|
+
*/
|
|
11
|
+
decoratorAfterOpen?: (TopPopupInstance: Popup) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Определитель того, что клик вне Popup нужно игнорировать
|
|
14
|
+
* @returns {boolean} - если true, то click не приведет к закрытию Popup
|
|
15
|
+
*/
|
|
16
|
+
decoratorIsIgnoreOuterClick?: (e: MouseEvent) => boolean;
|
|
17
|
+
};
|
|
10
18
|
declare class Worker {
|
|
19
|
+
/**
|
|
20
|
+
* Глобальное выключение закрытия меню, используется при различных оверлеях
|
|
21
|
+
*/
|
|
11
22
|
static noClose: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Для взаимодействия с vue
|
|
25
|
+
*/
|
|
12
26
|
static vueConnectors: Map<any, any>;
|
|
27
|
+
static options: Options;
|
|
13
28
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* Устанавливает глобальные статические декортаоры для компонента Popup
|
|
17
|
-
*
|
|
18
|
-
* @todo Вынести в настройки плагина corePlugin
|
|
29
|
+
* Вернуть объект компонента popup, привязанный к элементу
|
|
19
30
|
*/
|
|
20
|
-
static onInitApp(options: Options): void;
|
|
21
31
|
static getPopup(elPopup: HTMLElement): Popup;
|
|
32
|
+
/**
|
|
33
|
+
* Вернуть все элементы с Popup
|
|
34
|
+
*/
|
|
22
35
|
static getAll(): HTMLElement[];
|
|
36
|
+
/**
|
|
37
|
+
* Вернуть все элементы с открытыми Popup
|
|
38
|
+
*/
|
|
23
39
|
static getAllVisible(): HTMLElement[];
|
|
24
40
|
/**
|
|
25
41
|
* Открть Popup от указанного elOpener
|
|
@@ -31,17 +47,16 @@ declare class Worker {
|
|
|
31
47
|
* @param elOpener - элемент, вызвавший открытие Popup
|
|
32
48
|
* @param options - опции Popup
|
|
33
49
|
*/
|
|
34
|
-
static open
|
|
50
|
+
private static open;
|
|
35
51
|
static close(elPopup: HTMLElement): void;
|
|
36
52
|
static recalcPosition(elPopup: HTMLElement): void;
|
|
53
|
+
/**
|
|
54
|
+
* Скролл к активному элементу списка
|
|
55
|
+
*/
|
|
37
56
|
static scrollToActive(elPopup: HTMLElement): void;
|
|
38
57
|
static decoratorBeforeOpen(popup: Popup): void;
|
|
39
58
|
static decoratorAfterOpen(popup: Popup): void;
|
|
40
|
-
|
|
41
|
-
* Определитель того, что клик вне Popup нужно игнорировать
|
|
42
|
-
* @returns {boolean} - игнорировать клик, то есть не закрывать Popup
|
|
43
|
-
*/
|
|
44
|
-
static decoratorIsIgnoreOuterClick(e: Event): boolean;
|
|
59
|
+
static decoratorIsIgnoreOuterClick(e: MouseEvent): boolean;
|
|
45
60
|
/**
|
|
46
61
|
* Зарегистрировать Vue компонент
|
|
47
62
|
*
|
|
@@ -52,5 +67,9 @@ declare class Worker {
|
|
|
52
67
|
* Снять с регистрации Vue компонент
|
|
53
68
|
*/
|
|
54
69
|
static unregVueComponent(id: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Сгенерировтаь элемент для открытия popup
|
|
72
|
+
*/
|
|
73
|
+
static genElPopupOpener(tagName: string, props: OpenerProps, ...elsChildrens: HTMLElement[] | string[]): HTMLElement;
|
|
55
74
|
}
|
|
56
75
|
export default Worker;
|
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
* Глобальные события, для реализации Popup
|
|
3
3
|
*/
|
|
4
4
|
declare class WorkerEvents {
|
|
5
|
+
private static isInited;
|
|
6
|
+
/**
|
|
7
|
+
* Добавить глобальные обработчики
|
|
8
|
+
*
|
|
9
|
+
* Добавляются на страницу один раз и навсегда
|
|
10
|
+
*/
|
|
5
11
|
static init(): void;
|
|
6
12
|
/**
|
|
7
13
|
* Глобальный обработчик кликов
|
|
8
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* Обрабатывает клики на открытие Popup
|
|
9
16
|
*/
|
|
10
|
-
static onclick
|
|
17
|
+
private static onclick;
|
|
11
18
|
}
|
|
12
19
|
export default WorkerEvents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenerProps
|
|
1
|
+
import { OpenerProps } from './popup';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
default?(_: {}): any;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
12
12
|
notch: boolean;
|
|
13
13
|
posBy: string;
|
|
14
14
|
}>>>, {
|
|
15
|
-
|
|
15
|
+
posBy: "fixed" | "left" | "right";
|
|
16
|
+
pos: "0" | "1" | "2" | "3" | "4";
|
|
16
17
|
notch: boolean;
|
|
17
|
-
posBy: PosBy;
|
|
18
18
|
}, {}>;
|
|
19
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
20
20
|
export default _default;
|
|
@@ -15,9 +15,15 @@ export interface Props extends OpenerProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Длительность анимации в мс
|
|
17
17
|
*/
|
|
18
|
-
transitionDuration?: number
|
|
18
|
+
transitionDuration?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Ссылка на справку.
|
|
21
|
+
*
|
|
22
|
+
* Если указана, кнопка справки будет добавлена в футере popup
|
|
23
|
+
*/
|
|
24
|
+
footerSupportLink?: string;
|
|
19
25
|
}
|
|
20
|
-
export
|
|
26
|
+
export type Emits = {
|
|
21
27
|
/**
|
|
22
28
|
* Будет вызвано при открытии Popup
|
|
23
29
|
*/
|
|
@@ -30,16 +36,22 @@ export interface Emits {
|
|
|
30
36
|
* Будет вызвано при скролле списка в Popup
|
|
31
37
|
*/
|
|
32
38
|
(e: 'scrollContentList', value: Event): void;
|
|
33
|
-
}
|
|
39
|
+
};
|
|
34
40
|
export interface OpenerProps {
|
|
35
41
|
/**
|
|
36
42
|
* id компонента Popup, который необходимо открыть
|
|
37
43
|
*/
|
|
38
|
-
id
|
|
44
|
+
id: string;
|
|
39
45
|
/**
|
|
40
|
-
* Положение Popup
|
|
46
|
+
* Положение Popup относительно кнопки, которая его открывает
|
|
47
|
+
*
|
|
48
|
+
* - 0 - по коориднатам кнопки
|
|
49
|
+
* - 1 - top
|
|
50
|
+
* - 2 - right
|
|
51
|
+
* - 3 - botton
|
|
52
|
+
* - 4 - left
|
|
41
53
|
*/
|
|
42
|
-
pos?:
|
|
54
|
+
pos?: '0' | '1' | '2' | '3' | '4';
|
|
43
55
|
/**
|
|
44
56
|
* Добавить клювик
|
|
45
57
|
*/
|
|
@@ -53,9 +65,9 @@ export interface OpenerProps {
|
|
|
53
65
|
*
|
|
54
66
|
* left/right - левый/правый край родителя
|
|
55
67
|
*
|
|
56
|
-
* fixed - по
|
|
68
|
+
* fixed - по документу
|
|
57
69
|
*/
|
|
58
|
-
posBy?:
|
|
70
|
+
posBy?: 'fixed' | 'left' | 'right';
|
|
59
71
|
}
|
|
60
72
|
export interface ListItemProps {
|
|
61
73
|
/**
|
|
@@ -72,16 +84,14 @@ export interface ListItemProps {
|
|
|
72
84
|
closeByClick?: boolean;
|
|
73
85
|
}
|
|
74
86
|
export declare const pos: {
|
|
75
|
-
readonly
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
87
|
+
readonly 0: "0";
|
|
88
|
+
readonly 1: "1";
|
|
89
|
+
readonly 2: "2";
|
|
90
|
+
readonly 3: "3";
|
|
91
|
+
readonly 4: "4";
|
|
80
92
|
};
|
|
81
|
-
export type Pos = typeof pos[keyof typeof pos];
|
|
82
93
|
export declare const posBy: {
|
|
83
94
|
readonly fixed: "fixed";
|
|
84
95
|
readonly left: "left";
|
|
85
96
|
readonly right: "right";
|
|
86
97
|
};
|
|
87
|
-
export type PosBy = typeof posBy[keyof typeof posBy];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Props, Pos, PosBy } from './popup';
|
|
2
1
|
import { default as PopupClass } from '../lib/popup';
|
|
2
|
+
import { Props } from './popup';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
opener?(_: {}): any;
|
|
@@ -30,10 +30,10 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
30
30
|
onOpen?: (() => any) | undefined;
|
|
31
31
|
onScrollContentList?: ((value: Event) => any) | undefined;
|
|
32
32
|
}, {
|
|
33
|
+
posBy: "fixed" | "left" | "right";
|
|
33
34
|
id: string;
|
|
34
|
-
pos:
|
|
35
|
+
pos: "0" | "1" | "2" | "3" | "4";
|
|
35
36
|
notch: boolean;
|
|
36
|
-
posBy: PosBy;
|
|
37
37
|
}, {}>;
|
|
38
38
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
39
39
|
export default _default;
|
|
@@ -3,7 +3,13 @@ import { default as Popup } from './popup/popup.vue';
|
|
|
3
3
|
import { default as PopupOpener } from './popup/opener.vue';
|
|
4
4
|
import { default as PopupListItem } from './popup/listItem.vue';
|
|
5
5
|
import { default as PopupWidgetInput } from './popup/widgetInput.vue';
|
|
6
|
+
import { default as PopupAlert } from './alert/alert.vue';
|
|
7
|
+
import { default as PopupConfirm } from './confirm/confirm.vue';
|
|
8
|
+
import { default as PopupPrompt } from './prompt/prompt.vue';
|
|
6
9
|
export declare const TopPopup: typeof Popup & ComponentCustomProps;
|
|
7
10
|
export declare const TopPopupOpener: typeof PopupOpener & ComponentCustomProps;
|
|
8
11
|
export declare const TopPopupListItem: typeof PopupListItem & ComponentCustomProps;
|
|
9
12
|
export declare const TopPopupWidgetInput: typeof PopupWidgetInput & ComponentCustomProps;
|
|
13
|
+
export declare const TopPopupAlert: typeof PopupAlert & ComponentCustomProps;
|
|
14
|
+
export declare const TopPopupConfirm: typeof PopupConfirm & ComponentCustomProps;
|
|
15
|
+
export declare const TopPopupPrompt: typeof PopupPrompt & ComponentCustomProps;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Emits as PopupEmits, Props as PopupProps } from '../popup/popup';
|
|
2
|
+
export interface Props extends PopupProps {
|
|
3
|
+
/**
|
|
4
|
+
* Текст кнопки подтверждения
|
|
5
|
+
*/
|
|
6
|
+
submitText?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Текст кнопки отмены
|
|
9
|
+
*/
|
|
10
|
+
cancelText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Значение, введенное в поле ввода
|
|
13
|
+
*/
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
}
|
|
16
|
+
export type Emits = PopupEmits & {
|
|
17
|
+
/**
|
|
18
|
+
* Будет вызвано при нажатии кнопки подтверждения
|
|
19
|
+
*/
|
|
20
|
+
(e: 'submit', value: string): void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Props } from './prompt';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
opener?(_: {}): any;
|
|
5
|
+
header?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
footer?(_: {}): any;
|
|
8
|
+
};
|
|
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;
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onOpen?: (() => any) | undefined;
|
|
18
|
+
onScrollContentList?: ((value: Event) => any) | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
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
|
+
};
|
package/core/app.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","exports","../.chunks/forms-
|
|
1
|
+
define(["require","exports","../.chunks/forms-DKL0e9tp.amd","../popup/worker.amd","../.chunks/i18n-C_OH9IT3.amd","vue","../.chunks/debounce-4ipCj607.amd","../utils/clipboard.amd","../utils/string.amd","../utils/route.amd"],function(A,p,a,d,g,f,S,k,P,w){"use strict";if(typeof f>"u")var f=window.Vue;class I{static isInited=!1;static init(){this.isInited||(this.isInited=!0,document.addEventListener("mouseover",t=>{var e;!(t.target instanceof HTMLElement)||!((e=t.target.dataset)!=null&&e.topPopupOpenByHover)||t.target.click()}),document.addEventListener("scroll",()=>{a.Core.state.isMobile||a.Core.state.isMobileUA||d.TopPopupWorker.getAll().forEach(t=>d.TopPopupWorker.close(t))}),a.Events.addOnReize(t=>{a.Core.state.isMobile&&t.topEvent.widthDiff&&d.TopPopupWorker.getAll().forEach(e=>d.TopPopupWorker.close(e))}),document.addEventListener("click",this.onclick))}static async onclick(t){var o,n,i,r,c;if(!(t.target instanceof HTMLElement))return;let e;switch(!0){case!!((o=t.target.dataset)!=null&&o.topPopup):e=t.target;break;case!!((n=t.target.parentElement)!=null&&n.dataset.topPopup):e=t.target.parentElement;break;case!!((r=(i=t.target.parentElement)==null?void 0:i.parentElement)!=null&&r.dataset.topPopup):e=(c=t.target.parentElement)==null?void 0:c.parentElement;break}e&&(e.dataset.topPopupDisabled||e.dataset.topPopupOpened||(t.preventDefault(),await d.TopPopupWorker.openByOpener(e)))}}const L={mounted:function(s,t){t.value.disabled||s.focus()}};let u;const O={mounted(s,t,e){const o=t.value||"top-sticky";u=new IntersectionObserver(n=>{let i=n[0].intersectionRatio<1;i&&t.modifiers.bottom&&n[0].intersectionRect.y===0&&(i=!1),s.classList.toggle(o,i)},{threshold:[1]}),u.observe(s)},unmounted(s,t,e){u==null||u.disconnect()}};let E=!1,h;const m=new Map,y=(s,t)=>{const{distance:e,percent:o}=s.directiveSwipUpOptions,n=s.getBoundingClientRect().top,i=t*o/100/e,r=(t-n)/i;r<=e?s.style.transform=`translateY(${e-r}px)`:s.style.transform="translateY(0px)"},C=s=>{let t=window.innerHeight;window.addEventListener("scroll",()=>{m.forEach(e=>y(e,t))},{passive:!0}),h=new IntersectionObserver(e=>{t=window.innerHeight,e.forEach(o=>{const n=o.target;if(o.intersectionRatio<.1?m.delete(n):m.set(n,n),o.intersectionRatio===0){const{distance:i}=n.directiveSwipUpOptions;n.style.transform=`translateY(${i}px)`}})},{threshold:.1})},H={mounted(s,t,e){var o,n;a.Core.state.isMobileUA||(s.directiveSwipUpOptions={distance:((o=t.value)==null?void 0:o.distance)??100,percent:((n=t.value)==null?void 0:n.percent)??30},E||(C(),E=!0),h.observe(s))},unmounted(s,t,e){m.delete(s),h==null||h.unobserve(s)}},T=s=>{var t,e;if(!((e=(t=a.Core.$)==null?void 0:t.ui)!=null&&e.tooltip)){console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");return}return a.Core.$(s)},v=(s,t)=>{var o;const e=s.value??{};return e.content??=(o=t.props)==null?void 0:o.title,e.content=String(e.content).replace(/\r\n|\r|\n/g,"<br>"),e.position??={my:"bottom-18px",at:"top center"},e},M={mounted(s,t,e){var o;(o=T(s))==null||o.tooltip(v(t,e))},updated(s,t,e,o){var r;const n=v(t,e),i=(r=T(s))==null?void 0:r.tooltip("instance");i&&(i.options={...i.options,...n})},unmounted(s,t,e){var o;(o=T(s))==null||o.tooltip("destroy")}},N={install:(s,t)=>{s.config.globalProperties.$core=a.Core;for(const e in t)a.Core.state[e]=t[e];a.Core._setState(),t.topPopupOptions&&(d.TopPopupWorker.options=t.topPopupOptions),I.init(),s.directive("top-focus",L),s.directive("top-sticky",O),s.directive("top-swim-up",H),s.directive("top-tooltip",M),s.component("TopAvatar",a.TopAvatar),s.component("TopButton",a.TopButton$1),s.component("TopCheckbox",a.TopCheckbox),s.component("TopControlLabel",a.TopControlLabel),s.component("TopHint",a.TopHint$1),s.component("TopInput",a.TopInput),s.component("TopInputDate",a.TopInputDate),s.component("TopInputRange",a.TopInputRange),s.component("TopLoadbar",a.TopLoadbar),s.component("TopRadio",a.TopRadio),s.component("TopSelect",a.TopSelect),s.component("TopSwitcher",a.TopSwitcher),s.component("TopTextarea",a.TopTextarea)}};class R{#e;#t;#o;#n;#p;#s=[];#i=[];#d=[];#a=[];constructor(t){var o;this.#t=t.store,this.#e=this.#t.$id,this.#o=t.options.Page,this.#n=t.options.user,this.#p=t.options.Api,this.#s=t.options.tpaNamesUrlHash||[],this.#i=t.options.tpaNamesStorage||[],this.#d=t.options.tpaNamesStorageLocal||[],this.#a=t.options.tpaNamesGuestLink||[],t.store.genGuestLink=(n,i)=>this.genGuestLink(n,i),(o=this.#n.guest_data)!=null&&o.data||(this.#l(),this.#l(!0),this.#g()),this.#T(),this.#b();const e=S.debounce(()=>{this.#f(),this.#m()});t.store.$subscribe(e)}async genGuestLink(t,e){const o=this.#u();e=Object.assign(e,Object.fromEntries(o));const n=await this.#p.gen(t,"fetchColumn").call({},e);n!=null&&n.errors||(await k.setClipboard(n.result),window.requirejs&&window.requirejs(["es6!@/component/utils/info.ts"],({showInfo:i})=>{i("Гостевая ссылка скопирована в буфер обмена"+': <a href="'+n.result+'" target="_blank">'+n.result+"</a>",n.result,3)}))}#u(){const t=new Map;return this.#a.forEach(e=>{const o=P.camelToSnakeCase(e);t.set(o,this.#t[e])}),t}#r(t){if(Object.isFrozen(this))throw"Please, use setOptions only inner commit function";t.forEach((e,o)=>{const n=this.#t[o];if(e!=null&&e!=null&&e.constructor&&e.constructor===n.constructor){if(o.indexOf("date")===0&&!Array.isArray(e)){if(typeof e=="string"&&!/\d\d\d\d-\d\d-\d\d/.test(e))return}this.#t[o]=e}})}#h(t){const e=new Map;return t.forEach((o,n)=>{o!==null&&(o=JSON.stringify(o),e.set(n,o))}),e}#c(t){const e=new Map;return t.forEach((o,n)=>{if(!(o==null||o==="false")){try{if(typeof o=="string"&&!/^\d\d\d\d-\d\d-\d\d$/.test(o)&&(o=JSON.parse(o)),o==null||o==="false")return}catch{}e.set(n,o)}}),e}#g(){let t;try{t=JSON.parse(w.getHash(this.#e))}catch{}if(!t)return;const e=new Map;this.#s.forEach(n=>{const i=t[n];i&&e.set(n,i)});const o=this.#c(e);this.#r(o)}#f(){const t=new Map;this.#s.forEach(n=>{const i=this.#t[n];t.set(n,i)});const e=Object.fromEntries(t),o=JSON.stringify(e);w.setHash(this.#e,o)}#l(t=!1){const e=new Map;let o="state:"+this.#e;t&&(o="state:"+this.#e+":"+location.pathname),this.#i.forEach(i=>{const r=localStorage.getItem(o+":"+i);e.set(i,r)});const n=this.#c(e);this.#r(n)}#m(t=!1){const e=new Map;let o=this.#i,n="state:"+this.#e;t&&(o=this.#d,n="state:"+this.#e+":"+location.pathname),o.forEach(r=>{const c=this.#t[r];e.set(r,c)});const i=this.#h(e);o.forEach(r=>{const c=i.get(r);localStorage.setItem(n+":"+r,c)})}#T(){var i,r,c;const t=(r=(i=this.#n)==null?void 0:i.guest_data)==null?void 0:r.data;if(!t)return;this.#n.id===-1&&(this.#n.positionsReverseDates=t.positionsReverseDates);const e=new Map;this.#a.forEach(l=>{const b=t[l];e.set(l,b)});const o=this.#c(e);this.#r(o);const n=$(".mod_guest_title");if(((c=this.#t.competitorsIds)==null?void 0:c.length)===1&&this.#o.page.data.competitors){let l=this.#o.page.data.competitors.filter(b=>b.id===t.competitorsIds[0]);l.length&&($("a",n).attr("href","http://"+l[0].url),$("a",n).text(l[0].name))}}#b(){this.#t.regionsIndexes&&f.watch(this.#t,t=>{if(!t.length)return;t.forEach((n,i)=>t[i]=n);const e=TplProjectSelectorRegion.genSearchersMap(),o=[];e.forEach(n=>{n.regions.forEach(i=>{i.index!==-1&&o.push(i.index)})}),this.#t.regionsIndexes=t.filter(n=>o.includes(n))},{immediate:!0}),this.#t.competitorsIds&&f.watch(this.#t,t=>{if(!t.length)return;t.forEach((o,n)=>o[n]=o);const e=[this.#o.page.data.project.id];this.#o.page.data.project.competitors.forEach(o=>{o.on>=0&&e.push(o.id)}),this.#t.competitorsIds=t.filter(o=>e.includes(o))})}}const U=s=>{var e,o,n,i;const t=s;!((e=t.options.tpaNamesUrlHash)!=null&&e.length)&&!((o=t.options.tpaNamesStorage)!=null&&o.length)&&!((n=t.options.tpaNamesStorageLocal)!=null&&n.length)&&!((i=t.options.tpaNamesGuestLink)!=null&&i.length)||new R(t)};p.Core=a.Core,p.i18nPlugin=g.i18n,p.useI18n=g.useI18n,p.useI18nLang=g.useI18nLang,p.useI18nSetLang=g.useI18nSetLang,p.corePlugin=N,p.piniaTPAPlugin=U,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=app.amd.js.map
|