@shifl-inc/ui 0.9.4 → 0.9.6
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/shifl-ui.js +3603 -1255
- package/dist/shifl-ui.umd +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/grid/GridColumnManager.vue.d.ts +0 -23
- package/dist/components/grid/GridEmptyState.vue.d.ts +0 -7
- package/dist/components/grid/GridTooltip.vue.d.ts +0 -10
- package/dist/components/grid/ShiflGrid.vue.d.ts +0 -21
- package/dist/components/icons/CloseCircleIcon.vue.d.ts +0 -2
- package/dist/components/icons/CopyIcon.vue.d.ts +0 -2
- package/dist/components/icons/ExportIcon.vue.d.ts +0 -7
- package/dist/components/icons/InfoAlertIcon.vue.d.ts +0 -2
- package/dist/components/icons/OceanIcon.vue.d.ts +0 -2
- package/dist/components/icons/RightICirclecon.vue.d.ts +0 -2
- package/dist/components/icons/SmartTrackingIcon.vue.d.ts +0 -2
- package/dist/components/icons/SortAscendingIcon.vue.d.ts +0 -14
- package/dist/components/icons/SortDescendingIcon.vue.d.ts +0 -2
- package/dist/composables/useBreakpoints.d.ts +0 -5
- package/dist/composables/useGridActionMenu.d.ts +0 -25
- package/dist/composables/useGridApi.d.ts +0 -22
- package/dist/composables/useGridColumns.d.ts +0 -124
- package/dist/composables/useGridData.d.ts +0 -38
- package/dist/composables/useGridEditing.d.ts +0 -1
- package/dist/composables/useGridFilter.d.ts +0 -3
- package/dist/composables/useGridInfiniteScroll.d.ts +0 -1
- package/dist/composables/useGridSelection.d.ts +0 -6
- package/dist/composables/useGridSort.d.ts +0 -12
- package/dist/composables/useGridTheme.d.ts +0 -21
- package/dist/composables/useGridTour.d.ts +0 -1
- package/dist/composables/useVirtualScroll.d.ts +0 -1
- package/dist/config/defaults.d.ts +0 -2
- package/dist/index.d.ts +0 -15
- package/dist/plugins/install.d.ts +0 -5
- package/dist/stores/gridStore.d.ts +0 -3
- package/dist/types/grid.d.ts +0 -168
- package/dist/types/theme.d.ts +0 -10
- package/dist/utils/export.d.ts +0 -40
- package/dist/utils/normalize.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { NormalizedGridColumn } from '../../types/grid';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
titlePrefix?: string;
|
|
4
|
-
columns: NormalizedGridColumn[];
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
close: () => any;
|
|
8
|
-
toggle: (key: string) => any;
|
|
9
|
-
move: (fromIndex: number, toIndex: number) => any;
|
|
10
|
-
toggleFreeze: (key: string) => any;
|
|
11
|
-
selectAll: () => any;
|
|
12
|
-
deselectAll: () => any;
|
|
13
|
-
restoreDefault: () => any;
|
|
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
|
-
onToggleFreeze?: ((key: string) => any) | undefined;
|
|
19
|
-
onSelectAll?: (() => any) | undefined;
|
|
20
|
-
onDeselectAll?: (() => any) | undefined;
|
|
21
|
-
onRestoreDefault?: (() => any) | undefined;
|
|
22
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
iconName: string;
|
|
3
|
-
title: string;
|
|
4
|
-
description: string;
|
|
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, {}, HTMLDivElement>;
|
|
7
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
content: string;
|
|
3
|
-
visible: boolean;
|
|
4
|
-
triggerElement?: HTMLElement | null;
|
|
5
|
-
isHtml?: boolean;
|
|
6
|
-
};
|
|
7
|
-
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, {
|
|
8
|
-
tooltipRef: HTMLDivElement;
|
|
9
|
-
}, any>;
|
|
10
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { GridConfig } from '../../types/grid';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
config: GridConfig<Record<string, unknown>>;
|
|
4
|
-
search?: string;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
};
|
|
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
|
-
"row-click": (row: Record<string, unknown>) => any;
|
|
12
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
-
"onAction-click"?: ((actionKey: string, row: Record<string, unknown>, rowIndex: number) => any) | undefined;
|
|
14
|
-
"onSearch-change"?: ((searchValue: string) => any) | undefined;
|
|
15
|
-
"onPagination-change"?: ((page: number, rowsPerPage: number) => any) | undefined;
|
|
16
|
-
"onRow-click"?: ((row: Record<string, unknown>) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
-
'(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)': HTMLDivElement;
|
|
19
|
-
actionMenuRef: HTMLDivElement;
|
|
20
|
-
}, any>;
|
|
21
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
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,2 +0,0 @@
|
|
|
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,7 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
color?: string;
|
|
3
|
-
}
|
|
4
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
5
|
-
color: string;
|
|
6
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
|
7
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
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,2 +0,0 @@
|
|
|
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,2 +0,0 @@
|
|
|
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,2 +0,0 @@
|
|
|
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,14 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
color: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
-
color: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
}>> & Readonly<{}>, {
|
|
12
|
-
color: string;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
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, menuWidth?: number) => void;
|
|
23
|
-
closeMenu: () => void;
|
|
24
|
-
isMenuOpen: (rowIndex: number) => boolean;
|
|
25
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ApiConfig, ApiRequestContext } from '../types/grid';
|
|
2
|
-
export declare function useGridApi<T = Record<string, unknown>>(apiUrl: string, apiConfig?: ApiConfig): {
|
|
3
|
-
loading: import('vue').ComputedRef<boolean>;
|
|
4
|
-
error: import('vue').ComputedRef<Error | null>;
|
|
5
|
-
data: import('vue').ComputedRef<import('@vue/reactivity').UnwrapRefSimple<T>[]>;
|
|
6
|
-
paginationMeta: import('vue').ComputedRef<{
|
|
7
|
-
show?: boolean | undefined;
|
|
8
|
-
currentPage?: number | undefined;
|
|
9
|
-
lastPage?: number | undefined;
|
|
10
|
-
firstPageUrl?: string | undefined;
|
|
11
|
-
lastPageUrl?: string | undefined;
|
|
12
|
-
nextPageUrl?: string | null | undefined;
|
|
13
|
-
prevPageUrl?: string | null | undefined;
|
|
14
|
-
from?: number | undefined;
|
|
15
|
-
to?: number | undefined;
|
|
16
|
-
perPage?: number | undefined;
|
|
17
|
-
total?: number | undefined;
|
|
18
|
-
} | undefined>;
|
|
19
|
-
fetchData: (context: ApiRequestContext) => Promise<void>;
|
|
20
|
-
fetchDataDebounced: (context: ApiRequestContext, immediate?: boolean) => void;
|
|
21
|
-
refresh: (context: ApiRequestContext) => void;
|
|
22
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { NormalizedGridColumn } from '../types/grid';
|
|
2
|
-
export declare function useGridColumns(initialColumns: NormalizedGridColumn[]): {
|
|
3
|
-
columns: import('vue').Ref<{
|
|
4
|
-
freeze: 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
|
-
protected?: boolean | undefined;
|
|
14
|
-
actionColumn?: {
|
|
15
|
-
type: "action";
|
|
16
|
-
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
17
|
-
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
18
|
-
key: string;
|
|
19
|
-
label: string;
|
|
20
|
-
icon?: string | (() => unknown) | undefined;
|
|
21
|
-
danger?: boolean | undefined;
|
|
22
|
-
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
23
|
-
}[];
|
|
24
|
-
width?: string | undefined;
|
|
25
|
-
freeze?: boolean | undefined;
|
|
26
|
-
order?: number | undefined;
|
|
27
|
-
label?: string | undefined;
|
|
28
|
-
} | undefined;
|
|
29
|
-
smartTrackingColumn?: {
|
|
30
|
-
type: "smart-tracking";
|
|
31
|
-
dataKey: string;
|
|
32
|
-
icon?: string | (() => unknown) | undefined;
|
|
33
|
-
width?: string | undefined;
|
|
34
|
-
} | undefined;
|
|
35
|
-
blankStyle?: import('../types/grid').GridBlankStyle | undefined;
|
|
36
|
-
cellType?: import('../types/grid').GridCellType | import('../types/grid').GridCellType[] | undefined;
|
|
37
|
-
truncate?: boolean | undefined;
|
|
38
|
-
filterable?: boolean | undefined;
|
|
39
|
-
filterType?: import('../types/grid').GridFilterType | import('../types/grid').GridFilterType[] | undefined;
|
|
40
|
-
align?: import('../types/grid').GridCellAlign | undefined;
|
|
41
|
-
}[], NormalizedGridColumn[] | {
|
|
42
|
-
freeze: boolean;
|
|
43
|
-
visible: boolean;
|
|
44
|
-
key: string;
|
|
45
|
-
label: string;
|
|
46
|
-
order?: number | undefined;
|
|
47
|
-
sortable?: boolean | undefined;
|
|
48
|
-
width?: string | undefined;
|
|
49
|
-
height?: string | undefined;
|
|
50
|
-
isDefault?: boolean | undefined;
|
|
51
|
-
protected?: boolean | undefined;
|
|
52
|
-
actionColumn?: {
|
|
53
|
-
type: "action";
|
|
54
|
-
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
55
|
-
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
56
|
-
key: string;
|
|
57
|
-
label: string;
|
|
58
|
-
icon?: string | (() => unknown) | undefined;
|
|
59
|
-
danger?: boolean | undefined;
|
|
60
|
-
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
61
|
-
}[];
|
|
62
|
-
width?: string | undefined;
|
|
63
|
-
freeze?: boolean | undefined;
|
|
64
|
-
order?: number | undefined;
|
|
65
|
-
label?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
smartTrackingColumn?: {
|
|
68
|
-
type: "smart-tracking";
|
|
69
|
-
dataKey: string;
|
|
70
|
-
icon?: string | (() => unknown) | undefined;
|
|
71
|
-
width?: string | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
blankStyle?: import('../types/grid').GridBlankStyle | undefined;
|
|
74
|
-
cellType?: import('../types/grid').GridCellType | import('../types/grid').GridCellType[] | undefined;
|
|
75
|
-
truncate?: boolean | undefined;
|
|
76
|
-
filterable?: boolean | undefined;
|
|
77
|
-
filterType?: import('../types/grid').GridFilterType | import('../types/grid').GridFilterType[] | undefined;
|
|
78
|
-
align?: import('../types/grid').GridCellAlign | undefined;
|
|
79
|
-
}[]>;
|
|
80
|
-
visibleColumns: import('vue').ComputedRef<{
|
|
81
|
-
freeze: boolean;
|
|
82
|
-
visible: boolean;
|
|
83
|
-
key: string;
|
|
84
|
-
label: string;
|
|
85
|
-
order?: number | undefined;
|
|
86
|
-
sortable?: boolean | undefined;
|
|
87
|
-
width?: string | undefined;
|
|
88
|
-
height?: string | undefined;
|
|
89
|
-
isDefault?: boolean | undefined;
|
|
90
|
-
protected?: boolean | undefined;
|
|
91
|
-
actionColumn?: {
|
|
92
|
-
type: "action";
|
|
93
|
-
icon?: string | ((row: Record<string, unknown>) => unknown) | undefined;
|
|
94
|
-
actions: ((row: Record<string, unknown>) => import('../types/grid').GridAction[]) | {
|
|
95
|
-
key: string;
|
|
96
|
-
label: string;
|
|
97
|
-
icon?: string | (() => unknown) | undefined;
|
|
98
|
-
danger?: boolean | undefined;
|
|
99
|
-
show?: ((row: Record<string, unknown>) => boolean) | undefined;
|
|
100
|
-
}[];
|
|
101
|
-
width?: string | undefined;
|
|
102
|
-
freeze?: boolean | undefined;
|
|
103
|
-
order?: number | undefined;
|
|
104
|
-
label?: string | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
smartTrackingColumn?: {
|
|
107
|
-
type: "smart-tracking";
|
|
108
|
-
dataKey: string;
|
|
109
|
-
icon?: string | (() => unknown) | undefined;
|
|
110
|
-
width?: string | undefined;
|
|
111
|
-
} | undefined;
|
|
112
|
-
blankStyle?: import('../types/grid').GridBlankStyle | undefined;
|
|
113
|
-
cellType?: import('../types/grid').GridCellType | import('../types/grid').GridCellType[] | undefined;
|
|
114
|
-
truncate?: boolean | undefined;
|
|
115
|
-
filterable?: boolean | undefined;
|
|
116
|
-
filterType?: import('../types/grid').GridFilterType | import('../types/grid').GridFilterType[] | undefined;
|
|
117
|
-
align?: import('../types/grid').GridCellAlign | undefined;
|
|
118
|
-
}[]>;
|
|
119
|
-
toggleColumnVisibility: (key: string) => void;
|
|
120
|
-
setAllVisible: (visible: boolean) => void;
|
|
121
|
-
toggleFreeze: (key: string) => void;
|
|
122
|
-
moveColumn: (fromIndex: number, toIndex: number) => void;
|
|
123
|
-
resetColumns: () => void;
|
|
124
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { NormalizedGridConfig, GridFilter, GridSort } from '../types/grid';
|
|
3
|
-
export interface UseGridDataOptions {
|
|
4
|
-
search?: Ref<string | undefined>;
|
|
5
|
-
filters?: Ref<GridFilter[] | undefined>;
|
|
6
|
-
sort?: Ref<GridSort | undefined>;
|
|
7
|
-
pagination?: Ref<{
|
|
8
|
-
page: number;
|
|
9
|
-
perPage: number;
|
|
10
|
-
} | undefined>;
|
|
11
|
-
extraState?: Ref<Record<string, unknown> | undefined>;
|
|
12
|
-
tabName?: Ref<string | undefined>;
|
|
13
|
-
}
|
|
14
|
-
export declare function useGridData<T>(config: NormalizedGridConfig<T>, options?: UseGridDataOptions): {
|
|
15
|
-
rows: import('vue').ComputedRef<import('@vue/reactivity').UnwrapRefSimple<T>[]>;
|
|
16
|
-
loading: import('vue').ComputedRef<boolean>;
|
|
17
|
-
error: import('vue').ComputedRef<Error | null>;
|
|
18
|
-
paginationMeta: import('vue').ComputedRef<{
|
|
19
|
-
show?: boolean | undefined;
|
|
20
|
-
currentPage?: number | undefined;
|
|
21
|
-
lastPage?: number | undefined;
|
|
22
|
-
firstPageUrl?: string | undefined;
|
|
23
|
-
lastPageUrl?: string | undefined;
|
|
24
|
-
nextPageUrl?: string | null | undefined;
|
|
25
|
-
prevPageUrl?: string | null | undefined;
|
|
26
|
-
from?: number | undefined;
|
|
27
|
-
to?: number | undefined;
|
|
28
|
-
perPage?: number | undefined;
|
|
29
|
-
total?: number | undefined;
|
|
30
|
-
} | undefined>;
|
|
31
|
-
refresh: () => void;
|
|
32
|
-
} | {
|
|
33
|
-
rows: import('vue').ComputedRef<T[]>;
|
|
34
|
-
loading: import('vue').ComputedRef<boolean>;
|
|
35
|
-
error: import('vue').ComputedRef<null>;
|
|
36
|
-
paginationMeta: import('vue').ComputedRef<import('../types/grid').PaginationMeta | undefined>;
|
|
37
|
-
refresh: () => void;
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useGridEditing(): {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useGridInfiniteScroll(): {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function useGridSelection<T extends {
|
|
2
|
-
id?: string | number;
|
|
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;
|
|
6
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GridSort } from '../types/grid';
|
|
2
|
-
export declare function useGridSort(initialSort?: GridSort): {
|
|
3
|
-
sort: import('vue').Ref<{
|
|
4
|
-
key: string;
|
|
5
|
-
order: "asc" | "desc";
|
|
6
|
-
} | undefined, GridSort | {
|
|
7
|
-
key: string;
|
|
8
|
-
order: "asc" | "desc";
|
|
9
|
-
} | undefined>;
|
|
10
|
-
setSort: (key: string) => void;
|
|
11
|
-
applySort: <T extends Record<string, unknown>>(rows: T[]) => T[];
|
|
12
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ThemeTokens } from '../types/theme';
|
|
2
|
-
export declare function provideGridTheme(tokens?: Partial<ThemeTokens>): import('vue').Ref<{
|
|
3
|
-
surface: string;
|
|
4
|
-
surfaceAlt: string;
|
|
5
|
-
border: string;
|
|
6
|
-
text: string;
|
|
7
|
-
textMuted: string;
|
|
8
|
-
accent: string;
|
|
9
|
-
accentStrong: string;
|
|
10
|
-
focus: string;
|
|
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
|
-
}>;
|
|
21
|
-
export declare function useGridTheme(): import('vue').ComputedRef<ThemeTokens>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useGridTour(): {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useVirtualScroll(): {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { default as ShiflGrid } from './components/grid/ShiflGrid.vue';
|
|
2
|
-
export { default as ShiflGridPlugin } from './plugins/install';
|
|
3
|
-
export * from './composables/useGridColumns';
|
|
4
|
-
export * from './composables/useGridSort';
|
|
5
|
-
export * from './composables/useGridFilter';
|
|
6
|
-
export * from './composables/useGridData';
|
|
7
|
-
export * from './composables/useGridSelection';
|
|
8
|
-
export * from './composables/useGridEditing';
|
|
9
|
-
export * from './composables/useGridTheme';
|
|
10
|
-
export * from './composables/useBreakpoints';
|
|
11
|
-
export * from './composables/useGridInfiniteScroll';
|
|
12
|
-
export * from './composables/useVirtualScroll';
|
|
13
|
-
export * from './composables/useGridTour';
|
|
14
|
-
export * from './types/grid';
|
|
15
|
-
export * from './types/theme';
|
package/dist/types/grid.d.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
export type GridViewType = 'regular' | 'compact' | 'comfortable';
|
|
2
|
-
export interface GridAction {
|
|
3
|
-
key: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon?: string | (() => unknown);
|
|
6
|
-
danger?: boolean;
|
|
7
|
-
show?: (row: Record<string, unknown>) => boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface GridActionColumn {
|
|
10
|
-
type: 'action';
|
|
11
|
-
icon?: string | ((row: Record<string, unknown>) => unknown);
|
|
12
|
-
actions: GridAction[] | ((row: Record<string, unknown>) => GridAction[]);
|
|
13
|
-
width?: string;
|
|
14
|
-
freeze?: boolean;
|
|
15
|
-
order?: number;
|
|
16
|
-
label?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SmartTrackingColumn {
|
|
19
|
-
type: 'smart-tracking';
|
|
20
|
-
dataKey: string;
|
|
21
|
-
icon?: string | (() => unknown);
|
|
22
|
-
width?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface GridColumn {
|
|
25
|
-
key: string;
|
|
26
|
-
label: string;
|
|
27
|
-
order?: number;
|
|
28
|
-
sortable?: boolean;
|
|
29
|
-
width?: string;
|
|
30
|
-
height?: string;
|
|
31
|
-
isDefault?: boolean;
|
|
32
|
-
freeze?: boolean;
|
|
33
|
-
visible?: boolean;
|
|
34
|
-
/** Protected columns are hidden from column editor and cannot be modified */
|
|
35
|
-
protected?: boolean;
|
|
36
|
-
/** Action column configuration */
|
|
37
|
-
actionColumn?: GridActionColumn;
|
|
38
|
-
/** Smart Tracking column configuration */
|
|
39
|
-
smartTrackingColumn?: SmartTrackingColumn;
|
|
40
|
-
/** Controls how empty/null/undefined values are displayed */
|
|
41
|
-
blankStyle?: GridBlankStyle;
|
|
42
|
-
/** Cell type configuration */
|
|
43
|
-
cellType?: CompositeGridCellType;
|
|
44
|
-
/** Truncate long text (default: true) */
|
|
45
|
-
truncate?: boolean;
|
|
46
|
-
/** Whether column is filterable (default: false) */
|
|
47
|
-
filterable?: boolean;
|
|
48
|
-
/** Filter type for this column */
|
|
49
|
-
filterType?: CompositeGridFilterType;
|
|
50
|
-
/** Text alignment */
|
|
51
|
-
align?: GridCellAlign;
|
|
52
|
-
}
|
|
53
|
-
export type GridCellAlign = 'left' | 'center' | 'right';
|
|
54
|
-
export type GridBlankStyle = 'dash' | 'empty' | 'zero' | 'na' | 'custom';
|
|
55
|
-
export type GridCellType = 'text' | 'number' | 'date' | 'icon' | 'badge' | 'action' | 'link' | 'status' | 'progress' | 'currency' | 'boolean';
|
|
56
|
-
export type CompositeGridCellType = GridCellType | GridCellType[];
|
|
57
|
-
export type CompositeGridFilterType = GridFilterType | GridFilterType[];
|
|
58
|
-
export type GridFilterType = 'text' | 'number' | 'listReference' | 'datePicker' | 'boolean' | 'range' | 'search';
|
|
59
|
-
export interface GridFilter {
|
|
60
|
-
key: string;
|
|
61
|
-
label: string;
|
|
62
|
-
placeholder?: string;
|
|
63
|
-
inputType?: string;
|
|
64
|
-
dataType?: string;
|
|
65
|
-
operator?: string;
|
|
66
|
-
value?: unknown;
|
|
67
|
-
}
|
|
68
|
-
export interface GridSort {
|
|
69
|
-
key: string;
|
|
70
|
-
order: 'asc' | 'desc';
|
|
71
|
-
}
|
|
72
|
-
export interface PaginationMeta {
|
|
73
|
-
show?: boolean;
|
|
74
|
-
currentPage?: number;
|
|
75
|
-
lastPage?: number;
|
|
76
|
-
firstPageUrl?: string;
|
|
77
|
-
lastPageUrl?: string;
|
|
78
|
-
nextPageUrl?: string | null;
|
|
79
|
-
prevPageUrl?: string | null;
|
|
80
|
-
from?: number;
|
|
81
|
-
to?: number;
|
|
82
|
-
perPage?: number;
|
|
83
|
-
total?: number;
|
|
84
|
-
}
|
|
85
|
-
export type SearchMode = 'client' | 'server';
|
|
86
|
-
export type ExportSource = 'client' | 'server';
|
|
87
|
-
export type ExportType = 'csv' | 'excel' | 'xlsx';
|
|
88
|
-
export interface ExportConfig {
|
|
89
|
-
/** Show/hide export button */
|
|
90
|
-
show?: boolean;
|
|
91
|
-
/** Export source: client-side or server-side */
|
|
92
|
-
source?: ExportSource;
|
|
93
|
-
/** Export file type */
|
|
94
|
-
exportType?: ExportType;
|
|
95
|
-
/** Export file name (without extension) */
|
|
96
|
-
exportFileName?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface ApiRequestContext {
|
|
99
|
-
search?: string;
|
|
100
|
-
filters?: GridFilter[];
|
|
101
|
-
sort?: GridSort;
|
|
102
|
-
page?: number;
|
|
103
|
-
perPage?: number;
|
|
104
|
-
extraState?: Record<string, unknown>;
|
|
105
|
-
tabName?: string;
|
|
106
|
-
}
|
|
107
|
-
export interface ApiResponse<T> {
|
|
108
|
-
data: T[];
|
|
109
|
-
meta?: PaginationMeta;
|
|
110
|
-
}
|
|
111
|
-
export interface ApiConfig {
|
|
112
|
-
/** API endpoint URL (required) */
|
|
113
|
-
apiUrl: string;
|
|
114
|
-
/** HTTP method (default: 'GET') */
|
|
115
|
-
method?: 'GET' | 'POST' | 'PUT';
|
|
116
|
-
/** Function to get auth token (optional) */
|
|
117
|
-
getAuthToken?: () => string | undefined;
|
|
118
|
-
/** Additional headers */
|
|
119
|
-
headers?: Record<string, string>;
|
|
120
|
-
/** Additional params (static object or function that receives context) - merged with search/filters/sort/pagination */
|
|
121
|
-
additionalParams?: Record<string, unknown> | ((context: ApiRequestContext) => Record<string, unknown>);
|
|
122
|
-
/** Custom query params builder (overrides default) */
|
|
123
|
-
paramsBuilder?: (context: ApiRequestContext) => URLSearchParams | Record<string, unknown>;
|
|
124
|
-
/** Custom body builder (for POST/PUT requests) */
|
|
125
|
-
bodyBuilder?: (context: ApiRequestContext) => unknown;
|
|
126
|
-
/** Response transformer to extract data and pagination from API response */
|
|
127
|
-
responseTransformer?: <T>(response: unknown) => ApiResponse<T>;
|
|
128
|
-
/** Debounce delay for search queries in milliseconds (default: 300) */
|
|
129
|
-
debounceMs?: number;
|
|
130
|
-
}
|
|
131
|
-
export interface GridEmptyState {
|
|
132
|
-
/** Icon name to display (must match an icon registered in the library) */
|
|
133
|
-
iconName: string;
|
|
134
|
-
/** Title text shown below the icon */
|
|
135
|
-
title: string;
|
|
136
|
-
/** Description text shown below the title */
|
|
137
|
-
description: string;
|
|
138
|
-
}
|
|
139
|
-
export interface GridConfig<T = Record<string, unknown>> {
|
|
140
|
-
id?: string;
|
|
141
|
-
name?: string;
|
|
142
|
-
customerId?: number;
|
|
143
|
-
module?: string;
|
|
144
|
-
resourceId?: string | number | null;
|
|
145
|
-
creatorId?: number;
|
|
146
|
-
pageLocation?: string;
|
|
147
|
-
view?: GridViewType;
|
|
148
|
-
/** API configuration for server-side data fetching. When provided, searchMode is automatically set to 'server' */
|
|
149
|
-
apiConfig?: ApiConfig;
|
|
150
|
-
columns: GridColumn[];
|
|
151
|
-
search?: string[];
|
|
152
|
-
searchMode?: SearchMode;
|
|
153
|
-
filters?: GridFilter[];
|
|
154
|
-
sort?: GridSort;
|
|
155
|
-
paginationMeta?: PaginationMeta;
|
|
156
|
-
rows?: T[];
|
|
157
|
-
/** Export configuration for data export functionality */
|
|
158
|
-
exportConfig?: ExportConfig;
|
|
159
|
-
emptyState?: GridEmptyState;
|
|
160
|
-
}
|
|
161
|
-
export interface NormalizedGridColumn extends GridColumn {
|
|
162
|
-
freeze: boolean;
|
|
163
|
-
visible: boolean;
|
|
164
|
-
}
|
|
165
|
-
export interface NormalizedGridConfig<T = Record<string, unknown>> extends GridConfig<T> {
|
|
166
|
-
columns: NormalizedGridColumn[];
|
|
167
|
-
rows: T[];
|
|
168
|
-
}
|