cabloy 5.1.175 → 5.1.176

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 (21) hide show
  1. package/.cabloy-version +1 -1
  2. package/.claude/scheduled_tasks.lock +1 -1
  3. package/CHANGELOG.md +7 -0
  4. package/package.json +1 -1
  5. package/repo-docs/fullstack/a-pay-payment-suite.md +31 -17
  6. package/zova/pnpm-lock.yaml +15382 -0
  7. package/zova/src/suite/a-commerce/modules/commerce-trade/package.json +3 -1
  8. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +1 -1
  9. package/zova/src/suite/cabloy-basic/modules/basic-pay/package.json +60 -0
  10. package/zova/src/{suite-vendor/a-pay/modules/a-pay → suite/cabloy-basic/modules/basic-pay}/src/.metadata/component/paymentNextAction.ts +2 -2
  11. package/zova/src/suite/cabloy-basic/modules/basic-pay/src/.metadata/index.ts +68 -0
  12. package/zova/src/suite/cabloy-basic/modules/basic-pay/src/.metadata/this.ts +2 -0
  13. package/zova/src/{suite-vendor/a-pay/modules/a-pay → suite/cabloy-basic/modules/basic-pay}/src/component/paymentNextAction/controller.tsx +7 -19
  14. package/zova/src/suite/cabloy-basic/modules/basic-pay/src/index.ts +1 -0
  15. package/zova/src/suite/cabloy-basic/modules/basic-pay/tsconfig.build.json +13 -0
  16. package/zova/src/suite/cabloy-basic/modules/basic-pay/tsconfig.json +5 -0
  17. package/zova/src/suite/cabloy-basic/package.json +1 -0
  18. package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  19. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/.metadata/index.ts +4 -46
  20. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/types/payment.ts +13 -0
  21. package/zova/src/suite-vendor/a-pay/package.json +2 -2
@@ -35,6 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "zova-module-a-pay": "workspace:^",
38
+ "zova-module-basic-pay": "workspace:^",
38
39
  "zova-module-pay-mock": "workspace:^"
39
40
  },
40
41
  "devDependencies": {
@@ -55,7 +56,8 @@
55
56
  "title": "commerce-trade",
56
57
  "zovaModule": {
57
58
  "dependencies": {
58
- "basic-app": "5.0.0"
59
+ "basic-app": "5.0.0",
60
+ "basic-pay": "5.0.0"
59
61
  }
60
62
  }
61
63
  }
@@ -5,7 +5,7 @@ import { z } from 'zod';
5
5
  import { BeanControllerPageBase, Use } from 'zova';
6
6
  import { Controller } from 'zova-module-a-bean';
7
7
  import { $QueryEnsureLoaded } from 'zova-module-a-model';
8
- import { ZPaymentNextAction } from 'zova-module-a-pay';
8
+ import { ZPaymentNextAction } from 'zova-module-basic-pay';
9
9
  import { ZPage } from 'zova-module-home-base';
10
10
 
