@shifl-inc/ui 0.1.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/README.md +86 -0
- package/dist/components/grid/GridColumnManager.vue.d.ts +45 -0
- package/dist/components/grid/ShiflGrid.vue.d.ts +27 -0
- package/dist/composables/useBreakpoints.d.ts +5 -0
- package/dist/composables/useGridColumns.d.ts +67 -0
- package/dist/composables/useGridData.d.ts +4 -0
- package/dist/composables/useGridEditing.d.ts +1 -0
- package/dist/composables/useGridFilter.d.ts +5 -0
- package/dist/composables/useGridInfiniteScroll.d.ts +1 -0
- package/dist/composables/useGridSelection.d.ts +11 -0
- package/dist/composables/useGridSort.d.ts +18 -0
- package/dist/composables/useGridTheme.d.ts +25 -0
- package/dist/composables/useGridTour.d.ts +1 -0
- package/dist/composables/useVirtualScroll.d.ts +1 -0
- package/dist/config/defaults.d.ts +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/plugins/install.d.ts +5 -0
- package/dist/shifl-ui.js +685 -0
- package/dist/shifl-ui.umd +1 -0
- package/dist/stores/gridStore.d.ts +8 -0
- package/dist/style.css +778 -0
- package/dist/types/grid.d.ts +69 -0
- package/dist/types/theme.d.ts +10 -0
- package/dist/utils/normalize.d.ts +2 -0
- package/package.json +82 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type GridViewType = 'regular' | 'compact' | 'comfortable';
|
|
2
|
+
export interface GridColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
order?: number;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
width?: string;
|
|
8
|
+
height?: string;
|
|
9
|
+
isDefault?: boolean;
|
|
10
|
+
frozen?: boolean;
|
|
11
|
+
/** legacy alias */
|
|
12
|
+
fixed?: boolean;
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
cellMetadata?: {
|
|
15
|
+
format?: string;
|
|
16
|
+
emptyState?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface GridFilter {
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
inputType?: string;
|
|
24
|
+
dataType?: string;
|
|
25
|
+
operator?: string;
|
|
26
|
+
value?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface GridSort {
|
|
29
|
+
key: string;
|
|
30
|
+
order: 'asc' | 'desc';
|
|
31
|
+
}
|
|
32
|
+
export interface PaginationMeta {
|
|
33
|
+
show?: boolean;
|
|
34
|
+
currentPage?: number;
|
|
35
|
+
lastPage?: number;
|
|
36
|
+
firstPageUrl?: string;
|
|
37
|
+
lastPageUrl?: string;
|
|
38
|
+
nextPageUrl?: string | null;
|
|
39
|
+
prevPageUrl?: string | null;
|
|
40
|
+
from?: number;
|
|
41
|
+
to?: number;
|
|
42
|
+
perPage?: number;
|
|
43
|
+
total?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface GridConfig<T = Record<string, unknown>> {
|
|
46
|
+
id?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
customerId?: number;
|
|
49
|
+
model?: string;
|
|
50
|
+
resourceId?: string | number | null;
|
|
51
|
+
creatorId?: number;
|
|
52
|
+
pageLocation?: string;
|
|
53
|
+
view?: GridViewType;
|
|
54
|
+
apiUrl?: string;
|
|
55
|
+
columns: GridColumn[];
|
|
56
|
+
search?: string[];
|
|
57
|
+
filters?: GridFilter[];
|
|
58
|
+
sort?: GridSort;
|
|
59
|
+
paginationMeta?: PaginationMeta;
|
|
60
|
+
rows?: T[];
|
|
61
|
+
}
|
|
62
|
+
export interface NormalizedGridColumn extends GridColumn {
|
|
63
|
+
frozen: boolean;
|
|
64
|
+
visible: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface NormalizedGridConfig<T = Record<string, unknown>> extends GridConfig<T> {
|
|
67
|
+
columns: NormalizedGridColumn[];
|
|
68
|
+
rows: T[];
|
|
69
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shifl-inc/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Reusable Vue 3 UI components for Shifl.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/shifl-ui.umd.cjs",
|
|
7
|
+
"module": "./dist/shifl-ui.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/shifl-ui.js",
|
|
13
|
+
"require": "./dist/shifl-ui.umd.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite dev",
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"lint": "eslint . --ext .ts,.tsx,.vue",
|
|
25
|
+
"format": "prettier --write .",
|
|
26
|
+
"typecheck": "vue-tsc --noEmit",
|
|
27
|
+
"test": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
29
|
+
"storybook": "storybook dev -p 6006",
|
|
30
|
+
"storybook:build": "storybook build"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"vue",
|
|
34
|
+
"grid",
|
|
35
|
+
"shifl",
|
|
36
|
+
"datatable",
|
|
37
|
+
"components",
|
|
38
|
+
"ui-library"
|
|
39
|
+
],
|
|
40
|
+
"author": "",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20.11.0",
|
|
44
|
+
"npm": ">=10"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"pinia": "^2.2.0",
|
|
48
|
+
"vue": "^3.4.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
52
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
53
|
+
"@storybook/addon-links": "^8.6.14",
|
|
54
|
+
"@storybook/testing-library": "^0.2.2",
|
|
55
|
+
"@storybook/vue3-vite": "^8.6.14",
|
|
56
|
+
"@testing-library/vue": "^8.1.0",
|
|
57
|
+
"@types/jsdom": "^27.0.0",
|
|
58
|
+
"@types/node": "^25.0.3",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
60
|
+
"@typescript-eslint/parser": "^8.50.0",
|
|
61
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
62
|
+
"@vitest/coverage-v8": "^1.6.0",
|
|
63
|
+
"autoprefixer": "^10.4.23",
|
|
64
|
+
"eslint": "^9.39.2",
|
|
65
|
+
"eslint-config-prettier": "^10.1.8",
|
|
66
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
67
|
+
"jsdom": "^22.1.0",
|
|
68
|
+
"pinia": "^2.3.1",
|
|
69
|
+
"postcss": "^8.5.6",
|
|
70
|
+
"prettier": "^3.7.4",
|
|
71
|
+
"storybook": "^8.6.14",
|
|
72
|
+
"tailwindcss": "^3.4.15",
|
|
73
|
+
"ts-loader": "^9.5.4",
|
|
74
|
+
"typescript": "^5.9.3",
|
|
75
|
+
"vite": "^5.4.11",
|
|
76
|
+
"vite-plugin-dts": "^4.5.4",
|
|
77
|
+
"vitest": "^1.6.0",
|
|
78
|
+
"vue": "^3.5.25",
|
|
79
|
+
"vue-eslint-parser": "^10.2.0",
|
|
80
|
+
"vue-tsc": "^3.1.8"
|
|
81
|
+
}
|
|
82
|
+
}
|