cabloy 5.1.173 → 5.1.175

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.
Files changed (79) hide show
  1. package/.cabloy-version +1 -1
  2. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +4 -0
  3. package/CHANGELOG.md +24 -0
  4. package/package.json +2 -2
  5. package/repo-docs/.vitepress/config.mjs +7 -0
  6. package/repo-docs/frontend/a-model-under-the-hood.md +11 -0
  7. package/repo-docs/frontend/behavior-guide.md +73 -0
  8. package/repo-docs/frontend/column-configuration-guide.md +254 -0
  9. package/repo-docs/frontend/component-guide.md +2 -29
  10. package/repo-docs/frontend/controller-boundary-guide.md +229 -0
  11. package/repo-docs/frontend/introduction.md +4 -0
  12. package/repo-docs/frontend/page-route-guide.md +6 -0
  13. package/repo-docs/frontend/resource-picker-guide.md +223 -0
  14. package/repo-docs/frontend/rest-resource-source-reading-map.md +37 -21
  15. package/repo-docs/frontend/rest-resource-under-the-hood.md +50 -30
  16. package/repo-docs/frontend/routed-dialog-guide.md +471 -0
  17. package/repo-docs/frontend/router-stack-guide.md +4 -2
  18. package/repo-docs/frontend/router-view-hosts-guide.md +3 -2
  19. package/repo-docs/frontend/ssr-client-only.md +6 -0
  20. package/repo-docs/frontend/table-guide.md +2 -1
  21. package/repo-docs/frontend/table-resource-crud-cookbook.md +1 -0
  22. package/repo-docs/frontend/use-state-data-best-practices.md +26 -0
  23. package/repo-e2e/specs/cabloy-basic.spec.ts +11 -0
  24. package/repo-e2e/specs/controller-boundary.spec.ts +1 -2
  25. package/test-results/.last-run.json +1 -1
  26. package/vona/packages-cli/cli/package.json +1 -1
  27. package/vona/packages-cli/cli-set-api/package.json +1 -1
  28. package/vona/packages-vona/vona/package.json +1 -1
  29. package/vona/packages-vona/vona-core/package.json +1 -1
  30. package/vona/packages-vona/vona-core/src/lib/utils/util.ts +1 -0
  31. package/vona/packages-vona/vona-mock/package.json +1 -1
  32. package/vona/pnpm-lock.yaml +238 -46
  33. package/vona/pnpm-workspace.yaml +1 -1
  34. package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +1 -1
  35. package/vona/src/suite-vendor/a-cabloy/modules/a-layoutprofile/package.json +1 -1
  36. package/vona/src/suite-vendor/a-cabloy/modules/a-layoutprofile/test/layoutprofile.test.ts +2 -3
  37. package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
  38. package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
  39. package/vona/src/suite-vendor/a-vona/modules/a-executor/package.json +1 -1
  40. package/vona/src/suite-vendor/a-vona/modules/a-executor/src/service/executor.ts +6 -1
  41. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  42. package/zova/package.original.json +1 -1
  43. package/zova/packages-zova/zova/package.json +2 -2
  44. package/zova/src/suite/a-commerce/modules/commerce-catalog/src/page/product/controller.tsx +4 -3
  45. package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +4 -3
  46. package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionAdjustStock/controller.tsx +3 -2
  47. package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +16 -20
  48. package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionShip/controller.tsx +3 -2
  49. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +6 -5
  50. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +5 -4
  51. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +4 -4
  52. package/zova/src/suite/a-demo/modules/demo-basic/src/page/controllerBoundary/controller.tsx +2 -2
  53. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +4 -4
  54. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +4 -4
  55. package/zova/src/suite/cabloy-basic/modules/basic-app/src/monkey.ts +11 -0
  56. package/zova/src/suite/cabloy-basic/modules/basic-app/src/types/appModal.ts +1 -0
  57. package/zova/src/suite/cabloy-basic/modules/basic-app/test/lib/routedDialogContext.test.ts +60 -0
  58. package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionUpdate.tsx +4 -4
  59. package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx +4 -4
  60. package/zova/src/suite/cabloy-basic/modules/basic-metrics/src/page/dashboard/controller.tsx +8 -2
  61. package/zova/src/suite/cabloy-basic/modules/basic-table/src/bean/tableCell.actionUpdate.tsx +4 -4
  62. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/actionCreate/controller.tsx +4 -4
  63. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/actionDeleteBulk/controller.tsx +4 -4
  64. package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  65. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +6 -5
  66. package/zova/src/suite-vendor/a-pay/package.json +2 -2
  67. package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
  68. package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts +17 -3
  69. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +1 -2
  70. package/zova/src/suite-vendor/a-zova/package.json +3 -4
  71. package/zova/pnpm-lock.yaml +0 -15375
  72. package/zova/src/suite-vendor/a-zova/modules/a-boundary/LICENSE +0 -21
  73. package/zova/src/suite-vendor/a-zova/modules/a-boundary/package.json +0 -52
  74. package/zova/src/suite-vendor/a-zova/modules/a-boundary/src/.metadata/index.ts +0 -26
  75. package/zova/src/suite-vendor/a-zova/modules/a-boundary/src/.metadata/this.ts +0 -2
  76. package/zova/src/suite-vendor/a-zova/modules/a-boundary/src/index.ts +0 -1
  77. package/zova/src/suite-vendor/a-zova/modules/a-boundary/tsconfig.build.json +0 -13
  78. package/zova/src/suite-vendor/a-zova/modules/a-boundary/tsconfig.json +0 -5
  79. /package/vona/patches/{zova-core@5.1.89.patch → zova-core@5.1.90.patch} +0 -0
