@byteluck-fe/runtime-engine 7.0.0-beta.21 → 7.0.0-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/dist/runtime-engine.js +612 -594
- package/dist/src/entry_desktop/controls/rok-grid-table/detailGridPaginationMount.d.ts +5 -0
- package/dist/src/entry_desktop/controls/rok-grid-table/detailPaginationSyncBus.d.ts +13 -0
- package/dist/src/entry_desktop/controls/rok-grid-table/hooks/useColumns.d.ts +14 -5
- package/dist/src/hooks/controls/chart/useChart.d.ts +3 -1
- package/dist/src/hooks/controls/listView/useListRows.d.ts +6 -1
- package/dist/src/hooks/controls/listView/useModel.d.ts +4 -0
- package/dist/src/services/services.auto.d.ts +18 -0
- package/dist/src/utils/controls/gridColumnRuntimeControl.d.ts +13 -0
- package/dist/src/utils/controls/index.d.ts +1 -0
- package/dist/src/utils/controls/masterDetailHeaders.d.ts +15 -0
- package/dist/src/utils/controls/portalHome.d.ts +7 -0
- package/dist/src/utils/controls/richText.d.ts +3 -0
- package/dist/src/utils/controls/treeGroupHeader.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GridApi } from '@ag-grid-community/core';
|
|
2
|
+
|
|
3
|
+
/** Master/Detail 嵌套网格:挂载与主表一致的 Ant Pagination */
|
|
4
|
+
export declare function mountMasterDetailAntPagination(api: GridApi<any>): void;
|
|
5
|
+
export declare function unmountMasterDetailAntPagination(api: GridApi<any>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GridApi } from '@ag-grid-community/core';
|
|
2
|
+
|
|
3
|
+
export type DetailPaginationMeta = {
|
|
4
|
+
current: number;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
total: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function registerDetailPaginationUISync(api: GridApi<any>, sync: () => void): void;
|
|
9
|
+
export declare function unregisterDetailPaginationUISync(api: GridApi<any>): void;
|
|
10
|
+
export declare function setDetailPaginationMeta(api: GridApi<any>, meta: Partial<DetailPaginationMeta>): void;
|
|
11
|
+
export declare function getDetailPaginationMeta(api: GridApi<any>): DetailPaginationMeta | undefined;
|
|
12
|
+
/** 服务端分页回调更新 total 等后刷新 Ant Pagination 展示 */
|
|
13
|
+
export declare function notifyDetailPaginationUISync(api: GridApi<any>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef, Ref, ShallowRef } from 'vue';
|
|
1
|
+
import { ComputedRef, Ref, ShallowRef, MaybeRef } from 'vue';
|
|
2
2
|
import { ControlRuntimeInstance } from '@byteluck-fe/model-driven-core-all';
|
|
3
3
|
import { DragStoppedEvent, GridApi, ColDef, ColumnResizedEvent } from '@ag-grid-community/core';
|
|
4
4
|
|
|
@@ -8,6 +8,10 @@ import { DragStoppedEvent, GridApi, ColDef, ColumnResizedEvent } from '@ag-grid-
|
|
|
8
8
|
interface ExtendedColDef extends ColDef {
|
|
9
9
|
children?: ExtendedColDef[];
|
|
10
10
|
}
|
|
11
|
+
type ColumnBuildOptions = {
|
|
12
|
+
headers?: any[];
|
|
13
|
+
isDetail?: boolean;
|
|
14
|
+
};
|
|
11
15
|
export declare function useColumns(params: {
|
|
12
16
|
instance: ControlRuntimeInstance<'grid-table'> | ComputedRef<ControlRuntimeInstance<'grid-table'>>;
|
|
13
17
|
isShowSelection?: ComputedRef<boolean>;
|
|
@@ -16,6 +20,14 @@ export declare function useColumns(params: {
|
|
|
16
20
|
isShowJoinRelation?: boolean;
|
|
17
21
|
isMuitiSelection?: ComputedRef<boolean>;
|
|
18
22
|
isShowCustomColumns?: ComputedRef<boolean>;
|
|
23
|
+
/** 与 rok-list-view 的 :control 一致,用于读取 isMasterDetail / masterDetail(勿仅依赖 instance.parent) */
|
|
24
|
+
listViewControl?: MaybeRef<ControlRuntimeInstance<'list-view'> | undefined>;
|
|
25
|
+
/** 主表 reactive gridInterface,子表同步 defaultColDef / overlay 等 */
|
|
26
|
+
gridInterface?: Record<string, unknown>;
|
|
27
|
+
/** 与主表一致的行高、表头高 */
|
|
28
|
+
detailRowHeight?: MaybeRef<number | undefined>;
|
|
29
|
+
/** 主表 ag-grid 的 context(含 engineId、exposeParams),子表 Header/Cell 依赖;在 setup 稍后赋值 */
|
|
30
|
+
masterGridAgContext?: ShallowRef<Record<string, unknown> | null>;
|
|
19
31
|
}): {
|
|
20
32
|
columns: ShallowRef<ColDef<any, any>[]>;
|
|
21
33
|
detailCellRendererParams: Ref<any>;
|
|
@@ -29,10 +41,7 @@ export declare function useColumns(params: {
|
|
|
29
41
|
viewConfigs: ComputedRef<ViewConfigType>;
|
|
30
42
|
customColumns: ShallowRef<any>;
|
|
31
43
|
fullColumns: any[];
|
|
32
|
-
getColumns: (viewFieldCode?: string[], type?: 'reset', options?:
|
|
33
|
-
headers: any[];
|
|
34
|
-
isDetail: boolean;
|
|
35
|
-
} | undefined) => Promise<void>;
|
|
44
|
+
getColumns: (viewFieldCode?: string[], type?: 'reset', options?: ColumnBuildOptions) => Promise<ColDef<any, any>[] | undefined>;
|
|
36
45
|
groupDefaultExpanded: ComputedRef<0 | -1>;
|
|
37
46
|
autoGroupColumnDef: ComputedRef<any>;
|
|
38
47
|
isTreeData: ComputedRef<boolean | undefined>;
|
|
@@ -2,9 +2,11 @@ import { Ref, ShallowRef, ComputedRef } from 'vue';
|
|
|
2
2
|
import { PropsInstanceType } from '../../../constant';
|
|
3
3
|
|
|
4
4
|
type ChartProps = PropsInstanceType<'bar-chart'> | PropsInstanceType<'line-chart'> | PropsInstanceType<'pie-chart'>;
|
|
5
|
-
|
|
5
|
+
type ChartOptionEnhancer = (option: Record<string, any>) => Record<string, any>;
|
|
6
|
+
export declare function useChart(props: ChartProps, defaultTemplate: string, enhanceChartOption?: ChartOptionEnhancer): {
|
|
6
7
|
formItemRef: ShallowRef<null>;
|
|
7
8
|
chartRef: Ref<HTMLDivElement | null>;
|
|
9
|
+
chartOption: ComputedRef<Record<string, any>>;
|
|
8
10
|
renderError: Ref<string>;
|
|
9
11
|
formItemInstanceProps: ComputedRef<{
|
|
10
12
|
caption: any;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ControlRuntimeInstance } from '@byteluck-fe/model-driven-core-all';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 嵌套子表:设计器列 field_code(如 num1)与 nest 接口 rows_header(如 num)不一致时,从别名/去尾数字段补值。
|
|
5
|
+
* 同时写入顶层与 data_value_map,保证 valueGetter 与 CellRendererFramework 一致。
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyDetailRowFieldAliasesFromHeaders(rows: any[], headersFlat: any[]): void;
|
|
3
8
|
export declare function useListRows(gridInstance: ControlRuntimeInstance<'grid-table'> | any): {
|
|
4
|
-
getRowsFromResult: (result: any, blListViewData?: any, type?: string) =>
|
|
9
|
+
getRowsFromResult: (result: any, blListViewData?: any, type?: string, headersOverride?: any[]) => {}[];
|
|
5
10
|
};
|
|
@@ -48,6 +48,10 @@ export declare function useListViewModel(params: listViewModelParams): {
|
|
|
48
48
|
fetchTableList: ({ paginationInfo, ordersInfo, queryInfo, filtersInfo, isFilter, clear, isPost, isPageChange, isSerach, isViewSearch, }: fetchTableListParams, options?: {
|
|
49
49
|
token: Number;
|
|
50
50
|
}) => Promise<void>;
|
|
51
|
+
fetchDetailTableList: (props: any) => Promise<{
|
|
52
|
+
rows: {}[];
|
|
53
|
+
total: number;
|
|
54
|
+
}>;
|
|
51
55
|
isShowAgGridFooterStatistics: Ref<boolean>;
|
|
52
56
|
deleteTableRow: (record: Recordable<unknown>, condition?: any) => Promise<void>;
|
|
53
57
|
getNoCountListMaxSize: ({ paginationInfo, ordersInfo, queryInfo, filtersInfo, isFilter, clear, }: fetchTableListParams) => Promise<{} | undefined>;
|
|
@@ -1736,6 +1736,24 @@ export default class {
|
|
|
1736
1736
|
SimplifyListPagePrivateV1ApiAppsPOST(params: {
|
|
1737
1737
|
payload?: typing.FormDataPageRequest$List$PageListDataQuery$$_2;
|
|
1738
1738
|
}, options?: any): Promise<typing.PlainResult$SimplifyRowsResp$>;
|
|
1739
|
+
/**
|
|
1740
|
+
* 主子表展开:嵌套列表接口(子表数据)
|
|
1741
|
+
* @method
|
|
1742
|
+
* @name #NestSimplifyListPagePrivateV1ApiAppsPOST
|
|
1743
|
+
* @param payload app_id, data_uid, form_key, data_code, page
|
|
1744
|
+
*/
|
|
1745
|
+
NestSimplifyListPagePrivateV1ApiAppsPOST(params: {
|
|
1746
|
+
payload?: {
|
|
1747
|
+
app_id?: string;
|
|
1748
|
+
data_uid?: string;
|
|
1749
|
+
form_key?: string;
|
|
1750
|
+
data_code?: string;
|
|
1751
|
+
page?: {
|
|
1752
|
+
page_index?: number;
|
|
1753
|
+
page_size?: number;
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
}, options?: any): Promise<typing.PlainResult$SimplifyRowsResp$>;
|
|
1739
1757
|
/**
|
|
1740
1758
|
* 传入:查询条件(JSON格式)
|
|
1741
1759
|
* @method
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
2
|
+
import { ControlRuntimeInstance } from '@byteluck-fe/model-driven-core-all';
|
|
3
|
+
|
|
4
|
+
export declare function attachGridColumnControlInstance(colDef: ColDef, controlInstance: ControlRuntimeInstance<any> | undefined): ColDef<any, any>;
|
|
5
|
+
export declare function getGridColumnControlInstance(colDef: ColDef | undefined): any;
|
|
6
|
+
export declare function resolveGridColumnControlInstance(params: {
|
|
7
|
+
colDef?: ColDef;
|
|
8
|
+
context?: Record<string, unknown> & {
|
|
9
|
+
engineId?: string;
|
|
10
|
+
};
|
|
11
|
+
} | undefined, engine?: {
|
|
12
|
+
getInstance?: (id: string) => ControlRuntimeInstance<any>;
|
|
13
|
+
}): ControlRuntimeInstance<any> | Record<string, unknown> | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* list-view 主子表:子表列定义在 props.master_detail.headers(或 header),
|
|
3
|
+
* 主表列在 grid-table 的 props.headers(个别文档写作 columns)。
|
|
4
|
+
* 与 applyRender schema 一致,同时兼容 snake_case / camelCase。
|
|
5
|
+
*/
|
|
6
|
+
export declare function pickMasterDetailHeaderList(masterDetail: unknown): unknown[] | undefined;
|
|
7
|
+
/** 在列头树(含分组 children)中按控件 id 查找 */
|
|
8
|
+
export declare function findHeaderByControlIdInTree(headers: unknown[] | undefined, controlId: string | undefined): Record<string, unknown> | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* 从 AG Grid context 解析 list-view 下 master_detail 中的列 schema。
|
|
11
|
+
* context.exposeParams.listViewInstanceProps | list_view_instance_props
|
|
12
|
+
*/
|
|
13
|
+
export declare function findMasterDetailHeaderByContext(context: Record<string, unknown> | undefined, controlId: string | undefined): Record<string, unknown> | undefined;
|
|
14
|
+
/** 主表 grid-table:headers 或 columns */
|
|
15
|
+
export declare function findMainGridHeaderByControlId(gridTableProps: Record<string, unknown> | undefined, controlId: string | undefined): Record<string, unknown> | undefined;
|