@zat-design/sisyphus-react 3.13.23 → 3.14.0-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.
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +8 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +39 -28
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +96 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.js +61 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +14 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +26 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +93 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +357 -0
- package/es/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/es/ProLayout/components/TabsManager/index.js +171 -0
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/es/ProLayout/components/TabsManager/propTypes.js +16 -0
- package/es/ProLayout/components/TabsManager/style/index.less +179 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/es/ProLayout/components/TabsManager/utils/index.js +106 -0
- package/es/ProLayout/index.d.ts +10 -4
- package/es/ProLayout/index.js +82 -9
- package/es/ProLayout/propTypes.d.ts +139 -1
- package/es/ProLayout/propTypes.js +37 -1
- package/es/ProUpload/components/DragRender.d.ts +1 -0
- package/es/ProUpload/components/DragRender.js +5 -1
- package/es/ProUpload/index.js +4 -2
- package/es/ProUpload/propsType.d.ts +5 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +8 -4
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +39 -28
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +103 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.js +67 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.js +11 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +20 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +101 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +364 -0
- package/lib/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/lib/ProLayout/components/TabsManager/index.js +175 -0
- package/lib/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/lib/ProLayout/components/TabsManager/propTypes.js +22 -0
- package/lib/ProLayout/components/TabsManager/style/index.less +179 -0
- package/lib/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/lib/ProLayout/components/TabsManager/utils/index.js +119 -0
- package/lib/ProLayout/index.d.ts +10 -4
- package/lib/ProLayout/index.js +94 -8
- package/lib/ProLayout/propTypes.d.ts +139 -1
- package/lib/ProLayout/propTypes.js +40 -1
- package/lib/ProUpload/components/DragRender.d.ts +1 -0
- package/lib/ProUpload/components/DragRender.js +5 -1
- package/lib/ProUpload/index.js +4 -2
- package/lib/ProUpload/propsType.d.ts +5 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +9 -2
- package/package.json +1 -1
|
@@ -2,4 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.validateTabsProps = exports.isTabsMode = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @description 主题枚举类型
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @description 是否带有菜单界面的配置
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// 为了向后兼容,保留旧的类型名称但使用新的类型定义
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @description 添加标签页的业务参数
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @description 添加标签页的选项
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @description 获取标签页信息返回值
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description ProLayout 标签页实例接口(类似 FormInstance)
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
var isTabsMode = props => props.mode === 'tabs';
|
|
34
|
+
exports.isTabsMode = isTabsMode;
|
|
35
|
+
var validateTabsProps = exports.validateTabsProps = function validateTabsProps() {
|
|
36
|
+
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
37
|
+
var tabs = arguments.length > 1 ? arguments[1] : undefined;
|
|
38
|
+
if (mode === 'tabs' && !tabs) {
|
|
39
|
+
throw new Error('ProLayout: tabs configuration is required when mode="tabs",例如 <ProLayout mode="tabs" tabs={{ max: 10 }} />');
|
|
40
|
+
}
|
|
41
|
+
if (mode !== 'tabs' && tabs) {
|
|
42
|
+
console.warn('ProLayout: tabs configuration is ignored because mode is not "tabs"');
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -32,7 +32,8 @@ var DragRender = props => {
|
|
|
32
32
|
extExt = props.extExt,
|
|
33
33
|
maxCount = props.maxCount,
|
|
34
34
|
setFileList = props.setFileList,
|
|
35
|
-
onChange = props.onChange
|
|
35
|
+
onChange = props.onChange,
|
|
36
|
+
customTextRender = props.customTextRender;
|
|
36
37
|
var refReSelect = (0, _react.useRef)();
|
|
37
38
|
|
|
38
39
|
// if (isView) return <>-</>;
|
|
@@ -151,6 +152,9 @@ var DragRender = props => {
|
|
|
151
152
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
152
153
|
className: "file-ext",
|
|
153
154
|
children: [_locale.default === null || _locale.default === void 0 || (_locale$ProUpload5 = _locale.default.ProUpload) === null || _locale$ProUpload5 === void 0 ? void 0 : _locale$ProUpload5.draggerFileExt, "\uFF1A", extExt.length > 0 ? extExt.join('、') : `${_locale.default === null || _locale.default === void 0 || (_locale$ProUpload6 = _locale.default.ProUpload) === null || _locale$ProUpload6 === void 0 ? void 0 : _locale$ProUpload6.draggerLimitless}`]
|
|
155
|
+
}), customTextRender && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
156
|
+
className: "file-ext",
|
|
157
|
+
children: customTextRender
|
|
154
158
|
})]
|
|
155
159
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
156
160
|
className: "dragger-file-show",
|
package/lib/ProUpload/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var _ImageRender = _interopRequireDefault(require("./components/ImageRender"));
|
|
|
22
22
|
var _uitls = require("./uitls");
|
|
23
23
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "centerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames", "isConfirmDelete"];
|
|
25
|
+
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "centerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames", "isConfirmDelete", "customTextRender"];
|
|
26
26
|
var defaultCustomRequest = option => option.onSuccess();
|
|
27
27
|
var ProUpload = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
28
28
|
var _locale$ProUpload;
|
|
@@ -72,6 +72,7 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
72
72
|
afterRender = props.afterRender,
|
|
73
73
|
fieldNames = props.fieldNames,
|
|
74
74
|
isConfirmDelete = props.isConfirmDelete,
|
|
75
|
+
customTextRender = props.customTextRender,
|
|
75
76
|
residueProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
76
77
|
var isView = (props === null || props === void 0 ? void 0 : props.isView) || (otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView);
|
|
77
78
|
var sensor = (0, _core.useSensor)(_core.PointerSensor, {
|
|
@@ -266,7 +267,8 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
266
267
|
buttonText,
|
|
267
268
|
extraTipText,
|
|
268
269
|
afterRender,
|
|
269
|
-
isConfirmDelete
|
|
270
|
+
isConfirmDelete,
|
|
271
|
+
customTextRender
|
|
270
272
|
};
|
|
271
273
|
(0, _react.useEffect)(() => {
|
|
272
274
|
if (fieldNames && value.length > 0) {
|
|
@@ -72,6 +72,11 @@ export interface ProUploadType {
|
|
|
72
72
|
* @default -
|
|
73
73
|
*/
|
|
74
74
|
centerRender?: React.ReactNode | (() => React.ReactNode);
|
|
75
|
+
/**
|
|
76
|
+
* @description 自定义上传区域的文案
|
|
77
|
+
* @default -
|
|
78
|
+
*/
|
|
79
|
+
customTextRender?: React.ReactNode;
|
|
75
80
|
/**
|
|
76
81
|
* @description 是否显示示例弹窗
|
|
77
82
|
* @default false
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="typings" />
|
|
2
|
-
export { default as ProLayout } from './ProLayout';
|
|
2
|
+
export { default as ProLayout, useProLayoutTabs } from './ProLayout';
|
|
3
3
|
export { default as ProStep } from './ProStep';
|
|
4
4
|
export { default as ProTabs } from './ProTabs';
|
|
5
5
|
export { default as ProTable } from './ProTable';
|
|
@@ -33,6 +33,7 @@ export type { ProTableType, ProTableColumnType, ProTableSummaryType, ProTableUse
|
|
|
33
33
|
export type { ProUploadType, ProUploadProps } from './ProUpload/propsType';
|
|
34
34
|
export type { ProTabsType, ProTabsItemType, ProTabsProps, ProTabsItemsProps } from './ProTabs/propType';
|
|
35
35
|
export type { BreadcrumbColumnType, SubDescribeColumnType, DescribeColumnType, ProHeaderType, ProHeaderProps, BreadcrumbColumnsProps, SubDescribeColumnsProps, DescribeColumnsProps } from './ProLayout/components/ProHeader/PropTypes';
|
|
36
|
+
export type { ProLayoutTabsInstance, AddTabParams, AddTabOptions } from './ProLayout/propTypes';
|
|
36
37
|
export type { ProTooltipType, ProTooltipProps } from './ProTooltip/propsType';
|
|
37
38
|
export type { ProIconType, ProIconProps } from './ProIcon/propsTypes';
|
|
38
39
|
export type { ProTreeType, ProTreeSelectType, ProTreeProps, PropTreeSelectProps } from './ProTree/propsType';
|
package/lib/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
var _exportNames = {
|
|
9
9
|
ProLayout: true,
|
|
10
|
+
useProLayoutTabs: true,
|
|
10
11
|
ProStep: true,
|
|
11
12
|
ProTabs: true,
|
|
12
13
|
ProTable: true,
|
|
@@ -182,7 +183,13 @@ Object.defineProperty(exports, "ProWaterMark", {
|
|
|
182
183
|
return _ProWaterMark.default;
|
|
183
184
|
}
|
|
184
185
|
});
|
|
185
|
-
|
|
186
|
+
Object.defineProperty(exports, "useProLayoutTabs", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function get() {
|
|
189
|
+
return _ProLayout.useProLayoutTabs;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
var _ProLayout = _interopRequireWildcard(require("./ProLayout"));
|
|
186
193
|
var _ProStep = _interopRequireDefault(require("./ProStep"));
|
|
187
194
|
var _ProTabs = _interopRequireDefault(require("./ProTabs"));
|
|
188
195
|
var _ProTable = _interopRequireDefault(require("./ProTable"));
|