@v1nt1248/3nclient-lib 0.0.9 → 0.0.12
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/dist/components/index.d.ts +20 -1
- package/dist/components/ui3n-dialog.vue.d.ts +73 -0
- package/dist/components/ui3n-drop-files.vue.d.ts +41 -0
- package/dist/components/ui3n-emoji.vue.d.ts +36 -0
- package/dist/components/ui3n-input.vue.d.ts +96 -0
- package/dist/components/ui3n-list.vue.d.ts +45 -0
- package/dist/components/ui3n-menu.vue.d.ts +85 -0
- package/dist/components/ui3n-notification.vue.d.ts +4 -4
- package/dist/components/ui3n-table-sort-icon.vue.d.ts +29 -0
- package/dist/components/ui3n-table.vue.d.ts +42 -0
- package/dist/components/ui3n-text.vue.d.ts +79 -0
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/ui3n-click-outside.d.ts +10 -0
- package/dist/index.d.ts +31 -0
- package/dist/plugins/dialogs.d.ts +17 -0
- package/dist/plugins/i18n.d.ts +2 -0
- package/dist/plugins/index.d.ts +8 -4
- package/dist/plugins/notifications.d.ts +2 -0
- package/dist/plugins/store-dialogs.d.ts +4 -0
- package/dist/plugins/store-notifications.d.ts +4 -0
- package/dist/plugins/vue-bus.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/ui-3n-lib.js +6931 -6186
- package/package.json +7 -2
- package/src/components/index.ts +55 -0
- package/src/components/ui3n-button.vue +4 -5
- package/src/components/ui3n-dialog.vue +311 -0
- package/src/components/ui3n-drop-files.vue +8 -4
- package/src/components/ui3n-emoji.vue +8 -4
- package/src/components/ui3n-list.vue +135 -0
- package/src/components/ui3n-menu.vue +134 -0
- package/src/components/ui3n-notification.vue +2 -13
- package/src/components/ui3n-table-sort-icon.vue +4 -2
- package/src/components/ui3n-table.vue +9 -4
- package/src/components/ui3n-text.vue +9 -5
- package/src/components/ui3n-virtual-scroll.vue +108 -0
- package/dist/types.d.ts +0 -21
|
@@ -2,4 +2,23 @@ import Ui3nIcon from './ui3n-icon.vue';
|
|
|
2
2
|
import type { Ui3nIconProps, Ui3nIconEmits } from './ui3n-icon.vue';
|
|
3
3
|
import Ui3nButton from './ui3n-button.vue';
|
|
4
4
|
import type { Ui3nButtonProps, Ui3nButtonEmits } from './ui3n-button.vue';
|
|
5
|
-
|
|
5
|
+
import Ui3nDropFiles from './ui3n-drop-files.vue';
|
|
6
|
+
import type { Ui3nDropFilesProps, Ui3nDropFilesEmits } from './ui3n-drop-files.vue';
|
|
7
|
+
import Ui3nEmoji from './ui3n-emoji.vue';
|
|
8
|
+
import type { Ui3nEmojiProps, Ui3nEmojiEmits } from './ui3n-emoji.vue';
|
|
9
|
+
import Ui3nInput from './ui3n-input.vue';
|
|
10
|
+
import type { Ui3nInputProps, Ui3nInputEmits } from './ui3n-input.vue';
|
|
11
|
+
import Ui3nText from './ui3n-text.vue';
|
|
12
|
+
import type { Ui3nTextProps, Ui3nTextEmits } from './ui3n-text.vue';
|
|
13
|
+
import Ui3nNotification from './ui3n-notification.vue';
|
|
14
|
+
import Ui3nTableSortIcon from './ui3n-table-sort-icon.vue';
|
|
15
|
+
import type { Ui3nTableSortIconProps } from './ui3n-table-sort-icon.vue';
|
|
16
|
+
import Ui3nTable from './ui3n-table.vue';
|
|
17
|
+
import type { Ui3nTableProps, Ui3nTableEmits } from './ui3n-table.vue';
|
|
18
|
+
import Ui3nDialog from './ui3n-dialog.vue';
|
|
19
|
+
import type { Ui3nDialogComponentProps, Ui3nDialogComponentEmits, Ui3nDialogProps, Ui3nDialogEvent } from './ui3n-dialog.vue';
|
|
20
|
+
import Ui3nMenu from './ui3n-menu.vue';
|
|
21
|
+
import type { Ui3nMenuProps, Ui3nMenuEmits, Ui3nMenuSlots } from './ui3n-menu.vue';
|
|
22
|
+
import Ui3nList from './ui3n-list.vue';
|
|
23
|
+
import type { Ui3nListProps, Ui3nListEmits, Ui3nListSlots } from './ui3n-list.vue';
|
|
24
|
+
export { Ui3nIcon, Ui3nIconProps, Ui3nIconEmits, Ui3nButton, Ui3nButtonProps, Ui3nButtonEmits, Ui3nDropFiles, Ui3nDropFilesProps, Ui3nDropFilesEmits, Ui3nEmoji, Ui3nEmojiProps, Ui3nEmojiEmits, Ui3nInput, Ui3nInputProps, Ui3nInputEmits, Ui3nText, Ui3nTextProps, Ui3nTextEmits, Ui3nNotification, Ui3nTableSortIcon, Ui3nTableSortIconProps, Ui3nTable, Ui3nTableProps, Ui3nTableEmits, Ui3nDialog, Ui3nDialogComponentProps, Ui3nDialogComponentEmits, Ui3nDialogProps, Ui3nDialogEvent, Ui3nMenu, Ui3nMenuProps, Ui3nMenuEmits, Ui3nMenuSlots, Ui3nList, Ui3nListProps, Ui3nListEmits, Ui3nListSlots, };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
3
|
+
export interface Ui3nDialogProps {
|
|
4
|
+
teleport?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
cssClass?: string;
|
|
8
|
+
cssStyle?: Record<string, string>;
|
|
9
|
+
contentCssClass?: string;
|
|
10
|
+
contentCssStyle?: Record<string, string>;
|
|
11
|
+
confirmButton?: boolean;
|
|
12
|
+
cancelButton?: boolean;
|
|
13
|
+
onConfirm?: (data: any) => void;
|
|
14
|
+
onCancel?: (data: any) => void;
|
|
15
|
+
confirmButtonText?: string;
|
|
16
|
+
cancelButtonText?: string;
|
|
17
|
+
confirmButtonColor?: string;
|
|
18
|
+
cancelButtonColor?: string;
|
|
19
|
+
confirmButtonBackground?: string;
|
|
20
|
+
cancelButtonBackground?: string;
|
|
21
|
+
closeOnClickOverlay?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface Ui3nDialogComponentProps {
|
|
24
|
+
component: Component;
|
|
25
|
+
componentProps?: Record<string, any>;
|
|
26
|
+
dialogProps?: Ui3nDialogProps;
|
|
27
|
+
}
|
|
28
|
+
export interface Ui3nDialogComponentEmits {
|
|
29
|
+
(ev: 'open', value?: any): void;
|
|
30
|
+
(ev: 'before-close', value?: any): void;
|
|
31
|
+
(ev: 'close', value?: any): void;
|
|
32
|
+
(ev: 'confirm', value?: any): void;
|
|
33
|
+
(ev: 'cancel', value?: any): void;
|
|
34
|
+
(ev: 'click-overlay', value?: any): void;
|
|
35
|
+
}
|
|
36
|
+
declare const _default: import("vue").DefineComponent<{
|
|
37
|
+
component: {
|
|
38
|
+
type: import("vue").PropType<Component>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
componentProps: {
|
|
42
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
43
|
+
};
|
|
44
|
+
dialogProps: {
|
|
45
|
+
type: import("vue").PropType<Ui3nDialogProps>;
|
|
46
|
+
};
|
|
47
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
open: (value?: any) => void;
|
|
49
|
+
"before-close": (value?: any) => void;
|
|
50
|
+
close: (value?: any) => void;
|
|
51
|
+
confirm: (value?: any) => void;
|
|
52
|
+
cancel: (value?: any) => void;
|
|
53
|
+
"click-overlay": (value?: any) => void;
|
|
54
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
component: {
|
|
56
|
+
type: import("vue").PropType<Component>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
componentProps: {
|
|
60
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
61
|
+
};
|
|
62
|
+
dialogProps: {
|
|
63
|
+
type: import("vue").PropType<Ui3nDialogProps>;
|
|
64
|
+
};
|
|
65
|
+
}>> & {
|
|
66
|
+
onCancel?: ((value?: any) => any) | undefined;
|
|
67
|
+
onClose?: ((value?: any) => any) | undefined;
|
|
68
|
+
onOpen?: ((value?: any) => any) | undefined;
|
|
69
|
+
"onBefore-close"?: ((value?: any) => any) | undefined;
|
|
70
|
+
onConfirm?: ((value?: any) => any) | undefined;
|
|
71
|
+
"onClick-overlay"?: ((value?: any) => any) | undefined;
|
|
72
|
+
}, {}, {}>;
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface Ui3nDropFilesProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
text?: string;
|
|
4
|
+
additionalText?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Ui3nDropFilesEmits {
|
|
7
|
+
(e: 'select', fileList: FileList): void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
10
|
+
title: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
};
|
|
13
|
+
text: {
|
|
14
|
+
type: import("vue").PropType<string>;
|
|
15
|
+
};
|
|
16
|
+
additionalText: {
|
|
17
|
+
type: import("vue").PropType<string>;
|
|
18
|
+
};
|
|
19
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
select: (fileList: FileList) => void;
|
|
21
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
title: {
|
|
23
|
+
type: import("vue").PropType<string>;
|
|
24
|
+
};
|
|
25
|
+
text: {
|
|
26
|
+
type: import("vue").PropType<string>;
|
|
27
|
+
};
|
|
28
|
+
additionalText: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
onSelect?: ((fileList: FileList) => any) | undefined;
|
|
33
|
+
}, {}, {}>, {
|
|
34
|
+
default?(_: {}): any;
|
|
35
|
+
}>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Ui3nEmojiProps {
|
|
2
|
+
emoji: string;
|
|
3
|
+
size?: string | number;
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Ui3nEmojiEmits {
|
|
7
|
+
(ev: 'click', value: Event): void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
|
10
|
+
emoji: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
type: import("vue").PropType<string | number>;
|
|
16
|
+
};
|
|
17
|
+
readonly: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
};
|
|
20
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
click: (value: Event) => void;
|
|
22
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
emoji: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
type: import("vue").PropType<string | number>;
|
|
29
|
+
};
|
|
30
|
+
readonly: {
|
|
31
|
+
type: import("vue").PropType<boolean>;
|
|
32
|
+
};
|
|
33
|
+
}>> & {
|
|
34
|
+
onClick?: ((value: Event) => any) | undefined;
|
|
35
|
+
}, {}, {}>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export interface Ui3nInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
autofocus?: boolean;
|
|
7
|
+
rules?: Array<(v: string) => any>;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
iconColor?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Ui3nInputEmits {
|
|
13
|
+
(ev: 'input', value: string): void;
|
|
14
|
+
(ev: 'focus', value: Event): void;
|
|
15
|
+
(ev: 'blur', value: Event): void;
|
|
16
|
+
(ev: 'clear', value: string): void;
|
|
17
|
+
(ev: 'change', value: string): void;
|
|
18
|
+
(ev: 'update:value', value: string): void;
|
|
19
|
+
(ev: 'update:valid', value: boolean): void;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import("vue").DefineComponent<{
|
|
22
|
+
value: {
|
|
23
|
+
type: import("vue").PropType<string>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
label: {
|
|
27
|
+
type: import("vue").PropType<string>;
|
|
28
|
+
};
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
};
|
|
32
|
+
clearable: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
autofocus: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
rules: {
|
|
39
|
+
type: import("vue").PropType<((v: string) => any)[]>;
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
type: import("vue").PropType<boolean>;
|
|
43
|
+
};
|
|
44
|
+
icon: {
|
|
45
|
+
type: import("vue").PropType<string>;
|
|
46
|
+
};
|
|
47
|
+
iconColor: {
|
|
48
|
+
type: import("vue").PropType<string>;
|
|
49
|
+
};
|
|
50
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
input: (value: string) => void;
|
|
52
|
+
focus: (value: Event) => void;
|
|
53
|
+
blur: (value: Event) => void;
|
|
54
|
+
clear: (value: string) => void;
|
|
55
|
+
change: (value: string) => void;
|
|
56
|
+
"update:value": (value: string) => void;
|
|
57
|
+
"update:valid": (value: boolean) => void;
|
|
58
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
value: {
|
|
60
|
+
type: import("vue").PropType<string>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
label: {
|
|
64
|
+
type: import("vue").PropType<string>;
|
|
65
|
+
};
|
|
66
|
+
placeholder: {
|
|
67
|
+
type: import("vue").PropType<string>;
|
|
68
|
+
};
|
|
69
|
+
clearable: {
|
|
70
|
+
type: import("vue").PropType<boolean>;
|
|
71
|
+
};
|
|
72
|
+
autofocus: {
|
|
73
|
+
type: import("vue").PropType<boolean>;
|
|
74
|
+
};
|
|
75
|
+
rules: {
|
|
76
|
+
type: import("vue").PropType<((v: string) => any)[]>;
|
|
77
|
+
};
|
|
78
|
+
disabled: {
|
|
79
|
+
type: import("vue").PropType<boolean>;
|
|
80
|
+
};
|
|
81
|
+
icon: {
|
|
82
|
+
type: import("vue").PropType<string>;
|
|
83
|
+
};
|
|
84
|
+
iconColor: {
|
|
85
|
+
type: import("vue").PropType<string>;
|
|
86
|
+
};
|
|
87
|
+
}>> & {
|
|
88
|
+
onFocus?: ((value: Event) => any) | undefined;
|
|
89
|
+
onBlur?: ((value: Event) => any) | undefined;
|
|
90
|
+
onChange?: ((value: string) => any) | undefined;
|
|
91
|
+
onInput?: ((value: string) => any) | undefined;
|
|
92
|
+
onClear?: ((value: string) => any) | undefined;
|
|
93
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
94
|
+
"onUpdate:valid"?: ((value: boolean) => any) | undefined;
|
|
95
|
+
}, {}, {}>;
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface Ui3nListProps<T> {
|
|
2
|
+
title?: string;
|
|
3
|
+
sticky?: boolean;
|
|
4
|
+
items: T[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface Ui3nListEmits<T> {
|
|
8
|
+
(ev: 'select', value: {
|
|
9
|
+
value: T;
|
|
10
|
+
index: number;
|
|
11
|
+
}): void;
|
|
12
|
+
}
|
|
13
|
+
export interface Ui3nListSlots<T> {
|
|
14
|
+
title?: () => any;
|
|
15
|
+
item?: ({ item, index }: {
|
|
16
|
+
item: T;
|
|
17
|
+
index: number;
|
|
18
|
+
}) => any;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: <T extends {
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
}>(__VLS_props: Ui3nListProps<T> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
|
|
23
|
+
props: Ui3nListProps<T>;
|
|
24
|
+
expose(exposed: {}): void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: Ui3nListSlots<T>;
|
|
27
|
+
emit: Ui3nListEmits<T>;
|
|
28
|
+
}, "slots" | "emit" | "attrs"> | undefined, __VLS_setup?: Promise<{
|
|
29
|
+
props: Ui3nListProps<T>;
|
|
30
|
+
expose(exposed: {}): void;
|
|
31
|
+
attrs: any;
|
|
32
|
+
slots: Ui3nListSlots<T>;
|
|
33
|
+
emit: Ui3nListEmits<T>;
|
|
34
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}> & {
|
|
37
|
+
__ctx?: {
|
|
38
|
+
props: Ui3nListProps<T>;
|
|
39
|
+
expose(exposed: {}): void;
|
|
40
|
+
attrs: any;
|
|
41
|
+
slots: Ui3nListSlots<T>;
|
|
42
|
+
emit: Ui3nListEmits<T>;
|
|
43
|
+
} | undefined;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface Ui3nMenuProps {
|
|
2
|
+
offsetX?: number;
|
|
3
|
+
offsetY?: number;
|
|
4
|
+
closeOnClick?: boolean;
|
|
5
|
+
closeOnClickOutside?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Ui3nMenuEmits {
|
|
9
|
+
(ev: 'open'): void;
|
|
10
|
+
(ev: 'opened'): void;
|
|
11
|
+
(ev: 'close'): void;
|
|
12
|
+
(ev: 'closed'): void;
|
|
13
|
+
(ev: 'click-outside'): void;
|
|
14
|
+
}
|
|
15
|
+
export interface Ui3nMenuSlots {
|
|
16
|
+
default: () => any;
|
|
17
|
+
menu?: () => any;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
20
|
+
disabled: {
|
|
21
|
+
type: import("vue").PropType<boolean>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
offsetX: {
|
|
25
|
+
type: import("vue").PropType<number>;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
offsetY: {
|
|
29
|
+
type: import("vue").PropType<number>;
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
32
|
+
closeOnClick: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
closeOnClickOutside: {
|
|
37
|
+
type: import("vue").PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
|
+
open: () => void;
|
|
42
|
+
opened: () => void;
|
|
43
|
+
close: () => void;
|
|
44
|
+
closed: () => void;
|
|
45
|
+
"click-outside": () => void;
|
|
46
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
disabled: {
|
|
48
|
+
type: import("vue").PropType<boolean>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
offsetX: {
|
|
52
|
+
type: import("vue").PropType<number>;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
offsetY: {
|
|
56
|
+
type: import("vue").PropType<number>;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
closeOnClick: {
|
|
60
|
+
type: import("vue").PropType<boolean>;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
closeOnClickOutside: {
|
|
64
|
+
type: import("vue").PropType<boolean>;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
}>> & {
|
|
68
|
+
onClose?: (() => any) | undefined;
|
|
69
|
+
onOpen?: (() => any) | undefined;
|
|
70
|
+
onOpened?: (() => any) | undefined;
|
|
71
|
+
onClosed?: (() => any) | undefined;
|
|
72
|
+
"onClick-outside"?: (() => any) | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
disabled: boolean;
|
|
75
|
+
offsetX: number;
|
|
76
|
+
offsetY: number;
|
|
77
|
+
closeOnClick: boolean;
|
|
78
|
+
closeOnClickOutside: boolean;
|
|
79
|
+
}, {}>, Ui3nMenuSlots>;
|
|
80
|
+
export default _default;
|
|
81
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -3,7 +3,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
type: import("vue").PropType<string>;
|
|
4
4
|
};
|
|
5
5
|
type: {
|
|
6
|
-
type: import("vue").PropType<"
|
|
6
|
+
type: import("vue").PropType<"error" | "success" | "warning" | "info">;
|
|
7
7
|
};
|
|
8
8
|
content: {
|
|
9
9
|
type: import("vue").PropType<string>;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
type: import("vue").PropType<string>;
|
|
20
20
|
};
|
|
21
21
|
position: {
|
|
22
|
-
type: import("vue").PropType<"
|
|
22
|
+
type: import("vue").PropType<"center" | "left" | "right">;
|
|
23
23
|
};
|
|
24
24
|
duration: {
|
|
25
25
|
type: import("vue").PropType<number>;
|
|
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
type: import("vue").PropType<string>;
|
|
39
39
|
};
|
|
40
40
|
type: {
|
|
41
|
-
type: import("vue").PropType<"
|
|
41
|
+
type: import("vue").PropType<"error" | "success" | "warning" | "info">;
|
|
42
42
|
};
|
|
43
43
|
content: {
|
|
44
44
|
type: import("vue").PropType<string>;
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
type: import("vue").PropType<string>;
|
|
55
55
|
};
|
|
56
56
|
position: {
|
|
57
|
-
type: import("vue").PropType<"
|
|
57
|
+
type: import("vue").PropType<"center" | "left" | "right">;
|
|
58
58
|
};
|
|
59
59
|
duration: {
|
|
60
60
|
type: import("vue").PropType<number>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface Ui3nTableSortIconProps {
|
|
2
|
+
size?: string | number;
|
|
3
|
+
color?: string;
|
|
4
|
+
value: 'asc' | 'desc';
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<{
|
|
7
|
+
size: {
|
|
8
|
+
type: import("vue").PropType<string | number>;
|
|
9
|
+
};
|
|
10
|
+
color: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
};
|
|
13
|
+
value: {
|
|
14
|
+
type: import("vue").PropType<"desc" | "asc">;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
size: {
|
|
19
|
+
type: import("vue").PropType<string | number>;
|
|
20
|
+
};
|
|
21
|
+
color: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
};
|
|
24
|
+
value: {
|
|
25
|
+
type: import("vue").PropType<"desc" | "asc">;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}, {}>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ListingEntryTypeExtended, EntityAction } from '../constants';
|
|
2
|
+
export interface Ui3nTableProps {
|
|
3
|
+
items: ListingEntryTypeExtended[];
|
|
4
|
+
textIfEmpty?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Ui3nTableEmits {
|
|
7
|
+
(ev: 'go', name: string): void;
|
|
8
|
+
(ev: 'action', value: {
|
|
9
|
+
action: EntityAction;
|
|
10
|
+
entity: ListingEntryTypeExtended;
|
|
11
|
+
}): void;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import("vue").DefineComponent<{
|
|
14
|
+
items: {
|
|
15
|
+
type: import("vue").PropType<ListingEntryTypeExtended[]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
textIfEmpty: {
|
|
19
|
+
type: import("vue").PropType<string>;
|
|
20
|
+
};
|
|
21
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
go: (name: string) => void;
|
|
23
|
+
action: (value: {
|
|
24
|
+
action: EntityAction;
|
|
25
|
+
entity: ListingEntryTypeExtended;
|
|
26
|
+
}) => void;
|
|
27
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
items: {
|
|
29
|
+
type: import("vue").PropType<ListingEntryTypeExtended[]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
textIfEmpty: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
};
|
|
35
|
+
}>> & {
|
|
36
|
+
onGo?: ((name: string) => any) | undefined;
|
|
37
|
+
onAction?: ((value: {
|
|
38
|
+
action: EntityAction;
|
|
39
|
+
entity: ListingEntryTypeExtended;
|
|
40
|
+
}) => any) | undefined;
|
|
41
|
+
}, {}, {}>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface Ui3nTextProps {
|
|
2
|
+
text: string;
|
|
3
|
+
rows?: number;
|
|
4
|
+
maxRows?: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
rules?: Array<(v: string) => any>;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface Ui3nTextEmits {
|
|
11
|
+
(ev: 'init', value: HTMLTextAreaElement): void;
|
|
12
|
+
(ev: 'input', value: string): void;
|
|
13
|
+
(ev: 'focus', value: Event): void;
|
|
14
|
+
(ev: 'blur', value: Event): void;
|
|
15
|
+
(ev: 'update:text', value: string): void;
|
|
16
|
+
(ev: 'update:valid', value: boolean): void;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("vue").DefineComponent<{
|
|
19
|
+
text: {
|
|
20
|
+
type: import("vue").PropType<string>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
rows: {
|
|
24
|
+
type: import("vue").PropType<number>;
|
|
25
|
+
};
|
|
26
|
+
maxRows: {
|
|
27
|
+
type: import("vue").PropType<number>;
|
|
28
|
+
};
|
|
29
|
+
label: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
};
|
|
32
|
+
placeholder: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
};
|
|
35
|
+
rules: {
|
|
36
|
+
type: import("vue").PropType<((v: string) => any)[]>;
|
|
37
|
+
};
|
|
38
|
+
disabled: {
|
|
39
|
+
type: import("vue").PropType<boolean>;
|
|
40
|
+
};
|
|
41
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
+
init: (value: HTMLTextAreaElement) => void;
|
|
43
|
+
input: (value: string) => void;
|
|
44
|
+
focus: (value: Event) => void;
|
|
45
|
+
blur: (value: Event) => void;
|
|
46
|
+
"update:text": (value: string) => void;
|
|
47
|
+
"update:valid": (value: boolean) => void;
|
|
48
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
text: {
|
|
50
|
+
type: import("vue").PropType<string>;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
rows: {
|
|
54
|
+
type: import("vue").PropType<number>;
|
|
55
|
+
};
|
|
56
|
+
maxRows: {
|
|
57
|
+
type: import("vue").PropType<number>;
|
|
58
|
+
};
|
|
59
|
+
label: {
|
|
60
|
+
type: import("vue").PropType<string>;
|
|
61
|
+
};
|
|
62
|
+
placeholder: {
|
|
63
|
+
type: import("vue").PropType<string>;
|
|
64
|
+
};
|
|
65
|
+
rules: {
|
|
66
|
+
type: import("vue").PropType<((v: string) => any)[]>;
|
|
67
|
+
};
|
|
68
|
+
disabled: {
|
|
69
|
+
type: import("vue").PropType<boolean>;
|
|
70
|
+
};
|
|
71
|
+
}>> & {
|
|
72
|
+
onFocus?: ((value: Event) => any) | undefined;
|
|
73
|
+
onBlur?: ((value: Event) => any) | undefined;
|
|
74
|
+
onInput?: ((value: string) => any) | undefined;
|
|
75
|
+
"onUpdate:valid"?: ((value: boolean) => any) | undefined;
|
|
76
|
+
onInit?: ((value: HTMLTextAreaElement) => any) | undefined;
|
|
77
|
+
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
78
|
+
}, {}, {}>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DirectiveBinding } from 'vue';
|
|
2
|
+
type ClickOutside = (event: MouseEvent) => void;
|
|
3
|
+
interface ExtendedHTMLElement extends HTMLElement {
|
|
4
|
+
clickOutside: ClickOutside;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: {
|
|
7
|
+
beforeMount(el: ExtendedHTMLElement, binding: DirectiveBinding): void;
|
|
8
|
+
beforeUnmount(el: ExtendedHTMLElement): void;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
|
+
import type { CbFunction, Ui3nNotificationProps, VueEventBus } from './constants';
|
|
2
|
+
import type { Ui3nDialogComponentProps } from './components/ui3n-dialog.vue';
|
|
3
|
+
import type { DialogInstance } from './plugins/dialogs';
|
|
1
4
|
export * from './constants';
|
|
2
5
|
export * from './tools';
|
|
3
6
|
export * from './plugins';
|
|
4
7
|
export * from './directives';
|
|
5
8
|
export * from './components';
|
|
9
|
+
declare module 'vue' {
|
|
10
|
+
interface ComponentCustomProperties {
|
|
11
|
+
$openDialog: (params: Ui3nDialogComponentProps) => DialogInstance | undefined;
|
|
12
|
+
$createNotice: (params: Ui3nNotificationProps) => void;
|
|
13
|
+
$locale: string;
|
|
14
|
+
$tr: (key: string, placeholders?: Record<string, string>) => string;
|
|
15
|
+
$changeLocale: (lang: string) => void;
|
|
16
|
+
$emitter: VueEventBus;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
declare module 'pinia' {
|
|
20
|
+
interface PiniaCustomProperties {
|
|
21
|
+
$openDialog: (params: Ui3nDialogComponentProps) => DialogInstance | undefined;
|
|
22
|
+
$createNotice: (params: Ui3nNotificationProps) => void;
|
|
23
|
+
$emitter: {
|
|
24
|
+
on: (type: string | symbol, handler: CbFunction) => void;
|
|
25
|
+
off: (type: string | symbol, handler?: CbFunction) => void;
|
|
26
|
+
emit: (type: string | symbol, arguments?: any) => void;
|
|
27
|
+
once: (type: string | symbol, handler: CbFunction) => void;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
};
|
|
30
|
+
$i18n: {
|
|
31
|
+
locale: string;
|
|
32
|
+
changeLocale: (lang: string) => void;
|
|
33
|
+
tr: (key: string, placeholders?: Record<string, string>) => string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import type { InjectionKey } from 'vue';
|
|
3
|
+
import type { Ui3nDialogComponentProps } from '../components/ui3n-dialog.vue';
|
|
4
|
+
export type DialogInstance = {
|
|
5
|
+
id: string;
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
export interface DialogsPlugin {
|
|
9
|
+
$openDialog: (params: Ui3nDialogComponentProps) => DialogInstance | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const DIALOGS_KEY: InjectionKey<DialogsPlugin>;
|
|
12
|
+
export declare const dialogs: Plugin;
|
|
13
|
+
declare module '@vue/runtime-core' {
|
|
14
|
+
interface ComponentCustomProperties {
|
|
15
|
+
$openDialog: (params: Ui3nDialogComponentProps) => DialogInstance | undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/plugins/i18n.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
|
+
import type { InjectionKey } from 'vue';
|
|
2
3
|
export interface I18nOptions {
|
|
3
4
|
lang: string;
|
|
4
5
|
messages: Record<string, Record<string, string>>;
|
|
@@ -8,6 +9,7 @@ export interface I18nPlugin {
|
|
|
8
9
|
$tr: (key: string, placeholders?: Record<string, string>) => string;
|
|
9
10
|
$changeLocale: (lang: string) => void;
|
|
10
11
|
}
|
|
12
|
+
export declare const I18N_KEY: InjectionKey<I18nPlugin>;
|
|
11
13
|
export declare const i18n: Plugin;
|
|
12
14
|
declare module '@vue/runtime-core' {
|
|
13
15
|
interface ComponentCustomProperties {
|