@shifl-inc/ui 0.1.0 → 0.2.0
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/grid/GridColumnManager.vue.d.ts +12 -34
- package/dist/components/grid/GridTooltip.vue.d.ts +9 -0
- package/dist/components/grid/ShiflGrid.vue.d.ts +15 -23
- package/dist/components/icons/InfoAlertIcon.vue.d.ts +2 -0
- package/dist/components/icons/OceanIcon.vue.d.ts +2 -0
- package/dist/components/icons/SmartTrackingIcon.vue.d.ts +2 -0
- package/dist/components/icons/SortAscendingIcon.vue.d.ts +2 -0
- package/dist/components/icons/SortDescendingIcon.vue.d.ts +2 -0
- package/dist/composables/useBreakpoints.d.ts +3 -3
- package/dist/composables/useGridActionMenu.d.ts +25 -0
- package/dist/composables/useGridColumns.d.ts +104 -50
- package/dist/composables/useGridData.d.ts +1 -1
- package/dist/composables/useGridFilter.d.ts +1 -3
- package/dist/composables/useGridSelection.d.ts +4 -9
- package/dist/composables/useGridSort.d.ts +7 -13
- package/dist/composables/useGridTheme.d.ts +11 -15
- package/dist/plugins/install.d.ts +1 -1
- package/dist/shifl-ui.js +1073 -616
- package/dist/shifl-ui.umd +4 -1
- package/dist/stores/gridStore.d.ts +2 -7
- package/dist/style.css +1 -778
- package/dist/types/grid.d.ts +84 -54
- package/dist/types/theme.d.ts +8 -8
- package/package.json +1 -1
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { NormalizedGridColumn } from '../../types/grid';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
titlePrefix?: string;
|
|
4
|
+
columns: NormalizedGridColumn[];
|
|
5
5
|
};
|
|
6
|
-
declare const _default: import('vue').DefineComponent<
|
|
7
|
-
__VLS_Props,
|
|
8
|
-
{},
|
|
9
|
-
{},
|
|
10
|
-
{},
|
|
11
|
-
{},
|
|
12
|
-
import('vue').ComponentOptionsMixin,
|
|
13
|
-
import('vue').ComponentOptionsMixin,
|
|
14
|
-
{
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
7
|
close: () => any;
|
|
16
8
|
toggle: (key: string) => any;
|
|
17
9
|
move: (fromIndex: number, toIndex: number) => any;
|
|
@@ -19,27 +11,13 @@ declare const _default: import('vue').DefineComponent<
|
|
|
19
11
|
selectAll: () => any;
|
|
20
12
|
deselectAll: () => any;
|
|
21
13
|
restoreDefault: () => any;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onSelectAll?: (() => any) | undefined;
|
|
32
|
-
onDeselectAll?: (() => any) | undefined;
|
|
33
|
-
onRestoreDefault?: (() => any) | undefined;
|
|
34
|
-
}>,
|
|
35
|
-
{},
|
|
36
|
-
{},
|
|
37
|
-
{},
|
|
38
|
-
{},
|
|
39
|
-
string,
|
|
40
|
-
import('vue').ComponentProvideOptions,
|
|
41
|
-
false,
|
|
42
|
-
{},
|
|
43
|
-
HTMLDivElement
|
|
44
|
-
>;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onClose?: (() => any) | undefined;
|
|
16
|
+
onToggle?: ((key: string) => any) | undefined;
|
|
17
|
+
onMove?: ((fromIndex: number, toIndex: number) => any) | undefined;
|
|
18
|
+
onToggleFrozen?: ((key: string) => any) | undefined;
|
|
19
|
+
onSelectAll?: (() => any) | undefined;
|
|
20
|
+
onDeselectAll?: (() => any) | undefined;
|
|
21
|
+
onRestoreDefault?: (() => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
45
23
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: string;
|
|
3
|
+
visible: boolean;
|
|
4
|
+
triggerElement?: HTMLElement | null;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
7
|
+
tooltipRef: HTMLDivElement;
|
|
8
|
+
}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
import { GridConfig } from '../../types/grid';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
3
|
+
config: GridConfig<Record<string, unknown>>;
|
|
4
|
+
search?: string;
|
|
5
|
+
loading?: boolean;
|
|
4
6
|
};
|
|
5
|
-
declare const _default: import('vue').DefineComponent<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{},
|
|
18
|
-
{},
|
|
19
|
-
{},
|
|
20
|
-
{},
|
|
21
|
-
string,
|
|
22
|
-
import('vue').ComponentProvideOptions,
|
|
23
|
-
false,
|
|
24
|
-
{},
|
|
25
|
-
HTMLDivElement
|
|
26
|
-
>;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"action-click": (actionKey: string, row: Record<string, unknown>, rowIndex: number) => any;
|
|
9
|
+
"search-change": (searchValue: string) => any;
|
|
10
|
+
"pagination-change": (page: number, rowsPerPage: number) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onAction-click"?: ((actionKey: string, row: Record<string, unknown>, rowIndex: number) => any) | undefined;
|
|
13
|
+
"onSearch-change"?: ((searchValue: string) => any) | undefined;
|
|
14
|
+
"onPagination-change"?: ((page: number, rowsPerPage: number) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
'(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)': HTMLDivElement;
|
|
17
|
+
actionMenuRef: HTMLDivElement;
|
|
18
|
+
}, HTMLDivElement>;
|
|
27
19
|
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function useBreakpoints(): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
width: import('vue').Ref<number, number>;
|
|
3
|
+
isMobile: import('vue').ComputedRef<boolean>;
|
|
4
|
+
isTablet: import('vue').ComputedRef<boolean>;
|
|
5
5
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ActionMenuState {
|
|
2
|
+
rowIndex: number | null;
|
|
3
|
+
position: {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
} | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function useGridActionMenu(): {
|
|
9
|
+
menuState: import('vue').Ref<{
|
|
10
|
+
rowIndex: number | null;
|
|
11
|
+
position: {
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
} | null;
|
|
15
|
+
}, ActionMenuState | {
|
|
16
|
+
rowIndex: number | null;
|
|
17
|
+
position: {
|
|
18
|
+
top: number;
|
|
19
|
+
left: number;
|
|
20
|
+
} | null;
|
|
21
|
+
}>;
|
|
22
|
+
openMenu: (rowIndex: number, triggerElement: HTMLElement) => void;
|
|
23
|
+
closeMenu: () => void;
|
|
24
|
+
isMenuOpen: (rowIndex: number) => boolean;
|
|
25
|
+
};
|
|
@@ -1,26 +1,81 @@
|
|
|
1
1
|
import { NormalizedGridColumn } from '../types/grid';
|
|
2
2
|
export declare function useGridColumns(initialColumns: NormalizedGridColumn[]): {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
columns: import('vue').Ref<{
|
|
4
|
+
frozen: boolean;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
order?: number | undefined;
|
|
9
|
+
sortable?: boolean | undefined;
|
|
10
|
+
width?: string | undefined;
|
|
11
|
+
height?: string | undefined;
|
|
12
|
+
isDefault?: boolean | undefined;
|
|
13
|
+
fixed?: boolean | undefined;
|
|
14
|
+
protected?: boolean | undefined;
|
|
15
|
+
cellMetadata?: {
|
|
16
|
+
format?: string | undefined;
|
|
17
|
+
emptyState?: string | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
actionColumn?: {
|
|
20
|
+
type: "action";
|
|
21
|
+
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
22
|
+
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
icon?: string | (() => unknown) | undefined;
|
|
26
|
+
danger?: boolean | undefined;
|
|
27
|
+
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
28
|
+
}[];
|
|
29
|
+
width?: string | undefined;
|
|
30
|
+
frozen?: boolean | undefined;
|
|
31
|
+
order?: number | undefined;
|
|
32
|
+
label?: string | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
smartTrackingColumn?: {
|
|
35
|
+
type: "smart-tracking";
|
|
36
|
+
dataKey: string;
|
|
37
|
+
icon?: string | (() => unknown) | undefined;
|
|
38
|
+
width?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
}[], NormalizedGridColumn[] | {
|
|
41
|
+
frozen: boolean;
|
|
42
|
+
visible: boolean;
|
|
43
|
+
key: string;
|
|
44
|
+
label: string;
|
|
45
|
+
order?: number | undefined;
|
|
46
|
+
sortable?: boolean | undefined;
|
|
47
|
+
width?: string | undefined;
|
|
48
|
+
height?: string | undefined;
|
|
49
|
+
isDefault?: boolean | undefined;
|
|
50
|
+
fixed?: boolean | undefined;
|
|
51
|
+
protected?: boolean | undefined;
|
|
52
|
+
cellMetadata?: {
|
|
17
53
|
format?: string | undefined;
|
|
18
54
|
emptyState?: string | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
55
|
+
} | undefined;
|
|
56
|
+
actionColumn?: {
|
|
57
|
+
type: "action";
|
|
58
|
+
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
59
|
+
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
60
|
+
key: string;
|
|
61
|
+
label: string;
|
|
62
|
+
icon?: string | (() => unknown) | undefined;
|
|
63
|
+
danger?: boolean | undefined;
|
|
64
|
+
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
width?: string | undefined;
|
|
67
|
+
frozen?: boolean | undefined;
|
|
68
|
+
order?: number | undefined;
|
|
69
|
+
label?: string | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
smartTrackingColumn?: {
|
|
72
|
+
type: "smart-tracking";
|
|
73
|
+
dataKey: string;
|
|
74
|
+
icon?: string | (() => unknown) | undefined;
|
|
75
|
+
width?: string | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
}[]>;
|
|
78
|
+
visibleColumns: import('vue').ComputedRef<{
|
|
24
79
|
frozen: boolean;
|
|
25
80
|
visible: boolean;
|
|
26
81
|
key: string;
|
|
@@ -31,37 +86,36 @@ export declare function useGridColumns(initialColumns: NormalizedGridColumn[]):
|
|
|
31
86
|
height?: string | undefined;
|
|
32
87
|
isDefault?: boolean | undefined;
|
|
33
88
|
fixed?: boolean | undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
format?: string | undefined;
|
|
37
|
-
emptyState?: string | undefined;
|
|
38
|
-
}
|
|
39
|
-
| undefined;
|
|
40
|
-
}[]
|
|
41
|
-
>;
|
|
42
|
-
visibleColumns: import('vue').ComputedRef<
|
|
43
|
-
{
|
|
44
|
-
frozen: boolean;
|
|
45
|
-
visible: boolean;
|
|
46
|
-
key: string;
|
|
47
|
-
label: string;
|
|
48
|
-
order?: number | undefined;
|
|
49
|
-
sortable?: boolean | undefined;
|
|
50
|
-
width?: string | undefined;
|
|
51
|
-
height?: string | undefined;
|
|
52
|
-
isDefault?: boolean | undefined;
|
|
53
|
-
fixed?: boolean | undefined;
|
|
54
|
-
cellMetadata?:
|
|
55
|
-
| {
|
|
89
|
+
protected?: boolean | undefined;
|
|
90
|
+
cellMetadata?: {
|
|
56
91
|
format?: string | undefined;
|
|
57
92
|
emptyState?: string | undefined;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
93
|
+
} | undefined;
|
|
94
|
+
actionColumn?: {
|
|
95
|
+
type: "action";
|
|
96
|
+
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
97
|
+
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
98
|
+
key: string;
|
|
99
|
+
label: string;
|
|
100
|
+
icon?: string | (() => unknown) | undefined;
|
|
101
|
+
danger?: boolean | undefined;
|
|
102
|
+
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
width?: string | undefined;
|
|
105
|
+
frozen?: boolean | undefined;
|
|
106
|
+
order?: number | undefined;
|
|
107
|
+
label?: string | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
smartTrackingColumn?: {
|
|
110
|
+
type: "smart-tracking";
|
|
111
|
+
dataKey: string;
|
|
112
|
+
icon?: string | (() => unknown) | undefined;
|
|
113
|
+
width?: string | undefined;
|
|
114
|
+
} | undefined;
|
|
115
|
+
}[]>;
|
|
116
|
+
toggleColumnVisibility: (key: string) => void;
|
|
117
|
+
setAllVisible: (visible: boolean) => void;
|
|
118
|
+
toggleFrozen: (key: string) => void;
|
|
119
|
+
moveColumn: (fromIndex: number, toIndex: number) => void;
|
|
120
|
+
resetColumns: () => void;
|
|
67
121
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export declare function useGridFilter(): {
|
|
2
|
-
|
|
3
|
-
setGlobalFilter: (value: string) => void;
|
|
4
|
-
applyGlobalFilter: <T extends Record<string, unknown>>(rows: T[], keys?: string[]) => T[];
|
|
2
|
+
applyGlobalFilter: <T extends Record<string, unknown>>(rows: T[], keys?: string[], searchValue?: string) => T[];
|
|
5
3
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
export declare function useGridSelection<
|
|
2
|
-
T extends {
|
|
1
|
+
export declare function useGridSelection<T extends {
|
|
3
2
|
id?: string | number;
|
|
4
|
-
|
|
5
|
-
>()
|
|
6
|
-
|
|
7
|
-
Set<string | number> & Omit<Set<string | number>, keyof Set<any>>,
|
|
8
|
-
Set<string | number> | (Set<string | number> & Omit<Set<string | number>, keyof Set<any>>)
|
|
9
|
-
>;
|
|
10
|
-
toggleRow: (row: T) => void;
|
|
3
|
+
}>(): {
|
|
4
|
+
selectedKeys: import('vue').Ref<Set<string | number> & Omit<Set<string | number>, keyof Set<any>>, Set<string | number> | (Set<string | number> & Omit<Set<string | number>, keyof Set<any>>)>;
|
|
5
|
+
toggleRow: (row: T) => void;
|
|
11
6
|
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { GridSort } from '../types/grid';
|
|
2
2
|
export declare function useGridSort(initialSort?: GridSort): {
|
|
3
|
-
|
|
4
|
-
| {
|
|
3
|
+
sort: import('vue').Ref<{
|
|
5
4
|
key: string;
|
|
6
|
-
order:
|
|
7
|
-
|
|
8
|
-
| undefined,
|
|
9
|
-
| GridSort
|
|
10
|
-
| {
|
|
5
|
+
order: "asc" | "desc";
|
|
6
|
+
} | undefined, GridSort | {
|
|
11
7
|
key: string;
|
|
12
|
-
order:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
setSort: (key: string) => void;
|
|
17
|
-
applySort: <T extends Record<string, unknown>>(rows: T[]) => T[];
|
|
8
|
+
order: "asc" | "desc";
|
|
9
|
+
} | undefined>;
|
|
10
|
+
setSort: (key: string) => void;
|
|
11
|
+
applySort: <T extends Record<string, unknown>>(rows: T[]) => T[];
|
|
18
12
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ThemeTokens } from '../types/theme';
|
|
2
|
-
export declare function provideGridTheme(tokens?: Partial<ThemeTokens>): import('vue').Ref<
|
|
3
|
-
{
|
|
2
|
+
export declare function provideGridTheme(tokens?: Partial<ThemeTokens>): import('vue').Ref<{
|
|
4
3
|
surface: string;
|
|
5
4
|
surfaceAlt: string;
|
|
6
5
|
border: string;
|
|
@@ -9,17 +8,14 @@ export declare function provideGridTheme(tokens?: Partial<ThemeTokens>): import(
|
|
|
9
8
|
accent: string;
|
|
10
9
|
accentStrong: string;
|
|
11
10
|
focus: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
focus: string;
|
|
23
|
-
}
|
|
24
|
-
>;
|
|
11
|
+
}, ThemeTokens | {
|
|
12
|
+
surface: string;
|
|
13
|
+
surfaceAlt: string;
|
|
14
|
+
border: string;
|
|
15
|
+
text: string;
|
|
16
|
+
textMuted: string;
|
|
17
|
+
accent: string;
|
|
18
|
+
accentStrong: string;
|
|
19
|
+
focus: string;
|
|
20
|
+
}>;
|
|
25
21
|
export declare function useGridTheme(): import('vue').ComputedRef<ThemeTokens>;
|