yc-agent-ui 1.2.4 → 1.2.6
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-pagination.vue.d.ts +3 -3
- package/es/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/es/components/data-table/src/data-table.vue.d.ts +3 -3
- package/es/components/dialog/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +6 -6
- package/es/components/dialog-form/src/index.vue.d.ts +6 -6
- package/es/components/display-item/index.d.ts +21 -21
- package/es/components/display-item/src/index.vue.d.ts +19 -19
- package/es/components/drawer-form/index.d.ts +18 -18
- package/es/components/drawer-form/src/index.vue.d.ts +10 -10
- package/es/components/form/index.d.ts +15 -15
- package/es/components/form/src/form-content.vue.d.ts +13 -13
- package/es/components/form/src/index.vue.d.ts +13 -13
- package/es/components/form-item/index.d.ts +12 -12
- package/es/components/form-item/src/index.vue.d.ts +10 -10
- package/es/components/index.d.ts +1 -0
- package/es/components/page/index.d.ts +448 -448
- package/es/components/page/src/index.vue.d.ts +153 -153
- package/es/components/render/index.d.ts +1 -1
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +108 -108
- package/es/components/search/src/index.vue.d.ts +40 -40
- 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 +46 -46
- 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/select.vue.d.ts +2 -2
- package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +3 -3
- package/es/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/es/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/es/components/yc-display-cards/capability.d.ts +4 -0
- package/es/components/yc-display-cards/index.d.ts +24 -0
- package/es/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
- package/es/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
- package/es/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
- package/es/components/yc-display-cards/src/types.d.ts +47 -0
- 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 +469 -469
- package/es/components/yc-property-table/src/bill-table.vue.d.ts +1 -1
- package/es/components/yc-property-table/src/property-table.vue.d.ts +3 -3
- package/es/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +144 -144
- package/es/index.css +9 -6
- package/es/index.mjs +1 -0
- package/es/packages/components/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/src/question-card2.vue.mjs +240 -86
- package/es/packages/components/yc-display-cards/capability.mjs +75 -0
- package/es/packages/components/yc-display-cards/index.mjs +10 -0
- package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/detail-card2.vue.mjs +118 -0
- package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/metrics-card2.vue.mjs +132 -0
- package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/table-card2.vue.mjs +255 -0
- package/es/packages/components/yc-display-cards/src/types.mjs +1 -0
- package/es/packages/registry/load.mjs +9 -8
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +4 -1
- package/index.js +1338 -603
- package/index.min.css +3 -0
- package/index.min.js +20 -20
- package/index.min.mjs +24 -24
- package/index.mjs +1334 -602
- package/lib/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
- package/lib/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/lib/components/data-table/src/data-table.vue.d.ts +3 -3
- package/lib/components/dialog/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +6 -6
- package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
- package/lib/components/display-item/index.d.ts +21 -21
- package/lib/components/display-item/src/index.vue.d.ts +19 -19
- package/lib/components/drawer-form/index.d.ts +18 -18
- package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
- package/lib/components/form/index.d.ts +15 -15
- package/lib/components/form/src/form-content.vue.d.ts +13 -13
- package/lib/components/form/src/index.vue.d.ts +13 -13
- package/lib/components/form-item/index.d.ts +12 -12
- package/lib/components/form-item/src/index.vue.d.ts +10 -10
- package/lib/components/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +448 -448
- package/lib/components/page/src/index.vue.d.ts +153 -153
- package/lib/components/render/index.d.ts +1 -1
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +108 -108
- package/lib/components/search/src/index.vue.d.ts +40 -40
- 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 +46 -46
- 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/select.vue.d.ts +2 -2
- package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +3 -3
- package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/lib/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/lib/components/yc-display-cards/capability.d.ts +4 -0
- package/lib/components/yc-display-cards/index.d.ts +24 -0
- package/lib/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
- package/lib/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
- package/lib/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
- package/lib/components/yc-display-cards/src/types.d.ts +47 -0
- 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 +469 -469
- package/lib/components/yc-property-table/src/bill-table.vue.d.ts +1 -1
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +3 -3
- package/lib/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +144 -144
- package/lib/index.css +12 -9
- package/lib/index.js +10 -6
- package/lib/packages/components/index.js +10 -6
- package/lib/packages/components/yc-ai-chat/src/question-card2.vue.js +239 -85
- package/lib/packages/components/yc-display-cards/capability.js +79 -0
- package/lib/packages/components/yc-display-cards/index.js +14 -0
- package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/detail-card2.vue.js +122 -0
- package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/metrics-card2.vue.js +136 -0
- package/lib/packages/components/yc-display-cards/src/table-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/table-card2.vue.js +259 -0
- package/lib/packages/components/yc-display-cards/src/types.js +2 -0
- package/lib/packages/registry/load.js +9 -8
- 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 -1
- package/theme-chalk/index.css +4 -1
- package/theme-chalk/plus-yc-ai-chat.css +1 -1
- package/theme-chalk/src/yc-ai-chat.scss +90 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "yc-display-card yc-display-detail-card" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "yc-display-card__header"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = { class: "yc-display-card__title-wrap" };
|
|
13
|
+
const _hoisted_4 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "yc-display-card__title"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "yc-display-card__subtitle"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_6 = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "yc-display-detail-card__fields"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_7 = {
|
|
26
|
+
key: 2,
|
|
27
|
+
class: "yc-display-card__empty"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_8 = {
|
|
30
|
+
key: 3,
|
|
31
|
+
class: "yc-display-detail-card__note"
|
|
32
|
+
};
|
|
33
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
34
|
+
...{ name: "YcDisplayDetailCard" },
|
|
35
|
+
__name: "detail-card",
|
|
36
|
+
props: {
|
|
37
|
+
title: { default: "" },
|
|
38
|
+
subtitle: { default: "" },
|
|
39
|
+
status: { default: void 0 },
|
|
40
|
+
fields: { default: () => [] },
|
|
41
|
+
note: { default: "" }
|
|
42
|
+
},
|
|
43
|
+
setup(__props) {
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
47
|
+
__props.title || __props.subtitle || ((_a = __props.status) == null ? void 0 : _a.text) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
48
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
49
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock(
|
|
50
|
+
"div",
|
|
51
|
+
_hoisted_4,
|
|
52
|
+
vue.toDisplayString(__props.title),
|
|
53
|
+
1
|
|
54
|
+
/* TEXT */
|
|
55
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
56
|
+
__props.subtitle ? (vue.openBlock(), vue.createElementBlock(
|
|
57
|
+
"div",
|
|
58
|
+
_hoisted_5,
|
|
59
|
+
vue.toDisplayString(__props.subtitle),
|
|
60
|
+
1
|
|
61
|
+
/* TEXT */
|
|
62
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
63
|
+
]),
|
|
64
|
+
((_b = __props.status) == null ? void 0 : _b.text) ? (vue.openBlock(), vue.createElementBlock(
|
|
65
|
+
"span",
|
|
66
|
+
{
|
|
67
|
+
key: 0,
|
|
68
|
+
class: vue.normalizeClass(["yc-display-detail-card__status", `is-${(_c = __props.status.type) != null ? _c : "info"}`])
|
|
69
|
+
},
|
|
70
|
+
vue.toDisplayString(__props.status.text),
|
|
71
|
+
3
|
|
72
|
+
/* TEXT, CLASS */
|
|
73
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
74
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
75
|
+
__props.fields.length ? (vue.openBlock(), vue.createElementBlock("dl", _hoisted_6, [
|
|
76
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
77
|
+
vue.Fragment,
|
|
78
|
+
null,
|
|
79
|
+
vue.renderList(__props.fields, (field, idx) => {
|
|
80
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
key: `${field.label}-${idx}`,
|
|
84
|
+
class: vue.normalizeClass(["yc-display-detail-card__field", { "is-full": field.span === 2 }])
|
|
85
|
+
},
|
|
86
|
+
[
|
|
87
|
+
vue.createElementVNode(
|
|
88
|
+
"dt",
|
|
89
|
+
null,
|
|
90
|
+
vue.toDisplayString(field.label),
|
|
91
|
+
1
|
|
92
|
+
/* TEXT */
|
|
93
|
+
),
|
|
94
|
+
vue.createElementVNode(
|
|
95
|
+
"dd",
|
|
96
|
+
null,
|
|
97
|
+
vue.toDisplayString(field.value === void 0 || field.value === null || field.value === "" ? "\u2014" : field.value),
|
|
98
|
+
1
|
|
99
|
+
/* TEXT */
|
|
100
|
+
)
|
|
101
|
+
],
|
|
102
|
+
2
|
|
103
|
+
/* CLASS */
|
|
104
|
+
);
|
|
105
|
+
}),
|
|
106
|
+
128
|
|
107
|
+
/* KEYED_FRAGMENT */
|
|
108
|
+
))
|
|
109
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, "\u6682\u65E0\u53EF\u5C55\u793A\u7684\u8BE6\u60C5\u5B57\u6BB5")),
|
|
110
|
+
__props.note ? (vue.openBlock(), vue.createElementBlock(
|
|
111
|
+
"div",
|
|
112
|
+
_hoisted_8,
|
|
113
|
+
vue.toDisplayString(__props.note),
|
|
114
|
+
1
|
|
115
|
+
/* TEXT */
|
|
116
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
117
|
+
]);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var metricsCard_vue_vue_type_script_setup_true_lang = require('./metrics-card2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var MetricsCard = /* @__PURE__ */ _pluginVue_exportHelper.default(metricsCard_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-3598faf5"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = MetricsCard;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "yc-display-card yc-display-metrics-card" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "yc-display-card__header"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = { class: "yc-display-card__title-wrap" };
|
|
13
|
+
const _hoisted_4 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "yc-display-card__title"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "yc-display-card__subtitle"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_6 = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "yc-display-metrics-card__grid"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_7 = { class: "yc-display-metrics-card__label" };
|
|
26
|
+
const _hoisted_8 = { class: "yc-display-metrics-card__value-row" };
|
|
27
|
+
const _hoisted_9 = { class: "yc-display-metrics-card__value" };
|
|
28
|
+
const _hoisted_10 = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "yc-display-metrics-card__unit"
|
|
31
|
+
};
|
|
32
|
+
const _hoisted_11 = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "yc-display-metrics-card__meta"
|
|
35
|
+
};
|
|
36
|
+
const _hoisted_12 = {
|
|
37
|
+
key: 1,
|
|
38
|
+
class: "yc-display-metrics-card__desc"
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_13 = {
|
|
41
|
+
key: 2,
|
|
42
|
+
class: "yc-display-card__empty"
|
|
43
|
+
};
|
|
44
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
45
|
+
...{ name: "YcDisplayMetricsCard" },
|
|
46
|
+
__name: "metrics-card",
|
|
47
|
+
props: {
|
|
48
|
+
title: { default: "" },
|
|
49
|
+
subtitle: { default: "" },
|
|
50
|
+
items: { default: () => [] }
|
|
51
|
+
},
|
|
52
|
+
setup(__props) {
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
55
|
+
__props.title || __props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
56
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
57
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock(
|
|
58
|
+
"div",
|
|
59
|
+
_hoisted_4,
|
|
60
|
+
vue.toDisplayString(__props.title),
|
|
61
|
+
1
|
|
62
|
+
/* TEXT */
|
|
63
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
64
|
+
__props.subtitle ? (vue.openBlock(), vue.createElementBlock(
|
|
65
|
+
"div",
|
|
66
|
+
_hoisted_5,
|
|
67
|
+
vue.toDisplayString(__props.subtitle),
|
|
68
|
+
1
|
|
69
|
+
/* TEXT */
|
|
70
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
71
|
+
])
|
|
72
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
73
|
+
__props.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
74
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
75
|
+
vue.Fragment,
|
|
76
|
+
null,
|
|
77
|
+
vue.renderList(__props.items, (item, idx) => {
|
|
78
|
+
var _a;
|
|
79
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
80
|
+
key: `${item.label}-${idx}`,
|
|
81
|
+
class: "yc-display-metrics-card__item"
|
|
82
|
+
}, [
|
|
83
|
+
vue.createElementVNode(
|
|
84
|
+
"div",
|
|
85
|
+
_hoisted_7,
|
|
86
|
+
vue.toDisplayString(item.label),
|
|
87
|
+
1
|
|
88
|
+
/* TEXT */
|
|
89
|
+
),
|
|
90
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
91
|
+
vue.createElementVNode(
|
|
92
|
+
"span",
|
|
93
|
+
_hoisted_9,
|
|
94
|
+
vue.toDisplayString(item.value),
|
|
95
|
+
1
|
|
96
|
+
/* TEXT */
|
|
97
|
+
),
|
|
98
|
+
item.unit ? (vue.openBlock(), vue.createElementBlock(
|
|
99
|
+
"span",
|
|
100
|
+
_hoisted_10,
|
|
101
|
+
vue.toDisplayString(item.unit),
|
|
102
|
+
1
|
|
103
|
+
/* TEXT */
|
|
104
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
105
|
+
]),
|
|
106
|
+
item.trend || item.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
107
|
+
item.trend ? (vue.openBlock(), vue.createElementBlock(
|
|
108
|
+
"span",
|
|
109
|
+
{
|
|
110
|
+
key: 0,
|
|
111
|
+
class: vue.normalizeClass(["yc-display-metrics-card__trend", `is-${(_a = item.trendType) != null ? _a : "neutral"}`])
|
|
112
|
+
},
|
|
113
|
+
vue.toDisplayString(item.trend),
|
|
114
|
+
3
|
|
115
|
+
/* TEXT, CLASS */
|
|
116
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
117
|
+
item.description ? (vue.openBlock(), vue.createElementBlock(
|
|
118
|
+
"span",
|
|
119
|
+
_hoisted_12,
|
|
120
|
+
vue.toDisplayString(item.description),
|
|
121
|
+
1
|
|
122
|
+
/* TEXT */
|
|
123
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
124
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
125
|
+
]);
|
|
126
|
+
}),
|
|
127
|
+
128
|
|
128
|
+
/* KEYED_FRAGMENT */
|
|
129
|
+
))
|
|
130
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, "\u6682\u65E0\u53EF\u5C55\u793A\u7684\u6307\u6807\u6570\u636E"))
|
|
131
|
+
]);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tableCard_vue_vue_type_script_setup_true_lang = require('./table-card2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var TableCard = /* @__PURE__ */ _pluginVue_exportHelper.default(tableCard_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-a5c5ffcc"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = TableCard;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "yc-display-card yc-display-table-card" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "yc-display-card__header"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = { class: "yc-display-card__title-wrap" };
|
|
13
|
+
const _hoisted_4 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "yc-display-card__title"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "yc-display-card__subtitle"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_6 = { class: "yc-display-card__badge" };
|
|
22
|
+
const _hoisted_7 = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "yc-display-table-card__summary"
|
|
25
|
+
};
|
|
26
|
+
const _hoisted_8 = { class: "yc-display-table-card__summary-label" };
|
|
27
|
+
const _hoisted_9 = { class: "yc-display-table-card__summary-value" };
|
|
28
|
+
const _hoisted_10 = {
|
|
29
|
+
key: 2,
|
|
30
|
+
class: "yc-display-table-card__search"
|
|
31
|
+
};
|
|
32
|
+
const _hoisted_11 = { class: "yc-display-table-card__scroll" };
|
|
33
|
+
const _hoisted_12 = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "yc-display-table-card__table"
|
|
36
|
+
};
|
|
37
|
+
const _hoisted_13 = {
|
|
38
|
+
key: 1,
|
|
39
|
+
class: "yc-display-card__empty"
|
|
40
|
+
};
|
|
41
|
+
const _hoisted_14 = {
|
|
42
|
+
key: 3,
|
|
43
|
+
class: "yc-display-card__footer"
|
|
44
|
+
};
|
|
45
|
+
const _hoisted_15 = ["disabled"];
|
|
46
|
+
const _hoisted_16 = { class: "yc-display-table-card__page" };
|
|
47
|
+
const _hoisted_17 = ["disabled"];
|
|
48
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
49
|
+
...{ name: "YcDisplayTableCard" },
|
|
50
|
+
__name: "table-card",
|
|
51
|
+
props: {
|
|
52
|
+
title: { default: "" },
|
|
53
|
+
subtitle: { default: "" },
|
|
54
|
+
columns: { default: () => [] },
|
|
55
|
+
rows: { default: () => [] },
|
|
56
|
+
summary: { default: () => [] },
|
|
57
|
+
maxRows: { default: 10 }
|
|
58
|
+
},
|
|
59
|
+
setup(__props) {
|
|
60
|
+
const props = __props;
|
|
61
|
+
const query = vue.ref("");
|
|
62
|
+
const page = vue.ref(1);
|
|
63
|
+
const normalizedColumns = vue.computed(() => {
|
|
64
|
+
if (props.columns.length > 0) return props.columns;
|
|
65
|
+
const first = props.rows[0];
|
|
66
|
+
if (!first || typeof first !== "object") return [];
|
|
67
|
+
return Object.keys(first).map((key) => ({ key, label: key }));
|
|
68
|
+
});
|
|
69
|
+
const filteredRows = vue.computed(() => {
|
|
70
|
+
const keyword = query.value.trim().toLowerCase();
|
|
71
|
+
if (!keyword) return props.rows;
|
|
72
|
+
return props.rows.filter(
|
|
73
|
+
(row) => normalizedColumns.value.some(
|
|
74
|
+
(col) => formatCell(row, col).toLowerCase().includes(keyword)
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
const pageCount = vue.computed(
|
|
79
|
+
() => Math.max(1, Math.ceil(filteredRows.value.length / props.maxRows))
|
|
80
|
+
);
|
|
81
|
+
const showControls = vue.computed(() => props.rows.length > props.maxRows);
|
|
82
|
+
const visibleRows = vue.computed(() => {
|
|
83
|
+
if (!showControls.value) return filteredRows.value;
|
|
84
|
+
const start = (page.value - 1) * props.maxRows;
|
|
85
|
+
return filteredRows.value.slice(start, start + props.maxRows);
|
|
86
|
+
});
|
|
87
|
+
vue.watch(query, () => {
|
|
88
|
+
page.value = 1;
|
|
89
|
+
});
|
|
90
|
+
vue.watch(pageCount, (count) => {
|
|
91
|
+
if (page.value > count) page.value = count;
|
|
92
|
+
});
|
|
93
|
+
function stepPage(delta) {
|
|
94
|
+
page.value = Math.min(pageCount.value, Math.max(1, page.value + delta));
|
|
95
|
+
}
|
|
96
|
+
function formatCell(row, col) {
|
|
97
|
+
const raw = row == null ? void 0 : row[col.key];
|
|
98
|
+
if (raw === void 0 || raw === null || raw === "") return "\u2014";
|
|
99
|
+
const text = typeof raw === "object" ? JSON.stringify(raw) : String(raw);
|
|
100
|
+
return col.unit ? `${text} ${col.unit}` : text;
|
|
101
|
+
}
|
|
102
|
+
return (_ctx, _cache) => {
|
|
103
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
104
|
+
__props.title || __props.subtitle || __props.rows.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
105
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
106
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock(
|
|
107
|
+
"div",
|
|
108
|
+
_hoisted_4,
|
|
109
|
+
vue.toDisplayString(__props.title),
|
|
110
|
+
1
|
|
111
|
+
/* TEXT */
|
|
112
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
113
|
+
__props.subtitle ? (vue.openBlock(), vue.createElementBlock(
|
|
114
|
+
"div",
|
|
115
|
+
_hoisted_5,
|
|
116
|
+
vue.toDisplayString(__props.subtitle),
|
|
117
|
+
1
|
|
118
|
+
/* TEXT */
|
|
119
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
120
|
+
]),
|
|
121
|
+
vue.createElementVNode(
|
|
122
|
+
"span",
|
|
123
|
+
_hoisted_6,
|
|
124
|
+
"\u5171 " + vue.toDisplayString(__props.rows.length) + " \u6761",
|
|
125
|
+
1
|
|
126
|
+
/* TEXT */
|
|
127
|
+
)
|
|
128
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
129
|
+
__props.summary.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
130
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
131
|
+
vue.Fragment,
|
|
132
|
+
null,
|
|
133
|
+
vue.renderList(__props.summary, (item) => {
|
|
134
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
135
|
+
key: item.label,
|
|
136
|
+
class: "yc-display-table-card__summary-item"
|
|
137
|
+
}, [
|
|
138
|
+
vue.createElementVNode(
|
|
139
|
+
"span",
|
|
140
|
+
_hoisted_8,
|
|
141
|
+
vue.toDisplayString(item.label),
|
|
142
|
+
1
|
|
143
|
+
/* TEXT */
|
|
144
|
+
),
|
|
145
|
+
vue.createElementVNode(
|
|
146
|
+
"strong",
|
|
147
|
+
_hoisted_9,
|
|
148
|
+
vue.toDisplayString(item.value),
|
|
149
|
+
1
|
|
150
|
+
/* TEXT */
|
|
151
|
+
)
|
|
152
|
+
]);
|
|
153
|
+
}),
|
|
154
|
+
128
|
|
155
|
+
/* KEYED_FRAGMENT */
|
|
156
|
+
))
|
|
157
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
158
|
+
showControls.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
159
|
+
vue.withDirectives(vue.createElementVNode(
|
|
160
|
+
"input",
|
|
161
|
+
{
|
|
162
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
|
|
163
|
+
type: "search",
|
|
164
|
+
class: "yc-display-table-card__search-input",
|
|
165
|
+
placeholder: "\u641C\u7D22\u8868\u683C",
|
|
166
|
+
"aria-label": "\u641C\u7D22\u8868\u683C"
|
|
167
|
+
},
|
|
168
|
+
null,
|
|
169
|
+
512
|
|
170
|
+
/* NEED_PATCH */
|
|
171
|
+
), [
|
|
172
|
+
[vue.vModelText, query.value]
|
|
173
|
+
])
|
|
174
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
175
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
176
|
+
normalizedColumns.value.length && __props.rows.length ? (vue.openBlock(), vue.createElementBlock("table", _hoisted_12, [
|
|
177
|
+
vue.createElementVNode("thead", null, [
|
|
178
|
+
vue.createElementVNode("tr", null, [
|
|
179
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
180
|
+
vue.Fragment,
|
|
181
|
+
null,
|
|
182
|
+
vue.renderList(normalizedColumns.value, (col) => {
|
|
183
|
+
var _a;
|
|
184
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
185
|
+
"th",
|
|
186
|
+
{
|
|
187
|
+
key: col.key,
|
|
188
|
+
style: vue.normalizeStyle({ textAlign: (_a = col.align) != null ? _a : "left" })
|
|
189
|
+
},
|
|
190
|
+
vue.toDisplayString(col.label),
|
|
191
|
+
5
|
|
192
|
+
/* TEXT, STYLE */
|
|
193
|
+
);
|
|
194
|
+
}),
|
|
195
|
+
128
|
|
196
|
+
/* KEYED_FRAGMENT */
|
|
197
|
+
))
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
vue.createElementVNode("tbody", null, [
|
|
201
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
202
|
+
vue.Fragment,
|
|
203
|
+
null,
|
|
204
|
+
vue.renderList(visibleRows.value, (row, idx) => {
|
|
205
|
+
return vue.openBlock(), vue.createElementBlock("tr", { key: idx }, [
|
|
206
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
207
|
+
vue.Fragment,
|
|
208
|
+
null,
|
|
209
|
+
vue.renderList(normalizedColumns.value, (col) => {
|
|
210
|
+
var _a;
|
|
211
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
212
|
+
"td",
|
|
213
|
+
{
|
|
214
|
+
key: col.key,
|
|
215
|
+
style: vue.normalizeStyle({ textAlign: (_a = col.align) != null ? _a : "left" })
|
|
216
|
+
},
|
|
217
|
+
vue.toDisplayString(formatCell(row, col)),
|
|
218
|
+
5
|
|
219
|
+
/* TEXT, STYLE */
|
|
220
|
+
);
|
|
221
|
+
}),
|
|
222
|
+
128
|
|
223
|
+
/* KEYED_FRAGMENT */
|
|
224
|
+
))
|
|
225
|
+
]);
|
|
226
|
+
}),
|
|
227
|
+
128
|
|
228
|
+
/* KEYED_FRAGMENT */
|
|
229
|
+
))
|
|
230
|
+
])
|
|
231
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, "\u6682\u65E0\u53EF\u5C55\u793A\u7684\u8868\u683C\u6570\u636E"))
|
|
232
|
+
]),
|
|
233
|
+
showControls.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
234
|
+
vue.createElementVNode("button", {
|
|
235
|
+
type: "button",
|
|
236
|
+
class: "yc-display-card__toggle",
|
|
237
|
+
disabled: page.value <= 1,
|
|
238
|
+
onClick: _cache[1] || (_cache[1] = ($event) => stepPage(-1))
|
|
239
|
+
}, " \u4E0A\u4E00\u9875 ", 8, _hoisted_15),
|
|
240
|
+
vue.createElementVNode(
|
|
241
|
+
"span",
|
|
242
|
+
_hoisted_16,
|
|
243
|
+
vue.toDisplayString(page.value) + " / " + vue.toDisplayString(pageCount.value) + " \xB7 " + vue.toDisplayString(filteredRows.value.length) + " \u6761 ",
|
|
244
|
+
1
|
|
245
|
+
/* TEXT */
|
|
246
|
+
),
|
|
247
|
+
vue.createElementVNode("button", {
|
|
248
|
+
type: "button",
|
|
249
|
+
class: "yc-display-card__toggle",
|
|
250
|
+
disabled: page.value >= pageCount.value,
|
|
251
|
+
onClick: _cache[2] || (_cache[2] = ($event) => stepPage(1))
|
|
252
|
+
}, " \u4E0B\u4E00\u9875 ", 8, _hoisted_17)
|
|
253
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
254
|
+
]);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
exports.default = _sfc_main;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var capability$
|
|
4
|
-
var capability$
|
|
5
|
-
var capability$
|
|
6
|
-
var capability$
|
|
7
|
-
var capability$
|
|
8
|
-
var capability$
|
|
9
|
-
var capability$
|
|
3
|
+
var capability$i = require('../components/chart/capability.js');
|
|
4
|
+
var capability$h = require('../components/data-table/capability.js');
|
|
5
|
+
var capability$g = require('../components/table/capability.js');
|
|
6
|
+
var capability$f = require('../components/yc-card/capability.js');
|
|
7
|
+
var capability$e = require('../components/yc-controls/capability.js');
|
|
8
|
+
var capability$d = require('../components/yc-coss-table/capability.js');
|
|
9
|
+
var capability$c = require('../components/yc-date-picker/capability.js');
|
|
10
|
+
var capability$b = require('../components/yc-display-cards/capability.js');
|
|
10
11
|
var capability$a = require('../components/yc-feedback/capability.js');
|
|
11
12
|
var capability$9 = require('../components/yc-gradient-card/capability.js');
|
|
12
13
|
var capability$8 = require('../components/yc-input-otp/capability.js');
|
|
@@ -20,7 +21,7 @@ var capability$1 = require('../components/yc-select-v2/capability.js');
|
|
|
20
21
|
var capability = require('../components/yc-text/capability.js');
|
|
21
22
|
var runtime = require('./capabilities/runtime.js');
|
|
22
23
|
|
|
23
|
-
const modules = { "../components/chart/capability.ts": capability$
|
|
24
|
+
const modules = { "../components/chart/capability.ts": capability$i.default, "../components/data-table/capability.ts": capability$h.default, "../components/table/capability.ts": capability$g.default, "../components/yc-card/capability.ts": capability$f.default, "../components/yc-controls/capability.ts": capability$e.default, "../components/yc-coss-table/capability.ts": capability$d.default, "../components/yc-date-picker/capability.ts": capability$c.default, "../components/yc-display-cards/capability.ts": capability$b.default, "../components/yc-feedback/capability.ts": capability$a.default, "../components/yc-gradient-card/capability.ts": capability$9.default, "../components/yc-input-otp/capability.ts": capability$8.default, "../components/yc-input/capability.ts": capability$7.default, "../components/yc-lens/capability.ts": capability$6.default, "../components/yc-pagination/capability.ts": capability$5.default, "../components/yc-plus-tree/capability.ts": capability$4.default, "../components/yc-property-table/capability.ts": capability$3.default, "../components/yc-questionnaire/capability.ts": capability$2.default, "../components/yc-select-v2/capability.ts": capability$1.default, "../components/yc-text/capability.ts": capability.default, "./capabilities/runtime.ts": runtime.default };
|
|
24
25
|
function isCapability(value) {
|
|
25
26
|
return !!value && typeof value === "object" && ("install" in value || "gallery" in value);
|
|
26
27
|
}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.6";
|
package/lib/version.js
CHANGED
package/locale/en.js
CHANGED
package/locale/en.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! yc-agent-ui v1.2.
|
|
1
|
+
/*! yc-agent-ui v1.2.6 */(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.AgentUILocaleEn=t())})(this,function(){"use strict";var e={name:"en",plus:{dialog:{confirmText:"Yes",cancelText:"No",title:"Dialog"},datepicker:{startPlaceholder:"Please select start time",endPlaceholder:"Please select end time"},dialogForm:{title:"Dialog form"},drawerForm:{title:"Drawer form",confirmText:"Yes",cancelText:"No"},form:{submitText:"Submit",resetText:"Reset",errorTip:"Please complete the form and submit again!"},field:{pleaseEnter:"Please enter ",pleaseSelect:"Please select "},popover:{confirmText:"Yes",cancelText:"No"},search:{searchText:"Search",resetText:"Reset",expand:"Expand",retract:"Retract"},queryFilter:{saveAs:"Save as",saved:"Saved filters",savedTitle:"Saved filters",panelTitle:"Filters",received:"Received filters",shared:"Shared filters",nameTitle:"Filter name",namePlaceholder:"Name this filter",emptyMine:"No saved filters",emptyReceived:"No received filters",emptyShared:"No shared filters",shareTitle:"Share filter",sharePlaceholder:"Search employees in this tenant",recipients:"Recipients",revoke:"Revoke",edit:"Edit",remove:"Delete",share:"Share",confirmDelete:"Delete this filter?",confirmRevoke:"Revoke this share?",saveSuccess:"Saved",deleteSuccess:"Deleted",shareSuccess:"Shared",revokeSuccess:"Revoked",applied:"Filled into the search form. Click Search to query.",schemaMismatch:"This filter schema is outdated. Review it before searching.",noSelector:"Employee selector is not configured",sharedBy:"{time} [{sender}] shared [{name}]",sharedTo:"{time} I shared [{name}] with [{recipient}] and others",sharedByPrefix:"{time} [{sender}] shared",sharedToPrefix:"{time} I shared with [{recipient}] and others"},table:{title:"Table",density:"Density",refresh:"Refresh",columnSettings:"Column settings",selectAll:"Select all",default:"Default",loose:"Loose",compact:"Compact",action:"Action",more:"More",confirmToPerformThisOperation:"Confirm to perform this operation?",prompt:"Prompt",sort:"Sort",resetText:"Reset"},stepsForm:{nextText:"Next step",preText:"Previous step",submitText:"Submit"},inputTag:{placeholder:"Please enter keywords and press enter or space key"},header:{logout:"logout"}}};return e});
|
package/locale/en.min.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! yc-agent-ui v1.2.
|
|
1
|
+
/*! yc-agent-ui v1.2.6 */var e={name:"en",plus:{dialog:{confirmText:"Yes",cancelText:"No",title:"Dialog"},datepicker:{startPlaceholder:"Please select start time",endPlaceholder:"Please select end time"},dialogForm:{title:"Dialog form"},drawerForm:{title:"Drawer form",confirmText:"Yes",cancelText:"No"},form:{submitText:"Submit",resetText:"Reset",errorTip:"Please complete the form and submit again!"},field:{pleaseEnter:"Please enter ",pleaseSelect:"Please select "},popover:{confirmText:"Yes",cancelText:"No"},search:{searchText:"Search",resetText:"Reset",expand:"Expand",retract:"Retract"},queryFilter:{saveAs:"Save as",saved:"Saved filters",savedTitle:"Saved filters",panelTitle:"Filters",received:"Received filters",shared:"Shared filters",nameTitle:"Filter name",namePlaceholder:"Name this filter",emptyMine:"No saved filters",emptyReceived:"No received filters",emptyShared:"No shared filters",shareTitle:"Share filter",sharePlaceholder:"Search employees in this tenant",recipients:"Recipients",revoke:"Revoke",edit:"Edit",remove:"Delete",share:"Share",confirmDelete:"Delete this filter?",confirmRevoke:"Revoke this share?",saveSuccess:"Saved",deleteSuccess:"Deleted",shareSuccess:"Shared",revokeSuccess:"Revoked",applied:"Filled into the search form. Click Search to query.",schemaMismatch:"This filter schema is outdated. Review it before searching.",noSelector:"Employee selector is not configured",sharedBy:"{time} [{sender}] shared [{name}]",sharedTo:"{time} I shared [{name}] with [{recipient}] and others",sharedByPrefix:"{time} [{sender}] shared",sharedToPrefix:"{time} I shared with [{recipient}] and others"},table:{title:"Table",density:"Density",refresh:"Refresh",columnSettings:"Column settings",selectAll:"Select all",default:"Default",loose:"Loose",compact:"Compact",action:"Action",more:"More",confirmToPerformThisOperation:"Confirm to perform this operation?",prompt:"Prompt",sort:"Sort",resetText:"Reset"},stepsForm:{nextText:"Next step",preText:"Previous step",submitText:"Submit"},inputTag:{placeholder:"Please enter keywords and press enter or space key"},header:{logout:"logout"}}};export{e as default};
|
package/locale/en.mjs
CHANGED
package/locale/ja.js
CHANGED