@fses/workbench-app 0.2.21 → 0.3.1
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 → WorkbenchCardCenterDrawer-CNSq1coL.js} +2 -2
- package/dist/{WorkbenchDiagnosticsFooter-BXQJLBMu.js → WorkbenchDiagnosticsFooter-DlRWlL9q.js} +1 -1
- package/dist/{WorkbenchDiagnosticsPage-OdYSvQ2O.js → WorkbenchDiagnosticsPage-CeXZkp9k.js} +1 -1
- package/dist/{Workspace-C4Co3cIc.js → Workspace-562qQHC3.js} +3953 -3956
- package/dist/{customCardCatalog-D8woQgB9.js → customCardCatalog-DhntP1Sk.js} +1 -1
- package/dist/fses-workbench-app.js +2 -2
- package/dist/{index-C1Y_OWV9.js → index-p9gr-rM0.js} +5 -5
- package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +7 -0
- package/dist/internal/personal-workbench/lib/workbenchChatHistoryReplay.d.ts +6 -0
- package/dist/internal/personal-workbench/vue-types/workbenchRuntime.d.ts +3 -0
- package/dist/runtime/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useWorkbenchRuntime-CJLqEtgU.js → useWorkbenchRuntime-DJujrl4a.js} +3859 -3815
- package/dist/version.d.ts +1 -1
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +4408 -4393
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +15 -15
- 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 +6193 -6130
- package/node_modules/@fses/workbench-card/dist/renderers/chart/types.d.ts +7 -0
- package/node_modules/@fses/workbench-card/dist/renderers/native/nativeBindings.d.ts +1 -0
- package/node_modules/@fses/workbench-card/dist/renderers/useWorkbenchBlockRendererBindings.d.ts +5 -1
- package/node_modules/@fses/workbench-card/dist/style.css +1 -1
- package/node_modules/@fses/workbench-card/dist/types/block.d.ts +9 -0
- package/node_modules/@fses/workbench-card/package.json +1 -1
- package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +11 -3
- package/node_modules/@fses/workbench-card/src/renderers/chart/types.ts +7 -0
- package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +14 -0
- package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts +78 -2
- package/node_modules/@fses/workbench-card/src/styles/workbench-card.css +98 -0
- package/node_modules/@fses/workbench-card/src/types/block.ts +9 -0
- package/package.json +3 -3
|
@@ -18,11 +18,18 @@ export interface WorkbenchChartQueryScope {
|
|
|
18
18
|
}
|
|
19
19
|
export interface WorkbenchChartQueryOptions {
|
|
20
20
|
businessWording?: string;
|
|
21
|
+
pageIndex?: number;
|
|
22
|
+
pageSize?: number;
|
|
23
|
+
needCount?: boolean;
|
|
21
24
|
}
|
|
22
25
|
export interface WorkbenchChartRefreshResult {
|
|
23
26
|
success: boolean;
|
|
24
27
|
rows?: Array<Record<string, unknown>>;
|
|
25
28
|
dataPayload?: unknown;
|
|
29
|
+
pageIndex?: number;
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
total?: number;
|
|
32
|
+
hasMore?: boolean;
|
|
26
33
|
errorCode?: string;
|
|
27
34
|
errorMessage?: string;
|
|
28
35
|
}
|
|
@@ -135,6 +135,7 @@ export declare function createNativeBindings(context: NativeBindingsContext): {
|
|
|
135
135
|
tableRowCells: typeof tableRowCells;
|
|
136
136
|
metricSummaryDisplayValue: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
137
137
|
metricSummaryUnitLabel: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
138
|
+
metricSummarySourceLabel: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
138
139
|
imageComposeMetricSubText: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
139
140
|
imageComposeMetricFooterStatus: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
140
141
|
imageComposeMetricFooterMain: (data: MetricSummaryData & Record<string, unknown>) => string;
|
package/node_modules/@fses/workbench-card/dist/renderers/useWorkbenchBlockRendererBindings.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @created 2026-05-20
|
|
5
5
|
*/
|
|
6
6
|
import { type CSSProperties } from 'vue';
|
|
7
|
-
import type { TableColumnsType } from 'ant-design-vue';
|
|
7
|
+
import type { TableColumnsType, TablePaginationConfig } from 'ant-design-vue';
|
|
8
8
|
import type { WorkbenchRendererHostBridge } from './hostBridge';
|
|
9
9
|
import type { CategoryRankingData, CustomCanvasData, CustomCanvasNestedBlock, DisplayBlockData, MaterializedBlock, MetricSummaryData, RoleId, TableRowsData, WorkbenchBlock } from '../types';
|
|
10
10
|
type WorkbenchAntTableRow = Record<string, unknown> & {
|
|
@@ -106,6 +106,9 @@ export declare function useWorkbenchBlockRendererBindings(props: WorkbenchBlockR
|
|
|
106
106
|
x: number;
|
|
107
107
|
y: string;
|
|
108
108
|
};
|
|
109
|
+
tableRowsPaginationConfig: (data: DisplayBlockData | undefined) => false | TablePaginationConfig;
|
|
110
|
+
tableRowsPageLoading: import("vue").Ref<boolean, boolean>;
|
|
111
|
+
handleTableRowsPaginationChange: (pagination: Pick<TablePaginationConfig, "current" | "pageSize">) => Promise<void>;
|
|
109
112
|
handleTableRowsAntTableColumnResize: (width: number, column: unknown) => void;
|
|
110
113
|
formatWeatherTemp: (value: number | null | undefined) => string;
|
|
111
114
|
weatherIcon: (condition: import("..").WeatherCurrentData["condition"]) => import("vue").Component;
|
|
@@ -161,6 +164,7 @@ export declare function useWorkbenchBlockRendererBindings(props: WorkbenchBlockR
|
|
|
161
164
|
tableRowCells: typeof import("./native/nativeBindings").tableRowCells;
|
|
162
165
|
metricSummaryDisplayValue: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
163
166
|
metricSummaryUnitLabel: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
167
|
+
metricSummarySourceLabel: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
164
168
|
imageComposeMetricSubText: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
165
169
|
imageComposeMetricFooterStatus: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
166
170
|
imageComposeMetricFooterMain: (data: MetricSummaryData & Record<string, unknown>) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fses-workbench-card-root{box-sizing:border-box}.workbench-card-ant-table,.workbench-card-ant-table .ant-spin-nested-loading,.workbench-card-ant-table .ant-spin-container,.workbench-card-ant-table .ant-table,.workbench-card-ant-table .ant-table-container{height:100%;min-height:0}.workbench-card-ant-table .ant-table{font-size:12px}.workbench-card-ant-table .ant-table-container{display:grid;grid-template-rows:auto minmax(0,1fr)}.workbench-card-ant-table .ant-table-thead>tr>th{padding:6px 8px;color:#667085;background:#f7f8fa;border-bottom-color:#eef1f6;font-weight:600;white-space:nowrap}.workbench-card-ant-table .ant-table-tbody>tr>td{padding:6px 8px;color:#344054;border-bottom-color:#eef1f6}.workbench-card-ant-table .ant-table-body{height:auto!important;min-height:0;max-height:none!important;overflow:auto!important;scrollbar-gutter:stable;scrollbar-width:thin}.workbench-custom-canvas-page-header{box-sizing:border-box;display:grid;width:100%;height:100%;min-height:0;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;overflow:hidden;border-radius:6px}.workbench-custom-canvas-page-header__brand{display:grid;min-width:0;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;overflow:hidden}.workbench-custom-canvas-page-header__logo{width:40px;height:40px;font-size:14px}.workbench-custom-canvas-page-header__title{font-size:20px;line-height:24px}.workbench-custom-canvas-page-header__subtitle{margin-top:2px;font-size:14px;line-height:18px}.workbench-custom-canvas-page-header__actions{max-width:740px}.workbench-custom-canvas-page-header__pill{max-width:192px;padding:6px 12px;font-size:14px;line-height:18px}.workbench-custom-canvas-image{min-height:0}.workbench-image-alert-ranking-row{display:grid;min-height:28px;grid-template-columns:56px minmax(0,1fr) 48px;align-items:center;column-gap:16px}.workbench-image-alert-ranking-severity{height:24px;align-items:center;justify-content:center;line-height:1}.workbench-image-alert-ranking-title,.workbench-image-alert-ranking-time{align-self:center;line-height:20px}.workbench-image-alert-ranking-time{text-align:right}.workbench-reference-panel-header{display:grid;height:30px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;overflow:hidden}.workbench-reference-ops-panel,.workbench-reference-security-panel,.workbench-reference-asset-panel,.workbench-reference-project-panel,.workbench-reference-bid-collaboration-panel{display:grid;width:100%;height:100%;min-height:0;overflow:hidden}.workbench-reference-ops-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.workbench-reference-ops-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.58fr) minmax(0,.42fr);gap:4px;overflow:hidden}.workbench-reference-ops-right-column{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr);gap:4px;overflow:hidden}.workbench-reference-ops-service-list,.workbench-reference-ops-resource-list,.workbench-reference-ops-incident-list,.workbench-reference-ops-trend-card,.workbench-reference-security-score-card,.workbench-reference-security-score-main,.workbench-reference-security-score-metrics,.workbench-reference-security-risk-list,.workbench-reference-security-audit-list,.workbench-reference-security-account-list,.workbench-reference-security-compliance-list,.workbench-reference-asset-ledger-grid,.workbench-reference-asset-exception-list,.workbench-reference-cost-donut-card,.workbench-reference-cost-donut-ring,.workbench-reference-cost-list,.workbench-reference-project-progress-list,.workbench-reference-project-efficiency-list,.workbench-reference-project-todo-grid,.workbench-reference-project-quick-links,.workbench-reference-notice-list{min-height:0;overflow:hidden}.workbench-reference-ops-service-list{align-content:start;grid-auto-rows:minmax(16px,1fr)}.workbench-reference-ops-incident-list,.workbench-reference-security-risk-list{align-content:start;grid-auto-rows:minmax(20px,1fr)}.workbench-reference-security-audit-list,.workbench-reference-security-account-list,.workbench-reference-security-compliance-list{grid-auto-rows:minmax(24px,1fr)}.workbench-reference-security-panel{grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:6px}.workbench-reference-security-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(84px,.58fr) minmax(72px,.42fr);gap:4px;overflow:hidden}.workbench-reference-security-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,1fr);gap:4px;overflow:hidden}.workbench-reference-security-score-card{display:grid;height:100%;grid-template-columns:minmax(128px,.46fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:0}.workbench-reference-cost-donut-ring{width:min(88px,100%,calc(100cqh - 8px));height:min(88px,100%,calc(100cqh - 8px));min-width:28px;min-height:28px}.workbench-reference-security-score-ring{display:grid;width:clamp(32px,22%,76px);height:clamp(32px,22%,76px)}.workbench-reference-security-score-main{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-width:0}.workbench-reference-security-score-main strong{font-size:20px;line-height:20px}.workbench-reference-security-score-metrics{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));height:100%;min-height:0}.workbench-reference-security-score-metric{display:grid;min-width:0;grid-template-columns:auto minmax(0,1fr);align-items:center;overflow:hidden}.workbench-reference-asset-panel{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}.workbench-reference-asset-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.44fr) minmax(0,.56fr);overflow:hidden}.workbench-reference-asset-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.62fr) minmax(0,.38fr);overflow:hidden}.workbench-reference-cost-donut-card{container-type:size;column-gap:clamp(4px,1cqh,12px);row-gap:2px}.workbench-reference-asset-value-pill{max-height:16px;padding-top:0;padding-bottom:0;line-height:14px}.workbench-reference-project-panel{grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr)}.workbench-reference-project-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.68fr) minmax(0,.32fr);overflow:hidden}.workbench-reference-project-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.45fr) minmax(0,.28fr) minmax(0,.27fr);overflow:hidden}.workbench-reference-bid-collaboration-panel{grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto auto;gap:8px}.workbench-reference-bid-hero{min-height:72px}.workbench-reference-bid-risk-table{min-height:140px}
|
|
1
|
+
.fses-workbench-card-root{box-sizing:border-box}.workbench-card-ant-table,.workbench-card-ant-table .ant-spin-nested-loading,.workbench-card-ant-table .ant-spin-container,.workbench-card-ant-table .ant-table,.workbench-card-ant-table .ant-table-container{height:100%;min-height:0}.workbench-card-ant-table .ant-table{font-size:12px}.workbench-card-ant-table .ant-spin-container{display:grid;grid-template-rows:minmax(0,1fr) auto}.workbench-card-ant-table .ant-table-container{display:grid;grid-template-rows:auto minmax(0,1fr)}.workbench-card-ant-table .ant-pagination{box-sizing:border-box;display:flex;min-height:28px;margin:0 8px;align-items:center;justify-content:flex-end;gap:4px;border-top:1px solid var(--bl-n300-c, #e8eaed);font-size:12px}.ant-table-wrapper.workbench-card-ant-table .ant-pagination{margin:0 8px;padding:8px 0}.workbench-card-ant-table .ant-pagination-item,.workbench-card-ant-table .ant-pagination-prev,.workbench-card-ant-table .ant-pagination-next,.workbench-card-ant-table .ant-pagination-jump-prev,.workbench-card-ant-table .ant-pagination-jump-next{min-width:24px;height:24px;margin-inline-end:0;line-height:22px}.workbench-card-ant-table .ant-pagination-item{border-color:transparent;border-radius:4px;background:transparent}.workbench-card-ant-table .ant-pagination-item:hover{background:var(--bl-n200-c, #f5f6f7)}.workbench-card-ant-table .ant-pagination-item-active{border-color:transparent;background:var(--bl-brand-label, #edf1ff)}.workbench-card-ant-table .ant-pagination-item-active a{color:var(--bl-brand-c, #4c78fc);font-weight:600}.workbench-card-ant-table .ant-pagination-prev .ant-pagination-item-link,.workbench-card-ant-table .ant-pagination-next .ant-pagination-item-link{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-color:transparent;border-radius:4px;background:transparent;line-height:1}.workbench-card-ant-table .ant-pagination-prev .anticon,.workbench-card-ant-table .ant-pagination-next .anticon{display:inline-flex;margin:0;align-items:center;justify-content:center}.workbench-card-ant-table .ant-pagination-prev:not(.ant-pagination-disabled) .ant-pagination-item-link:hover,.workbench-card-ant-table .ant-pagination-next:not(.ant-pagination-disabled) .ant-pagination-item-link:hover{background:var(--bl-n200-c, #f5f6f7)}.workbench-card-ant-table .ant-pagination-options{height:24px;margin-inline-start:4px}.workbench-card-ant-table .ant-pagination-options .ant-select-selector{height:24px!important;border-color:var(--bl-n300-c, #e8eaed)!important;border-radius:4px!important;box-shadow:none!important}.workbench-card-ant-table .ant-pagination-options .ant-select-selection-item{padding-inline-end:16px;line-height:22px!important}.workbench-card-ant-table .ant-table-thead>tr>th{padding:6px 8px;color:#667085;background:#f7f8fa;border-bottom-color:#eef1f6;font-weight:600;white-space:nowrap}.workbench-card-ant-table .ant-table-tbody>tr>td{padding:6px 8px;color:#344054;border-bottom-color:#eef1f6}.workbench-card-ant-table .ant-table-body{height:auto!important;min-height:0;max-height:none!important;overflow:auto!important;scrollbar-gutter:stable;scrollbar-width:thin}.workbench-custom-canvas-page-header{box-sizing:border-box;display:grid;width:100%;height:100%;min-height:0;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;overflow:hidden;border-radius:6px}.workbench-custom-canvas-page-header__brand{display:grid;min-width:0;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;overflow:hidden}.workbench-custom-canvas-page-header__logo{width:40px;height:40px;font-size:14px}.workbench-custom-canvas-page-header__title{font-size:20px;line-height:24px}.workbench-custom-canvas-page-header__subtitle{margin-top:2px;font-size:14px;line-height:18px}.workbench-custom-canvas-page-header__actions{max-width:740px}.workbench-custom-canvas-page-header__pill{max-width:192px;padding:6px 12px;font-size:14px;line-height:18px}.workbench-custom-canvas-image{min-height:0}.workbench-image-alert-ranking-row{display:grid;min-height:28px;grid-template-columns:56px minmax(0,1fr) 48px;align-items:center;column-gap:16px}.workbench-image-alert-ranking-severity{height:24px;align-items:center;justify-content:center;line-height:1}.workbench-image-alert-ranking-title,.workbench-image-alert-ranking-time{align-self:center;line-height:20px}.workbench-image-alert-ranking-time{text-align:right}.workbench-reference-panel-header{display:grid;height:30px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;overflow:hidden}.workbench-reference-ops-panel,.workbench-reference-security-panel,.workbench-reference-asset-panel,.workbench-reference-project-panel,.workbench-reference-bid-collaboration-panel{display:grid;width:100%;height:100%;min-height:0;overflow:hidden}.workbench-reference-ops-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.workbench-reference-ops-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.58fr) minmax(0,.42fr);gap:4px;overflow:hidden}.workbench-reference-ops-right-column{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr);gap:4px;overflow:hidden}.workbench-reference-ops-service-list,.workbench-reference-ops-resource-list,.workbench-reference-ops-incident-list,.workbench-reference-ops-trend-card,.workbench-reference-security-score-card,.workbench-reference-security-score-main,.workbench-reference-security-score-metrics,.workbench-reference-security-risk-list,.workbench-reference-security-audit-list,.workbench-reference-security-account-list,.workbench-reference-security-compliance-list,.workbench-reference-asset-ledger-grid,.workbench-reference-asset-exception-list,.workbench-reference-cost-donut-card,.workbench-reference-cost-donut-ring,.workbench-reference-cost-list,.workbench-reference-project-progress-list,.workbench-reference-project-efficiency-list,.workbench-reference-project-todo-grid,.workbench-reference-project-quick-links,.workbench-reference-notice-list{min-height:0;overflow:hidden}.workbench-reference-ops-service-list{align-content:start;grid-auto-rows:minmax(16px,1fr)}.workbench-reference-ops-incident-list,.workbench-reference-security-risk-list{align-content:start;grid-auto-rows:minmax(20px,1fr)}.workbench-reference-security-audit-list,.workbench-reference-security-account-list,.workbench-reference-security-compliance-list{grid-auto-rows:minmax(24px,1fr)}.workbench-reference-security-panel{grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:6px}.workbench-reference-security-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(84px,.58fr) minmax(72px,.42fr);gap:4px;overflow:hidden}.workbench-reference-security-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,1fr);gap:4px;overflow:hidden}.workbench-reference-security-score-card{display:grid;height:100%;grid-template-columns:minmax(128px,.46fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:0}.workbench-reference-cost-donut-ring{width:min(88px,100%,calc(100cqh - 8px));height:min(88px,100%,calc(100cqh - 8px));min-width:28px;min-height:28px}.workbench-reference-security-score-ring{display:grid;width:clamp(32px,22%,76px);height:clamp(32px,22%,76px)}.workbench-reference-security-score-main{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-width:0}.workbench-reference-security-score-main strong{font-size:20px;line-height:20px}.workbench-reference-security-score-metrics{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));height:100%;min-height:0}.workbench-reference-security-score-metric{display:grid;min-width:0;grid-template-columns:auto minmax(0,1fr);align-items:center;overflow:hidden}.workbench-reference-asset-panel{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}.workbench-reference-asset-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.44fr) minmax(0,.56fr);overflow:hidden}.workbench-reference-asset-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.62fr) minmax(0,.38fr);overflow:hidden}.workbench-reference-cost-donut-card{container-type:size;column-gap:clamp(4px,1cqh,12px);row-gap:2px}.workbench-reference-asset-value-pill{max-height:16px;padding-top:0;padding-bottom:0;line-height:14px}.workbench-reference-project-panel{grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr)}.workbench-reference-project-left-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.68fr) minmax(0,.32fr);overflow:hidden}.workbench-reference-project-right-column{display:grid;min-height:0;grid-template-rows:auto minmax(0,.45fr) minmax(0,.28fr) minmax(0,.27fr);overflow:hidden}.workbench-reference-bid-collaboration-panel{grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto auto;gap:8px}.workbench-reference-bid-hero{min-height:72px}.workbench-reference-bid-risk-table{min-height:140px}
|
|
@@ -1102,11 +1102,20 @@ export interface TableRowsData {
|
|
|
1102
1102
|
shape: 'rows';
|
|
1103
1103
|
visualKind?: string;
|
|
1104
1104
|
sourceLabel?: string;
|
|
1105
|
+
dataBindingId?: string;
|
|
1106
|
+
dataBinding?: Record<string, unknown>;
|
|
1107
|
+
dataBindingStatus?: string;
|
|
1105
1108
|
columns: string[];
|
|
1106
1109
|
rows: Array<{
|
|
1107
1110
|
id: string;
|
|
1108
1111
|
cells: string[];
|
|
1109
1112
|
}>;
|
|
1113
|
+
pagination?: {
|
|
1114
|
+
pageIndex: number;
|
|
1115
|
+
pageSize: number;
|
|
1116
|
+
total: number;
|
|
1117
|
+
hasMore: boolean;
|
|
1118
|
+
};
|
|
1110
1119
|
}
|
|
1111
1120
|
export interface InsightNarrativeData {
|
|
1112
1121
|
shape: 'insightNarrative';
|
|
@@ -106,6 +106,9 @@ const {
|
|
|
106
106
|
tableRowsFallbackAntTableColumns,
|
|
107
107
|
tableRowsFallbackAntTableRows,
|
|
108
108
|
tableRowsAntTableScroll,
|
|
109
|
+
tableRowsPaginationConfig,
|
|
110
|
+
tableRowsPageLoading,
|
|
111
|
+
handleTableRowsPaginationChange,
|
|
109
112
|
handleTableRowsAntTableColumnResize,
|
|
110
113
|
formatWeatherTemp,
|
|
111
114
|
weatherIcon,
|
|
@@ -154,6 +157,7 @@ const {
|
|
|
154
157
|
rowGrid,
|
|
155
158
|
metricSummaryDisplayValue,
|
|
156
159
|
metricSummaryUnitLabel,
|
|
160
|
+
metricSummarySourceLabel,
|
|
157
161
|
imageComposeMetricSubText,
|
|
158
162
|
imageComposeMetricFooterStatus,
|
|
159
163
|
imageComposeMetricFooterMain,
|
|
@@ -548,7 +552,7 @@ const {
|
|
|
548
552
|
</div>
|
|
549
553
|
<div v-if="metricSummaryShowsChrome(effectiveBlock, effectiveData as MetricSummaryData) && !visualFor(effectiveBlock).hideMetricFooter" class="flex items-center justify-between text-xs text-slate-500">
|
|
550
554
|
<span>{{ (effectiveData as MetricSummaryData).periodLabel }}</span>
|
|
551
|
-
<span>{{ (effectiveData as MetricSummaryData)
|
|
555
|
+
<span>{{ metricSummarySourceLabel(effectiveData as MetricSummaryData & Record<string, unknown>) }}</span>
|
|
552
556
|
</div>
|
|
553
557
|
</div>
|
|
554
558
|
</template>
|
|
@@ -943,8 +947,10 @@ const {
|
|
|
943
947
|
row-key="__rowKey"
|
|
944
948
|
:columns="tableRowsPreviewAntTableColumns(effectiveBlock.id, (effectiveData as TableRowsData).columns || [])"
|
|
945
949
|
:data-source="tableRowsPreviewAntTableRows(effectiveData, (effectiveData as TableRowsData).columns || [])"
|
|
946
|
-
:pagination="
|
|
950
|
+
:pagination="tableRowsPaginationConfig(effectiveData)"
|
|
951
|
+
:loading="tableRowsPageLoading"
|
|
947
952
|
:scroll="tableRowsAntTableScroll(tableRowsPreviewAntTableColumns(effectiveBlock.id, (effectiveData as TableRowsData).columns || []))"
|
|
953
|
+
@change="handleTableRowsPaginationChange"
|
|
948
954
|
@resize-column="handleTableRowsAntTableColumnResize"
|
|
949
955
|
/>
|
|
950
956
|
</div>
|
|
@@ -956,8 +962,10 @@ const {
|
|
|
956
962
|
row-key="__rowKey"
|
|
957
963
|
:columns="tableRowsFallbackAntTableColumns(effectiveBlock.id, effectiveData as TableRowsData)"
|
|
958
964
|
:data-source="tableRowsFallbackAntTableRows(effectiveData as TableRowsData)"
|
|
959
|
-
:pagination="
|
|
965
|
+
:pagination="tableRowsPaginationConfig(effectiveData)"
|
|
966
|
+
:loading="tableRowsPageLoading"
|
|
960
967
|
:scroll="tableRowsAntTableScroll(tableRowsFallbackAntTableColumns(effectiveBlock.id, effectiveData as TableRowsData))"
|
|
968
|
+
@change="handleTableRowsPaginationChange"
|
|
961
969
|
@resize-column="handleTableRowsAntTableColumnResize"
|
|
962
970
|
/>
|
|
963
971
|
</div>
|
|
@@ -21,12 +21,19 @@ export interface WorkbenchChartQueryScope {
|
|
|
21
21
|
|
|
22
22
|
export interface WorkbenchChartQueryOptions {
|
|
23
23
|
businessWording?: string;
|
|
24
|
+
pageIndex?: number;
|
|
25
|
+
pageSize?: number;
|
|
26
|
+
needCount?: boolean;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface WorkbenchChartRefreshResult {
|
|
27
30
|
success: boolean;
|
|
28
31
|
rows?: Array<Record<string, unknown>>;
|
|
29
32
|
dataPayload?: unknown;
|
|
33
|
+
pageIndex?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
total?: number;
|
|
36
|
+
hasMore?: boolean;
|
|
30
37
|
errorCode?: string;
|
|
31
38
|
errorMessage?: string;
|
|
32
39
|
}
|
|
@@ -935,6 +935,19 @@ export function createNativeBindings(context: NativeBindingsContext) {
|
|
|
935
935
|
return unit;
|
|
936
936
|
}
|
|
937
937
|
|
|
938
|
+
/**
|
|
939
|
+
* Returns the metric source label without the platform brand name.
|
|
940
|
+
* @param data - Metric summary renderer data.
|
|
941
|
+
* @returns Source label suitable for display in a metric card footer.
|
|
942
|
+
*/
|
|
943
|
+
function metricSummarySourceLabel(data: MetricSummaryData & Record<string, unknown>): string {
|
|
944
|
+
return textValue(data.sourceLabel)
|
|
945
|
+
.replace(/百特搭\s*的?/gu, '')
|
|
946
|
+
.replace(/Baiteda(?:'s)?\s*/giu, '')
|
|
947
|
+
.replace(/\s+/gu, ' ')
|
|
948
|
+
.trim();
|
|
949
|
+
}
|
|
950
|
+
|
|
938
951
|
/**
|
|
939
952
|
* Returns the first compact secondary metric text from image-composed KPI data.
|
|
940
953
|
* @param data - Metric summary renderer data.
|
|
@@ -1087,6 +1100,7 @@ export function createNativeBindings(context: NativeBindingsContext) {
|
|
|
1087
1100
|
tableRowCells,
|
|
1088
1101
|
metricSummaryDisplayValue,
|
|
1089
1102
|
metricSummaryUnitLabel,
|
|
1103
|
+
metricSummarySourceLabel,
|
|
1090
1104
|
imageComposeMetricSubText,
|
|
1091
1105
|
imageComposeMetricFooterStatus,
|
|
1092
1106
|
imageComposeMetricFooterMain,
|
package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { getLocaleText } from '@byteluck-fe/locale-message'
|
|
|
4
4
|
* @author seadon
|
|
5
5
|
* @created 2026-05-20
|
|
6
6
|
*/
|
|
7
|
-
import { computed, h, onBeforeUnmount, reactive, watch, type CSSProperties } from 'vue';
|
|
8
|
-
import type { TableColumnsType } from 'ant-design-vue';
|
|
7
|
+
import { computed, h, onBeforeUnmount, reactive, ref, watch, type CSSProperties } from 'vue';
|
|
8
|
+
import type { TableColumnsType, TablePaginationConfig } from 'ant-design-vue';
|
|
9
9
|
import { Bot, CircleCheck, CloudRain, CloudSun, LayoutDashboard, UserRound } from 'lucide-vue-next';
|
|
10
10
|
import { workbenchCardShellStyle, workbenchShellDensityClasses } from '../shell/workbenchVisualShell';
|
|
11
11
|
import { implementedCardRegistryEntries } from '../registry';
|
|
@@ -127,6 +127,7 @@ export function useWorkbenchBlockRendererBindings(
|
|
|
127
127
|
const manualReplacementCapabilityTouched = reactive<Record<string, boolean>>({});
|
|
128
128
|
const tableRowsAntTableColumnWidths = reactive<Record<string, number>>({});
|
|
129
129
|
const tableRowsAntTableScrollFloors: Record<string, number> = {};
|
|
130
|
+
const tableRowsPageLoading = ref(false);
|
|
130
131
|
const chartRefreshRuntime = computed(() => props.hostBridge?.refreshRuntime);
|
|
131
132
|
let nativeRefreshSequence = 0;
|
|
132
133
|
let nestedRefreshSequence = 0;
|
|
@@ -618,6 +619,7 @@ export function useWorkbenchBlockRendererBindings(
|
|
|
618
619
|
tableRowCells,
|
|
619
620
|
metricSummaryDisplayValue,
|
|
620
621
|
metricSummaryUnitLabel,
|
|
622
|
+
metricSummarySourceLabel,
|
|
621
623
|
imageComposeMetricSubText,
|
|
622
624
|
imageComposeMetricFooterStatus,
|
|
623
625
|
imageComposeMetricFooterMain,
|
|
@@ -773,6 +775,76 @@ export function useWorkbenchBlockRendererBindings(
|
|
|
773
775
|
};
|
|
774
776
|
}
|
|
775
777
|
|
|
778
|
+
/**
|
|
779
|
+
* 构建明细表的受控服务端分页配置。
|
|
780
|
+
* @param data - 当前 rows renderer 数据。
|
|
781
|
+
* @returns Ant Design 分页配置;无分页元数据时保持旧卡无分页行为。
|
|
782
|
+
*/
|
|
783
|
+
function tableRowsPaginationConfig(data: DisplayBlockData | undefined): false | TablePaginationConfig {
|
|
784
|
+
if (!data || data.shape !== 'rows' || !data.pagination) return false;
|
|
785
|
+
return {
|
|
786
|
+
current: data.pagination.pageIndex,
|
|
787
|
+
pageSize: data.pagination.pageSize,
|
|
788
|
+
total: data.pagination.total,
|
|
789
|
+
showSizeChanger: true,
|
|
790
|
+
pageSizeOptions: ['10', '20', '50'],
|
|
791
|
+
showLessItems: true,
|
|
792
|
+
disabled: tableRowsPageLoading.value,
|
|
793
|
+
position: ['bottomRight'],
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* 请求并应用明细表的目标服务端分页结果。
|
|
799
|
+
* @param pagination - Ant Design Table 返回的目标页码与每页条数。
|
|
800
|
+
* @returns 分页查询完成信号。
|
|
801
|
+
*/
|
|
802
|
+
async function handleTableRowsPaginationChange(
|
|
803
|
+
pagination: Pick<TablePaginationConfig, 'current' | 'pageSize'>,
|
|
804
|
+
): Promise<void> {
|
|
805
|
+
if (tableRowsPageLoading.value) return;
|
|
806
|
+
const data = effectiveData.value;
|
|
807
|
+
if (!data || data.shape !== 'rows' || !data.pagination) return;
|
|
808
|
+
const pageIndex = pagination.current ?? data.pagination.pageIndex;
|
|
809
|
+
const pageSize = pagination.pageSize ?? data.pagination.pageSize;
|
|
810
|
+
if (pageIndex === data.pagination.pageIndex && pageSize === data.pagination.pageSize) return;
|
|
811
|
+
const refreshRuntime = props.hostBridge?.refreshRuntime;
|
|
812
|
+
const refreshApi = nativeDataBindingRefreshApi(data);
|
|
813
|
+
const bindingId = nativeDataBindingId(data);
|
|
814
|
+
const userId = currentUserId();
|
|
815
|
+
if (!refreshRuntime || !refreshApi || !bindingId || !userId) return;
|
|
816
|
+
|
|
817
|
+
tableRowsPageLoading.value = true;
|
|
818
|
+
refreshRuntime.markRefreshStatus?.(bindingId, 'running');
|
|
819
|
+
try {
|
|
820
|
+
const result = await refreshRuntime.queryDataBinding({
|
|
821
|
+
userId,
|
|
822
|
+
roleId: currentRoleId(),
|
|
823
|
+
conversationId: refreshRuntime.conversationId || refreshRuntime.currentConversationId,
|
|
824
|
+
}, refreshApi, {
|
|
825
|
+
pageIndex,
|
|
826
|
+
pageSize,
|
|
827
|
+
needCount: true,
|
|
828
|
+
});
|
|
829
|
+
refreshRuntime.applyRefreshResult?.(result);
|
|
830
|
+
if (result.success) {
|
|
831
|
+
refreshRuntime.markRefreshStatus?.(bindingId, 'ready');
|
|
832
|
+
} else {
|
|
833
|
+
refreshRuntime.markRefreshStatus?.(
|
|
834
|
+
bindingId,
|
|
835
|
+
'error',
|
|
836
|
+
result.errorMessage || result.errorCode || 'Data binding refresh failed',
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
} catch (error) {
|
|
840
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
841
|
+
refreshRuntime.markRefreshStatus?.(bindingId, 'error', message);
|
|
842
|
+
await refreshRuntime.repairDataBindings?.({ userId, roleId: currentRoleId() }, refreshApi, error);
|
|
843
|
+
} finally {
|
|
844
|
+
tableRowsPageLoading.value = false;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
776
848
|
watch(() => props.block.form, () => {
|
|
777
849
|
if (isFormBlockData(props.block.form)) formValuesByBlock[props.block.id] = { ...(props.block.form.values || {}) };
|
|
778
850
|
}, { immediate: true, deep: true });
|
|
@@ -2822,6 +2894,9 @@ export function useWorkbenchBlockRendererBindings(
|
|
|
2822
2894
|
tableRowsFallbackAntTableColumns,
|
|
2823
2895
|
tableRowsFallbackAntTableRows,
|
|
2824
2896
|
tableRowsAntTableScroll,
|
|
2897
|
+
tableRowsPaginationConfig,
|
|
2898
|
+
tableRowsPageLoading,
|
|
2899
|
+
handleTableRowsPaginationChange,
|
|
2825
2900
|
handleTableRowsAntTableColumnResize,
|
|
2826
2901
|
formatWeatherTemp,
|
|
2827
2902
|
weatherIcon,
|
|
@@ -2862,6 +2937,7 @@ export function useWorkbenchBlockRendererBindings(
|
|
|
2862
2937
|
tableRowCells,
|
|
2863
2938
|
metricSummaryDisplayValue,
|
|
2864
2939
|
metricSummaryUnitLabel,
|
|
2940
|
+
metricSummarySourceLabel,
|
|
2865
2941
|
imageComposeMetricSubText,
|
|
2866
2942
|
imageComposeMetricFooterStatus,
|
|
2867
2943
|
imageComposeMetricFooterMain,
|
|
@@ -20,11 +20,109 @@
|
|
|
20
20
|
font-size: 12px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
.workbench-card-ant-table .ant-spin-container {
|
|
24
|
+
/* 为服务端分页栏保留固定底部行,避免表格 100% 高度把分页节点裁出卡片。 */
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
.workbench-card-ant-table .ant-table-container {
|
|
24
30
|
display: grid;
|
|
25
31
|
grid-template-rows: auto minmax(0, 1fr);
|
|
26
32
|
}
|
|
27
33
|
|
|
34
|
+
.workbench-card-ant-table .ant-pagination {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
display: flex;
|
|
37
|
+
min-height: 28px;
|
|
38
|
+
margin: 0 8px;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
gap: 4px;
|
|
42
|
+
border-top: 1px solid var(--bl-n300-c, #e8eaed);
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Ant Design 的表格分页规则优先级更高,显式收紧上下外边距以保持分页栏垂直居中。 */
|
|
47
|
+
.ant-table-wrapper.workbench-card-ant-table .ant-pagination {
|
|
48
|
+
margin: 0 8px;
|
|
49
|
+
padding: 8px 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.workbench-card-ant-table .ant-pagination-item,
|
|
53
|
+
.workbench-card-ant-table .ant-pagination-prev,
|
|
54
|
+
.workbench-card-ant-table .ant-pagination-next,
|
|
55
|
+
.workbench-card-ant-table .ant-pagination-jump-prev,
|
|
56
|
+
.workbench-card-ant-table .ant-pagination-jump-next {
|
|
57
|
+
min-width: 24px;
|
|
58
|
+
height: 24px;
|
|
59
|
+
margin-inline-end: 0;
|
|
60
|
+
line-height: 22px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.workbench-card-ant-table .ant-pagination-item {
|
|
64
|
+
border-color: transparent;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
background: transparent;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.workbench-card-ant-table .ant-pagination-item:hover {
|
|
70
|
+
background: var(--bl-n200-c, #f5f6f7);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.workbench-card-ant-table .ant-pagination-item-active {
|
|
74
|
+
border-color: transparent;
|
|
75
|
+
background: var(--bl-brand-label, #edf1ff);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.workbench-card-ant-table .ant-pagination-item-active a {
|
|
79
|
+
color: var(--bl-brand-c, #4c78fc);
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.workbench-card-ant-table .ant-pagination-prev .ant-pagination-item-link,
|
|
84
|
+
.workbench-card-ant-table .ant-pagination-next .ant-pagination-item-link {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
width: 24px;
|
|
87
|
+
height: 24px;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
border-color: transparent;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
background: transparent;
|
|
93
|
+
line-height: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.workbench-card-ant-table .ant-pagination-prev .anticon,
|
|
97
|
+
.workbench-card-ant-table .ant-pagination-next .anticon {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
margin: 0;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.workbench-card-ant-table .ant-pagination-prev:not(.ant-pagination-disabled) .ant-pagination-item-link:hover,
|
|
105
|
+
.workbench-card-ant-table .ant-pagination-next:not(.ant-pagination-disabled) .ant-pagination-item-link:hover {
|
|
106
|
+
background: var(--bl-n200-c, #f5f6f7);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.workbench-card-ant-table .ant-pagination-options {
|
|
110
|
+
height: 24px;
|
|
111
|
+
margin-inline-start: 4px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.workbench-card-ant-table .ant-pagination-options .ant-select-selector {
|
|
115
|
+
height: 24px !important;
|
|
116
|
+
border-color: var(--bl-n300-c, #e8eaed) !important;
|
|
117
|
+
border-radius: 4px !important;
|
|
118
|
+
box-shadow: none !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.workbench-card-ant-table .ant-pagination-options .ant-select-selection-item {
|
|
122
|
+
padding-inline-end: 16px;
|
|
123
|
+
line-height: 22px !important;
|
|
124
|
+
}
|
|
125
|
+
|
|
28
126
|
.workbench-card-ant-table .ant-table-thead > tr > th {
|
|
29
127
|
padding: 6px 8px;
|
|
30
128
|
color: #667085;
|
|
@@ -1376,11 +1376,20 @@ export interface TableRowsData {
|
|
|
1376
1376
|
shape: 'rows';
|
|
1377
1377
|
visualKind?: string;
|
|
1378
1378
|
sourceLabel?: string;
|
|
1379
|
+
dataBindingId?: string;
|
|
1380
|
+
dataBinding?: Record<string, unknown>;
|
|
1381
|
+
dataBindingStatus?: string;
|
|
1379
1382
|
columns: string[];
|
|
1380
1383
|
rows: Array<{
|
|
1381
1384
|
id: string;
|
|
1382
1385
|
cells: string[];
|
|
1383
1386
|
}>;
|
|
1387
|
+
pagination?: {
|
|
1388
|
+
pageIndex: number;
|
|
1389
|
+
pageSize: number;
|
|
1390
|
+
total: number;
|
|
1391
|
+
hasMore: boolean;
|
|
1392
|
+
};
|
|
1384
1393
|
}
|
|
1385
1394
|
|
|
1386
1395
|
export interface InsightNarrativeData {
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@byteluck-fe/workbench-template": "0.1.1",
|
|
12
12
|
"@byteluck/agentic-protocol": "2.2.1",
|
|
13
13
|
"@byteluck/workbench-skill-contracts": "0.1.0",
|
|
14
|
-
"@fses/ai-chat": "
|
|
15
|
-
"@fses/workbench-card": "0.
|
|
14
|
+
"@fses/ai-chat": "2.0.1",
|
|
15
|
+
"@fses/workbench-card": "0.4.1",
|
|
16
16
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
17
17
|
"axios": "^1.15.0",
|
|
18
18
|
"clsx": "^2.1.1",
|
|
@@ -151,5 +151,5 @@
|
|
|
151
151
|
},
|
|
152
152
|
"type": "module",
|
|
153
153
|
"types": "./dist/index.d.ts",
|
|
154
|
-
"version": "0.
|
|
154
|
+
"version": "0.3.1"
|
|
155
155
|
}
|