cabloy 5.1.140 → 5.1.142
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/.cabloy-version +1 -1
- package/.github/workflows/playwright-e2e.yml +2 -2
- package/CHANGELOG.md +32 -0
- package/cabloy-docs/frontend/form-guide.md +47 -0
- package/cabloy-docs/frontend/markdown-guide.md +50 -17
- package/cabloy-docs/frontend/route-alias-guide.md +20 -0
- package/cabloy-docs/frontend/scripts.md +9 -11
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +25 -0
- package/cabloy-docs/fullstack/framework-performance.md +3 -3
- package/cabloy-docs/fullstack/parallel-worktree-environment.md +1 -1
- package/cabloy-docs/fullstack/quickstart.md +5 -4
- package/cabloy-docs/reference/repo-scripts.md +29 -42
- package/e2e/config/playwright.config.ts +34 -0
- package/e2e/scripts/e2e.ts +2 -27
- package/e2e/scripts/runE2e.ts +62 -0
- package/e2e/scripts/runE2eArgs.test.ts +75 -0
- package/e2e/scripts/runE2eArgs.ts +158 -0
- package/e2e/specs/{a-commerce/commerce.spec.ts → a-commerce.spec.ts} +364 -33
- package/e2e/specs/{cabloy-basic/account.spec.ts → account.spec.ts} +1 -2
- package/e2e/specs/{cabloy-basic/basic.spec.ts → cabloy-basic.spec.ts} +6 -8
- package/oxlint.config.ts +3 -0
- package/package.json +3 -9
- package/scripts/upgrade.ts +63 -68
- package/vona/packages-utils/lint/package.json +1 -1
- package/vona/packages-utils/lint/src/oxc/lint.ts +1 -1
- package/vona/packages-utils/lint/src/oxc/lintVue.ts +1 -1
- package/vona/pnpm-lock.yaml +100 -657
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/refundRecoveryView.tsx +7 -2
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +31 -15
- package/vona/src/suite/a-home/modules/home-user/package.json +1 -0
- package/vona/src/suite/a-home/modules/home-user/src/service/account.ts +15 -2
- package/vona/src/suite/a-home/modules/home-user/test/accountActivation.test.ts +34 -4
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/package.json +2 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/index.ts +26 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/bean/imageScene.markdown.ts +13 -0
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +23 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/refundOperation.ts +7 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/package.json +5 -5
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +1 -1
- package/zova/packages-zova/zova-core/src/bean/resource/locale/type.ts +1 -0
- package/zova/pnpm-lock.yaml +63 -18
- package/zova/src/front/config/config/config.cabloyBasicWeb.ts +3 -1
- package/zova/src/front/config/config/config.cabloyCommerce.ts +4 -2
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +64 -63
- package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +29 -171
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +413 -134
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/en-us.ts +76 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/zh-cn.ts +67 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/order.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +1 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +7 -7
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +46 -9
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +50 -30
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-captcha/src/component/formFieldCaptcha/controller.tsx +6 -2
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +9 -15
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/package.json +10 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/index.ts +11 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/controller.tsx +723 -5
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/render.tsx +461 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/en-us.ts +59 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/zh-cn.ts +59 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/codeBlockLanguages.ts +42 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/richTextContentStyle.ts +20 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/test/lib/codeBlockLanguages.test.ts +25 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +1 -0
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/types.ts +23 -170
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +26 -12
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/cli/openapi.config.ts +1 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/types.ts +23 -170
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/payMockMockPayment.ts +26 -0
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/apiSchema/payMockMockPayment.ts +8 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/model/payMockPayment.ts +13 -1
- package/zova/src/suite-vendor/a-pay/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts +7 -6
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
- package/e2e/config/playwright.basic.config.ts +0 -3
- package/e2e/config/playwright.commerce.config.ts +0 -3
- package/e2e/config/playwright.shared.config.ts +0 -38
- package/e2e/scripts/testE2eClean.ts +0 -56
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/package.json +0 -56
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/index.ts +0 -404
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/locales.ts +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/bean.paypal.ts +0 -99
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCancelOrder.ts +0 -15
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCaptureOrder.ts +0 -22
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/meta.version.ts +0 -24
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/config.ts +0 -14
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/errors.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/en-us.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/zh-cn.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/controller/paypal.ts +0 -39
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordOptions.tsx +0 -31
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordPayload.tsx +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/entity/paypalRecord.tsx +0 -30
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/index.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/model/paypalRecord.ts +0 -10
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/service/paypal.ts +0 -83
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/index.ts +0 -1
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/paypal.ts +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-paypal/package.json +0 -13
- package/vona/src/suite-vendor/a-paypal/tsconfig.base.json +0 -4
- package/vona/src/suite-vendor/a-paypal/tsconfig.json +0 -10
|
@@ -1504,54 +1504,6 @@ export interface paths {
|
|
|
1504
1504
|
patch?: never;
|
|
1505
1505
|
trace?: never;
|
|
1506
1506
|
};
|
|
1507
|
-
'/api/paypal/getRecord/{recordId}': {
|
|
1508
|
-
parameters: {
|
|
1509
|
-
query?: never;
|
|
1510
|
-
header?: never;
|
|
1511
|
-
path?: never;
|
|
1512
|
-
cookie?: never;
|
|
1513
|
-
};
|
|
1514
|
-
get: operations['Paypal_getRecord'];
|
|
1515
|
-
put?: never;
|
|
1516
|
-
post?: never;
|
|
1517
|
-
delete?: never;
|
|
1518
|
-
options?: never;
|
|
1519
|
-
head?: never;
|
|
1520
|
-
patch?: never;
|
|
1521
|
-
trace?: never;
|
|
1522
|
-
};
|
|
1523
|
-
'/api/paypal/captureOrder/{recordId}': {
|
|
1524
|
-
parameters: {
|
|
1525
|
-
query?: never;
|
|
1526
|
-
header?: never;
|
|
1527
|
-
path?: never;
|
|
1528
|
-
cookie?: never;
|
|
1529
|
-
};
|
|
1530
|
-
get?: never;
|
|
1531
|
-
put?: never;
|
|
1532
|
-
post: operations['Paypal_captureOrder'];
|
|
1533
|
-
delete?: never;
|
|
1534
|
-
options?: never;
|
|
1535
|
-
head?: never;
|
|
1536
|
-
patch?: never;
|
|
1537
|
-
trace?: never;
|
|
1538
|
-
};
|
|
1539
|
-
'/api/paypal/cancelOrder/{recordId}': {
|
|
1540
|
-
parameters: {
|
|
1541
|
-
query?: never;
|
|
1542
|
-
header?: never;
|
|
1543
|
-
path?: never;
|
|
1544
|
-
cookie?: never;
|
|
1545
|
-
};
|
|
1546
|
-
get?: never;
|
|
1547
|
-
put?: never;
|
|
1548
|
-
post: operations['Paypal_cancelOrder'];
|
|
1549
|
-
delete?: never;
|
|
1550
|
-
options?: never;
|
|
1551
|
-
head?: never;
|
|
1552
|
-
patch?: never;
|
|
1553
|
-
trace?: never;
|
|
1554
|
-
};
|
|
1555
1507
|
'/api/test/auth/passport/isAuthenticated': {
|
|
1556
1508
|
parameters: {
|
|
1557
1509
|
query?: never;
|
|
@@ -3954,7 +3906,29 @@ export interface components {
|
|
|
3954
3906
|
'a-permission.dto.permissions': {
|
|
3955
3907
|
roleIds?: (number | string)[] | undefined;
|
|
3956
3908
|
roleNames?: string[] | undefined;
|
|
3957
|
-
actions?:
|
|
3909
|
+
actions?:
|
|
3910
|
+
| {
|
|
3911
|
+
[key: string]:
|
|
3912
|
+
| boolean
|
|
3913
|
+
| {
|
|
3914
|
+
key: string;
|
|
3915
|
+
allowed: boolean;
|
|
3916
|
+
matcher:
|
|
3917
|
+
| {
|
|
3918
|
+
/** @enum {string} */
|
|
3919
|
+
mode: 'all';
|
|
3920
|
+
}
|
|
3921
|
+
| {
|
|
3922
|
+
/** @enum {string} */
|
|
3923
|
+
mode: 'any';
|
|
3924
|
+
rules: {
|
|
3925
|
+
field: string;
|
|
3926
|
+
values: string[];
|
|
3927
|
+
}[];
|
|
3928
|
+
};
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
| undefined;
|
|
3958
3932
|
};
|
|
3959
3933
|
'home-base.dto.siteCatalogSelectRes': {
|
|
3960
3934
|
list: components['schemas']['home-base.dto.siteCatalogSelectResItem'][];
|
|
@@ -4771,49 +4745,6 @@ export interface components {
|
|
|
4771
4745
|
/** @enum {string} */
|
|
4772
4746
|
outcome: 'succeeded' | 'failed' | 'cancelled';
|
|
4773
4747
|
};
|
|
4774
|
-
'a-paypal.entity.paypalRecord': {
|
|
4775
|
-
/**
|
|
4776
|
-
* Format: date-time
|
|
4777
|
-
* @description Created At
|
|
4778
|
-
*/
|
|
4779
|
-
createdAt: Date;
|
|
4780
|
-
/**
|
|
4781
|
-
* Format: date-time
|
|
4782
|
-
* @description Updated At
|
|
4783
|
-
*/
|
|
4784
|
-
updatedAt: Date;
|
|
4785
|
-
/**
|
|
4786
|
-
* @description Deleted
|
|
4787
|
-
* @default false
|
|
4788
|
-
*/
|
|
4789
|
-
deleted?: boolean;
|
|
4790
|
-
/**
|
|
4791
|
-
* @description Instance ID
|
|
4792
|
-
* @default 0
|
|
4793
|
-
*/
|
|
4794
|
-
iid?: number;
|
|
4795
|
-
/** @description ID */
|
|
4796
|
-
id: number | string;
|
|
4797
|
-
userId: number | string;
|
|
4798
|
-
/** @default 0 */
|
|
4799
|
-
status?: number;
|
|
4800
|
-
prepayId: string;
|
|
4801
|
-
payload: components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
|
|
4802
|
-
options: components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
|
|
4803
|
-
};
|
|
4804
|
-
'a-paypal.dto.paypalOrderRecordPayload': {
|
|
4805
|
-
remark: string;
|
|
4806
|
-
total: string;
|
|
4807
|
-
currencyCode: string;
|
|
4808
|
-
};
|
|
4809
|
-
'a-paypal.dto.paypalOrderRecordOptions': {
|
|
4810
|
-
brandName: string;
|
|
4811
|
-
returnUrl: string;
|
|
4812
|
-
cancelUrl: string;
|
|
4813
|
-
returnTo: string;
|
|
4814
|
-
scene: string;
|
|
4815
|
-
orderId: number | string;
|
|
4816
|
-
};
|
|
4817
4748
|
'test-captcha.dto.signin': {
|
|
4818
4749
|
username: string;
|
|
4819
4750
|
password: string;
|
|
@@ -8544,84 +8475,6 @@ export interface operations {
|
|
|
8544
8475
|
};
|
|
8545
8476
|
authToken: true;
|
|
8546
8477
|
};
|
|
8547
|
-
Paypal_getRecord: {
|
|
8548
|
-
parameters: {
|
|
8549
|
-
query?: never;
|
|
8550
|
-
header?: never;
|
|
8551
|
-
path: {
|
|
8552
|
-
recordId: number | string;
|
|
8553
|
-
};
|
|
8554
|
-
cookie?: never;
|
|
8555
|
-
};
|
|
8556
|
-
requestBody?: never;
|
|
8557
|
-
responses: {
|
|
8558
|
-
200: {
|
|
8559
|
-
headers: {
|
|
8560
|
-
[name: string]: unknown;
|
|
8561
|
-
};
|
|
8562
|
-
content: {
|
|
8563
|
-
'application/json': {
|
|
8564
|
-
code: string;
|
|
8565
|
-
message: string;
|
|
8566
|
-
data: components['schemas']['a-paypal.entity.paypalRecord'];
|
|
8567
|
-
};
|
|
8568
|
-
};
|
|
8569
|
-
};
|
|
8570
|
-
};
|
|
8571
|
-
authToken: true;
|
|
8572
|
-
};
|
|
8573
|
-
Paypal_captureOrder: {
|
|
8574
|
-
parameters: {
|
|
8575
|
-
query?: never;
|
|
8576
|
-
header?: never;
|
|
8577
|
-
path: {
|
|
8578
|
-
recordId: number | string;
|
|
8579
|
-
};
|
|
8580
|
-
cookie?: never;
|
|
8581
|
-
};
|
|
8582
|
-
requestBody?: never;
|
|
8583
|
-
responses: {
|
|
8584
|
-
200: {
|
|
8585
|
-
headers: {
|
|
8586
|
-
[name: string]: unknown;
|
|
8587
|
-
};
|
|
8588
|
-
content: {
|
|
8589
|
-
'application/json': {
|
|
8590
|
-
code: string;
|
|
8591
|
-
message: string;
|
|
8592
|
-
data?: unknown;
|
|
8593
|
-
};
|
|
8594
|
-
};
|
|
8595
|
-
};
|
|
8596
|
-
};
|
|
8597
|
-
authToken: true;
|
|
8598
|
-
};
|
|
8599
|
-
Paypal_cancelOrder: {
|
|
8600
|
-
parameters: {
|
|
8601
|
-
query?: never;
|
|
8602
|
-
header?: never;
|
|
8603
|
-
path: {
|
|
8604
|
-
recordId: number | string;
|
|
8605
|
-
};
|
|
8606
|
-
cookie?: never;
|
|
8607
|
-
};
|
|
8608
|
-
requestBody?: never;
|
|
8609
|
-
responses: {
|
|
8610
|
-
200: {
|
|
8611
|
-
headers: {
|
|
8612
|
-
[name: string]: unknown;
|
|
8613
|
-
};
|
|
8614
|
-
content: {
|
|
8615
|
-
'application/json': {
|
|
8616
|
-
code: string;
|
|
8617
|
-
message: string;
|
|
8618
|
-
data?: unknown;
|
|
8619
|
-
};
|
|
8620
|
-
};
|
|
8621
|
-
};
|
|
8622
|
-
};
|
|
8623
|
-
authToken: true;
|
|
8624
|
-
};
|
|
8625
8478
|
TestAuthPassport_isAuthenticated: {
|
|
8626
8479
|
parameters: {
|
|
8627
8480
|
query?: never;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { SchemaObject } from 'openapi3-ts/oas31';
|
|
1
2
|
import type { TableIdentity } from 'table-identity';
|
|
3
|
+
import type { TypeFormOnSubmitData } from 'zova-module-a-form';
|
|
2
4
|
|
|
3
5
|
import { z } from 'zod';
|
|
4
6
|
import { BeanControllerPageBase, Use } from 'zova';
|
|
5
7
|
import { Controller } from 'zova-module-a-bean';
|
|
8
|
+
import { ZForm } from 'zova-module-a-form';
|
|
6
9
|
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
7
10
|
import { ZPage } from 'zova-module-home-base';
|
|
8
11
|
|
|
@@ -37,9 +40,27 @@ export class ControllerPageAddress extends BeanControllerPageBase {
|
|
|
37
40
|
|
|
38
41
|
editingId?: TableIdentity;
|
|
39
42
|
draft: AddressDraft = emptyDraft();
|
|
43
|
+
schemaAddress?: SchemaObject;
|
|
44
|
+
|
|
45
|
+
get apiSchemasAddressCreate() {
|
|
46
|
+
return this.scope.apiSchema.commerceMemberAddress.createMine();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
get apiSchemasAddressUpdate() {
|
|
50
|
+
return this.scope.apiSchema.commerceMemberAddress.updateMine();
|
|
51
|
+
}
|
|
40
52
|
|
|
41
53
|
protected async __init__() {
|
|
42
|
-
await
|
|
54
|
+
await Promise.all([
|
|
55
|
+
$QueryEnsureLoaded(() => this.queryAddresses),
|
|
56
|
+
$QueryEnsureLoaded(() => this.apiSchemasAddressCreate.sdk),
|
|
57
|
+
$QueryEnsureLoaded(() => this.apiSchemasAddressUpdate.sdk),
|
|
58
|
+
]);
|
|
59
|
+
this.schemaAddress = this.$computed(() => {
|
|
60
|
+
return this.editingId === undefined
|
|
61
|
+
? this.apiSchemasAddressCreate.requestBody
|
|
62
|
+
: this.apiSchemasAddressUpdate.requestBody;
|
|
63
|
+
});
|
|
43
64
|
}
|
|
44
65
|
|
|
45
66
|
get queryAddresses() {
|
|
@@ -65,13 +86,13 @@ export class ControllerPageAddress extends BeanControllerPageBase {
|
|
|
65
86
|
this.draft = emptyDraft();
|
|
66
87
|
}
|
|
67
88
|
|
|
68
|
-
async submit() {
|
|
89
|
+
async submit(data: TypeFormOnSubmitData<AddressDraft>) {
|
|
69
90
|
if (this.editingId === undefined) {
|
|
70
|
-
await this.$$modelAddressMine.createMine().mutateAsync(
|
|
91
|
+
await this.$$modelAddressMine.createMine().mutateAsync(data.value);
|
|
71
92
|
} else {
|
|
72
93
|
await this.$$modelAddressMine.updateMine().mutateAsync({
|
|
73
94
|
id: this.editingId,
|
|
74
|
-
body:
|
|
95
|
+
body: data.value,
|
|
75
96
|
});
|
|
76
97
|
}
|
|
77
98
|
this.resetDraft();
|
|
@@ -124,68 +145,48 @@ export class ControllerPageAddress extends BeanControllerPageBase {
|
|
|
124
145
|
</article>
|
|
125
146
|
))}
|
|
126
147
|
</div>
|
|
127
|
-
<
|
|
128
|
-
class="card bg-base-100 border border-base-300 shadow-sm"
|
|
129
|
-
onSubmit={event => event.preventDefault()}
|
|
130
|
-
>
|
|
148
|
+
<div class="card bg-base-100 border border-base-300 shadow-sm">
|
|
131
149
|
<div class="card-body gap-3">
|
|
132
|
-
<
|
|
133
|
-
{this.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
class="input input-bordered"
|
|
169
|
-
placeholder={this.scope.locale.AddressLine1()}
|
|
170
|
-
v-model={this.draft.addressLine1}
|
|
171
|
-
/>
|
|
172
|
-
<input
|
|
173
|
-
class="input input-bordered"
|
|
174
|
-
placeholder={this.scope.locale.AddressLine2()}
|
|
175
|
-
v-model={this.draft.addressLine2}
|
|
176
|
-
/>
|
|
177
|
-
<div class="flex gap-2">
|
|
178
|
-
<button class="btn btn-primary" type="submit" onClick={() => this.submit()}>
|
|
179
|
-
{this.scope.locale.SaveAddress()}
|
|
180
|
-
</button>
|
|
181
|
-
{this.editingId !== undefined && (
|
|
182
|
-
<button class="btn btn-outline" type="button" onClick={() => this.resetDraft()}>
|
|
183
|
-
{this.scope.locale.CancelAddressEdit()}
|
|
184
|
-
</button>
|
|
150
|
+
<ZForm
|
|
151
|
+
data={this.draft}
|
|
152
|
+
schema={this.schemaAddress}
|
|
153
|
+
onSubmitData={data => this.submit(data)}
|
|
154
|
+
onShowError={async ({ error }) => {
|
|
155
|
+
await this.$performCommand('basic-commands:alert', {
|
|
156
|
+
type: 'error',
|
|
157
|
+
text: error.message,
|
|
158
|
+
});
|
|
159
|
+
}}
|
|
160
|
+
slotHeader={() => (
|
|
161
|
+
<h2 class="card-title">
|
|
162
|
+
{this.editingId === undefined
|
|
163
|
+
? this.scope.locale.AddAddress()
|
|
164
|
+
: this.scope.locale.EditAddress()}
|
|
165
|
+
</h2>
|
|
166
|
+
)}
|
|
167
|
+
slotFooter={$$form => (
|
|
168
|
+
<div class="flex gap-2">
|
|
169
|
+
<button
|
|
170
|
+
class="btn btn-primary"
|
|
171
|
+
disabled={$$form.formState.isSubmitting}
|
|
172
|
+
type="submit"
|
|
173
|
+
>
|
|
174
|
+
{this.scope.locale.SaveAddress()}
|
|
175
|
+
</button>
|
|
176
|
+
{this.editingId !== undefined && (
|
|
177
|
+
<button
|
|
178
|
+
class="btn btn-outline"
|
|
179
|
+
type="button"
|
|
180
|
+
onClick={() => this.resetDraft()}
|
|
181
|
+
>
|
|
182
|
+
{this.scope.locale.CancelAddressEdit()}
|
|
183
|
+
</button>
|
|
184
|
+
)}
|
|
185
|
+
</div>
|
|
185
186
|
)}
|
|
186
|
-
|
|
187
|
+
></ZForm>
|
|
187
188
|
</div>
|
|
188
|
-
</
|
|
189
|
+
</div>
|
|
189
190
|
</div>
|
|
190
191
|
{query?.error && (
|
|
191
192
|
<div role="alert" class="alert alert-error mt-6">
|
|
@@ -535,17 +535,6 @@ export type ApiSchemaPayMockDtoMockRefundComplete =
|
|
|
535
535
|
components['schemas']['pay-mock.dto.mockRefundComplete'];
|
|
536
536
|
export type ApiSchemaPayMockDtoMockRefundCompletePartial =
|
|
537
537
|
Partial<ApiSchemaPayMockDtoMockRefundComplete>;
|
|
538
|
-
export type ApiSchemaAPaypalEntityPaypalRecord =
|
|
539
|
-
components['schemas']['a-paypal.entity.paypalRecord'];
|
|
540
|
-
export type ApiSchemaAPaypalEntityPaypalRecordPartial = Partial<ApiSchemaAPaypalEntityPaypalRecord>;
|
|
541
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordPayload =
|
|
542
|
-
components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
|
|
543
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordPayloadPartial =
|
|
544
|
-
Partial<ApiSchemaAPaypalDtoPaypalOrderRecordPayload>;
|
|
545
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordOptions =
|
|
546
|
-
components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
|
|
547
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordOptionsPartial =
|
|
548
|
-
Partial<ApiSchemaAPaypalDtoPaypalOrderRecordOptions>;
|
|
549
538
|
export type ApiSchemaTestCaptchaDtoSignin = components['schemas']['test-captcha.dto.signin'];
|
|
550
539
|
export type ApiSchemaTestCaptchaDtoSigninPartial = Partial<ApiSchemaTestCaptchaDtoSignin>;
|
|
551
540
|
export type ApiSchemaTestRestDtoProductCreate =
|
|
@@ -1504,54 +1504,6 @@ export interface paths {
|
|
|
1504
1504
|
patch?: never;
|
|
1505
1505
|
trace?: never;
|
|
1506
1506
|
};
|
|
1507
|
-
'/api/paypal/getRecord/{recordId}': {
|
|
1508
|
-
parameters: {
|
|
1509
|
-
query?: never;
|
|
1510
|
-
header?: never;
|
|
1511
|
-
path?: never;
|
|
1512
|
-
cookie?: never;
|
|
1513
|
-
};
|
|
1514
|
-
get: operations['Paypal_getRecord'];
|
|
1515
|
-
put?: never;
|
|
1516
|
-
post?: never;
|
|
1517
|
-
delete?: never;
|
|
1518
|
-
options?: never;
|
|
1519
|
-
head?: never;
|
|
1520
|
-
patch?: never;
|
|
1521
|
-
trace?: never;
|
|
1522
|
-
};
|
|
1523
|
-
'/api/paypal/captureOrder/{recordId}': {
|
|
1524
|
-
parameters: {
|
|
1525
|
-
query?: never;
|
|
1526
|
-
header?: never;
|
|
1527
|
-
path?: never;
|
|
1528
|
-
cookie?: never;
|
|
1529
|
-
};
|
|
1530
|
-
get?: never;
|
|
1531
|
-
put?: never;
|
|
1532
|
-
post: operations['Paypal_captureOrder'];
|
|
1533
|
-
delete?: never;
|
|
1534
|
-
options?: never;
|
|
1535
|
-
head?: never;
|
|
1536
|
-
patch?: never;
|
|
1537
|
-
trace?: never;
|
|
1538
|
-
};
|
|
1539
|
-
'/api/paypal/cancelOrder/{recordId}': {
|
|
1540
|
-
parameters: {
|
|
1541
|
-
query?: never;
|
|
1542
|
-
header?: never;
|
|
1543
|
-
path?: never;
|
|
1544
|
-
cookie?: never;
|
|
1545
|
-
};
|
|
1546
|
-
get?: never;
|
|
1547
|
-
put?: never;
|
|
1548
|
-
post: operations['Paypal_cancelOrder'];
|
|
1549
|
-
delete?: never;
|
|
1550
|
-
options?: never;
|
|
1551
|
-
head?: never;
|
|
1552
|
-
patch?: never;
|
|
1553
|
-
trace?: never;
|
|
1554
|
-
};
|
|
1555
1507
|
'/api/test/auth/passport/isAuthenticated': {
|
|
1556
1508
|
parameters: {
|
|
1557
1509
|
query?: never;
|
|
@@ -3954,7 +3906,29 @@ export interface components {
|
|
|
3954
3906
|
'a-permission.dto.permissions': {
|
|
3955
3907
|
roleIds?: (number | string)[] | undefined;
|
|
3956
3908
|
roleNames?: string[] | undefined;
|
|
3957
|
-
actions?:
|
|
3909
|
+
actions?:
|
|
3910
|
+
| {
|
|
3911
|
+
[key: string]:
|
|
3912
|
+
| boolean
|
|
3913
|
+
| {
|
|
3914
|
+
key: string;
|
|
3915
|
+
allowed: boolean;
|
|
3916
|
+
matcher:
|
|
3917
|
+
| {
|
|
3918
|
+
/** @enum {string} */
|
|
3919
|
+
mode: 'all';
|
|
3920
|
+
}
|
|
3921
|
+
| {
|
|
3922
|
+
/** @enum {string} */
|
|
3923
|
+
mode: 'any';
|
|
3924
|
+
rules: {
|
|
3925
|
+
field: string;
|
|
3926
|
+
values: string[];
|
|
3927
|
+
}[];
|
|
3928
|
+
};
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
| undefined;
|
|
3958
3932
|
};
|
|
3959
3933
|
'home-base.dto.siteCatalogSelectRes': {
|
|
3960
3934
|
list: components['schemas']['home-base.dto.siteCatalogSelectResItem'][];
|
|
@@ -4771,49 +4745,6 @@ export interface components {
|
|
|
4771
4745
|
/** @enum {string} */
|
|
4772
4746
|
outcome: 'succeeded' | 'failed' | 'cancelled';
|
|
4773
4747
|
};
|
|
4774
|
-
'a-paypal.entity.paypalRecord': {
|
|
4775
|
-
/**
|
|
4776
|
-
* Format: date-time
|
|
4777
|
-
* @description Created At
|
|
4778
|
-
*/
|
|
4779
|
-
createdAt: Date;
|
|
4780
|
-
/**
|
|
4781
|
-
* Format: date-time
|
|
4782
|
-
* @description Updated At
|
|
4783
|
-
*/
|
|
4784
|
-
updatedAt: Date;
|
|
4785
|
-
/**
|
|
4786
|
-
* @description Deleted
|
|
4787
|
-
* @default false
|
|
4788
|
-
*/
|
|
4789
|
-
deleted?: boolean;
|
|
4790
|
-
/**
|
|
4791
|
-
* @description Instance ID
|
|
4792
|
-
* @default 0
|
|
4793
|
-
*/
|
|
4794
|
-
iid?: number;
|
|
4795
|
-
/** @description ID */
|
|
4796
|
-
id: number | string;
|
|
4797
|
-
userId: number | string;
|
|
4798
|
-
/** @default 0 */
|
|
4799
|
-
status?: number;
|
|
4800
|
-
prepayId: string;
|
|
4801
|
-
payload: components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
|
|
4802
|
-
options: components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
|
|
4803
|
-
};
|
|
4804
|
-
'a-paypal.dto.paypalOrderRecordPayload': {
|
|
4805
|
-
remark: string;
|
|
4806
|
-
total: string;
|
|
4807
|
-
currencyCode: string;
|
|
4808
|
-
};
|
|
4809
|
-
'a-paypal.dto.paypalOrderRecordOptions': {
|
|
4810
|
-
brandName: string;
|
|
4811
|
-
returnUrl: string;
|
|
4812
|
-
cancelUrl: string;
|
|
4813
|
-
returnTo: string;
|
|
4814
|
-
scene: string;
|
|
4815
|
-
orderId: number | string;
|
|
4816
|
-
};
|
|
4817
4748
|
'test-captcha.dto.signin': {
|
|
4818
4749
|
username: string;
|
|
4819
4750
|
password: string;
|
|
@@ -8544,84 +8475,6 @@ export interface operations {
|
|
|
8544
8475
|
};
|
|
8545
8476
|
authToken: true;
|
|
8546
8477
|
};
|
|
8547
|
-
Paypal_getRecord: {
|
|
8548
|
-
parameters: {
|
|
8549
|
-
query?: never;
|
|
8550
|
-
header?: never;
|
|
8551
|
-
path: {
|
|
8552
|
-
recordId: number | string;
|
|
8553
|
-
};
|
|
8554
|
-
cookie?: never;
|
|
8555
|
-
};
|
|
8556
|
-
requestBody?: never;
|
|
8557
|
-
responses: {
|
|
8558
|
-
200: {
|
|
8559
|
-
headers: {
|
|
8560
|
-
[name: string]: unknown;
|
|
8561
|
-
};
|
|
8562
|
-
content: {
|
|
8563
|
-
'application/json': {
|
|
8564
|
-
code: string;
|
|
8565
|
-
message: string;
|
|
8566
|
-
data: components['schemas']['a-paypal.entity.paypalRecord'];
|
|
8567
|
-
};
|
|
8568
|
-
};
|
|
8569
|
-
};
|
|
8570
|
-
};
|
|
8571
|
-
authToken: true;
|
|
8572
|
-
};
|
|
8573
|
-
Paypal_captureOrder: {
|
|
8574
|
-
parameters: {
|
|
8575
|
-
query?: never;
|
|
8576
|
-
header?: never;
|
|
8577
|
-
path: {
|
|
8578
|
-
recordId: number | string;
|
|
8579
|
-
};
|
|
8580
|
-
cookie?: never;
|
|
8581
|
-
};
|
|
8582
|
-
requestBody?: never;
|
|
8583
|
-
responses: {
|
|
8584
|
-
200: {
|
|
8585
|
-
headers: {
|
|
8586
|
-
[name: string]: unknown;
|
|
8587
|
-
};
|
|
8588
|
-
content: {
|
|
8589
|
-
'application/json': {
|
|
8590
|
-
code: string;
|
|
8591
|
-
message: string;
|
|
8592
|
-
data?: unknown;
|
|
8593
|
-
};
|
|
8594
|
-
};
|
|
8595
|
-
};
|
|
8596
|
-
};
|
|
8597
|
-
authToken: true;
|
|
8598
|
-
};
|
|
8599
|
-
Paypal_cancelOrder: {
|
|
8600
|
-
parameters: {
|
|
8601
|
-
query?: never;
|
|
8602
|
-
header?: never;
|
|
8603
|
-
path: {
|
|
8604
|
-
recordId: number | string;
|
|
8605
|
-
};
|
|
8606
|
-
cookie?: never;
|
|
8607
|
-
};
|
|
8608
|
-
requestBody?: never;
|
|
8609
|
-
responses: {
|
|
8610
|
-
200: {
|
|
8611
|
-
headers: {
|
|
8612
|
-
[name: string]: unknown;
|
|
8613
|
-
};
|
|
8614
|
-
content: {
|
|
8615
|
-
'application/json': {
|
|
8616
|
-
code: string;
|
|
8617
|
-
message: string;
|
|
8618
|
-
data?: unknown;
|
|
8619
|
-
};
|
|
8620
|
-
};
|
|
8621
|
-
};
|
|
8622
|
-
};
|
|
8623
|
-
authToken: true;
|
|
8624
|
-
};
|
|
8625
8478
|
TestAuthPassport_isAuthenticated: {
|
|
8626
8479
|
parameters: {
|
|
8627
8480
|
query?: never;
|
|
@@ -535,17 +535,6 @@ export type ApiSchemaPayMockDtoMockRefundComplete =
|
|
|
535
535
|
components['schemas']['pay-mock.dto.mockRefundComplete'];
|
|
536
536
|
export type ApiSchemaPayMockDtoMockRefundCompletePartial =
|
|
537
537
|
Partial<ApiSchemaPayMockDtoMockRefundComplete>;
|
|
538
|
-
export type ApiSchemaAPaypalEntityPaypalRecord =
|
|
539
|
-
components['schemas']['a-paypal.entity.paypalRecord'];
|
|
540
|
-
export type ApiSchemaAPaypalEntityPaypalRecordPartial = Partial<ApiSchemaAPaypalEntityPaypalRecord>;
|
|
541
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordPayload =
|
|
542
|
-
components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
|
|
543
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordPayloadPartial =
|
|
544
|
-
Partial<ApiSchemaAPaypalDtoPaypalOrderRecordPayload>;
|
|
545
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordOptions =
|
|
546
|
-
components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
|
|
547
|
-
export type ApiSchemaAPaypalDtoPaypalOrderRecordOptionsPartial =
|
|
548
|
-
Partial<ApiSchemaAPaypalDtoPaypalOrderRecordOptions>;
|
|
549
538
|
export type ApiSchemaTestCaptchaDtoSignin = components['schemas']['test-captcha.dto.signin'];
|
|
550
539
|
export type ApiSchemaTestCaptchaDtoSigninPartial = Partial<ApiSchemaTestCaptchaDtoSignin>;
|
|
551
540
|
export type ApiSchemaTestRestDtoProductCreate =
|