@ztocwst/rc-pro-materials 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +5 -5
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/dist/SCM_Comps.css +1 -1
  12. package/dist/SCM_Comps.js +8 -8
  13. package/dist/SCM_Comps.js.map +1 -1
  14. package/es/components/z-operation-records/index.d.ts +3 -0
  15. package/es/components/z-operation-records/index.js +2 -0
  16. package/es/components/z-operation-records/operationRecords.d.ts +4 -0
  17. package/es/components/z-operation-records/operationRecords.js +9 -0
  18. package/es/components/z-preview/preview.js +1 -1
  19. package/es/components/z-templates-data-common/components/custom-renderer/index.js +2 -0
  20. package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  21. package/es/components/z-templates-data-common/components/link-renderer/index.js +12 -12
  22. package/es/components/z-templates-data-common/components/table-renderer/index.js +2 -0
  23. package/es/components/z-templates-data-common/data-common.d.ts +1 -0
  24. package/es/components/z-templates-data-common/data-common.helper.js +3 -3
  25. package/es/index.d.ts +1 -0
  26. package/es/index.js +2 -0
  27. package/es/utils/index.d.ts +2 -1
  28. package/es/utils/index.js +2 -1
  29. package/es/utils/props/form.js +12 -4
  30. package/es/utils/props/operationRecords.d.ts +2 -0
  31. package/es/utils/props/operationRecords.js +37 -0
  32. package/es/utils/props/preview.js +7 -4
  33. package/es/utils/props/tpl.d.ts +4 -4
  34. package/es/utils/props/tpl.js +15 -6
  35. package/lib/components/z-operation-records/index.d.ts +3 -0
  36. package/lib/components/z-operation-records/index.js +8 -0
  37. package/lib/components/z-operation-records/operationRecords.d.ts +4 -0
  38. package/lib/components/z-operation-records/operationRecords.js +16 -0
  39. package/lib/components/z-preview/preview.js +1 -1
  40. package/lib/components/z-templates-data-common/components/custom-renderer/index.js +2 -0
  41. package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  42. package/lib/components/z-templates-data-common/components/link-renderer/index.js +12 -12
  43. package/lib/components/z-templates-data-common/components/table-renderer/index.js +2 -0
  44. package/lib/components/z-templates-data-common/data-common.d.ts +1 -0
  45. package/lib/components/z-templates-data-common/data-common.helper.js +3 -3
  46. package/lib/index.d.ts +1 -0
  47. package/lib/index.js +3 -1
  48. package/lib/utils/index.d.ts +2 -1
  49. package/lib/utils/index.js +2 -0
  50. package/lib/utils/props/form.js +12 -4
  51. package/lib/utils/props/operationRecords.d.ts +2 -0
  52. package/lib/utils/props/operationRecords.js +40 -0
  53. package/lib/utils/props/preview.js +7 -4
  54. package/lib/utils/props/tpl.d.ts +4 -4
  55. package/lib/utils/props/tpl.js +15 -6
  56. package/package.json +4 -4
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"));
@@ -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 };
@@ -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
  };
@@ -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", "propName"],
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,2 @@
1
+ import { ProOperationRecordsProps } from '@ztocwst/rc-pro';
2
+ export declare const processOperationRecordsProps: (props: ProOperationRecordsProps) => any;
@@ -0,0 +1,40 @@
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", "request", "columns", "transform", "timeItemProps", "valueEnum"]; // 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
+ request = obj.request,
15
+ columns = obj.columns,
16
+ transform = obj.transform,
17
+ timeItemProps = obj.timeItemProps,
18
+ valueEnum = obj.valueEnum,
19
+ rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
20
+ return (0, _extends2["default"])({}, columns !== null && columns !== void 0 && columns.length ? {
21
+ columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
22
+ return processObjectValue(v);
23
+ })
24
+ } : [], transform ? {
25
+ transform: transform
26
+ } : {}, timelineProps ? (0, _lib.processJsonOrFunctionProps)(timelineProps) : {}, timeItemProps ? (0, _lib.processJsonOrFunctionProps)(timeItemProps) : {}, valueEnum ? {
27
+ valueEnum: valueEnum
28
+ } : {}, rest);
29
+ };
30
+ if (Array.isArray(props)) {
31
+ return props === null || props === void 0 ? void 0 : props.map(function (e) {
32
+ return processObjectValue(e);
33
+ });
34
+ }
35
+ return processObjectValue(props);
36
+ };
37
+ var processOperationRecordsProps = function processOperationRecordsProps(props) {
38
+ return processOperationProps(props);
39
+ };
40
+ 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"])({}, render ? {
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;
@@ -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" | "modal" | "drawer";
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" | "modal" | "drawer";
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" | "modal" | "drawer";
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" | "modal" | "drawer";
115
+ layoutType?: "page" | "drawer" | "modal";
116
116
  onCustomBack?: () => void;
117
117
  onBackSuccess?: (data?: any) => void;
118
118
  isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
@@ -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 = ["props", "requestConfig"],
15
- _excluded4 = ["page"];
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
- } : {}, rest);
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, _excluded3);
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, _excluded4);
107
+ rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, _excluded5);
99
108
  var listFormRef = extra.listFormRef,
100
109
  billFormRef = extra.billFormRef,
101
110
  listRef = extra.listRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztocwst/rc-pro-materials",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "@ztocwst/rc-pro-materials",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -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.34",
74
+ "@ztocwst/rc-pro": "0.4.44",
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.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.29/build/lowcode/assets-prod.json"
89
+ "materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.31/build/lowcode/assets-prod.json"
90
90
  },
91
- "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.29/build/index.html",
91
+ "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.31/build/index.html",
92
92
  "publishConfig": {
93
93
  "registry": "https://registry.npmjs.org/",
94
94
  "access": "public"