zova-module-a-table 5.1.8 → 5.1.10
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/cli/tableCell/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +9 -2
- package/cli/tableCell/metadata/generate.ts +4 -1
- package/dist/.metadata/component/table.d.ts.map +1 -1
- package/dist/component/table/controller.d.ts +13 -11
- package/dist/component/table/controller.d.ts.map +1 -1
- package/dist/component/table/render.d.ts.map +1 -1
- package/dist/index.js +89 -66
- package/dist/index.js.map +1 -1
- package/dist/lib/beanControllerPageTableBase.d.ts +1 -0
- package/dist/lib/beanControllerPageTableBase.d.ts.map +1 -1
- package/dist/lib/beanControllerTableBase.d.ts +1 -0
- package/dist/lib/beanControllerTableBase.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/table.d.ts +9 -5
- package/dist/types/table.d.ts.map +1 -1
- package/dist/types/tableCell.d.ts +2 -1
- package/dist/types/tableCell.d.ts.map +1 -1
- package/dist/types/tableColumn.d.ts +5 -4
- package/dist/types/tableColumn.d.ts.map +1 -1
- package/package.json +2 -2
- package/rest/component/table.ts +2 -1
- package/src/.metadata/component/table.ts +11 -5
- package/src/component/table/controller.tsx +171 -107
- package/src/component/table/render.tsx +8 -2
- package/src/lib/beanControllerPageTableBase.ts +4 -0
- package/src/lib/beanControllerTableBase.ts +4 -0
- package/src/types/index.ts +0 -1
- package/src/types/table.ts +18 -5
- package/src/types/tableCell.ts +2 -1
- package/src/types/tableColumn.ts +6 -5
- package/dist/types/providers.d.ts +0 -24
- package/dist/types/providers.d.ts.map +0 -1
- package/src/types/providers.ts +0 -26
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import type { IResourceTableCellOptionsBase } from 'zova-module-a-openapi';
|
|
2
|
+
|
|
1
3
|
import { BeanBase } from 'zova';
|
|
2
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
IJsxRenderContextTableCell,
|
|
6
|
+
ITableCellRender,
|
|
7
|
+
NextTableCellRender,
|
|
8
|
+
TableCell,
|
|
9
|
+
} from 'zova-module-a-table';
|
|
3
10
|
|
|
4
|
-
export interface ITableCellOptions<%=argv.beanNameCapitalize%> extends
|
|
11
|
+
export interface ITableCellOptions<%=argv.beanNameCapitalize%> extends IResourceTableCellOptionsBase {}
|
|
5
12
|
|
|
6
13
|
@TableCell<ITableCellOptions<%=argv.beanNameCapitalize%>>()
|
|
7
14
|
export class TableCell<%=argv.beanNameCapitalize%> extends BeanBase implements ITableCellRender {
|
|
@@ -18,7 +18,10 @@ export default async function (options: IMetadataCustomGenerateOptions): Promise
|
|
|
18
18
|
return '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async function generateRestTableCell(
|
|
21
|
+
async function generateRestTableCell(
|
|
22
|
+
options: IMetadataCustomGenerateOptions,
|
|
23
|
+
globFile: IGlobBeanFile,
|
|
24
|
+
) {
|
|
22
25
|
const { moduleName, modulePath } = options;
|
|
23
26
|
const { beanName, beanNameCapitalize, sceneName } = globFile;
|
|
24
27
|
// options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/.metadata/component/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAKrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,MAAM,8BAA8B,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE,IAAI;IAClE,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;CACvD,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAEhC,KAAK,oBAAoB,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE,IAAI,wBAAwB,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/.metadata/component/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAKrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,MAAM,8BAA8B,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE,IAAI;IAClE,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;CACvD,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAEhC,KAAK,oBAAoB,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE,IAAI,wBAAwB,CACzE,oBAAoB,CAAC,KAAK,CAAC,EAC3B,MAAM,OAAO,eAAe,CAAC,aAAa,CAC3C,CAAC;AACF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAiB,eAAe,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE;QACpD,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;KACrC;CACF;AACD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAiB,WAAW,CAAC,KAAK,SAAS,EAAE,GAAG,EAAE,CAAE,SAAQ,eAAe,CAAC,KAAK,CAAC;KAAG;CACtF;AACD,eAAO,MAAM,MAAM,OAChB,KAAK,SAAS,EAAE;sDAhBgC,IAAI;;;;;;sDAAJ,IAAI;;;;;;;;;;;;;sDAAJ,IAAI;;;;;wBAqBtD,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import type { IResourceActionRowOptionsBase, ITableProvider, TypeTableCellRenderComponent, TypeTableCellRenderComponentProvider } from 'zova-module-a-openapi';
|
|
1
2
|
import { celEnvBase } from '@cabloy/utils';
|
|
2
3
|
import { CellContext } from '@tanstack/vue-table';
|
|
3
4
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
4
5
|
import { VNode } from 'vue';
|
|
5
6
|
import { ZovaJsx } from 'zova-jsx';
|
|
6
|
-
import {
|
|
7
|
+
import { BeanResourceProviders } from 'zova-module-a-openapi';
|
|
8
|
+
import type { ITableMeta, TypeColumn, TypeTable, TypeTableGetColumns } from '../../types/table.js';
|
|
9
|
+
import type { IJsxRenderContextTableCell } from '../../types/tableCell.js';
|
|
7
10
|
import { BeanControllerTableBase } from '../../lib/beanControllerTableBase.js';
|
|
8
|
-
import {
|
|
9
|
-
import { ITableMeta, TypeColumn, TypeTable, TypeTableGetColumnsNext } from '../../types/table.js';
|
|
10
|
-
import { IJsxRenderContextTableCell } from '../../types/tableCell.js';
|
|
11
|
-
import { IJsxRenderContextTableColumn, ITableCellRenderColumnProps, ITableCellScope, ITableColumnScope, ITableScope, TypeTableCellRender } from '../../types/tableColumn.js';
|
|
11
|
+
import { ITableCellRenderColumnOptions, type IJsxRenderContextTableColumn, type ITableCellScope, type ITableColumnScope, type ITableScope } from '../../types/tableColumn.js';
|
|
12
12
|
export interface ControllerTableProps<TData extends {} = {}> {
|
|
13
13
|
data?: TData[];
|
|
14
14
|
schema?: SchemaObject;
|
|
15
15
|
tableProvider?: ITableProvider;
|
|
16
16
|
tableScope?: ITableScope;
|
|
17
|
-
getColumns?:
|
|
17
|
+
getColumns?: TypeTableGetColumns<TData>;
|
|
18
18
|
slotDefault?: (table: ControllerTable<TData>) => VNode;
|
|
19
19
|
}
|
|
20
20
|
export declare class ControllerTable<TData extends {} = {}> extends BeanControllerTableBase {
|
|
@@ -26,10 +26,11 @@ export declare class ControllerTable<TData extends {} = {}> extends BeanControll
|
|
|
26
26
|
tableMeta: ITableMeta<TData>;
|
|
27
27
|
zovaJsx: ZovaJsx;
|
|
28
28
|
columnCelEnv: typeof celEnvBase;
|
|
29
|
-
$$
|
|
29
|
+
$$beanResourceProviders: BeanResourceProviders;
|
|
30
30
|
protected __init__(): Promise<void>;
|
|
31
31
|
get schema(): SchemaObject | undefined;
|
|
32
32
|
get data(): TData[] | undefined;
|
|
33
|
+
refreshMeta(): Promise<void>;
|
|
33
34
|
private _createTable;
|
|
34
35
|
private _createColumns;
|
|
35
36
|
private _createColumnsMiddle;
|
|
@@ -37,15 +38,16 @@ export declare class ControllerTable<TData extends {} = {}> extends BeanControll
|
|
|
37
38
|
private _createTableMeta;
|
|
38
39
|
getColumnJsxRenderContext(celScope: ITableColumnScope): IJsxRenderContextTableColumn;
|
|
39
40
|
getCellJsxRenderContext(celScope: ITableCellScope, cellContext: CellContext<TData, any>): IJsxRenderContextTableCell;
|
|
40
|
-
|
|
41
|
+
cellRenderPrepare(renders: TypeTableCellRenderComponent | TypeTableCellRenderComponent[]): Promise<any[]>;
|
|
41
42
|
private _createColumnRender;
|
|
43
|
+
cellRender(render: TypeTableCellRenderComponent, columnProps: IResourceActionRowOptionsBase, renderContext: IJsxRenderContextTableCell): any;
|
|
42
44
|
private _cellRender;
|
|
43
45
|
private _cellRenderInner;
|
|
44
46
|
getColumnProperty(name: string): SchemaObject | undefined;
|
|
45
47
|
private _getColumnCelEnv;
|
|
46
48
|
getColumnScope(name: string, scopeExtra?: {}): ITableColumnScope;
|
|
47
|
-
getColumnComponentPropsTop(name: string, celScope: {}, renderContext: {}):
|
|
48
|
-
|
|
49
|
-
getRenderProvider(render: TypeTableCellRenderComponent): TypeTableCellRenderComponentProvider;
|
|
49
|
+
getColumnComponentPropsTop(name: string, celScope: {}, renderContext: {}): ITableCellRenderColumnOptions;
|
|
50
|
+
private _getColumnComponentPropsTopByRest;
|
|
51
|
+
getRenderProvider(render: TypeTableCellRenderComponent | undefined): TypeTableCellRenderComponentProvider;
|
|
50
52
|
}
|
|
51
53
|
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/table/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UA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AE,EAAE,GAAG,6BAA6B;IAM/G,OAAO,CAAC,iCAAiC;IAgBlC,iBAAiB,CAAC,MAAM,EAAE,4BAA4B,GAAG,SAAS,GAAG,oCAAoC;CASjH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/component/table/render.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAGtC,qBACa,WAAY,SAAQ,cAAc;IAC7C,OAAO,CAAC,mBAAmB;
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/component/table/render.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAGtC,qBACa,WAAY,SAAQ,cAAc;IAC7C,OAAO,CAAC,mBAAmB;IAwCpB,MAAM;;;CAGd"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { BeanControllerBase, BeanControllerPageBase, BeanInfo, BeanRenderBase, BeanScopeBase,
|
|
2
|
-
import { celEnvBase } from "@cabloy/utils";
|
|
1
|
+
import { BeanControllerBase, BeanControllerPageBase, BeanInfo, BeanRenderBase, BeanScopeBase, Use, appResource, cast, createBeanDecorator, deepEqual, deepExtend, objectAssignReactive, prepareComponentOptions, useController } from "zova";
|
|
2
|
+
import { celEnvBase, isNilOrEmptyString } from "@cabloy/utils";
|
|
3
3
|
import { FlexRender, createColumnHelper, getCoreRowModel, useVueTable } from "@tanstack/vue-table";
|
|
4
4
|
import { ZovaJsx, isJsxComponent } from "zova-jsx";
|
|
5
5
|
import { Controller, Render, Scope } from "zova-module-a-bean";
|
|
6
|
-
import { renderTableColumnTopPropsSystem } from "zova-module-a-openapi";
|
|
7
6
|
import { createVNode, defineComponent, markRaw } from "vue";
|
|
8
7
|
//#region src/lib/beanControllerTableBase.ts
|
|
9
8
|
var BeanControllerTableBase = class extends BeanControllerBase {
|
|
@@ -12,11 +11,11 @@ var BeanControllerTableBase = class extends BeanControllerBase {
|
|
|
12
11
|
return markRaw(useVueTable(initialOptions));
|
|
13
12
|
});
|
|
14
13
|
}
|
|
14
|
+
async refreshMeta() {
|
|
15
|
+
throw new Error("should implement refreshMeta");
|
|
16
|
+
}
|
|
15
17
|
};
|
|
16
18
|
//#endregion
|
|
17
|
-
//#region src/types/tableColumn.ts
|
|
18
|
-
var constColumnProps = "$$ColumnProps";
|
|
19
|
-
//#endregion
|
|
20
19
|
//#region src/component/table/controller.tsx
|
|
21
20
|
var _dec$2, _dec2$2, _dec3, _dec4, _class$2, _class2, _descriptor, _ControllerTable;
|
|
22
21
|
function _initializerDefineProperty(e, i, r, l) {
|
|
@@ -35,7 +34,7 @@ function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
|
35
34
|
return n(i, e, r) || r;
|
|
36
35
|
}, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
|
|
37
36
|
}
|
|
38
|
-
var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-table" }), _dec3 =
|
|
37
|
+
var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-table" }), _dec3 = Use("a-openapi.bean.resourceProviders"), _dec4 = Reflect.metadata("design:type", typeof BeanResourceProviders === "undefined" ? Object : BeanResourceProviders), _dec$2(_class$2 = _dec2$2(_class$2 = (_class2 = (_ControllerTable = class ControllerTable extends BeanControllerTableBase {
|
|
39
38
|
constructor(...args) {
|
|
40
39
|
super(...args);
|
|
41
40
|
this.properties = void 0;
|
|
@@ -45,22 +44,21 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
45
44
|
this.tableMeta = void 0;
|
|
46
45
|
this.zovaJsx = void 0;
|
|
47
46
|
this.columnCelEnv = void 0;
|
|
48
|
-
_initializerDefineProperty(this, "$$
|
|
47
|
+
_initializerDefineProperty(this, "$$beanResourceProviders", _descriptor, this);
|
|
49
48
|
}
|
|
50
49
|
async __init__() {
|
|
51
50
|
this.bean._setBean("$$table", this);
|
|
52
51
|
this.tableProvider = this.$useComputed(() => {
|
|
53
|
-
|
|
52
|
+
const tableProvider = this.$$beanResourceProviders.tableProvider;
|
|
53
|
+
return this.$props.tableProvider ? deepExtend({}, tableProvider, this.$props.tableProvider) : tableProvider;
|
|
54
54
|
});
|
|
55
55
|
this.columnCelEnv = this._getColumnCelEnv();
|
|
56
56
|
this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.tableProvider.components, this.tableProvider.actions, this.columnCelEnv);
|
|
57
57
|
this._createProperties();
|
|
58
|
-
|
|
59
|
-
this.columns = await this._createColumns();
|
|
58
|
+
await this.refreshMeta();
|
|
60
59
|
this.$watch(() => this.$props.schema, async (newValue, oldValue) => {
|
|
61
60
|
if (deepEqual(newValue, oldValue)) return;
|
|
62
|
-
|
|
63
|
-
this.columns = await this._createColumns();
|
|
61
|
+
await this.refreshMeta();
|
|
64
62
|
});
|
|
65
63
|
this._createTable();
|
|
66
64
|
}
|
|
@@ -70,6 +68,10 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
70
68
|
get data() {
|
|
71
69
|
return this.$props.data;
|
|
72
70
|
}
|
|
71
|
+
async refreshMeta() {
|
|
72
|
+
this.tableMeta = await this._createTableMeta();
|
|
73
|
+
this.columns = await this._createColumns();
|
|
74
|
+
}
|
|
73
75
|
_createTable() {
|
|
74
76
|
const self = this;
|
|
75
77
|
const tableOptions = {
|
|
@@ -91,6 +93,12 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
91
93
|
if (!this.$props.getColumns) return await this._createColumnsMiddle(this.tableMeta.properties);
|
|
92
94
|
return await this.$props.getColumns(async (properties) => {
|
|
93
95
|
return await this._createColumnsMiddle(properties ?? this.tableMeta.properties);
|
|
96
|
+
}, async (key, render) => {
|
|
97
|
+
const columnScope = this.getColumnScope(key);
|
|
98
|
+
const jsxRenderContext = this.getColumnJsxRenderContext(columnScope);
|
|
99
|
+
const { visible, columnProps } = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);
|
|
100
|
+
if (visible === false) return;
|
|
101
|
+
return await this._createColumnRender(render, columnProps, columnScope, jsxRenderContext);
|
|
94
102
|
}, this);
|
|
95
103
|
}
|
|
96
104
|
async _createColumnsMiddle(properties) {
|
|
@@ -115,7 +123,7 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
115
123
|
});
|
|
116
124
|
}
|
|
117
125
|
async _createTableMeta() {
|
|
118
|
-
|
|
126
|
+
let properties = [];
|
|
119
127
|
const renders = {};
|
|
120
128
|
if (!this.properties) return {
|
|
121
129
|
properties,
|
|
@@ -126,13 +134,17 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
126
134
|
const key = property.key;
|
|
127
135
|
const columnScope = this.getColumnScope(key);
|
|
128
136
|
const jsxRenderContext = this.getColumnJsxRenderContext(columnScope);
|
|
129
|
-
const columnProps = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);
|
|
130
|
-
if (
|
|
137
|
+
const { visible, render, columnProps } = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);
|
|
138
|
+
if (visible === false) continue;
|
|
131
139
|
properties.push(property);
|
|
132
|
-
promises.push(this._createColumnRender(
|
|
140
|
+
promises.push(this._createColumnRender(render, columnProps, columnScope, jsxRenderContext));
|
|
133
141
|
}
|
|
134
|
-
|
|
135
|
-
properties.
|
|
142
|
+
let res = await Promise.all(promises);
|
|
143
|
+
properties = properties.filter((_item, index) => !!res[index]);
|
|
144
|
+
res = res.filter((item) => !!item);
|
|
145
|
+
properties.forEach((item, index) => {
|
|
146
|
+
renders[item.key] = res[index];
|
|
147
|
+
});
|
|
136
148
|
return {
|
|
137
149
|
properties,
|
|
138
150
|
renders
|
|
@@ -161,45 +173,63 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
161
173
|
cellContext
|
|
162
174
|
};
|
|
163
175
|
}
|
|
164
|
-
async
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
async cellRenderPrepare(renders) {
|
|
177
|
+
if (!Array.isArray(renders)) renders = [renders];
|
|
178
|
+
const promises = renders.map((item) => this.getRenderProvider(item)).map((renderProvider) => (async () => {
|
|
179
|
+
if (typeof renderProvider === "string" && renderProvider.includes(".tableCell.")) return await this.sys.bean._getBean(renderProvider, true);
|
|
180
|
+
})());
|
|
181
|
+
return await Promise.all(promises);
|
|
167
182
|
}
|
|
168
|
-
async _createColumnRender(render,
|
|
183
|
+
async _createColumnRender(render, columnProps, columnScope, renderContext) {
|
|
169
184
|
const renderProvider = this.getRenderProvider(render);
|
|
170
185
|
let beanInstance;
|
|
171
|
-
let onionOptions;
|
|
172
186
|
if (typeof renderProvider === "string" && renderProvider.includes(".tableCell.")) {
|
|
173
187
|
beanInstance = await this.sys.bean._getBean(renderProvider, true);
|
|
174
|
-
onionOptions = appResource.getBean(renderProvider)?.options;
|
|
188
|
+
const onionOptions = appResource.getBean(renderProvider)?.options;
|
|
189
|
+
columnProps = deepExtend({}, onionOptions, columnProps);
|
|
190
|
+
columnProps = this.zovaJsx.renderJsxProps(columnProps, {}, columnScope, renderContext);
|
|
191
|
+
if (beanInstance?.checkVisible && !await beanInstance.checkVisible(columnProps, renderContext)) return;
|
|
175
192
|
}
|
|
176
193
|
return (cellContext) => {
|
|
177
194
|
if (!cellContext) return;
|
|
178
|
-
return this._cellRender(render,
|
|
195
|
+
return this._cellRender(render, columnProps, columnScope, cellContext, renderProvider, beanInstance, void 0, void 0, void 0);
|
|
179
196
|
};
|
|
180
197
|
}
|
|
181
|
-
|
|
198
|
+
cellRender(render, columnProps, renderContext) {
|
|
199
|
+
const cellScope = renderContext.$celScope;
|
|
200
|
+
const renderProvider = this.getRenderProvider(render);
|
|
201
|
+
let beanInstance;
|
|
202
|
+
if (typeof renderProvider === "string" && renderProvider.includes(".tableCell.")) {
|
|
203
|
+
beanInstance = this.sys.bean._getBeanSyncOnly(renderProvider);
|
|
204
|
+
const onionOptions = appResource.getBean(renderProvider)?.options;
|
|
205
|
+
columnProps = deepExtend({}, onionOptions, columnProps);
|
|
206
|
+
columnProps = this.zovaJsx.renderJsxProps(columnProps, {}, renderContext.$celScope, renderContext);
|
|
207
|
+
}
|
|
208
|
+
const cellProps = columnProps;
|
|
209
|
+
return this._cellRender(render, columnProps, void 0, renderContext.cellContext, renderProvider, beanInstance, cellProps, cellScope, renderContext);
|
|
210
|
+
}
|
|
211
|
+
_cellRender(render, columnProps, columnScope, cellContext, renderProvider, beanInstance, cellProps, cellScope, jsxRenderContext) {
|
|
182
212
|
return this.zovaJsx.setTransientObject({ getValue: (name) => {
|
|
183
213
|
return cellContext.row.getValue(name);
|
|
184
214
|
} }, () => {
|
|
185
|
-
return this._cellRenderInner(render,
|
|
215
|
+
return this._cellRenderInner(render, columnProps, columnScope, cellContext, renderProvider, beanInstance, cellProps, cellScope, jsxRenderContext);
|
|
186
216
|
});
|
|
187
217
|
}
|
|
188
|
-
_cellRenderInner(render,
|
|
218
|
+
_cellRenderInner(render, columnProps, columnScope, cellContext, renderProvider, beanInstance, cellProps, cellScope, jsxRenderContext) {
|
|
189
219
|
const value = cellContext.getValue();
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
220
|
+
const fallbackValue = this.table.options.renderFallbackValue;
|
|
221
|
+
if (!cellScope) cellScope = objectAssignReactive({}, columnScope, {
|
|
222
|
+
value,
|
|
223
|
+
fallbackValue
|
|
224
|
+
});
|
|
225
|
+
if (renderProvider === "text") return isNilOrEmptyString(value) ? fallbackValue : value;
|
|
226
|
+
if (!jsxRenderContext) jsxRenderContext = this.getCellJsxRenderContext(cellScope, cellContext);
|
|
196
227
|
if (beanInstance) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
return beanInstance.render(cellProps ?? {}, jsxRenderContext, () => {
|
|
228
|
+
if (!cellProps) cellProps = columnProps;
|
|
229
|
+
return beanInstance.render(cellProps, jsxRenderContext, () => {
|
|
200
230
|
const children = isJsxComponent(render) && cast(render).children;
|
|
201
231
|
if (children && children.length > 0) return this.zovaJsx.renderJsxChildrenDirect(children, cellScope, jsxRenderContext);
|
|
202
|
-
else return
|
|
232
|
+
else return value;
|
|
203
233
|
});
|
|
204
234
|
}
|
|
205
235
|
return this.zovaJsx.render(render, {}, cellScope, jsxRenderContext);
|
|
@@ -226,36 +256,26 @@ var ControllerTable = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "a-ta
|
|
|
226
256
|
});
|
|
227
257
|
}
|
|
228
258
|
getColumnComponentPropsTop(name, celScope, renderContext) {
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
key: name,
|
|
232
|
-
name
|
|
233
|
-
};
|
|
234
|
-
const property = this.getColumnProperty(name);
|
|
235
|
-
if (!property) return props;
|
|
236
|
-
const rest = property.rest;
|
|
237
|
-
if (!rest) return props;
|
|
238
|
-
const keys = Object.keys(rest).filter((item) => !renderTableColumnTopPropsSystem.includes(item));
|
|
239
|
-
if (keys.length === 0) return props;
|
|
240
|
-
for (const key of keys) {
|
|
241
|
-
const value = rest[key];
|
|
242
|
-
let keyValue;
|
|
243
|
-
if (key === "render") if (typeof value === "string") keyValue = this.zovaJsx.evaluateExpression(value, celScope);
|
|
244
|
-
else keyValue = value;
|
|
245
|
-
else keyValue = this.zovaJsx.renderJsxOrCel(value, void 0, celScope, renderContext);
|
|
246
|
-
props[key] = keyValue;
|
|
247
|
-
}
|
|
248
|
-
return props;
|
|
259
|
+
const rest = this.getColumnProperty(name)?.rest;
|
|
260
|
+
return this._getColumnComponentPropsTopByRest(rest, name, celScope, renderContext);
|
|
249
261
|
}
|
|
250
|
-
|
|
251
|
-
return
|
|
262
|
+
_getColumnComponentPropsTopByRest(rest, name, celScope, _renderContext) {
|
|
263
|
+
return {
|
|
264
|
+
visible: this.zovaJsx.evaluateExpression(rest?.visible, celScope),
|
|
265
|
+
render: rest?.render,
|
|
266
|
+
columnProps: Object.assign({ key: name }, cast(rest)?.columnProps)
|
|
267
|
+
};
|
|
252
268
|
}
|
|
253
269
|
getRenderProvider(render) {
|
|
254
|
-
|
|
255
|
-
if (typeof
|
|
256
|
-
|
|
270
|
+
if (!render) return "text";
|
|
271
|
+
if (typeof render === "string") {
|
|
272
|
+
const render2 = this.tableProvider.components?.[render];
|
|
273
|
+
if (!render2) throw new Error(`not found table cell component of: ${render}`);
|
|
274
|
+
return render2;
|
|
275
|
+
}
|
|
276
|
+
return render;
|
|
257
277
|
}
|
|
258
|
-
}, _ControllerTable.$propsDefault = {}, _ControllerTable), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "$$
|
|
278
|
+
}, _ControllerTable.$propsDefault = {}, _ControllerTable), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "$$beanResourceProviders", [_dec3, _dec4], {
|
|
259
279
|
configurable: true,
|
|
260
280
|
enumerable: true,
|
|
261
281
|
writable: true,
|
|
@@ -312,6 +332,9 @@ var BeanControllerPageTableBase = class extends BeanControllerPageBase {
|
|
|
312
332
|
return markRaw(useVueTable(initialOptions));
|
|
313
333
|
});
|
|
314
334
|
}
|
|
335
|
+
async refreshMeta() {
|
|
336
|
+
throw new Error("should implement refreshMeta");
|
|
337
|
+
}
|
|
315
338
|
};
|
|
316
339
|
//#endregion
|
|
317
340
|
//#region src/lib/tableCell.ts
|
|
@@ -319,6 +342,6 @@ function TableCell(options) {
|
|
|
319
342
|
return createBeanDecorator("tableCell", "sys", true, options);
|
|
320
343
|
}
|
|
321
344
|
//#endregion
|
|
322
|
-
export { BeanControllerPageTableBase, BeanControllerTableBase, ControllerTable, RenderTable, ScopeModuleATable, TableCell, ZTable, components, config
|
|
345
|
+
export { BeanControllerPageTableBase, BeanControllerTableBase, ControllerTable, RenderTable, ScopeModuleATable, TableCell, ZTable, components, config };
|
|
323
346
|
|
|
324
347
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["celEnvBase","createColumnHelper","getCoreRowModel","appResource","cast","deepEqual","deepExtend","objectAssignReactive","UseScope","isJsxComponent","ZovaJsx","Controller","renderTableColumnTopPropsSystem","BeanControllerTableBase","constColumnProps","ControllerTable","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","ScopeModuleAOpenapi","Object","_class","_class2","_ControllerTable","constructor","args","properties","columns","table","tableProvider","tableMeta","zovaJsx","columnCelEnv","_initializerDefineProperty","_descriptor","__init__","bean","_setBean","$useComputed","$$scopeModuleAOpenapi","config","resourceMeta","provider","$props","_getColumnCelEnv","app","_newBeanSimple","components","actions","_createProperties","_createTableMeta","_createColumns","$watch","schema","newValue","oldValue","_createTable","data","self","tableOptions","getRowId","row","id","renderFallbackValue","scope","manualPagination","$useTable","getColumns","_createColumnsMiddle","columnHelper","property","key","push","accessor","header","_props","title","cell","props","renders","$sdk","loadSchemaProperties","promises","columnScope","getColumnScope","jsxRenderContext","getColumnJsxRenderContext","columnProps","getColumnComponentPropsTop","visible","_createColumnRender","render","res","Promise","all","forEach","item","index","celScope","ctx","$scene","$host","$celScope","$jsx","$$table","getCellJsxRenderContext","cellContext","createColumnRender","undefined","renderProvider","getRenderProvider","beanInstance","onionOptions","includes","sys","_getBean","beanOptions","getBean","options","_cellRender","setTransientObject","getValue","name","_cellRenderInner","value","cellScope","displayValue","rest","evaluateExpression","cellProps","renderJsxProps","children","length","renderJsxChildrenDirect","getColumnProperty","find","celEnv","clone","registerFunction","transientObject","scopeExtra","tableScope","renderContext","keys","filter","keyValue","renderJsxOrCel","getRenderFlattern","type","$propsDefault","_applyDecoratedDescriptor","prototype","configurable","enumerable","writable","initializer","FlexRender","BeanRenderBase","Render","RenderTable","_dec","_dec2","__z_BeanInfo","module","_class","_renderTableDefault","table","_createVNode","getFlatHeaders","map","header","id","column","columnDef","getContext","getRowModel","rows","row","getVisibleCells","cell","render","$slotDefault"],"sources":["../src/lib/beanControllerTableBase.ts","../src/types/tableColumn.ts","../src/component/table/controller.tsx","../src/component/table/render.tsx","../src/.metadata/component/table.ts","../src/config/config.ts","../src/.metadata/index.ts","../src/lib/beanControllerPageTableBase.ts","../src/lib/tableCell.ts"],"sourcesContent":["import type { RowData, Table } from '@tanstack/table-core';\nimport type { TableOptionsWithReactiveData } from '@tanstack/vue-table';\n\nimport { useVueTable } from '@tanstack/vue-table';\nimport { markRaw } from 'vue';\nimport { BeanControllerBase } from 'zova';\n\nexport class BeanControllerTableBase extends BeanControllerBase {\n public $useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData> {\n return this.ctx.util.instanceScope(() => {\n return markRaw(useVueTable(initialOptions));\n });\n }\n}\n","import type { CellContext, RowData } from '@tanstack/table-core';\nimport type { SchemaObject } from 'openapi3-ts/oas31';\nimport type { IJsxRenderContextBase, TypeTableCellRenderComponent } from 'zova-module-a-openapi';\n\nimport type { ControllerTable } from '../component/table/controller.jsx';\n\nexport const constColumnProps = '$$ColumnProps';\n\nexport type TypeTableCellRender<TData extends RowData = RowData, TValue = any> = (props?: CellContext<TData, TValue>) => any;\n\nexport interface IJsxRenderContextTableColumn<TData extends {} = any> extends IJsxRenderContextBase {\n $celScope: ITableColumnScope;\n $$table: ControllerTable<TData>;\n}\n\nexport interface ITableCellRenderColumnProps {\n key: string;\n name: string;\n visible?: boolean;\n render: TypeTableCellRenderComponent;\n}\n\nexport interface ITableScope {}\n\nexport interface ITableColumnScope extends ITableScope {\n name: string;\n property?: SchemaObject;\n}\n\nexport interface ITableCellScope extends ITableColumnScope {\n value: any;\n displayValue?: any;\n}\n","import { celEnvBase } from '@cabloy/utils';\nimport { CellContext, createColumnHelper, getCoreRowModel, TableOptionsWithReactiveData } from '@tanstack/vue-table';\nimport { SchemaObject } from 'openapi3-ts/oas31';\nimport { VNode } from 'vue';\nimport { appResource, cast, deepEqual, deepExtend, objectAssignReactive, UseScope } from 'zova';\nimport { isJsxComponent, ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport {\n renderTableColumnTopPropsSystem,\n ScopeModuleAOpenapi,\n TypeTableCellRenderComponent,\n TypeTableCellRenderComponentProvider,\n} from 'zova-module-a-openapi';\n\nimport { BeanControllerTableBase } from '../../lib/beanControllerTableBase.js';\nimport { ITableProvider } from '../../types/providers.js';\nimport { ITableMeta, TypeColumn, TypeTable, TypeTableGetColumnsNext } from '../../types/table.js';\nimport { IDecoratorTableCellOptions, IJsxRenderContextTableCell, ITableCellRender } from '../../types/tableCell.js';\nimport {\n constColumnProps,\n IJsxRenderContextTableColumn,\n ITableCellRenderColumnProps,\n ITableCellScope,\n ITableColumnScope,\n ITableScope,\n TypeTableCellRender,\n} from '../../types/tableColumn.js';\n\nexport interface ControllerTableProps<TData extends {} = {}> {\n data?: TData[];\n schema?: SchemaObject;\n tableProvider?: ITableProvider;\n tableScope?: ITableScope;\n getColumns?: (next: TypeTableGetColumnsNext<TData>, table: ControllerTable<TData>) => Promise<TypeColumn<TData>[]>;\n slotDefault?: (table: ControllerTable<TData>) => VNode;\n}\n\n@Controller()\nexport class ControllerTable<TData extends {} = {}> extends BeanControllerTableBase {\n static $propsDefault = {};\n\n properties: SchemaObject[] | undefined;\n columns: TypeColumn<TData>[];\n table: TypeTable<TData>;\n tableProvider: ITableProvider;\n tableMeta: ITableMeta<TData>;\n zovaJsx: ZovaJsx;\n columnCelEnv: typeof celEnvBase;\n\n @UseScope()\n $$scopeModuleAOpenapi: ScopeModuleAOpenapi;\n\n protected async __init__() {\n this.bean._setBean('$$table', this);\n this.tableProvider = this.$useComputed(() => {\n return deepExtend(\n {},\n this.$$scopeModuleAOpenapi.config.resourceMeta.provider,\n this.$$scopeModuleAOpenapi.config.resourceMeta.table?.provider,\n this.$props.tableProvider,\n );\n });\n // jsx\n this.columnCelEnv = this._getColumnCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.tableProvider.components, this.tableProvider.actions, this.columnCelEnv);\n // properties\n this._createProperties();\n // tableMeta\n this.tableMeta = await this._createTableMeta();\n // columns\n this.columns = await this._createColumns();\n // watch\n this.$watch(\n () => this.$props.schema,\n async (newValue, oldValue) => {\n if (deepEqual(newValue, oldValue)) return;\n this.tableMeta = await this._createTableMeta();\n this.columns = await this._createColumns();\n },\n );\n // table\n this._createTable();\n }\n\n get schema() {\n return this.$props.schema;\n }\n\n get data() {\n return this.$props.data;\n }\n\n private _createTable() {\n const self = this;\n const tableOptions: TableOptionsWithReactiveData<TData> = {\n getRowId: (row: TData) => cast(row).id,\n getCoreRowModel: getCoreRowModel(),\n renderFallbackValue: this.scope.config.renderFallbackValue,\n manualPagination: true,\n get data() {\n return self.data || [];\n },\n get columns() {\n return self.columns;\n },\n };\n this.table = this.$useTable(tableOptions);\n }\n\n private async _createColumns() {\n if (!this.properties) return [];\n if (!this.$props.getColumns) return await this._createColumnsMiddle(this.tableMeta.properties);\n return await this.$props.getColumns(async properties => {\n return await this._createColumnsMiddle(properties ?? this.tableMeta.properties);\n }, this);\n }\n\n private async _createColumnsMiddle(properties: SchemaObject[]) {\n const tableMeta = this.tableMeta;\n const columnHelper = createColumnHelper<TData>();\n const columns: TypeColumn<TData>[] = [];\n for (const property of properties) {\n const key = property.key!;\n columns.push(\n columnHelper.accessor(key as any, {\n id: key,\n header: _props => {\n return property?.title || key;\n },\n cell: props => tableMeta.renders[key](props),\n }),\n );\n }\n return columns;\n }\n\n private _createProperties() {\n this.properties = this.$useComputed(() => {\n return this.$sdk.loadSchemaProperties(this.schema, 'table');\n });\n }\n\n private async _createTableMeta() {\n const properties: SchemaObject[] = [];\n const renders: Record<string, TypeTableCellRender<TData>> = {};\n if (!this.properties) return { properties, renders };\n const promises: Promise<any>[] = [];\n for (const property of this.properties) {\n const key = property.key!;\n // columnScope\n const columnScope = this.getColumnScope(key);\n // renderContext\n const jsxRenderContext = this.getColumnJsxRenderContext(columnScope);\n // columnProps\n const columnProps = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);\n // visible\n if (columnProps.visible === false) continue;\n // property\n properties.push(property);\n // render\n promises.push(this._createColumnRender(columnProps.render, property, columnProps, columnScope));\n }\n const res = await Promise.all(promises);\n properties.forEach((item, index) => (renders[item.key!] = res[index]));\n return { properties, renders };\n }\n\n public getColumnJsxRenderContext(celScope: ITableColumnScope): IJsxRenderContextTableColumn {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'tableColumn',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$table: this,\n };\n }\n\n public getCellJsxRenderContext(celScope: ITableCellScope, cellContext: CellContext<TData, any>): IJsxRenderContextTableCell {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'tableCell',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$table: this,\n cellContext,\n };\n }\n\n public async createColumnRender(key: string, render: TypeTableCellRenderComponent) {\n // columnScope\n const columnScope = this.getColumnScope(key);\n return await this._createColumnRender(render, undefined, undefined, columnScope);\n }\n\n private async _createColumnRender(\n render: TypeTableCellRenderComponent,\n property: SchemaObject | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope,\n ): Promise<TypeTableCellRender<TData, any>> {\n // renderProvider\n const renderProvider = this.getRenderProvider(render);\n // beanInstance\n let beanInstance: ITableCellRender | undefined;\n let onionOptions: IDecoratorTableCellOptions | undefined;\n if (typeof renderProvider === 'string' && renderProvider.includes('.tableCell.')) {\n beanInstance = await this.sys.bean._getBean(renderProvider as any, true);\n const beanOptions = appResource.getBean(renderProvider as any);\n onionOptions = beanOptions?.options as IDecoratorTableCellOptions | undefined;\n }\n return cellContext => {\n if (!cellContext) return;\n return this._cellRender(render, property, columnProps, columnScope, cellContext, renderProvider, beanInstance, onionOptions);\n };\n }\n\n private _cellRender(\n render: TypeTableCellRenderComponent,\n property: SchemaObject | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope,\n cellContext: CellContext<TData, any>,\n renderProvider: TypeTableCellRenderComponentProvider,\n beanInstance: ITableCellRender | undefined,\n onionOptions: IDecoratorTableCellOptions | undefined,\n ) {\n return this.zovaJsx.setTransientObject(\n {\n getValue: (name: string) => {\n return cellContext.row.getValue(name);\n },\n },\n () => {\n return this._cellRenderInner(render, property, columnProps, columnScope, cellContext, renderProvider, beanInstance, onionOptions);\n },\n );\n }\n\n private _cellRenderInner(\n render: TypeTableCellRenderComponent,\n property: SchemaObject | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope,\n cellContext: CellContext<TData, any>,\n renderProvider: TypeTableCellRenderComponentProvider,\n beanInstance: ITableCellRender | undefined,\n onionOptions: IDecoratorTableCellOptions | undefined,\n ) {\n // value\n const value = cellContext.getValue();\n // cellScope\n const cellScope: ITableCellScope = objectAssignReactive({}, columnScope, { value });\n // displayValue\n let displayValue = property?.rest?.displayValue !== undefined ? this.zovaJsx.evaluateExpression(property?.rest?.displayValue, cellScope) : value;\n if (displayValue === undefined || displayValue === null || displayValue === '') {\n displayValue = this.table.options.renderFallbackValue;\n }\n cellScope.displayValue = displayValue;\n // render: text\n if (renderProvider === 'text') {\n return displayValue;\n }\n // renderContext\n const jsxRenderContext = this.getCellJsxRenderContext(cellScope, cellContext);\n // beanInstance\n if (beanInstance) {\n // jsx: props\n let cellProps = isJsxComponent(render)\n ? this.zovaJsx.renderJsxProps(cast(render).props, { ...columnProps }, cellScope, jsxRenderContext)\n : columnProps;\n if (onionOptions) {\n cellProps = deepExtend({}, onionOptions, cellProps);\n }\n return beanInstance.render(cellProps ?? {}, jsxRenderContext, () => {\n const children = isJsxComponent(render) && cast(render).children;\n if (children && children.length > 0) {\n return this.zovaJsx.renderJsxChildrenDirect(children, cellScope, jsxRenderContext);\n } else {\n return displayValue;\n }\n });\n }\n // general component\n return this.zovaJsx.render(render, {}, cellScope, jsxRenderContext);\n }\n\n public getColumnProperty(name: string): SchemaObject | undefined {\n if (!this.properties) return;\n return this.properties.find(item => item.key === name);\n }\n\n private _getColumnCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n celEnv.registerFunction('getProperty(string):dyn', name => {\n return this.getColumnProperty(name);\n });\n celEnv.registerFunction('getValue(string):dyn', name => {\n return this.zovaJsx.transientObject.getValue(name);\n });\n return celEnv;\n }\n\n public getColumnScope(name: string, scopeExtra?: {}): ITableColumnScope {\n return objectAssignReactive({}, this.$props.tableScope, {\n name,\n property: this.getColumnProperty(name),\n ...scopeExtra,\n });\n }\n\n public getColumnComponentPropsTop(name: string, celScope: {}, renderContext: {}): ITableCellRenderColumnProps {\n const props: any = { [constColumnProps]: true, key: name, name };\n const property = this.getColumnProperty(name);\n if (!property) return props;\n const rest = property.rest;\n if (!rest) return props;\n const keys = Object.keys(rest).filter(item => !renderTableColumnTopPropsSystem.includes(item));\n if (keys.length === 0) return props;\n for (const key of keys) {\n const value = rest[key];\n let keyValue;\n if (key === 'render') {\n if (typeof value === 'string') {\n keyValue = this.zovaJsx.evaluateExpression(value, celScope);\n } else {\n keyValue = value;\n }\n } else {\n keyValue = this.zovaJsx.renderJsxOrCel(value, undefined, celScope, renderContext);\n }\n props[key] = keyValue;\n }\n return props;\n }\n\n public getRenderFlattern(render: TypeTableCellRenderComponent): TypeTableCellRenderComponent {\n return isJsxComponent(render) ? cast(render).type : render;\n }\n\n public getRenderProvider(render: TypeTableCellRenderComponent): TypeTableCellRenderComponentProvider {\n let renderProvider = this.getRenderFlattern(render);\n if (typeof renderProvider === 'string') {\n renderProvider = this.tableProvider.components?.[renderProvider] ?? renderProvider;\n }\n return (renderProvider ?? 'text') as TypeTableCellRenderComponentProvider;\n }\n}\n","import { FlexRender } from '@tanstack/vue-table';\nimport { BeanRenderBase } from 'zova';\nimport { Render } from 'zova-module-a-bean';\n\n@Render()\nexport class RenderTable extends BeanRenderBase {\n private _renderTableDefault() {\n const table = this.table;\n return (\n <table class=\"table\">\n <thead>\n <tr>\n {table.getFlatHeaders().map(header => {\n return (\n <th key={header.id}>\n <FlexRender render={header.column.columnDef.header} props={header.getContext()}></FlexRender>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {table.getRowModel().rows.map(row => {\n return (\n <tr key={row.id}>\n {row.getVisibleCells().map(cell => {\n return (\n <td key={cell.id}>\n <FlexRender render={cell.column.columnDef.cell} props={cell.getContext()}></FlexRender>\n </td>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n }\n\n public render() {\n return this.$slotDefault ? this.$slotDefault(this) : this._renderTableDefault();\n }\n}\n","import type { TypeControllerInnerProps } from 'zova';\n\nimport { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\n\nimport type { ControllerTableProps } from '../../component/table/controller.jsx';\n\nimport { ControllerTable } from '../../component/table/controller.jsx';\nimport { RenderTable } from '../../component/table/render.jsx';\nexport type TypeControllerTablePublicProps<TData extends {} = {}> = {\n controllerRef?: (ref: ControllerTable<TData>) => void;\n} & ControllerTableProps<TData>;\n\ntype ControllerInnerProps<TData extends {} = {}> = TypeControllerInnerProps<ControllerTableProps<TData>, keyof typeof ControllerTable.$propsDefault>;\ndeclare module 'zova-module-a-table' {\n export interface ControllerTable<TData extends {} = {}> {\n $props: ControllerInnerProps<TData>;\n }\n}\ndeclare module 'zova-module-a-table' {\n export interface RenderTable<TData extends {} = {}> extends ControllerTable<TData> {}\n}\nexport const ZTable = defineComponent(<TData extends {} = {}>(_props: TypeControllerTablePublicProps<TData>) => {\n useController(ControllerTable, RenderTable, undefined);\n return () => {};\n}, prepareComponentOptions());\n","import type { ZovaSys } from 'zova';\n\nexport const config = (_sys: ZovaSys) => {\n return {\n renderFallbackValue: '--',\n };\n};\n","// eslint-disable\n/** controller: begin */\nexport * from '../component/table/controller.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-a-table' {\n \n export interface ControllerTable {\n /** @internal */\n get scope(): ScopeModuleATable;\n } \n}\n/** controller: end */\n/** controller: begin */\nimport { ControllerTable } from '../component/table/controller.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'a-table.controller.table': ControllerTable;\n }\n}\n/** controller: end */\n\n/** components: begin */\nexport * from './component/table.js';\nimport { ZTable } from './component/table.js';\nexport const components = {\n 'table': ZTable,\n};\nimport 'zova';\ndeclare module 'zova' {\nexport interface IComponentRecord {\n 'a-table:table': ControllerTable;\n}\nexport interface IZovaComponentRecord {\n 'a-table:table': typeof ZTable;\n}\n}\n/** components: end */\n/** render: begin */\nexport * from '../component/table/render.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-a-table' {\n \n export interface RenderTable {\n /** @internal */\n get scope(): ScopeModuleATable;\n } \n}\n/** render: end */\n/** render: begin */\nimport { RenderTable } from '../component/table/render.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'a-table.render.table': RenderTable;\n }\n}\n/** render: end */\n/** config: begin */\nexport * from '../config/config.js';\nimport { config } from '../config/config.js';\n/** config: end */\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleATable extends BeanScopeBase {}\n\nexport interface ScopeModuleATable {\n util: BeanScopeUtil;\nconfig: TypeModuleConfig<typeof config>;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'a-table': ScopeModuleATable;\n }\n \n export interface IBeanScopeConfig {\n 'a-table': ReturnType<typeof config>;\n }\n\n \n\n \n}\n \n/** scope: end */\n","import type { RowData, Table } from '@tanstack/table-core';\nimport type { TableOptionsWithReactiveData } from '@tanstack/vue-table';\n\nimport { useVueTable } from '@tanstack/vue-table';\nimport { markRaw } from 'vue';\nimport { BeanControllerPageBase } from 'zova';\n\nexport class BeanControllerPageTableBase extends BeanControllerPageBase {\n public $useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData> {\n return this.ctx.util.instanceScope(() => {\n return markRaw(useVueTable(initialOptions));\n });\n }\n}\n","import { createBeanDecorator } from 'zova';\n\nimport type { IDecoratorTableCellOptions } from '../types/tableCell.js';\n\nexport function TableCell<T extends IDecoratorTableCellOptions>(options?: T): ClassDecorator {\n return createBeanDecorator('tableCell', 'sys', true, options);\n}\n"],"mappings":";;;;;;;;AAGA,IAAS,0BAAT,cAA2C,mBAAM;CACjD,UAAS,gBAAmB;AAC5B,SAAS,KAAA,IAAA,KAAA,oBAAgC;;IAEnC;;;;;ACPN,IAAa,mBAAc;;;;;;;;;;;;;;;;;;;;ACqC3B,IACae,mBAAeC,SAD3BL,YAAY,EAAAM,UAAAC,SAAA,EAAAC,QAAA,WAAA,CAAA,EAAAC,QAYVZ,SAAQ,YAAE,EAAAa,QAAAC,QAAAC,SAAA,eAAA,OAAAC,wBAAA,cAAAC,SAAAD,oBAAA,EAAAR,OAAAU,WAAAT,QAAAS,YAAAC,WAAAC,mBAZb,MACab,wBAA+CF,wBAAwB;CAAAgB,YAAA,GAAAC,MAAA;AAAA,QAAA,GAAAA,KAAA;AAAA,OAGlFC,aAAU,KAAA;AAAA,OACVC,UAAO,KAAA;AAAA,OACPC,QAAK,KAAA;AAAA,OACLC,gBAAa,KAAA;AAAA,OACbC,YAAS,KAAA;AAAA,OACTC,UAAO,KAAA;AAAA,OACPC,eAAY,KAAA;AAAAC,6BAAA,MAAA,yBAAAC,aAAA,KAAA;;CAKZ,MAAgBC,WAAW;AACzB,OAAKC,KAAKC,SAAS,WAAW,KAAK;AACnC,OAAKR,gBAAgB,KAAKS,mBAAmB;AAC3C,UAAOrC,WACL,EAAE,EACF,KAAKsC,sBAAsBC,OAAOC,aAAaC,UAC/C,K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AAA,CAAA,CAAA;;CAMHM,SAAS;AACd,SAAO,KAAKC,eAAe,KAAKA,aAAa,KAAK,GAAG,KAAKhB,qBAAqB;;EAElF,IAAAD,SAAA,IAAAA;;;;ACtCD,eAAc,iBAAA,aAAgC,KAAA,EAAG;;GAEjD,yBAA2B,CAAA;;;ACP3B,IAAa,UAAS,SAAQ;UAE9B,qBAAuB,MACrB;;;;;;ACHF,IAAG,MAAO,OAAA;AAeV,IAAA,aAAA,EACE,SAAE,QACH;AAiBD,IAAQ,qBAAc,OAAA,OAAA,EAAA,QAAA,SAAA,EACtB,QAAO,WACN,CAAC,EAAE,KAAC,SAAa,MAAC,SAAA,MAAe,0BAAA,cAAA,GAAA,IAAA,OAAA,IAAA;;;;ACjClC,IAAS,8BAAT,cAAiD,uBAAA;CACjD,UAAS,gBAAmB;AAC5B,SAAS,KAAA,IAAA,KAAA,oBAAoC;;IAEvC;;;;;;ACLN,QAAO,oBAAO,aAA4B,OAAO,MAAG,QAAM"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["celEnvBase","isNilOrEmptyString","createColumnHelper","getCoreRowModel","appResource","cast","deepEqual","deepExtend","objectAssignReactive","Use","isJsxComponent","ZovaJsx","Controller","BeanControllerTableBase","ControllerTable","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","BeanResourceProviders","Object","_class","_class2","_ControllerTable","constructor","args","properties","columns","table","tableProvider","tableMeta","zovaJsx","columnCelEnv","_initializerDefineProperty","_descriptor","__init__","bean","_setBean","$useComputed","$$beanResourceProviders","$props","_getColumnCelEnv","app","_newBeanSimple","components","actions","_createProperties","refreshMeta","$watch","schema","newValue","oldValue","_createTable","data","_createTableMeta","_createColumns","self","tableOptions","getRowId","row","id","renderFallbackValue","scope","config","manualPagination","$useTable","getColumns","_createColumnsMiddle","key","render","columnScope","getColumnScope","jsxRenderContext","getColumnJsxRenderContext","visible","columnProps","getColumnComponentPropsTop","_createColumnRender","columnHelper","property","push","accessor","header","_props","title","cell","props","renders","$sdk","loadSchemaProperties","promises","res","Promise","all","filter","_item","index","item","forEach","celScope","ctx","$scene","$host","$celScope","$jsx","$$table","getCellJsxRenderContext","cellContext","cellRenderPrepare","Array","isArray","renderProviders","map","getRenderProvider","renderProvider","includes","sys","_getBean","renderContext","beanInstance","beanOptions","getBean","onionOptions","options","renderJsxProps","checkVisible","_cellRender","undefined","cellRender","cellScope","_getBeanSyncOnly","cellProps","setTransientObject","getValue","name","_cellRenderInner","value","fallbackValue","children","length","renderJsxChildrenDirect","getColumnProperty","find","celEnv","clone","registerFunction","transientObject","scopeExtra","tableScope","rest","_getColumnComponentPropsTopByRest","_renderContext","evaluateExpression","assign","render2","Error","$propsDefault","_applyDecoratedDescriptor","prototype","configurable","enumerable","writable","initializer","FlexRender","BeanRenderBase","Render","RenderTable","_dec","_dec2","__z_BeanInfo","module","_class","_renderTableDefault","table","_createVNode","getFlatHeaders","map","header","id","column","columnDef","getContext","getRowModel","rows","row","getVisibleCells","cell","render","$slotDefault"],"sources":["../src/lib/beanControllerTableBase.ts","../src/component/table/controller.tsx","../src/component/table/render.tsx","../src/.metadata/component/table.ts","../src/config/config.ts","../src/.metadata/index.ts","../src/lib/beanControllerPageTableBase.ts","../src/lib/tableCell.ts"],"sourcesContent":["import type { RowData, Table } from '@tanstack/table-core';\nimport type { TableOptionsWithReactiveData } from '@tanstack/vue-table';\n\nimport { useVueTable } from '@tanstack/vue-table';\nimport { markRaw } from 'vue';\nimport { BeanControllerBase } from 'zova';\n\nexport class BeanControllerTableBase extends BeanControllerBase {\n public $useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData> {\n return this.ctx.util.instanceScope(() => {\n return markRaw(useVueTable(initialOptions));\n });\n }\n\n public async refreshMeta() {\n throw new Error('should implement refreshMeta');\n }\n}\n","import type {\n IResourceActionRowOptionsBase,\n ISchemaObjectExtensionFieldRest,\n ITableProvider,\n TypeTableCellRenderComponent,\n TypeTableCellRenderComponentProvider,\n} from 'zova-module-a-openapi';\n\nimport { celEnvBase, isNilOrEmptyString } from '@cabloy/utils';\nimport { CellContext, createColumnHelper, getCoreRowModel, TableOptionsWithReactiveData } from '@tanstack/vue-table';\nimport { SchemaObject } from 'openapi3-ts/oas31';\nimport { VNode } from 'vue';\nimport { appResource, cast, deepEqual, deepExtend, objectAssignReactive, Use } from 'zova';\nimport { isJsxComponent, ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { BeanResourceProviders } from 'zova-module-a-openapi';\n\nimport type { ITableMeta, TypeColumn, TypeTable, TypeTableGetColumns } from '../../types/table.js';\nimport type { IDecoratorTableCellOptions, IJsxRenderContextTableCell, ITableCellRender } from '../../types/tableCell.js';\n\nimport { BeanControllerTableBase } from '../../lib/beanControllerTableBase.js';\nimport {\n ITableCellRenderColumnOptions,\n type IJsxRenderContextTableColumn,\n type ITableCellRenderColumnProps,\n type ITableCellScope,\n type ITableColumnScope,\n type ITableScope,\n type TypeTableCellRender,\n} from '../../types/tableColumn.js';\n\nexport interface ControllerTableProps<TData extends {} = {}> {\n data?: TData[];\n schema?: SchemaObject;\n tableProvider?: ITableProvider;\n tableScope?: ITableScope;\n getColumns?: TypeTableGetColumns<TData>;\n slotDefault?: (table: ControllerTable<TData>) => VNode;\n}\n\n@Controller()\nexport class ControllerTable<TData extends {} = {}> extends BeanControllerTableBase {\n static $propsDefault = {};\n\n properties: SchemaObject[] | undefined;\n columns: TypeColumn<TData>[];\n table: TypeTable<TData>;\n tableProvider: ITableProvider;\n tableMeta: ITableMeta<TData>;\n zovaJsx: ZovaJsx;\n columnCelEnv: typeof celEnvBase;\n\n @Use()\n $$beanResourceProviders: BeanResourceProviders;\n\n protected async __init__() {\n this.bean._setBean('$$table', this);\n this.tableProvider = this.$useComputed(() => {\n const tableProvider = this.$$beanResourceProviders.tableProvider;\n return this.$props.tableProvider ? deepExtend({}, tableProvider, this.$props.tableProvider) : tableProvider;\n });\n // jsx\n this.columnCelEnv = this._getColumnCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.tableProvider.components, this.tableProvider.actions, this.columnCelEnv);\n // properties\n this._createProperties();\n // tableMeta/columns\n await this.refreshMeta();\n // watch\n this.$watch(\n () => this.$props.schema,\n async (newValue, oldValue) => {\n if (deepEqual(newValue, oldValue)) return;\n await this.refreshMeta();\n },\n );\n // table\n this._createTable();\n }\n\n get schema() {\n return this.$props.schema;\n }\n\n get data() {\n return this.$props.data;\n }\n\n public async refreshMeta() {\n this.tableMeta = await this._createTableMeta();\n this.columns = await this._createColumns();\n }\n\n private _createTable() {\n // eslint-disable-next-line\n const self = this;\n const tableOptions: TableOptionsWithReactiveData<TData> = {\n getRowId: (row: TData) => cast(row).id,\n getCoreRowModel: getCoreRowModel(),\n renderFallbackValue: this.scope.config.renderFallbackValue,\n manualPagination: true,\n get data() {\n return self.data || [];\n },\n get columns() {\n return self.columns;\n },\n };\n this.table = this.$useTable(tableOptions);\n }\n\n private async _createColumns() {\n if (!this.properties) return [];\n if (!this.$props.getColumns) return await this._createColumnsMiddle(this.tableMeta.properties);\n return await this.$props.getColumns(\n async properties => {\n return await this._createColumnsMiddle(properties ?? this.tableMeta.properties);\n },\n async (key: string, render: TypeTableCellRenderComponent): Promise<TypeTableCellRender<TData, any> | undefined> => {\n // columnScope\n const columnScope = this.getColumnScope(key);\n // renderContext\n const jsxRenderContext = this.getColumnJsxRenderContext(columnScope);\n // columnProps\n const { visible, columnProps } = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);\n // visible\n if (visible === false) return;\n return await this._createColumnRender(render, columnProps, columnScope, jsxRenderContext);\n },\n this,\n );\n }\n\n private async _createColumnsMiddle(properties: SchemaObject[]): Promise<TypeColumn<TData>[]> {\n const tableMeta = this.tableMeta;\n const columnHelper = createColumnHelper<TData>();\n const columns: TypeColumn<TData>[] = [];\n for (const property of properties) {\n const key = property.key!;\n columns.push(\n columnHelper.accessor(key as any, {\n id: key,\n header: _props => {\n return property?.title || key;\n },\n cell: props => tableMeta.renders[key](props),\n }),\n );\n }\n return columns;\n }\n\n private _createProperties() {\n this.properties = this.$useComputed(() => {\n return this.$sdk.loadSchemaProperties(this.schema, 'table');\n });\n }\n\n private async _createTableMeta() {\n let properties: SchemaObject[] = [];\n const renders: Record<string, TypeTableCellRender<TData>> = {};\n if (!this.properties) return { properties, renders };\n const promises: Promise<any>[] = [];\n for (const property of this.properties) {\n const key = property.key!;\n // columnScope\n const columnScope = this.getColumnScope(key);\n // renderContext\n const jsxRenderContext = this.getColumnJsxRenderContext(columnScope);\n // columnProps\n const { visible, render, columnProps } = this.getColumnComponentPropsTop(key, columnScope, jsxRenderContext);\n // visible\n if (visible === false) continue;\n // property\n properties.push(property);\n // render\n promises.push(this._createColumnRender(render, columnProps, columnScope, jsxRenderContext));\n }\n let res = await Promise.all(promises);\n properties = properties.filter((_item, index) => !!res[index]);\n res = res.filter(item => !!item);\n properties.forEach((item, index) => {\n renders[item.key!] = res[index];\n });\n return { properties, renders };\n }\n\n public getColumnJsxRenderContext(celScope: ITableColumnScope): IJsxRenderContextTableColumn {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'tableColumn',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$table: this,\n };\n }\n\n public getCellJsxRenderContext(celScope: ITableCellScope, cellContext: CellContext<TData, any>): IJsxRenderContextTableCell {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'tableCell',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$table: this,\n cellContext,\n };\n }\n\n public async cellRenderPrepare(renders: TypeTableCellRenderComponent | TypeTableCellRenderComponent[]) {\n if (!Array.isArray(renders)) renders = [renders];\n const renderProviders = renders.map(item => this.getRenderProvider(item));\n const promises: Promise<any>[] = renderProviders.map(renderProvider =>\n (async () => {\n if (typeof renderProvider === 'string' && renderProvider.includes('.tableCell.')) {\n return await this.sys.bean._getBean(renderProvider as any, true);\n }\n })(),\n );\n return await Promise.all(promises);\n }\n\n private async _createColumnRender(\n render: TypeTableCellRenderComponent | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope,\n renderContext: IJsxRenderContextTableColumn,\n ): Promise<TypeTableCellRender<TData, any> | undefined> {\n // renderProvider\n const renderProvider = this.getRenderProvider(render);\n // beanInstance\n let beanInstance: ITableCellRender | undefined;\n if (typeof renderProvider === 'string' && renderProvider.includes('.tableCell.')) {\n beanInstance = await this.sys.bean._getBean(renderProvider as any, true);\n const beanOptions = appResource.getBean(renderProvider as any);\n const onionOptions = beanOptions?.options as IDecoratorTableCellOptions | undefined;\n columnProps = deepExtend({}, onionOptions, columnProps);\n columnProps = this.zovaJsx.renderJsxProps(columnProps as any, {}, columnScope, renderContext) as any;\n if (beanInstance?.checkVisible && !(await beanInstance.checkVisible(columnProps as any, renderContext))) return;\n }\n return cellContext => {\n if (!cellContext) return;\n return this._cellRender(render, columnProps, columnScope, cellContext, renderProvider, beanInstance, undefined, undefined, undefined);\n };\n }\n\n public cellRender(render: TypeTableCellRenderComponent, columnProps: IResourceActionRowOptionsBase, renderContext: IJsxRenderContextTableCell) {\n // render\n const cellScope = renderContext.$celScope;\n // renderProvider\n const renderProvider = this.getRenderProvider(render);\n // beanInstance\n let beanInstance: ITableCellRender | undefined;\n if (typeof renderProvider === 'string' && renderProvider.includes('.tableCell.')) {\n beanInstance = this.sys.bean._getBeanSyncOnly(renderProvider as any);\n const beanOptions = appResource.getBean(renderProvider as any);\n const onionOptions = beanOptions?.options as IDecoratorTableCellOptions | undefined;\n columnProps = deepExtend({}, onionOptions, columnProps);\n columnProps = this.zovaJsx.renderJsxProps(columnProps as any, {}, renderContext.$celScope, renderContext) as any;\n }\n // const cellProps = isJsxComponent(render) ? Object.assign({}, columnProps, cast(render).props) : columnProps;\n const cellProps = columnProps;\n return this._cellRender(\n render,\n columnProps as ITableCellRenderColumnProps,\n undefined,\n renderContext.cellContext,\n renderProvider,\n beanInstance,\n cellProps,\n cellScope,\n renderContext,\n );\n }\n\n private _cellRender(\n render: TypeTableCellRenderComponent | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope | undefined,\n cellContext: CellContext<TData, any>,\n renderProvider: TypeTableCellRenderComponentProvider,\n beanInstance: ITableCellRender | undefined,\n cellProps: any | undefined,\n cellScope: ITableCellScope | undefined,\n jsxRenderContext: IJsxRenderContextTableCell | undefined,\n ) {\n return this.zovaJsx.setTransientObject(\n {\n getValue: (name: string) => {\n return cellContext.row.getValue(name);\n },\n },\n () => {\n return this._cellRenderInner(\n render,\n columnProps,\n columnScope,\n cellContext,\n renderProvider,\n beanInstance,\n cellProps,\n cellScope,\n jsxRenderContext,\n );\n },\n );\n }\n\n private _cellRenderInner(\n render: TypeTableCellRenderComponent | undefined,\n columnProps: ITableCellRenderColumnProps | undefined,\n columnScope: ITableColumnScope | undefined,\n cellContext: CellContext<TData, any>,\n renderProvider: TypeTableCellRenderComponentProvider,\n beanInstance: ITableCellRender | undefined,\n cellProps: any | undefined,\n cellScope: ITableCellScope | undefined,\n jsxRenderContext: IJsxRenderContextTableCell | undefined,\n ) {\n // value\n const value = cellContext.getValue();\n // renderFallbackValue\n const fallbackValue = this.table.options.renderFallbackValue;\n // cellScope\n if (!cellScope) {\n cellScope = objectAssignReactive({}, columnScope, { value, fallbackValue })!;\n }\n // render: text\n if (renderProvider === 'text') {\n return isNilOrEmptyString(value) ? fallbackValue : value;\n }\n // renderContext\n if (!jsxRenderContext) {\n jsxRenderContext = this.getCellJsxRenderContext(cellScope, cellContext);\n }\n // beanInstance\n if (beanInstance) {\n // jsx: props\n if (!cellProps) {\n // cellProps = isJsxComponent(render) ? Object.assign({}, columnProps, cast(render).props) : columnProps;\n cellProps = columnProps;\n }\n // const cellProps2 = this.zovaJsx.renderJsxProps(cellProps, {}, cellScope, jsxRenderContext);\n return beanInstance.render(cellProps, jsxRenderContext, () => {\n const children = isJsxComponent(render) && cast(render).children;\n if (children && children.length > 0) {\n return this.zovaJsx.renderJsxChildrenDirect(children, cellScope, jsxRenderContext);\n } else {\n return value;\n }\n });\n }\n // general component\n return this.zovaJsx.render(render!, {}, cellScope, jsxRenderContext);\n }\n\n public getColumnProperty(name: string): SchemaObject | undefined {\n if (!this.properties) return;\n return this.properties.find(item => item.key === name);\n }\n\n private _getColumnCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n celEnv.registerFunction('getProperty(string):dyn', name => {\n return this.getColumnProperty(name);\n });\n celEnv.registerFunction('getValue(string):dyn', name => {\n return this.zovaJsx.transientObject.getValue(name);\n });\n return celEnv;\n }\n\n public getColumnScope(name: string, scopeExtra?: {}): ITableColumnScope {\n return objectAssignReactive({}, this.$props.tableScope, {\n name,\n property: this.getColumnProperty(name),\n ...scopeExtra,\n });\n }\n\n public getColumnComponentPropsTop(name: string, celScope: {}, renderContext: {}): ITableCellRenderColumnOptions {\n const property = this.getColumnProperty(name);\n const rest = property?.rest;\n return this._getColumnComponentPropsTopByRest(rest, name, celScope, renderContext);\n }\n\n private _getColumnComponentPropsTopByRest(\n rest: ISchemaObjectExtensionFieldRest | undefined,\n name: string,\n celScope: {},\n _renderContext: {},\n ): ITableCellRenderColumnOptions {\n const visible = this.zovaJsx.evaluateExpression(rest?.visible, celScope);\n const render = rest?.render as TypeTableCellRenderComponent | undefined;\n const columnProps = Object.assign({ key: name }, cast(rest)?.columnProps);\n return { visible, render, columnProps };\n }\n\n // public getRenderFlattern(render: TypeTableCellRenderComponent): TypeTableCellRenderComponent {\n // return isJsxComponent(render) ? cast(render).type : render;\n // }\n\n public getRenderProvider(render: TypeTableCellRenderComponent | undefined): TypeTableCellRenderComponentProvider {\n if (!render) return 'text';\n if (typeof render === 'string') {\n const render2 = this.tableProvider.components?.[render];\n if (!render2) throw new Error(`not found table cell component of: ${render}`);\n return render2;\n }\n return render;\n }\n}\n","import { FlexRender } from '@tanstack/vue-table';\nimport { BeanRenderBase } from 'zova';\nimport { Render } from 'zova-module-a-bean';\n\n@Render()\nexport class RenderTable extends BeanRenderBase {\n private _renderTableDefault() {\n const table = this.table;\n return (\n <table class=\"table\">\n <thead>\n <tr>\n {table.getFlatHeaders().map(header => {\n return (\n <th key={header.id}>\n <FlexRender\n render={header.column.columnDef.header}\n props={header.getContext()}\n ></FlexRender>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {table.getRowModel().rows.map(row => {\n return (\n <tr key={row.id}>\n {row.getVisibleCells().map(cell => {\n return (\n <td key={cell.id}>\n <FlexRender\n render={cell.column.columnDef.cell}\n props={cell.getContext()}\n ></FlexRender>\n </td>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n }\n\n public render() {\n return this.$slotDefault ? this.$slotDefault(this) : this._renderTableDefault();\n }\n}\n","import type { TypeControllerInnerProps } from 'zova';\n\nimport { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\n\nimport type { ControllerTableProps } from '../../component/table/controller.jsx';\n\nimport { ControllerTable } from '../../component/table/controller.jsx';\nimport { RenderTable } from '../../component/table/render.jsx';\nexport type TypeControllerTablePublicProps<TData extends {} = {}> = {\n controllerRef?: (ref: ControllerTable<TData>) => void;\n} & ControllerTableProps<TData>;\n\ntype ControllerInnerProps<TData extends {} = {}> = TypeControllerInnerProps<\n ControllerTableProps<TData>,\n keyof typeof ControllerTable.$propsDefault\n>;\ndeclare module 'zova-module-a-table' {\n export interface ControllerTable<TData extends {} = {}> {\n $props: ControllerInnerProps<TData>;\n }\n}\ndeclare module 'zova-module-a-table' {\n export interface RenderTable<TData extends {} = {}> extends ControllerTable<TData> {}\n}\nexport const ZTable = defineComponent(\n <TData extends {} = {}>(_props: TypeControllerTablePublicProps<TData>) => {\n useController(ControllerTable, RenderTable, undefined);\n return () => {};\n },\n prepareComponentOptions(),\n);\n","import type { ZovaSys } from 'zova';\n\nexport const config = (_sys: ZovaSys) => {\n return {\n renderFallbackValue: '--',\n };\n};\n","// eslint-disable\n/** controller: begin */\nexport * from '../component/table/controller.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-a-table' {\n \n export interface ControllerTable {\n /** @internal */\n get scope(): ScopeModuleATable;\n } \n}\n/** controller: end */\n/** controller: begin */\nimport { ControllerTable } from '../component/table/controller.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'a-table.controller.table': ControllerTable;\n }\n}\n/** controller: end */\n\n/** components: begin */\nexport * from './component/table.js';\nimport { ZTable } from './component/table.js';\nexport const components = {\n 'table': ZTable,\n};\nimport 'zova';\ndeclare module 'zova' {\nexport interface IComponentRecord {\n 'a-table:table': ControllerTable;\n}\nexport interface IZovaComponentRecord {\n 'a-table:table': typeof ZTable;\n}\n}\n/** components: end */\n/** render: begin */\nexport * from '../component/table/render.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-a-table' {\n \n export interface RenderTable {\n /** @internal */\n get scope(): ScopeModuleATable;\n } \n}\n/** render: end */\n/** render: begin */\nimport { RenderTable } from '../component/table/render.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'a-table.render.table': RenderTable;\n }\n}\n/** render: end */\n/** config: begin */\nexport * from '../config/config.js';\nimport { config } from '../config/config.js';\n/** config: end */\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleATable extends BeanScopeBase {}\n\nexport interface ScopeModuleATable {\n util: BeanScopeUtil;\nconfig: TypeModuleConfig<typeof config>;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'a-table': ScopeModuleATable;\n }\n \n export interface IBeanScopeConfig {\n 'a-table': ReturnType<typeof config>;\n }\n\n \n\n \n}\n \n/** scope: end */\n","import type { RowData, Table } from '@tanstack/table-core';\nimport type { TableOptionsWithReactiveData } from '@tanstack/vue-table';\n\nimport { useVueTable } from '@tanstack/vue-table';\nimport { markRaw } from 'vue';\nimport { BeanControllerPageBase } from 'zova';\n\nexport class BeanControllerPageTableBase extends BeanControllerPageBase {\n public $useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData> {\n return this.ctx.util.instanceScope(() => {\n return markRaw(useVueTable(initialOptions));\n });\n }\n\n public async refreshMeta() {\n throw new Error('should implement refreshMeta');\n }\n}\n","import { createBeanDecorator } from 'zova';\n\nimport type { IDecoratorTableCellOptions } from '../types/tableCell.js';\n\nexport function TableCell<T extends IDecoratorTableCellOptions>(options?: T): ClassDecorator {\n return createBeanDecorator('tableCell', 'sys', true, options);\n}\n"],"mappings":";;;;;;;AAGA,IAAS,0BAAT,cAA2C,mBAAM;CACjD,UAAS,gBAAmB;AAC5B,SAAS,KAAA,IAAA,KAAA,oBAAgC;;IAEnC;;CAEJ,MAAE,cAAgB;AAChB,QAAE,IAAO,MAAO,+BAA6B;;;;;;;;;;;;;;;;;;;;;;AC8BjD,IACac,mBAAeC,SAD3BH,YAAY,EAAAI,UAAAC,SAAA,EAAAC,QAAA,WAAA,CAAA,EAAAC,QAYVV,IAAG,mCAAE,EAAAW,QAAAC,QAAAC,SAAA,eAAA,OAAAC,0BAAA,cAAAC,SAAAD,sBAAA,EAAAR,OAAAU,WAAAT,QAAAS,YAAAC,WAAAC,mBAZR,MACab,wBAA+CD,wBAAwB;CAAAe,YAAA,GAAAC,MAAA;AAAA,QAAA,GAAAA,KAAA;AAAA,OAGlFC,aAAU,KAAA;AAAA,OACVC,UAAO,KAAA;AAAA,OACPC,QAAK,KAAA;AAAA,OACLC,gBAAa,KAAA;AAAA,OACbC,YAAS,KAAA;AAAA,OACTC,UAAO,KAAA;AAAA,OACPC,eAAY,KAAA;AAAAC,6BAAA,MAAA,2BAAAC,aAAA,KAAA;;CAKZ,MAAgBC,WAAW;AACzB,OAAKC,KAAKC,SAAS,WAAW,KAAK;AACnC,OAAKR,gBAAgB,KAAKS,mBAAmB;GAC3C,MAAMT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cAAiD,uBAAA;CACjD,UAAS,gBAAmB;AAC5B,SAAS,KAAA,IAAA,KAAA,oBAAoC;;IAEvC;;CAEJ,MAAE,cAAgB;AAChB,QAAE,IAAO,MAAO,+BAA6B;;;;;;ACRjD,QAAO,oBAAO,aAA4B,OAAO,MAAG,QAAM"}
|
|
@@ -3,5 +3,6 @@ import type { TableOptionsWithReactiveData } from '@tanstack/vue-table';
|
|
|
3
3
|
import { BeanControllerPageBase } from 'zova';
|
|
4
4
|
export declare class BeanControllerPageTableBase extends BeanControllerPageBase {
|
|
5
5
|
$useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData>;
|
|
6
|
+
refreshMeta(): Promise<void>;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=beanControllerPageTableBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beanControllerPageTableBase.d.ts","sourceRoot":"","sources":["../../src/lib/beanControllerPageTableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAC;AAE9C,qBAAa,2BAA4B,SAAQ,sBAAsB;IAC9D,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"beanControllerPageTableBase.d.ts","sourceRoot":"","sources":["../../src/lib/beanControllerPageTableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAC;AAE9C,qBAAa,2BAA4B,SAAQ,sBAAsB;IAC9D,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;IAM7F,WAAW;CAGzB"}
|
|
@@ -3,5 +3,6 @@ import type { TableOptionsWithReactiveData } from '@tanstack/vue-table';
|
|
|
3
3
|
import { BeanControllerBase } from 'zova';
|
|
4
4
|
export declare class BeanControllerTableBase extends BeanControllerBase {
|
|
5
5
|
$useTable<TData extends RowData>(initialOptions: TableOptionsWithReactiveData<TData>): Table<TData>;
|
|
6
|
+
refreshMeta(): Promise<void>;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=beanControllerTableBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beanControllerTableBase.d.ts","sourceRoot":"","sources":["../../src/lib/beanControllerTableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,kBAAkB;IACtD,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"beanControllerTableBase.d.ts","sourceRoot":"","sources":["../../src/lib/beanControllerTableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,kBAAkB;IACtD,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;IAM7F,WAAW;CAGzB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
|