11
11
  import { ModelOrderMine } from '../../model/orderMine.js';
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "zova-module-basic-pay",
3
+ "version": "5.0.0",
4
+ "description": "",
5
+ "keywords": [
6
+ "Zova Module"
7
+ ],
8
+ "author": "",
9
+ "files": [
10
+ "mock",
11
+ "dist",
12
+ "src",
13
+ "icons",
14
+ "assets"
15
+ ],
16
+ "type": "module",
17
+ "exports": {
18
+ ".": {
19
+ "types": [
20
+ "./src/index.ts",
21
+ "./dist/index.d.ts"
22
+ ],
23
+ "import": "./src/index.ts",
24
+ "default": "./dist/index.js"
25
+ },
26
+ "./*": "./*"
27
+ },
28
+ "scripts": {
29
+ "clean": "rimraf dist tsconfig.build.tsbuildinfo",
30
+ "tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
31
+ "prepublishOnly": "npm run tsc:publish",
32
+ "prepack": "clean-package",
33
+ "postpack": "clean-package restore"
34
+ },
35
+ "dependencies": {
36
+ "zova-module-a-pay": "workspace:^"
37
+ },
38
+ "devDependencies": {
39
+ "clean-package": "^2.2.0",
40
+ "rimraf": "^6.1.3"
41
+ },
42
+ "clean-package": {
43
+ "indent": 2,
44
+ "replace": {
45
+ "exports.\\..types": "./dist/index.d.ts"
46
+ },
47
+ "remove": [
48
+ "clean-package",
49
+ "devDependencies",
50
+ "exports.\\..import"
51
+ ]
52
+ },
53
+ "title": "basic-pay",
54
+ "zovaModule": {
55
+ "dependencies": {
56
+ "a-pay": "5.0.0",
57
+ "basic-button": "5.0.0"
58
+ }
59
+ }
60
+ }
@@ -14,7 +14,7 @@ type ControllerInnerProps = TypeControllerInnerProps<
14
14
  ControllerPaymentNextActionProps,
15
15
  keyof typeof ControllerPaymentNextAction.$propsDefault
16
16
  >;