@@ -6,6 +6,7 @@ import type {
6
6
 
7
7
  import { BeanControllerBase, Use } from 'zova';
8
8
  import { Controller } from 'zova-module-a-bean';
9
+ import { ZButton } from 'zova-module-basic-button';
9
10
 
10
11
  declare module 'zova-module-a-openapi' {
11
12
  export interface IResourceTableActionBulkRecord {
@@ -27,13 +28,12 @@ export class ControllerActionDeleteBulk extends BeanControllerBase {
27
28
  const { dynamicDisabledReason, dynamicSelection } = this.$props;
28
29
  const disabled = this.$props.disabled === true || this.$props.dynamicDisabled === true;
29
30
  return (
30
- <button
31
+ <ZButton
31
32
  class={this.$props.class}
32
- type="button"
33
33
  disabled={disabled}
34
34
  title={dynamicDisabledReason}
35
35
  aria-description={dynamicDisabledReason}
36
- onClick={async () => {
36
+ onPerform={async () => {
37
37
  if (disabled) return;
38
38
  const confirmed = await this.$performCommand(
39
39
  'basic-commands:confirm',
@@ -51,7 +51,7 @@ export class ControllerActionDeleteBulk extends BeanControllerBase {
51
51
  }}
52
52
  >
53
53
  {this.scope.locale.DeleteBulk() as string}
54
- </button>
54
+ </ZButton>
55
55
  );
56
56
  }
57
57
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-pay",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "Zova Module"
@@ -1,5 +1,6 @@
1
1
  import { BeanControllerBase, Use } from 'zova';
2
2
  import { Controller } from 'zova-module-a-bean';
3
+ import { ZButton } from 'zova-module-basic-button';
3
4
 
4
5
  import type { TypePaymentNextAction } from '../../types/payment.js';
5
6
 
@@ -49,13 +50,13 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
49
50
  return (
50
51
  <div class="mt-6 space-y-3">
51
52
  <p class="text-base-content/70">{continueToPaymentHelpText}</p>
52
- <button
53
+ <ZButton
53
54
  class="btn btn-primary"
54
55
  disabled={disabled}
55
- onClick={() => this.continueRedirect()}
56
+ onPerform={() => this.continueRedirect()}
56
57
  >
57
58
  {continueToPaymentText}
58
- </button>
59
+ </ZButton>
59
60
  </div>
60
61
  );
61
62
  }
@@ -68,9 +69,9 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
68
69
  : paymentPreparingText}
69
70
  </p>
70
71
  {onRefresh && (
71
- <button class="btn btn-outline" disabled={disabled} onClick={() => onRefresh()}>
72
+ <ZButton class="btn btn-outline" disabled={disabled} onPerform={() => onRefresh()}>
72
73
  {refreshPaymentStatusText}
73
- </button>
74
+ </ZButton>
74
75
  )}
75
76
  </div>
76
77
  );
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "zova-suite-a-pay",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "files": [],
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "zova-module-a-pay": "^5.0.7",
9
+ "zova-module-a-pay": "^5.0.8",
10
10
  "zova-module-pay-mock": "^5.0.5",
11
11
  "zova-module-pay-paypal": "^5.0.2",
12
12
  "zova-module-pay-stripe": "^5.0.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-router",
3
- "version": "5.1.38",
3
+ "version": "5.1.39",
4
4
  "gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
5
5
  "description": "router",
6
6
  "keywords": [
@@ -190,8 +190,6 @@ export class Monkey
190
190
  // check if changed
191
191
  const changed = !controller.$route || controller.$route.fullPath !== route.fullPath;
192
192
  if (!changed) return;
193
- controller.$route = route;
194
- controller.$routeMatched = routeMatched;
195
193
  // update $params/$query
196
194
  const routeName = getRealRouteName(routeMatched.name);
197
195
  const schemaKey = routeName || String(routeMatched.path);
@@ -205,7 +203,23 @@ export class Monkey
205
203
  // do nothing
206
204
  return;
207
205
  }
208
- const module = this.app.meta.module.get(moduleInfo.relativeName)!;
206
+ const module = this.app.meta.module.get(moduleInfo.relativeName, false);
207
+ if (!module) {
208
+ void this.app.meta.module
209
+ .use(moduleInfo.relativeName)
210
+ .then(() => {
211
+ if (cast(controller).ctx.disposed) return;
212
+ const currentRoute = getPageRoute(cast<ZovaContext>(cast(controller).ctx));
213
+ if (!currentRoute || currentRoute.fullPath !== route.fullPath) return;
214
+ this._initControllerRoute(currentRoute, controller);
215
+ })
216
+ .catch(err => {
217
+ console.error('failed to load route module', moduleInfo.relativeName, err);
218
+ });
219
+ return;
220
+ }
221
+ controller.$route = route;
222
+ controller.$routeMatched = routeMatched;
209
223
  if (routeName) {
210
224
  schemas = module.resource.pageNameSchemas?.[schemaKey];
211
225
  } else {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-zova",
3
- "version": "5.1.105",
3
+ "version": "5.1.106",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "zova",
6
6
  "keywords": [
@@ -70,7 +70,6 @@
70
70
  "a-app": "5.0.0",
71
71
  "a-bean": "5.0.0",
72
72
  "a-behavior": "5.0.0",
73
- "a-boundary": "5.0.0",
74
73
  "a-fetch": "5.0.0",
75
74
  "a-form": "5.0.0",
76
75
  "a-icon": "5.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-suite-a-zova",
3
- "version": "5.1.162",
3
+ "version": "5.1.163",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "zova",
6
6
  "license": "MIT",
@@ -13,7 +13,6 @@
13
13
  "zova-module-a-bean": "^5.1.36",
14
14
  "zova-module-a-behavior": "^5.1.26",
15
15
  "zova-module-a-behaviors": "^5.1.22",
16
- "zova-module-a-boundary": "^5.1.22",
17
16
  "zova-module-a-command": "^5.1.35",
18
17
  "zova-module-a-fetch": "^5.1.25",
19
18
  "zova-module-a-form": "^5.1.51",
@@ -23,7 +22,7 @@
23
22
  "zova-module-a-meta": "^5.1.22",
24
23
  "zova-module-a-model": "^5.1.37",
25
24
  "zova-module-a-openapi": "^5.1.54",
26
- "zova-module-a-router": "^5.1.38",
25
+ "zova-module-a-router": "^5.1.39",
27
26
  "zova-module-a-routerstack": "^5.1.29",
28
27
  "zova-module-a-routertabs": "^5.1.34",
29
28
  "zova-module-a-ssr": "^5.1.40",
@@ -32,7 +31,7 @@
32
31
  "zova-module-a-style": "^5.1.35",
33
32
  "zova-module-a-table": "^5.1.43",
34
33
  "zova-module-a-zod": "^5.1.37",
35
- "zova-module-a-zova": "^5.1.105"
34
+ "zova-module-a-zova": "^5.1.106"
36
35
  },
37
36
  "title": "a-zova"
38
37
  }