@oneflowui/ui 0.3.0 → 0.4.1
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/{FieldCheckbox-usI8AWEq.js → FieldCheckbox-CV3QtQ4Y.js} +3 -3
- package/dist/{FieldDate-Y4p9eB4O.js → FieldDate-Bljx4jb7.js} +2 -2
- package/dist/{FieldDatetime-CQEfD87W.js → FieldDatetime-B52GfWrK.js} +8 -8
- package/dist/{FieldEmail-BVyzf_fw.js → FieldEmail-UREMoue-.js} +11 -11
- package/dist/{FieldMultiSelect-DuCL06zc.js → FieldMultiSelect-Dlay1Fop.js} +11 -11
- package/dist/{FieldNumber-CuS1g2vn.js → FieldNumber-BjhfFhs6.js} +2 -2
- package/dist/{FieldRating-DVy6dpk7.js → FieldRating-BKHUu-A1.js} +2 -2
- package/dist/{FieldSelect-Bew5uufs.js → FieldSelect-B39Ad8VH.js} +2 -2
- package/dist/{FieldText-Cvk1jnhQ.js → FieldText-Ry7f72Ug.js} +5 -5
- package/dist/{FieldUrl-CCPFbiVm.js → FieldUrl-bv0EB9sh.js} +8 -8
- package/dist/components/base/Accordion.vue.d.ts +2 -2
- package/dist/components/base/Avatar.vue.d.ts +1 -1
- package/dist/components/base/Badge.vue.d.ts +2 -2
- package/dist/components/base/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/base/ChainItem.vue.d.ts +2 -2
- package/dist/components/base/DropdownMenu.vue.d.ts +4 -1
- package/dist/components/base/EmptyState.vue.d.ts +1 -1
- package/dist/components/base/InfoCard.vue.d.ts +2 -2
- package/dist/components/base/MonitorItem.vue.d.ts +1 -1
- package/dist/components/base/PersonaCard.vue.d.ts +2 -2
- package/dist/components/base/ProgressBar.vue.d.ts +2 -2
- package/dist/components/base/RangeSlider.vue.d.ts +1 -16
- package/dist/components/base/SectionBlock.vue.d.ts +6 -4
- package/dist/components/base/SelectBadge.vue.d.ts +2 -2
- package/dist/components/base/StatisticCard.vue.d.ts +1 -14
- package/dist/components/base/StatusIndicator.vue.d.ts +2 -2
- package/dist/components/base/StatusSummary.vue.d.ts +2 -2
- package/dist/components/base/Stepper.vue.d.ts +2 -2
- package/dist/components/base/Switch.vue.d.ts +1 -1
- package/dist/components/base/ToolbarBtn.vue.d.ts +1 -1
- package/dist/components/base/ViewModeGroup.vue.d.ts +1 -1
- package/dist/components/base/ViewSwitcher.vue.d.ts +2 -2
- package/dist/components/base/ViewTab.vue.d.ts +1 -1
- package/dist/components/layout/AppLayout.vue.d.ts +14 -2
- package/dist/components/overlay/Drawer.vue.d.ts +6 -2
- package/dist/components/overlay/Modal.vue.d.ts +6 -2
- package/dist/components/overlay/SidePanel.vue.d.ts +6 -2
- package/dist/components/table/DataTable.vue.d.ts +11 -1
- package/dist/components/table/FieldCell.vue.d.ts +1 -1
- package/dist/components/table/TableColumnManager.vue.d.ts +3 -1
- package/dist/components/table/TableFilterPanel.vue.d.ts +3 -1
- package/dist/composables/useTableGroup.d.ts +2 -2
- package/dist/{index-CLFMyBqX.js → index-DQph5iTq.js} +4262 -3941
- package/dist/index.d.ts +2 -2
- package/dist/oneflow-ui.js +1 -1
- package/dist/oneflow-ui.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +39 -14
- package/package.json +2 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type Density = "comfortable" | "compact";
|
|
1
2
|
export type Priority = string;
|
|
2
3
|
export type TaskStatus = string;
|
|
3
4
|
export type ViewType = "table" | "kanban" | "gallery" | "timeline" | "detail";
|
|
@@ -51,6 +52,30 @@ export interface TableColumn {
|
|
|
51
52
|
/** 是否隐藏该列(列管理器控制) */
|
|
52
53
|
hidden?: boolean;
|
|
53
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* DataTable 组件的 Props 类型定义(与 DataTable.vue 中 defineProps 保持同步)
|
|
57
|
+
*/
|
|
58
|
+
export interface DataTableProps {
|
|
59
|
+
tasks?: Task[];
|
|
60
|
+
records?: DataRecord[];
|
|
61
|
+
schema?: TableSchema;
|
|
62
|
+
view?: ViewConfig;
|
|
63
|
+
columns?: TableColumn[];
|
|
64
|
+
rowKey?: string;
|
|
65
|
+
selectable?: boolean;
|
|
66
|
+
addable?: boolean;
|
|
67
|
+
priorityColorMap?: ColorMap;
|
|
68
|
+
statusColorMap?: ColorMap;
|
|
69
|
+
groupBy?: string;
|
|
70
|
+
groupColorMap?: ColorMap;
|
|
71
|
+
/** 手动强制开关虚拟滚动;undefined 表示自动判断 */
|
|
72
|
+
virtual?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 自动启用虚拟滚动的行数阈值(默认 100)。
|
|
75
|
+
* 仅在 `virtual` prop 未传时生效。
|
|
76
|
+
*/
|
|
77
|
+
virtualThreshold?: number;
|
|
78
|
+
}
|
|
54
79
|
export interface KanbanColumnData {
|
|
55
80
|
id: string;
|
|
56
81
|
title: string;
|
|
@@ -95,7 +120,7 @@ export interface SidebarItem {
|
|
|
95
120
|
badge?: string | number;
|
|
96
121
|
children?: SidebarItem[];
|
|
97
122
|
}
|
|
98
|
-
export type FieldType =
|
|
123
|
+
export type FieldType = "text" | "number" | "select" | "multi_select" | "date" | "datetime" | "checkbox" | "url" | "email" | "phone" | "rating" | "user" | "attachment" | "relation" | "formula";
|
|
99
124
|
export interface SelectOption {
|
|
100
125
|
value: string;
|
|
101
126
|
label: string;
|
|
@@ -109,42 +134,42 @@ export interface FieldDefBase {
|
|
|
109
134
|
width?: number;
|
|
110
135
|
}
|
|
111
136
|
export interface TextFieldDef extends FieldDefBase {
|
|
112
|
-
type:
|
|
137
|
+
type: "text";
|
|
113
138
|
}
|
|
114
139
|
export interface NumberFieldDef extends FieldDefBase {
|
|
115
|
-
type:
|
|
140
|
+
type: "number";
|
|
116
141
|
min?: number;
|
|
117
142
|
max?: number;
|
|
118
143
|
}
|
|
119
144
|
export interface SelectFieldDef extends FieldDefBase {
|
|
120
|
-
type:
|
|
145
|
+
type: "select" | "multi_select";
|
|
121
146
|
options: SelectOption[];
|
|
122
147
|
}
|
|
123
148
|
export interface DateFieldDef extends FieldDefBase {
|
|
124
|
-
type:
|
|
149
|
+
type: "date" | "datetime";
|
|
125
150
|
}
|
|
126
151
|
export interface CheckboxFieldDef extends FieldDefBase {
|
|
127
|
-
type:
|
|
152
|
+
type: "checkbox";
|
|
128
153
|
}
|
|
129
154
|
export interface ContactFieldDef extends FieldDefBase {
|
|
130
|
-
type:
|
|
155
|
+
type: "url" | "email" | "phone";
|
|
131
156
|
}
|
|
132
157
|
export interface RatingFieldDef extends FieldDefBase {
|
|
133
|
-
type:
|
|
158
|
+
type: "rating";
|
|
134
159
|
max?: number;
|
|
135
160
|
}
|
|
136
161
|
export interface UserFieldDef extends FieldDefBase {
|
|
137
|
-
type:
|
|
162
|
+
type: "user";
|
|
138
163
|
}
|
|
139
164
|
export interface AttachmentFieldDef extends FieldDefBase {
|
|
140
|
-
type:
|
|
165
|
+
type: "attachment";
|
|
141
166
|
}
|
|
142
167
|
export interface RelationFieldDef extends FieldDefBase {
|
|
143
|
-
type:
|
|
168
|
+
type: "relation";
|
|
144
169
|
targetTableId?: string;
|
|
145
170
|
}
|
|
146
171
|
export interface FormulaFieldDef extends FieldDefBase {
|
|
147
|
-
type:
|
|
172
|
+
type: "formula";
|
|
148
173
|
formula: string;
|
|
149
174
|
}
|
|
150
175
|
export type FieldDef = TextFieldDef | NumberFieldDef | SelectFieldDef | DateFieldDef | CheckboxFieldDef | ContactFieldDef | RatingFieldDef | UserFieldDef | AttachmentFieldDef | RelationFieldDef | FormulaFieldDef;
|
|
@@ -159,14 +184,14 @@ export interface DataRecord {
|
|
|
159
184
|
}
|
|
160
185
|
export interface SortConfig {
|
|
161
186
|
fieldId: string;
|
|
162
|
-
direction:
|
|
187
|
+
direction: "asc" | "desc";
|
|
163
188
|
}
|
|
164
189
|
export interface GroupConfig {
|
|
165
190
|
fieldId: string;
|
|
166
191
|
}
|
|
167
192
|
export interface FilterCondition {
|
|
168
193
|
fieldId: string;
|
|
169
|
-
operator:
|
|
194
|
+
operator: "eq" | "neq" | "contains" | "gt" | "lt" | "is_empty" | "is_not_empty";
|
|
170
195
|
value?: CellValue;
|
|
171
196
|
}
|
|
172
197
|
export interface ViewConfig {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneflowui/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "OneFlow UI Component Library - Vue3 components for task management views",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/oneflow-ui.umd.cjs",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@vue/test-utils": "^2.4.6",
|
|
43
43
|
"eslint": "^9.0.0",
|
|
44
44
|
"eslint-plugin-vue": "^9.0.0",
|
|
45
|
+
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
45
46
|
"jsdom": "^24.1.3",
|
|
46
47
|
"mermaid": "^11.12.3",
|
|
47
48
|
"oxfmt": "^0.35.0",
|