@ztocwst/rc-pro-materials 0.1.29 → 0.1.30
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +8 -8
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-operation-records/index.d.ts +3 -0
- package/es/components/z-operation-records/index.js +2 -0
- package/es/components/z-operation-records/operationRecords.d.ts +4 -0
- package/es/components/z-operation-records/operationRecords.js +9 -0
- package/es/components/z-preview/preview.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +2 -1
- package/es/utils/props/form.js +12 -4
- package/es/utils/props/operationRecords.d.ts +2 -0
- package/es/utils/props/operationRecords.js +33 -0
- package/es/utils/props/preview.js +7 -4
- package/es/utils/props/tpl.d.ts +4 -4
- package/es/utils/props/tpl.js +15 -6
- package/lib/components/z-operation-records/index.d.ts +3 -0
- package/lib/components/z-operation-records/index.js +8 -0
- package/lib/components/z-operation-records/operationRecords.d.ts +4 -0
- package/lib/components/z-operation-records/operationRecords.js +16 -0
- package/lib/components/z-preview/preview.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +2 -0
- package/lib/utils/props/form.js +12 -4
- package/lib/utils/props/operationRecords.d.ts +2 -0
- package/lib/utils/props/operationRecords.js +36 -0
- package/lib/utils/props/preview.js +7 -4
- package/lib/utils/props/tpl.d.ts +4 -4
- package/lib/utils/props/tpl.js +15 -6
- package/package.json +4 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProOperationRecords } from '@ztocwst/rc-pro';
|
|
3
|
+
import { processOperationRecordsProps } from "../../utils";
|
|
4
|
+
var ZOperationRecords = function ZOperationRecords(props) {
|
|
5
|
+
var operationProps = processOperationRecordsProps(props);
|
|
6
|
+
console.log('ZOperationRecords', operationProps, 1);
|
|
7
|
+
return /*#__PURE__*/React.createElement(ProOperationRecords, operationProps);
|
|
8
|
+
};
|
|
9
|
+
export default ZOperationRecords;
|
|
@@ -5,7 +5,7 @@ import { ProPreview } from '@ztocwst/rc-pro';
|
|
|
5
5
|
import { processPreviewProps } from "../../utils";
|
|
6
6
|
var ZPreview = function ZPreview(props) {
|
|
7
7
|
var previewProps = processPreviewProps(props);
|
|
8
|
-
console.log(
|
|
8
|
+
console.log('previewProps', previewProps);
|
|
9
9
|
return /*#__PURE__*/React.createElement(ProPreview, previewProps);
|
|
10
10
|
};
|
|
11
11
|
export default ZPreview;
|
package/es/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as ZAuth } from './components/z-auth';
|
|
|
29
29
|
export type { TypeAuthProps } from './components/z-auth';
|
|
30
30
|
export { default as ZProProvider } from './components/z-pro-provider';
|
|
31
31
|
export type { TypeZProProviderProps } from './components/z-pro-provider';
|
|
32
|
+
export { default as ZOperationRecords } from './components/z-operation-records';
|
|
32
33
|
export { default as ZPointerBlock } from './components/z-pointer-block';
|
|
33
34
|
export type { TypeZPointerBlockProps } from './components/z-pointer-block';
|
|
34
35
|
export { default as ZAggBlock } from './components/z-agg-block';
|
package/es/index.js
CHANGED
|
@@ -16,6 +16,8 @@ export { default as ZSingleFactory } from "./components/z-singleFactory";
|
|
|
16
16
|
export { default as ZRcEditTable } from "./components/z-editTable";
|
|
17
17
|
export { default as ZAuth } from "./components/z-auth";
|
|
18
18
|
export { default as ZProProvider } from "./components/z-pro-provider";
|
|
19
|
+
export { default as ZOperationRecords } from "./components/z-operation-records";
|
|
20
|
+
|
|
19
21
|
// 普通指标块
|
|
20
22
|
export { default as ZPointerBlock } from "./components/z-pointer-block";
|
|
21
23
|
// 聚合指标
|
package/es/utils/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ import { processWarehouseAndFactoryProps } from './props/warehouseAndFactory';
|
|
|
8
8
|
import { processEditTableProps } from './props/editTable';
|
|
9
9
|
import { processPreviewProps } from './props/preview';
|
|
10
10
|
import { processModalSelectProps, processModalSelectTablePropsColumns } from './props/modalSelect';
|
|
11
|
+
import { processOperationRecordsProps } from './props/operationRecords';
|
|
11
12
|
declare const processJsonOrFunctionProps: (props: any) => any;
|
|
12
|
-
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns };
|
|
13
|
+
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps };
|
package/es/utils/index.js
CHANGED
|
@@ -8,7 +8,8 @@ import { processWarehouseAndFactoryProps } from "./props/warehouseAndFactory";
|
|
|
8
8
|
import { processEditTableProps } from "./props/editTable";
|
|
9
9
|
import { processPreviewProps } from "./props/preview";
|
|
10
10
|
import { processModalSelectProps, processModalSelectTablePropsColumns } from "./props/modalSelect";
|
|
11
|
+
import { processOperationRecordsProps } from "./props/operationRecords";
|
|
11
12
|
var processJsonOrFunctionProps = function processJsonOrFunctionProps(props) {
|
|
12
13
|
return typeof props === 'function' ? props === null || props === void 0 ? void 0 : props() : props;
|
|
13
14
|
};
|
|
14
|
-
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns };
|
|
15
|
+
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps };
|
package/es/utils/props/form.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"
|
|
3
|
+
var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"],
|
|
4
4
|
_excluded2 = ["restFieldProps", "renderItemSlot"],
|
|
5
5
|
_excluded3 = ["restFormProps"],
|
|
6
6
|
_excluded4 = ["fieldProps"],
|
|
7
7
|
_excluded5 = ["requestOptions"],
|
|
8
|
-
_excluded6 = ["columns"];
|
|
8
|
+
_excluded6 = ["columns", "switchGroup"];
|
|
9
9
|
/**
|
|
10
10
|
* 处理表单默认值
|
|
11
11
|
*/
|
|
@@ -17,6 +17,12 @@ import { processJsonOrFunctionProps } from "../../../lib";
|
|
|
17
17
|
var requestOptionsCheck = function requestOptionsCheck(func, data) {
|
|
18
18
|
return typeof func === 'function' ? func(data) : true;
|
|
19
19
|
};
|
|
20
|
+
var hasName = function hasName(name) {
|
|
21
|
+
if (Array.isArray(name)) {
|
|
22
|
+
return (name === null || name === void 0 ? void 0 : name.length) > 0;
|
|
23
|
+
}
|
|
24
|
+
return !!name;
|
|
25
|
+
};
|
|
20
26
|
var processInitialValue = function processInitialValue(e) {
|
|
21
27
|
var _restFieldArgs$style;
|
|
22
28
|
var fieldProps = e.fieldProps,
|
|
@@ -24,7 +30,6 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
24
30
|
dependencyColumns = e.dependencyColumns,
|
|
25
31
|
required = e.required,
|
|
26
32
|
initialValue = e.initialValue,
|
|
27
|
-
propName = e.propName,
|
|
28
33
|
rest = _objectWithoutPropertiesLoose(e, _excluded);
|
|
29
34
|
var _ref = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
|
|
30
35
|
_ref$restFieldProps = _ref.restFieldProps,
|
|
@@ -135,8 +140,11 @@ export var processFormProps = function processFormProps(props) {
|
|
|
135
140
|
if (e.valueType === 'group') {
|
|
136
141
|
var _ref4, _ref4$filter;
|
|
137
142
|
var groupColumns = e.columns,
|
|
143
|
+
switchGroup = e.switchGroup,
|
|
138
144
|
groupRest = _objectWithoutPropertiesLoose(e, _excluded6);
|
|
139
|
-
return _extends({}, groupRest, {
|
|
145
|
+
return _extends({}, groupRest, hasName(switchGroup === null || switchGroup === void 0 ? void 0 : switchGroup.name) ? {
|
|
146
|
+
switchGroup: switchGroup
|
|
147
|
+
} : {}, {
|
|
140
148
|
columns: (_ref4 = groupColumns || []) === null || _ref4 === void 0 ? void 0 : (_ref4$filter = _ref4.filter(function (child) {
|
|
141
149
|
return !!child;
|
|
142
150
|
})) === null || _ref4$filter === void 0 ? void 0 : _ref4$filter.map(function (child) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["timelineProps", "columns", "transform", "timeLineItemProps"];
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
|
|
6
|
+
import { processJsonOrFunctionProps } from "../../../lib";
|
|
7
|
+
|
|
8
|
+
// preview 处理
|
|
9
|
+
var processOperationProps = function processOperationProps(props) {
|
|
10
|
+
var processObjectValue = function processObjectValue(obj) {
|
|
11
|
+
var timelineProps = obj.timelineProps,
|
|
12
|
+
columns = obj.columns,
|
|
13
|
+
transform = obj.transform,
|
|
14
|
+
timeLineItemProps = obj.timeLineItemProps,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(obj, _excluded);
|
|
16
|
+
return _extends({}, columns !== null && columns !== void 0 && columns.length ? {
|
|
17
|
+
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
18
|
+
return processObjectValue(v);
|
|
19
|
+
})
|
|
20
|
+
} : [], transform ? {
|
|
21
|
+
transform: transform
|
|
22
|
+
} : {}, timelineProps ? processJsonOrFunctionProps(timelineProps) : {}, timeLineItemProps ? processJsonOrFunctionProps(timeLineItemProps) : {}, rest);
|
|
23
|
+
};
|
|
24
|
+
if (Array.isArray(props)) {
|
|
25
|
+
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
26
|
+
return processObjectValue(e);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return processObjectValue(props);
|
|
30
|
+
};
|
|
31
|
+
export var processOperationRecordsProps = function processOperationRecordsProps(props) {
|
|
32
|
+
return processOperationProps(props);
|
|
33
|
+
};
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["render", "request", "columns", "transform", "valueEnum"];
|
|
3
|
+
var _excluded = ["render", "request", "columns", "transform", "valueEnum", "proLogs"];
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
5
|
|
|
6
6
|
// preview 处理
|
|
7
7
|
var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
8
8
|
var processObjectValue = function processObjectValue(obj) {
|
|
9
|
+
var _proLogs$columns;
|
|
9
10
|
var render = obj.render,
|
|
10
11
|
request = obj.request,
|
|
11
12
|
columns = obj.columns,
|
|
12
13
|
transform = obj.transform,
|
|
13
14
|
valueEnum = obj.valueEnum,
|
|
15
|
+
proLogs = obj.proLogs,
|
|
14
16
|
rest = _objectWithoutPropertiesLoose(obj, _excluded);
|
|
15
|
-
return _extends({},
|
|
17
|
+
return _extends({}, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
|
|
18
|
+
proLogs: proLogs
|
|
19
|
+
} : {}, render ? {
|
|
16
20
|
render: render
|
|
17
21
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
18
22
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
@@ -32,6 +36,5 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
|
32
36
|
return processObjectValue(props);
|
|
33
37
|
};
|
|
34
38
|
export var processPreviewProps = function processPreviewProps(props) {
|
|
35
|
-
|
|
36
|
-
return _extends({}, processTplBillPreviewProps(props));
|
|
39
|
+
return processTplBillPreviewProps(props);
|
|
37
40
|
};
|
package/es/utils/props/tpl.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
|
22
22
|
key?: string;
|
|
23
23
|
width?: string | number;
|
|
24
24
|
name?: any;
|
|
25
|
-
layoutType?: "page" | "
|
|
25
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
26
26
|
onCustomBack?: () => void;
|
|
27
27
|
onBackSuccess?: (data?: any) => void;
|
|
28
28
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -47,7 +47,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
|
47
47
|
key?: string;
|
|
48
48
|
width?: string | number;
|
|
49
49
|
name?: any;
|
|
50
|
-
layoutType?: "page" | "
|
|
50
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
51
51
|
onCustomBack?: () => void;
|
|
52
52
|
onBackSuccess?: (data?: any) => void;
|
|
53
53
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -87,7 +87,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
|
87
87
|
key?: string;
|
|
88
88
|
width?: string | number;
|
|
89
89
|
name?: any;
|
|
90
|
-
layoutType?: "page" | "
|
|
90
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
91
91
|
onCustomBack?: () => void;
|
|
92
92
|
onBackSuccess?: (data?: any) => void;
|
|
93
93
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -112,7 +112,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
|
112
112
|
key?: string;
|
|
113
113
|
width?: string | number;
|
|
114
114
|
name?: any;
|
|
115
|
-
layoutType?: "page" | "
|
|
115
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
116
116
|
onCustomBack?: () => void;
|
|
117
117
|
onBackSuccess?: (data?: any) => void;
|
|
118
118
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
package/es/utils/props/tpl.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["on", "antdPageHeaderProps", "antdRadioGroupProps"],
|
|
4
|
-
_excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig"],
|
|
5
|
-
_excluded3 = ["
|
|
6
|
-
_excluded4 = ["
|
|
4
|
+
_excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig", "props"],
|
|
5
|
+
_excluded3 = ["proLogs"],
|
|
6
|
+
_excluded4 = ["props", "requestConfig"],
|
|
7
|
+
_excluded5 = ["page"];
|
|
7
8
|
import { processListTplProps } from "./listTpl";
|
|
8
9
|
import { processFormProps } from "./form";
|
|
9
10
|
import { processJsonOrFunctionProps } from "../../../lib";
|
|
@@ -32,18 +33,26 @@ var processTplBillPreviewTabsProps = function processTplBillPreviewTabsProps(pro
|
|
|
32
33
|
// preview 处理
|
|
33
34
|
var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
34
35
|
var processObjectValue = function processObjectValue(obj) {
|
|
36
|
+
var _proLogs$columns;
|
|
35
37
|
// preview props 需要处理
|
|
36
38
|
var layoutProps = obj.layoutProps,
|
|
37
39
|
antdPageHeaderProps = obj.antdPageHeaderProps,
|
|
38
40
|
requestConfig = obj.requestConfig,
|
|
41
|
+
objProps = obj.props,
|
|
39
42
|
rest = _objectWithoutPropertiesLoose(obj, _excluded2);
|
|
43
|
+
var proLogs = objProps.proLogs,
|
|
44
|
+
objRest = _objectWithoutPropertiesLoose(objProps, _excluded3);
|
|
40
45
|
return _extends({}, layoutProps ? {
|
|
41
46
|
layoutProps: processJsonOrFunctionProps(layoutProps)
|
|
42
47
|
} : {}, antdPageHeaderProps ? {
|
|
43
48
|
antdPageHeaderProps: processJsonOrFunctionProps(antdPageHeaderProps)
|
|
44
49
|
} : {}, requestConfig ? {
|
|
45
50
|
requestConfig: processRequestConfig(requestConfig)
|
|
46
|
-
} : {},
|
|
51
|
+
} : {}, {
|
|
52
|
+
props: _extends({}, objRest, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
|
|
53
|
+
proLogs: proLogs
|
|
54
|
+
} : {})
|
|
55
|
+
}, rest);
|
|
47
56
|
};
|
|
48
57
|
if (Array.isArray(props)) {
|
|
49
58
|
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
@@ -62,7 +71,7 @@ export var processTplBillProps = function processTplBillProps(props, extra) {
|
|
|
62
71
|
var _form$props = form.props,
|
|
63
72
|
formProps = _form$props === void 0 ? {} : _form$props,
|
|
64
73
|
requestConfig = form.requestConfig,
|
|
65
|
-
formRest = _objectWithoutPropertiesLoose(form,
|
|
74
|
+
formRest = _objectWithoutPropertiesLoose(form, _excluded4);
|
|
66
75
|
return _extends({}, form ? {
|
|
67
76
|
form: _extends({}, formRest, {
|
|
68
77
|
requestConfig: _extends({}, requestConfig !== null && requestConfig !== void 0 && requestConfig.add ? {
|
|
@@ -90,7 +99,7 @@ export var processTplProps = function processTplProps(props, extra) {
|
|
|
90
99
|
var _page$list;
|
|
91
100
|
var _ref2 = props !== null && props !== void 0 ? props : {},
|
|
92
101
|
page = _ref2.page,
|
|
93
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
102
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded5);
|
|
94
103
|
var listFormRef = extra.listFormRef,
|
|
95
104
|
billFormRef = extra.billFormRef,
|
|
96
105
|
listRef = extra.listRef,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _operationRecords = _interopRequireDefault(require("./operationRecords"));
|
|
7
|
+
var _default = _operationRecords["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
var React = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _rcPro = require("@ztocwst/rc-pro");
|
|
7
|
+
var _utils = require("../../utils");
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
var ZOperationRecords = function ZOperationRecords(props) {
|
|
11
|
+
var operationProps = (0, _utils.processOperationRecordsProps)(props);
|
|
12
|
+
console.log('ZOperationRecords', operationProps, 1);
|
|
13
|
+
return /*#__PURE__*/React.createElement(_rcPro.ProOperationRecords, operationProps);
|
|
14
|
+
};
|
|
15
|
+
var _default = ZOperationRecords;
|
|
16
|
+
exports["default"] = _default;
|
|
@@ -11,7 +11,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
11
11
|
|
|
12
12
|
var ZPreview = function ZPreview(props) {
|
|
13
13
|
var previewProps = (0, _utils.processPreviewProps)(props);
|
|
14
|
-
console.log(
|
|
14
|
+
console.log('previewProps', previewProps);
|
|
15
15
|
return /*#__PURE__*/React.createElement(_rcPro.ProPreview, previewProps);
|
|
16
16
|
};
|
|
17
17
|
var _default = ZPreview;
|
package/lib/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as ZAuth } from './components/z-auth';
|
|
|
29
29
|
export type { TypeAuthProps } from './components/z-auth';
|
|
30
30
|
export { default as ZProProvider } from './components/z-pro-provider';
|
|
31
31
|
export type { TypeZProProviderProps } from './components/z-pro-provider';
|
|
32
|
+
export { default as ZOperationRecords } from './components/z-operation-records';
|
|
32
33
|
export { default as ZPointerBlock } from './components/z-pointer-block';
|
|
33
34
|
export type { TypeZPointerBlockProps } from './components/z-pointer-block';
|
|
34
35
|
export { default as ZAggBlock } from './components/z-agg-block';
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.ZWarehouse = exports.ZTpl = exports.ZTemplatesDataCommon = exports.ZTable = exports.ZStatistic = exports.ZSingleFactory = exports.ZSimpleBar = exports.ZRcEditTable = exports.ZRankingList = exports.ZProProvider = exports.ZPreview = exports.ZPointerBlock = exports.ZList = exports.ZForm = exports.ZEllipsis = exports.ZDiv = exports.ZConfigProvider = exports.ZButton = exports.ZBox = exports.ZAuth = exports.ZAggBlock = void 0;
|
|
5
|
+
exports.ZWarehouse = exports.ZTpl = exports.ZTemplatesDataCommon = exports.ZTable = exports.ZStatistic = exports.ZSingleFactory = exports.ZSimpleBar = exports.ZRcEditTable = exports.ZRankingList = exports.ZProProvider = exports.ZPreview = exports.ZPointerBlock = exports.ZOperationRecords = exports.ZList = exports.ZForm = exports.ZEllipsis = exports.ZDiv = exports.ZConfigProvider = exports.ZButton = exports.ZBox = exports.ZAuth = exports.ZAggBlock = void 0;
|
|
6
6
|
var _zButton = _interopRequireDefault(require("./components/z-button"));
|
|
7
7
|
exports.ZButton = _zButton["default"];
|
|
8
8
|
var _zForm = _interopRequireDefault(require("./components/z-form"));
|
|
@@ -39,6 +39,8 @@ var _zAuth = _interopRequireDefault(require("./components/z-auth"));
|
|
|
39
39
|
exports.ZAuth = _zAuth["default"];
|
|
40
40
|
var _zProProvider = _interopRequireDefault(require("./components/z-pro-provider"));
|
|
41
41
|
exports.ZProProvider = _zProProvider["default"];
|
|
42
|
+
var _zOperationRecords = _interopRequireDefault(require("./components/z-operation-records"));
|
|
43
|
+
exports.ZOperationRecords = _zOperationRecords["default"];
|
|
42
44
|
var _zPointerBlock = _interopRequireDefault(require("./components/z-pointer-block"));
|
|
43
45
|
exports.ZPointerBlock = _zPointerBlock["default"];
|
|
44
46
|
var _zAggBlock = _interopRequireDefault(require("./components/z-agg-block"));
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ import { processWarehouseAndFactoryProps } from './props/warehouseAndFactory';
|
|
|
8
8
|
import { processEditTableProps } from './props/editTable';
|
|
9
9
|
import { processPreviewProps } from './props/preview';
|
|
10
10
|
import { processModalSelectProps, processModalSelectTablePropsColumns } from './props/modalSelect';
|
|
11
|
+
import { processOperationRecordsProps } from './props/operationRecords';
|
|
11
12
|
declare const processJsonOrFunctionProps: (props: any) => any;
|
|
12
|
-
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns };
|
|
13
|
+
export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps };
|
package/lib/utils/index.js
CHANGED
|
@@ -23,6 +23,8 @@ exports.processPreviewProps = _preview.processPreviewProps;
|
|
|
23
23
|
var _modalSelect = require("./props/modalSelect");
|
|
24
24
|
exports.processModalSelectProps = _modalSelect.processModalSelectProps;
|
|
25
25
|
exports.processModalSelectTablePropsColumns = _modalSelect.processModalSelectTablePropsColumns;
|
|
26
|
+
var _operationRecords = require("./props/operationRecords");
|
|
27
|
+
exports.processOperationRecordsProps = _operationRecords.processOperationRecordsProps;
|
|
26
28
|
var processJsonOrFunctionProps = function processJsonOrFunctionProps(props) {
|
|
27
29
|
return typeof props === 'function' ? props === null || props === void 0 ? void 0 : props() : props;
|
|
28
30
|
};
|
package/lib/utils/props/form.js
CHANGED
|
@@ -9,18 +9,24 @@ var _modalSelect = require("./modalSelect");
|
|
|
9
9
|
var _common = require("./common");
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _lib = require("../../../lib");
|
|
12
|
-
var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"
|
|
12
|
+
var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"],
|
|
13
13
|
_excluded2 = ["restFieldProps", "renderItemSlot"],
|
|
14
14
|
_excluded3 = ["restFormProps"],
|
|
15
15
|
_excluded4 = ["fieldProps"],
|
|
16
16
|
_excluded5 = ["requestOptions"],
|
|
17
|
-
_excluded6 = ["columns"];
|
|
17
|
+
_excluded6 = ["columns", "switchGroup"];
|
|
18
18
|
/**
|
|
19
19
|
* 处理表单默认值
|
|
20
20
|
*/
|
|
21
21
|
var requestOptionsCheck = function requestOptionsCheck(func, data) {
|
|
22
22
|
return typeof func === 'function' ? func(data) : true;
|
|
23
23
|
};
|
|
24
|
+
var hasName = function hasName(name) {
|
|
25
|
+
if (Array.isArray(name)) {
|
|
26
|
+
return (name === null || name === void 0 ? void 0 : name.length) > 0;
|
|
27
|
+
}
|
|
28
|
+
return !!name;
|
|
29
|
+
};
|
|
24
30
|
var processInitialValue = function processInitialValue(e) {
|
|
25
31
|
var _restFieldArgs$style;
|
|
26
32
|
var fieldProps = e.fieldProps,
|
|
@@ -28,7 +34,6 @@ var processInitialValue = function processInitialValue(e) {
|
|
|
28
34
|
dependencyColumns = e.dependencyColumns,
|
|
29
35
|
required = e.required,
|
|
30
36
|
initialValue = e.initialValue,
|
|
31
|
-
propName = e.propName,
|
|
32
37
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(e, _excluded);
|
|
33
38
|
var _ref = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
|
|
34
39
|
_ref$restFieldProps = _ref.restFieldProps,
|
|
@@ -139,8 +144,11 @@ var processFormProps = function processFormProps(props) {
|
|
|
139
144
|
if (e.valueType === 'group') {
|
|
140
145
|
var _ref4, _ref4$filter;
|
|
141
146
|
var groupColumns = e.columns,
|
|
147
|
+
switchGroup = e.switchGroup,
|
|
142
148
|
groupRest = (0, _objectWithoutPropertiesLoose2["default"])(e, _excluded6);
|
|
143
|
-
return (0, _extends2["default"])({}, groupRest, {
|
|
149
|
+
return (0, _extends2["default"])({}, groupRest, hasName(switchGroup === null || switchGroup === void 0 ? void 0 : switchGroup.name) ? {
|
|
150
|
+
switchGroup: switchGroup
|
|
151
|
+
} : {}, {
|
|
144
152
|
columns: (_ref4 = groupColumns || []) === null || _ref4 === void 0 ? void 0 : (_ref4$filter = _ref4.filter(function (child) {
|
|
145
153
|
return !!child;
|
|
146
154
|
})) === null || _ref4$filter === void 0 ? void 0 : _ref4$filter.map(function (child) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.processOperationRecordsProps = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var _lib = require("../../../lib");
|
|
9
|
+
var _excluded = ["timelineProps", "columns", "transform", "timeLineItemProps"]; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
// preview 处理
|
|
11
|
+
var processOperationProps = function processOperationProps(props) {
|
|
12
|
+
var processObjectValue = function processObjectValue(obj) {
|
|
13
|
+
var timelineProps = obj.timelineProps,
|
|
14
|
+
columns = obj.columns,
|
|
15
|
+
transform = obj.transform,
|
|
16
|
+
timeLineItemProps = obj.timeLineItemProps,
|
|
17
|
+
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
|
|
18
|
+
return (0, _extends2["default"])({}, columns !== null && columns !== void 0 && columns.length ? {
|
|
19
|
+
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
20
|
+
return processObjectValue(v);
|
|
21
|
+
})
|
|
22
|
+
} : [], transform ? {
|
|
23
|
+
transform: transform
|
|
24
|
+
} : {}, timelineProps ? (0, _lib.processJsonOrFunctionProps)(timelineProps) : {}, timeLineItemProps ? (0, _lib.processJsonOrFunctionProps)(timeLineItemProps) : {}, rest);
|
|
25
|
+
};
|
|
26
|
+
if (Array.isArray(props)) {
|
|
27
|
+
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
28
|
+
return processObjectValue(e);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return processObjectValue(props);
|
|
32
|
+
};
|
|
33
|
+
var processOperationRecordsProps = function processOperationRecordsProps(props) {
|
|
34
|
+
return processOperationProps(props);
|
|
35
|
+
};
|
|
36
|
+
exports.processOperationRecordsProps = processOperationRecordsProps;
|
|
@@ -5,19 +5,23 @@ exports.__esModule = true;
|
|
|
5
5
|
exports.processPreviewProps = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
-
var _excluded = ["render", "request", "columns", "transform", "valueEnum"];
|
|
8
|
+
var _excluded = ["render", "request", "columns", "transform", "valueEnum", "proLogs"];
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
10
|
|
|
11
11
|
// preview 处理
|
|
12
12
|
var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
13
13
|
var processObjectValue = function processObjectValue(obj) {
|
|
14
|
+
var _proLogs$columns;
|
|
14
15
|
var render = obj.render,
|
|
15
16
|
request = obj.request,
|
|
16
17
|
columns = obj.columns,
|
|
17
18
|
transform = obj.transform,
|
|
18
19
|
valueEnum = obj.valueEnum,
|
|
20
|
+
proLogs = obj.proLogs,
|
|
19
21
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
|
|
20
|
-
return (0, _extends2["default"])({},
|
|
22
|
+
return (0, _extends2["default"])({}, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
|
|
23
|
+
proLogs: proLogs
|
|
24
|
+
} : {}, render ? {
|
|
21
25
|
render: render
|
|
22
26
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
23
27
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
@@ -37,7 +41,6 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
|
37
41
|
return processObjectValue(props);
|
|
38
42
|
};
|
|
39
43
|
var processPreviewProps = function processPreviewProps(props) {
|
|
40
|
-
|
|
41
|
-
return (0, _extends2["default"])({}, processTplBillPreviewProps(props));
|
|
44
|
+
return processTplBillPreviewProps(props);
|
|
42
45
|
};
|
|
43
46
|
exports.processPreviewProps = processPreviewProps;
|
package/lib/utils/props/tpl.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
|
22
22
|
key?: string;
|
|
23
23
|
width?: string | number;
|
|
24
24
|
name?: any;
|
|
25
|
-
layoutType?: "page" | "
|
|
25
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
26
26
|
onCustomBack?: () => void;
|
|
27
27
|
onBackSuccess?: (data?: any) => void;
|
|
28
28
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -47,7 +47,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
|
|
|
47
47
|
key?: string;
|
|
48
48
|
width?: string | number;
|
|
49
49
|
name?: any;
|
|
50
|
-
layoutType?: "page" | "
|
|
50
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
51
51
|
onCustomBack?: () => void;
|
|
52
52
|
onBackSuccess?: (data?: any) => void;
|
|
53
53
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -87,7 +87,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
|
87
87
|
key?: string;
|
|
88
88
|
width?: string | number;
|
|
89
89
|
name?: any;
|
|
90
|
-
layoutType?: "page" | "
|
|
90
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
91
91
|
onCustomBack?: () => void;
|
|
92
92
|
onBackSuccess?: (data?: any) => void;
|
|
93
93
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
|
@@ -112,7 +112,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
|
|
|
112
112
|
key?: string;
|
|
113
113
|
width?: string | number;
|
|
114
114
|
name?: any;
|
|
115
|
-
layoutType?: "page" | "
|
|
115
|
+
layoutType?: "page" | "drawer" | "modal";
|
|
116
116
|
onCustomBack?: () => void;
|
|
117
117
|
onBackSuccess?: (data?: any) => void;
|
|
118
118
|
isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
|
package/lib/utils/props/tpl.js
CHANGED
|
@@ -10,9 +10,10 @@ var _form = require("./form");
|
|
|
10
10
|
var _lib = require("../../../lib");
|
|
11
11
|
var _common = require("./common");
|
|
12
12
|
var _excluded = ["on", "antdPageHeaderProps", "antdRadioGroupProps"],
|
|
13
|
-
_excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig"],
|
|
14
|
-
_excluded3 = ["
|
|
15
|
-
_excluded4 = ["
|
|
13
|
+
_excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig", "props"],
|
|
14
|
+
_excluded3 = ["proLogs"],
|
|
15
|
+
_excluded4 = ["props", "requestConfig"],
|
|
16
|
+
_excluded5 = ["page"];
|
|
16
17
|
// previewTabs 处理
|
|
17
18
|
var processTplBillPreviewTabsProps = function processTplBillPreviewTabsProps(props) {
|
|
18
19
|
var on = props.on,
|
|
@@ -36,18 +37,26 @@ var processTplBillPreviewTabsProps = function processTplBillPreviewTabsProps(pro
|
|
|
36
37
|
// preview 处理
|
|
37
38
|
var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
|
|
38
39
|
var processObjectValue = function processObjectValue(obj) {
|
|
40
|
+
var _proLogs$columns;
|
|
39
41
|
// preview props 需要处理
|
|
40
42
|
var layoutProps = obj.layoutProps,
|
|
41
43
|
antdPageHeaderProps = obj.antdPageHeaderProps,
|
|
42
44
|
requestConfig = obj.requestConfig,
|
|
45
|
+
objProps = obj.props,
|
|
43
46
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded2);
|
|
47
|
+
var proLogs = objProps.proLogs,
|
|
48
|
+
objRest = (0, _objectWithoutPropertiesLoose2["default"])(objProps, _excluded3);
|
|
44
49
|
return (0, _extends2["default"])({}, layoutProps ? {
|
|
45
50
|
layoutProps: (0, _lib.processJsonOrFunctionProps)(layoutProps)
|
|
46
51
|
} : {}, antdPageHeaderProps ? {
|
|
47
52
|
antdPageHeaderProps: (0, _lib.processJsonOrFunctionProps)(antdPageHeaderProps)
|
|
48
53
|
} : {}, requestConfig ? {
|
|
49
54
|
requestConfig: (0, _common.processRequestConfig)(requestConfig)
|
|
50
|
-
} : {},
|
|
55
|
+
} : {}, {
|
|
56
|
+
props: (0, _extends2["default"])({}, objRest, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
|
|
57
|
+
proLogs: proLogs
|
|
58
|
+
} : {})
|
|
59
|
+
}, rest);
|
|
51
60
|
};
|
|
52
61
|
if (Array.isArray(props)) {
|
|
53
62
|
return props === null || props === void 0 ? void 0 : props.map(function (e) {
|
|
@@ -66,7 +75,7 @@ var processTplBillProps = function processTplBillProps(props, extra) {
|
|
|
66
75
|
var _form$props = form.props,
|
|
67
76
|
formProps = _form$props === void 0 ? {} : _form$props,
|
|
68
77
|
requestConfig = form.requestConfig,
|
|
69
|
-
formRest = (0, _objectWithoutPropertiesLoose2["default"])(form,
|
|
78
|
+
formRest = (0, _objectWithoutPropertiesLoose2["default"])(form, _excluded4);
|
|
70
79
|
return (0, _extends2["default"])({}, form ? {
|
|
71
80
|
form: (0, _extends2["default"])({}, formRest, {
|
|
72
81
|
requestConfig: (0, _extends2["default"])({}, requestConfig !== null && requestConfig !== void 0 && requestConfig.add ? {
|
|
@@ -95,7 +104,7 @@ var processTplProps = function processTplProps(props, extra) {
|
|
|
95
104
|
var _page$list;
|
|
96
105
|
var _ref2 = props !== null && props !== void 0 ? props : {},
|
|
97
106
|
page = _ref2.page,
|
|
98
|
-
rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref2,
|
|
107
|
+
rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, _excluded5);
|
|
99
108
|
var listFormRef = extra.listFormRef,
|
|
100
109
|
billFormRef = extra.billFormRef,
|
|
101
110
|
listRef = extra.listRef,
|