@ztocwst/rc-pro-materials 0.2.2 → 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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ProButtonItemsProps, ProButtonProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processButtonProps: (props: ProButtonProps & {
|
|
3
|
-
linkButton?: boolean;
|
|
4
|
-
}, extra?: {
|
|
5
|
-
tableRef?: any;
|
|
6
|
-
}) => {
|
|
7
|
-
items: any[];
|
|
8
|
-
type?: string;
|
|
9
|
-
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
10
|
-
size?: import("antd/lib/button").ButtonSize;
|
|
11
|
-
onClick?: (item: ProButtonItemsProps) => void | Promise<any>;
|
|
12
|
-
onSuccess?: (item: ProButtonItemsProps, data?: any) => void;
|
|
13
|
-
};
|
|
1
|
+
import { ProButtonItemsProps, ProButtonProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processButtonProps: (props: ProButtonProps & {
|
|
3
|
+
linkButton?: boolean;
|
|
4
|
+
}, extra?: {
|
|
5
|
+
tableRef?: any;
|
|
6
|
+
}) => {
|
|
7
|
+
items: any[];
|
|
8
|
+
type?: string;
|
|
9
|
+
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
10
|
+
size?: import("antd/lib/button").ButtonSize;
|
|
11
|
+
onClick?: (item: ProButtonItemsProps) => void | Promise<any>;
|
|
12
|
+
onSuccess?: (item: ProButtonItemsProps, data?: any) => void;
|
|
13
|
+
};
|
|
@@ -24,7 +24,7 @@ var processPrintProps = function processPrintProps(print) {
|
|
|
24
24
|
print: (0, _common.processRequestConfig)(printProps)
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
var processButtonProps = function processButtonProps(props, extra) {
|
|
27
|
+
var processButtonProps = exports.processButtonProps = function processButtonProps(props, extra) {
|
|
28
28
|
var _ref;
|
|
29
29
|
var items = props.items,
|
|
30
30
|
linkButton = props.linkButton,
|
|
@@ -116,5 +116,4 @@ var processButtonProps = function processButtonProps(props, extra) {
|
|
|
116
116
|
return !!e;
|
|
117
117
|
})
|
|
118
118
|
});
|
|
119
|
-
};
|
|
120
|
-
exports.processButtonProps = processButtonProps;
|
|
119
|
+
};
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.processRequestConfig = void 0;
|
|
5
|
+
exports.processRequestConfig = exports.processEmptyObject = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
8
9
|
var _excluded = ["singleWarehouse"];
|
|
9
|
-
var processRequestConfig = function processRequestConfig(props) {
|
|
10
|
+
var processRequestConfig = exports.processRequestConfig = function processRequestConfig(props) {
|
|
10
11
|
var _props$headers;
|
|
11
12
|
var singleWarehouse = props.singleWarehouse,
|
|
12
13
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
|
@@ -16,4 +17,19 @@ var processRequestConfig = function processRequestConfig(props) {
|
|
|
16
17
|
} : {})
|
|
17
18
|
} : {});
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 根据对象是否为空判断返回值
|
|
23
|
+
* @param obj
|
|
24
|
+
* @returns undefined | obj
|
|
25
|
+
*/
|
|
26
|
+
var processEmptyObject = exports.processEmptyObject = function processEmptyObject(obj) {
|
|
27
|
+
if (obj === void 0) {
|
|
28
|
+
obj = {};
|
|
29
|
+
}
|
|
30
|
+
// 判断对象是否为空
|
|
31
|
+
var empty = _lodash["default"] === null || _lodash["default"] === void 0 ? void 0 : _lodash["default"].isEmpty(_lodash["default"] === null || _lodash["default"] === void 0 ? void 0 : _lodash["default"].pickBy(obj, function (value) {
|
|
32
|
+
return value !== null && value !== undefined;
|
|
33
|
+
}));
|
|
34
|
+
return empty ? undefined : obj;
|
|
35
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const processEditTableProps: (props: any, extra?: {
|
|
2
|
-
proEditableFormRef?: any;
|
|
3
|
-
}) => any;
|
|
1
|
+
export declare const processEditTableProps: (props: any, extra?: {
|
|
2
|
+
proEditableFormRef?: any;
|
|
3
|
+
}) => any;
|
|
@@ -6,18 +6,17 @@ exports.processEditTableProps = 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 _lib = require("../../../lib");
|
|
9
|
-
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "
|
|
10
|
-
_excluded2 = ["
|
|
9
|
+
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "FormItemProps", "fieldProps", "columns", "editable", "render", "recordCreatorProps", "locale"],
|
|
10
|
+
_excluded2 = ["restFormProps"],
|
|
11
|
+
_excluded3 = ["restFieldProps"],
|
|
12
|
+
_excluded4 = ["editable"];
|
|
11
13
|
var processTableProps = function processTableProps(props) {
|
|
12
|
-
|
|
13
|
-
var processObjectValue = function processObjectValue(obj) {
|
|
14
|
+
var _processObjectValue = function processObjectValue(obj) {
|
|
14
15
|
var scroll = obj.scroll,
|
|
15
16
|
value = obj.value,
|
|
16
17
|
onChange = obj.onChange,
|
|
17
18
|
restEditableProps = obj.restEditableProps,
|
|
18
19
|
restRecordCreatorProps = obj.restRecordCreatorProps,
|
|
19
|
-
restFieldProps = obj.restFieldProps,
|
|
20
|
-
restFormProps = obj.restFormProps,
|
|
21
20
|
FormItemProps = obj.FormItemProps,
|
|
22
21
|
fieldProps = obj.fieldProps,
|
|
23
22
|
columns = obj.columns,
|
|
@@ -26,6 +25,12 @@ var processTableProps = function processTableProps(props) {
|
|
|
26
25
|
recordCreatorProps = obj.recordCreatorProps,
|
|
27
26
|
locale = obj.locale,
|
|
28
27
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
|
|
28
|
+
var _ref = FormItemProps !== null && FormItemProps !== void 0 ? FormItemProps : {},
|
|
29
|
+
restFormProps = _ref.restFormProps,
|
|
30
|
+
restFormItemProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded2);
|
|
31
|
+
var _ref2 = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
|
|
32
|
+
restFieldProps = _ref2.restFieldProps,
|
|
33
|
+
restFieldItemProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, _excluded3);
|
|
29
34
|
return (0, _extends2["default"])({}, locale ? {
|
|
30
35
|
locale: (0, _lib.processJsonOrFunctionProps)(locale)
|
|
31
36
|
} : {}, scroll ? {
|
|
@@ -41,31 +46,32 @@ var processTableProps = function processTableProps(props) {
|
|
|
41
46
|
} : {}, render ? {
|
|
42
47
|
render: render
|
|
43
48
|
} : {}, FormItemProps ? {
|
|
44
|
-
formItemProps: (0, _extends2["default"])({},
|
|
49
|
+
formItemProps: (0, _extends2["default"])({}, restFormItemProps, typeof restFormProps === 'function' ? restFormProps === null || restFormProps === void 0 ? void 0 : restFormProps() : restFormProps)
|
|
45
50
|
} : {}, fieldProps ? {
|
|
46
|
-
fieldProps: (0, _extends2["default"])({},
|
|
51
|
+
fieldProps: (0, _extends2["default"])({}, restFieldItemProps, typeof restFieldProps === 'function' ? restFieldProps === null || restFieldProps === void 0 ? void 0 : restFieldProps() : restFieldProps)
|
|
47
52
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
48
53
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
49
54
|
var columnsEditable = v.editable,
|
|
50
|
-
restColumns = (0, _objectWithoutPropertiesLoose2["default"])(v,
|
|
55
|
+
restColumns = (0, _objectWithoutPropertiesLoose2["default"])(v, _excluded4);
|
|
51
56
|
return (0, _extends2["default"])({}, editable ? {
|
|
52
57
|
editable: columnsEditable
|
|
53
|
-
} : {},
|
|
58
|
+
} : {}, _processObjectValue(restColumns));
|
|
54
59
|
})
|
|
55
60
|
} : [], rest);
|
|
56
61
|
};
|
|
57
62
|
if (Array.isArray(props)) {
|
|
58
63
|
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
59
|
-
return
|
|
64
|
+
return _processObjectValue(e);
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
|
-
|
|
67
|
+
var data = _processObjectValue(props);
|
|
68
|
+
console.log(data, 'editTable Props');
|
|
69
|
+
return data;
|
|
63
70
|
};
|
|
64
|
-
var processEditTableProps = function processEditTableProps(props, extra) {
|
|
65
|
-
var
|
|
66
|
-
proEditableFormRef =
|
|
71
|
+
var processEditTableProps = exports.processEditTableProps = function processEditTableProps(props, extra) {
|
|
72
|
+
var _ref3 = extra !== null && extra !== void 0 ? extra : {},
|
|
73
|
+
proEditableFormRef = _ref3.proEditableFormRef;
|
|
67
74
|
return (0, _extends2["default"])({}, processTableProps(props), {
|
|
68
75
|
proEditableFormRef: proEditableFormRef
|
|
69
76
|
});
|
|
70
|
-
};
|
|
71
|
-
exports.processEditTableProps = processEditTableProps;
|
|
77
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 处理表单默认值
|
|
3
|
+
*/
|
|
4
|
+
import { ProFormRenderProps } from '@ztocwst/rc-pro';
|
|
5
|
+
export declare const processFormProps: (props: Omit<import("@ant-design/pro-form/lib/components/SchemaForm").FormSchema<any, "trim" | "custom" | "text" | "autoComplete" | "cardList" | "upload" | "linkage" | "asyncSelect" | "inputTextArea" | "modalSelect" | "treeSelectArea" | "inputGroup" | "scanInput" | "timeRangePicker" | "quickTimerRange" | "rangerPickerLimit" | "linkageGroup">, "columns"> & {
|
|
6
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
7
|
+
defaultColsNumber?: number;
|
|
8
|
+
span?: number;
|
|
9
|
+
currentRef?: React.Ref<any>;
|
|
10
|
+
valueTypeMap?: Record<string, import("@ant-design/pro-provider").ProRenderFieldPropsType>;
|
|
11
|
+
number?: number;
|
|
12
|
+
settingOpt?: {
|
|
13
|
+
key: string;
|
|
14
|
+
isShowAdd?: boolean;
|
|
15
|
+
getAsyncColumns?: (key: string) => Promise<any[]>;
|
|
16
|
+
setAsyncColumns?: (key: string, data: any[]) => Promise<{
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
success: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
queryBtnChangePosition?: boolean;
|
|
22
|
+
submitterFooter?: boolean;
|
|
23
|
+
anchor?: {
|
|
24
|
+
on?: boolean;
|
|
25
|
+
direction?: "left" | "right";
|
|
26
|
+
getContainer?: () => Element | HTMLElement;
|
|
27
|
+
} & Omit<import("antd").AnchorProps, "getContainer">;
|
|
28
|
+
columns?: import("@ztocwst/rc-pro").ProFormRenderColumnsType<any, "text" | import("@ant-design/pro-form/lib/components/SchemaForm").FormFieldType>[] | ((values: any) => import("@ztocwst/rc-pro").ProFormRenderColumnsType<any, "text" | import("@ant-design/pro-form/lib/components/SchemaForm").FormFieldType>[]);
|
|
29
|
+
onLoadSuccess?: () => void;
|
|
30
|
+
onSettingSuccess?: () => void;
|
|
31
|
+
coerceRaster?: boolean;
|
|
32
|
+
} & {
|
|
33
|
+
labelColWidth?: number;
|
|
34
|
+
columns?: any[];
|
|
35
|
+
restProps?: any;
|
|
36
|
+
}) => any;
|
package/lib/utils/props/form.js
CHANGED
|
@@ -12,11 +12,11 @@ var _lib = require("../../../lib");
|
|
|
12
12
|
var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"],
|
|
13
13
|
_excluded2 = ["restFieldProps", "renderItemSlot"],
|
|
14
14
|
_excluded3 = ["restFormProps"],
|
|
15
|
-
_excluded4 = ["fieldProps"],
|
|
15
|
+
_excluded4 = ["fieldProps", "hideInDependency"],
|
|
16
16
|
_excluded5 = ["requestOptions"],
|
|
17
17
|
_excluded6 = ["columns", "switchGroup"];
|
|
18
|
-
/**
|
|
19
|
-
* 处理表单默认值
|
|
18
|
+
/**
|
|
19
|
+
* 处理表单默认值
|
|
20
20
|
*/
|
|
21
21
|
var requestOptionsCheck = function requestOptionsCheck(func, data) {
|
|
22
22
|
return typeof func === 'function' ? func(data) : true;
|
|
@@ -27,7 +27,7 @@ var hasName = function hasName(name) {
|
|
|
27
27
|
}
|
|
28
28
|
return !!name;
|
|
29
29
|
};
|
|
30
|
-
var
|
|
30
|
+
var _processInitialValue = function processInitialValue(e) {
|
|
31
31
|
var _restFieldArgs$style;
|
|
32
32
|
var fieldProps = e.fieldProps,
|
|
33
33
|
formItemProps = e.formItemProps,
|
|
@@ -64,12 +64,15 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
64
64
|
} catch (error) {
|
|
65
65
|
dependencyName = '';
|
|
66
66
|
}
|
|
67
|
-
var childRest =
|
|
68
|
-
var
|
|
67
|
+
var childRest = _processInitialValue(child);
|
|
68
|
+
var childFieldProps = childRest.fieldProps,
|
|
69
|
+
hideInDependency = childRest.hideInDependency,
|
|
69
70
|
childItemRest = (0, _objectWithoutPropertiesLoose2["default"])(childRest, _excluded4);
|
|
70
|
-
var requestOptions =
|
|
71
|
-
childRestFieldProps = (0, _objectWithoutPropertiesLoose2["default"])(
|
|
72
|
-
return (0, _extends2["default"])({},
|
|
71
|
+
var requestOptions = childFieldProps.requestOptions,
|
|
72
|
+
childRestFieldProps = (0, _objectWithoutPropertiesLoose2["default"])(childFieldProps, _excluded5);
|
|
73
|
+
return (0, _extends2["default"])({}, hideInDependency ? {
|
|
74
|
+
hideInForm: !hideInDependency(obj)
|
|
75
|
+
} : {}, childItemRest, {
|
|
73
76
|
fieldProps: (0, _extends2["default"])({}, childRestFieldProps, (childRest === null || childRest === void 0 ? void 0 : childRest.valueType) === 'asyncSelect' &&
|
|
74
77
|
// 接口请求前置校验, 通过请求 asyncSelect 接口
|
|
75
78
|
requestOptionsCheck(childRestFieldProps === null || childRestFieldProps === void 0 ? void 0 : childRestFieldProps.requestOptionsCheck, obj) ? {
|
|
@@ -118,7 +121,7 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
118
121
|
} : {}, typeof restFormProps === 'function' ? restFormProps === null || restFormProps === void 0 ? void 0 : restFormProps() : restFormProps)
|
|
119
122
|
});
|
|
120
123
|
};
|
|
121
|
-
var processFormProps = function processFormProps(props) {
|
|
124
|
+
var processFormProps = exports.processFormProps = function processFormProps(props) {
|
|
122
125
|
var _ref3;
|
|
123
126
|
var columns = props.columns,
|
|
124
127
|
submitter = props.submitter,
|
|
@@ -136,7 +139,7 @@ var processFormProps = function processFormProps(props) {
|
|
|
136
139
|
formRef = props.formRef,
|
|
137
140
|
currentRef = props.currentRef,
|
|
138
141
|
restProps = props.restProps;
|
|
139
|
-
|
|
142
|
+
var config = (0, _modalSelect.processModalSelectProps)((0, _extends2["default"])({
|
|
140
143
|
// columns只支持两级group嵌套
|
|
141
144
|
columns: (_ref3 = columns || []) === null || _ref3 === void 0 ? void 0 : _ref3.filter(function (e) {
|
|
142
145
|
return !!e;
|
|
@@ -152,11 +155,11 @@ var processFormProps = function processFormProps(props) {
|
|
|
152
155
|
columns: (_ref4 = groupColumns || []) === null || _ref4 === void 0 ? void 0 : (_ref4$filter = _ref4.filter(function (child) {
|
|
153
156
|
return !!child;
|
|
154
157
|
})) === null || _ref4$filter === void 0 ? void 0 : _ref4$filter.map(function (child) {
|
|
155
|
-
return
|
|
158
|
+
return _processInitialValue(child);
|
|
156
159
|
})
|
|
157
160
|
});
|
|
158
161
|
}
|
|
159
|
-
return
|
|
162
|
+
return _processInitialValue(e);
|
|
160
163
|
})
|
|
161
164
|
}, onFinish ? {
|
|
162
165
|
onFinish: onFinish
|
|
@@ -173,9 +176,9 @@ var processFormProps = function processFormProps(props) {
|
|
|
173
176
|
width: labelColWidth
|
|
174
177
|
})
|
|
175
178
|
})
|
|
176
|
-
}, settingOpt ? {
|
|
179
|
+
}, typeof settingOpt === 'string' && settingOpt !== null && settingOpt !== void 0 && settingOpt.trim() ? {
|
|
177
180
|
settingOpt: {
|
|
178
|
-
key: "
|
|
181
|
+
key: "" + (settingOpt === null || settingOpt === void 0 ? void 0 : settingOpt.trim())
|
|
179
182
|
}
|
|
180
183
|
} : {}, {
|
|
181
184
|
defaultColsNumber: defaultColsNumber,
|
|
@@ -183,5 +186,20 @@ var processFormProps = function processFormProps(props) {
|
|
|
183
186
|
span: span,
|
|
184
187
|
layoutType: layoutType
|
|
185
188
|
}, restProps ? (0, _lib.processJsonOrFunctionProps)(restProps) : {}));
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
|
|
190
|
+
// 每次变更重置(不知当初为什么这么写,导致外部state变化后,表单输入的值被重置了)
|
|
191
|
+
// if (formRef?.current) {
|
|
192
|
+
// const resetFields = config?.columns
|
|
193
|
+
// ?.filter((e) => !e?.initialValue)
|
|
194
|
+
// ?.reduce((prev: any, next: any) => {
|
|
195
|
+
// // eslint-disable-next-line no-param-reassign
|
|
196
|
+
// prev[next?.dataIndex ?? ''] = undefined;
|
|
197
|
+
// return prev;
|
|
198
|
+
// }, {});
|
|
199
|
+
// if (Object.keys(resetFields)?.length) {
|
|
200
|
+
// formRef?.current?.setFieldsValue(resetFields);
|
|
201
|
+
// }
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
return config;
|
|
205
|
+
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { RcListItem } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processListTplProps: (props: RcListItem, extra?: {
|
|
3
|
-
listRef?: any;
|
|
4
|
-
tableRef?: any;
|
|
5
|
-
listFormRef?: any;
|
|
6
|
-
listFormCurrentRef?: any;
|
|
7
|
-
}) => {
|
|
8
|
-
requestConfig: any;
|
|
9
|
-
type?: "list";
|
|
10
|
-
listRef: any;
|
|
11
|
-
onListBtnChange?: (type: "add" | "copy" | "
|
|
12
|
-
renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "
|
|
13
|
-
render?: (onChange?: (type: "add" | "copy" | "
|
|
14
|
-
key?: string;
|
|
15
|
-
name?: any;
|
|
16
|
-
form: any;
|
|
17
|
-
actions: {
|
|
18
|
-
items: any[];
|
|
19
|
-
type?: string;
|
|
20
|
-
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
21
|
-
size?: import("antd/lib/button").ButtonSize;
|
|
22
|
-
onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
|
|
23
|
-
onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
|
|
24
|
-
};
|
|
25
|
-
grid: {
|
|
26
|
-
config: any;
|
|
27
|
-
ref: any;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
1
|
+
import { RcListItem } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processListTplProps: (props: RcListItem, extra?: {
|
|
3
|
+
listRef?: any;
|
|
4
|
+
tableRef?: any;
|
|
5
|
+
listFormRef?: any;
|
|
6
|
+
listFormCurrentRef?: any;
|
|
7
|
+
}) => {
|
|
8
|
+
requestConfig: any;
|
|
9
|
+
type?: "list";
|
|
10
|
+
listRef: any;
|
|
11
|
+
onListBtnChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>;
|
|
12
|
+
renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => JSX.Element;
|
|
13
|
+
render?: (onChange?: (type: "add" | "copy" | "preview" | "edit" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => React.ReactNode;
|
|
14
|
+
key?: string;
|
|
15
|
+
name?: any;
|
|
16
|
+
form: any;
|
|
17
|
+
actions: {
|
|
18
|
+
items: any[];
|
|
19
|
+
type?: string;
|
|
20
|
+
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
21
|
+
size?: import("antd/lib/button").ButtonSize;
|
|
22
|
+
onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
|
|
23
|
+
onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
|
|
24
|
+
};
|
|
25
|
+
grid: {
|
|
26
|
+
config: any;
|
|
27
|
+
ref: any;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -8,7 +8,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
8
8
|
var _lib = require("../../../lib");
|
|
9
9
|
var _common = require("./common");
|
|
10
10
|
var _excluded = ["form", "actions", "grid", "requestConfig"];
|
|
11
|
-
var processListTplProps = function processListTplProps(props, extra) {
|
|
11
|
+
var processListTplProps = exports.processListTplProps = function processListTplProps(props, extra) {
|
|
12
12
|
var form = props.form,
|
|
13
13
|
actions = props.actions,
|
|
14
14
|
grid = props.grid,
|
|
@@ -35,5 +35,4 @@ var processListTplProps = function processListTplProps(props, extra) {
|
|
|
35
35
|
}, rest, {
|
|
36
36
|
requestConfig: (0, _common.processRequestConfig)(requestConfig)
|
|
37
37
|
});
|
|
38
|
-
};
|
|
39
|
-
exports.processListTplProps = processListTplProps;
|
|
38
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ProButtonItemsProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processMicroModalProps: (item: any) => ProButtonItemsProps;
|
|
3
|
-
export declare function transformFormProps(formProps: any): {
|
|
4
|
-
formProps?: undefined;
|
|
5
|
-
} | {
|
|
6
|
-
formProps: any;
|
|
7
|
-
};
|
|
1
|
+
import type { ProButtonItemsProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processMicroModalProps: (item: any) => ProButtonItemsProps;
|
|
3
|
+
export declare function transformFormProps(formProps: any): {
|
|
4
|
+
formProps?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
formProps: any;
|
|
7
|
+
};
|
|
@@ -10,7 +10,7 @@ var _lib = require("../../../lib");
|
|
|
10
10
|
var _common = require("./common");
|
|
11
11
|
var _excluded = ["microModal", "props"],
|
|
12
12
|
_excluded2 = ["restProps", "formProps", "reasonKey", "requestOptions"];
|
|
13
|
-
var processMicroModalProps = function processMicroModalProps(item) {
|
|
13
|
+
var processMicroModalProps = exports.processMicroModalProps = function processMicroModalProps(item) {
|
|
14
14
|
var microModal = item.microModal,
|
|
15
15
|
props = item.props,
|
|
16
16
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(item, _excluded);
|
|
@@ -27,10 +27,8 @@ var processMicroModalProps = function processMicroModalProps(item) {
|
|
|
27
27
|
requestOptions: (0, _common.processRequestConfig)(requestOptions)
|
|
28
28
|
} : {}, restProps ? (0, _lib.processJsonOrFunctionProps)(restProps) : {})
|
|
29
29
|
});
|
|
30
|
-
console.log('microModalProps', _props);
|
|
31
30
|
return _props;
|
|
32
31
|
};
|
|
33
|
-
exports.processMicroModalProps = processMicroModalProps;
|
|
34
32
|
function transformFormProps(formProps) {
|
|
35
33
|
if (Object.prototype.toString.call(formProps) !== '[object Object]') {
|
|
36
34
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const processMicroSwitchProps: (props: any, tableRef: any) => any;
|
|
1
|
+
export declare const processMicroSwitchProps: (props: any, tableRef: any) => any;
|
|
@@ -5,18 +5,20 @@ exports.__esModule = true;
|
|
|
5
5
|
exports.processMicroSwitchProps = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var _index = require("../index");
|
|
8
9
|
var _common = require("./common");
|
|
9
10
|
var _microModal = require("./microModal");
|
|
10
|
-
var _excluded = ["columns"],
|
|
11
|
+
var _excluded = ["columns", "restProps"],
|
|
11
12
|
_excluded2 = ["actionsSlot"],
|
|
12
13
|
_excluded3 = ["restProps", "requestOptions"],
|
|
13
14
|
_excluded4 = ["isMicroSwitch"],
|
|
14
15
|
_excluded5 = ["enableReasonKey", "disableReasonKey", "formProps"];
|
|
15
|
-
var processMicroSwitchProps = function processMicroSwitchProps(props, tableRef) {
|
|
16
|
+
var processMicroSwitchProps = exports.processMicroSwitchProps = function processMicroSwitchProps(props, tableRef) {
|
|
16
17
|
var _props$columns = props.columns,
|
|
17
18
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
19
|
+
restProps = props.restProps,
|
|
18
20
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
|
19
|
-
return (0, _extends2["default"])({}, rest, {
|
|
21
|
+
return (0, _extends2["default"])({}, rest, restProps ? (0, _index.processJsonOrFunctionProps)(restProps) : {}, {
|
|
20
22
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (column) {
|
|
21
23
|
var item = transformSwitchModal(column, tableRef);
|
|
22
24
|
var actionsSlot = item.actionsSlot,
|
|
@@ -37,7 +39,6 @@ var processMicroSwitchProps = function processMicroSwitchProps(props, tableRef)
|
|
|
37
39
|
// }),
|
|
38
40
|
});
|
|
39
41
|
};
|
|
40
|
-
exports.processMicroSwitchProps = processMicroSwitchProps;
|
|
41
42
|
var transformSwitchModal = function transformSwitchModal(column, tableRef) {
|
|
42
43
|
if (!column) {
|
|
43
44
|
return column;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProFormRenderProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processModalSelectProps: (props: ProFormRenderProps & {
|
|
3
|
-
labelColWidth?: number;
|
|
4
|
-
columns?: any[];
|
|
5
|
-
}) => any;
|
|
6
|
-
export declare const processModalSelectTablePropsColumns: (columns: any[]) => any[];
|
|
1
|
+
import { ProFormRenderProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processModalSelectProps: (props: ProFormRenderProps & {
|
|
3
|
+
labelColWidth?: number;
|
|
4
|
+
columns?: any[];
|
|
5
|
+
}) => any;
|
|
6
|
+
export declare const processModalSelectTablePropsColumns: (columns: any[]) => any[];
|
|
@@ -4,21 +4,19 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.processModalSelectTablePropsColumns = exports.processModalSelectProps = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
-
var processModalSelectProps = function processModalSelectProps(props) {
|
|
7
|
+
var processModalSelectProps = exports.processModalSelectProps = function processModalSelectProps(props) {
|
|
8
8
|
return (0, _extends2["default"])({}, props, {
|
|
9
9
|
columns: props === null || props === void 0 ? void 0 : props.columns.map(function (v) {
|
|
10
10
|
return processModalSelect(v);
|
|
11
11
|
})
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
exports.
|
|
15
|
-
var processModalSelectTablePropsColumns = function processModalSelectTablePropsColumns(columns) {
|
|
14
|
+
var processModalSelectTablePropsColumns = exports.processModalSelectTablePropsColumns = function processModalSelectTablePropsColumns(columns) {
|
|
16
15
|
var includeKeys = ['dataIndex', 'title', 'isEllipsis', 'isTag', 'valueType', 'valueEnum'];
|
|
17
16
|
return columns === null || columns === void 0 ? void 0 : columns.filter(function (v) {
|
|
18
17
|
return includeKeys.includes(v.name);
|
|
19
18
|
});
|
|
20
19
|
};
|
|
21
|
-
exports.processModalSelectTablePropsColumns = processModalSelectTablePropsColumns;
|
|
22
20
|
function processModalSelect(item) {
|
|
23
21
|
if (item.valueType === 'modalSelect') {
|
|
24
22
|
var _item$fieldProps, _item$fieldProps$tabl, _item$fieldProps2, _item$fieldProps2$pag, _item$fieldProps3, _item$fieldProps3$pag;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProOperationRecordsProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processOperationRecordsProps: (props: ProOperationRecordsProps) => any;
|
|
1
|
+
import { ProOperationRecordsProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processOperationRecordsProps: (props: ProOperationRecordsProps) => any;
|
|
@@ -9,7 +9,7 @@ var _lib = require("../../../lib");
|
|
|
9
9
|
var _excluded = ["timelineProps", "request", "columns", "transform", "timeItemProps", "valueEnum"]; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
10
|
// preview 处理
|
|
11
11
|
var processOperationProps = function processOperationProps(props) {
|
|
12
|
-
var
|
|
12
|
+
var _processObjectValue = function processObjectValue(obj) {
|
|
13
13
|
var timelineProps = obj.timelineProps,
|
|
14
14
|
request = obj.request,
|
|
15
15
|
columns = obj.columns,
|
|
@@ -19,7 +19,7 @@ var processOperationProps = function processOperationProps(props) {
|
|
|
19
19
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
|
|
20
20
|
return (0, _extends2["default"])({}, columns !== null && columns !== void 0 && columns.length ? {
|
|
21
21
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
22
|
-
return
|
|
22
|
+
return _processObjectValue(v);
|
|
23
23
|
})
|
|
24
24
|
} : [], transform ? {
|
|
25
25
|
transform: transform
|
|
@@ -29,12 +29,11 @@ var processOperationProps = function processOperationProps(props) {
|
|
|
29
29
|
};
|
|
30
30
|
if (Array.isArray(props)) {
|
|
31
31
|
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
32
|
-
return
|
|
32
|
+
return _processObjectValue(e);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return _processObjectValue(props);
|
|
36
36
|
};
|
|
37
|
-
var processOperationRecordsProps = function processOperationRecordsProps(props) {
|
|
37
|
+
var processOperationRecordsProps = exports.processOperationRecordsProps = function processOperationRecordsProps(props) {
|
|
38
38
|
return processOperationProps(props);
|
|
39
|
-
};
|
|
40
|
-
exports.processOperationRecordsProps = processOperationRecordsProps;
|
|
39
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProPreviewProps } from '@ztocwst/rc-pro';
|
|
2
|
-
export declare const processPreviewProps: (props: ProPreviewProps) => any;
|
|
1
|
+
import { ProPreviewProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processPreviewProps: (props: ProPreviewProps) => any;
|
|
@@ -10,7 +10,7 @@ var _excluded = ["render", "request", "columns", "transform", "valueEnum", "proL
|
|
|
10
10
|
|
|
11
11
|
// preview 处理
|
|
12
12
|
var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
13
|
-
var
|
|
13
|
+
var _processObjectValue = function processObjectValue(obj) {
|
|
14
14
|
var _proLogs$columns;
|
|
15
15
|
var render = obj.render,
|
|
16
16
|
request = obj.request,
|
|
@@ -25,7 +25,7 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
|
25
25
|
render: render
|
|
26
26
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
27
27
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
28
|
-
return
|
|
28
|
+
return _processObjectValue(v);
|
|
29
29
|
})
|
|
30
30
|
} : [], transform ? {
|
|
31
31
|
transform: transform
|
|
@@ -35,12 +35,11 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
|
35
35
|
};
|
|
36
36
|
if (Array.isArray(props)) {
|
|
37
37
|
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
38
|
-
return
|
|
38
|
+
return _processObjectValue(e);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return _processObjectValue(props);
|
|
42
42
|
};
|
|
43
|
-
var processPreviewProps = function processPreviewProps(props) {
|
|
43
|
+
var processPreviewProps = exports.processPreviewProps = function processPreviewProps(props) {
|
|
44
44
|
return processTplBillPreviewProps(props);
|
|
45
|
-
};
|
|
46
|
-
exports.processPreviewProps = processPreviewProps;
|
|
45
|
+
};
|