@oneflowui/ui 0.2.2 → 0.3.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/{FieldCheckbox-DPylU5RA.js → FieldCheckbox-usI8AWEq.js} +1 -1
- package/dist/{FieldDate-BWtlvi5Y.js → FieldDate-Y4p9eB4O.js} +1 -1
- package/dist/{FieldDatetime-BXghiCm8.js → FieldDatetime-CQEfD87W.js} +1 -1
- package/dist/{FieldEmail-D-hUADX4.js → FieldEmail-BVyzf_fw.js} +1 -1
- package/dist/{FieldMultiSelect-Di0wE1Ns.js → FieldMultiSelect-DuCL06zc.js} +2 -2
- package/dist/{FieldNumber-BbcbizO4.js → FieldNumber-CuS1g2vn.js} +1 -1
- package/dist/{FieldRating-KKEc2khS.js → FieldRating-DVy6dpk7.js} +1 -1
- package/dist/{FieldSelect-D2qtt-0u.js → FieldSelect-Bew5uufs.js} +2 -2
- package/dist/{FieldText-DYbDp4aP.js → FieldText-Cvk1jnhQ.js} +1 -1
- package/dist/{FieldUrl-BoOM8A5O.js → FieldUrl-CCPFbiVm.js} +1 -1
- package/dist/components/base/StatusIndicator.vue.d.ts +3 -0
- package/dist/components/editor/RichTextEditor.vue.d.ts +6 -6
- package/dist/components/field/FieldCheckbox.vue.d.ts +2 -2
- package/dist/components/field/FieldDate.vue.d.ts +2 -2
- package/dist/components/field/FieldDatetime.vue.d.ts +2 -2
- package/dist/components/field/FieldEmail.vue.d.ts +2 -2
- package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldNumber.vue.d.ts +2 -2
- package/dist/components/field/FieldRating.vue.d.ts +2 -2
- package/dist/components/field/FieldSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldText.vue.d.ts +2 -2
- package/dist/components/field/FieldUrl.vue.d.ts +2 -2
- package/dist/components/overlay/Drawer.vue.d.ts +9 -1
- package/dist/components/table/DataTable.vue.d.ts +50 -43
- package/dist/components/table/FieldCell.vue.d.ts +2 -2
- package/dist/components/table/TableDataRow.vue.d.ts +3 -1
- package/dist/components/table/TableHeaderRow.vue.d.ts +1 -1
- package/dist/composables/index.d.ts +7 -0
- package/dist/composables/useBreakpoint.d.ts +5 -0
- package/dist/composables/useTableColumns.d.ts +18 -0
- package/dist/composables/useTableData.d.ts +17 -0
- package/dist/composables/useTableGroup.d.ts +20 -0
- package/dist/constants/table.d.ts +2 -0
- package/dist/{index-CTlM81Ib.js → index-CLFMyBqX.js} +3307 -3178
- package/dist/oneflow-ui.js +105 -104
- package/dist/oneflow-ui.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +24 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as s, computed as f, openBlock as p, createElementBlock as r, withModifiers as d, createElementVNode as m, toDisplayString as _ } from "vue";
|
|
2
|
-
import { _ as u } from "./index-
|
|
2
|
+
import { _ as u } from "./index-CLFMyBqX.js";
|
|
3
3
|
const k = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
|
|
4
4
|
__name: "FieldCheckbox",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as u, onMounted as m, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-CLFMyBqX.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldDate",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as i, onMounted as p, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-CLFMyBqX.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldDatetime",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as p, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-CLFMyBqX.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldEmail",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, ref as a, computed as M, onMounted as z, nextTick as F, onBeforeUnmount as O, watch as T, openBlock as l, createElementBlock as i, Fragment as A, renderList as L, normalizeStyle as w, toDisplayString as k, createBlock as I, Teleport as P, withModifiers as m, normalizeClass as U, createElementVNode as p, createCommentVNode as V } from "vue";
|
|
2
|
-
import { _ as K } from "./index-
|
|
2
|
+
import { _ as K } from "./index-CLFMyBqX.js";
|
|
3
3
|
const W = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-field-multiselect__chips"
|
|
@@ -139,7 +139,7 @@ const W = {
|
|
|
139
139
|
]))
|
|
140
140
|
], 544));
|
|
141
141
|
}
|
|
142
|
-
}), Z = /* @__PURE__ */ K(Q, [["__scopeId", "data-v-
|
|
142
|
+
}), Z = /* @__PURE__ */ K(Q, [["__scopeId", "data-v-21240742"]]);
|
|
143
143
|
export {
|
|
144
144
|
Z as default
|
|
145
145
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as m, onMounted as v, nextTick as d, withDirectives as N, openBlock as b, createElementBlock as y, vModelText as k } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-CLFMyBqX.js";
|
|
3
3
|
const x = /* @__PURE__ */ p({
|
|
4
4
|
__name: "FieldNumber",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, ref as _, openBlock as o, createElementBlock as r, withKeys as x, Fragment as g, renderList as k, unref as c, withModifiers as y, normalizeClass as b } from "vue";
|
|
2
|
-
import { _ as C } from "./index-
|
|
2
|
+
import { _ as C } from "./index-CLFMyBqX.js";
|
|
3
3
|
const M = ["onMouseenter", "onClick"], $ = /* @__PURE__ */ v({
|
|
4
4
|
__name: "FieldRating",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as f, computed as x, onMounted as R, nextTick as V, onBeforeUnmount as z, watch as A, openBlock as l, createElementBlock as a, normalizeStyle as b, toDisplayString as w, createBlock as I, Teleport as F, createElementVNode as T, withModifiers as C, normalizeClass as L, Fragment as O, renderList as P, createCommentVNode as U } from "vue";
|
|
2
|
-
import { _ as K } from "./index-
|
|
2
|
+
import { _ as K } from "./index-CLFMyBqX.js";
|
|
3
3
|
const W = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "of-field-select__display"
|
|
@@ -116,7 +116,7 @@ const W = {
|
|
|
116
116
|
], 544);
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
}), Q = /* @__PURE__ */ K(G, [["__scopeId", "data-v-
|
|
119
|
+
}), Q = /* @__PURE__ */ K(G, [["__scopeId", "data-v-736a9686"]]);
|
|
120
120
|
export {
|
|
121
121
|
Q as default
|
|
122
122
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as x, vModelText as y } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-CLFMyBqX.js";
|
|
3
3
|
const k = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldText",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-CLFMyBqX.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldUrl",
|
|
5
5
|
props: {
|
|
@@ -2,6 +2,8 @@ export interface StatusIndicatorProps {
|
|
|
2
2
|
status: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
size?: "sm" | "md";
|
|
5
|
+
/** 可选的圆点颜色覆盖 */
|
|
6
|
+
color?: string;
|
|
5
7
|
}
|
|
6
8
|
declare function __VLS_template(): {
|
|
7
9
|
attrs: Partial<{}>;
|
|
@@ -18,6 +20,7 @@ declare function __VLS_template(): {
|
|
|
18
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
21
|
declare const __VLS_component: import('vue').DefineComponent<StatusIndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatusIndicatorProps> & Readonly<{}>, {
|
|
20
22
|
size: "sm" | "md";
|
|
23
|
+
color: string;
|
|
21
24
|
label: string;
|
|
22
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
23
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
21
|
editorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
22
22
|
content: {
|
|
23
|
-
type: import('vue').PropType<string | import(
|
|
23
|
+
type: import('vue').PropType<string | import('@vueup/vue-quill').Delta | null | undefined>;
|
|
24
24
|
};
|
|
25
25
|
contentType: {
|
|
26
26
|
type: import('vue').PropType<"delta" | "html" | "text">;
|
|
@@ -82,8 +82,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
82
82
|
getEditor: () => Element;
|
|
83
83
|
getToolbar: () => Element;
|
|
84
84
|
getQuill: () => import('quill').default;
|
|
85
|
-
getContents: (index?: number, length?: number) => string | import(
|
|
86
|
-
setContents: (content: string | import(
|
|
85
|
+
getContents: (index?: number, length?: number) => string | import('@vueup/vue-quill').Delta | undefined;
|
|
86
|
+
setContents: (content: string | import('@vueup/vue-quill').Delta | null | undefined, source?: Sources) => void;
|
|
87
87
|
getHTML: () => string;
|
|
88
88
|
setHTML: (html: string) => void;
|
|
89
89
|
pasteHTML: (html: string, source?: Sources) => void;
|
|
@@ -105,7 +105,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
105
105
|
Defaults: {};
|
|
106
106
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
107
107
|
content: {
|
|
108
|
-
type: import('vue').PropType<string | import(
|
|
108
|
+
type: import('vue').PropType<string | import('@vueup/vue-quill').Delta | null | undefined>;
|
|
109
109
|
};
|
|
110
110
|
contentType: {
|
|
111
111
|
type: import('vue').PropType<"delta" | "html" | "text">;
|
|
@@ -167,8 +167,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
167
167
|
getEditor: () => Element;
|
|
168
168
|
getToolbar: () => Element;
|
|
169
169
|
getQuill: () => import('quill').default;
|
|
170
|
-
getContents: (index?: number, length?: number) => string | import(
|
|
171
|
-
setContents: (content: string | import(
|
|
170
|
+
getContents: (index?: number, length?: number) => string | import('@vueup/vue-quill').Delta | undefined;
|
|
171
|
+
setContents: (content: string | import('@vueup/vue-quill').Delta | null | undefined, source?: Sources) => void;
|
|
172
172
|
getHTML: () => string;
|
|
173
173
|
setHTML: (html: string) => void;
|
|
174
174
|
pasteHTML: (html: string, source?: Sources) => void;
|
|
@@ -3,12 +3,12 @@ type __VLS_Props = {
|
|
|
3
3
|
field: import('../table/FieldCell.vue').FieldDef;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
commit: (value: boolean) => any;
|
|
7
6
|
cancel: () => any;
|
|
7
|
+
commit: (value: boolean) => any;
|
|
8
8
|
tabNext: () => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onCommit?: ((value: boolean) => any) | undefined;
|
|
11
10
|
onCancel?: (() => any) | undefined;
|
|
11
|
+
onCommit?: ((value: boolean) => any) | undefined;
|
|
12
12
|
onTabNext?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
14
|
export default _default;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
triggerRef: HTMLDivElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
15
|
export default _default;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
triggerRef: HTMLDivElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -6,7 +6,15 @@ type __VLS_Props = {
|
|
|
6
6
|
maskClosable?: boolean;
|
|
7
7
|
zIndex?: number;
|
|
8
8
|
};
|
|
9
|
-
declare function __VLS_template():
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
title?(_: {}): any;
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
10
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
19
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
20
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -1,49 +1,56 @@
|
|
|
1
1
|
import { FieldDef as CellFieldDef } from './FieldCell.vue';
|
|
2
2
|
import { Task, TableColumn, ColorMap, DataRecord, TableSchema, ViewConfig } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
declare const _default: <T extends {
|
|
4
|
+
id: string;
|
|
5
|
+
} & Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
7
|
+
readonly "onRow-click"?: ((row: any) => any) | undefined;
|
|
8
|
+
readonly "onRow-click-record"?: ((record: DataRecord) => any) | undefined;
|
|
9
|
+
readonly "onAdd-row"?: (() => any) | undefined;
|
|
10
|
+
readonly "onSelection-change"?: ((ids: (string | number)[]) => any) | undefined;
|
|
11
|
+
readonly "onCell-edit"?: ((payload: {
|
|
12
|
+
rowId: string;
|
|
13
|
+
fieldId: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}) => any) | undefined;
|
|
16
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onRow-click" | "onRow-click-record" | "onAdd-row" | "onSelection-change" | "onCell-edit"> & {
|
|
17
|
+
tasks?: Task[];
|
|
18
|
+
records?: DataRecord[];
|
|
19
|
+
schema?: TableSchema;
|
|
20
|
+
view?: ViewConfig;
|
|
21
|
+
columns?: TableColumn[];
|
|
22
|
+
fieldDefs?: CellFieldDef[];
|
|
23
|
+
rowKey?: string;
|
|
24
|
+
selectable?: boolean;
|
|
25
|
+
addable?: boolean;
|
|
26
|
+
/** 优先级颜色映射 */
|
|
27
|
+
priorityColorMap?: ColorMap;
|
|
28
|
+
/** 状态颜色映射 */
|
|
29
|
+
statusColorMap?: ColorMap;
|
|
30
|
+
/** 分组字段名,如 "status" */
|
|
31
|
+
groupBy?: string;
|
|
32
|
+
/** 分组标题的 Badge 颜色映射 */
|
|
33
|
+
groupColorMap?: ColorMap;
|
|
34
|
+
/**
|
|
35
|
+
* 手动控制虚拟滚动开关。
|
|
36
|
+
* - `true`:强制启用虚拟滚动
|
|
37
|
+
* - `false`:强制关闭虚拟滚动
|
|
38
|
+
* - `undefined`(默认):自动判断,行数 > VIRTUAL_SCROLL_THRESHOLD 时启用
|
|
39
|
+
*/
|
|
40
|
+
virtual?: boolean;
|
|
41
|
+
} & Partial<{}>> & import('vue').PublicProps;
|
|
42
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
43
|
+
attrs: any;
|
|
44
|
+
slots: {};
|
|
45
|
+
emit: ((evt: "row-click", row: any) => void) & ((evt: "row-click-record", record: DataRecord) => void) & ((evt: "add-row") => void) & ((evt: "selection-change", ids: (string | number)[]) => void) & ((evt: "cell-edit", payload: {
|
|
28
46
|
rowId: string;
|
|
29
47
|
fieldId: string;
|
|
30
48
|
value: unknown;
|
|
31
|
-
}) =>
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"onAdd-row"?: (() => any) | undefined;
|
|
36
|
-
"onSelection-change"?: ((ids: string[]) => any) | undefined;
|
|
37
|
-
"onCell-edit"?: ((payload: {
|
|
38
|
-
rowId: string;
|
|
39
|
-
fieldId: string;
|
|
40
|
-
value: unknown;
|
|
41
|
-
}) => any) | undefined;
|
|
42
|
-
}>, {
|
|
43
|
-
selectable: boolean;
|
|
44
|
-
rowKey: string;
|
|
45
|
-
addable: boolean;
|
|
46
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
47
|
-
scrollContainerRef: HTMLDivElement;
|
|
48
|
-
}, HTMLDivElement>;
|
|
49
|
+
}) => void);
|
|
50
|
+
}>) => import('vue').VNode & {
|
|
51
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
52
|
+
};
|
|
49
53
|
export default _default;
|
|
54
|
+
type __VLS_PrettifyLocal<T> = {
|
|
55
|
+
[K in keyof T]: T[K];
|
|
56
|
+
} & {};
|
|
@@ -20,12 +20,12 @@ type __VLS_Props = {
|
|
|
20
20
|
readonly?: boolean;
|
|
21
21
|
};
|
|
22
22
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
-
commit: (rowId: string, fieldId: string, value: CellValue) => any;
|
|
24
23
|
cancel: () => any;
|
|
24
|
+
commit: (rowId: string, fieldId: string, value: CellValue) => any;
|
|
25
25
|
tabNext: () => any;
|
|
26
26
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
-
onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
|
|
28
27
|
onCancel?: (() => any) | undefined;
|
|
28
|
+
onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
|
|
29
29
|
onTabNext?: (() => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
readonly: boolean;
|
|
@@ -6,7 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
row: TableRow;
|
|
7
7
|
rowKey?: string;
|
|
8
8
|
selected?: boolean;
|
|
9
|
-
|
|
9
|
+
selectable?: boolean;
|
|
10
|
+
columns: TableColumn[];
|
|
10
11
|
/**
|
|
11
12
|
* 优先级颜色映射,与内置默认映射合并(传入优先)
|
|
12
13
|
*/
|
|
@@ -35,6 +36,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
35
36
|
onSelect?: ((id: string) => any) | undefined;
|
|
36
37
|
onClick?: ((row: TableRow) => any) | undefined;
|
|
37
38
|
}>, {
|
|
39
|
+
selectable: boolean;
|
|
38
40
|
rowKey: string;
|
|
39
41
|
selected: boolean;
|
|
40
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -16,3 +16,10 @@ export { useInlineEdit } from './useInlineEdit';
|
|
|
16
16
|
export type { EditingCell } from './useInlineEdit';
|
|
17
17
|
export { useVirtualList } from './useVirtualList';
|
|
18
18
|
export type { UseVirtualListOptions, VirtualItem } from './useVirtualList';
|
|
19
|
+
export { useToast } from './useToast';
|
|
20
|
+
export type { UseToastOptions, ToastType, ToastItem } from './useToast';
|
|
21
|
+
export { useTableData } from './useTableData';
|
|
22
|
+
export type { UseTableDataOptions } from './useTableData';
|
|
23
|
+
export { useTableColumns } from './useTableColumns';
|
|
24
|
+
export type { UseTableColumnsOptions } from './useTableColumns';
|
|
25
|
+
export { useBreakpoint } from './useBreakpoint';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TableColumn, TableSchema, ViewConfig } from '../types';
|
|
3
|
+
export interface UseTableColumnsOptions {
|
|
4
|
+
columns?: Ref<TableColumn[] | undefined>;
|
|
5
|
+
schema?: Ref<TableSchema | undefined>;
|
|
6
|
+
view?: Ref<ViewConfig | undefined>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 将 TableSchema 或 TableColumn[] 解析为渲染用的列配置。
|
|
10
|
+
*
|
|
11
|
+
* 优先级:
|
|
12
|
+
* 1. props.columns 直接使用(已经是最终列定义)
|
|
13
|
+
* 2. props.schema + props.view 过滤可见字段并转换
|
|
14
|
+
* 3. 降级到 DEFAULT_TABLE_COLUMNS
|
|
15
|
+
*/
|
|
16
|
+
export declare function useTableColumns(options: UseTableColumnsOptions): {
|
|
17
|
+
columns: import('vue').ComputedRef<TableColumn[]>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Task, DataRecord } from '../types';
|
|
3
|
+
export interface UseTableDataOptions {
|
|
4
|
+
tasks?: Ref<Task[] | undefined>;
|
|
5
|
+
records?: Ref<DataRecord[] | undefined>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 将 Task[] 或 DataRecord[] 标准化为统一的行格式 T[]。
|
|
9
|
+
*
|
|
10
|
+
* - 优先使用 records:展开 fields 并保留 createdAt/updatedAt/__record 元信息
|
|
11
|
+
* - 否则使用 tasks(原样透传,不做额外转换)
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTableData<T extends {
|
|
14
|
+
id: string;
|
|
15
|
+
} & Record<string, any>>(options: UseTableDataOptions): {
|
|
16
|
+
rows: import('vue').ComputedRef<T[]>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface UseTableGroupOptions<T> {
|
|
3
|
+
data: Ref<T[]>;
|
|
4
|
+
groupBy: Ref<string | undefined>;
|
|
5
|
+
}
|
|
6
|
+
export type GroupHeaderItem = {
|
|
7
|
+
__type: 'group-header';
|
|
8
|
+
__groupKey: string;
|
|
9
|
+
__groupCount: number;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
export type GroupedListItem<T> = (T & {
|
|
13
|
+
__type: 'data-row';
|
|
14
|
+
}) | GroupHeaderItem;
|
|
15
|
+
export declare function useTableGroup<T extends Record<string, any>>(options: UseTableGroupOptions<T>): {
|
|
16
|
+
groupedItems: import('vue').ComputedRef<GroupedListItem<T>[]>;
|
|
17
|
+
collapsedGroups: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
18
|
+
toggleGroup: (groupKey: string) => void;
|
|
19
|
+
isGroupHeader: (item: any) => item is GroupHeaderItem;
|
|
20
|
+
};
|