cabloy 5.1.170 → 5.1.172

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.
@@ -46,10 +46,14 @@ export interface IDtoOptionsStudentSelectResItem extends IDecoratorDtoOptions {}
46
46
  requiresSelection: true,
47
47
  selectedMaxIds: 100,
48
48
  }),
49
+ ZovaRender.tableActionBulk('basic-table:actionRefresh', {
50
+ permission: { public: true },
51
+ placement: 'end',
52
+ }),
49
53
  ZovaRender.tableActionBulk('basic-table:actionColumnConfig', {
50
54
  permission: { public: true },
51
55
  placement: 'end',
52
- } as any),
56
+ }),
53
57
  ],
54
58
  }),
55
59
  ZovaRender.block('basic-page:blockTable'),
@@ -103,6 +103,11 @@ describe('student.test.ts', { concurrency: false }, () => {
103
103
  );
104
104
  assert.equal(deleteBulkAction?.options?.requiresSelection, true);
105
105
  assert.equal(deleteBulkAction?.options?.selectedMaxIds, 100);
106
+ const refreshAction = toolbarBlock?.options?.actions?.find(
107
+ (action: any) => action.render === 'basic-table:actionRefresh',
108
+ );
109
+ assert.equal(refreshAction?.options?.requiresSelection, undefined);
110
+ assert.equal(refreshAction?.options?.selectedMaxIds, undefined);
106
111
  const columnConfigAction = toolbarBlock?.options?.actions?.find(
107
112
  (action: any) => action.render === 'basic-table:actionColumnConfig',
108
113
  );
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli",
3
- "version": "1.2.108",
3
+ "version": "1.2.109",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  "@cabloy/process-helper": "^3.1.8",
45
45
  "fs-extra": "^11.3.5",
46
46
  "semver": "^7.6.2",
47
- "zova-cli-set-front": "^1.2.106"
47
+ "zova-cli-set-front": "^1.2.107"
48
48
  },
49
49
  "devDependencies": {
50
50
  "clean-package": "^2.2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.106",
3
+ "version": "1.2.107",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
@@ -45,6 +45,13 @@ declare module '@cabloy/cli' {
45
45
  }
46
46
  }
47
47
 
