@aloudata/aloudata-design 2.11.0 → 2.12.0
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/dist/ColorPicker/index.js +8 -4
- package/dist/ConfigProvider/defaultRenderEmpty.js +4 -2
- package/dist/ConfigProvider/index.js +9 -1
- package/dist/DataPreviewTable/components/Body/Error.js +6 -2
- package/dist/DataPreviewTable/index.js +6 -2
- package/dist/DoubleCircleIcon/index.d.ts +1 -1
- package/dist/Empty/index.js +5 -1
- package/dist/HighlightText/index.js +2 -1
- package/dist/InputSearch/index.js +6 -2
- package/dist/List/Item.js +2 -1
- package/dist/MemberPicker/components/MemberSelection.js +6 -2
- package/dist/MemberPicker/components/MultipleOption.js +6 -2
- package/dist/MemberPicker/components/Panel.js +8 -4
- package/dist/MemberPicker/components/PanelWrapper.d.ts +1 -1
- package/dist/MemberPicker/components/PanelWrapper.js +10 -6
- package/dist/MemberPicker/components/SelectedMemberTags.js +6 -2
- package/dist/MemberPicker/components/SelectorFooter.js +7 -3
- package/dist/MemberPicker/components/SingleOption.js +6 -2
- package/dist/MemberPicker/components/UserGroupSelection.js +7 -3
- package/dist/MemberPicker/index.js +35 -31
- package/dist/Modal/index.js +17 -23
- package/dist/OverflowCount/style/index.less +1 -0
- package/dist/Radio/components/Group/index.d.ts +1 -1
- package/dist/Select/index.js +6 -2
- package/dist/Steps/matchMedia.mock.d.ts +1 -0
- package/dist/Steps/matchMedia.mock.js +7 -6
- package/dist/Table/components/ErrorBoundary.d.ts +1 -0
- package/dist/Table/components/ErrorBoundary.js +8 -3
- package/dist/Table/components/Footer/index.js +9 -5
- package/dist/Tree/Tree.js +9 -5
- package/dist/ald.min.css +1 -1
- package/dist/locale/default.d.ts +59 -2
- package/dist/locale/default.js +18 -2
- package/dist/locale/en_US.d.ts +49 -2
- package/dist/locale/en_US.js +41 -121
- package/dist/locale/zh_CN.d.ts +49 -2
- package/dist/locale/zh_CN.js +41 -120
- package/dist/message/index.js +3 -1
- package/dist/notification/index.js +10 -7
- package/package.json +7 -1
- package/dist/Modal/locale.d.ts +0 -7
- package/dist/Modal/locale.js +0 -18
- package/dist/locale-provider/LocaleReceiver.d.ts +0 -4
- package/dist/locale-provider/LocaleReceiver.js +0 -3
- package/dist/locale-provider/context.d.ts +0 -7
- package/dist/locale-provider/context.js +0 -3
- package/dist/locale-provider/default.d.ts +0 -2
- package/dist/locale-provider/default.js +0 -2
- package/dist/locale-provider/en_US.d.ts +0 -2
- package/dist/locale-provider/en_US.js +0 -2
- package/dist/locale-provider/index.d.ts +0 -65
- package/dist/locale-provider/index.js +0 -80
- package/dist/locale-provider/style/index.d.ts +0 -1
- package/dist/locale-provider/style/index.js +0 -1
- package/dist/locale-provider/style/index.less +0 -2
- package/dist/locale-provider/zh_CN.d.ts +0 -2
- package/dist/locale-provider/zh_CN.js +0 -2
package/dist/Modal/index.js
CHANGED
|
@@ -18,10 +18,11 @@ import { Modal as AntdModal } from 'antd';
|
|
|
18
18
|
import { modalGlobalConfig } from 'antd/lib/modal/confirm';
|
|
19
19
|
import useModal from 'antd/lib/modal/useModal/index';
|
|
20
20
|
import classNames from 'classnames';
|
|
21
|
-
import React, { useMemo } from 'react';
|
|
21
|
+
import React, { useContext, useMemo } from 'react';
|
|
22
22
|
import { btnPrefix, getButtonSizeClass, getButtonType, getDangerStatus, getShape } from "../Button";
|
|
23
23
|
import { AttentionTriangleLightLine, CheckCircleLightLine, CloseLLine, InformationCircleLightLine } from "../Icon";
|
|
24
24
|
import IconButton from "../IconButton";
|
|
25
|
+
import { getTranslator, LocaleContext } from "../locale/default";
|
|
25
26
|
import ScrollArea from "../ScrollArea";
|
|
26
27
|
|
|
27
28
|
// export type { ModalProps, ModalFuncProps };
|
|
@@ -89,6 +90,9 @@ function getIcon(type) {
|
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
var OriginModal = function OriginModal(props) {
|
|
93
|
+
var _useContext = useContext(LocaleContext),
|
|
94
|
+
locale = _useContext.locale;
|
|
95
|
+
var t = getTranslator(locale);
|
|
92
96
|
var className = props.className,
|
|
93
97
|
children = props.children,
|
|
94
98
|
okType = props.okType,
|
|
@@ -100,9 +104,9 @@ var OriginModal = function OriginModal(props) {
|
|
|
100
104
|
_props$cancelButtonPr = props.cancelButtonProps,
|
|
101
105
|
cancelButtonProps = _props$cancelButtonPr === void 0 ? {} : _props$cancelButtonPr,
|
|
102
106
|
_props$okText = props.okText,
|
|
103
|
-
okText = _props$okText === void 0 ?
|
|
107
|
+
okText = _props$okText === void 0 ? t.Modal.sure : _props$okText,
|
|
104
108
|
_props$cancelText = props.cancelText,
|
|
105
|
-
cancelText = _props$cancelText === void 0 ?
|
|
109
|
+
cancelText = _props$cancelText === void 0 ? t.Modal.cancel : _props$cancelText,
|
|
106
110
|
icon = props.icon,
|
|
107
111
|
title = props.title,
|
|
108
112
|
paddingLess = props.paddingLess,
|
|
@@ -176,10 +180,8 @@ Modal.info = function infoFn(props) {
|
|
|
176
180
|
width = props.width,
|
|
177
181
|
title = props.title,
|
|
178
182
|
subTitle = props.subTitle,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
_props$cancelText2 = props.cancelText,
|
|
182
|
-
cancelText = _props$cancelText2 === void 0 ? '取消' : _props$cancelText2,
|
|
183
|
+
okText = props.okText,
|
|
184
|
+
cancelText = props.cancelText,
|
|
183
185
|
className = props.className,
|
|
184
186
|
restProps = _objectWithoutProperties(props, _excluded3);
|
|
185
187
|
return AntdModal.info(_objectSpread({
|
|
@@ -208,10 +210,8 @@ Modal.success = function successFn(props) {
|
|
|
208
210
|
width = props.width,
|
|
209
211
|
title = props.title,
|
|
210
212
|
subTitle = props.subTitle,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
_props$cancelText3 = props.cancelText,
|
|
214
|
-
cancelText = _props$cancelText3 === void 0 ? '取消' : _props$cancelText3,
|
|
213
|
+
okText = props.okText,
|
|
214
|
+
cancelText = props.cancelText,
|
|
215
215
|
className = props.className,
|
|
216
216
|
restProps = _objectWithoutProperties(props, _excluded4);
|
|
217
217
|
return AntdModal.success(_objectSpread({
|
|
@@ -241,10 +241,8 @@ Modal.error = function errorFn(props) {
|
|
|
241
241
|
width = props.width,
|
|
242
242
|
title = props.title,
|
|
243
243
|
subTitle = props.subTitle,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
_props$cancelText4 = props.cancelText,
|
|
247
|
-
cancelText = _props$cancelText4 === void 0 ? '取消' : _props$cancelText4,
|
|
244
|
+
okText = props.okText,
|
|
245
|
+
cancelText = props.cancelText,
|
|
248
246
|
className = props.className,
|
|
249
247
|
restProps = _objectWithoutProperties(props, _excluded5);
|
|
250
248
|
return AntdModal.error(_objectSpread({
|
|
@@ -274,10 +272,8 @@ Modal.warning = function modalWarn(props) {
|
|
|
274
272
|
width = props.width,
|
|
275
273
|
title = props.title,
|
|
276
274
|
subTitle = props.subTitle,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
_props$cancelText5 = props.cancelText,
|
|
280
|
-
cancelText = _props$cancelText5 === void 0 ? '取消' : _props$cancelText5,
|
|
275
|
+
okText = props.okText,
|
|
276
|
+
cancelText = props.cancelText,
|
|
281
277
|
className = props.className,
|
|
282
278
|
restProps = _objectWithoutProperties(props, _excluded6);
|
|
283
279
|
return AntdModal.warning(_objectSpread({
|
|
@@ -308,10 +304,8 @@ Modal.confirm = function confirmFn(props) {
|
|
|
308
304
|
title = props.title,
|
|
309
305
|
subTitle = props.subTitle,
|
|
310
306
|
className = props.className,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
_props$cancelText6 = props.cancelText,
|
|
314
|
-
cancelText = _props$cancelText6 === void 0 ? '取消' : _props$cancelText6,
|
|
307
|
+
okText = props.okText,
|
|
308
|
+
cancelText = props.cancelText,
|
|
315
309
|
_props$type = props.type,
|
|
316
310
|
type = _props$type === void 0 ? 'confirm' : _props$type,
|
|
317
311
|
restProps = _objectWithoutProperties(props, _excluded7);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IRadioGroupProps } from '../../interface/radioGroup';
|
|
3
|
-
export declare const RadioGroupContext: React.Context<Omit<IRadioGroupProps, "
|
|
3
|
+
export declare const RadioGroupContext: React.Context<Omit<IRadioGroupProps, "children" | "className">>;
|
|
4
4
|
export default function RadioGroup(props: IRadioGroupProps): React.JSX.Element;
|
package/dist/Select/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { ConfigContext } from "../ConfigProvider";
|
|
|
30
30
|
import SizeContext from "../ConfigProvider/sizeContext";
|
|
31
31
|
import Empty from "../Empty";
|
|
32
32
|
import { ArrowDownFill, TimesLightLine } from "../Icon";
|
|
33
|
+
import { LocaleContext, getTranslator } from "../locale/default";
|
|
33
34
|
import Option from "./components/Option";
|
|
34
35
|
var defaultDropdownStyle = {
|
|
35
36
|
minWidth: 192
|
|
@@ -72,6 +73,9 @@ var getSelectedOptionsFromValue = function getSelectedOptionsFromValue(isMultipl
|
|
|
72
73
|
};
|
|
73
74
|
var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
74
75
|
var _classNames;
|
|
76
|
+
var _useContext = useContext(LocaleContext),
|
|
77
|
+
locale = _useContext.locale;
|
|
78
|
+
var t = getTranslator(locale);
|
|
75
79
|
var mode = props.mode,
|
|
76
80
|
options = props.options,
|
|
77
81
|
dropdownRender = props.dropdownRender,
|
|
@@ -89,7 +93,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
89
93
|
notFoundContent = _props$notFoundConten === void 0 ? /*#__PURE__*/React.createElement(Empty, {
|
|
90
94
|
image: Empty.PRESENTED_IMAGE_SEARCH_SMALL,
|
|
91
95
|
size: "small",
|
|
92
|
-
title:
|
|
96
|
+
title: t.Select.noSearchResult
|
|
93
97
|
}) : _props$notFoundConten,
|
|
94
98
|
value = props.value,
|
|
95
99
|
_props$type = props.type,
|
|
@@ -110,7 +114,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
110
114
|
_props$showArrow = props.showArrow,
|
|
111
115
|
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
|
|
112
116
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
113
|
-
var placeholder = type === 'primary' ?
|
|
117
|
+
var placeholder = type === 'primary' ? t.Select.all : propsPlaceholder;
|
|
114
118
|
var contentSize = useContext(SizeContext);
|
|
115
119
|
var _React$useContext = React.useContext(ConfigContext),
|
|
116
120
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { vitest } from 'vitest';
|
|
1
2
|
Object.defineProperty(window, 'matchMedia', {
|
|
2
3
|
writable: true,
|
|
3
|
-
value:
|
|
4
|
+
value: vitest.fn().mockImplementation(function (query) {
|
|
4
5
|
return {
|
|
5
6
|
matches: false,
|
|
6
7
|
media: query,
|
|
7
8
|
onchange: null,
|
|
8
|
-
addListener:
|
|
9
|
+
addListener: vitest.fn(),
|
|
9
10
|
// deprecated
|
|
10
|
-
removeListener:
|
|
11
|
+
removeListener: vitest.fn(),
|
|
11
12
|
// deprecated
|
|
12
|
-
addEventListener:
|
|
13
|
-
removeEventListener:
|
|
14
|
-
dispatchEvent:
|
|
13
|
+
addEventListener: vitest.fn(),
|
|
14
|
+
removeEventListener: vitest.fn(),
|
|
15
|
+
dispatchEvent: vitest.fn()
|
|
15
16
|
};
|
|
16
17
|
})
|
|
17
18
|
});
|
|
@@ -7,6 +7,7 @@ interface ErrorBoundaryState {
|
|
|
7
7
|
hasError: boolean;
|
|
8
8
|
}
|
|
9
9
|
export default class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
10
|
+
static contextType: React.Context<import("antd/lib/locale").Locale>;
|
|
10
11
|
constructor(props: ErrorBoundaryProps);
|
|
11
12
|
static getDerivedStateFromError(): ErrorBoundaryState;
|
|
12
13
|
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
@@ -2,8 +2,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
5
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
6
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -11,6 +9,10 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
|
11
9
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
11
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
import { LocaleContext, getTranslator } from "../../locale/default";
|
|
14
16
|
import React from 'react';
|
|
15
17
|
import { prefixCls } from "../helper";
|
|
16
18
|
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
@@ -34,11 +36,13 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
34
36
|
}, {
|
|
35
37
|
key: "render",
|
|
36
38
|
value: function render() {
|
|
39
|
+
var locale = this.context.locale;
|
|
40
|
+
var t = getTranslator(locale);
|
|
37
41
|
if (this.state.hasError) {
|
|
38
42
|
// 你可以渲染任何自定义后备 UI
|
|
39
43
|
return /*#__PURE__*/React.createElement("div", {
|
|
40
44
|
className: prefixCls('td-default')
|
|
41
|
-
},
|
|
45
|
+
}, t.ErrorBoundary.happenedError);
|
|
42
46
|
}
|
|
43
47
|
return this.props.children;
|
|
44
48
|
}
|
|
@@ -53,4 +57,5 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
53
57
|
}]);
|
|
54
58
|
return ErrorBoundary;
|
|
55
59
|
}(React.Component);
|
|
60
|
+
_defineProperty(ErrorBoundary, "contextType", LocaleContext);
|
|
56
61
|
export { ErrorBoundary as default };
|
|
@@ -5,11 +5,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
5
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
-
import React, { useCallback } from 'react';
|
|
8
|
+
import React, { useCallback, useContext } from 'react';
|
|
9
9
|
import { Pagination } from "../../..";
|
|
10
10
|
import TextLink from "../../../TextLink";
|
|
11
|
+
import { LocaleContext, getTranslator } from "../../../locale/default";
|
|
11
12
|
import { prefixCls } from "../../helper";
|
|
12
13
|
export default function TableFooter(props) {
|
|
14
|
+
var _useContext = useContext(LocaleContext),
|
|
15
|
+
locale = _useContext.locale;
|
|
16
|
+
var t = getTranslator(locale);
|
|
13
17
|
var pagination = props.pagination,
|
|
14
18
|
_props$scroll = props.scroll,
|
|
15
19
|
scroll = _props$scroll === void 0 ? {} : _props$scroll,
|
|
@@ -25,7 +29,7 @@ export default function TableFooter(props) {
|
|
|
25
29
|
changeSelectedRowKeys = rowSelectionInfo.onChange;
|
|
26
30
|
var btnItems = [{
|
|
27
31
|
key: '$UN_SELECT_ALL$',
|
|
28
|
-
label:
|
|
32
|
+
label: t.Table.cancelSelect,
|
|
29
33
|
onClick: function onClick(e) {
|
|
30
34
|
return rowSelectionInfo.unSelectAll(e);
|
|
31
35
|
}
|
|
@@ -34,11 +38,11 @@ export default function TableFooter(props) {
|
|
|
34
38
|
className: prefixCls('footer-row-selection')
|
|
35
39
|
}, /*#__PURE__*/React.createElement("div", {
|
|
36
40
|
className: prefixCls('footer-row-selection-btn')
|
|
37
|
-
}, getCheckboxAllNode === null || getCheckboxAllNode === void 0 ? void 0 : getCheckboxAllNode(
|
|
41
|
+
}, getCheckboxAllNode === null || getCheckboxAllNode === void 0 ? void 0 : getCheckboxAllNode(t.Table.selectAll)), /*#__PURE__*/React.createElement("div", {
|
|
38
42
|
className: prefixCls('footer-row-selection-selected')
|
|
39
|
-
},
|
|
43
|
+
}, t.Table.selected, /*#__PURE__*/React.createElement(TextLink, {
|
|
40
44
|
className: prefixCls('footer-row-selection-selected-num')
|
|
41
|
-
}, selectedRowKeys.length),
|
|
45
|
+
}, selectedRowKeys.length), t.Table.item), btnItems.map(function (btnItem) {
|
|
42
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
47
|
key: btnItem.key,
|
|
44
48
|
className: prefixCls('footer-row-selection-item'),
|
package/dist/Tree/Tree.js
CHANGED
|
@@ -20,6 +20,7 @@ import { ConfigContext } from "../ConfigProvider";
|
|
|
20
20
|
import HighlightText from "../HighlightText";
|
|
21
21
|
import { ArrowRightLightLine, DragLine } from "../Icon";
|
|
22
22
|
import collapseMotion from "../_utils/motion";
|
|
23
|
+
import { LocaleContext, getTranslator } from "../locale/default";
|
|
23
24
|
import dropIndicatorRender from "./utils/dropIndicator";
|
|
24
25
|
import renderSwitcherIcon from "./utils/iconUtil";
|
|
25
26
|
var TREE_SWITCH_CION_SIZE = 16;
|
|
@@ -29,10 +30,13 @@ var NODE_DISABLE_CLASS_NAME = 'ald-tree-node-disabled';
|
|
|
29
30
|
|
|
30
31
|
var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
31
32
|
var _classNames;
|
|
32
|
-
var _React$useContext = React.useContext(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
var _React$useContext = React.useContext(LocaleContext),
|
|
34
|
+
locale = _React$useContext.locale;
|
|
35
|
+
var t = getTranslator(locale);
|
|
36
|
+
var _React$useContext2 = React.useContext(ConfigContext),
|
|
37
|
+
getPrefixCls = _React$useContext2.getPrefixCls,
|
|
38
|
+
direction = _React$useContext2.direction,
|
|
39
|
+
virtual = _React$useContext2.virtual;
|
|
36
40
|
var size = props.size || 'large';
|
|
37
41
|
var className = props.className,
|
|
38
42
|
_props$showIcon = props.showIcon,
|
|
@@ -193,7 +197,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
193
197
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderIndent(nodeProps), renderSwitcherIcon(prefixCls, /*#__PURE__*/React.createElement(ArrowRightLightLine, {
|
|
194
198
|
size: TREE_SWITCH_CION_SIZE,
|
|
195
199
|
color: '#9CA3AF'
|
|
196
|
-
},
|
|
200
|
+
}, t.Tree.expand), showLine, nodeProps, TREE_SWITCH_CION_SIZE));
|
|
197
201
|
},
|
|
198
202
|
draggable: draggableConfig
|
|
199
203
|
}), children);
|