yc-agent-ui 1.2.8 → 1.2.10
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/drawer-form/index.d.ts +6 -6
- package/es/components/drawer-form/src/index.vue.d.ts +2 -2
- package/es/components/form/index.d.ts +28 -28
- package/es/components/form/src/form-content.vue.d.ts +7 -7
- package/es/components/form/src/index.vue.d.ts +10 -10
- package/es/components/form-item/index.d.ts +31 -31
- package/es/components/form-item/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +725 -725
- package/es/components/page/src/index.vue.d.ts +242 -242
- package/es/components/search/index.d.ts +190 -190
- package/es/components/search/src/index.vue.d.ts +64 -64
- package/es/components/table/index.d.ts +18 -18
- package/es/components/table/src/index.vue.d.ts +2 -2
- package/es/components/virtual-table/index.d.ts +10 -10
- package/es/components/virtual-table/src/index.vue.d.ts +3 -3
- 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-ai-chat/src/sidebar.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-date-picker/src/date-picker.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/input.vue.d.ts +1 -1
- package/es/components/yc-input/src/money-input.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 +741 -741
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-property-table/src/property-table.vue.d.ts +2 -2
- package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +18 -18
- package/es/index.css +29 -23
- 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 +142 -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 +2223 -2378
- package/index.min.css +19 -13
- package/index.min.js +37 -43
- package/index.min.mjs +36 -42
- package/index.mjs +2203 -2377
- package/lib/components/data-table/src/data-table.vue.d.ts +2 -2
- 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/form/index.d.ts +28 -28
- package/lib/components/form/src/form-content.vue.d.ts +7 -7
- package/lib/components/form/src/index.vue.d.ts +10 -10
- package/lib/components/form-item/index.d.ts +31 -31
- package/lib/components/form-item/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +725 -725
- package/lib/components/page/src/index.vue.d.ts +242 -242
- package/lib/components/search/index.d.ts +190 -190
- package/lib/components/search/src/index.vue.d.ts +64 -64
- package/lib/components/table/index.d.ts +18 -18
- package/lib/components/table/src/index.vue.d.ts +2 -2
- package/lib/components/virtual-table/index.d.ts +10 -10
- package/lib/components/virtual-table/src/index.vue.d.ts +3 -3
- 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-ai-chat/src/sidebar.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-date-picker/src/date-picker.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/input.vue.d.ts +1 -1
- package/lib/components/yc-input/src/money-input.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 +741 -741
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +2 -2
- package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +18 -18
- package/lib/index.css +30 -24
- 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 +146 -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,134 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function isPlainObject(value) {
|
|
4
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5
|
+
}
|
|
6
|
+
function isBlankValue(value) {
|
|
7
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
8
|
+
return value === void 0 || value === null || String(value).trim() === "";
|
|
9
|
+
}
|
|
10
|
+
function toOptionValue(raw) {
|
|
11
|
+
return typeof raw === "string" || typeof raw === "number" || typeof raw === "boolean" ? raw : String(raw);
|
|
12
|
+
}
|
|
13
|
+
function normalizeOptions(field) {
|
|
14
|
+
var _a;
|
|
15
|
+
const options = [];
|
|
16
|
+
if (Array.isArray(field.options)) {
|
|
17
|
+
for (const item of field.options) {
|
|
18
|
+
if (typeof item === "string" || typeof item === "number") {
|
|
19
|
+
options.push({ label: String(item), value: item });
|
|
20
|
+
} else if (isPlainObject(item) && item.value !== void 0 && item.value !== null) {
|
|
21
|
+
options.push({ label: String((_a = item.label) != null ? _a : item.value), value: toOptionValue(item.value) });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (!options.length && Array.isArray(field.enum)) {
|
|
26
|
+
for (const item of field.enum) {
|
|
27
|
+
options.push({ label: String(item), value: toOptionValue(item) });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
function extractOptions(data, labelKey, valueKey) {
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
34
|
+
const rows = Array.isArray(data) ? data : isPlainObject(data) ? (_a = extractRows(data)) != null ? _a : [] : [];
|
|
35
|
+
const options = [];
|
|
36
|
+
for (const row of rows) {
|
|
37
|
+
if (typeof row === "string" || typeof row === "number") {
|
|
38
|
+
options.push({ label: String(row), value: row });
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (!isPlainObject(row)) continue;
|
|
42
|
+
const rawValue = (_f = (_e = (_d = (_c = (_b = valueKey ? row[valueKey] : void 0) != null ? _b : row.id) != null ? _c : row.value) != null ? _d : row.code) != null ? _e : row.key) != null ? _f : row.name;
|
|
43
|
+
if (rawValue === void 0 || rawValue === null) continue;
|
|
44
|
+
const rawLabel = (_j = (_i = (_h = (_g = labelKey ? row[labelKey] : void 0) != null ? _g : row.name) != null ? _h : row.label) != null ? _i : row.title) != null ? _j : rawValue;
|
|
45
|
+
options.push({ label: String(rawLabel), value: toOptionValue(rawValue) });
|
|
46
|
+
}
|
|
47
|
+
return options;
|
|
48
|
+
}
|
|
49
|
+
function extractRows(obj) {
|
|
50
|
+
for (const key of ["data", "rows", "items", "list", "records"]) {
|
|
51
|
+
if (Array.isArray(obj[key])) return obj[key];
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
function resolveFieldKind(field) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const widget = field.widget;
|
|
58
|
+
if (widget === "radio" || widget === "checkbox") return widget;
|
|
59
|
+
if (widget === "image" || widget === "file") return widget;
|
|
60
|
+
if (widget === "date" || widget === "datetime") return widget;
|
|
61
|
+
if (widget === "phone" || widget === "tel") return "phone";
|
|
62
|
+
if (widget === "email") return "email";
|
|
63
|
+
if (widget === "textarea") return "textarea";
|
|
64
|
+
if (widget === "switch" || field.type === "boolean") return "switch";
|
|
65
|
+
if (widget === "select" || field.options_operation || ((_a = field.options) == null ? void 0 : _a.length) || ((_b = field.enum) == null ? void 0 : _b.length)) {
|
|
66
|
+
return "select";
|
|
67
|
+
}
|
|
68
|
+
if (widget === "number" || field.type === "number" || field.type === "integer") return "number";
|
|
69
|
+
return "text";
|
|
70
|
+
}
|
|
71
|
+
function isUploadField(field) {
|
|
72
|
+
const kind = resolveFieldKind(field);
|
|
73
|
+
return kind === "image" || kind === "file";
|
|
74
|
+
}
|
|
75
|
+
function validateFieldValue(field, value) {
|
|
76
|
+
const label = field.label || field.name;
|
|
77
|
+
if (isBlankValue(value)) {
|
|
78
|
+
if (!field.required) return "";
|
|
79
|
+
return isUploadField(field) ? `\u8BF7\u5148\u4E0A\u4F20\u300C${label}\u300D` : `\u8BF7\u5148\u586B\u5199\u300C${label}\u300D`;
|
|
80
|
+
}
|
|
81
|
+
const kind = resolveFieldKind(field);
|
|
82
|
+
const text = String(value).trim();
|
|
83
|
+
if (kind === "phone") {
|
|
84
|
+
const normalized = text.replace(/[\s-]/g, "");
|
|
85
|
+
if (!/^1[3-9]\d{9}$/.test(normalized) && !/^0\d{2,3}\d{7,8}$/.test(normalized)) {
|
|
86
|
+
return `\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u300C${label}\u300D\uFF0811\u4F4D\u624B\u673A\u53F7\u6216\u56FA\u8BDD\uFF09`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (kind === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(text)) {
|
|
90
|
+
return `\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u300C${label}\u300D\u90AE\u7BB1\u683C\u5F0F`;
|
|
91
|
+
}
|
|
92
|
+
return "";
|
|
93
|
+
}
|
|
94
|
+
function attachmentsOf(value) {
|
|
95
|
+
return Array.isArray(value) ? value.filter((item) => isPlainObject(item) && "fileName" in item) : [];
|
|
96
|
+
}
|
|
97
|
+
function displayFieldValue(field, value, options = normalizeOptions(field)) {
|
|
98
|
+
if (isUploadField(field)) {
|
|
99
|
+
const files = attachmentsOf(value);
|
|
100
|
+
return files.length ? `\u5DF2\u4E0A\u4F20 ${files.length} \u4E2A\u9644\u4EF6\uFF08${files.map((file) => file.fileName).join("\u3001")}\uFF09` : "";
|
|
101
|
+
}
|
|
102
|
+
const labelOf = (raw) => {
|
|
103
|
+
const option = options.find((opt) => opt.value === raw);
|
|
104
|
+
return !option || option.label === String(raw) ? String(raw) : `${option.label}\uFF08${String(raw)}\uFF09`;
|
|
105
|
+
};
|
|
106
|
+
if (Array.isArray(value)) return value.map(labelOf).join("\u3001");
|
|
107
|
+
if (typeof value === "boolean") return value ? "\u662F" : "\u5426";
|
|
108
|
+
return labelOf(value);
|
|
109
|
+
}
|
|
110
|
+
function buildReplyText(prefix, fields, values, optionsOf = normalizeOptions) {
|
|
111
|
+
const lines = [];
|
|
112
|
+
for (const field of fields) {
|
|
113
|
+
const value = values[field.name];
|
|
114
|
+
if (isBlankValue(value)) continue;
|
|
115
|
+
lines.push(`${field.label || field.name}\uFF1A${displayFieldValue(field, value, optionsOf(field))}`);
|
|
116
|
+
}
|
|
117
|
+
return [`${prefix}\uFF1A`, ...lines].join("\n");
|
|
118
|
+
}
|
|
119
|
+
function collectAttachments(fields, values) {
|
|
120
|
+
return fields.filter(isUploadField).flatMap((field) => attachmentsOf(values[field.name]));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
exports.attachmentsOf = attachmentsOf;
|
|
124
|
+
exports.buildReplyText = buildReplyText;
|
|
125
|
+
exports.collectAttachments = collectAttachments;
|
|
126
|
+
exports.displayFieldValue = displayFieldValue;
|
|
127
|
+
exports.extractOptions = extractOptions;
|
|
128
|
+
exports.extractRows = extractRows;
|
|
129
|
+
exports.isBlankValue = isBlankValue;
|
|
130
|
+
exports.isPlainObject = isPlainObject;
|
|
131
|
+
exports.isUploadField = isUploadField;
|
|
132
|
+
exports.normalizeOptions = normalizeOptions;
|
|
133
|
+
exports.resolveFieldKind = resolveFieldKind;
|
|
134
|
+
exports.validateFieldValue = validateFieldValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formField_vue_vue_type_script_setup_true_lang = require('./form-field2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var FormField = /* @__PURE__ */ _pluginVue_exportHelper.default(formField_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-354eb9c0"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = FormField;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "yc-form-field__label"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "yc-form-field__required"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_3 = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "yc-form-field__hint"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "yc-form-field__error"
|
|
22
|
+
};
|
|
23
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
+
...{ name: "YcCardField" },
|
|
25
|
+
__name: "form-field",
|
|
26
|
+
props: {
|
|
27
|
+
label: { default: "" },
|
|
28
|
+
required: { type: Boolean, default: false },
|
|
29
|
+
hint: { default: "" },
|
|
30
|
+
error: { default: "" },
|
|
31
|
+
fullRow: { type: Boolean, default: false }
|
|
32
|
+
},
|
|
33
|
+
setup(__props) {
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
class: vue.normalizeClass(["yc-form-field", { "is-full-row": __props.fullRow }])
|
|
39
|
+
},
|
|
40
|
+
[
|
|
41
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_1, [
|
|
42
|
+
__props.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, "*")) : vue.createCommentVNode("v-if", true),
|
|
43
|
+
vue.createTextVNode(
|
|
44
|
+
" " + vue.toDisplayString(__props.label) + " ",
|
|
45
|
+
1
|
|
46
|
+
/* TEXT */
|
|
47
|
+
),
|
|
48
|
+
__props.hint ? (vue.openBlock(), vue.createElementBlock(
|
|
49
|
+
"span",
|
|
50
|
+
_hoisted_3,
|
|
51
|
+
vue.toDisplayString(__props.hint),
|
|
52
|
+
1
|
|
53
|
+
/* TEXT */
|
|
54
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
55
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
56
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
57
|
+
__props.error ? (vue.openBlock(), vue.createElementBlock(
|
|
58
|
+
"span",
|
|
59
|
+
_hoisted_4,
|
|
60
|
+
vue.toDisplayString(__props.error),
|
|
61
|
+
1
|
|
62
|
+
/* TEXT */
|
|
63
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
64
|
+
],
|
|
65
|
+
2
|
|
66
|
+
/* CLASS */
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var inlineAlert_vue_vue_type_script_setup_true_lang = require('./inline-alert2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var InlineAlert = /* @__PURE__ */ _pluginVue_exportHelper.default(inlineAlert_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-2c7c2c97"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = InlineAlert;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = ["role"];
|
|
8
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
...{ name: "YcCardAlert" },
|
|
10
|
+
__name: "inline-alert",
|
|
11
|
+
props: {
|
|
12
|
+
text: {},
|
|
13
|
+
tone: { default: "info" }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
18
|
+
class: vue.normalizeClass(["yc-inline-alert", `is-${__props.tone}`]),
|
|
19
|
+
role: __props.tone === "error" ? "alert" : "status"
|
|
20
|
+
}, [
|
|
21
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
22
|
+
vue.createTextVNode(
|
|
23
|
+
vue.toDisplayString(__props.text),
|
|
24
|
+
1
|
|
25
|
+
/* TEXT */
|
|
26
|
+
)
|
|
27
|
+
], true)
|
|
28
|
+
], 10, _hoisted_1);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var input_vue_vue_type_script_setup_true_lang = require('./input2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var Input = /* @__PURE__ */ _pluginVue_exportHelper.default(input_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-730a2f3c"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = Input;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = ["value", "disabled"];
|
|
8
|
+
const _hoisted_2 = { value: "" };
|
|
9
|
+
const _hoisted_3 = ["value"];
|
|
10
|
+
const _hoisted_4 = ["value", "disabled", "placeholder"];
|
|
11
|
+
const _hoisted_5 = ["type", "inputmode", "step", "maxlength", "value", "disabled", "placeholder"];
|
|
12
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
...{ name: "YcCardInput" },
|
|
14
|
+
__name: "input",
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: { default: void 0 },
|
|
17
|
+
kind: { default: "text" },
|
|
18
|
+
placeholder: { default: "" },
|
|
19
|
+
options: { default: () => [] },
|
|
20
|
+
loading: { type: Boolean, default: false },
|
|
21
|
+
disabled: { type: Boolean, default: false },
|
|
22
|
+
invalid: { type: Boolean, default: false }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const textValue = vue.computed(() => {
|
|
29
|
+
const value = props.modelValue;
|
|
30
|
+
if (value === void 0 || value === null) return "";
|
|
31
|
+
if (props.kind === "datetime") return String(value).replace(" ", "T").slice(0, 16);
|
|
32
|
+
if (props.kind === "date") return String(value).slice(0, 10);
|
|
33
|
+
return String(value);
|
|
34
|
+
});
|
|
35
|
+
const inputType = vue.computed(() => {
|
|
36
|
+
switch (props.kind) {
|
|
37
|
+
case "phone":
|
|
38
|
+
return "tel";
|
|
39
|
+
case "email":
|
|
40
|
+
return "email";
|
|
41
|
+
case "number":
|
|
42
|
+
case "integer":
|
|
43
|
+
return "number";
|
|
44
|
+
case "date":
|
|
45
|
+
return "date";
|
|
46
|
+
case "datetime":
|
|
47
|
+
return "datetime-local";
|
|
48
|
+
default:
|
|
49
|
+
return "text";
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const inputMode = vue.computed(() => {
|
|
53
|
+
switch (props.kind) {
|
|
54
|
+
case "phone":
|
|
55
|
+
return "tel";
|
|
56
|
+
case "email":
|
|
57
|
+
return "email";
|
|
58
|
+
case "integer":
|
|
59
|
+
return "numeric";
|
|
60
|
+
case "number":
|
|
61
|
+
return "decimal";
|
|
62
|
+
default:
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function handleInput(event) {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
const raw = (_b = (_a = event.target) == null ? void 0 : _a.value) != null ? _b : "";
|
|
69
|
+
if (props.kind === "number" || props.kind === "integer") {
|
|
70
|
+
if (raw.trim() === "") return emit("update:modelValue", void 0);
|
|
71
|
+
const num = Number(raw);
|
|
72
|
+
return emit("update:modelValue", Number.isNaN(num) ? raw : num);
|
|
73
|
+
}
|
|
74
|
+
if (props.kind === "date" || props.kind === "datetime") {
|
|
75
|
+
return emit(
|
|
76
|
+
"update:modelValue",
|
|
77
|
+
raw ? props.kind === "datetime" ? raw.replace("T", " ") : raw : void 0
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
emit("update:modelValue", raw);
|
|
81
|
+
}
|
|
82
|
+
function handleSelect(event) {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
const raw = (_b = (_a = event.target) == null ? void 0 : _a.value) != null ? _b : "";
|
|
85
|
+
if (raw === "") return emit("update:modelValue", void 0);
|
|
86
|
+
const matched = props.options.find((opt) => String(opt.value) === raw);
|
|
87
|
+
emit("update:modelValue", matched ? matched.value : raw);
|
|
88
|
+
}
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return __props.kind === "select" ? (vue.openBlock(), vue.createElementBlock("select", {
|
|
91
|
+
key: 0,
|
|
92
|
+
value: __props.modelValue === void 0 || __props.modelValue === null ? "" : String(__props.modelValue),
|
|
93
|
+
disabled: __props.disabled,
|
|
94
|
+
class: vue.normalizeClass(["yc-input is-select", { "is-invalid": __props.invalid }]),
|
|
95
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus")),
|
|
96
|
+
onChange: handleSelect,
|
|
97
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
|
|
98
|
+
}, [
|
|
99
|
+
vue.createElementVNode(
|
|
100
|
+
"option",
|
|
101
|
+
_hoisted_2,
|
|
102
|
+
vue.toDisplayString(__props.loading ? "\u52A0\u8F7D\u9009\u9879\u4E2D\u2026" : __props.placeholder),
|
|
103
|
+
1
|
|
104
|
+
/* TEXT */
|
|
105
|
+
),
|
|
106
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
107
|
+
vue.Fragment,
|
|
108
|
+
null,
|
|
109
|
+
vue.renderList(__props.options, (opt) => {
|
|
110
|
+
return vue.openBlock(), vue.createElementBlock("option", {
|
|
111
|
+
key: String(opt.value),
|
|
112
|
+
value: String(opt.value)
|
|
113
|
+
}, vue.toDisplayString(opt.label), 9, _hoisted_3);
|
|
114
|
+
}),
|
|
115
|
+
128
|
|
116
|
+
/* KEYED_FRAGMENT */
|
|
117
|
+
))
|
|
118
|
+
], 42, _hoisted_1)) : __props.kind === "textarea" ? (vue.openBlock(), vue.createElementBlock("textarea", {
|
|
119
|
+
key: 1,
|
|
120
|
+
rows: "3",
|
|
121
|
+
value: textValue.value,
|
|
122
|
+
disabled: __props.disabled,
|
|
123
|
+
placeholder: __props.placeholder,
|
|
124
|
+
class: vue.normalizeClass(["yc-input is-textarea", { "is-invalid": __props.invalid }]),
|
|
125
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => emit("focus")),
|
|
126
|
+
onInput: handleInput,
|
|
127
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur"))
|
|
128
|
+
}, null, 42, _hoisted_4)) : (vue.openBlock(), vue.createElementBlock("input", {
|
|
129
|
+
key: 2,
|
|
130
|
+
type: inputType.value,
|
|
131
|
+
inputmode: inputMode.value,
|
|
132
|
+
step: __props.kind === "integer" ? "1" : __props.kind === "number" ? "any" : void 0,
|
|
133
|
+
maxlength: __props.kind === "phone" ? 20 : void 0,
|
|
134
|
+
value: textValue.value,
|
|
135
|
+
disabled: __props.disabled,
|
|
136
|
+
placeholder: __props.placeholder,
|
|
137
|
+
class: vue.normalizeClass(["yc-input", { "is-invalid": __props.invalid }]),
|
|
138
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => emit("focus")),
|
|
139
|
+
onInput: handleInput,
|
|
140
|
+
onBlur: _cache[5] || (_cache[5] = ($event) => emit("blur"))
|
|
141
|
+
}, null, 42, _hoisted_5));
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var kvList_vue_vue_type_script_setup_true_lang = require('./kv-list2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var KvList = /* @__PURE__ */ _pluginVue_exportHelper.default(kvList_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-4227c8cd"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = KvList;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
...{ name: "YcCardKv" },
|
|
9
|
+
__name: "kv-list",
|
|
10
|
+
props: {
|
|
11
|
+
items: { default: () => [] },
|
|
12
|
+
columns: { default: 2 },
|
|
13
|
+
bordered: { type: Boolean, default: false }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
function isEmpty(value) {
|
|
17
|
+
return value === void 0 || value === null || value === "";
|
|
18
|
+
}
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
21
|
+
"dl",
|
|
22
|
+
{
|
|
23
|
+
class: vue.normalizeClass(["yc-kv-list", { "is-single": __props.columns === 1, "is-bordered": __props.bordered }])
|
|
24
|
+
},
|
|
25
|
+
[
|
|
26
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
27
|
+
vue.Fragment,
|
|
28
|
+
null,
|
|
29
|
+
vue.renderList(__props.items, (item, idx) => {
|
|
30
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
key: `${item.label}-${idx}`,
|
|
34
|
+
class: vue.normalizeClass(["yc-kv-list__item", { "is-full": item.span === 2 }])
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
vue.createElementVNode(
|
|
38
|
+
"dt",
|
|
39
|
+
null,
|
|
40
|
+
vue.toDisplayString(item.label),
|
|
41
|
+
1
|
|
42
|
+
/* TEXT */
|
|
43
|
+
),
|
|
44
|
+
vue.createElementVNode(
|
|
45
|
+
"dd",
|
|
46
|
+
null,
|
|
47
|
+
vue.toDisplayString(isEmpty(item.value) ? "\u2014" : item.value),
|
|
48
|
+
1
|
|
49
|
+
/* TEXT */
|
|
50
|
+
)
|
|
51
|
+
],
|
|
52
|
+
2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
);
|
|
55
|
+
}),
|
|
56
|
+
128
|
|
57
|
+
/* KEYED_FRAGMENT */
|
|
58
|
+
))
|
|
59
|
+
],
|
|
60
|
+
2
|
|
61
|
+
/* CLASS */
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var metricGrid_vue_vue_type_script_setup_true_lang = require('./metric-grid2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var MetricGrid = /* @__PURE__ */ _pluginVue_exportHelper.default(metricGrid_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-a203fcdc"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = MetricGrid;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "yc-metric-grid__label" };
|
|
8
|
+
const _hoisted_2 = { class: "yc-metric-grid__value-row" };
|
|
9
|
+
const _hoisted_3 = { class: "yc-metric-grid__value" };
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "yc-metric-grid__unit"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "yc-metric-grid__meta"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "yc-metric-grid__desc"
|
|
21
|
+
};
|
|
22
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
23
|
+
...{ name: "YcCardMetrics" },
|
|
24
|
+
__name: "metric-grid",
|
|
25
|
+
props: {
|
|
26
|
+
items: { default: () => [] },
|
|
27
|
+
bordered: { type: Boolean, default: false }
|
|
28
|
+
},
|
|
29
|
+
setup(__props) {
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
class: vue.normalizeClass(["yc-metric-grid", { "is-bordered": __props.bordered }])
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
38
|
+
vue.Fragment,
|
|
39
|
+
null,
|
|
40
|
+
vue.renderList(__props.items, (item, idx) => {
|
|
41
|
+
var _a;
|
|
42
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
43
|
+
key: `${item.label}-${idx}`,
|
|
44
|
+
class: "yc-metric-grid__item"
|
|
45
|
+
}, [
|
|
46
|
+
vue.createElementVNode(
|
|
47
|
+
"div",
|
|
48
|
+
_hoisted_1,
|
|
49
|
+
vue.toDisplayString(item.label),
|
|
50
|
+
1
|
|
51
|
+
/* TEXT */
|
|
52
|
+
),
|
|
53
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
54
|
+
vue.createElementVNode(
|
|
55
|
+
"span",
|
|
56
|
+
_hoisted_3,
|
|
57
|
+
vue.toDisplayString(item.value),
|
|
58
|
+
1
|
|
59
|
+
/* TEXT */
|
|
60
|
+
),
|
|
61
|
+
item.unit ? (vue.openBlock(), vue.createElementBlock(
|
|
62
|
+
"span",
|
|
63
|
+
_hoisted_4,
|
|
64
|
+
vue.toDisplayString(item.unit),
|
|
65
|
+
1
|
|
66
|
+
/* TEXT */
|
|
67
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
68
|
+
]),
|
|
69
|
+
item.trend || item.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
70
|
+
item.trend ? (vue.openBlock(), vue.createElementBlock(
|
|
71
|
+
"span",
|
|
72
|
+
{
|
|
73
|
+
key: 0,
|
|
74
|
+
class: vue.normalizeClass(["yc-metric-grid__trend", `is-${(_a = item.trendType) != null ? _a : "neutral"}`])
|
|
75
|
+
},
|
|
76
|
+
vue.toDisplayString(item.trend),
|
|
77
|
+
3
|
|
78
|
+
/* TEXT, CLASS */
|
|
79
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
80
|
+
item.description ? (vue.openBlock(), vue.createElementBlock(
|
|
81
|
+
"span",
|
|
82
|
+
_hoisted_6,
|
|
83
|
+
vue.toDisplayString(item.description),
|
|
84
|
+
1
|
|
85
|
+
/* TEXT */
|
|
86
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
87
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
88
|
+
]);
|
|
89
|
+
}),
|
|
90
|
+
128
|
|
91
|
+
/* KEYED_FRAGMENT */
|
|
92
|
+
))
|
|
93
|
+
],
|
|
94
|
+
2
|
|
95
|
+
/* CLASS */
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var statusTag_vue_vue_type_script_setup_true_lang = require('./status-tag2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var StatusTag = /* @__PURE__ */ _pluginVue_exportHelper.default(statusTag_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-72b2c28b"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = StatusTag;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
...{ name: "YcCardTag" },
|
|
9
|
+
__name: "status-tag",
|
|
10
|
+
props: {
|
|
11
|
+
text: {},
|
|
12
|
+
tone: { default: "neutral" }
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
class: vue.normalizeClass(["yc-status-tag", `is-${__props.tone}`])
|
|
20
|
+
},
|
|
21
|
+
vue.toDisplayString(__props.text),
|
|
22
|
+
3
|
|
23
|
+
/* TEXT, CLASS */
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var switch_vue_vue_type_script_setup_true_lang = require('./switch2.vue.js');
|
|
6
|
+
var _pluginVue_exportHelper = require('../../../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
|
+
|
|
8
|
+
var Switch = /* @__PURE__ */ _pluginVue_exportHelper.default(switch_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-6e7c3747"]]);
|
|
9
|
+
|
|
10
|
+
exports.default = Switch;
|