@fses/workbench-app 0.2.18 → 0.2.21
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/WORKBENCH-CLOSURE.json +14 -14
- package/dist/WorkbenchCardCenterDrawer-BxRFAZDG.js +421 -0
- package/dist/WorkbenchDiagnosticsFooter-BXQJLBMu.js +22 -0
- package/dist/WorkbenchDiagnosticsPage-OdYSvQ2O.js +72 -0
- package/dist/Workspace-C4Co3cIc.js +22678 -0
- package/dist/adapters/defaultAgentTransportAdapter.d.ts +6 -0
- package/dist/adapters/defaultBrowserAdapters.d.ts +22 -0
- package/dist/adapters/defaultPlatformRequestAdapter.d.ts +6 -0
- package/dist/adapters/defaultRealtimeAdapter.d.ts +6 -0
- package/dist/adapters/endpointResolver.d.ts +16 -0
- package/dist/adapters/index.d.ts +7 -1
- package/dist/adapters/servicePorts.d.ts +20 -0
- package/dist/adapters/types.d.ts +27 -1
- package/dist/canvas/api/index.js +1 -1
- package/dist/canvas/bridge/workbenchCanvasBus.d.ts +13 -1
- package/dist/canvas/persistence/canvasSnapshotStorage.d.ts +3 -2
- package/dist/{canvasFacade-B8jYm_aO.js → canvasFacade-ZFqB_i7z.js} +1 -1
- package/dist/{cardFactory-DmEBcCf4.js → cardFactory-D5dyYSC3.js} +197 -161
- package/dist/components/WorkbenchAppHost.vue.d.ts +5 -5
- package/dist/components/WorkbenchApplication.vue.d.ts +2 -2
- package/dist/components/WorkbenchCardCenterDrawer.vue.d.ts +2 -0
- package/dist/components/WorkbenchDiagnosticsFooter.vue.d.ts +2 -0
- package/dist/components/WorkbenchDiagnosticsPage.vue.d.ts +2 -0
- package/dist/components/WorkbenchDrawerOutlet.vue.d.ts +6 -0
- package/dist/components/WorkbenchFeatureOutlet.vue.d.ts +2 -0
- package/dist/components/WorkbenchSlotOutlet.vue.d.ts +5 -0
- package/dist/config/workbenchAppConfig.d.ts +4 -0
- package/dist/customCardCatalog-D8woQgB9.js +512 -0
- package/dist/extensions/index.d.ts +3 -54
- package/dist/extensions/index.js +7 -5
- package/dist/extensions/manifest.d.ts +27 -0
- package/dist/extensions/normalizeWorkbenchExtensions.d.ts +19 -0
- package/dist/extensions/types.d.ts +62 -0
- package/dist/fses-workbench-app.js +109 -89
- package/dist/i18n/index.d.ts +17 -0
- package/dist/i18n/index.js +14 -0
- package/dist/index-C1Y_OWV9.js +1772 -0
- package/dist/index-DkGYPLLJ.js +34 -0
- package/dist/index.d.ts +12 -1
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvas.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvasSettingsMenu.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeImageComposeDrawer.vue.d.ts +19 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeToolbar.vue.d.ts +36 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +2 -2
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasConfigController.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasLayoutController.d.ts +12 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasRefreshController.d.ts +11 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasSelectionController.d.ts +11 -0
- package/dist/internal/personal-workbench/components/workbench/showcase/WorkbenchShowcase.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/controllers/workbenchBuiltinPluginBridge.d.ts +32 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartConfigModel.d.ts +68 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDataSourceController.d.ts +100 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDrilldownController.d.ts +96 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDrilldownTable.d.ts +34 -0
- package/dist/internal/personal-workbench/controllers/workbenchFdeVersionController.d.ts +107 -0
- package/dist/internal/personal-workbench/controllers/workbenchRecommendationConfigModel.d.ts +82 -0
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +13 -9
- package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +3 -1
- package/dist/internal/personal-workbench/lib/fdeWorkbenchConfigClient.d.ts +6 -5
- package/dist/internal/personal-workbench/lib/runtimeIdentity.d.ts +5 -0
- package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +1 -1
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +4 -4
- package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +61 -47
- package/dist/internal/personal-workbench/lib/workbenchMetricDetailApi.d.ts +2 -1
- package/dist/internal/personal-workbench/lib/workbenchRemoteClient.d.ts +3 -1
- package/dist/internal/personal-workbench/lib/workbenchRequestTransport.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +8 -7
- package/dist/internal/personal-workbench/pages/Workspace.vue.d.ts +2 -2
- package/dist/internal/personal-workbench/stores/domains/actionsRuntime.d.ts +35 -0
- package/dist/internal/personal-workbench/stores/domains/canvasRuntime.d.ts +44 -0
- package/dist/internal/personal-workbench/stores/domains/conversationRuntime.d.ts +29 -0
- package/dist/internal/personal-workbench/stores/domains/dataBindingRuntime.d.ts +27 -0
- package/dist/internal/personal-workbench/stores/domains/fdeRuntime.d.ts +38 -0
- package/dist/internal/personal-workbench/stores/domains/memoryRuntime.d.ts +53 -0
- package/dist/internal/personal-workbench/stores/workbenchRuntime.d.ts +28 -1
- package/dist/kernel/command/createCommandRegistry.d.ts +19 -0
- package/dist/kernel/createWorkbenchHostContext.d.ts +43 -0
- package/dist/kernel/createWorkbenchKernel.d.ts +7 -0
- package/dist/kernel/diagnostics/createWorkbenchDiagnostics.d.ts +35 -0
- package/dist/kernel/event/createEventBus.d.ts +16 -0
- package/dist/kernel/plugin/createPluginManager.d.ts +7 -0
- package/dist/kernel/plugin/registrationScope.d.ts +15 -0
- package/dist/kernel/plugin/types.d.ts +30 -0
- package/dist/kernel/registry/createRegistry.d.ts +42 -0
- package/dist/kernel/registry/resolveSlotContributions.d.ts +14 -0
- package/dist/kernel/types.d.ts +52 -0
- package/dist/kernel/workbenchHostContext.d.ts +14 -0
- package/dist/normalizeWorkbenchExtensions-Ccv3n3fC.js +425 -0
- package/dist/plugin/index.d.ts +7 -0
- package/dist/plugin/index.js +8 -0
- package/dist/plugin/types.d.ts +106 -0
- package/dist/plugins/defaultWorkbenchPlugins.d.ts +11 -0
- package/dist/plugins/workbenchCardCenterPlugin.d.ts +13 -0
- package/dist/plugins/workbenchDiagnosticsPlugin.d.ts +15 -0
- package/dist/plugins/workbenchDrawerCommands.d.ts +16 -0
- package/dist/plugins/workbenchSettingsPlugin.d.ts +19 -0
- package/dist/plugins/workbenchThemePlugin.d.ts +15 -0
- package/dist/routing/createWorkbenchFeatureRoute.d.ts +11 -0
- package/dist/routing/resolveWorkbenchFeatureRoute.d.ts +23 -0
- package/dist/runtime/index.d.ts +6 -1
- package/dist/runtime/index.js +6 -3
- package/dist/runtime/scope/createWorkbenchRuntimeScope.d.ts +10 -0
- package/dist/runtime/store/workbenchRuntimeContext.d.ts +12 -0
- package/dist/runtime/store/workbenchRuntimeFacade.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/useWorkbenchRuntime-CJLqEtgU.js +24062 -0
- package/dist/version.d.ts +1 -1
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +28256 -7528
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +17 -17
- package/node_modules/@fses/ai-chat/dist/style.css +1 -1
- package/node_modules/@fses/ai-chat/package.json +3 -3
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +5 -5
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card.js +5 -5
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card.umd.cjs +1 -1
- package/node_modules/@fses/workbench-card/dist/types/block.d.ts +4 -1
- package/node_modules/@fses/workbench-card/package.json +1 -1
- package/node_modules/@fses/workbench-card/src/registry/cardRegistry.ts +4 -4
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +1 -1
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.ts +1 -1
- package/node_modules/@fses/workbench-card/src/types/block.ts +4 -12
- package/package.json +11 -3
- package/dist/Workspace-JvnSC-w9.js +0 -23186
- package/dist/index-D-WW3bXH.js +0 -829
- package/dist/useWorkbenchRuntime-D_AtkXIX.js +0 -23865
- package/dist/workbenchCustomComponentRegistry-CWUPjCnJ.js +0 -267
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { c as x, a as z, d as E } from "./cardFactory-DmEBcCf4.js";
|
|
2
|
-
import { defineComponent as V, computed as R, ref as C, watch as j, onBeforeUnmount as I, openBlock as h, createElementBlock as y, createElementVNode as o, toDisplayString as u, createCommentVNode as T, normalizeClass as U } from "vue";
|
|
3
|
-
const D = "/workbench-card-previews/custom-cards";
|
|
4
|
-
function N(r) {
|
|
5
|
-
return `${r.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "system_card"}.png`;
|
|
6
|
-
}
|
|
7
|
-
function he(r) {
|
|
8
|
-
const t = x(
|
|
9
|
-
{
|
|
10
|
-
capabilityId: r,
|
|
11
|
-
meta: {
|
|
12
|
-
id: `system-card-preview-${N(r).replace(/\.png$/u, "")}`,
|
|
13
|
-
systemCardPreview: !0
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
[]
|
|
17
|
-
);
|
|
18
|
-
return t.status !== "success" || !t.block || !t.registryEntry ? null : {
|
|
19
|
-
...t.block,
|
|
20
|
-
meta: {
|
|
21
|
-
...t.block.meta,
|
|
22
|
-
rendererKey: t.registryEntry.rendererKey,
|
|
23
|
-
dataShape: t.registryEntry.dataShape
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
async function ye(r) {
|
|
28
|
-
const t = await z(
|
|
29
|
-
{
|
|
30
|
-
capabilityId: r,
|
|
31
|
-
meta: {
|
|
32
|
-
id: `system-card-preview-${N(r).replace(/\.png$/u, "")}`,
|
|
33
|
-
systemCardPreview: !0
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
[]
|
|
37
|
-
);
|
|
38
|
-
return t.status !== "success" || !t.block || !t.registryEntry ? null : {
|
|
39
|
-
...t.block,
|
|
40
|
-
meta: {
|
|
41
|
-
...t.block.meta,
|
|
42
|
-
rendererKey: t.registryEntry.rendererKey,
|
|
43
|
-
dataShape: t.registryEntry.dataShape
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function G(r) {
|
|
48
|
-
const t = r.trim().replace(/^\/+/, "");
|
|
49
|
-
return `${D}/${t}`;
|
|
50
|
-
}
|
|
51
|
-
const Y = G("template_weather_card.png"), q = "@byteluck-fe/workbench-template.WeatherCard", J = "card.fde.templateWeather", we = [
|
|
52
|
-
{
|
|
53
|
-
capabilityId: J,
|
|
54
|
-
category: "card.fde_custom_cards",
|
|
55
|
-
type: "templateWeather",
|
|
56
|
-
title: E("FWA.60571787571486716"),
|
|
57
|
-
description: E("FWA.1b9f1787570205830"),
|
|
58
|
-
blockType: "display",
|
|
59
|
-
subType: "fdeCustom",
|
|
60
|
-
rendererKey: "fdeCustomComponent",
|
|
61
|
-
dataShape: "fdeCustomComponent",
|
|
62
|
-
shell: "card",
|
|
63
|
-
styleVariants: ["standard", "compact", "tile"],
|
|
64
|
-
defaultSize: "componentTall",
|
|
65
|
-
handlerClassName: "WorkbenchTemplateWeatherComponentAbility",
|
|
66
|
-
status: "implemented",
|
|
67
|
-
sourceLabel: "npm",
|
|
68
|
-
componentRef: q,
|
|
69
|
-
packageName: "@byteluck-fe/workbench-template",
|
|
70
|
-
packageVersion: "0.1.1",
|
|
71
|
-
exportName: "WeatherCard",
|
|
72
|
-
previewUrl: Y,
|
|
73
|
-
defaultProps: { city: E("FWA.c4601787571649315") },
|
|
74
|
-
insertionMode: "registered"
|
|
75
|
-
}
|
|
76
|
-
], Q = ["aria-busy"], X = { class: "weather-card__header" }, Z = { class: "weather-card__heading" }, ee = { class: "weather-card__city" }, te = {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: "weather-card__region"
|
|
79
|
-
}, re = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "weather-card__state"
|
|
82
|
-
}, ae = {
|
|
83
|
-
key: 2,
|
|
84
|
-
class: "weather-card__body"
|
|
85
|
-
}, ne = { class: "weather-card__temperature" }, le = { class: "weather-card__summary" }, se = { class: "weather-card__metrics" }, oe = { class: "weather-card__metric" }, ie = { class: "weather-card__metric" }, ce = { class: "weather-card__updated" }, ue = /* @__PURE__ */ V({
|
|
86
|
-
__name: "WeatherCard",
|
|
87
|
-
props: {
|
|
88
|
-
city: {}
|
|
89
|
-
},
|
|
90
|
-
setup(r) {
|
|
91
|
-
const t = r, w = R(() => t.city.trim()), f = R(() => {
|
|
92
|
-
var e;
|
|
93
|
-
return ((e = l.value) == null ? void 0 : e.city) ?? (w.value || "未选择城市");
|
|
94
|
-
}), m = C(!1), p = C(""), k = C("empty"), l = C(null);
|
|
95
|
-
let d = null, g = 0;
|
|
96
|
-
j(
|
|
97
|
-
w,
|
|
98
|
-
(e) => {
|
|
99
|
-
S(e);
|
|
100
|
-
},
|
|
101
|
-
{ immediate: !0 }
|
|
102
|
-
), I(() => {
|
|
103
|
-
d == null || d.abort();
|
|
104
|
-
});
|
|
105
|
-
async function S(e) {
|
|
106
|
-
const a = ++g;
|
|
107
|
-
if (d == null || d.abort(), d = null, l.value = null, p.value = "", !e) {
|
|
108
|
-
m.value = !1, k.value = "empty", p.value = "请输入城市名称";
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const n = new AbortController();
|
|
112
|
-
d = n, m.value = !0;
|
|
113
|
-
try {
|
|
114
|
-
const s = await B(e, n.signal), i = await O(s, n.signal);
|
|
115
|
-
if (a !== g)
|
|
116
|
-
return;
|
|
117
|
-
l.value = $(s, i);
|
|
118
|
-
} catch (s) {
|
|
119
|
-
if (n.signal.aborted || a !== g)
|
|
120
|
-
return;
|
|
121
|
-
k.value = "error", p.value = s instanceof Error ? s.message : "天气数据请求失败";
|
|
122
|
-
} finally {
|
|
123
|
-
a === g && (m.value = !1, d === n && (d = null));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
async function B(e, a) {
|
|
127
|
-
var n;
|
|
128
|
-
const s = new URL("https://geocoding-api.open-meteo.com/v1/search");
|
|
129
|
-
s.searchParams.set("name", e), s.searchParams.set("count", "1"), s.searchParams.set("language", "zh"), s.searchParams.set("format", "json");
|
|
130
|
-
const i = await fetch(s, { signal: a });
|
|
131
|
-
if (!i.ok)
|
|
132
|
-
throw new Error("城市查询失败");
|
|
133
|
-
const v = (n = (await i.json()).results) == null ? void 0 : n[0];
|
|
134
|
-
if (!v)
|
|
135
|
-
throw new Error(`未找到城市:${e}`);
|
|
136
|
-
return v;
|
|
137
|
-
}
|
|
138
|
-
async function O(e, a) {
|
|
139
|
-
const n = new URL("https://api.open-meteo.com/v1/forecast");
|
|
140
|
-
n.searchParams.set("latitude", String(e.latitude)), n.searchParams.set("longitude", String(e.longitude)), n.searchParams.set(
|
|
141
|
-
"current",
|
|
142
|
-
"temperature_2m,relative_humidity_2m,weather_code,wind_speed_10m"
|
|
143
|
-
), n.searchParams.set("daily", "temperature_2m_max,temperature_2m_min"), n.searchParams.set("forecast_days", "1"), n.searchParams.set("timezone", "auto");
|
|
144
|
-
const s = await fetch(n, { signal: a });
|
|
145
|
-
if (!s.ok)
|
|
146
|
-
throw new Error("天气数据请求失败");
|
|
147
|
-
const i = await s.json();
|
|
148
|
-
if (!i.current)
|
|
149
|
-
throw new Error("天气数据暂不可用");
|
|
150
|
-
return i;
|
|
151
|
-
}
|
|
152
|
-
function $(e, a) {
|
|
153
|
-
var n, s, i, v, P, A;
|
|
154
|
-
const c = a.current, b = a.daily, F = [e.admin2, e.admin1, e.country].filter((W, H, M) => !!W && M.indexOf(W) === H).join(" / ");
|
|
155
|
-
return {
|
|
156
|
-
city: e.name,
|
|
157
|
-
region: F,
|
|
158
|
-
condition: K(c == null ? void 0 : c.weather_code),
|
|
159
|
-
temperature: c == null ? void 0 : c.temperature_2m,
|
|
160
|
-
temperatureUnit: ((n = a.current_units) == null ? void 0 : n.temperature_2m) ?? "°C",
|
|
161
|
-
humidity: c == null ? void 0 : c.relative_humidity_2m,
|
|
162
|
-
humidityUnit: ((s = a.current_units) == null ? void 0 : s.relative_humidity_2m) ?? "%",
|
|
163
|
-
windSpeed: c == null ? void 0 : c.wind_speed_10m,
|
|
164
|
-
windSpeedUnit: ((i = a.current_units) == null ? void 0 : i.wind_speed_10m) ?? "km/h",
|
|
165
|
-
high: (v = b == null ? void 0 : b.temperature_2m_max) == null ? void 0 : v[0],
|
|
166
|
-
low: (P = b == null ? void 0 : b.temperature_2m_min) == null ? void 0 : P[0],
|
|
167
|
-
rangeUnit: ((A = a.daily_units) == null ? void 0 : A.temperature_2m_max) ?? "°C",
|
|
168
|
-
updatedAt: L(c == null ? void 0 : c.time)
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function K(e) {
|
|
172
|
-
return e === 0 ? { label: "晴", tone: "clear" } : e === 1 || e === 2 ? { label: "多云", tone: "cloudy" } : e === 3 ? { label: "阴", tone: "cloudy" } : e === 45 || e === 48 ? { label: "雾", tone: "fog" } : [51, 53, 55, 56, 57, 61, 63, 65, 66, 67, 80, 81, 82].includes(e ?? -1) ? { label: "降雨", tone: "rain" } : [71, 73, 75, 77, 85, 86].includes(e ?? -1) ? { label: "降雪", tone: "snow" } : [95, 96, 99].includes(e ?? -1) ? { label: "雷阵雨", tone: "storm" } : { label: "未知", tone: "neutral" };
|
|
173
|
-
}
|
|
174
|
-
function L(e) {
|
|
175
|
-
return e ? e.replace("T", " ") : "未知";
|
|
176
|
-
}
|
|
177
|
-
function _(e, a) {
|
|
178
|
-
return typeof e != "number" ? "--" : `${Math.round(e)}${a}`;
|
|
179
|
-
}
|
|
180
|
-
return (e, a) => {
|
|
181
|
-
var n, s;
|
|
182
|
-
return h(), y("section", {
|
|
183
|
-
class: "weather-card",
|
|
184
|
-
"aria-busy": m.value
|
|
185
|
-
}, [
|
|
186
|
-
o("div", X, [
|
|
187
|
-
o("div", Z, [
|
|
188
|
-
a[0] || (a[0] = o("div", { class: "weather-card__label" }, "实时天气", -1)),
|
|
189
|
-
o("h2", ee, u(f.value), 1),
|
|
190
|
-
(n = l.value) != null && n.region ? (h(), y("p", te, u(l.value.region), 1)) : T("", !0)
|
|
191
|
-
]),
|
|
192
|
-
o("div", {
|
|
193
|
-
class: U(["weather-card__badge", l.value ? `weather-card__badge--${l.value.condition.tone}` : void 0])
|
|
194
|
-
}, u(((s = l.value) == null ? void 0 : s.condition.label) ?? "待更新"), 3)
|
|
195
|
-
]),
|
|
196
|
-
m.value ? (h(), y("div", re, "正在获取天气...")) : p.value ? (h(), y("div", {
|
|
197
|
-
key: 1,
|
|
198
|
-
class: U(["weather-card__state", { "weather-card__state--error": k.value === "error" }])
|
|
199
|
-
}, u(p.value), 3)) : l.value ? (h(), y("div", ae, [
|
|
200
|
-
o("div", ne, u(_(l.value.temperature, l.value.temperatureUnit)), 1),
|
|
201
|
-
o("div", le, [
|
|
202
|
-
o("span", null, "最高 " + u(_(l.value.high, l.value.rangeUnit)), 1),
|
|
203
|
-
o("span", null, "最低 " + u(_(l.value.low, l.value.rangeUnit)), 1)
|
|
204
|
-
]),
|
|
205
|
-
o("div", se, [
|
|
206
|
-
o("div", oe, [
|
|
207
|
-
a[1] || (a[1] = o("span", { class: "weather-card__metric-label" }, "湿度", -1)),
|
|
208
|
-
o("strong", null, u(_(l.value.humidity, l.value.humidityUnit)), 1)
|
|
209
|
-
]),
|
|
210
|
-
o("div", ie, [
|
|
211
|
-
a[2] || (a[2] = o("span", { class: "weather-card__metric-label" }, "风速", -1)),
|
|
212
|
-
o("strong", null, u(_(l.value.windSpeed, l.value.windSpeedUnit)), 1)
|
|
213
|
-
])
|
|
214
|
-
]),
|
|
215
|
-
o("p", ce, "更新时间 " + u(l.value.updatedAt), 1)
|
|
216
|
-
])) : T("", !0)
|
|
217
|
-
], 8, Q);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
}), de = [
|
|
221
|
-
{
|
|
222
|
-
packageName: "@byteluck-fe/workbench-template",
|
|
223
|
-
version: "0.1.1",
|
|
224
|
-
componentRef: "@byteluck-fe/workbench-template.WeatherCard",
|
|
225
|
-
componentName: E("FWA.3d751787571486718"),
|
|
226
|
-
exportName: "WeatherCard",
|
|
227
|
-
enabled: !0,
|
|
228
|
-
component: ue,
|
|
229
|
-
validateProps: (r) => typeof r.city == "string" && r.city.trim().length > 0
|
|
230
|
-
}
|
|
231
|
-
// 示例:
|
|
232
|
-
// {
|
|
233
|
-
// packageName: '@fde-components/sales-summary',
|
|
234
|
-
// version: '1.2.0',
|
|
235
|
-
// componentRef: '@fde-components/sales-summary.SalesSummaryCard',
|
|
236
|
-
// componentName: '销售摘要组件',
|
|
237
|
-
// exportName: 'SalesSummaryCard',
|
|
238
|
-
// enabled: true,
|
|
239
|
-
// component: SalesSummaryCard,
|
|
240
|
-
// validateProps: (props) => typeof props.amount === 'number' && typeof props.trend === 'number',
|
|
241
|
-
// },
|
|
242
|
-
], me = new Map(de.map((r) => [r.componentRef, r]));
|
|
243
|
-
function pe(r, t, w) {
|
|
244
|
-
var f;
|
|
245
|
-
return ((f = r.validateProps) == null ? void 0 : f.call(r, t, w)) ?? !0;
|
|
246
|
-
}
|
|
247
|
-
const fe = {
|
|
248
|
-
/**
|
|
249
|
-
* 根据 componentRef 查找已安装、已审核并启用的 npm 组件。
|
|
250
|
-
* @param data - FDE 自定义组件卡片数据。
|
|
251
|
-
* @returns 命中的组件登记项;未登记或禁用时返回 null。
|
|
252
|
-
*/
|
|
253
|
-
resolve(r) {
|
|
254
|
-
const t = me.get(r.componentRef);
|
|
255
|
-
return !t || t.enabled === !1 ? null : t;
|
|
256
|
-
},
|
|
257
|
-
validateProps: pe
|
|
258
|
-
};
|
|
259
|
-
export {
|
|
260
|
-
we as W,
|
|
261
|
-
J as a,
|
|
262
|
-
q as b,
|
|
263
|
-
Y as c,
|
|
264
|
-
fe as d,
|
|
265
|
-
ye as e,
|
|
266
|
-
he as s
|
|
267
|
-
};
|