rayyy-vue-table-components 1.2.17 → 1.2.19
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 +20 -18
- package/dist/index.es.js +11510 -9315
- package/dist/index.umd.js +24 -20
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/form/BaseMultipleInput.vue.d.ts +549 -0
- package/dist/src/components/index.d.ts +14 -8
- package/dist/src/components/items/BaseBtn.vue.d.ts +0 -1
- package/dist/src/components/items/FilterBtn.vue.d.ts +2 -0
- package/dist/src/components/layout/FunctionHeader.vue.d.ts +53 -0
- package/dist/src/components/layout/MainPanel.vue.d.ts +28 -0
- package/dist/src/components/layout/SearchableListPanel.vue.d.ts +40 -0
- package/dist/src/const/tableConst.d.ts +83 -0
- package/dist/src/index.d.ts +3 -3
- package/dist/src/router/constants.d.ts +28 -0
- package/dist/src/types/OptionDto.d.ts +7 -0
- package/dist/src/types/components.d.ts +123 -0
- package/dist/src/utils/routeFormatters.d.ts +1 -0
- package/dist/src/utils/tableStyles.d.ts +50 -92
- package/dist/src/views/demo/BaseBtnDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/BaseDialogDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/BaseFormDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/BaseInputDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/BaseMultipleInputDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/BaseTableDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/FilterBtnDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/FunctionHeaderDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/MainPanelDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/SearchBarDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/SearchableListPanelDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/SortTableDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/TransferDialogDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/TransferItemDemo.vue.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/styles/_base.scss +45 -0
- package/src/assets/styles/_components.scss +61 -17
- package/src/assets/styles/{_dialog.scss → _dialogs.scss} +14 -1
- package/src/assets/styles/{_table.scss → _tables.scss} +41 -3
- package/src/assets/styles/tailwind.scss +4 -3
- package/src/components/form/BaseMultipleInput.vue +112 -0
- package/src/components/form/BaseSelector.vue +58 -0
- package/src/components/index.ts +14 -8
- package/src/components/items/BaseBtn.vue +2 -2
- package/src/components/{BaseDialog.vue → items/BaseDialog.vue} +1 -1
- package/src/components/items/FilterBtn.vue +10 -7
- package/src/components/{SearchBar.vue → items/SearchBar.vue} +2 -2
- package/src/components/layout/FunctionHeader.vue +46 -0
- package/src/components/layout/MainPanel.vue +37 -0
- package/src/components/layout/SearchableListPanel.vue +81 -0
- package/src/components/transfer/TransferDialog.vue +4 -5
- package/src/types/OptionDto.ts +7 -0
- package/src/types/components.d.ts +123 -0
- package/src/utils/routeFormatters.ts +10 -0
- package/src/utils/tableStyles.ts +88 -133
- package/dist/src/stores/layoutStore.d.ts +0 -5
- package/dist/src/components/{BaseForm.vue.d.ts → form/BaseForm.vue.d.ts} +0 -0
- package/dist/src/components/{items → form}/BaseInput.vue.d.ts +0 -0
- package/dist/src/components/{BaseDialog.vue.d.ts → items/BaseDialog.vue.d.ts} +0 -0
- package/dist/src/components/{SearchBar.vue.d.ts → items/SearchBar.vue.d.ts} +0 -0
- package/src/components/{BaseForm.vue → form/BaseForm.vue} +0 -0
- package/src/components/{items → form}/BaseInput.vue +20 -20
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
showBack?: boolean | string | object;
|
|
4
|
+
depth?: number;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
searchBar?(_: {}): any;
|
|
10
|
+
main?(_: {}): any;
|
|
11
|
+
footer?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
title: string;
|
|
19
|
+
showBack: boolean | string | object;
|
|
20
|
+
depth: number;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Pager } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
pagination: Pager;
|
|
5
|
+
showBack?: boolean | string | object;
|
|
6
|
+
showSearch?: boolean;
|
|
7
|
+
showEdit?: boolean;
|
|
8
|
+
showFilter?: boolean;
|
|
9
|
+
showDefaultSearch?: boolean;
|
|
10
|
+
badgeValue?: number;
|
|
11
|
+
};
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: {
|
|
15
|
+
firstButton?(_: {}): any;
|
|
16
|
+
customButton?(_: {}): any;
|
|
17
|
+
lastButton?(_: {}): any;
|
|
18
|
+
filterDrawBody?(_: {}): any;
|
|
19
|
+
main?(_: {}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: any;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
+
search: (data: string | null) => any;
|
|
27
|
+
updatePage: (page: number) => any;
|
|
28
|
+
updatePageSize: (limit: number) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onSearch?: ((data: string | null) => any) | undefined;
|
|
31
|
+
onUpdatePage?: ((page: number) => any) | undefined;
|
|
32
|
+
onUpdatePageSize?: ((limit: number) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const NAVIGATION_ITEMS: readonly [{
|
|
2
|
+
readonly id: "transfer-dialog";
|
|
3
|
+
readonly title: "TransferDialog 示範";
|
|
4
|
+
readonly description: "表格列配置功能";
|
|
5
|
+
readonly icon: "⚙️";
|
|
6
|
+
readonly section: "transfer-demo";
|
|
7
|
+
}, {
|
|
8
|
+
readonly id: "sort-table";
|
|
9
|
+
readonly title: "排序表格示範";
|
|
10
|
+
readonly description: "排序和選擇功能";
|
|
11
|
+
readonly icon: "📊";
|
|
12
|
+
readonly section: "sort-table-demo";
|
|
13
|
+
}, {
|
|
14
|
+
readonly id: "search-bar";
|
|
15
|
+
readonly title: "搜尋欄示範";
|
|
16
|
+
readonly description: "搜尋和篩選功能";
|
|
17
|
+
readonly icon: "🔍";
|
|
18
|
+
readonly section: "search-bar-demo";
|
|
19
|
+
}, {
|
|
20
|
+
readonly id: "buttons-dialogs";
|
|
21
|
+
readonly title: "按鈕和對話框示範";
|
|
22
|
+
readonly description: "基礎組件展示";
|
|
23
|
+
readonly icon: "🎯";
|
|
24
|
+
readonly section: "buttons-dialogs-demo";
|
|
25
|
+
}];
|
|
26
|
+
export declare const DEMO_CONSTANTS: {
|
|
27
|
+
readonly LOADING_DURATION: 2000;
|
|
28
|
+
readonly STATUS_CONFIG: {
|
|
29
|
+
readonly active: {
|
|
30
|
+
readonly icon: "●";
|
|
31
|
+
readonly text: "啟用";
|
|
32
|
+
readonly class: "text-green-500 text-lg";
|
|
33
|
+
};
|
|
34
|
+
readonly inactive: {
|
|
35
|
+
readonly icon: "●";
|
|
36
|
+
readonly text: "停用";
|
|
37
|
+
readonly class: "text-red-500 text-lg";
|
|
38
|
+
};
|
|
39
|
+
readonly pending: {
|
|
40
|
+
readonly icon: "○";
|
|
41
|
+
readonly text: "待處理";
|
|
42
|
+
readonly class: "text-yellow-500 text-lg";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type UserStatus = 'active' | 'inactive' | 'pending';
|
|
47
|
+
export interface User extends Record<string, unknown> {
|
|
48
|
+
id: number;
|
|
49
|
+
name: string;
|
|
50
|
+
email: string;
|
|
51
|
+
age: number;
|
|
52
|
+
department: string;
|
|
53
|
+
salary: number;
|
|
54
|
+
status: UserStatus;
|
|
55
|
+
joinDate: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const DEMO_USER_DATA: User[];
|
|
58
|
+
export declare const DEPARTMENT_OPTIONS: readonly [{
|
|
59
|
+
readonly label: "全部";
|
|
60
|
+
readonly value: "";
|
|
61
|
+
}, {
|
|
62
|
+
readonly label: "工程部";
|
|
63
|
+
readonly value: "engineering";
|
|
64
|
+
}, {
|
|
65
|
+
readonly label: "設計部";
|
|
66
|
+
readonly value: "design";
|
|
67
|
+
}, {
|
|
68
|
+
readonly label: "行銷部";
|
|
69
|
+
readonly value: "marketing";
|
|
70
|
+
}];
|
|
71
|
+
export declare const STATUS_OPTIONS: readonly [{
|
|
72
|
+
readonly label: "全部";
|
|
73
|
+
readonly value: "";
|
|
74
|
+
}, {
|
|
75
|
+
readonly label: "啟用";
|
|
76
|
+
readonly value: "active";
|
|
77
|
+
}, {
|
|
78
|
+
readonly label: "停用";
|
|
79
|
+
readonly value: "inactive";
|
|
80
|
+
}, {
|
|
81
|
+
readonly label: "待處理";
|
|
82
|
+
readonly value: "pending";
|
|
83
|
+
}];
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { default as BaseTable } from './components/tables/BaseTable.vue';
|
|
3
3
|
import { default as BaseBtn } from './components/items/BaseBtn.vue';
|
|
4
|
-
import { default as BaseInput } from './components/
|
|
4
|
+
import { default as BaseInput } from './components/form/BaseInput.vue';
|
|
5
5
|
import { default as FilterBtn } from './components/items/FilterBtn.vue';
|
|
6
|
-
import { default as BaseDialog } from './components/BaseDialog.vue';
|
|
6
|
+
import { default as BaseDialog } from './components/items/BaseDialog.vue';
|
|
7
7
|
import { default as SortTable } from './components/tables/SortTable.vue';
|
|
8
|
-
import { default as SearchBar } from './components/SearchBar.vue';
|
|
8
|
+
import { default as SearchBar } from './components/items/SearchBar.vue';
|
|
9
9
|
export * from './types';
|
|
10
10
|
export * from './utils/tableHelper';
|
|
11
11
|
export * from './utils/tableStyles';
|
|
@@ -2,11 +2,39 @@ export declare const ROUTES: {
|
|
|
2
2
|
readonly ROOT: "/";
|
|
3
3
|
readonly HOME: "/home";
|
|
4
4
|
readonly DEMO: "/demo";
|
|
5
|
+
readonly SEARCHABLE_LIST_PANEL: "/demo/searchable-list-panel";
|
|
6
|
+
readonly BASE_MULTIPLE_INPUT: "/demo/base-multiple-input";
|
|
7
|
+
readonly TRANSFER_DIALOG: "/demo/transfer-dialog";
|
|
8
|
+
readonly BASE_TABLE: "/demo/base-table";
|
|
9
|
+
readonly BASE_BTN: "/demo/base-btn";
|
|
10
|
+
readonly BASE_INPUT: "/demo/base-input";
|
|
11
|
+
readonly FILTER_BTN: "/demo/filter-btn";
|
|
12
|
+
readonly BASE_DIALOG: "/demo/base-dialog";
|
|
13
|
+
readonly BASE_FORM: "/demo/base-form";
|
|
14
|
+
readonly SORT_TABLE: "/demo/sort-table";
|
|
15
|
+
readonly SEARCH_BAR: "/demo/search-bar";
|
|
16
|
+
readonly TRANSFER_ITEM: "/demo/transfer-item";
|
|
17
|
+
readonly FUNCTION_HEADER: "/demo/function-header";
|
|
18
|
+
readonly MAIN_PANEL: "/demo/main-panel";
|
|
5
19
|
readonly NOT_FOUND: "/:catchAll(.*)";
|
|
6
20
|
};
|
|
7
21
|
export declare const ROUTE_NAMES: {
|
|
8
22
|
readonly HOME_LAYOUT: "HomeLayout";
|
|
9
23
|
readonly HOME: "Home";
|
|
10
24
|
readonly DEMO: "Demo";
|
|
25
|
+
readonly SEARCHABLE_LIST_PANEL: "SearchableListPanel";
|
|
26
|
+
readonly BASE_MULTIPLE_INPUT: "BaseMultipleInput";
|
|
27
|
+
readonly TRANSFER_DIALOG: "TransferDialog";
|
|
28
|
+
readonly BASE_TABLE: "BaseTable";
|
|
29
|
+
readonly BASE_BTN: "BaseBtn";
|
|
30
|
+
readonly BASE_INPUT: "BaseInput";
|
|
31
|
+
readonly FILTER_BTN: "FilterBtn";
|
|
32
|
+
readonly BASE_DIALOG: "BaseDialog";
|
|
33
|
+
readonly BASE_FORM: "BaseForm";
|
|
34
|
+
readonly SORT_TABLE: "SortTable";
|
|
35
|
+
readonly SEARCH_BAR: "SearchBar";
|
|
36
|
+
readonly TRANSFER_ITEM: "TransferItem";
|
|
37
|
+
readonly FUNCTION_HEADER: "FunctionHeader";
|
|
38
|
+
readonly MAIN_PANEL: "MainPanel";
|
|
11
39
|
readonly NOT_FOUND: "NotFoundPage";
|
|
12
40
|
};
|
|
@@ -130,6 +130,92 @@ export interface BaseDialogInstance {
|
|
|
130
130
|
$emit: BaseDialogEmits
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// ==================== SearchableListPanel 組件類型 ====================
|
|
134
|
+
|
|
135
|
+
/** SearchableListPanel 組件 Props 類型 */
|
|
136
|
+
export interface SearchableListPanelProps {
|
|
137
|
+
/** 標題 */
|
|
138
|
+
title: string
|
|
139
|
+
/** 分頁資訊 */
|
|
140
|
+
pagination: import('./index').Pager
|
|
141
|
+
/** 是否顯示返回按鈕 */
|
|
142
|
+
showBack?: boolean | string | object
|
|
143
|
+
/** 是否顯示搜尋功能 */
|
|
144
|
+
showSearch?: boolean
|
|
145
|
+
/** 是否顯示編輯功能 */
|
|
146
|
+
showEdit?: boolean
|
|
147
|
+
/** 是否顯示篩選功能 */
|
|
148
|
+
showFilter?: boolean
|
|
149
|
+
/** 是否顯示預設搜尋 */
|
|
150
|
+
showDefaultSearch?: boolean
|
|
151
|
+
/** 測試屬性 */
|
|
152
|
+
dataCy?: string
|
|
153
|
+
/** 徽章數值 */
|
|
154
|
+
badgeValue?: number
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** SearchableListPanel 組件 Emits 類型 */
|
|
158
|
+
export interface SearchableListPanelEmits {
|
|
159
|
+
/** 搜尋事件 */
|
|
160
|
+
(e: 'search', data: string | null): void
|
|
161
|
+
/** 更新頁面事件 */
|
|
162
|
+
(e: 'updatePage', page: number): boolean
|
|
163
|
+
/** 更新頁面大小事件 */
|
|
164
|
+
(e: 'updatePageSize', limit: number): boolean
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** SearchableListPanel 組件實例類型 */
|
|
168
|
+
export interface SearchableListPanelInstance {
|
|
169
|
+
/** 組件 Props */
|
|
170
|
+
$props: SearchableListPanelProps
|
|
171
|
+
/** 組件 Emits */
|
|
172
|
+
$emit: SearchableListPanelEmits
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** SearchableListPanel 組件 Slots 類型 */
|
|
176
|
+
export interface SearchableListPanelSlots {
|
|
177
|
+
/** 第一個按鈕 slot */
|
|
178
|
+
firstButton: () => VNode[]
|
|
179
|
+
/** 自定義按鈕 slot */
|
|
180
|
+
customButton: () => VNode[]
|
|
181
|
+
/** 最後一個按鈕 slot */
|
|
182
|
+
lastButton: () => VNode[]
|
|
183
|
+
/** 篩選抽屜內容 slot */
|
|
184
|
+
filterDrawBody: () => VNode[]
|
|
185
|
+
/** 主要內容 slot */
|
|
186
|
+
main: () => VNode[]
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ==================== BaseMultipleInput 組件類型 ====================
|
|
190
|
+
|
|
191
|
+
/** BaseMultipleInput 組件 Props 類型 */
|
|
192
|
+
export interface BaseMultipleInputProps {
|
|
193
|
+
/** 模型值(字符串數組) */
|
|
194
|
+
modelValue: string[]
|
|
195
|
+
/** 輸入框類型 */
|
|
196
|
+
type?: string
|
|
197
|
+
/** 驗證規則函數 */
|
|
198
|
+
validateRule?: (inputString: string) => boolean
|
|
199
|
+
/** 測試屬性 */
|
|
200
|
+
dataCy?: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** BaseMultipleInput 組件 Emits 類型 */
|
|
204
|
+
export interface BaseMultipleInputEmits {
|
|
205
|
+
/** 更新模型值事件 */
|
|
206
|
+
(e: 'update:modelValue', val: string[]): void
|
|
207
|
+
/** 輸入錯誤事件 */
|
|
208
|
+
(e: 'inputError'): void
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** BaseMultipleInput 組件實例類型 */
|
|
212
|
+
export interface BaseMultipleInputInstance {
|
|
213
|
+
/** 組件 Props */
|
|
214
|
+
$props: BaseMultipleInputProps
|
|
215
|
+
/** 組件 Emits */
|
|
216
|
+
$emit: BaseMultipleInputEmits
|
|
217
|
+
}
|
|
218
|
+
|
|
133
219
|
// ==================== 組件定義類型 ====================
|
|
134
220
|
|
|
135
221
|
/** BaseTable 組件定義 */
|
|
@@ -177,6 +263,36 @@ export declare const BaseDialog: DefineComponent<
|
|
|
177
263
|
install: (app: App) => void
|
|
178
264
|
}
|
|
179
265
|
|
|
266
|
+
/** SearchableListPanel 組件定義 */
|
|
267
|
+
export declare const SearchableListPanel: DefineComponent<
|
|
268
|
+
SearchableListPanelProps,
|
|
269
|
+
{},
|
|
270
|
+
{},
|
|
271
|
+
{},
|
|
272
|
+
{},
|
|
273
|
+
{},
|
|
274
|
+
SearchableListPanelSlots,
|
|
275
|
+
SearchableListPanelEmits
|
|
276
|
+
> & {
|
|
277
|
+
/** 安裝方法 */
|
|
278
|
+
install: (app: App) => void
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** BaseMultipleInput 組件定義 */
|
|
282
|
+
export declare const BaseMultipleInput: DefineComponent<
|
|
283
|
+
BaseMultipleInputProps,
|
|
284
|
+
{},
|
|
285
|
+
{},
|
|
286
|
+
{},
|
|
287
|
+
{},
|
|
288
|
+
{},
|
|
289
|
+
{},
|
|
290
|
+
BaseMultipleInputEmits
|
|
291
|
+
> & {
|
|
292
|
+
/** 安裝方法 */
|
|
293
|
+
install: (app: App) => void
|
|
294
|
+
}
|
|
295
|
+
|
|
180
296
|
// ==================== 插件類型 ====================
|
|
181
297
|
|
|
182
298
|
/** 插件安裝選項 */
|
|
@@ -197,6 +313,10 @@ export interface VueTableComponentsPlugin {
|
|
|
197
313
|
BaseBtn: typeof BaseBtn
|
|
198
314
|
/** BaseDialog 組件 */
|
|
199
315
|
BaseDialog: typeof BaseDialog
|
|
316
|
+
/** SearchableListPanel 組件 */
|
|
317
|
+
SearchableListPanel: typeof SearchableListPanel
|
|
318
|
+
/** BaseMultipleInput 組件 */
|
|
319
|
+
BaseMultipleInput: typeof BaseMultipleInput
|
|
200
320
|
}
|
|
201
321
|
|
|
202
322
|
// ==================== 全局類型擴展 ====================
|
|
@@ -206,5 +326,8 @@ declare module '@vue/runtime-core' {
|
|
|
206
326
|
BaseTable: typeof BaseTable
|
|
207
327
|
BaseBtn: typeof BaseBtn
|
|
208
328
|
BaseDialog: typeof BaseDialog
|
|
329
|
+
FilterBtn: typeof FilterBtn
|
|
330
|
+
SearchableListPanel: typeof SearchableListPanel
|
|
331
|
+
BaseMultipleInput: typeof BaseMultipleInput
|
|
209
332
|
}
|
|
210
333
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractSubRoutes(path: string, layer?: number): string;
|
|
@@ -1,100 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Table 樣式工具類
|
|
3
|
-
*
|
|
3
|
+
* 注意:樣式定義已移至 src/assets/styles/_components.scss
|
|
4
|
+
* 此檔案僅保留工具函數和類型定義
|
|
4
5
|
*/
|
|
5
|
-
export declare const tableCell = "p-0 h-10";
|
|
6
|
-
export declare const tableHeader = "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
7
|
-
export declare const tableCellContent = "truncate";
|
|
8
|
-
export declare const dismissedRow = "bg-blue-20";
|
|
9
|
-
export declare const tableFooter = "font-bold";
|
|
10
|
-
export declare const blueText = "text-blue-10";
|
|
11
|
-
export declare const redText = "text-redText";
|
|
12
|
-
export declare const sortTableContainer = "w-full mb-4";
|
|
13
|
-
export declare const sortTableFunctionBar = "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
14
|
-
export declare const sortTableSettingsBtn = "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
15
|
-
export declare const filterBtn = "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
16
|
-
export declare const filterBtnText = "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
17
|
-
export declare const filterBtnIcon = "text-xl";
|
|
18
|
-
export declare const transferSortWrapper = "border border-gray-200 h-96 overflow-auto";
|
|
19
|
-
export declare const transferActiveBg = "bg-primary/10";
|
|
20
|
-
export declare const transferActiveBorder = "border border-primary-10 rounded";
|
|
21
|
-
export declare const transferItemWrapper = "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
22
|
-
export declare const transferArrowWrapper = "w-28 text-primary-10";
|
|
23
|
-
export declare const baseDialogTitle = "font-bold text-base";
|
|
24
|
-
export declare const cursorGrab = "cursor-grab";
|
|
25
|
-
export declare const cursorGrabbing = "cursor-grabbing";
|
|
26
|
-
export declare const tableStyles: {
|
|
27
|
-
readonly cell: "p-0 h-10";
|
|
28
|
-
readonly header: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
29
|
-
readonly content: "truncate";
|
|
30
|
-
readonly dismissed: "bg-blue-20";
|
|
31
|
-
readonly footer: "font-bold";
|
|
32
|
-
readonly blueText: "text-blue-10";
|
|
33
|
-
readonly redText: "text-redText";
|
|
34
|
-
};
|
|
35
|
-
export declare const componentStyles: {
|
|
36
|
-
readonly sortTableContainer: "w-full mb-4";
|
|
37
|
-
readonly sortTableFunctionBar: "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
38
|
-
readonly sortTableSettingsBtn: "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
39
|
-
readonly filterBtn: "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
40
|
-
readonly filterBtnText: "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
41
|
-
readonly filterBtnIcon: "text-xl";
|
|
42
|
-
readonly transferSortWrapper: "border border-gray-200 h-96 overflow-auto";
|
|
43
|
-
readonly transferActiveBg: "bg-primary/10";
|
|
44
|
-
readonly transferActiveBorder: "border border-primary-10 rounded";
|
|
45
|
-
readonly transferItemWrapper: "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
46
|
-
readonly transferArrowWrapper: "w-28 text-primary-10";
|
|
47
|
-
readonly baseDialogTitle: "font-bold text-base";
|
|
48
|
-
readonly cursorGrab: "cursor-grab";
|
|
49
|
-
readonly cursorGrabbing: "cursor-grabbing";
|
|
50
|
-
};
|
|
51
|
-
export declare const dataTableConfig: {
|
|
52
|
-
readonly cellClass: "p-0 h-10";
|
|
53
|
-
readonly headerClass: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
54
|
-
readonly contentClass: "truncate";
|
|
55
|
-
readonly dismissedClass: "bg-blue-20";
|
|
56
|
-
readonly footerClass: "font-bold";
|
|
57
|
-
readonly blueTextClass: "text-blue-10";
|
|
58
|
-
readonly redTextClass: "text-redText";
|
|
59
|
-
};
|
|
60
|
-
export declare const allComponentStyles: {
|
|
61
|
-
readonly dataTableConfig: {
|
|
62
|
-
readonly cellClass: "p-0 h-10";
|
|
63
|
-
readonly headerClass: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
64
|
-
readonly contentClass: "truncate";
|
|
65
|
-
readonly dismissedClass: "bg-blue-20";
|
|
66
|
-
readonly footerClass: "font-bold";
|
|
67
|
-
readonly blueTextClass: "text-blue-10";
|
|
68
|
-
readonly redTextClass: "text-redText";
|
|
69
|
-
};
|
|
70
|
-
readonly sortTableContainer: "w-full mb-4";
|
|
71
|
-
readonly sortTableFunctionBar: "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
72
|
-
readonly sortTableSettingsBtn: "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
73
|
-
readonly filterBtn: "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
74
|
-
readonly filterBtnText: "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
75
|
-
readonly filterBtnIcon: "text-xl";
|
|
76
|
-
readonly transferSortWrapper: "border border-gray-200 h-96 overflow-auto";
|
|
77
|
-
readonly transferActiveBg: "bg-primary/10";
|
|
78
|
-
readonly transferActiveBorder: "border border-primary-10 rounded";
|
|
79
|
-
readonly transferItemWrapper: "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
80
|
-
readonly transferArrowWrapper: "w-28 text-primary-10";
|
|
81
|
-
readonly baseDialogTitle: "font-bold text-base";
|
|
82
|
-
readonly cursorGrab: "cursor-grab";
|
|
83
|
-
readonly cursorGrabbing: "cursor-grabbing";
|
|
84
|
-
readonly cell: "p-0 h-10";
|
|
85
|
-
readonly header: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
86
|
-
readonly content: "truncate";
|
|
87
|
-
readonly dismissed: "bg-blue-20";
|
|
88
|
-
readonly footer: "font-bold";
|
|
89
|
-
readonly blueText: "text-blue-10";
|
|
90
|
-
readonly redText: "text-redText";
|
|
91
|
-
};
|
|
92
6
|
export declare const createTableCellClass: (options?: {
|
|
93
7
|
isDismissed?: boolean;
|
|
94
8
|
isHeader?: boolean;
|
|
95
9
|
}) => string;
|
|
96
10
|
export declare const createTextClass: (type?: "blue" | "red" | "normal") => "" | "text-blue-10" | "text-redText";
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
11
|
+
export declare const STYLE_CLASSES: {
|
|
12
|
+
readonly tableCell: "table-cell";
|
|
13
|
+
readonly tableHeader: "table-header";
|
|
14
|
+
readonly tableCellContent: "table-cell-content";
|
|
15
|
+
readonly dismissedRow: "dismissed-row";
|
|
16
|
+
readonly tableFooter: "table-footer";
|
|
17
|
+
readonly blueText: "blue-text";
|
|
18
|
+
readonly redText: "red-text";
|
|
19
|
+
readonly sortTableContainer: "sort-table-container";
|
|
20
|
+
readonly sortTableFunctionBar: "sort-table-function-bar";
|
|
21
|
+
readonly sortTableSettingsBtn: "sort-table-settings-btn";
|
|
22
|
+
readonly filterBtn: "filter-btn";
|
|
23
|
+
readonly filterBtnText: "filter-btn-text";
|
|
24
|
+
readonly filterBtnIcon: "filter-btn-icon";
|
|
25
|
+
readonly transferSortWrapper: "transfer-sort-wrapper";
|
|
26
|
+
readonly transferActiveBg: "transfer-active-bg";
|
|
27
|
+
readonly transferActiveBorder: "transfer-active-border";
|
|
28
|
+
readonly transferItemWrapper: "transfer-item-wrapper";
|
|
29
|
+
readonly transferArrowWrapper: "transfer-arrow-wrapper";
|
|
30
|
+
readonly baseDialogTitle: "base-dialog-title";
|
|
31
|
+
readonly cursorGrab: "cursor-grab";
|
|
32
|
+
readonly cursorGrabbing: "cursor-grabbing";
|
|
33
|
+
readonly dataTableConfig: "data-table-config";
|
|
34
|
+
readonly componentStyles: "component-styles";
|
|
35
|
+
};
|
|
36
|
+
export type StyleClassesType = typeof STYLE_CLASSES;
|
|
37
|
+
export interface TableCellStyleOptions {
|
|
38
|
+
isDismissed?: boolean;
|
|
39
|
+
isHeader?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type TextStyleType = 'blue' | 'red' | 'normal';
|
|
42
|
+
/**
|
|
43
|
+
* 使用方式:
|
|
44
|
+
*
|
|
45
|
+
* 1. 在 Vue 組件中使用樣式類名:
|
|
46
|
+
* <div :class="STYLE_CLASSES.tableCell">內容</div>
|
|
47
|
+
*
|
|
48
|
+
* 2. 使用樣式組合函數:
|
|
49
|
+
* <div :class="createTableCellClass({ isHeader: true })">標題</div>
|
|
50
|
+
*
|
|
51
|
+
* 3. 使用文字樣式函數:
|
|
52
|
+
* <span :class="createTextClass('blue')">藍色文字</span>
|
|
53
|
+
*
|
|
54
|
+
* 4. 在 SCSS 中使用對應的類名:
|
|
55
|
+
* .my-custom-class {
|
|
56
|
+
* @extend .table-cell;
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
@@ -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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, any>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, any>;
|
|
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, {}, HTMLDivElement>;
|
|
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, {}, any>;
|
|
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, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// ==================== 基礎樣式 ====================
|
|
2
|
+
// 包含表格基礎樣式、文字樣式等通用樣式
|
|
3
|
+
|
|
4
|
+
// 表格基礎樣式
|
|
5
|
+
.table-cell {
|
|
6
|
+
@apply p-0 h-10;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 表格標題樣式
|
|
10
|
+
.table-header {
|
|
11
|
+
@apply bg-primary-15 font-bold text-text text-sm leading-4;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 表格內容樣式
|
|
15
|
+
.table-cell-content {
|
|
16
|
+
@apply truncate;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 被駁回行的樣式
|
|
20
|
+
.dismissed-row {
|
|
21
|
+
@apply bg-blue-20;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 表格底部樣式
|
|
25
|
+
.table-footer {
|
|
26
|
+
@apply font-bold;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 文字顏色樣式
|
|
30
|
+
.blue-text {
|
|
31
|
+
@apply text-blue-10;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.red-text {
|
|
35
|
+
@apply text-redText;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 通用樣式
|
|
39
|
+
.cursor-grab {
|
|
40
|
+
cursor: grab;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cursor-grabbing {
|
|
44
|
+
cursor: grabbing;
|
|
45
|
+
}
|