@ztocwst/rc-pro-materials 0.2.1 → 0.2.3-4.1
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/README.md +17 -17
- package/build/index.js +8 -8
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +8 -8
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/designer.html +2 -2
- package/build/lowcode/index.html +2 -2
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.css +1 -1
- package/build/lowcode/preview.js +4 -5
- package/build/lowcode/render/default/view.css +1 -2
- package/build/lowcode/render/default/view.js +9 -58
- package/build/lowcode/view.css +1 -2
- package/build/lowcode/view.js +10 -59
- package/dist/SCM_Comps.css +2 -2
- package/dist/SCM_Comps.js +22 -53
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-Ellipsis/ellipsis.d.ts +4 -4
- package/es/components/z-Ellipsis/index.d.ts +3 -3
- package/es/components/z-agg-block/index.d.ts +3 -3
- package/es/components/z-agg-block/index.less +134 -134
- package/es/components/z-agg-block/z-agg-block.d.ts +27 -27
- package/es/components/z-agg-block/z-agg-block.js +1 -1
- package/es/components/z-auth/auth.d.ts +9 -9
- package/es/components/z-auth/index.d.ts +3 -3
- package/es/components/z-box/box.d.ts +20 -20
- package/es/components/z-box/index.d.ts +3 -3
- package/es/components/z-box/index.less +4 -4
- package/es/components/z-button/index.d.ts +3 -3
- package/es/components/z-button/z-button.d.ts +4 -4
- package/es/components/z-config-provider/configProvider.d.ts +4 -4
- package/es/components/z-config-provider/configProvider.js +45 -4
- package/es/components/z-config-provider/index.d.ts +3 -3
- package/es/components/z-data-table/data-table.d.ts +9 -0
- package/es/components/z-data-table/data-table.js +24 -0
- package/es/components/z-data-table/index.d.ts +3 -0
- package/es/components/z-data-table/index.js +2 -0
- package/es/components/z-div/div.d.ts +6 -6
- package/es/components/z-div/index.d.ts +2 -2
- package/es/components/z-editTable/editTable.d.ts +11 -11
- package/es/components/z-editTable/editTable.js +3 -4
- package/es/components/z-editTable/index.d.ts +2 -2
- package/es/components/z-form/index.d.ts +3 -3
- package/es/components/z-form/z-form.d.ts +10 -10
- package/es/components/z-form/z-form.js +1 -1
- package/es/components/z-list/index.d.ts +3 -3
- package/es/components/z-list/list.d.ts +17 -17
- package/es/components/z-list/list.js +3 -3
- package/es/components/z-operation-records/index.d.ts +3 -3
- package/es/components/z-operation-records/operationRecords.d.ts +4 -4
- package/es/components/z-pointer-block/index.d.ts +3 -3
- package/es/components/z-pointer-block/index.less +15 -15
- package/es/components/z-pointer-block/z-pointer-block.d.ts +16 -16
- package/es/components/z-preview/index.d.ts +3 -3
- package/es/components/z-preview/preview.d.ts +4 -4
- package/es/components/z-pro-provider/index.d.ts +3 -3
- package/es/components/z-pro-provider/z-pro-provider.d.ts +6 -6
- package/es/components/z-ranking-list/index.d.ts +2 -2
- package/es/components/z-ranking-list/index.less +49 -49
- package/es/components/z-ranking-list/z-ranking-list.d.ts +14 -14
- package/es/components/z-ranking-list/z-ranking-list.js +2 -3
- package/es/components/z-simple-bar/index.d.ts +3 -3
- package/es/components/z-simple-bar/index.less +9 -9
- package/es/components/z-simple-bar/z-simple-bar.d.ts +27 -27
- package/es/components/z-singleFactory/index.d.ts +2 -2
- package/es/components/z-singleFactory/zSingerFactory.d.ts +2 -3
- package/es/components/z-slick/index.d.ts +3 -0
- package/es/components/z-slick/index.js +2 -0
- package/es/components/z-slick/slick.d.ts +47 -0
- package/es/components/z-slick/slick.js +35 -0
- package/es/components/z-statistic/index.d.ts +3 -3
- package/es/components/z-statistic/index.less +22 -22
- package/es/components/z-statistic/z-statistic.d.ts +13 -13
- package/es/components/z-table/index.d.ts +3 -3
- package/es/components/z-table/table.d.ts +8 -8
- package/es/components/z-table/table.js +1 -1
- package/es/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
- package/es/components/z-templates-data-common/components/chart-renderer/index.js +33 -13
- package/es/components/z-templates-data-common/data-common.d.ts +20 -105
- package/es/components/z-templates-data-common/data-common.helper.d.ts +2 -61
- package/es/components/z-templates-data-common/data-common.helper.js +2 -336
- package/es/components/z-templates-data-common/data-common.js +81 -62
- package/es/components/z-templates-data-common/index.d.ts +3 -3
- package/es/components/z-tpl/index.d.ts +3 -3
- package/es/components/z-tpl/tpl.d.ts +23 -23
- package/es/components/z-tpl/tpl.js +3 -3
- package/es/components/z-warehouse/index.d.ts +2 -2
- package/es/components/z-warehouse/zWarehouse.d.ts +2 -3
- package/es/components/z-watermark/index.d.ts +3 -0
- package/es/components/z-watermark/index.js +2 -0
- package/es/components/z-watermark/zWatermark.d.ts +3 -0
- package/es/components/z-watermark/zWatermark.js +4 -0
- package/es/index.d.ts +44 -38
- package/es/index.js +4 -0
- package/es/index.scss +1 -1
- package/es/style.js +2 -6
- package/es/utils/hoc.d.ts +6 -6
- package/es/utils/hoc.js +3 -3
- package/es/utils/index.d.ts +13 -13
- package/es/utils/index.js +5 -1
- package/es/utils/props/button.d.ts +13 -13
- package/es/utils/props/common.d.ts +7 -1
- package/es/utils/props/common.js +17 -0
- package/es/utils/props/editTable.d.ts +3 -3
- package/es/utils/props/editTable.js +21 -14
- package/es/utils/props/form.d.ts +36 -0
- package/es/utils/props/form.js +33 -14
- package/es/utils/props/listTpl.d.ts +29 -29
- package/es/utils/props/microModal.d.ts +7 -7
- package/es/utils/props/microModal.js +0 -1
- package/es/utils/props/microSwitch.d.ts +1 -1
- package/es/utils/props/microSwitch.js +4 -3
- package/es/utils/props/modalSelect.d.ts +6 -6
- package/es/utils/props/operationRecords.d.ts +2 -2
- package/es/utils/props/operationRecords.js +4 -4
- package/es/utils/props/preview.d.ts +2 -2
- package/es/utils/props/preview.js +4 -4
- package/es/utils/props/tpl.d.ts +173 -162
- package/es/utils/props/warehouseAndFactory.d.ts +1 -1
- package/es/utils/rcProRequest.d.ts +3 -3
- package/es/utils/rcProRequest.js +3 -3
- package/es/variables.scss +3 -3
- package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -4
- package/lib/components/z-Ellipsis/ellipsis.js +3 -4
- package/lib/components/z-Ellipsis/index.d.ts +3 -3
- package/lib/components/z-Ellipsis/index.js +1 -2
- package/lib/components/z-agg-block/index.d.ts +3 -3
- package/lib/components/z-agg-block/index.js +1 -2
- package/lib/components/z-agg-block/index.less +134 -134
- package/lib/components/z-agg-block/z-agg-block.d.ts +27 -27
- package/lib/components/z-agg-block/z-agg-block.js +2 -3
- package/lib/components/z-auth/auth.d.ts +9 -9
- package/lib/components/z-auth/auth.js +1 -2
- package/lib/components/z-auth/index.d.ts +3 -3
- package/lib/components/z-auth/index.js +1 -2
- package/lib/components/z-box/box.d.ts +20 -20
- package/lib/components/z-box/box.js +1 -2
- package/lib/components/z-box/index.d.ts +3 -3
- package/lib/components/z-box/index.js +1 -2
- package/lib/components/z-box/index.less +4 -4
- package/lib/components/z-button/index.d.ts +3 -3
- package/lib/components/z-button/index.js +1 -2
- package/lib/components/z-button/z-button.d.ts +4 -4
- package/lib/components/z-button/z-button.js +4 -4
- package/lib/components/z-config-provider/configProvider.d.ts +4 -4
- package/lib/components/z-config-provider/configProvider.js +47 -7
- package/lib/components/z-config-provider/index.d.ts +3 -3
- package/lib/components/z-config-provider/index.js +1 -2
- package/lib/components/z-data-table/data-table.d.ts +9 -0
- package/lib/components/z-data-table/data-table.js +27 -0
- package/lib/components/z-data-table/index.d.ts +3 -0
- package/lib/components/z-data-table/index.js +7 -0
- package/lib/components/z-div/div.d.ts +6 -6
- package/lib/components/z-div/div.js +1 -2
- package/lib/components/z-div/index.d.ts +2 -2
- package/lib/components/z-div/index.js +1 -2
- package/lib/components/z-editTable/editTable.d.ts +11 -11
- package/lib/components/z-editTable/editTable.js +7 -9
- package/lib/components/z-editTable/index.d.ts +2 -2
- package/lib/components/z-editTable/index.js +1 -2
- package/lib/components/z-form/index.d.ts +3 -3
- package/lib/components/z-form/index.js +1 -2
- package/lib/components/z-form/z-form.d.ts +10 -10
- package/lib/components/z-form/z-form.js +5 -6
- package/lib/components/z-list/index.d.ts +3 -3
- package/lib/components/z-list/index.js +1 -2
- package/lib/components/z-list/list.d.ts +17 -17
- package/lib/components/z-list/list.js +7 -8
- package/lib/components/z-operation-records/index.d.ts +3 -3
- package/lib/components/z-operation-records/index.js +1 -2
- package/lib/components/z-operation-records/operationRecords.d.ts +4 -4
- package/lib/components/z-operation-records/operationRecords.js +3 -4
- package/lib/components/z-pointer-block/index.d.ts +3 -3
- package/lib/components/z-pointer-block/index.js +1 -2
- package/lib/components/z-pointer-block/index.less +15 -15
- package/lib/components/z-pointer-block/z-pointer-block.d.ts +16 -16
- package/lib/components/z-pointer-block/z-pointer-block.js +1 -2
- package/lib/components/z-preview/index.d.ts +3 -3
- package/lib/components/z-preview/index.js +1 -2
- package/lib/components/z-preview/preview.d.ts +4 -4
- package/lib/components/z-preview/preview.js +3 -4
- package/lib/components/z-pro-provider/index.d.ts +3 -3
- package/lib/components/z-pro-provider/index.js +1 -2
- package/lib/components/z-pro-provider/z-pro-provider.d.ts +6 -6
- package/lib/components/z-pro-provider/z-pro-provider.js +3 -4
- package/lib/components/z-ranking-list/index.d.ts +2 -2
- package/lib/components/z-ranking-list/index.js +1 -2
- package/lib/components/z-ranking-list/index.less +49 -49
- package/lib/components/z-ranking-list/z-ranking-list.d.ts +14 -14
- package/lib/components/z-ranking-list/z-ranking-list.js +5 -7
- package/lib/components/z-simple-bar/index.d.ts +3 -3
- package/lib/components/z-simple-bar/index.js +1 -2
- package/lib/components/z-simple-bar/index.less +9 -9
- package/lib/components/z-simple-bar/z-simple-bar.d.ts +27 -27
- package/lib/components/z-simple-bar/z-simple-bar.js +1 -2
- package/lib/components/z-singleFactory/index.d.ts +2 -2
- package/lib/components/z-singleFactory/index.js +1 -2
- package/lib/components/z-singleFactory/zSingerFactory.d.ts +2 -3
- package/lib/components/z-singleFactory/zSingerFactory.js +3 -4
- package/lib/components/z-slick/index.d.ts +3 -0
- package/lib/components/z-slick/index.js +7 -0
- package/lib/components/z-slick/slick.d.ts +47 -0
- package/lib/components/z-slick/slick.js +39 -0
- package/lib/components/z-statistic/index.d.ts +3 -3
- package/lib/components/z-statistic/index.js +1 -2
- package/lib/components/z-statistic/index.less +22 -22
- package/lib/components/z-statistic/z-statistic.d.ts +13 -13
- package/lib/components/z-statistic/z-statistic.js +1 -2
- package/lib/components/z-table/index.d.ts +3 -3
- package/lib/components/z-table/index.js +1 -2
- package/lib/components/z-table/table.d.ts +8 -8
- package/lib/components/z-table/table.js +5 -6
- package/lib/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
- package/lib/components/z-templates-data-common/components/chart-renderer/index.js +36 -17
- package/lib/components/z-templates-data-common/data-common.d.ts +20 -105
- package/lib/components/z-templates-data-common/data-common.helper.d.ts +2 -61
- package/lib/components/z-templates-data-common/data-common.helper.js +3 -351
- package/lib/components/z-templates-data-common/data-common.js +85 -66
- package/lib/components/z-templates-data-common/index.d.ts +3 -3
- package/lib/components/z-templates-data-common/index.js +1 -2
- package/lib/components/z-tpl/index.d.ts +3 -3
- package/lib/components/z-tpl/index.js +1 -2
- package/lib/components/z-tpl/tpl.d.ts +23 -23
- package/lib/components/z-tpl/tpl.js +7 -8
- package/lib/components/z-warehouse/index.d.ts +2 -2
- package/lib/components/z-warehouse/index.js +1 -2
- package/lib/components/z-warehouse/zWarehouse.d.ts +2 -3
- package/lib/components/z-warehouse/zWarehouse.js +3 -4
- package/lib/components/z-watermark/index.d.ts +3 -0
- package/lib/components/z-watermark/index.js +7 -0
- package/lib/components/z-watermark/zWatermark.d.ts +3 -0
- package/lib/components/z-watermark/zWatermark.js +8 -0
- package/lib/index.d.ts +44 -38
- package/lib/index.js +8 -2
- package/lib/index.scss +1 -1
- package/lib/style.js +1 -3
- package/lib/utils/hoc.d.ts +6 -6
- package/lib/utils/hoc.js +3 -3
- package/lib/utils/index.d.ts +13 -13
- package/lib/utils/index.js +7 -4
- package/lib/utils/props/button.d.ts +13 -13
- package/lib/utils/props/button.js +2 -3
- package/lib/utils/props/common.d.ts +7 -1
- package/lib/utils/props/common.js +19 -3
- package/lib/utils/props/editTable.d.ts +3 -3
- package/lib/utils/props/editTable.js +23 -17
- package/lib/utils/props/form.d.ts +36 -0
- package/lib/utils/props/form.js +35 -17
- package/lib/utils/props/listTpl.d.ts +29 -29
- package/lib/utils/props/listTpl.js +2 -3
- package/lib/utils/props/microModal.d.ts +7 -7
- package/lib/utils/props/microModal.js +1 -3
- package/lib/utils/props/microSwitch.d.ts +1 -1
- package/lib/utils/props/microSwitch.js +5 -4
- package/lib/utils/props/modalSelect.d.ts +6 -6
- package/lib/utils/props/modalSelect.js +2 -4
- package/lib/utils/props/operationRecords.d.ts +2 -2
- package/lib/utils/props/operationRecords.js +6 -7
- package/lib/utils/props/preview.d.ts +2 -2
- package/lib/utils/props/preview.js +6 -7
- package/lib/utils/props/tpl.d.ts +173 -162
- package/lib/utils/props/tpl.js +3 -5
- package/lib/utils/props/warehouseAndFactory.d.ts +1 -1
- package/lib/utils/props/warehouseAndFactory.js +2 -3
- package/lib/utils/rcProRequest.d.ts +3 -3
- package/lib/utils/rcProRequest.js +3 -4
- package/lib/variables.scss +3 -3
- package/package.json +5 -5
- package/es/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
- package/es/components/z-templates-data-common/components/custom-renderer/index.js +0 -172
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -1
- package/es/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
- package/es/components/z-templates-data-common/components/dim-target/index.js +0 -430
- package/es/components/z-templates-data-common/components/dim-target/index.less +0 -49
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -26
- package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
- package/es/components/z-templates-data-common/components/link-renderer/index.js +0 -320
- package/es/components/z-templates-data-common/components/link-renderer/index.less +0 -33
- package/es/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
- package/es/components/z-templates-data-common/components/table-renderer/index.js +0 -481
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -220
- package/lib/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
- package/lib/components/z-templates-data-common/components/custom-renderer/index.js +0 -178
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -3
- package/lib/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
- package/lib/components/z-templates-data-common/components/dim-target/index.js +0 -438
- package/lib/components/z-templates-data-common/components/dim-target/index.less +0 -49
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -30
- package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
- package/lib/components/z-templates-data-common/components/link-renderer/index.js +0 -326
- package/lib/components/z-templates-data-common/components/link-renderer/index.less +0 -33
- package/lib/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
- package/lib/components/z-templates-data-common/components/table-renderer/index.js +0 -487
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -229
package/lib/utils/props/tpl.d.ts
CHANGED
|
@@ -1,162 +1,173 @@
|
|
|
1
|
-
import { RcPageItem, RcPageProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
3
|
-
billFormRef?: any;
|
|
4
|
-
billFormCurrentRef?: any;
|
|
5
|
-
}) => {
|
|
6
|
-
previewTabs: {
|
|
7
|
-
antdRadioGroupProps?: any;
|
|
8
|
-
antdPageHeaderProps?: any;
|
|
9
|
-
on: true;
|
|
10
|
-
title?: any;
|
|
11
|
-
};
|
|
12
|
-
preview?: any;
|
|
13
|
-
form?: {
|
|
14
|
-
props: any;
|
|
15
|
-
antdPageHeaderProps?: any;
|
|
16
|
-
layoutProps?: any;
|
|
17
|
-
requestConfig: {
|
|
18
|
-
preview?: any;
|
|
19
|
-
edit?: any;
|
|
20
|
-
add?: any;
|
|
21
|
-
};
|
|
22
|
-
key?: string;
|
|
23
|
-
width?: string | number;
|
|
24
|
-
name?: any;
|
|
25
|
-
layoutType?: "page" | "drawer" | "modal";
|
|
26
|
-
onCustomBack?: () => void;
|
|
27
|
-
onBackSuccess?: (data?: any) => void;
|
|
28
|
-
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
29
|
-
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
30
|
-
submitterRender?: (opt: {
|
|
31
|
-
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/
|
|
32
|
-
}, dom: JSX.Element[]) => any;
|
|
33
|
-
saveAndContinue?: boolean;
|
|
34
|
-
};
|
|
35
|
-
} | {
|
|
36
|
-
previewTabs?: undefined;
|
|
37
|
-
preview?: any;
|
|
38
|
-
form?: {
|
|
39
|
-
props: any;
|
|
40
|
-
antdPageHeaderProps?: any;
|
|
41
|
-
layoutProps?: any;
|
|
42
|
-
requestConfig: {
|
|
43
|
-
preview?: any;
|
|
44
|
-
edit?: any;
|
|
45
|
-
add?: any;
|
|
46
|
-
};
|
|
47
|
-
key?: string;
|
|
48
|
-
width?: string | number;
|
|
49
|
-
name?: any;
|
|
50
|
-
layoutType?: "page" | "drawer" | "modal";
|
|
51
|
-
onCustomBack?: () => void;
|
|
52
|
-
onBackSuccess?: (data?: any) => void;
|
|
53
|
-
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
54
|
-
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
55
|
-
submitterRender?: (opt: {
|
|
56
|
-
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/
|
|
57
|
-
}, dom: JSX.Element[]) => any;
|
|
58
|
-
saveAndContinue?: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
62
|
-
listRef?: any;
|
|
63
|
-
tableRef?: any;
|
|
64
|
-
listFormRef?: any;
|
|
65
|
-
billFormRef?: any;
|
|
66
|
-
listFormCurrentRef?: any;
|
|
67
|
-
billFormCurrentRef?: any;
|
|
68
|
-
}) => {
|
|
69
|
-
page: {
|
|
70
|
-
bill?: {
|
|
71
|
-
previewTabs: {
|
|
72
|
-
antdRadioGroupProps?: any;
|
|
73
|
-
antdPageHeaderProps?: any;
|
|
74
|
-
on: true;
|
|
75
|
-
title?: any;
|
|
76
|
-
};
|
|
77
|
-
preview?: any;
|
|
78
|
-
form?: {
|
|
79
|
-
props: any;
|
|
80
|
-
antdPageHeaderProps?: any;
|
|
81
|
-
layoutProps?: any;
|
|
82
|
-
requestConfig: {
|
|
83
|
-
preview?: any;
|
|
84
|
-
edit?: any;
|
|
85
|
-
add?: any;
|
|
86
|
-
};
|
|
87
|
-
key?: string;
|
|
88
|
-
width?: string | number;
|
|
89
|
-
name?: any;
|
|
90
|
-
layoutType?: "page" | "drawer" | "modal";
|
|
91
|
-
onCustomBack?: () => void;
|
|
92
|
-
onBackSuccess?: (data?: any) => void;
|
|
93
|
-
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
94
|
-
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
95
|
-
submitterRender?: (opt: {
|
|
96
|
-
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/
|
|
97
|
-
}, dom: JSX.Element[]) => any;
|
|
98
|
-
saveAndContinue?: boolean;
|
|
99
|
-
};
|
|
100
|
-
} | {
|
|
101
|
-
previewTabs?: undefined;
|
|
102
|
-
preview?: any;
|
|
103
|
-
form?: {
|
|
104
|
-
props: any;
|
|
105
|
-
antdPageHeaderProps?: any;
|
|
106
|
-
layoutProps?: any;
|
|
107
|
-
requestConfig: {
|
|
108
|
-
preview?: any;
|
|
109
|
-
edit?: any;
|
|
110
|
-
add?: any;
|
|
111
|
-
};
|
|
112
|
-
key?: string;
|
|
113
|
-
width?: string | number;
|
|
114
|
-
name?: any;
|
|
115
|
-
layoutType?: "page" | "drawer" | "modal";
|
|
116
|
-
onCustomBack?: () => void;
|
|
117
|
-
onBackSuccess?: (data?: any) => void;
|
|
118
|
-
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
119
|
-
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
120
|
-
submitterRender?: (opt: {
|
|
121
|
-
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/
|
|
122
|
-
}, dom: JSX.Element[]) => any;
|
|
123
|
-
saveAndContinue?: boolean;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
list: {
|
|
127
|
-
requestConfig: any;
|
|
128
|
-
type?: "list";
|
|
129
|
-
listRef: any;
|
|
130
|
-
onListBtnChange?: (type: "add" | "copy" | "
|
|
131
|
-
renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "
|
|
132
|
-
render?: (onChange?: (type: "add" | "copy" | "
|
|
133
|
-
key?: string;
|
|
134
|
-
name?: any;
|
|
135
|
-
form: any;
|
|
136
|
-
actions: {
|
|
137
|
-
items: any[];
|
|
138
|
-
type?: string;
|
|
139
|
-
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
140
|
-
size?: import("antd/lib/button").ButtonSize;
|
|
141
|
-
onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
|
|
142
|
-
onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
|
|
143
|
-
};
|
|
144
|
-
grid: {
|
|
145
|
-
config: any;
|
|
146
|
-
ref: any;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
key?: string;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
1
|
+
import { RcPageItem, RcPageProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
3
|
+
billFormRef?: any;
|
|
4
|
+
billFormCurrentRef?: any;
|
|
5
|
+
}) => {
|
|
6
|
+
previewTabs: {
|
|
7
|
+
antdRadioGroupProps?: any;
|
|
8
|
+
antdPageHeaderProps?: any;
|
|
9
|
+
on: true;
|
|
10
|
+
title?: any;
|
|
11
|
+
};
|
|
12
|
+
preview?: any;
|
|
13
|
+
form?: {
|
|
14
|
+
props: any;
|
|
15
|
+
antdPageHeaderProps?: any;
|
|
16
|
+
layoutProps?: any;
|
|
17
|
+
requestConfig: {
|
|
18
|
+
preview?: any;
|
|
19
|
+
edit?: any;
|
|
20
|
+
add?: any;
|
|
21
|
+
};
|
|
22
|
+
key?: string;
|
|
23
|
+
width?: string | number;
|
|
24
|
+
name?: any;
|
|
25
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
26
|
+
onCustomBack?: () => void;
|
|
27
|
+
onBackSuccess?: (data?: any) => void;
|
|
28
|
+
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
29
|
+
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
30
|
+
submitterRender?: (opt: {
|
|
31
|
+
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/lib/templates/basicTpl").SubmitOptions) => Promise<any>;
|
|
32
|
+
}, dom: JSX.Element[]) => any;
|
|
33
|
+
saveAndContinue?: boolean;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
previewTabs?: undefined;
|
|
37
|
+
preview?: any;
|
|
38
|
+
form?: {
|
|
39
|
+
props: any;
|
|
40
|
+
antdPageHeaderProps?: any;
|
|
41
|
+
layoutProps?: any;
|
|
42
|
+
requestConfig: {
|
|
43
|
+
preview?: any;
|
|
44
|
+
edit?: any;
|
|
45
|
+
add?: any;
|
|
46
|
+
};
|
|
47
|
+
key?: string;
|
|
48
|
+
width?: string | number;
|
|
49
|
+
name?: any;
|
|
50
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
51
|
+
onCustomBack?: () => void;
|
|
52
|
+
onBackSuccess?: (data?: any) => void;
|
|
53
|
+
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
54
|
+
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
55
|
+
submitterRender?: (opt: {
|
|
56
|
+
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/lib/templates/basicTpl").SubmitOptions) => Promise<any>;
|
|
57
|
+
}, dom: JSX.Element[]) => any;
|
|
58
|
+
saveAndContinue?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
62
|
+
listRef?: any;
|
|
63
|
+
tableRef?: any;
|
|
64
|
+
listFormRef?: any;
|
|
65
|
+
billFormRef?: any;
|
|
66
|
+
listFormCurrentRef?: any;
|
|
67
|
+
billFormCurrentRef?: any;
|
|
68
|
+
}) => {
|
|
69
|
+
page: {
|
|
70
|
+
bill?: {
|
|
71
|
+
previewTabs: {
|
|
72
|
+
antdRadioGroupProps?: any;
|
|
73
|
+
antdPageHeaderProps?: any;
|
|
74
|
+
on: true;
|
|
75
|
+
title?: any;
|
|
76
|
+
};
|
|
77
|
+
preview?: any;
|
|
78
|
+
form?: {
|
|
79
|
+
props: any;
|
|
80
|
+
antdPageHeaderProps?: any;
|
|
81
|
+
layoutProps?: any;
|
|
82
|
+
requestConfig: {
|
|
83
|
+
preview?: any;
|
|
84
|
+
edit?: any;
|
|
85
|
+
add?: any;
|
|
86
|
+
};
|
|
87
|
+
key?: string;
|
|
88
|
+
width?: string | number;
|
|
89
|
+
name?: any;
|
|
90
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
91
|
+
onCustomBack?: () => void;
|
|
92
|
+
onBackSuccess?: (data?: any) => void;
|
|
93
|
+
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
94
|
+
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
95
|
+
submitterRender?: (opt: {
|
|
96
|
+
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/lib/templates/basicTpl").SubmitOptions) => Promise<any>;
|
|
97
|
+
}, dom: JSX.Element[]) => any;
|
|
98
|
+
saveAndContinue?: boolean;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
previewTabs?: undefined;
|
|
102
|
+
preview?: any;
|
|
103
|
+
form?: {
|
|
104
|
+
props: any;
|
|
105
|
+
antdPageHeaderProps?: any;
|
|
106
|
+
layoutProps?: any;
|
|
107
|
+
requestConfig: {
|
|
108
|
+
preview?: any;
|
|
109
|
+
edit?: any;
|
|
110
|
+
add?: any;
|
|
111
|
+
};
|
|
112
|
+
key?: string;
|
|
113
|
+
width?: string | number;
|
|
114
|
+
name?: any;
|
|
115
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
116
|
+
onCustomBack?: () => void;
|
|
117
|
+
onBackSuccess?: (data?: any) => void;
|
|
118
|
+
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
119
|
+
submitSecondConfirm?: boolean | import("antd").ModalFuncProps;
|
|
120
|
+
submitterRender?: (opt: {
|
|
121
|
+
onFinish?: (values: any, options?: import("@ztocwst/rc-pro/lib/templates/basicTpl").SubmitOptions) => Promise<any>;
|
|
122
|
+
}, dom: JSX.Element[]) => any;
|
|
123
|
+
saveAndContinue?: boolean;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
list: {
|
|
127
|
+
requestConfig: any;
|
|
128
|
+
type?: "list";
|
|
129
|
+
listRef: any;
|
|
130
|
+
onListBtnChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>;
|
|
131
|
+
renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => JSX.Element;
|
|
132
|
+
render?: (onChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => React.ReactNode;
|
|
133
|
+
key?: string;
|
|
134
|
+
name?: any;
|
|
135
|
+
form: any;
|
|
136
|
+
actions: {
|
|
137
|
+
items: any[];
|
|
138
|
+
type?: string;
|
|
139
|
+
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
140
|
+
size?: import("antd/lib/button").ButtonSize;
|
|
141
|
+
onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
|
|
142
|
+
onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
|
|
143
|
+
};
|
|
144
|
+
grid: {
|
|
145
|
+
config: any;
|
|
146
|
+
ref: any;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
key?: string;
|
|
151
|
+
className?: string;
|
|
152
|
+
style?: React.CSSProperties;
|
|
153
|
+
tab?: React.ReactNode;
|
|
154
|
+
onBillSuccess?: (res: any) => void;
|
|
155
|
+
onBillError?: (res: any) => void;
|
|
156
|
+
onPageSuccess?: () => void;
|
|
157
|
+
pageRef?: React.MutableRefObject<import("@ztocwst/rc-pro").RcPageRefInstance>;
|
|
158
|
+
singleWarehouse?: boolean | ({
|
|
159
|
+
requestConfig: Omit<import("@ztocwst/rc-pro/lib/utils").RequestCommonProps, "transform" | "formCheck">;
|
|
160
|
+
} & import("antd").SelectProps<any, import("rc-select/lib/Select").DefaultOptionType>);
|
|
161
|
+
singleFactory?: boolean | ({
|
|
162
|
+
requestConfig: Omit<import("@ztocwst/rc-pro/lib/utils").RequestCommonProps, "transform" | "formCheck">;
|
|
163
|
+
} & import("antd").SelectProps<any, import("rc-select/lib/Select").DefaultOptionType>);
|
|
164
|
+
extra?: {
|
|
165
|
+
content: any;
|
|
166
|
+
style?: React.CSSProperties;
|
|
167
|
+
};
|
|
168
|
+
queryCriteria?: boolean | (Omit<import("@ztocwst/rc-pro").QueryCriteriaProps, "getValues" | "setValues" | "getColumns"> & {
|
|
169
|
+
getColumns?: (columns: import("@ztocwst/rc-pro").ProFormRenderColumnsType<any, "trim" | "custom" | "text" | "autoComplete" | "cardList" | "upload" | "linkage" | "asyncSelect" | "inputTextArea" | "modalSelect" | "treeSelectArea" | "inputGroup" | "scanInput" | "timeRangePicker" | "quickTimerRange" | "rangerPickerLimit" | "linkageGroup">[], ref: React.MutableRefObject<import("@ztocwst/rc-pro").ProFormRenderInstance>) => Promise<import("@ztocwst/rc-pro").ProFormRenderColumnsType<any, "trim" | "custom" | "text" | "autoComplete" | "cardList" | "upload" | "linkage" | "asyncSelect" | "inputTextArea" | "modalSelect" | "treeSelectArea" | "inputGroup" | "scanInput" | "timeRangePicker" | "quickTimerRange" | "rangerPickerLimit" | "linkageGroup">[]>;
|
|
170
|
+
getValues?: (values: any, form: React.RefObject<import("@ant-design/pro-form/lib/BaseForm/BaseForm").ProFormInstance<any>>) => Promise<any>;
|
|
171
|
+
setValues?: (values: any, form: React.RefObject<import("@ant-design/pro-form/lib/BaseForm/BaseForm").ProFormInstance<any>>, currentRef: React.MutableRefObject<import("@ztocwst/rc-pro").ProFormRenderInstance>, resetFields: any) => void;
|
|
172
|
+
});
|
|
173
|
+
};
|
package/lib/utils/props/tpl.js
CHANGED
|
@@ -65,7 +65,7 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
|
65
65
|
}
|
|
66
66
|
return processObjectValue(props);
|
|
67
67
|
};
|
|
68
|
-
var processTplBillProps = function processTplBillProps(props, extra) {
|
|
68
|
+
var processTplBillProps = exports.processTplBillProps = function processTplBillProps(props, extra) {
|
|
69
69
|
var form = props.form,
|
|
70
70
|
preview = props.preview,
|
|
71
71
|
previewTabs = props.previewTabs;
|
|
@@ -99,8 +99,7 @@ var processTplBillProps = function processTplBillProps(props, extra) {
|
|
|
99
99
|
preview: processTplBillPreviewProps(preview)
|
|
100
100
|
} : {}, previewTabs ? processTplBillPreviewTabsProps(previewTabs) : {});
|
|
101
101
|
};
|
|
102
|
-
exports.
|
|
103
|
-
var processTplProps = function processTplProps(props, extra) {
|
|
102
|
+
var processTplProps = exports.processTplProps = function processTplProps(props, extra) {
|
|
104
103
|
var _page$list;
|
|
105
104
|
var _ref2 = props !== null && props !== void 0 ? props : {},
|
|
106
105
|
page = _ref2.page,
|
|
@@ -126,5 +125,4 @@ var processTplProps = function processTplProps(props, extra) {
|
|
|
126
125
|
})
|
|
127
126
|
} : {})
|
|
128
127
|
});
|
|
129
|
-
};
|
|
130
|
-
exports.processTplProps = processTplProps;
|
|
128
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const processWarehouseAndFactoryProps: (_props: any) => any;
|
|
1
|
+
export declare const processWarehouseAndFactoryProps: (_props: any) => any;
|
|
@@ -6,7 +6,7 @@ exports.processWarehouseAndFactoryProps = void 0;
|
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
8
|
var _excluded = ["onChange", "props"];
|
|
9
|
-
var processWarehouseAndFactoryProps = function processWarehouseAndFactoryProps(_props) {
|
|
9
|
+
var processWarehouseAndFactoryProps = exports.processWarehouseAndFactoryProps = function processWarehouseAndFactoryProps(_props) {
|
|
10
10
|
var onChange = _props.onChange,
|
|
11
11
|
props = _props.props,
|
|
12
12
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(_props, _excluded);
|
|
@@ -15,5 +15,4 @@ var processWarehouseAndFactoryProps = function processWarehouseAndFactoryProps(_
|
|
|
15
15
|
} : {}, onChange ? {
|
|
16
16
|
onChange: onChange
|
|
17
17
|
} : {});
|
|
18
|
-
};
|
|
19
|
-
exports.processWarehouseAndFactoryProps = processWarehouseAndFactoryProps;
|
|
18
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RcConfigConsumerProps } from '@ztocwst/rc-pro';
|
|
2
|
-
declare const _default: (rcProContext: RcConfigConsumerProps, url: string, requestParams: any) => Promise<any>;
|
|
3
|
-
export default _default;
|
|
1
|
+
import { RcConfigConsumerProps } from '@ztocwst/rc-pro';
|
|
2
|
+
declare const _default: (rcProContext: RcConfigConsumerProps, url: string, requestParams: any) => Promise<any>;
|
|
3
|
+
export default _default;
|
|
@@ -6,8 +6,8 @@ exports["default"] = void 0;
|
|
|
6
6
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
8
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
-
var _default = /*#__PURE__*/function () {
|
|
10
|
-
var _ref = (0, _asyncToGenerator2["default"])(
|
|
9
|
+
var _default = exports["default"] = /*#__PURE__*/function () {
|
|
10
|
+
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(rcProContext, url, requestParams) {
|
|
11
11
|
var _ref2, materialsRequest, headers;
|
|
12
12
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
13
13
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -32,5 +32,4 @@ var _default = /*#__PURE__*/function () {
|
|
|
32
32
|
return function (_x, _x2, _x3) {
|
|
33
33
|
return _ref.apply(this, arguments);
|
|
34
34
|
};
|
|
35
|
-
}();
|
|
36
|
-
exports["default"] = _default;
|
|
35
|
+
}();
|
package/lib/variables.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// @import '~@alifd/next/variables.scss';
|
|
2
|
-
|
|
3
|
-
// $biz-css-prefix: '.bizpack';
|
|
1
|
+
// @import '~@alifd/next/variables.scss';
|
|
2
|
+
|
|
3
|
+
// $biz-css-prefix: '.bizpack';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztocwst/rc-pro-materials",
|
|
3
|
-
"version": "0.2.1",
|
|
3
|
+
"version": "0.2.34.1",
|
|
4
4
|
"description": "@ztocwst/rc-pro-materials",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@alib/build-scripts": "^0.1.3",
|
|
54
54
|
"@alifd/build-plugin-lowcode": "^0.3.0",
|
|
55
55
|
"@alifd/theme-2": "^0.4.0",
|
|
56
|
-
"@ant-design/pro-provider": "
|
|
56
|
+
"@ant-design/pro-provider": "1.9.3",
|
|
57
57
|
"@types/isomorphic-fetch": "^0.0.36",
|
|
58
58
|
"@types/react": "^16.14.24",
|
|
59
59
|
"@types/react-dom": "^16.9.4",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@alifd/next": "^1.25.27",
|
|
72
72
|
"@alilc/build-plugin-alt": "^1.3.3",
|
|
73
73
|
"@types/antd": "^1.0.0",
|
|
74
|
-
"@ztocwst/rc-pro": "0.4.
|
|
74
|
+
"@ztocwst/rc-pro": "^0.4.95",
|
|
75
75
|
"antd": "4.22.3",
|
|
76
76
|
"moment": "latest",
|
|
77
77
|
"prop-types": "^15.5.8",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
},
|
|
87
87
|
"componentConfig": {
|
|
88
88
|
"isComponentLibrary": true,
|
|
89
|
-
"materialSchema": "https://npm.
|
|
89
|
+
"materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.34.1/build/lowcode/assets-prod.json"
|
|
90
90
|
},
|
|
91
|
-
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.1/build/index.html",
|
|
91
|
+
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.34.1/build/index.html",
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"registry": "https://registry.npmjs.org/",
|
|
94
94
|
"access": "public"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { TypeChartSettingProps } from '../../data-common';
|
|
3
|
-
import type { linkParamsType } from '../link-renderer';
|
|
4
|
-
declare const CustomRenderer: (props: TypeChartSettingProps & {
|
|
5
|
-
activeKey: string;
|
|
6
|
-
custom: boolean;
|
|
7
|
-
child: (p: any) => React.ReactNode;
|
|
8
|
-
chartRef?: import("react").Ref<{
|
|
9
|
-
onLink: (v: linkParamsType) => void;
|
|
10
|
-
queryChart: (v: Record<string, any>, d: string | undefined) => void;
|
|
11
|
-
}>;
|
|
12
|
-
}) => import("react").JSX.Element;
|
|
13
|
-
export default CustomRenderer;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import _Spin from "antd/es/spin";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
-
import { useState, useEffect, useRef, useContext, useImperativeHandle } from 'react';
|
|
9
|
-
import { RcConfigContext } from '@ztocwst/rc-pro';
|
|
10
|
-
import { separator, timeUnit, handleQueryParams, getReportData } from "../../data-common.helper";
|
|
11
|
-
import LinkRenderer from "../link-renderer";
|
|
12
|
-
var CustomRenderer = function CustomRenderer(props) {
|
|
13
|
-
var _props$child;
|
|
14
|
-
var _ref = props || {},
|
|
15
|
-
activeKey = _ref.activeKey,
|
|
16
|
-
autoLoad = _ref.autoLoad,
|
|
17
|
-
refreshRate = _ref.refreshRate,
|
|
18
|
-
dataSetName = _ref.dataSetName,
|
|
19
|
-
dimJson = _ref.dimJson,
|
|
20
|
-
indexJson = _ref.indexJson,
|
|
21
|
-
linkPage = _ref.linkPage,
|
|
22
|
-
linkPageTitle = _ref.linkPageTitle,
|
|
23
|
-
onConfirm = _ref.onConfirm,
|
|
24
|
-
formatter = _ref.formatter;
|
|
25
|
-
var rcProContext = useContext(RcConfigContext);
|
|
26
|
-
var _useState = useState(),
|
|
27
|
-
result = _useState[0],
|
|
28
|
-
setResult = _useState[1];
|
|
29
|
-
var _useState2 = useState(false),
|
|
30
|
-
loading = _useState2[0],
|
|
31
|
-
setLoading = _useState2[1];
|
|
32
|
-
var _useState3 = useState(false),
|
|
33
|
-
isLink = _useState3[0],
|
|
34
|
-
setIsLink = _useState3[1];
|
|
35
|
-
var linkChartRef = useRef();
|
|
36
|
-
var timer = null;
|
|
37
|
-
var onLink = function onLink(values) {
|
|
38
|
-
var _linkChartRef$current, _linkChartRef$current2;
|
|
39
|
-
setIsLink(true);
|
|
40
|
-
(_linkChartRef$current = linkChartRef.current) === null || _linkChartRef$current === void 0 ? void 0 : (_linkChartRef$current2 = _linkChartRef$current.initial) === null || _linkChartRef$current2 === void 0 ? void 0 : _linkChartRef$current2.call(_linkChartRef$current, _extends({}, values));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// 获取数据源
|
|
44
|
-
var getDataSource = /*#__PURE__*/function () {
|
|
45
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {
|
|
46
|
-
var _indexJson$data, target, _iterator, _step, item, queryParams, data, res;
|
|
47
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
48
|
-
while (1) switch (_context.prev = _context.next) {
|
|
49
|
-
case 0:
|
|
50
|
-
if (query === void 0) {
|
|
51
|
-
query = {};
|
|
52
|
-
}
|
|
53
|
-
_context.prev = 1;
|
|
54
|
-
target = [];
|
|
55
|
-
if (indexJson !== null && indexJson !== void 0 && (_indexJson$data = indexJson.data) !== null && _indexJson$data !== void 0 && _indexJson$data.length) {
|
|
56
|
-
for (_iterator = _createForOfIteratorHelperLoose(indexJson.data); !(_step = _iterator()).done;) {
|
|
57
|
-
item = _step.value;
|
|
58
|
-
target.push({
|
|
59
|
-
description: item.name
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
queryParams = handleQueryParams(query);
|
|
64
|
-
data = {
|
|
65
|
-
target: target,
|
|
66
|
-
queryParams: queryParams,
|
|
67
|
-
dataSetName: dataSetName
|
|
68
|
-
};
|
|
69
|
-
setLoading(true);
|
|
70
|
-
_context.next = 9;
|
|
71
|
-
return getReportData(rcProContext, formatter ? formatter === null || formatter === void 0 ? void 0 : formatter(data) : data);
|
|
72
|
-
case 9:
|
|
73
|
-
res = _context.sent;
|
|
74
|
-
setLoading(false);
|
|
75
|
-
if (res !== null && res !== void 0 && res.success) {
|
|
76
|
-
setResult(res === null || res === void 0 ? void 0 : res.result);
|
|
77
|
-
}
|
|
78
|
-
_context.next = 19;
|
|
79
|
-
break;
|
|
80
|
-
case 14:
|
|
81
|
-
_context.prev = 14;
|
|
82
|
-
_context.t0 = _context["catch"](1);
|
|
83
|
-
setLoading(false);
|
|
84
|
-
setResult(null);
|
|
85
|
-
console.error(_context.t0);
|
|
86
|
-
case 19:
|
|
87
|
-
case "end":
|
|
88
|
-
return _context.stop();
|
|
89
|
-
}
|
|
90
|
-
}, _callee, null, [[1, 14]]);
|
|
91
|
-
}));
|
|
92
|
-
return function getDataSource(_x) {
|
|
93
|
-
return _ref2.apply(this, arguments);
|
|
94
|
-
};
|
|
95
|
-
}();
|
|
96
|
-
var queryChart = /*#__PURE__*/function () {
|
|
97
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value) {
|
|
98
|
-
var queryParams, _linkChartRef$current3;
|
|
99
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
100
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
101
|
-
case 0:
|
|
102
|
-
queryParams = value[dataSetName] || value;
|
|
103
|
-
if (isLink) {
|
|
104
|
-
(_linkChartRef$current3 = linkChartRef.current) === null || _linkChartRef$current3 === void 0 ? void 0 : _linkChartRef$current3.queryChart(queryParams);
|
|
105
|
-
} else {
|
|
106
|
-
getDataSource(queryParams);
|
|
107
|
-
}
|
|
108
|
-
case 2:
|
|
109
|
-
case "end":
|
|
110
|
-
return _context2.stop();
|
|
111
|
-
}
|
|
112
|
-
}, _callee2);
|
|
113
|
-
}));
|
|
114
|
-
return function queryChart(_x2) {
|
|
115
|
-
return _ref3.apply(this, arguments);
|
|
116
|
-
};
|
|
117
|
-
}();
|
|
118
|
-
var handleClearInterval = function handleClearInterval() {
|
|
119
|
-
if (timer) {
|
|
120
|
-
clearInterval(timer);
|
|
121
|
-
timer = null;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
useEffect(function () {
|
|
125
|
-
var _ref4 = (activeKey === null || activeKey === void 0 ? void 0 : activeKey.split(separator)) || [],
|
|
126
|
-
currentKey = _ref4[0];
|
|
127
|
-
if (currentKey === dataSetName) {
|
|
128
|
-
if (autoLoad) {
|
|
129
|
-
if (refreshRate) {
|
|
130
|
-
handleClearInterval();
|
|
131
|
-
timer = window.setInterval(function () {
|
|
132
|
-
return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
133
|
-
}, refreshRate * timeUnit);
|
|
134
|
-
} else {
|
|
135
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
handleClearInterval();
|
|
140
|
-
}
|
|
141
|
-
return function () {
|
|
142
|
-
handleClearInterval();
|
|
143
|
-
};
|
|
144
|
-
}, [activeKey, autoLoad]);
|
|
145
|
-
useImperativeHandle(props.chartRef, function () {
|
|
146
|
-
return {
|
|
147
|
-
onLink: onLink,
|
|
148
|
-
queryChart: queryChart
|
|
149
|
-
};
|
|
150
|
-
});
|
|
151
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
style: {
|
|
153
|
-
display: !isLink ? 'block' : 'none'
|
|
154
|
-
}
|
|
155
|
-
}, /*#__PURE__*/React.createElement(_Spin, {
|
|
156
|
-
spinning: loading
|
|
157
|
-
}, (_props$child = props.child) === null || _props$child === void 0 ? void 0 : _props$child.call(props, result))), /*#__PURE__*/React.createElement("div", {
|
|
158
|
-
style: {
|
|
159
|
-
display: isLink ? 'block' : 'none'
|
|
160
|
-
}
|
|
161
|
-
}, /*#__PURE__*/React.createElement(LinkRenderer, {
|
|
162
|
-
chartRef: linkChartRef,
|
|
163
|
-
dimJson: dimJson,
|
|
164
|
-
linkPage: linkPage,
|
|
165
|
-
linkPageTitle: linkPageTitle,
|
|
166
|
-
onConfirm: onConfirm,
|
|
167
|
-
onBack: function onBack() {
|
|
168
|
-
setIsLink(false);
|
|
169
|
-
}
|
|
170
|
-
})));
|
|
171
|
-
};
|
|
172
|
-
export default CustomRenderer;
|