yc-agent-ui 1.2.8 → 1.2.11
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/es/components/data-table/src/data-table.vue.d.ts +2 -2
- package/es/components/display-item/index.d.ts +3 -3
- package/es/components/display-item/src/index.vue.d.ts +1 -1
- package/es/components/drawer-form/index.d.ts +6 -6
- package/es/components/drawer-form/src/index.vue.d.ts +2 -2
- package/es/components/page/index.d.ts +100 -100
- package/es/components/page/src/index.vue.d.ts +33 -33
- package/es/components/table/index.d.ts +18 -18
- package/es/components/table/src/index.vue.d.ts +2 -2
- package/es/components/table/src/table-column.vue.d.ts +10 -10
- package/es/components/virtual-table/index.d.ts +7 -7
- package/es/components/virtual-table/src/index.vue.d.ts +2 -2
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
- package/es/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
- package/es/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
- package/es/components/yc-coss-table/src/table.vue.d.ts +1 -1
- package/es/components/yc-display-cards/index.d.ts +218 -3
- package/es/components/yc-display-cards/src/card-renderer.vue.d.ts +16 -0
- package/es/components/yc-display-cards/src/elements/action-bar.vue.d.ts +12 -0
- package/es/components/yc-display-cards/src/elements/card-shell.vue.d.ts +24 -0
- package/es/components/yc-display-cards/src/elements/choice-group.vue.d.ts +14 -0
- package/es/components/yc-display-cards/src/elements/data-table.vue.d.ts +10 -0
- package/es/components/yc-display-cards/src/elements/field-control.vue.d.ts +22 -0
- package/es/components/yc-display-cards/src/elements/field-utils.d.ts +16 -0
- package/es/components/yc-display-cards/src/elements/form-field.vue.d.ts +18 -0
- package/es/components/yc-display-cards/src/elements/inline-alert.vue.d.ts +14 -0
- package/es/components/yc-display-cards/src/elements/input.vue.d.ts +20 -0
- package/es/components/yc-display-cards/src/elements/kv-list.vue.d.ts +8 -0
- package/es/components/yc-display-cards/src/elements/metric-grid.vue.d.ts +7 -0
- package/es/components/yc-display-cards/src/elements/status-tag.vue.d.ts +6 -0
- package/es/components/yc-display-cards/src/elements/switch.vue.d.ts +10 -0
- package/es/components/yc-display-cards/src/elements/upload.vue.d.ts +17 -0
- package/es/components/yc-display-cards/src/elements/use-card-form.d.ts +23 -0
- package/es/components/yc-display-cards/src/form-card.vue.d.ts +5 -2
- package/es/components/yc-display-cards/src/table-card.vue.d.ts +1 -2
- package/es/components/yc-display-cards/src/types.d.ts +179 -10
- package/es/components/yc-feedback/src/banner.vue.d.ts +1 -1
- package/es/components/yc-feedback/src/key-value-list.vue.d.ts +1 -1
- package/es/components/yc-input/src/textarea.vue.d.ts +2 -2
- package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/es/components/yc-plus-page/src/index.vue.d.ts +115 -115
- package/es/components/yc-property-table/src/property-table.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +18 -18
- package/es/index.css +30 -24
- package/es/index.mjs +3 -1
- package/es/packages/components/index.mjs +3 -1
- package/es/packages/components/yc-display-cards/capability.mjs +57 -1
- package/es/packages/components/yc-display-cards/index.mjs +31 -1
- package/es/packages/components/yc-display-cards/src/card-renderer.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/card-renderer2.vue.mjs +295 -0
- package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +1 -1
- package/es/packages/components/yc-display-cards/src/detail-card2.vue.mjs +28 -94
- package/es/packages/components/yc-display-cards/src/elements/action-bar.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/action-bar2.vue.mjs +38 -0
- package/es/packages/components/yc-display-cards/src/elements/card-shell.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/card-shell2.vue.mjs +85 -0
- package/es/packages/components/yc-display-cards/src/elements/choice-group.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/choice-group2.vue.mjs +57 -0
- package/es/packages/components/yc-display-cards/src/elements/data-table.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/data-table2.vue.mjs +184 -0
- package/es/packages/components/yc-display-cards/src/elements/field-control.vue.mjs +5 -0
- package/es/packages/components/yc-display-cards/src/elements/field-control2.vue.mjs +92 -0
- package/es/packages/components/yc-display-cards/src/elements/field-utils.mjs +121 -0
- package/es/packages/components/yc-display-cards/src/elements/form-field.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/form-field2.vue.mjs +68 -0
- package/es/packages/components/yc-display-cards/src/elements/inline-alert.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/inline-alert2.vue.mjs +29 -0
- package/es/packages/components/yc-display-cards/src/elements/input.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/input2.vue.mjs +148 -0
- package/es/packages/components/yc-display-cards/src/elements/kv-list.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/kv-list2.vue.mjs +63 -0
- package/es/packages/components/yc-display-cards/src/elements/metric-grid.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/metric-grid2.vue.mjs +97 -0
- package/es/packages/components/yc-display-cards/src/elements/status-tag.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/status-tag2.vue.mjs +25 -0
- package/es/packages/components/yc-display-cards/src/elements/switch.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/switch2.vue.mjs +35 -0
- package/es/packages/components/yc-display-cards/src/elements/upload.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/elements/upload2.vue.mjs +196 -0
- package/es/packages/components/yc-display-cards/src/elements/use-card-form.mjs +80 -0
- package/es/packages/components/yc-display-cards/src/form-card.vue.mjs +1 -1
- package/es/packages/components/yc-display-cards/src/form-card2.vue.mjs +169 -1140
- package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +1 -1
- package/es/packages/components/yc-display-cards/src/metrics-card2.vue.mjs +19 -114
- package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +1 -1
- package/es/packages/components/yc-display-cards/src/table-card2.vue.mjs +50 -232
- package/es/packages/components/yc-status-dialog/src/index.vue.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +20 -14
- package/index.js +2204 -2354
- package/index.min.css +19 -13
- package/index.min.js +37 -43
- package/index.min.mjs +36 -42
- package/index.mjs +2184 -2353
- package/lib/components/data-table/src/data-table.vue.d.ts +2 -2
- package/lib/components/display-item/index.d.ts +3 -3
- package/lib/components/display-item/src/index.vue.d.ts +1 -1
- package/lib/components/drawer-form/index.d.ts +6 -6
- package/lib/components/drawer-form/src/index.vue.d.ts +2 -2
- package/lib/components/page/index.d.ts +100 -100
- package/lib/components/page/src/index.vue.d.ts +33 -33
- package/lib/components/table/index.d.ts +18 -18
- package/lib/components/table/src/index.vue.d.ts +2 -2
- package/lib/components/table/src/table-column.vue.d.ts +10 -10
- package/lib/components/virtual-table/index.d.ts +7 -7
- package/lib/components/virtual-table/src/index.vue.d.ts +2 -2
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
- package/lib/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
- package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
- package/lib/components/yc-coss-table/src/table.vue.d.ts +1 -1
- package/lib/components/yc-display-cards/index.d.ts +218 -3
- package/lib/components/yc-display-cards/src/card-renderer.vue.d.ts +16 -0
- package/lib/components/yc-display-cards/src/elements/action-bar.vue.d.ts +12 -0
- package/lib/components/yc-display-cards/src/elements/card-shell.vue.d.ts +24 -0
- package/lib/components/yc-display-cards/src/elements/choice-group.vue.d.ts +14 -0
- package/lib/components/yc-display-cards/src/elements/data-table.vue.d.ts +10 -0
- package/lib/components/yc-display-cards/src/elements/field-control.vue.d.ts +22 -0
- package/lib/components/yc-display-cards/src/elements/field-utils.d.ts +16 -0
- package/lib/components/yc-display-cards/src/elements/form-field.vue.d.ts +18 -0
- package/lib/components/yc-display-cards/src/elements/inline-alert.vue.d.ts +14 -0
- package/lib/components/yc-display-cards/src/elements/input.vue.d.ts +20 -0
- package/lib/components/yc-display-cards/src/elements/kv-list.vue.d.ts +8 -0
- package/lib/components/yc-display-cards/src/elements/metric-grid.vue.d.ts +7 -0
- package/lib/components/yc-display-cards/src/elements/status-tag.vue.d.ts +6 -0
- package/lib/components/yc-display-cards/src/elements/switch.vue.d.ts +10 -0
- package/lib/components/yc-display-cards/src/elements/upload.vue.d.ts +17 -0
- package/lib/components/yc-display-cards/src/elements/use-card-form.d.ts +23 -0
- package/lib/components/yc-display-cards/src/form-card.vue.d.ts +5 -2
- package/lib/components/yc-display-cards/src/table-card.vue.d.ts +1 -2
- package/lib/components/yc-display-cards/src/types.d.ts +179 -10
- package/lib/components/yc-feedback/src/banner.vue.d.ts +1 -1
- package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +1 -1
- package/lib/components/yc-input/src/textarea.vue.d.ts +2 -2
- package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/lib/components/yc-plus-page/src/index.vue.d.ts +115 -115
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +18 -18
- package/lib/index.css +29 -23
- package/lib/index.js +28 -7
- package/lib/packages/components/index.js +28 -7
- package/lib/packages/components/yc-display-cards/capability.js +56 -0
- package/lib/packages/components/yc-display-cards/index.js +49 -0
- package/lib/packages/components/yc-display-cards/src/card-renderer.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/card-renderer2.vue.js +299 -0
- package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +1 -1
- package/lib/packages/components/yc-display-cards/src/detail-card2.vue.js +27 -93
- package/lib/packages/components/yc-display-cards/src/elements/action-bar.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/action-bar2.vue.js +42 -0
- package/lib/packages/components/yc-display-cards/src/elements/card-shell.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/card-shell2.vue.js +89 -0
- package/lib/packages/components/yc-display-cards/src/elements/choice-group.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/choice-group2.vue.js +61 -0
- package/lib/packages/components/yc-display-cards/src/elements/data-table.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/data-table2.vue.js +188 -0
- package/lib/packages/components/yc-display-cards/src/elements/field-control.vue.js +9 -0
- package/lib/packages/components/yc-display-cards/src/elements/field-control2.vue.js +96 -0
- package/lib/packages/components/yc-display-cards/src/elements/field-utils.js +134 -0
- package/lib/packages/components/yc-display-cards/src/elements/form-field.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/form-field2.vue.js +72 -0
- package/lib/packages/components/yc-display-cards/src/elements/inline-alert.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/inline-alert2.vue.js +33 -0
- package/lib/packages/components/yc-display-cards/src/elements/input.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/input2.vue.js +152 -0
- package/lib/packages/components/yc-display-cards/src/elements/kv-list.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/kv-list2.vue.js +67 -0
- package/lib/packages/components/yc-display-cards/src/elements/metric-grid.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/metric-grid2.vue.js +101 -0
- package/lib/packages/components/yc-display-cards/src/elements/status-tag.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/status-tag2.vue.js +29 -0
- package/lib/packages/components/yc-display-cards/src/elements/switch.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/switch2.vue.js +39 -0
- package/lib/packages/components/yc-display-cards/src/elements/upload.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/elements/upload2.vue.js +200 -0
- package/lib/packages/components/yc-display-cards/src/elements/use-card-form.js +82 -0
- package/lib/packages/components/yc-display-cards/src/form-card.vue.js +1 -1
- package/lib/packages/components/yc-display-cards/src/form-card2.vue.js +168 -1139
- package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +1 -1
- package/lib/packages/components/yc-display-cards/src/metrics-card2.vue.js +18 -113
- package/lib/packages/components/yc-display-cards/src/table-card.vue.js +1 -1
- package/lib/packages/components/yc-display-cards/src/table-card2.vue.js +49 -231
- package/lib/packages/components/yc-status-dialog/src/index.vue.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -2
- package/theme-chalk/index.css +20 -14
- package/theme-chalk/plus-dialog.css +1 -1
- package/theme-chalk/plus-yc-status-dialog.css +1 -1
- package/theme-chalk/src/dialog.scss +0 -6
- package/theme-chalk/src/index.scss +1 -2
- package/theme-chalk/src/yc-status-dialog.scss +2 -2
- package/es/_virtual/_commonjsHelpers.mjs +0 -7
- package/es/_virtual/toastify.mjs +0 -3
- package/es/components/yc-display-cards/src/toast.d.ts +0 -4
- package/es/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.mjs +0 -456
- package/es/packages/components/yc-display-cards/src/toast.mjs +0 -35
- package/lib/_virtual/_commonjsHelpers.js +0 -10
- package/lib/_virtual/toastify.js +0 -5
- package/lib/components/yc-display-cards/src/toast.d.ts +0 -4
- package/lib/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js +0 -460
- package/lib/packages/components/yc-display-cards/src/toast.js +0 -37
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DisplayFormOption, YcCardInputKind } from '../types';
|
|
3
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4
|
+
blur: () => void;
|
|
5
|
+
focus: () => void;
|
|
6
|
+
"update:modelValue": (value: unknown) => void;
|
|
7
|
+
}, string, PublicProps, Readonly<unknown> & Readonly<{
|
|
8
|
+
onBlur?: (() => any) | undefined;
|
|
9
|
+
onFocus?: (() => any) | undefined;
|
|
10
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
options: DisplayFormOption[];
|
|
14
|
+
invalid: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
modelValue: undefined;
|
|
18
|
+
kind: YcCardInputKind;
|
|
19
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { YcCardKvItem } from '../types';
|
|
3
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<unknown> & Readonly<{}>, {
|
|
4
|
+
columns: 1 | 2;
|
|
5
|
+
bordered: boolean;
|
|
6
|
+
items: YcCardKvItem[];
|
|
7
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DisplayMetricItem } from '../types';
|
|
3
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<unknown> & Readonly<{}>, {
|
|
4
|
+
bordered: boolean;
|
|
5
|
+
items: DisplayMetricItem[];
|
|
6
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { YcCardTone } from '../types';
|
|
3
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<unknown> & Readonly<{}>, {
|
|
4
|
+
tone: YcCardTone;
|
|
5
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3
|
+
"update:modelValue": (value: boolean) => void;
|
|
4
|
+
}, string, PublicProps, Readonly<unknown> & Readonly<{
|
|
5
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
modelValue: boolean;
|
|
9
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DisplayFormAttachment } from '../types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
5
|
+
error: (message: string) => void;
|
|
6
|
+
"update:modelValue": (value: DisplayFormAttachment[] | undefined) => void;
|
|
7
|
+
}, string, PublicProps, Readonly<unknown> & Readonly<{
|
|
8
|
+
onError?: ((message: string) => any) | undefined;
|
|
9
|
+
"onUpdate:modelValue"?: ((value: DisplayFormAttachment[] | undefined) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
multiple: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
modelValue: DisplayFormAttachment[];
|
|
14
|
+
accept: "image" | "file";
|
|
15
|
+
uploadFile: (file: File) => Promise<DisplayFormAttachment>;
|
|
16
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { DisplayFormField, DisplayFormOption, DisplayFormAttachment } from '../types';
|
|
3
|
+
|
|
4
|
+
/** 卡片内表单状态:字段值、校验错误、宿主追加的补充字段;不含任何提交或反馈逻辑。 */
|
|
5
|
+
export declare function useCardForm(baseFields: Ref<DisplayFormField[]>, initialValues: Ref<Record<string, unknown> | undefined>): {
|
|
6
|
+
values: Record<string, unknown>;
|
|
7
|
+
errors: Record<string, string>;
|
|
8
|
+
fields: ComputedRef<DisplayFormField[]>;
|
|
9
|
+
visibleFields: ComputedRef<DisplayFormField[]>;
|
|
10
|
+
appendedNames: ComputedRef<Set<string>>;
|
|
11
|
+
remoteOptions: Record<string, DisplayFormOption[]>;
|
|
12
|
+
optionsOf: (field: DisplayFormField) => DisplayFormOption[];
|
|
13
|
+
setValue: (name: string, value: unknown) => void;
|
|
14
|
+
validateField: (field: DisplayFormField) => string;
|
|
15
|
+
validate: () => {
|
|
16
|
+
field: string;
|
|
17
|
+
message: string;
|
|
18
|
+
} | null;
|
|
19
|
+
appendFields: (extra?: DisplayFormField[]) => void;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
replyText: (prefix: string) => string;
|
|
22
|
+
attachments: () => DisplayFormAttachment[];
|
|
23
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { DisplayFormAttachment, DisplayFormField, DisplayFormActionRequest, DisplayFormActionResult, DisplayFormReplyPayload, DisplayFormReplyResult } from './types';
|
|
1
|
+
import { DisplayFormAttachment, DisplayFormFeedback, DisplayFormField, DisplayFormActionRequest, DisplayFormActionResult, DisplayFormReplyPayload, DisplayFormReplyResult } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
|
|
4
4
|
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
5
5
|
action: (text: string, attachments?: DisplayFormAttachment[] | undefined) => void;
|
|
6
|
+
feedback: (feedback: DisplayFormFeedback) => void;
|
|
6
7
|
}, string, PublicProps, Readonly<unknown> & Readonly<{
|
|
7
8
|
onAction?: ((text: string, attachments?: DisplayFormAttachment[] | undefined) => any) | undefined;
|
|
9
|
+
onFeedback?: ((feedback: DisplayFormFeedback) => any) | undefined;
|
|
8
10
|
}>, {
|
|
9
11
|
title: string;
|
|
10
12
|
values: Record<string, unknown>;
|
|
@@ -12,12 +14,13 @@ declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOption
|
|
|
12
14
|
compact: boolean;
|
|
13
15
|
fields: DisplayFormField[];
|
|
14
16
|
subtitle: string;
|
|
17
|
+
uploadFile: (file: File) => Promise<DisplayFormAttachment>;
|
|
15
18
|
operation: string;
|
|
16
19
|
submitLabel: string;
|
|
17
20
|
replyPrefix: string;
|
|
18
21
|
skillName: string;
|
|
19
22
|
executeAction: (req: DisplayFormActionRequest) => Promise< DisplayFormActionResult>;
|
|
20
|
-
uploadFile: (file: File) => Promise<DisplayFormAttachment>;
|
|
21
23
|
submitReply: (payload: DisplayFormReplyPayload) => Promise< DisplayFormReplyResult>;
|
|
24
|
+
inlineFeedback: boolean;
|
|
22
25
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
23
26
|
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DisplayTableColumn, DisplaySummaryItem } from './types';
|
|
2
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
|
|
2
|
+
import { DisplaySummaryItem, DisplayTableColumn } from './types';
|
|
4
3
|
declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<unknown> & Readonly<{}>, {
|
|
5
4
|
title: string;
|
|
6
5
|
summary: DisplaySummaryItem[];
|
|
@@ -62,6 +62,7 @@ export interface DisplayFormField {
|
|
|
62
62
|
options_operation?: string;
|
|
63
63
|
option_label_key?: string;
|
|
64
64
|
option_value_key?: string;
|
|
65
|
+
placeholder?: string;
|
|
65
66
|
}
|
|
66
67
|
export interface DisplayFormAttachment {
|
|
67
68
|
fileRef?: string;
|
|
@@ -85,24 +86,22 @@ export interface DisplayFormActionResult {
|
|
|
85
86
|
fields?: DisplayFormField[];
|
|
86
87
|
data?: unknown;
|
|
87
88
|
}
|
|
88
|
-
export interface DisplayFormTraceStep {
|
|
89
|
-
id: string;
|
|
90
|
-
label: string;
|
|
91
|
-
status: "running" | "succeeded" | "failed";
|
|
92
|
-
detail?: string;
|
|
93
|
-
}
|
|
94
89
|
export interface DisplayFormReplyPayload {
|
|
95
90
|
text: string;
|
|
96
91
|
attachments?: DisplayFormAttachment[];
|
|
97
92
|
values: Record<string, unknown>;
|
|
98
|
-
onTrace: (step: DisplayFormTraceStep) => void;
|
|
99
93
|
}
|
|
100
94
|
export interface DisplayFormReplyResult {
|
|
101
95
|
ok: boolean;
|
|
102
96
|
message?: string;
|
|
103
|
-
/**
|
|
97
|
+
/** 宿主判定缺少的字段;卡片只按此追加,不自行推断。 */
|
|
104
98
|
missingFields?: DisplayFormField[];
|
|
105
|
-
|
|
99
|
+
}
|
|
100
|
+
/** 卡片对外的反馈事件,Toast、全局提示等页面级呈现由宿主自行决定。 */
|
|
101
|
+
export interface DisplayFormFeedback {
|
|
102
|
+
type: "success" | "error" | "validation" | "upload-error";
|
|
103
|
+
message: string;
|
|
104
|
+
field?: string;
|
|
106
105
|
}
|
|
107
106
|
export interface YcDisplayFormCardProps {
|
|
108
107
|
title?: string;
|
|
@@ -119,6 +118,176 @@ export interface YcDisplayFormCardProps {
|
|
|
119
118
|
executeAction?: (req: DisplayFormActionRequest) => Promise<DisplayFormActionResult>;
|
|
120
119
|
/** 表单内 image/file 字段的文件上传适配器;由宿主项目提供具体上传接口。 */
|
|
121
120
|
uploadFile?: (file: File) => Promise<DisplayFormAttachment>;
|
|
122
|
-
/**
|
|
121
|
+
/** reply 模式的提交适配器;不传时退化为 emit("action"),由宿主决定怎么发回对话。 */
|
|
123
122
|
submitReply?: (payload: DisplayFormReplyPayload) => Promise<DisplayFormReplyResult>;
|
|
123
|
+
/** 是否在卡片内展示错误/成功提示条;宿主改用自己的 Toast 等方式时可关闭,并监听 feedback 事件。 */
|
|
124
|
+
inlineFeedback?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export type YcCardTone = "neutral" | "primary" | "success" | "warning" | "danger" | "info";
|
|
127
|
+
export interface YcCardShellProps {
|
|
128
|
+
title?: string;
|
|
129
|
+
subtitle?: string;
|
|
130
|
+
badge?: {
|
|
131
|
+
text: string;
|
|
132
|
+
tone?: YcCardTone;
|
|
133
|
+
};
|
|
134
|
+
/** 标题左侧强调条与浅色页眉,用于需要用户操作的卡片。 */
|
|
135
|
+
accent?: boolean;
|
|
136
|
+
compact?: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface YcCardTagProps {
|
|
139
|
+
text: string;
|
|
140
|
+
tone?: YcCardTone;
|
|
141
|
+
}
|
|
142
|
+
export interface YcCardAlertProps {
|
|
143
|
+
text?: string;
|
|
144
|
+
tone?: "info" | "success" | "warning" | "error";
|
|
145
|
+
}
|
|
146
|
+
export interface YcCardKvItem {
|
|
147
|
+
label: string;
|
|
148
|
+
value: string | number | null | undefined;
|
|
149
|
+
span?: 1 | 2;
|
|
150
|
+
}
|
|
151
|
+
export interface YcCardKvProps {
|
|
152
|
+
items?: YcCardKvItem[];
|
|
153
|
+
columns?: 1 | 2;
|
|
154
|
+
/** 嵌在有内边距的容器里时加圆角边框。 */
|
|
155
|
+
bordered?: boolean;
|
|
156
|
+
}
|
|
157
|
+
export interface YcCardMetricsProps {
|
|
158
|
+
items?: DisplayMetricItem[];
|
|
159
|
+
bordered?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface YcCardTableProps {
|
|
162
|
+
columns?: DisplayTableColumn[];
|
|
163
|
+
rows?: Record<string, unknown>[];
|
|
164
|
+
/** 超过该行数时出现搜索与分页。 */
|
|
165
|
+
maxRows?: number;
|
|
166
|
+
bordered?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export type YcCardInputKind = "text" | "phone" | "email" | "number" | "integer" | "date" | "datetime" | "textarea" | "select";
|
|
169
|
+
export interface YcCardInputProps {
|
|
170
|
+
modelValue?: unknown;
|
|
171
|
+
kind?: YcCardInputKind;
|
|
172
|
+
placeholder?: string;
|
|
173
|
+
/** kind 为 select 时的候选项。 */
|
|
174
|
+
options?: DisplayFormOption[];
|
|
175
|
+
loading?: boolean;
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
invalid?: boolean;
|
|
178
|
+
}
|
|
179
|
+
export interface YcCardChoiceProps {
|
|
180
|
+
modelValue?: unknown;
|
|
181
|
+
options?: DisplayFormOption[];
|
|
182
|
+
multiple?: boolean;
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
}
|
|
185
|
+
export interface YcCardSwitchProps {
|
|
186
|
+
modelValue?: boolean;
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
}
|
|
189
|
+
export interface YcCardUploadProps {
|
|
190
|
+
modelValue?: DisplayFormAttachment[];
|
|
191
|
+
accept?: "image" | "file";
|
|
192
|
+
multiple?: boolean;
|
|
193
|
+
disabled?: boolean;
|
|
194
|
+
uploadFile?: (file: File) => Promise<DisplayFormAttachment>;
|
|
195
|
+
}
|
|
196
|
+
export interface YcCardFieldProps {
|
|
197
|
+
label?: string;
|
|
198
|
+
required?: boolean;
|
|
199
|
+
/** 标签旁的小标记,如「需补充」。 */
|
|
200
|
+
hint?: string;
|
|
201
|
+
error?: string;
|
|
202
|
+
fullRow?: boolean;
|
|
203
|
+
}
|
|
204
|
+
export interface YcCardFieldControlProps {
|
|
205
|
+
field: DisplayFormField;
|
|
206
|
+
modelValue?: unknown;
|
|
207
|
+
/** 覆盖 field 自带的选项(如远程加载的候选)。 */
|
|
208
|
+
options?: DisplayFormOption[];
|
|
209
|
+
loadingOptions?: boolean;
|
|
210
|
+
disabled?: boolean;
|
|
211
|
+
error?: string;
|
|
212
|
+
hint?: string;
|
|
213
|
+
uploadFile?: (file: File) => Promise<DisplayFormAttachment>;
|
|
214
|
+
}
|
|
215
|
+
export interface YcCardActionItem {
|
|
216
|
+
key: string;
|
|
217
|
+
label: string;
|
|
218
|
+
primary?: boolean;
|
|
219
|
+
disabled?: boolean;
|
|
220
|
+
loadingLabel?: string;
|
|
221
|
+
}
|
|
222
|
+
export interface YcCardActionsProps {
|
|
223
|
+
items?: YcCardActionItem[];
|
|
224
|
+
/** 正在执行的按钮 key,执行期间所有按钮禁用。 */
|
|
225
|
+
loadingKey?: string;
|
|
226
|
+
disabled?: boolean;
|
|
227
|
+
}
|
|
228
|
+
export type YcCardElement = {
|
|
229
|
+
type: "text";
|
|
230
|
+
text: string;
|
|
231
|
+
tone?: "default" | "muted" | "strong";
|
|
232
|
+
} | {
|
|
233
|
+
type: "status";
|
|
234
|
+
text: string;
|
|
235
|
+
tone?: YcCardTone;
|
|
236
|
+
} | {
|
|
237
|
+
type: "alert";
|
|
238
|
+
text: string;
|
|
239
|
+
tone?: YcCardAlertProps["tone"];
|
|
240
|
+
} | {
|
|
241
|
+
type: "kv";
|
|
242
|
+
items: YcCardKvItem[];
|
|
243
|
+
columns?: 1 | 2;
|
|
244
|
+
} | {
|
|
245
|
+
type: "metrics";
|
|
246
|
+
items: DisplayMetricItem[];
|
|
247
|
+
} | {
|
|
248
|
+
type: "table";
|
|
249
|
+
columns: DisplayTableColumn[];
|
|
250
|
+
rows: Record<string, unknown>[];
|
|
251
|
+
total?: number;
|
|
252
|
+
} | {
|
|
253
|
+
type: "divider";
|
|
254
|
+
} | ({
|
|
255
|
+
type: "field";
|
|
256
|
+
value?: unknown;
|
|
257
|
+
} & DisplayFormField) | {
|
|
258
|
+
type: "actions";
|
|
259
|
+
items: YcCardAction[];
|
|
260
|
+
};
|
|
261
|
+
export interface YcCardAction {
|
|
262
|
+
/** reply:把卡片里填写的内容交给宿主发回 Agent;reset:清空填写;link:交给宿主打开链接。 */
|
|
263
|
+
action: "reply" | "reset" | "link";
|
|
264
|
+
label: string;
|
|
265
|
+
primary?: boolean;
|
|
266
|
+
url?: string;
|
|
267
|
+
/** reply 发回文本的第一行,缺省为「请按以下信息{卡片标题}」。 */
|
|
268
|
+
replyPrefix?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface YcCardSchema {
|
|
271
|
+
title?: string;
|
|
272
|
+
subtitle?: string;
|
|
273
|
+
badge?: {
|
|
274
|
+
text: string;
|
|
275
|
+
tone?: YcCardTone;
|
|
276
|
+
};
|
|
277
|
+
elements: YcCardElement[];
|
|
278
|
+
}
|
|
279
|
+
export interface YcCardActionPayload {
|
|
280
|
+
action: "reply" | "link";
|
|
281
|
+
text?: string;
|
|
282
|
+
url?: string;
|
|
283
|
+
values?: Record<string, unknown>;
|
|
284
|
+
attachments?: DisplayFormAttachment[];
|
|
285
|
+
}
|
|
286
|
+
export interface YcCardRendererProps {
|
|
287
|
+
card: YcCardSchema;
|
|
288
|
+
compact?: boolean;
|
|
289
|
+
uploadFile?: (file: File) => Promise<DisplayFormAttachment>;
|
|
290
|
+
/** 宿主处理 reply:返回 ok 后卡片锁定为已提交;失败时可带 missingFields 让卡片追加字段。不传则只 emit("action")。 */
|
|
291
|
+
submitAction?: (payload: YcCardActionPayload) => Promise<DisplayFormReplyResult>;
|
|
292
|
+
inlineFeedback?: boolean;
|
|
124
293
|
}
|
|
@@ -10,8 +10,8 @@ declare const __VLS_component: DefineComponent<unknown, {}, {}, {}, {}, Componen
|
|
|
10
10
|
onClose?: (() => any) | undefined;
|
|
11
11
|
onAction?: (() => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
closable: boolean;
|
|
14
13
|
tone: YcBannerTone;
|
|
14
|
+
closable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
16
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
17
|
export default _default;
|
|
@@ -10,8 +10,8 @@ declare const __VLS_component: DefineComponent<unknown, {}, {}, {}, {}, Componen
|
|
|
10
10
|
onCopy?: ((value: string, item: YcKeyValueItem) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
12
|
divided: boolean;
|
|
13
|
-
items: YcKeyValueItem[];
|
|
14
13
|
bordered: boolean;
|
|
14
|
+
items: YcKeyValueItem[];
|
|
15
15
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
16
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
17
|
export default _default;
|
|
@@ -19,11 +19,11 @@ declare const __VLS_component: DefineComponent<unknown, {}, {}, {}, {}, Componen
|
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
required: boolean;
|
|
21
21
|
modelValue: string;
|
|
22
|
-
readonly: boolean;
|
|
23
22
|
rows: number;
|
|
23
|
+
maxRows: number;
|
|
24
|
+
readonly: boolean;
|
|
24
25
|
variant: YcInputVariant;
|
|
25
26
|
showCount: boolean;
|
|
26
|
-
maxRows: number;
|
|
27
27
|
autoResize: boolean;
|
|
28
28
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
29
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
@@ -7,29 +7,29 @@ declare const _default: DefineComponent<unknown, {}, {}, {}, {}, ComponentOption
|
|
|
7
7
|
column: PlusColumn;
|
|
8
8
|
op: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
sortChange: (payload: {
|
|
11
|
-
field: string;
|
|
12
|
-
direction?: "asc" | "desc";
|
|
13
|
-
}) => void;
|
|
14
10
|
confirm: (payload: {
|
|
15
11
|
column: PlusColumn;
|
|
16
12
|
op: string;
|
|
17
13
|
value?: string;
|
|
18
14
|
}) => void;
|
|
15
|
+
sortChange: (payload: {
|
|
16
|
+
field: string;
|
|
17
|
+
direction?: "asc" | "desc";
|
|
18
|
+
}) => void;
|
|
19
19
|
}, string, PublicProps, Readonly<unknown> & Readonly<{
|
|
20
20
|
onReset?: ((payload: {
|
|
21
21
|
column: PlusColumn;
|
|
22
22
|
op: string;
|
|
23
23
|
}) => any) | undefined;
|
|
24
|
-
onSortChange?: ((payload: {
|
|
25
|
-
field: string;
|
|
26
|
-
direction?: "asc" | "desc";
|
|
27
|
-
}) => any) | undefined;
|
|
28
24
|
onConfirm?: ((payload: {
|
|
29
25
|
column: PlusColumn;
|
|
30
26
|
op: string;
|
|
31
27
|
value?: string;
|
|
32
28
|
}) => any) | undefined;
|
|
29
|
+
onSortChange?: ((payload: {
|
|
30
|
+
field: string;
|
|
31
|
+
direction?: "asc" | "desc";
|
|
32
|
+
}) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
filters: FilterItem[];
|
|
35
35
|
operators: OperatorOption[];
|