foggy-data-viewer 1.0.1-beta.47 → 1.0.1-beta.49
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 +9 -5
- package/dist/components/DataTable.vue.d.ts +1 -1
- package/dist/components/DataTableWithSearch.vue.d.ts +9 -0
- package/dist/components/composables/useTableQuery.d.ts +1 -0
- package/dist/components/list-preset/ListPresetConditionEditor.vue.d.ts +24 -0
- package/dist/components/list-preset/ListPresetManager.vue.d.ts +8 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3764 -3222
- package/dist/index.umd +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +14 -1
- package/dist/utils/listPreset.d.ts +33 -0
- package/docs/http-auth.md +123 -123
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Foggy Data Viewer
|
|
2
2
|
|
|
3
|
-
一个基于 Vue 3 + TypeScript + vxe-table 的企业级数据表格组件库。
|
|
4
|
-
|
|
5
|
-
HTTP 鉴权接入(beta.47 起):从公共入口导入 `configureDataViewerHttp`,在应用挂载前配置动态 `getHeaders` 和 `onUnauthorized`。允许先导入 SDK 再配置,无需 patch Axios,也无需修改 generated 文件。详见 [HTTP 接入与 TMS 迁移指南](./docs/http-auth.md)。
|
|
3
|
+
一个基于 Vue 3 + TypeScript + vxe-table 的企业级数据表格组件库。
|
|
4
|
+
|
|
5
|
+
HTTP 鉴权接入(beta.47 起):从公共入口导入 `configureDataViewerHttp`,在应用挂载前配置动态 `getHeaders` 和 `onUnauthorized`。允许先导入 SDK 再配置,无需 patch Axios,也无需修改 generated 文件。详见 [HTTP 接入与 TMS 迁移指南](./docs/http-auth.md)。
|
|
6
6
|
|
|
7
7
|
## 特性
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ HTTP 鉴权接入(beta.47 起):从公共入口导入 `configureDataViewerH
|
|
|
18
18
|
## 安装
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npm install foggy-data-viewer
|
|
21
|
+
npm install foggy-data-viewer
|
|
22
22
|
# 或
|
|
23
23
|
yarn add foggy-data-viewer
|
|
24
24
|
# 或
|
|
@@ -184,7 +184,11 @@ const amountField = {
|
|
|
184
184
|
/>
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
后端可通过 `foggy.data-viewer.table-defaults.system/tenants/roles` 配置 fallback;用户默认配置仍可通过 `listPreset`
|
|
187
|
+
后端可通过 `foggy.data-viewer.table-defaults.system/tenants/roles` 配置 fallback;用户默认配置仍可通过 `listPreset` 覆盖。
|
|
188
|
+
|
|
189
|
+
从 `1.0.1-beta.49` 起,`requiredFields` / `requiredRuntimeColumns` 仅声明执行依赖:请求字段为用户选择 U 与依赖 R 的并集。用户主动选择的 U∩R 正常展示、保存并计入 50 字段额度;隐式补入的 R\\U 不自动展示、不保存、不占用户额度。永久隐藏的系统字段应使用独立元数据规则,不能由 required 推断。旧 `internalFields` 额度豁免选项不再生效。
|
|
190
|
+
|
|
191
|
+
恢复方案中的维度 ID 时,`SelectFilter` 会通过当前 `filterMemberLoader` 主动回填名称,无需打开下拉。成员接口应在 `selectedItems` 返回不在当前分页内的已选成员;回填不改变 DSL 值或触发额外筛选/主表请求。
|
|
188
192
|
|
|
189
193
|
### DataTable Events
|
|
190
194
|
|
|
@@ -121,10 +121,10 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
121
121
|
"onCheckbox-change"?: (rows: Record<string, unknown>[]) => any;
|
|
122
122
|
"onCheckbox-all"?: (rows: Record<string, unknown>[]) => any;
|
|
123
123
|
}>, {
|
|
124
|
+
pageSize: number;
|
|
124
125
|
backgroundLoading: boolean;
|
|
125
126
|
backgroundLoadingText: string;
|
|
126
127
|
backgroundLoadingError: string | null;
|
|
127
|
-
pageSize: number;
|
|
128
128
|
showFilters: boolean;
|
|
129
129
|
showPager: boolean;
|
|
130
130
|
localFilter: boolean;
|
|
@@ -12,6 +12,10 @@ interface Props {
|
|
|
12
12
|
schema?: TableSchema;
|
|
13
13
|
/** 数据加载函数 */
|
|
14
14
|
fetchData?: (params: FetchDataParams) => Promise<FetchDataResult>;
|
|
15
|
+
/** 执行依赖;隐式补入不展示/保存,用户主动选择时正常展示/保存。 */
|
|
16
|
+
requiredFields?: string[];
|
|
17
|
+
/** 执行依赖,与 requiredFields 同义,不限制用户选择。 */
|
|
18
|
+
requiredRuntimeColumns?: string[];
|
|
15
19
|
/** 列配置 */
|
|
16
20
|
columns?: EnhancedColumnSchema[];
|
|
17
21
|
/** 表格数据 */
|
|
@@ -102,6 +106,7 @@ declare function resetQueryPanel(): void;
|
|
|
102
106
|
declare function getListViewState(): ListViewState;
|
|
103
107
|
declare function applyListViewState(state: ListViewState, options?: {
|
|
104
108
|
reload?: boolean;
|
|
109
|
+
validateLimits?: boolean;
|
|
105
110
|
}): void;
|
|
106
111
|
declare function resetListViewState(options?: {
|
|
107
112
|
reload?: boolean;
|
|
@@ -151,6 +156,10 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
151
156
|
value?: unknown;
|
|
152
157
|
link?: 1 | 2;
|
|
153
158
|
children?: /*elided*/ any[];
|
|
159
|
+
$or?: /*elided*/ any[];
|
|
160
|
+
$and?: /*elided*/ any[];
|
|
161
|
+
$expr?: string;
|
|
162
|
+
maxDepth?: number;
|
|
154
163
|
}[];
|
|
155
164
|
/** 重置分页 */
|
|
156
165
|
resetPagination: () => void;
|
|
@@ -18,6 +18,7 @@ export interface UseTableQueryReturn {
|
|
|
18
18
|
loading: ReturnType<typeof ref<boolean>>;
|
|
19
19
|
activeTrigger: ReturnType<typeof ref<QueryTrigger | null>>;
|
|
20
20
|
lastError: ReturnType<typeof ref<Error | null>>;
|
|
21
|
+
lastOutcome: ReturnType<typeof ref<'success' | 'cancelled' | 'error' | null>>;
|
|
21
22
|
serverSummary: ReturnType<typeof ref<Record<string, unknown> | null>>;
|
|
22
23
|
currentPage: ReturnType<typeof ref<number>>;
|
|
23
24
|
currentPageSize: ReturnType<typeof ref<number>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ColumnSchema, SliceRequestDef, MemberQueryRequest, MemberQueryResponse } from '@/types';
|
|
2
|
+
interface Props {
|
|
3
|
+
modelValue?: SliceRequestDef[];
|
|
4
|
+
columns: ColumnSchema[];
|
|
5
|
+
maxConditions?: number;
|
|
6
|
+
showToolbar?: boolean;
|
|
7
|
+
pathLabel?: string;
|
|
8
|
+
/** Leaf conditions outside this recursive subtree. */
|
|
9
|
+
conditionOffset?: number;
|
|
10
|
+
qmModel?: string;
|
|
11
|
+
filterMemberLoader?: (request: MemberQueryRequest) => Promise<MemberQueryResponse>;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:modelValue": (value: SliceRequestDef[]) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: (value: SliceRequestDef[]) => any;
|
|
17
|
+
}>, {
|
|
18
|
+
modelValue: SliceRequestDef[];
|
|
19
|
+
maxConditions: number;
|
|
20
|
+
showToolbar: boolean;
|
|
21
|
+
pathLabel: string;
|
|
22
|
+
conditionOffset: number;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import type { EnhancedColumnSchema, ListPresetConfig, ListPresetDef, ListPresetVisibility, ListViewState } from '@/types';
|
|
1
|
+
import type { EnhancedColumnSchema, ListPresetConfig, ListPresetDef, ListPresetVisibility, ListViewState, MemberQueryRequest, MemberQueryResponse } from '@/types';
|
|
2
2
|
interface Props {
|
|
3
3
|
config: ListPresetConfig;
|
|
4
4
|
getState: () => ListViewState;
|
|
5
5
|
applyState: (state: ListViewState, options?: {
|
|
6
6
|
reload?: boolean;
|
|
7
|
+
validateLimits?: boolean;
|
|
7
8
|
}) => void;
|
|
8
9
|
reload?: () => void | Promise<void>;
|
|
9
10
|
clearConditions?: () => void | Promise<void>;
|
|
10
11
|
availableColumns?: EnhancedColumnSchema[];
|
|
11
12
|
lockedColumns?: string[];
|
|
13
|
+
/** @deprecated Execution dependencies belong to the query layer; never filter presets. */
|
|
12
14
|
requiredRuntimeColumns?: string[];
|
|
15
|
+
filterMemberLoader?: (request: MemberQueryRequest) => Promise<MemberQueryResponse>;
|
|
13
16
|
triggerMode?: 'button' | 'none';
|
|
14
17
|
}
|
|
15
18
|
type MoveEdge = 'top' | 'bottom';
|
|
@@ -90,6 +93,10 @@ declare const _default: import("vue").DefineComponent<Props, {
|
|
|
90
93
|
value?: unknown;
|
|
91
94
|
link?: 1 | 2;
|
|
92
95
|
children?: /*elided*/ any[];
|
|
96
|
+
$or?: /*elided*/ any[];
|
|
97
|
+
$and?: /*elided*/ any[];
|
|
98
|
+
$expr?: string;
|
|
99
|
+
maxDepth?: number;
|
|
93
100
|
}[];
|
|
94
101
|
orderBy: {
|
|
95
102
|
field: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,10 +12,12 @@ export { default as PivotGrid } from './components/PivotGrid.vue';
|
|
|
12
12
|
export { default as PivotAxisPager } from './components/PivotAxisPager.vue';
|
|
13
13
|
export { default as PivotEvidencePanel } from './components/PivotEvidencePanel.vue';
|
|
14
14
|
export { default as ListPresetManager } from './components/list-preset/ListPresetManager.vue';
|
|
15
|
+
export { default as ListPresetConditionEditor } from './components/list-preset/ListPresetConditionEditor.vue';
|
|
15
16
|
export type { QueryFieldSchema, QueryPanelLayoutSchema, QueryPanelExpose, QuerySchema } from './components/QueryPanel.vue';
|
|
16
17
|
export * from './components/filters';
|
|
17
18
|
export * from './components/composables';
|
|
18
19
|
export { buildTableColumns, calculateColumnWidth } from './utils/schemaHelper';
|
|
20
|
+
export { MAX_LIST_PRESET_FIELDS, MAX_LIST_PRESET_CONDITIONS, countConditionLeaves, cloneSliceTree, getConditionFields, getListPresetFieldCount, getListPresetLimitResult, validateListPresetLimits, getUserConfigurableColumns, getDisplayColumnForCondition, getQueryFieldForColumn } from './utils/listPreset';
|
|
19
21
|
export { MONEY_VIEWER, formatViewerValue, getColumnMoneyViewer, resolveMoneyViewer, viewerSlicesToDisplay, viewerSlicesToRaw } from './utils/viewer';
|
|
20
22
|
export { buildPivotGridColumns, flattenPivotLeafNodes, validatePivotHeaderTree } from './utils/pivotHeaderTree';
|
|
21
23
|
export { buildPivotCellField, toPivotViewModel } from './utils/pivotViewModelAdapter';
|