@rc-component/tree-select 1.0.0 → 1.1.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/es/LegacyContext.d.ts +1 -1
- package/es/OptionList.d.ts +1 -1
- package/es/OptionList.js +2 -2
- package/es/TreeSelect.d.ts +2 -2
- package/es/TreeSelect.js +1 -1
- package/es/TreeSelectContext.d.ts +1 -1
- package/es/hooks/useCheckedKeys.d.ts +1 -1
- package/es/hooks/useCheckedKeys.js +1 -1
- package/es/hooks/useDataEntities.d.ts +1 -1
- package/es/hooks/useDataEntities.js +1 -1
- package/es/interface.d.ts +1 -1
- package/es/utils/strategyUtil.d.ts +1 -1
- package/lib/LegacyContext.d.ts +1 -1
- package/lib/OptionList.d.ts +1 -1
- package/lib/OptionList.js +3 -3
- package/lib/TreeSelect.d.ts +2 -2
- package/lib/TreeSelect.js +1 -1
- package/lib/TreeSelectContext.d.ts +1 -1
- package/lib/hooks/useCheckedKeys.d.ts +1 -1
- package/lib/hooks/useCheckedKeys.js +1 -1
- package/lib/hooks/useDataEntities.d.ts +1 -1
- package/lib/hooks/useDataEntities.js +1 -1
- package/lib/interface.d.ts +1 -1
- package/lib/utils/strategyUtil.d.ts +1 -1
- package/package.json +3 -3
package/es/LegacyContext.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { DataEntity, IconType } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { DataEntity, IconType } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import type { LegacyDataNode, SafeKey, Key } from './interface';
|
|
4
4
|
interface LegacyContextProps {
|
|
5
5
|
checkable: boolean | React.ReactNode;
|
package/es/OptionList.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefOptionListProps } from '@rc-component/select/lib/OptionList';
|
|
2
|
-
import type { ScrollTo } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { ScrollTo } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
type ReviseRefOptionListProps = Omit<RefOptionListProps, 'scrollTo'> & {
|
|
5
5
|
scrollTo: ScrollTo;
|
package/es/OptionList.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import { useBaseProps } from '@rc-component/select';
|
|
3
|
-
import Tree from 'rc-tree';
|
|
4
|
-
import { UnstableContext } from 'rc-tree';
|
|
3
|
+
import Tree from '@rc-component/tree';
|
|
4
|
+
import { UnstableContext } from '@rc-component/tree';
|
|
5
5
|
import KeyCode from "@rc-component/util/es/KeyCode";
|
|
6
6
|
import useMemo from "@rc-component/util/es/hooks/useMemo";
|
|
7
7
|
import * as React from 'react';
|
package/es/TreeSelect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseSelectPropsWithoutPrivate, BaseSelectRef } from '@rc-component/select';
|
|
2
|
-
import type { IconType } from 'rc-tree/lib/interface';
|
|
3
|
-
import type { ExpandAction } from 'rc-tree/lib/Tree';
|
|
2
|
+
import type { IconType } from '@rc-component/tree/lib/interface';
|
|
3
|
+
import type { ExpandAction } from '@rc-component/tree/lib/Tree';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import TreeNode from './TreeNode';
|
|
6
6
|
import type { CheckedStrategy } from './utils/strategyUtil';
|
package/es/TreeSelect.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import { BaseSelect } from '@rc-component/select';
|
|
3
3
|
import useId from "@rc-component/select/es/hooks/useId";
|
|
4
|
-
import { conductCheck } from "rc-tree/es/utils/conductUtil";
|
|
4
|
+
import { conductCheck } from "@rc-component/tree/es/utils/conductUtil";
|
|
5
5
|
import useMergedState from "@rc-component/util/es/hooks/useMergedState";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import useCache from "./hooks/useCache";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ExpandAction } from 'rc-tree/lib/Tree';
|
|
2
|
+
import type { ExpandAction } from '@rc-component/tree/lib/Tree';
|
|
3
3
|
import type { DataNode, FieldNames, Key } from './interface';
|
|
4
4
|
import type useDataEntities from './hooks/useDataEntities';
|
|
5
5
|
export interface TreeSelectContextProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import type { LabeledValueType, SafeKey } from '../interface';
|
|
4
4
|
declare const useCheckedKeys: (rawLabeledValues: LabeledValueType[], rawHalfCheckedValues: LabeledValueType[], treeConduction: boolean, keyEntities: Record<SafeKey, DataEntity>) => React.Key[][];
|
|
5
5
|
export default useCheckedKeys;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { conductCheck } from "rc-tree/es/utils/conductUtil";
|
|
2
|
+
import { conductCheck } from "@rc-component/tree/es/utils/conductUtil";
|
|
3
3
|
const useCheckedKeys = (rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities) => {
|
|
4
4
|
return React.useMemo(() => {
|
|
5
5
|
const extractValues = values => values.map(({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
1
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
2
2
|
import type { SafeKey, FieldNames } from '../interface';
|
|
3
3
|
declare const _default: (treeData: any, fieldNames: FieldNames) => {
|
|
4
4
|
valueEntities: Map<SafeKey, DataEntity>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { convertDataToEntities } from "rc-tree/es/utils/treeUtil";
|
|
2
|
+
import { convertDataToEntities } from "@rc-component/tree/es/utils/treeUtil";
|
|
3
3
|
import warning from "@rc-component/util/es/warning";
|
|
4
4
|
import { isNil } from "../utils/valueUtil";
|
|
5
5
|
export default ((treeData, fieldNames) => React.useMemo(() => {
|
package/es/interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type { SafeKey, Key, DataNode as TreeDataNode } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { SafeKey, Key, DataNode as TreeDataNode } from '@rc-component/tree/lib/interface';
|
|
3
3
|
export type { SafeKey, Key };
|
|
4
4
|
export interface DataNode extends Record<string, any>, Omit<TreeDataNode, 'key' | 'children'> {
|
|
5
5
|
key?: Key;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
1
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
2
2
|
import type { SafeKey, FieldNames } from '../interface';
|
|
3
3
|
export declare const SHOW_ALL = "SHOW_ALL";
|
|
4
4
|
export declare const SHOW_PARENT = "SHOW_PARENT";
|
package/lib/LegacyContext.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { DataEntity, IconType } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { DataEntity, IconType } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import type { LegacyDataNode, SafeKey, Key } from './interface';
|
|
4
4
|
interface LegacyContextProps {
|
|
5
5
|
checkable: boolean | React.ReactNode;
|
package/lib/OptionList.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefOptionListProps } from '@rc-component/select/lib/OptionList';
|
|
2
|
-
import type { ScrollTo } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { ScrollTo } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
type ReviseRefOptionListProps = Omit<RefOptionListProps, 'scrollTo'> & {
|
|
5
5
|
scrollTo: ScrollTo;
|
package/lib/OptionList.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _select = require("@rc-component/select");
|
|
8
|
-
var
|
|
8
|
+
var _tree = _interopRequireWildcard(require("@rc-component/tree"));
|
|
9
9
|
var _KeyCode = _interopRequireDefault(require("@rc-component/util/lib/KeyCode"));
|
|
10
10
|
var _useMemo = _interopRequireDefault(require("@rc-component/util/lib/hooks/useMemo"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -311,11 +311,11 @@ const OptionList = (_, ref) => {
|
|
|
311
311
|
}, activeEntity && open && /*#__PURE__*/React.createElement("span", {
|
|
312
312
|
style: HIDDEN_STYLE,
|
|
313
313
|
"aria-live": "assertive"
|
|
314
|
-
}, activeEntity.node.value), /*#__PURE__*/React.createElement(
|
|
314
|
+
}, activeEntity.node.value), /*#__PURE__*/React.createElement(_tree.UnstableContext.Provider, {
|
|
315
315
|
value: {
|
|
316
316
|
nodeDisabled
|
|
317
317
|
}
|
|
318
|
-
}, /*#__PURE__*/React.createElement(
|
|
318
|
+
}, /*#__PURE__*/React.createElement(_tree.default, _extends({
|
|
319
319
|
ref: treeRef,
|
|
320
320
|
focusable: false,
|
|
321
321
|
prefixCls: `${prefixCls}-tree`,
|
package/lib/TreeSelect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseSelectPropsWithoutPrivate, BaseSelectRef } from '@rc-component/select';
|
|
2
|
-
import type { IconType } from 'rc-tree/lib/interface';
|
|
3
|
-
import type { ExpandAction } from 'rc-tree/lib/Tree';
|
|
2
|
+
import type { IconType } from '@rc-component/tree/lib/interface';
|
|
3
|
+
import type { ExpandAction } from '@rc-component/tree/lib/Tree';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import TreeNode from './TreeNode';
|
|
6
6
|
import type { CheckedStrategy } from './utils/strategyUtil';
|
package/lib/TreeSelect.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _select = require("@rc-component/select");
|
|
8
8
|
var _useId = _interopRequireDefault(require("@rc-component/select/lib/hooks/useId"));
|
|
9
|
-
var _conductUtil = require("rc-tree/lib/utils/conductUtil");
|
|
9
|
+
var _conductUtil = require("@rc-component/tree/lib/utils/conductUtil");
|
|
10
10
|
var _useMergedState = _interopRequireDefault(require("@rc-component/util/lib/hooks/useMergedState"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _useCache = _interopRequireDefault(require("./hooks/useCache"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ExpandAction } from 'rc-tree/lib/Tree';
|
|
2
|
+
import type { ExpandAction } from '@rc-component/tree/lib/Tree';
|
|
3
3
|
import type { DataNode, FieldNames, Key } from './interface';
|
|
4
4
|
import type useDataEntities from './hooks/useDataEntities';
|
|
5
5
|
export interface TreeSelectContextProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
3
3
|
import type { LabeledValueType, SafeKey } from '../interface';
|
|
4
4
|
declare const useCheckedKeys: (rawLabeledValues: LabeledValueType[], rawHalfCheckedValues: LabeledValueType[], treeConduction: boolean, keyEntities: Record<SafeKey, DataEntity>) => React.Key[][];
|
|
5
5
|
export default useCheckedKeys;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _conductUtil = require("rc-tree/lib/utils/conductUtil");
|
|
8
|
+
var _conductUtil = require("@rc-component/tree/lib/utils/conductUtil");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
const useCheckedKeys = (rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
1
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
2
2
|
import type { SafeKey, FieldNames } from '../interface';
|
|
3
3
|
declare const _default: (treeData: any, fieldNames: FieldNames) => {
|
|
4
4
|
valueEntities: Map<SafeKey, DataEntity>;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _treeUtil = require("rc-tree/lib/utils/treeUtil");
|
|
8
|
+
var _treeUtil = require("@rc-component/tree/lib/utils/treeUtil");
|
|
9
9
|
var _warning = _interopRequireDefault(require("@rc-component/util/lib/warning"));
|
|
10
10
|
var _valueUtil = require("../utils/valueUtil");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type { SafeKey, Key, DataNode as TreeDataNode } from 'rc-tree/lib/interface';
|
|
2
|
+
import type { SafeKey, Key, DataNode as TreeDataNode } from '@rc-component/tree/lib/interface';
|
|
3
3
|
export type { SafeKey, Key };
|
|
4
4
|
export interface DataNode extends Record<string, any>, Omit<TreeDataNode, 'key' | 'children'> {
|
|
5
5
|
key?: Key;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataEntity } from 'rc-tree/lib/interface';
|
|
1
|
+
import type { DataEntity } from '@rc-component/tree/lib/interface';
|
|
2
2
|
import type { SafeKey, FieldNames } from '../interface';
|
|
3
3
|
export declare const SHOW_ALL = "SHOW_ALL";
|
|
4
4
|
export declare const SHOW_PARENT = "SHOW_PARENT";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rc-component/tree-select",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "tree-select ui component for react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"classnames": "2.x",
|
|
48
48
|
"@rc-component/select": "~1.0.0",
|
|
49
|
-
"rc-tree": "~
|
|
49
|
+
"@rc-component/tree": "~1.0.0",
|
|
50
50
|
"@rc-component/util": "^1.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"husky": "^9.1.6",
|
|
75
75
|
"lint-staged": "^15.2.10",
|
|
76
76
|
"prettier": "^3.3.3",
|
|
77
|
-
"rc-dialog": "^
|
|
77
|
+
"@rc-component/dialog": "^1.2.0",
|
|
78
78
|
"rc-field-form": "^2.4.0",
|
|
79
79
|
"rc-test": "^7.1.1",
|
|
80
80
|
"rc-virtual-list": "^3.14.8",
|