foggy-data-viewer 1.0.1-beta.22 → 1.0.1-beta.23
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/README.md +6 -6
- package/dist/__fixtures__/pivot/soaCandidatePivot.d.ts +2 -0
- package/dist/__fixtures__/pivot/soaCandidatePivotRaw.d.ts +2 -0
- package/dist/api/viewer.d.ts +1 -0
- package/dist/components/DataTable.vue.d.ts +8 -1
- package/dist/components/DataTableWithSearch.vue.d.ts +3 -1
- package/dist/components/PivotAxisPager.vue.d.ts +14 -0
- package/dist/components/PivotEvidencePanel.vue.d.ts +12 -0
- package/dist/components/PivotGrid.vue.d.ts +25 -0
- package/dist/components/PivotRawViewer.vue.d.ts +31 -0
- package/dist/components/PivotViewer.vue.d.ts +31 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +3442 -2863
- package/dist/index.umd +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/types/pivot.d.ts +80 -0
- package/dist/utils/pivotHeaderTree.d.ts +30 -0
- package/dist/utils/pivotViewModelAdapter.d.ts +3 -0
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ function handlePageChange(page: number, pageSize: number) {
|
|
|
110
110
|
|------|------|------|
|
|
111
111
|
| **DataTable** | 基础数据表格组件(表头过滤器、分页、排序、汇总) | [见下方 API](#datatable-props) |
|
|
112
112
|
| **SearchToolbar** | 独立搜索工具栏组件(字段级快速筛选) | [完整文档](./docs/SearchToolbar.md) |
|
|
113
|
-
| **DataTableWithSearch** | 组合组件(SearchToolbar + DataTable + 属性透传,支持 queryMode 查询入口模式) | [完整文档](./docs/SearchToolbar.md#datatablewithsearch-使用) |
|
|
113
|
+
| **DataTableWithSearch** | 组合组件(SearchToolbar + DataTable + 属性透传,支持 queryMode 查询入口模式) | [完整文档](./docs/SearchToolbar.md#datatablewithsearch-使用) |
|
|
114
114
|
| **DataViewer** | 高层封装组件(集成 API 调用、元数据管理) | 待完善 |
|
|
115
115
|
|
|
116
116
|
### 工具函数
|
|
@@ -237,11 +237,11 @@ npm test
|
|
|
237
237
|
# 测试覆盖率
|
|
238
238
|
npm run test:coverage
|
|
239
239
|
|
|
240
|
-
# 构建发布包(库产物 + 类型声明 + 入口校验)
|
|
241
|
-
npm run build
|
|
242
|
-
|
|
243
|
-
# 构建内嵌应用静态资源
|
|
244
|
-
npm run build:app
|
|
240
|
+
# 构建发布包(库产物 + 类型声明 + 入口校验)
|
|
241
|
+
npm run build
|
|
242
|
+
|
|
243
|
+
# 构建内嵌应用静态资源
|
|
244
|
+
npm run build:app
|
|
245
245
|
```
|
|
246
246
|
|
|
247
247
|
## 测试
|
package/dist/api/viewer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VxeGridInstance } from 'vxe-table';
|
|
2
|
-
import type { EnhancedColumnSchema, SliceRequestDef, FilterOption, CellCopyConfig } from '@/types';
|
|
2
|
+
import type { EnhancedColumnSchema, SliceRequestDef, FilterOption, CellCopyConfig, MemberQueryRequest, MemberQueryResponse, TableDensity } from '@/types';
|
|
3
3
|
/**
|
|
4
4
|
* DataTable 组件属性
|
|
5
5
|
*
|
|
@@ -32,10 +32,16 @@ interface Props {
|
|
|
32
32
|
serverSummary?: Record<string, unknown> | null;
|
|
33
33
|
/** 过滤选项加载器(用于维度列) */
|
|
34
34
|
filterOptionsLoader?: (columnName: string) => Promise<FilterOption[]>;
|
|
35
|
+
/** 远程维度成员加载器(优先于 filterOptionsLoader) */
|
|
36
|
+
filterMemberLoader?: (request: MemberQueryRequest) => Promise<MemberQueryResponse>;
|
|
37
|
+
/** QM 模型名称(远程成员加载所需) */
|
|
38
|
+
qmModel?: string;
|
|
35
39
|
/** 自定义过滤器组件映射 */
|
|
36
40
|
customFilterComponents?: Record<string, unknown>;
|
|
37
41
|
/** 普通单元格悬浮复制配置 */
|
|
38
42
|
cellCopy?: CellCopyConfig;
|
|
43
|
+
/** 表格视觉密度 */
|
|
44
|
+
density?: TableDensity;
|
|
39
45
|
}
|
|
40
46
|
type __VLS_Slots = {
|
|
41
47
|
/** 表格上方工具栏 */
|
|
@@ -98,6 +104,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
98
104
|
pageSize: number;
|
|
99
105
|
showFilters: boolean;
|
|
100
106
|
showPager: boolean;
|
|
107
|
+
density: TableDensity;
|
|
101
108
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
102
109
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
103
110
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnhancedColumnSchema, SliceRequestDef, FilterOption, TableSchema, FetchDataParams, FetchDataResult, OrderRequestDef, QueryHooks, MemberQueryRequest, MemberQueryResponse, CellCopyConfig, QueryMode, ListViewState, ListPresetConfig } from '@/types';
|
|
1
|
+
import type { EnhancedColumnSchema, SliceRequestDef, FilterOption, TableSchema, FetchDataParams, FetchDataResult, OrderRequestDef, QueryHooks, MemberQueryRequest, MemberQueryResponse, CellCopyConfig, QueryMode, ListViewState, ListPresetConfig, TableDensity } from '@/types';
|
|
2
2
|
import type { QueryPanelExpose, QuerySchema } from './QueryPanel.vue';
|
|
3
3
|
/**
|
|
4
4
|
* DataTableWithSearch 组件
|
|
@@ -38,6 +38,8 @@ interface Props {
|
|
|
38
38
|
cellCopy?: CellCopyConfig;
|
|
39
39
|
/** 内置查询入口模式;设置后优先于 showQueryPanel/showFilters */
|
|
40
40
|
queryMode?: QueryMode;
|
|
41
|
+
/** 表格视觉密度 */
|
|
42
|
+
density?: TableDensity;
|
|
41
43
|
/** 搜索工具栏可搜索字段 */
|
|
42
44
|
searchableFields?: string[];
|
|
43
45
|
/** 搜索工具栏布局 */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PivotAxisField, PivotAxisPage } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
rowAxes?: PivotAxisField[];
|
|
4
|
+
columnAxes?: PivotAxisField[];
|
|
5
|
+
rowPages?: PivotAxisPage[];
|
|
6
|
+
columnPages?: PivotAxisPage[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
9
|
+
rowAxes: PivotAxisField[];
|
|
10
|
+
columnAxes: PivotAxisField[];
|
|
11
|
+
rowPages: PivotAxisPage[];
|
|
12
|
+
columnPages: PivotAxisPage[];
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PivotAxisField } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
evidence?: Record<string, unknown>;
|
|
4
|
+
rowAxes?: PivotAxisField[];
|
|
5
|
+
columnAxes?: PivotAxisField[];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
rowAxes: PivotAxisField[];
|
|
9
|
+
columnAxes: PivotAxisField[];
|
|
10
|
+
evidence: Record<string, unknown>;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PivotViewModel } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
viewModel: PivotViewModel;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
emptyText?: string;
|
|
7
|
+
emptyCellText?: string;
|
|
8
|
+
}
|
|
9
|
+
declare var __VLS_5: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
empty?: (props: typeof __VLS_5) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
+
loading: boolean;
|
|
15
|
+
height: string | number;
|
|
16
|
+
emptyText: string;
|
|
17
|
+
emptyCellText: string;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PivotRawPayload } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
rawPayload: PivotRawPayload;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
error?: string | null;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
emptyText?: string;
|
|
8
|
+
emptyCellText?: string;
|
|
9
|
+
showAxisPager?: boolean;
|
|
10
|
+
showEvidence?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_5: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
empty?: (props: typeof __VLS_5) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
+
error: string | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
height: string | number;
|
|
20
|
+
emptyText: string;
|
|
21
|
+
emptyCellText: string;
|
|
22
|
+
showAxisPager: boolean;
|
|
23
|
+
showEvidence: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PivotViewModel } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
viewModel: PivotViewModel;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
error?: string | null;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
emptyText?: string;
|
|
8
|
+
emptyCellText?: string;
|
|
9
|
+
showAxisPager?: boolean;
|
|
10
|
+
showEvidence?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_7: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
empty?: (props: typeof __VLS_7) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
+
error: string | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
height: string | number;
|
|
20
|
+
emptyText: string;
|
|
21
|
+
emptyCellText: string;
|
|
22
|
+
showAxisPager: boolean;
|
|
23
|
+
showEvidence: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,24 @@ export { default as DataViewer } from './components/DataViewer.vue';
|
|
|
6
6
|
export { default as SearchToolbar } from './components/SearchToolbar.vue';
|
|
7
7
|
export { default as DataTableWithSearch } from './components/DataTableWithSearch.vue';
|
|
8
8
|
export { default as QueryPanel } from './components/QueryPanel.vue';
|
|
9
|
+
export { default as PivotViewer } from './components/PivotViewer.vue';
|
|
10
|
+
export { default as PivotRawViewer } from './components/PivotRawViewer.vue';
|
|
11
|
+
export { default as PivotGrid } from './components/PivotGrid.vue';
|
|
12
|
+
export { default as PivotAxisPager } from './components/PivotAxisPager.vue';
|
|
13
|
+
export { default as PivotEvidencePanel } from './components/PivotEvidencePanel.vue';
|
|
9
14
|
export { default as ListPresetManager } from './components/list-preset/ListPresetManager.vue';
|
|
10
15
|
export type { QueryFieldSchema, QueryPanelLayoutSchema, QueryPanelExpose, QuerySchema } from './components/QueryPanel.vue';
|
|
11
16
|
export * from './components/filters';
|
|
12
17
|
export * from './components/saved-query';
|
|
13
18
|
export * from './components/composables';
|
|
14
19
|
export { buildTableColumns, calculateColumnWidth } from './utils/schemaHelper';
|
|
20
|
+
export { buildPivotGridColumns, flattenPivotLeafNodes, validatePivotHeaderTree } from './utils/pivotHeaderTree';
|
|
21
|
+
export { buildPivotCellField, toPivotViewModel } from './utils/pivotViewModelAdapter';
|
|
22
|
+
export type { BuildPivotGridColumnsOptions, PivotGridColumn, PivotHeaderValidationResult } from './utils/pivotHeaderTree';
|
|
15
23
|
export { createQuery, fetchQueryMeta, fetchQueryData, fetchFilterOptions, fetchQmSchema, fetchQueryDataDirect, fetchFrontendMeta, fetchMemberOptions } from './api/viewer';
|
|
16
24
|
export type { QueryPayload, CreateQueryRequest, CreateQueryResponse } from './api/viewer';
|
|
17
25
|
export { saveQuery, listSavedQueries, getSavedQuery, updateSavedQuery, deleteSavedQuery, applySavedQuery } from './api/savedQuery';
|
|
18
26
|
export type { SavedQueryDef, SaveQueryRequest, QueryVisibility } from './api/savedQuery';
|
|
19
27
|
export { listPresets, getDefaultListPreset, createListPreset, getListPreset, updateListPreset, deleteListPreset, setDefaultListPreset, clearDefaultListPreset } from './api/listPreset';
|
|
20
28
|
export type { ListPresetScope, SaveListPresetRequest, UpdateListPresetRequest } from './api/listPreset';
|
|
21
|
-
export type { ColumnSchema, EnhancedColumnSchema, TableConfig, TableSchema, CellCopyConfig, QueryMode, ColumnCustomization, QueryMetaResponse, ViewerQueryRequest, ViewerDataResponse, SliceRequestDef, OrderRequestDef, FilterOption, FetchDataParams, FetchDataResult, FetchDataFn, DictItem, PaginationState, SortState, QueryHooks, QueryHookContext, QueryTrigger, QueryHookName, BeforeQueryHookFn, AfterQueryHookFn, ErrorQueryHookFn, MaybePromise, ListPresetVisibility, ListPresetPlacement, ListPresetConfig, ColumnViewSetting, QueryConditionPreset, ListViewState, ListPresetDef, FrontendMeta, FieldMeta, FieldCategory, MemberLookupMeta, UiHintsMeta, DefaultsMeta, CapabilitiesMeta, ParamsMeta, MemberQueryRequest, MemberOption, MemberQueryResponse } from './types';
|
|
29
|
+
export type { ColumnSchema, EnhancedColumnSchema, TableConfig, TableSchema, CellCopyConfig, QueryMode, ColumnCustomization, QueryMetaResponse, ViewerQueryRequest, ViewerDataResponse, SliceRequestDef, OrderRequestDef, FilterOption, FetchDataParams, FetchDataResult, FetchDataFn, DictItem, PaginationState, SortState, QueryHooks, QueryHookContext, QueryTrigger, QueryHookName, BeforeQueryHookFn, AfterQueryHookFn, ErrorQueryHookFn, MaybePromise, PivotAxisField, PivotAxisPage, PivotAxisPageScope, PivotAxisRole, PivotHeaderNode, PivotHeaderRole, PivotMetric, PivotRawAxisMember, PivotRawCell, PivotRawPayload, PivotShape, PivotViewMode, PivotViewModel, ListPresetVisibility, ListPresetPlacement, ListPresetConfig, ColumnViewSetting, QueryConditionPreset, ListViewState, ListPresetDef, FrontendMeta, FieldMeta, FieldCategory, MemberLookupMeta, UiHintsMeta, DefaultsMeta, CapabilitiesMeta, ParamsMeta, MemberQueryRequest, MemberOption, MemberQueryResponse } from './types';
|