@zat-design/sisyphus-react 3.6.9-beta.7 → 3.6.10-beta.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.
Files changed (92) hide show
  1. package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
  2. package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
  3. package/coverage/lcov-report/src/.umi/core/index.html +206 -0
  4. package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
  5. package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
  6. package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
  7. package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
  8. package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
  9. package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
  10. package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
  11. package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
  12. package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
  13. package/coverage/lcov-report/src/.umi/index.html +116 -0
  14. package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
  15. package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
  16. package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
  17. package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
  18. package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
  19. package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
  20. package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
  21. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
  22. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
  23. package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
  24. package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
  25. package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
  26. package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
  27. package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
  28. package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
  29. package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
  30. package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
  31. package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
  32. package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
  33. package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
  34. package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
  35. package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
  36. package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
  37. package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
  38. package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
  39. package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
  40. package/dist/index.esm.css +41 -41
  41. package/dist/less.esm.css +41 -41
  42. package/es/ProEditTable/components/RenderField/index.js +46 -27
  43. package/es/ProForm/components/combination/ProCascader/index.js +14 -8
  44. package/es/ProForm/components/render/Render.js +37 -17
  45. package/es/ProForm/style/index.less +52 -52
  46. package/es/ProForm/utils/diffOriginal.d.ts +1 -0
  47. package/es/ProForm/utils/diffOriginal.js +27 -4
  48. package/es/ProForm/utils/useChanged.js +2 -1
  49. package/es/ProForm/utils/useListChanged.js +3 -3
  50. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +6 -1
  51. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +176 -40
  52. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +20 -1
  53. package/es/ProTable/index.js +12 -2
  54. package/es/ProTable/propsType.d.ts +25 -0
  55. package/es/ProThemeTools/component/{ProTools → PrdTools}/index.d.ts +2 -2
  56. package/es/ProThemeTools/component/{ProTools → PrdTools}/index.js +2 -2
  57. package/es/ProThemeTools/component/index.d.ts +2 -1
  58. package/es/ProThemeTools/component/index.js +2 -1
  59. package/es/ProThemeTools/index.js +2 -2
  60. package/es/ProThemeTools/style/index.less +1 -1
  61. package/es/ProTreeModal/components/List.js +30 -4
  62. package/lib/ProEditTable/components/RenderField/index.js +41 -26
  63. package/lib/ProForm/components/combination/ProCascader/index.js +12 -6
  64. package/lib/ProForm/components/render/Render.js +35 -17
  65. package/lib/ProForm/style/index.less +52 -52
  66. package/lib/ProForm/utils/diffOriginal.d.ts +1 -0
  67. package/lib/ProForm/utils/diffOriginal.js +27 -3
  68. package/lib/ProForm/utils/useChanged.js +2 -1
  69. package/lib/ProForm/utils/useListChanged.js +2 -2
  70. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +6 -1
  71. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +176 -40
  72. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +19 -1
  73. package/lib/ProTable/index.js +12 -2
  74. package/lib/ProTable/propsType.d.ts +25 -0
  75. package/lib/ProThemeTools/component/{ProTools → PrdTools}/index.d.ts +2 -2
  76. package/lib/ProThemeTools/component/{ProTools → PrdTools}/index.js +2 -2
  77. package/lib/ProThemeTools/component/index.d.ts +2 -1
  78. package/lib/ProThemeTools/component/index.js +3 -3
  79. package/lib/ProThemeTools/index.js +1 -1
  80. package/lib/ProThemeTools/style/index.less +1 -1
  81. package/lib/ProTreeModal/components/List.js +30 -4
  82. package/package.json +1 -1
  83. package/es/ProEditTable/components/RenderField/ListChanged.d.ts +0 -16
  84. package/es/ProEditTable/components/RenderField/ListChanged.js +0 -124
  85. package/es/ProForm/components/render/Changed.d.ts +0 -14
  86. package/es/ProForm/components/render/Changed.js +0 -64
  87. package/lib/ProEditTable/components/RenderField/ListChanged.d.ts +0 -16
  88. package/lib/ProEditTable/components/RenderField/ListChanged.js +0 -129
  89. package/lib/ProForm/components/render/Changed.d.ts +0 -14
  90. package/lib/ProForm/components/render/Changed.js +0 -69
  91. /package/es/ProThemeTools/component/{ProTools → PrdTools}/style/index.less +0 -0
  92. /package/lib/ProThemeTools/component/{ProTools → PrdTools}/style/index.less +0 -0