17
- declare module 'zova-module-a-pay' {
17
+ declare module 'zova-module-basic-pay' {
18
18
  export interface ControllerPaymentNextAction {
19
19
  $props: ControllerInnerProps;
20
20
  }
@@ -26,6 +26,6 @@ export const ZPaymentNextAction = defineComponent((_props: ZPaymentNextActionPro
26
26
  }, prepareComponentOptions());
27
27
  declare module 'zova-module-a-bean' {
28
28
  export interface IVonaComponentRecord {
29
- 'a-pay:paymentNextAction': ControllerPaymentNextActionProps;
29
+ 'basic-pay:paymentNextAction': ControllerPaymentNextActionProps;
30
30
  }
31
31
  }
@@ -0,0 +1,68 @@
1
+ // eslint-disable
2
+ /** controller: begin */
3
+ export * from '../component/paymentNextAction/controller.jsx';
4
+
5
+ import 'zova';
6
+ declare module 'zova' {
7
+
8
+
9
+ }
10
+ declare module 'zova-module-basic-pay' {
11
+
12
+ export interface ControllerPaymentNextAction {
13
+ /** @internal */
14
+ get scope(): ScopeModuleBasicPay;
15
+ }
16
+ }
17
+ /** controller: end */
18
+ /** controller: begin */
19
+ import type { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';
20
+ import 'zova';
21
+ declare module 'zova' {
22
+ export interface IBeanRecordLocal {
23
+ 'basic-pay.controller.paymentNextAction': ControllerPaymentNextAction;
24
+ }
25
+ }
26
+ /** controller: end */
27
+
28
+ /** components: begin */
29
+ export * from './component/paymentNextAction.js';
30
+ import { ZPaymentNextAction } from './component/paymentNextAction.js';
31
+ export const components = {
32
+ 'paymentNextAction': ZPaymentNextAction,
33
+ };
34
+ import 'zova';
35
+ declare module 'zova' {
36
+ export interface IComponentRecord {
37
+ 'basic-pay:paymentNextAction': ControllerPaymentNextAction;
38
+ }
39
+ export interface IZovaComponentRecord {
40
+ 'basic-pay:paymentNextAction': typeof ZPaymentNextAction;
41
+ }
42
+ }
43
+ /** components: end */
44
+ /** scope: begin */
45
+ import { BeanScopeBase, type BeanScopeUtil } from 'zova';
46
+ import { Scope } from 'zova-module-a-bean';
47
+
48
+ @Scope()
49
+ export class ScopeModuleBasicPay extends BeanScopeBase {}
50
+
51
+ export interface ScopeModuleBasicPay {
52
+ util: BeanScopeUtil;
53
+ }
54
+
55
+ import 'zova';
56
+ declare module 'zova' {
57
+ export interface IBeanScopeRecord {
58
+ 'basic-pay': ScopeModuleBasicPay;
59
+ }
60
+
61
+
62
+
63
+
64
+
65
+
66
+ }
67
+
68
+ /** scope: end */
@@ -0,0 +1,2 @@
1
+ export const __ThisModule__ = 'basic-pay';
2
+ export { ScopeModuleBasicPay as ScopeModule } from './index.js';
@@ -1,23 +1,11 @@
1
+ import type { IPaymentNextActionProps } from 'zova-module-a-pay';
2
+
1
3
  import { BeanControllerBase, Use } from 'zova';
2
4
  import { Controller } from 'zova-module-a-bean';
5
+ import { ServicePaymentCoordinator } from 'zova-module-a-pay';
3
6
  import { ZButton } from 'zova-module-basic-button';
4
7
 
5
- import type { TypePaymentNextAction } from '../../types/payment.js';
6
-
7
- import { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';
8
-
9
- export interface ControllerPaymentNextActionProps {
10
- action?: TypePaymentNextAction;
11
- disabled?: boolean;
12
- continueToPaymentText?: string;
13
- continueToPaymentHelpText?: string;
14
- embeddedCheckoutUnavailableText?: string;
15
- paymentCompletedText?: string;
16
- paymentPreparingText?: string;
17
- paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
18
- refreshPaymentStatusText?: string;
19
- onRefresh?: () => void | Promise<void>;
20
- }
8
+ export interface ControllerPaymentNextActionProps extends IPaymentNextActionProps {}
21
9
 
22
10
  @Controller()
23
11
  export class ControllerPaymentNextAction extends BeanControllerBase {
@@ -27,8 +15,8 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
27
15
  $$paymentCoordinator: ServicePaymentCoordinator;
28
16
 
29
17
  async continueRedirect() {
30
- const action = this.$props.action;
31
- if (action?.kind !== 'redirect' || this.$props.disabled) return;
18
+ const { action, disabled } = this.$props as IPaymentNextActionProps;
19
+ if (action?.kind !== 'redirect' || disabled) return;
32
20
  await this.$$paymentCoordinator.execute(action);
33
21
  }
34
22
 
@@ -44,7 +32,7 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
44
32
  paymentPreparingRetryText,
45
33
  refreshPaymentStatusText,
46
34
  onRefresh,
47
- } = this.$props as ControllerPaymentNextActionProps;
35
+ } = this.$props as IPaymentNextActionProps;
48
36
  if (!action) return null;
49
37
  if (action.kind === 'redirect') {
50
38
  return (
@@ -0,0 +1 @@
1
+ export * from './.metadata/index.js';
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig.base",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "emitDeclarationOnly": true,
9
+ "allowImportingTsExtensions": true,
10
+ "noEmit": false
11
+ },
12
+ "include": ["src", "src/.metadata/**/*"]
13
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../../tsconfig.base",
3
+ "compilerOptions": {},
4
+ "include": ["src", "src/.metadata/**/*"]
5
+ }
@@ -24,6 +24,7 @@
24
24
  "zova-module-basic-metrics": "workspace:",
25
25
  "zova-module-basic-page": "^5.0.7",
26
26
  "zova-module-basic-pageentry": "^5.0.7",
27
+ "zova-module-basic-pay": "^5.0.0",
27
28
  "zova-module-basic-resource": "^5.0.0",
28
29
  "zova-module-basic-select": "^5.0.4",
29
30
  "zova-module-basic-table": "^5.0.6",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-pay",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "Zova Module"
@@ -26,7 +26,7 @@ declare module 'zova-module-a-pay' {
26
26
  }
27
27
  /** model: end */
28
28
  /** model: begin */
29
- import { ModelPaymentSession } from '../model/paymentSession.js';
29
+ import type { ModelPaymentSession } from '../model/paymentSession.js';
30
30
  import 'zova';
31
31
  declare module 'zova' {
32
32
  export interface IBeanRecordGeneral {
@@ -57,7 +57,7 @@ declare module 'zova-module-a-pay' {
57
57
  }
58
58
  /** api: end */
59
59
  /** api: begin */
60
- import { ApiPayPaymentSession } from '../api/payPaymentSession.js';
60
+ import type { ApiPayPaymentSession } from '../api/payPaymentSession.js';
61
61
  export interface IModuleApi {
62
62
  'payPaymentSession': ApiPayPaymentSession;
63
63
  }
@@ -97,7 +97,7 @@ declare module 'zova-module-a-pay' {
97
97
  }
98
98
  /** apiSchema: end */
99
99
  /** apiSchema: begin */
100
- import { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.js';
100
+ import type { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.js';
101
101
  export interface IModuleApiSchema {
102
102
  'payPaymentSession': ApiSchemaPayPaymentSession;
103
103
  }
@@ -138,7 +138,7 @@ declare module 'zova-module-a-pay' {
138
138
  }
139
139
  /** service: end */
140
140
  /** service: begin */
141
- import { ServicePaymentCoordinator } from '../service/paymentCoordinator.js';
141
+ import type { ServicePaymentCoordinator } from '../service/paymentCoordinator.js';
142
142
  import 'zova';
143
143
  declare module 'zova' {
144
144
  export interface IBeanRecordGeneral {
@@ -146,48 +146,6 @@ declare module 'zova' {
146
146
  }
147
147
  }
148
148
  /** service: end */
149
- /** controller: begin */
150
- export * from '../component/paymentNextAction/controller.jsx';
151
-
152
- import 'zova';
153
- declare module 'zova' {
154
-
155
-
156
- }
157
- declare module 'zova-module-a-pay' {
158
-
159
- export interface ControllerPaymentNextAction {
160
- /** @internal */
161
- get scope(): ScopeModuleAPay;
162
- }
163
- }
164
- /** controller: end */
165
- /** controller: begin */
166
- import { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';
167
- import 'zova';
168
- declare module 'zova' {
169
- export interface IBeanRecordLocal {
170
- 'a-pay.controller.paymentNextAction': ControllerPaymentNextAction;
171
- }
172
- }
173
- /** controller: end */
174
-
175
- /** components: begin */
176
- export * from './component/paymentNextAction.js';
177
- import { ZPaymentNextAction } from './component/paymentNextAction.js';
178
- export const components = {
179
- 'paymentNextAction': ZPaymentNextAction,
180
- };
181
- import 'zova';
182
- declare module 'zova' {
183
- export interface IComponentRecord {
184
- 'a-pay:paymentNextAction': ControllerPaymentNextAction;
185
- }
186
- export interface IZovaComponentRecord {
187
- 'a-pay:paymentNextAction': typeof ZPaymentNextAction;
188
- }
189
- }
190
- /** components: end */
191
149
  /** scope: begin */
192
150
  import { BeanScopeBase, type BeanScopeUtil } from 'zova';
193
151
  import { Scope } from 'zova-module-a-bean';
@@ -19,6 +19,19 @@ export interface IPaymentSessionView {
19
19
  nextAction?: TypePaymentNextAction;
20
20
  }
21
21
 
22
+ export interface IPaymentNextActionProps {
23
+ action?: TypePaymentNextAction;
24
+ disabled?: boolean;
25
+ continueToPaymentText?: string;
26
+ continueToPaymentHelpText?: string;
27
+ embeddedCheckoutUnavailableText?: string;
28
+ paymentCompletedText?: string;
29
+ paymentPreparingText?: string;
30
+ paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
31
+ refreshPaymentStatusText?: string;
32
+ onRefresh?: () => void | Promise<void>;
33
+ }
34
+
22
35
  export interface IPayUiProvider {
23
36
  supports(action: TypePaymentNextAction): boolean;
24
37
  execute(action: TypePaymentNextAction): Promise<void>;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "zova-suite-a-pay",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "files": [],
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "zova-module-a-pay": "^5.0.8",
9
+ "zova-module-a-pay": "^5.0.9",
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"