48
+ interface IBinBuildRestPackageJson {
49
+ name: string;
50
+ version: string;
51
+ dependencies?: Record<string, string>;
52
+ [key: string]: unknown;
53
+ }
54
+
48
55
  interface IBinBuildRestContext {
49
56
  projectPath: string;
50
57
  flavor: ZovaMetaFlavor;
@@ -54,6 +61,7 @@ interface IBinBuildRestContext {
54
61
  outDir: string;
55
62
  bundleModules?: string[];
56
63
  sideEffectImportModuleNames?: string[];
64
+ packageJson?: IBinBuildRestPackageJson;
57
65
  }
58
66
 
59
67
  export class CliBinBuildRest extends BeanCliBase {
@@ -129,6 +137,7 @@ export class CliBinBuildRest extends BeanCliBase {
129
137
  const templateDir = this.template.resolveTemplatePath(__ThisSetName__, 'rest');
130
138
  // render
131
139
  await this.template.renderDir(srcDir, templateDir);
140
+ context.packageJson = await loadJSONFile(path.join(srcDir, 'package.json'));
132
141
  }
133
142
 
134
143
  async _buildTs({ srcDir, outDir }: IBinBuildRestContext) {
@@ -204,7 +213,7 @@ export class CliBinBuildRest extends BeanCliBase {
204
213
  }
205
214
 
206
215
  async _build(buildContext: IBinBuildRestContext) {
207
- const { projectPath, flavor, bundleNameCopy, srcDir, outDir } = buildContext;
216
+ const { projectPath, flavor, bundleNameCopy, outDir, packageJson } = buildContext;
208
217
  // build
209
218
  await this._buildTs(buildContext);
210
219
  await this._buildDts(buildContext);
@@ -212,8 +221,10 @@ export class CliBinBuildRest extends BeanCliBase {
212
221
  const deps = await _extractDeps(path.join(outDir, 'index.d.mts'));
213
222
  const depsVersion = await _extractDepsVersion(projectPath, deps);
214
223
  // package.json
215
- const pkgContent = await loadJSONFile(path.join(srcDir, 'package.json'));
216
- pkgContent.dependencies = depsVersion;
224
+ const pkgContent = {
225
+ ...packageJson!,
226
+ dependencies: depsVersion,
227
+ };
217
228
  await saveJSONFile(path.join(outDir, 'package.json'), pkgContent);
218
229
  // await fse.copyFile(path.join(srcDir, 'package.json'), path.join(outDir, 'package.json'));
219
230
  // release
@@ -77,7 +77,7 @@ importers:
77
77
  version: 10.6.0(postcss@8.5.28)
78
78
  axios:
79
79
  specifier: ^1.18.1
80
- version: 1.20.0(supports-color@10.2.2)
80
+ version: 1.20.0
81
81
  compression:
82
82
  specifier: ^1.8.1
83
83
  version: 1.8.2
@@ -366,7 +366,7 @@ importers:
366
366
  devDependencies:
367
367
  '@cabloy/cli':
368
368
  specifier: ^3.1.29
369
- version: 3.1.29(supports-color@10.2.2)(vue@3.5.42(typescript@5.9.3))
369
+ version: 3.1.29(vue@3.5.42(typescript@5.9.3))
370
370
  '@cabloy/lint':
371
371
  specifier: ^5.1.32
372
372
  version: 5.1.32(@typescript-eslint/eslint-plugin@8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.10.0(jiti@2.7.0))(supports-color@10.2.2)(typescript@5.9.3))(eslint@10.10.0(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.70.0(typescript@5.9.3))(@typescript-eslint/utils@8.70.0(eslint@10.10.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.10.0(jiti@2.7.0))(oxfmt@0.62.0)(oxlint@1.82.0)(supports-color@10.2.2)(typescript@5.9.3)(vue-eslint-parser@10.4.1(eslint@10.10.0(jiti@2.7.0)))
@@ -441,7 +441,7 @@ importers:
441
441
  dependencies:
442
442
  '@cabloy/cli':
443
443
  specifier: ^3.1.29
444
- version: 3.1.29(supports-color@10.2.2)(vue@3.5.42(typescript@5.9.3))
444
+ version: 3.1.29(vue@3.5.42(typescript@5.9.3))
445
445
  '@cabloy/process-helper':
446
446
  specifier: ^3.1.8
447
447
  version: 3.1.8
@@ -475,7 +475,7 @@ importers:
475
475
  version: 7.29.7(@babel/core@7.29.7)
476
476
  '@cabloy/cli':
477
477
  specifier: ^3.1.29
478
- version: 3.1.29(supports-color@10.2.2)(vue@3.5.42(typescript@5.9.3))
478
+ version: 3.1.29(vue@3.5.42(typescript@5.9.3))
479
479
  '@cabloy/extend':
480
480
  specifier: ^3.2.8
481
481
  version: 3.2.8
@@ -873,7 +873,7 @@ importers:
873
873
  specifier: ^5.1.89
874
874
  version: link:../zova-core
875
875
  zova-suite-a-zova:
876
- specifier: ^5.1.160
876
+ specifier: ^5.1.161
877
877
  version: link:../../src/suite-vendor/a-zova
878
878
  devDependencies:
879
879
  clean-package:
@@ -977,7 +977,7 @@ importers:
977
977
  src/suite-vendor/a-cabloy:
978
978
  dependencies:
979
979
  zova-module-a-layoutprofile:
980
- specifier: ^5.0.0
980
+ specifier: ^5.0.2
981
981
  version: link:modules/a-layoutprofile
982
982
  zova-module-a-rbac:
983
983
  specifier: ^5.0.1
@@ -1109,7 +1109,7 @@ importers:
1109
1109
  specifier: ^5.1.36
1110
1110
  version: link:modules/a-model
1111
1111
  zova-module-a-openapi:
1112
- specifier: ^5.1.53
1112
+ specifier: ^5.1.54
1113
1113
  version: link:modules/a-openapi
1114
1114
  zova-module-a-router:
1115
1115
  specifier: ^5.1.37
@@ -1121,7 +1121,7 @@ importers:
1121
1121
  specifier: ^5.1.34
1122
1122
  version: link:modules/a-routertabs
1123
1123
  zova-module-a-ssr:
1124
- specifier: ^5.1.38
1124
+ specifier: ^5.1.39
1125
1125
  version: link:modules/a-ssr
1126
1126
  zova-module-a-ssrhmr:
1127
1127
  specifier: ^5.1.23
@@ -1133,7 +1133,7 @@ importers:
1133
1133
  specifier: ^5.1.35
1134
1134
  version: link:modules/a-style
1135
1135
  zova-module-a-table:
1136
- specifier: ^5.1.42
1136
+ specifier: ^5.1.43
1137
1137
  version: link:modules/a-table
1138
1138
  zova-module-a-zod:
1139
1139
  specifier: ^5.1.37
@@ -1213,7 +1213,7 @@ importers:
1213
1213
  dependencies:
1214
1214
  axios:
1215
1215
  specifier: ^1.18.1
1216
- version: 1.20.0(supports-color@10.2.2)
1216
+ version: 1.20.0
1217
1217
  devDependencies:
1218
1218
  clean-package:
1219
1219
  specifier: ^2.2.0
@@ -1486,7 +1486,7 @@ importers:
1486
1486
  devDependencies:
1487
1487
  '@cabloy/cli':
1488
1488
  specifier: ^3.1.29
1489
- version: 3.1.29(supports-color@10.2.2)(vue@3.5.42(typescript@5.9.3))
1489
+ version: 3.1.29(vue@3.5.42(typescript@5.9.3))
1490
1490
  '@types/luxon':
1491
1491
  specifier: ^3.7.1
1492
1492
  version: 3.7.5
@@ -8829,7 +8829,7 @@ snapshots:
8829
8829
 
8830
8830
  '@bufbuild/protobuf@2.15.0': {}
8831
8831
 
8832
- '@cabloy/cli@3.1.29(supports-color@10.2.2)(vue@3.5.42(typescript@5.9.3))':
8832
+ '@cabloy/cli@3.1.29(vue@3.5.42(typescript@5.9.3))':
8833
8833
  dependencies:
8834
8834
  '@babel/parser': 7.29.8
8835
8835
  '@cabloy/module-glob': 5.3.18
@@ -8838,7 +8838,7 @@ snapshots:
8838
8838
  '@cabloy/utils': 2.1.27
8839
8839
  '@cabloy/word-utils': link:packages-utils/word-utils
8840
8840
  '@npmcli/config': 10.12.0
8841
- '@zhennann/common-bin': 4.0.1(supports-color@10.2.2)
8841
+ '@zhennann/common-bin': 4.0.1
8842
8842
  '@zhennann/ejs': 3.0.1
8843
8843
  boxen: 4.2.0
8844
8844
  chalk: 3.0.0
@@ -11026,7 +11026,7 @@ snapshots:
11026
11026
 
11027
11027
  '@vue/shared@3.5.13': {}
11028
11028
 
11029
- '@zhennann/common-bin@4.0.1(supports-color@10.2.2)':
11029
+ '@zhennann/common-bin@4.0.1':
11030
11030
  dependencies:
11031
11031
  chalk: 4.1.2
11032
11032
  change-case: 4.1.2
@@ -11060,7 +11060,7 @@ snapshots:
11060
11060
 
11061
11061
  acorn@8.18.0: {}
11062
11062
 
11063
- agent-base@6.0.2(supports-color@10.2.2):
11063
+ agent-base@6.0.2:
11064
11064
  dependencies:
11065
11065
  debug: 4.4.3(supports-color@10.2.2)
11066
11066
  transitivePeerDependencies:
@@ -11168,11 +11168,11 @@ snapshots:
11168
11168
  dependencies:
11169
11169
  possible-typed-array-names: 1.1.0
11170
11170
 
11171
- axios@1.20.0(supports-color@10.2.2):
11171
+ axios@1.20.0:
11172
11172
  dependencies:
11173
11173
  follow-redirects: 1.16.0
11174
11174
  form-data: 4.0.6
11175
- https-proxy-agent: 5.0.1(supports-color@10.2.2)
11175
+ https-proxy-agent: 5.0.1
11176
11176
  proxy-from-env: 2.1.0
11177
11177
  transitivePeerDependencies:
11178
11178
  - debug
@@ -12567,9 +12567,9 @@ snapshots:
12567
12567
  statuses: 2.0.2
12568
12568
  toidentifier: 1.0.1
12569
12569
 
12570
- https-proxy-agent@5.0.1(supports-color@10.2.2):
12570
+ https-proxy-agent@5.0.1:
12571
12571
  dependencies:
12572
- agent-base: 6.0.2(supports-color@10.2.2)
12572
+ agent-base: 6.0.2
12573
12573
  debug: 4.4.3(supports-color@10.2.2)
12574
12574
  transitivePeerDependencies:
12575
12575
  - supports-color
@@ -0,0 +1,31 @@
1
+ import type { TypeControllerInnerProps } from 'zova';
2
+
3
+ import { defineComponent } from 'vue';
4
+ import { prepareComponentOptions, useController } from 'zova';
5
+
6
+ import type { ControllerActionRefreshProps } from '../../component/actionRefresh/controller.jsx';
7
+
8
+ import { ControllerActionRefresh } from '../../component/actionRefresh/controller.jsx';
9
+ export type ZActionRefreshProps = {
10
+ controllerRef?: (ref: ControllerActionRefresh) => void;
11
+ } & ControllerActionRefreshProps;
12
+
13
+ type ControllerInnerProps = TypeControllerInnerProps<
14
+ ControllerActionRefreshProps,
15
+ keyof typeof ControllerActionRefresh.$propsDefault
16
+ >;
17
+ declare module 'zova-module-basic-table' {
18
+ export interface ControllerActionRefresh {
19
+ $props: ControllerInnerProps;
20
+ }
21
+ }
22
+
23
+ export const ZActionRefresh = defineComponent((_props: ZActionRefreshProps) => {
24
+ useController(ControllerActionRefresh, undefined, undefined);
25
+ return () => {};
26
+ }, prepareComponentOptions(ControllerActionRefresh.$componentOptions));
27
+ declare module 'zova-module-a-bean' {
28
+ export interface IVonaComponentRecord {
29
+ 'basic-table:actionRefresh': ControllerActionRefreshProps;
30
+ }
31
+ }
@@ -3,6 +3,7 @@
3
3
  export * from '../component/actionColumnConfig/controller.jsx';
4
4
  export * from '../component/actionCreate/controller.jsx';
5
5
  export * from '../component/actionDeleteBulk/controller.jsx';
6
+ export * from '../component/actionRefresh/controller.jsx';
6
7
  export * from '../component/table/controller.jsx';
7
8
 
8
9
  import 'zova';
@@ -27,6 +28,11 @@ declare module 'zova-module-basic-table' {
27
28
  get scope(): ScopeModuleBasicTable;
28
29
  }
29
30
 
31
+ export interface ControllerActionRefresh {
32
+ /** @internal */
33
+ get scope(): ScopeModuleBasicTable;
34
+ }
35
+
30
36
  export interface ControllerTable {
31
37
  /** @internal */
32
38
  get scope(): ScopeModuleBasicTable;
@@ -37,6 +43,7 @@ declare module 'zova-module-basic-table' {
37
43
  import type { ControllerActionColumnConfig } from '../component/actionColumnConfig/controller.jsx';
38
44
  import type { ControllerActionCreate } from '../component/actionCreate/controller.jsx';
39
45
  import type { ControllerActionDeleteBulk } from '../component/actionDeleteBulk/controller.jsx';
46
+ import type { ControllerActionRefresh } from '../component/actionRefresh/controller.jsx';
40
47
  import type { ControllerTable } from '../component/table/controller.jsx';
41
48
  import 'zova';
42
49
  declare module 'zova' {
@@ -44,6 +51,7 @@ declare module 'zova' {
44
51
  'basic-table.controller.actionColumnConfig': ControllerActionColumnConfig;
45
52
  'basic-table.controller.actionCreate': ControllerActionCreate;
46
53
  'basic-table.controller.actionDeleteBulk': ControllerActionDeleteBulk;
54
+ 'basic-table.controller.actionRefresh': ControllerActionRefresh;
47
55
  'basic-table.controller.table': ControllerTable;
48
56
  }
49
57
  }
@@ -56,12 +64,15 @@ export * from './component/actionCreate.js';
56
64
  import { ZActionCreate } from './component/actionCreate.js';
57
65
  export * from './component/actionDeleteBulk.js';
58
66
  import { ZActionDeleteBulk } from './component/actionDeleteBulk.js';
67
+ export * from './component/actionRefresh.js';
68
+ import { ZActionRefresh } from './component/actionRefresh.js';
59
69
  export * from './component/table.js';
60
70
  import { ZTable } from './component/table.js';
61
71
  export const components = {
62
72
  'actionColumnConfig': ZActionColumnConfig,
63
73
  'actionCreate': ZActionCreate,
64
74
  'actionDeleteBulk': ZActionDeleteBulk,
75
+ 'actionRefresh': ZActionRefresh,
65
76
  'table': ZTable,
66
77
  };
67
78
  import 'zova';
@@ -70,12 +81,14 @@ export interface IComponentRecord {
70
81
  'basic-table:actionColumnConfig': ControllerActionColumnConfig;
71
82
  'basic-table:actionCreate': ControllerActionCreate;
72
83
  'basic-table:actionDeleteBulk': ControllerActionDeleteBulk;
84
+ 'basic-table:actionRefresh': ControllerActionRefresh;
73
85
  'basic-table:table': ControllerTable;
74
86
  }
75
87
  export interface IZovaComponentRecord {
76
88
  'basic-table:actionColumnConfig': typeof ZActionColumnConfig;
77
89
  'basic-table:actionCreate': typeof ZActionCreate;
78
90
  'basic-table:actionDeleteBulk': typeof ZActionDeleteBulk;
91
+ 'basic-table:actionRefresh': typeof ZActionRefresh;
79
92
  'basic-table:table': typeof ZTable;
80
93
  }
81
94
  }
@@ -0,0 +1,42 @@
1
+ import type { IComponentOptions } from 'zova';
2
+ import type {
3
+ IJsxRenderContextPage,
4
+ IResourceTableActionBulkPropsBase,
5
+ } from 'zova-module-a-openapi';
6
+
7
+ import { BeanControllerBase, Use } from 'zova';
8
+ import { Controller } from 'zova-module-a-bean';
9
+
10
+ declare module 'zova-module-a-openapi' {
11
+ export interface IResourceTableActionBulkRecord {
12
+ 'basic-table:actionRefresh'?: ControllerActionRefreshProps;
13
+ }
14
+ }
15
+
16
+ export interface ControllerActionRefreshProps extends IResourceTableActionBulkPropsBase {}
17
+
18
+ @Controller()
19
+ export class ControllerActionRefresh extends BeanControllerBase {
20
+ static $propsDefault = { class: 'btn join-item' };
21
+ static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
22
+
23
+ @Use({ injectionScope: 'host' })
24
+ $$renderContext: IJsxRenderContextPage;
25
+
26
+ protected render() {
27
+ const disabled = this.$props.disabled === true || this.$props.dynamicDisabled === true;
28
+ return (
29
+ <button
30
+ class={this.$props.class}
31
+ type="button"
32
+ disabled={disabled}
33
+ onClick={async () => {
34
+ if (disabled) return;
35
+ await this.$$renderContext.$$page.queryData.refetch();
36
+ }}
37
+ >
38
+ {this.scope.locale.Refresh() as string}
39
+ </button>
40
+ );
41
+ }
42
+ }
@@ -5,6 +5,7 @@ export default {
5
5
  SelectRow: 'Select row %s',
6
6
  DeleteBulk: 'Bulk Delete',
7
7
  DeleteBulkConfirm: 'Are you sure you want to bulk delete %d selected items?',
8
+ Refresh: 'Refresh',
8
9
  ColumnConfiguration: 'Column configuration',
9
10
  Columns: 'Columns',
10
11
  Visible: 'Visible',
@@ -5,6 +5,7 @@ export default {
5
5
  SelectRow: '选择行 %s',
6
6
  DeleteBulk: '批量删除',
7
7
  DeleteBulkConfirm: '您确认要批量删除已选择的 %d 项吗?',
8
+ Refresh: '刷新',
8
9
  ColumnConfiguration: '列配置',
9
10
  Columns: '字段',
10
11
  Visible: '显示',