@@ -1,64 +0,0 @@
1
- import "antd/es/space/style";
2
- import _Space from "antd/es/space";
3
- import "antd/es/tooltip/style";
4
- import _Tooltip from "antd/es/tooltip";
5
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["name", "names", "namesStr", "originalValues", "form", "equalWith", "children", "type", "originalDiffTip"];
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- import { get } from 'lodash';
10
- import React, { useMemo } from 'react';
11
- import { diffOriginal } from '../../utils/diffOriginal';
12
- var Changed = function Changed(props) {
13
- var name = props.name,
14
- names = props.names,
15
- namesStr = props.namesStr,
16
- originalValues = props.originalValues,
17
- form = props.form,
18
- equalWith = props.equalWith,
19
- children = props.children,
20
- type = props.type,
21
- originalDiffTip = props.originalDiffTip,
22
- rest = _objectWithoutProperties(props, _excluded);
23
- // 不渲染tooltip
24
- var notWatch = !originalDiffTip || ['FormList', 'ProEditTable'].includes(type);
25
- var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
26
- return get(originalValues, name);
27
- }) : get(originalValues, name);
28
- var noChange = !equalWith && (!originalValues || originalValue === undefined);
29
- var changed = useMemo(function () {
30
- if (notWatch || noChange) return false;
31
- return diffOriginal({
32
- originalValue: originalValue,
33
- value: props.value,
34
- form: form,
35
- equalWith: equalWith
36
- // name: namesStr || name,
37
- });
38
- }, [notWatch, noChange, props.value, originalValue]);
39
- var tipContent = useMemo(function () {
40
- if (notWatch || noChange) return undefined;
41
- return /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), {}, {
42
- isView: true,
43
- value: originalValue,
44
- checked: type === 'Switch' ? originalValue : undefined
45
- })) : undefined;
46
- }, [originalValue, children]);
47
- if (notWatch || noChange) {
48
- return /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest));
49
- }
50
- return _jsx(_Tooltip, {
51
- open: changed ? undefined : false,
52
- getPopupContainer: function getPopupContainer(target) {
53
- return target.parentElement;
54
- },
55
- title: _jsxs(_Space, {
56
- children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
57
- }),
58
- children: _jsx("div", {
59
- className: changed ? 'pro-form-item-changed' : '',
60
- children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest)) : undefined
61
- })
62
- });
63
- };
64
- export default Changed;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { FormInstance } from 'antd';
3
- import { NamePath } from 'antd/lib/form/interface';
4
- interface Props {
5
- name?: NamePath;
6
- names?: NamePath[];
7
- originalName?: NamePath;
8
- originalNames?: NamePath[];
9
- namesStr?: NamePath;
10
- originalValues?: any;
11
- form: FormInstance;
12
- equalWith?: (preValue: any, curValue: any) => boolean | undefined;
13
- [name: string]: any;
14
- }
15
- declare const ListChanged: React.FC<Props>;
16
- export default ListChanged;
@@ -1,129 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- var _react = _interopRequireWildcard(require("react"));
13
- var _antd = require("antd");
14
- var _lodash = require("lodash");
15
- var _diffOriginal = require("../../../ProForm/utils/diffOriginal");
16
- var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type"];
17
- var toNamePath = function toNamePath(name) {
18
- if (Array.isArray(name)) {
19
- return name;
20
- }
21
- return [name];
22
- };
23
- var toNamePaths = function toNamePaths(names) {
24
- return names.map(function (name) {
25
- return toNamePath(name);
26
- });
27
- };
28
- var getOriginalValue = function getOriginalValue(_ref) {
29
- var namePath = _ref.namePath,
30
- originalName = _ref.originalName,
31
- originalNames = _ref.originalNames,
32
- originalValues = _ref.originalValues,
33
- rowKeyPath = _ref.rowKeyPath,
34
- form = _ref.form;
35
- if (!originalValues) {
36
- return undefined;
37
- }
38
- if (rowKeyPath) {
39
- var rowValueNamePath = namePath.slice(0, rowKeyPath.length - 1); // 表单中变动值所在行
40
- var rowKeyName = rowKeyPath[rowKeyPath.length - 1]; // rowKey在行内的name
41
- var rowValue = form.getFieldValue(rowValueNamePath);
42
- if (!rowValue) return undefined;
43
- var keyValue = rowValue[rowKeyName]; // 获取表单中rowKey值
44
- if (!keyValue) return undefined;
45
- var originalValueList = (0, _lodash.get)(originalValues, originalName.slice(0, rowKeyPath.length - 2));
46
- var originalValueRow = originalValueList.find(function (item) {
47
- return item[rowKeyPath[rowKeyPath.length - 1]] === keyValue;
48
- });
49
- var originalValue;
50
- if (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) {
51
- var originalNamesValue = originalNames.map(function (originalName) {
52
- return (0, _lodash.get)(originalValueRow, originalName.slice(rowKeyPath.length - 1));
53
- });
54
- // 有可能出现数组中全是undefined的情况 视为没有值
55
- var fillUndefined = originalNamesValue.every(function (valItem) {
56
- return valItem === undefined;
57
- });
58
- originalValue = fillUndefined ? undefined : originalNamesValue;
59
- } else {
60
- originalValue = (0, _lodash.get)(originalValueRow, originalName.slice(rowKeyPath.length - 1));
61
- }
62
- return originalValue;
63
- }
64
- // 这个方法是给editTable专用的 暂时不存在不传rowKey的情况
65
- return (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
66
- return (0, _lodash.get)(originalValues, originalName);
67
- }) : (0, _lodash.get)(originalValues, originalName);
68
- };
69
- var ListChanged = function ListChanged(props) {
70
- var name = props.name,
71
- names = props.names,
72
- namesStr = props.namesStr,
73
- _props$originalName = props.originalName,
74
- originalName = _props$originalName === void 0 ? name : _props$originalName,
75
- _props$originalNames = props.originalNames,
76
- originalNames = _props$originalNames === void 0 ? names : _props$originalNames,
77
- originalValues = props.originalValues,
78
- form = props.form,
79
- equalWith = props.equalWith,
80
- rowKeyPath = props.rowKeyPath,
81
- children = props.children,
82
- type = props.type,
83
- rest = (0, _objectWithoutProperties2.default)(props, _excluded);
84
- var namePath = toNamePath(namesStr || name);
85
- var originalNamePath = toNamePath(originalName);
86
- var originalNamePaths = originalNames && toNamePaths(originalNames);
87
- var notWatch = !originalValues || ['FormList', 'ProEditTable'].includes(type);
88
- var originalValue = !notWatch ? getOriginalValue({
89
- namePath: namePath,
90
- originalName: originalNamePath,
91
- originalNames: originalNamePaths,
92
- originalValues: originalValues,
93
- rowKeyPath: rowKeyPath,
94
- form: form
95
- }) : undefined;
96
- var noChange = !equalWith && (!originalValues || originalValue === undefined);
97
- var changed = (0, _react.useMemo)(function () {
98
- if (notWatch || noChange) return false;
99
- return (0, _diffOriginal.diffOriginal)({
100
- value: props.value,
101
- originalValue: originalValue,
102
- form: form,
103
- equalWith: equalWith
104
- // name: isString(namesStr) ? namesStr : originalName || name,
105
- });
106
- }, [props.value, originalValue]);
107
- if (notWatch || noChange) {
108
- return /*#__PURE__*/_react.default.isValidElement(children) && /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest));
109
- }
110
- return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
111
- open: changed ? undefined : false,
112
- getPopupContainer: function getPopupContainer(target) {
113
- return target.parentElement;
114
- },
115
- title: (0, _jsxRuntime.jsxs)(_antd.Space, {
116
- children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children), {}, {
117
- // @ts-ignore
118
- isView: true,
119
- value: originalValue,
120
- checked: type === 'Switch' ? originalValue : undefined
121
- })) : undefined]
122
- }),
123
- children: (0, _jsxRuntime.jsx)("div", {
124
- className: changed ? 'pro-form-item-changed' : '',
125
- children: /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest)) : undefined
126
- })
127
- });
128
- };
129
- var _default = exports.default = ListChanged;
@@ -1,14 +0,0 @@
1
- import { FormInstance } from 'antd';
2
- import { NamePath } from 'antd/lib/form/interface';
3
- import React from 'react';
4
- interface Props {
5
- name?: NamePath;
6
- names?: NamePath[];
7
- namesStr?: string;
8
- originalValues?: any;
9
- form: FormInstance;
10
- equalWith?: (preValue: any, curValue: any) => boolean | undefined;
11
- [name: string]: any;
12
- }
13
- declare const Changed: React.FC<Props>;
14
- export default Changed;
@@ -1,69 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- var _antd = require("antd");
13
- var _lodash = require("lodash");
14
- var _react = _interopRequireWildcard(require("react"));
15
- var _diffOriginal = require("../../utils/diffOriginal");
16
- var _excluded = ["name", "names", "namesStr", "originalValues", "form", "equalWith", "children", "type", "originalDiffTip"];
17
- var Changed = function Changed(props) {
18
- var name = props.name,
19
- names = props.names,
20
- namesStr = props.namesStr,
21
- originalValues = props.originalValues,
22
- form = props.form,
23
- equalWith = props.equalWith,
24
- children = props.children,
25
- type = props.type,
26
- originalDiffTip = props.originalDiffTip,
27
- rest = (0, _objectWithoutProperties2.default)(props, _excluded);
28
- // 不渲染tooltip
29
- var notWatch = !originalDiffTip || ['FormList', 'ProEditTable'].includes(type);
30
- var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
31
- return (0, _lodash.get)(originalValues, name);
32
- }) : (0, _lodash.get)(originalValues, name);
33
- var noChange = !equalWith && (!originalValues || originalValue === undefined);
34
- var changed = (0, _react.useMemo)(function () {
35
- if (notWatch || noChange) return false;
36
- return (0, _diffOriginal.diffOriginal)({
37
- originalValue: originalValue,
38
- value: props.value,
39
- form: form,
40
- equalWith: equalWith
41
- // name: namesStr || name,
42
- });
43
- }, [notWatch, noChange, props.value, originalValue]);
44
- var tipContent = (0, _react.useMemo)(function () {
45
- if (notWatch || noChange) return undefined;
46
- return /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), {}, {
47
- isView: true,
48
- value: originalValue,
49
- checked: type === 'Switch' ? originalValue : undefined
50
- })) : undefined;
51
- }, [originalValue, children]);
52
- if (notWatch || noChange) {
53
- return /*#__PURE__*/_react.default.isValidElement(children) && /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest));
54
- }
55
- return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
56
- open: changed ? undefined : false,
57
- getPopupContainer: function getPopupContainer(target) {
58
- return target.parentElement;
59
- },
60
- title: (0, _jsxRuntime.jsxs)(_antd.Space, {
61
- children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
62
- }),
63
- children: (0, _jsxRuntime.jsx)("div", {
64
- className: changed ? 'pro-form-item-changed' : '',
65
- children: /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest)) : undefined
66
- })
67
- });
68
- };
69
- var _default = exports.default = Changed;