@baishuyun/ui-business 6.1.0 → 6.2.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/BubbleChart/{AutoGridEChart-CJVgpqeo.js → AutoGridEChart-VA8BTIj4.js} +2 -2
- package/dist/BubbleChart/{BubbleChart-CavI9Qnb.js → BubbleChart-CGLJJHYy.js} +23 -14
- package/dist/BubbleChart/index.js +2 -2
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DeptsMemberSelector/CorpDeptMemberList-CStcWBzB.js +102 -0
- package/dist/DeptsMemberSelector/CorpDeptTree-B4EEUTqQ.js +51 -0
- package/dist/DeptsMemberSelector/CorpFlatList-Cn8-KRFi.js +86 -0
- package/dist/DeptsMemberSelector/CorpLabelTree-iQ_7Ux_J.js +212 -0
- package/dist/DeptsMemberSelector/{Department-lQJcetBA.js → Department-DXD3xoiS.js} +15 -14
- package/dist/DeptsMemberSelector/DeptsMemberSelector-DXpd9aCn.js +1935 -0
- package/dist/DeptsMemberSelector/DeptsUser-DO-SQexg.js +1317 -0
- package/dist/DeptsMemberSelector/EnterpriseLabelList-BtB8AjXO.js +85 -0
- package/dist/DeptsMemberSelector/{Member-K4kgwY7b.js → Member-BrNFIHZy.js} +234 -238
- package/dist/DeptsMemberSelector/OrganizationPanel-hray3UWA.js +671 -0
- package/dist/DeptsMemberSelector/{RelationShipList-DkF9XivU.js → RelationShipList-DcgaMOyr.js} +1 -1
- package/dist/DeptsMemberSelector/TagIcon-CYklI9Ar.js +259 -0
- package/dist/DeptsMemberSelector/filterLabelCorpFlatNodes-BrRZqDkm.js +36 -0
- package/dist/DeptsMemberSelector/index.js +20 -11
- package/dist/DeptsMemberSelector/services/contact/{selector.service-BUQcY5DZ.js → selector.service-CQopqiTw.js} +86 -60
- package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +8 -4
- package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +15 -6
- package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +7 -4
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptMemberList/index.d.ts +4 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptMemberList/index.js +5 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptTree/index.d.ts +4 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptTree/index.js +6 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpFlatList/index.d.ts +4 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpFlatList/index.js +5 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpLabelTree/index.d.ts +4 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpLabelTree/index.js +9 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/EnterpriseLabelList/index.d.ts +4 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/EnterpriseLabelList/index.js +5 -0
- package/dist/DeptsMemberSelector/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +2 -2
- package/dist/DeptsMemberSelector/{useDeptsMemberSelector-CHK0U3R4.js → useDeptsMemberSelector-B6XZHqd5.js} +11 -3
- package/dist/DeptsMemberSelector/useFilteredMemberList-BE7jRCME.js +807 -0
- package/dist/DeptsMemberSelector/useOutsiderGroupPanelState-BULTXv3n.js +205 -0
- package/dist/DeptsMemberSelector/useTreeExpandedKeys-oLUTUYkP.js +45 -0
- package/dist/DeptsMemberSelector/utils/index.js +1 -1
- package/dist/DeptsMemberSelector/{utils-BVfGpRu5.js → utils-Bb473LZ3.js} +21 -19
- package/dist/Scatterplot/{Scatterplot-D4GhWpFa.js → Scatterplot-R66_f3TZ.js} +6 -4
- package/dist/Scatterplot/index.js +2 -2
- package/dist/components/DeptsMemberSelector/context/DeptsMemberContext.d.ts +5 -2
- package/dist/components/DeptsMemberSelector/hooks/useDeptsMemberSelector.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/hooks/useFilteredMemberList.d.ts +6 -0
- package/dist/components/DeptsMemberSelector/hooks/useTabListScrollOffset.d.ts +18 -0
- package/dist/components/DeptsMemberSelector/hooks/useTreeExpandedKeys.d.ts +9 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Entity/DeptsUser/DeptUsersSearch/DeptUsersSearch.d.ts +5 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Entity/DeptsUser/DeptUsersSearch/useDeptUsersSearchData.d.ts +19 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Entity/Member/MemberSearch/TreeNodeTitle.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptMemberList/index.d.ts +6 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/CorpDeptTree/index.d.ts +6 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/DeptUsersCorpDeptPanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/buildCorpDeptTreeData.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/types.d.ts +45 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpDeptPanel/useCorpDeptPanelData.d.ts +17 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpFlatList/index.d.ts +12 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/CorpLabelTree/index.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/DeptUsersCorpPanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/alignDockCorpSelectedKeys.d.ts +27 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/buildCorpLabelTreeData.d.ts +18 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/useCorpLabelTreePanelData.d.ts +11 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersCorpPanel/useCorpPanelData.d.ts +11 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/DeptUsersEnterpriseLabelPanel.d.ts +2 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/EnterpriseLabelList/index.d.ts +11 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/types.d.ts +5 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersEnterpriseLabelPanel/useDeptUsersEnterpriseLabelPanelData.d.ts +10 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersPositionPanel/useDeptUsersPositionPanelData.d.ts +8 -8
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/InternalRolePickTree.d.ts +21 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/DeptUsersRolePanel/useDeptUsersRolePanelData.d.ts +14 -11
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPagedList.d.ts +40 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/MemberPanel/useMemberPanelData.d.ts +88 -3
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/OrganizationPanel/DeptScope/DeptScopeOptions.d.ts +13 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/OrganizationPanel/DeptScope/DeptScopePanel.d.ts +8 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/OrganizationPanel/DeptScope/useDeptScopePanelData.d.ts +41 -0
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/PositionPanel/usePositionPanelData.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/RolePanel/useRolePanelData.d.ts +1 -1
- package/dist/components/DeptsMemberSelector/subcomponents/SelectionArea/PreviewSelectedItems/PreviewSelectedItems.d.ts +1 -5
- package/dist/components/DeptsMemberSelector/testUtils/domMeasureMocks.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/types/selector.d.ts +62 -3
- package/dist/components/DeptsMemberSelector/utils/constants.d.ts +36 -3
- package/dist/components/DeptsMemberSelector/utils/corpList.d.ts +13 -0
- package/dist/components/DeptsMemberSelector/utils/departmentIdentity.d.ts +14 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersCorpDeptSearchGroup.d.ts +31 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersCorpSearchGroup.d.ts +23 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersDockCacheKeys.d.ts +16 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersEnterpriseLabelSearchGroup.d.ts +22 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersOrgDepartmentsData.d.ts +30 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersOrganizationSearchGroup.d.ts +25 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersRelationSearchGroup.d.ts +4 -16
- package/dist/components/DeptsMemberSelector/utils/deptUsersRoleModel.d.ts +43 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersRoleSearchGroup.d.ts +24 -0
- package/dist/components/DeptsMemberSelector/utils/deptUsersSearchDimensions.d.ts +30 -0
- package/dist/components/DeptsMemberSelector/utils/domMeasure.d.ts +14 -0
- package/dist/components/DeptsMemberSelector/utils/entityItemType.d.ts +5 -2
- package/dist/components/DeptsMemberSelector/utils/filterLabelCorpFlatNodes.d.ts +56 -0
- package/dist/components/DeptsMemberSelector/utils/flattenDockUserList.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/utils/flowCreator.d.ts +17 -2
- package/dist/components/DeptsMemberSelector/utils/index.d.ts +5 -1
- package/dist/components/DeptsMemberSelector/utils/memberSearchTreeTitle.d.ts +9 -0
- package/dist/components/DeptsMemberSelector/utils/resolveDeptUsersExternalMembers.d.ts +7 -0
- package/dist/components/DeptsMemberSelector/utils/resolveDeptUsersOrganizationEntryVisibility.d.ts +19 -0
- package/dist/components/DeptsMemberSelector/utils/resolveDockCorpId.d.ts +15 -0
- package/dist/components/DeptsMemberSelector/{subcomponents/Panels/OrganizationPanel/utils → utils}/treeExpandedKeys.d.ts +8 -3
- package/dist/components/DeptsMemberSelector/utils/useDeptUsersOrgDepartmentsPrefetch.d.ts +16 -0
- package/dist/index.css +1 -1
- package/dist/index.js +22 -13
- package/dist/lang/en-US.json.d.ts +13 -1
- package/dist/lang/zh-CN.json.d.ts +13 -1
- package/dist/lang/zh-TW.json.d.ts +13 -1
- package/dist/services/contact/selector.service.d.ts +43 -2
- package/dist/vendors/useLocale.js +251 -0
- package/package.json +3 -3
- package/dist/DeptsMemberSelector/DeptsMemberSelector-DmwD1Ls_.js +0 -1336
- package/dist/DeptsMemberSelector/DeptsUser-wWfkuBDp.js +0 -974
- package/dist/DeptsMemberSelector/MemberPanel-Cm1Hv-GV.js +0 -698
- package/dist/DeptsMemberSelector/OrganizationPanel-2QDNfFtJ.js +0 -401
- package/dist/DeptsMemberSelector/useOutsiderGroupPanelState-d2EiLVaV.js +0 -648
- package/dist/components/DeptsMemberSelector/subcomponents/Panels/OrganizationPanel/utils/useOrganizationTreeExpandedKeys.d.ts +0 -9
- package/dist/components/DeptsMemberSelector/utils/deptUsersSearchVisibility.d.ts +0 -30
- /package/dist/ConfigProvider/{ConfigProvider-CU5Z39Ex.js → ConfigProvider-51iupuCp.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ENTITY_ITEM_TYPE } from './entityItemType';
|
|
3
|
+
type CorpSearchGroup = {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
children: Array<{
|
|
7
|
+
_id: string;
|
|
8
|
+
value: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: typeof ENTITY_ITEM_TYPE.DOCKCORP;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
declare function useDeptUsersCorpSearchGroup({ enabled, wd, groupTitle, }: {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
wd?: string;
|
|
18
|
+
groupTitle: string;
|
|
19
|
+
}): {
|
|
20
|
+
searchGroup: CorpSearchGroup | null;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
};
|
|
23
|
+
export { useDeptUsersCorpSearchGroup };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const DEPT_USERS_CORPS_CACHE_KEY = "deptUsersCorps";
|
|
2
|
+
declare const DEPT_USERS_CORP_LABEL_TREE_CACHE_KEY = "deptUsersCorpLabelTree";
|
|
3
|
+
declare const DEPT_USERS_CORP_DEPT_TREE_CACHE_KEY = "deptUsersCorpDeptTree";
|
|
4
|
+
/** 关系列表本地搜索与面板共用,避免反复全量拉取 */
|
|
5
|
+
declare const DEPT_USERS_RELATIONS_CACHE_KEY = "deptUsersRelations";
|
|
6
|
+
/** 角色叶子列表本地搜索缓存 */
|
|
7
|
+
declare const DEPT_USERS_ROLE_LEAVES_CACHE_KEY = "deptUsersRoleLeaves";
|
|
8
|
+
/** 组织架构内部组织:面板预拉与本地搜索共用 */
|
|
9
|
+
declare const DEPT_USERS_ORG_INTERNAL_CACHE_KEY = "deptUsersOrgInternal";
|
|
10
|
+
/** 组织架构外部组织:面板预拉与本地搜索共用 */
|
|
11
|
+
declare const DEPT_USERS_ORG_EXTERNAL_CACHE_KEY = "deptUsersOrgExternal";
|
|
12
|
+
declare const buildDeptUsersOrgCacheKey: (baseKey: string, requestContext?: {
|
|
13
|
+
appId?: string;
|
|
14
|
+
entryId?: string;
|
|
15
|
+
}, dockEnabled?: boolean) => string;
|
|
16
|
+
export { DEPT_USERS_CORPS_CACHE_KEY, DEPT_USERS_CORP_LABEL_TREE_CACHE_KEY, DEPT_USERS_CORP_DEPT_TREE_CACHE_KEY, DEPT_USERS_RELATIONS_CACHE_KEY, DEPT_USERS_ROLE_LEAVES_CACHE_KEY, DEPT_USERS_ORG_INTERNAL_CACHE_KEY, DEPT_USERS_ORG_EXTERNAL_CACHE_KEY, buildDeptUsersOrgCacheKey, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ENTITY_ITEM_TYPE } from './entityItemType';
|
|
3
|
+
type EnterpriseLabelSearchGroup = {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
children: Array<{
|
|
7
|
+
_id: string;
|
|
8
|
+
value: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: typeof ENTITY_ITEM_TYPE.LABEL;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
declare function useDeptUsersEnterpriseLabelSearchGroup({ enabled, wd, groupTitle, }: {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
wd?: string;
|
|
17
|
+
groupTitle: string;
|
|
18
|
+
}): {
|
|
19
|
+
searchGroup: EnterpriseLabelSearchGroup | null;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
};
|
|
22
|
+
export { useDeptUsersEnterpriseLabelSearchGroup };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type DeptUsersOrgDockReadiness = {
|
|
2
|
+
isDockDisabled: boolean;
|
|
3
|
+
isInternalDisabled: boolean;
|
|
4
|
+
readyInternal: boolean;
|
|
5
|
+
readyExternal: boolean;
|
|
6
|
+
dockEnabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
type DeptUsersOrgCounts = {
|
|
9
|
+
departmentsCount: number;
|
|
10
|
+
labelCorpCount: number;
|
|
11
|
+
};
|
|
12
|
+
type DeptUsersOrgPayload = {
|
|
13
|
+
departments_count?: number;
|
|
14
|
+
label_corp_count?: number;
|
|
15
|
+
departments?: unknown[];
|
|
16
|
+
label_corp_list?: unknown[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 配置层预拉/请求门控:hasDeptDock 优先于 hasDock:false。
|
|
20
|
+
* readyGate 为 false 时两侧都不请求(如搜索未启用)。
|
|
21
|
+
*/
|
|
22
|
+
declare const resolveDeptUsersOrgDockReadiness: ({ hasDock, hasDeptDock, readyGate, }: {
|
|
23
|
+
hasDock?: boolean;
|
|
24
|
+
hasDeptDock?: boolean;
|
|
25
|
+
readyGate?: boolean;
|
|
26
|
+
}) => DeptUsersOrgDockReadiness;
|
|
27
|
+
/** 双路响应 count 交叉兜底:内部优先 departments_count,外部优先 label_corp_count。 */
|
|
28
|
+
declare const mergeDeptUsersOrgCounts: (internal?: DeptUsersOrgPayload | null, external?: DeptUsersOrgPayload | null) => DeptUsersOrgCounts;
|
|
29
|
+
export { resolveDeptUsersOrgDockReadiness, mergeDeptUsersOrgCounts };
|
|
30
|
+
export type { DeptUsersOrgDockReadiness, DeptUsersOrgCounts, DeptUsersOrgPayload };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type OrganizationSearchChild = {
|
|
3
|
+
_id: string | number;
|
|
4
|
+
value: string | number;
|
|
5
|
+
name: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
type OrganizationSearchGroup = {
|
|
11
|
+
title: string;
|
|
12
|
+
value: string;
|
|
13
|
+
children: OrganizationSearchChild[];
|
|
14
|
+
};
|
|
15
|
+
/** deptusers 组织架构本地搜索;与面板共用 department/list 预拉缓存。 */
|
|
16
|
+
declare const useDeptUsersOrganizationSearchGroup: ({ enabled, wd, groupTitle, externalLabel, }: {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
wd?: string;
|
|
19
|
+
groupTitle: string;
|
|
20
|
+
externalLabel: string;
|
|
21
|
+
}) => {
|
|
22
|
+
searchGroup: OrganizationSearchGroup | null;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
};
|
|
25
|
+
export { useDeptUsersOrganizationSearchGroup };
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ENTITY_ITEM_TYPE } from './entityItemType';
|
|
3
3
|
import { RequestContext } from '../types/selector';
|
|
4
|
-
type
|
|
5
|
-
type DepartmentRelationSearchGroup = {
|
|
6
|
-
title: string;
|
|
7
|
-
_id: string;
|
|
8
|
-
children: Array<{
|
|
9
|
-
_id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type: typeof ENTITY_ITEM_TYPE.RELATION;
|
|
12
|
-
title: ReactNode;
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
|
-
type MemberRelationSearchGroup = {
|
|
4
|
+
type RelationSearchGroup = {
|
|
16
5
|
title: string;
|
|
17
6
|
value: string;
|
|
18
7
|
children: Array<{
|
|
@@ -23,15 +12,14 @@ type MemberRelationSearchGroup = {
|
|
|
23
12
|
title: ReactNode;
|
|
24
13
|
}>;
|
|
25
14
|
};
|
|
26
|
-
declare function useDeptUsersRelationSearchGroup
|
|
15
|
+
declare function useDeptUsersRelationSearchGroup({ enabled, requestContext, wd, groupTitle, }: {
|
|
27
16
|
enabled: boolean;
|
|
28
|
-
variant: V;
|
|
29
17
|
requestContext: RequestContext;
|
|
30
18
|
wd?: string;
|
|
31
19
|
groupTitle: string;
|
|
32
20
|
}): {
|
|
33
|
-
searchGroup:
|
|
21
|
+
searchGroup: RelationSearchGroup | null;
|
|
34
22
|
loading: boolean;
|
|
35
23
|
};
|
|
36
24
|
export { useDeptUsersRelationSearchGroup };
|
|
37
|
-
export type {
|
|
25
|
+
export type { RelationSearchGroup };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type RoleSourceItem = {
|
|
2
|
+
_id: string;
|
|
3
|
+
role_id: string | number;
|
|
4
|
+
name: string;
|
|
5
|
+
type?: string | number;
|
|
6
|
+
parent?: string | number;
|
|
7
|
+
children?: RoleSourceItem[];
|
|
8
|
+
};
|
|
9
|
+
/** roleChildEnable:true 用的可勾选树节点:分组 checkable:false,叶子 checkable:true。 */
|
|
10
|
+
type InternalRolePickNode = RoleSourceItem & {
|
|
11
|
+
checkable: boolean;
|
|
12
|
+
children?: InternalRolePickNode[];
|
|
13
|
+
};
|
|
14
|
+
type RoleLeafSelection = {
|
|
15
|
+
_id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: 'role';
|
|
18
|
+
role_id?: string | number;
|
|
19
|
+
};
|
|
20
|
+
type RoleGroupScopeSelection = {
|
|
21
|
+
_id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
type: 'rolegroup';
|
|
24
|
+
};
|
|
25
|
+
declare const ROLE_GROUP_SCOPE_SUFFIX = "-roleGroup";
|
|
26
|
+
declare const ROLE_GROUP_SUB_SCOPE_SUFFIX = "-roleGroupSub";
|
|
27
|
+
declare const toStoredId: (role: Pick<RoleSourceItem, "_id">) => string;
|
|
28
|
+
declare const isRoleGroupNode: (role?: RoleSourceItem | null) => boolean;
|
|
29
|
+
declare const normalizeRole: (role: RoleSourceItem) => RoleSourceItem;
|
|
30
|
+
declare const toRoleGroupScopeId: (storedId: string) => string;
|
|
31
|
+
declare const toRoleGroupSubScopeId: (storedId: string) => string;
|
|
32
|
+
declare const toRoleLeafSelection: (role: RoleSourceItem) => RoleLeafSelection;
|
|
33
|
+
declare const toRoleGroupCurrentScopeSelection: (role: RoleSourceItem) => RoleGroupScopeSelection;
|
|
34
|
+
declare const toRoleGroupSubScopeSelection: (role: RoleSourceItem) => RoleGroupScopeSelection;
|
|
35
|
+
/** 展平内部角色树:叶子 + 分组(不含「及子分组」范围 option)。 */
|
|
36
|
+
declare const collectSearchableRoles: (nodes: RoleSourceItem[]) => RoleSourceItem[];
|
|
37
|
+
declare const findRoleByStoredId: (roles: RoleSourceItem[], id?: string) => RoleSourceItem | undefined;
|
|
38
|
+
declare const markInternalRolePickTree: (nodes: RoleSourceItem[]) => InternalRolePickNode[];
|
|
39
|
+
declare const toRoleSearchSelection: (item: RoleSourceItem) => (RoleLeafSelection | RoleGroupScopeSelection) & {
|
|
40
|
+
value: string;
|
|
41
|
+
};
|
|
42
|
+
export { ROLE_GROUP_SCOPE_SUFFIX, ROLE_GROUP_SUB_SCOPE_SUFFIX, collectSearchableRoles, findRoleByStoredId, isRoleGroupNode, markInternalRolePickTree, normalizeRole, toRoleGroupCurrentScopeSelection, toRoleGroupScopeId, toRoleGroupSubScopeId, toRoleGroupSubScopeSelection, toRoleLeafSelection, toRoleSearchSelection, toStoredId, };
|
|
43
|
+
export type { InternalRolePickNode, RoleGroupScopeSelection, RoleLeafSelection, RoleSourceItem };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RequestContext } from '../types/selector';
|
|
3
|
+
import { toRoleSearchSelection, RoleSourceItem } from './deptUsersRoleModel';
|
|
4
|
+
type RoleSearchChild = ReturnType<typeof toRoleSearchSelection> & {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
type RoleSearchGroup = {
|
|
8
|
+
title: string;
|
|
9
|
+
value: string;
|
|
10
|
+
children: RoleSearchChild[];
|
|
11
|
+
};
|
|
12
|
+
/** deptusers 角色本地搜索;分组命中映射为面板「当前分组的角色」(`-roleGroup`)。 */
|
|
13
|
+
declare const useDeptUsersRoleSearchGroup: ({ enabled, requestContext, hasDock, wd, groupTitle, }: {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
requestContext: RequestContext;
|
|
16
|
+
hasDock?: boolean;
|
|
17
|
+
wd?: string;
|
|
18
|
+
groupTitle: string;
|
|
19
|
+
}) => {
|
|
20
|
+
searchGroup: RoleSearchGroup | null;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
};
|
|
23
|
+
export { useDeptUsersRoleSearchGroup };
|
|
24
|
+
export type { RoleSearchGroup, RoleSourceItem };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeptUsersPanelConfig } from '../types/selector';
|
|
2
|
+
/**
|
|
3
|
+
* deptusers 全局搜索维度准入规则:
|
|
4
|
+
* 选中值若依赖前面层级的选中上下文才能构成完整 payload,则不进全局搜索。
|
|
5
|
+
* 只有「点一下就能独立进已选区、且值自洽」的项才搜。
|
|
6
|
+
*
|
|
7
|
+
* 因此不注册:position(依赖 dept+mode)、other(静态 auth)、
|
|
8
|
+
* 角色「及子分组」范围 option(-roleGroupSub,需二次选择)、deptChildEnable 下的部门范围 option。
|
|
9
|
+
* 角色叶子与「当前分组的角色」(-roleGroup)在 roleEnable 时均可搜。
|
|
10
|
+
*/
|
|
11
|
+
type DeptUsersSearchMode = 'remote' | 'local';
|
|
12
|
+
type DeptUsersSearchDimensionId = 'department' | 'member' | 'outsiderGroup' | 'outsiderMember' | 'relation' | 'enterpriseLabel' | 'corp' | 'corpDept' | 'role';
|
|
13
|
+
/** 与 useDeptUserTabItems 的 tab.key 对齐;extraContact 同时覆盖分组/成员两个子维度 */
|
|
14
|
+
type DeptUsersSearchTabKey = 'organizational' | 'member' | 'extraContact' | 'relation' | 'enterpriseLabel' | 'corp' | 'corpDept' | 'role';
|
|
15
|
+
type DeptUsersSearchDimension = {
|
|
16
|
+
id: DeptUsersSearchDimensionId;
|
|
17
|
+
/** 用于与可见 Tab 求交,决定搜索入口是否展示 */
|
|
18
|
+
tabKey: DeptUsersSearchTabKey;
|
|
19
|
+
mode: DeptUsersSearchMode;
|
|
20
|
+
when: (config?: DeptUsersPanelConfig) => boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const DEPT_USERS_SEARCH_DIMENSIONS: readonly DeptUsersSearchDimension[];
|
|
23
|
+
declare const resolveActiveDeptUsersSearchDimensions: (config?: DeptUsersPanelConfig) => DeptUsersSearchDimension[];
|
|
24
|
+
declare const resolveActiveDeptUsersSearchDimensionIds: (config?: DeptUsersPanelConfig) => Set<DeptUsersSearchDimensionId>;
|
|
25
|
+
/**
|
|
26
|
+
* 搜索入口可见性:活跃搜索维度的 tabKey 与当前可见 Tab 求交。
|
|
27
|
+
*/
|
|
28
|
+
declare const resolveSearchEntryVisible: (config?: DeptUsersPanelConfig, visibleTabKeys?: string[]) => boolean;
|
|
29
|
+
export { DEPT_USERS_SEARCH_DIMENSIONS, resolveActiveDeptUsersSearchDimensions, resolveActiveDeptUsersSearchDimensionIds, resolveSearchEntryVisible, };
|
|
30
|
+
export type { DeptUsersSearchDimension, DeptUsersSearchDimensionId, DeptUsersSearchMode, DeptUsersSearchTabKey, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
export type ElementLayout = {
|
|
3
|
+
left: number;
|
|
4
|
+
width: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const MEASURE_EPSILON = 0.5;
|
|
7
|
+
export declare const isWithinEpsilon: (a: number, b: number, epsilon?: number) => boolean;
|
|
8
|
+
export declare const findMeasureElement: (container: HTMLElement, measureAttribute: string, key: string) => HTMLElement | null;
|
|
9
|
+
/**
|
|
10
|
+
* 沿 offsetParent 链累加 offsetLeft,得到 measureElement 相对 anchor 的布局;
|
|
11
|
+
* 链未收敛时回退到 getBoundingClientRect 差值。
|
|
12
|
+
*/
|
|
13
|
+
export declare const getElementLayoutRelativeTo: (anchor: HTMLElement, measureElement: HTMLElement) => ElementLayout | null;
|
|
14
|
+
export declare const cancelRaf: (rafRef: MutableRefObject<number | null>) => void;
|
|
@@ -18,15 +18,18 @@ type SelectorItemLike = {
|
|
|
18
18
|
_id?: string | number;
|
|
19
19
|
type?: string;
|
|
20
20
|
iconType?: string;
|
|
21
|
-
|
|
21
|
+
/** 角色实体为标量;成员 API 常为所属角色 id 列表 */
|
|
22
|
+
role_id?: string | number | unknown[];
|
|
22
23
|
[key: string]: unknown;
|
|
23
24
|
};
|
|
24
25
|
declare const LEGACY_TYPE_ALIASES: Record<string, EntityItemType>;
|
|
26
|
+
/** 角色实体用标量 role_id;成员 API 的 role_id 常为 [](所属角色列表),不能据此推断为 role */
|
|
27
|
+
declare const hasEntityRoleId: (roleId: unknown) => boolean;
|
|
25
28
|
declare const normalizeEntityItemType: (rawType?: string, item?: SelectorItemLike) => EntityItemType | string;
|
|
26
29
|
declare const canonicalToDeprecatedIconType: (canonicalType: string) => string | undefined;
|
|
27
30
|
declare const ensureSelectorItem: <T extends SelectorItemLike>(item: T) => T & {
|
|
28
31
|
type: string;
|
|
29
32
|
iconType?: string;
|
|
30
33
|
};
|
|
31
|
-
export { ENTITY_ITEM_TYPE, LEGACY_TYPE_ALIASES, normalizeEntityItemType, ensureSelectorItem, canonicalToDeprecatedIconType, };
|
|
34
|
+
export { ENTITY_ITEM_TYPE, LEGACY_TYPE_ALIASES, hasEntityRoleId, normalizeEntityItemType, ensureSelectorItem, canonicalToDeprecatedIconType, };
|
|
32
35
|
export type { EntityItemType, SelectorItemLike };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type LabelCorpFlatItem = {
|
|
2
|
+
_id?: string | number;
|
|
3
|
+
type?: string;
|
|
4
|
+
departmentId?: string | number;
|
|
5
|
+
parentId?: string | number;
|
|
6
|
+
children?: LabelCorpFlatItem[];
|
|
7
|
+
};
|
|
8
|
+
type FilterLabelCorpFlatNodesOptions = {
|
|
9
|
+
/** 始终保留的节点类型(如 dockcorp / dockdept) */
|
|
10
|
+
alwaysKeepTypes: readonly string[];
|
|
11
|
+
/**
|
|
12
|
+
* 分组类节点类型(如 label / dockcorpdept)。
|
|
13
|
+
* strictTypes 为 true 时,仅 alwaysKeep 与 groupTypes 可参与过滤。
|
|
14
|
+
*/
|
|
15
|
+
groupTypes?: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* true:丢弃不在 alwaysKeep / groupTypes 中的节点。
|
|
18
|
+
* false:其余节点仍走「非虚拟根 + 扁平列表下有子节点」规则(组织架构外部树)。
|
|
19
|
+
*/
|
|
20
|
+
strictTypes?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const LABEL_CORP_FLAT_FILTER: {
|
|
23
|
+
readonly corpLabelTree: {
|
|
24
|
+
readonly alwaysKeepTypes: readonly ["dockcorp"];
|
|
25
|
+
readonly groupTypes: readonly ["label"];
|
|
26
|
+
readonly strictTypes: true;
|
|
27
|
+
};
|
|
28
|
+
readonly organizationExternal: {
|
|
29
|
+
readonly alwaysKeepTypes: readonly ["dockcorp", "dockdept"];
|
|
30
|
+
readonly strictTypes: false;
|
|
31
|
+
};
|
|
32
|
+
readonly corpDeptTree: {
|
|
33
|
+
readonly alwaysKeepTypes: readonly ["dockcorp", "dockdept"];
|
|
34
|
+
readonly groupTypes: readonly ["label", "dockcorpdept"];
|
|
35
|
+
readonly strictTypes: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
declare const isRootParentId: (parentId?: string | number) => parentId is 0 | "0";
|
|
39
|
+
declare const hasFlatChildren: (item: LabelCorpFlatItem, nodes: LabelCorpFlatItem[]) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 过滤扁平 label_corp_list 中的无效节点:
|
|
42
|
+
* - 虚拟根(parentId 为 0)
|
|
43
|
+
* - 无子节点的分组(label / dockcorpdept 等)
|
|
44
|
+
*/
|
|
45
|
+
declare const filterLabelCorpFlatNodes: <T extends LabelCorpFlatItem>(nodes: T[], options: FilterLabelCorpFlatNodesOptions) => T[];
|
|
46
|
+
declare const EMPTY_LABEL_CORP_GROUP_TYPES: readonly ["label", "dockcorpdept"];
|
|
47
|
+
/**
|
|
48
|
+
* 构建树后去掉无子节点的分组壳(label / dockcorpdept)。
|
|
49
|
+
*/
|
|
50
|
+
declare const pruneEmptyLabelCorpGroupNodes: <T extends LabelCorpFlatItem>(nodes: T[], groupTypes?: readonly string[]) => T[];
|
|
51
|
+
/**
|
|
52
|
+
* 若整棵树仅包了一层 label 根,则展开其子节点(成员面板外部树)。
|
|
53
|
+
*/
|
|
54
|
+
declare const unwrapSingleLabelCorpRoot: <T extends LabelCorpFlatItem>(nodes: T[]) => T[];
|
|
55
|
+
export { LABEL_CORP_FLAT_FILTER, EMPTY_LABEL_CORP_GROUP_TYPES, filterLabelCorpFlatNodes, pruneEmptyLabelCorpGroupNodes, unwrapSingleLabelCorpRoot, isRootParentId, hasFlatChildren, };
|
|
56
|
+
export type { LabelCorpFlatItem, FilterLabelCorpFlatNodesOptions };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CorpDeptMemberItem, DockUserGroup } from '../subcomponents/Panels/DeptUsersCorpDeptPanel/types';
|
|
2
|
+
/**
|
|
3
|
+
* 将 department/member/list 返回的 dock_user_list 分组展平为成员列表。
|
|
4
|
+
* owner_corpid / dock_corpname / user_type 优先取成员自身,否则回退分组字段。
|
|
5
|
+
*/
|
|
6
|
+
declare const flattenDockUserList: (dockUserList?: DockUserGroup[] | null) => CorpDeptMemberItem[];
|
|
7
|
+
export { flattenDockUserList };
|
|
@@ -4,5 +4,20 @@ declare const resolveEffectiveFlowCreator: ({ type, flowCreator, currentUsers, }
|
|
|
4
4
|
flowCreator?: FlowCreator;
|
|
5
5
|
currentUsers: Record<string, unknown>[];
|
|
6
6
|
}) => FlowCreator | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type FilterMemberListOptions = {
|
|
8
|
+
type: SelectorType;
|
|
9
|
+
currentUsers?: Record<string, unknown>[];
|
|
10
|
+
/**
|
|
11
|
+
* 成员黑名单 id Set。非空时按 `_id` / `id` / `dock_userid` 剔除命中项。
|
|
12
|
+
* 由主组件在 type === 'deptusers' 时从 excludedMemberIds 派生;空 Set 时跳过。
|
|
13
|
+
*/
|
|
14
|
+
excludedMemberIdSet?: ReadonlySet<string>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 成员列表统一过滤出口:
|
|
18
|
+
* 1. transfer 模式:剔除与 currentUsers 身份重合的成员
|
|
19
|
+
* 2. excludedMemberIdSet 非空:剔除黑名单命中成员(仅 deptusers 路径传入)
|
|
20
|
+
* 匹配口径:`_id` / `id` / `dock_userid` 任一命中即视为同一人。
|
|
21
|
+
*/
|
|
22
|
+
declare const filterMemberListCandidates: <T extends Record<string, unknown>>(list: T[], { type, currentUsers, excludedMemberIdSet }: FilterMemberListOptions) => T[];
|
|
23
|
+
export { resolveEffectiveFlowCreator, filterMemberListCandidates };
|
|
@@ -45,8 +45,12 @@ declare const buildTree: <T extends BaseNode>(treeData: T[], fieldNames?: Partia
|
|
|
45
45
|
* @returns {TreeNode<T> | null} - 找到的节点或 null。
|
|
46
46
|
*/
|
|
47
47
|
declare const findNodeInTree: <T extends BaseNode>(id: string | number, treeData: TreeNode<T>[], fieldNames?: Partial<FieldNames>) => TreeNode<T> | null;
|
|
48
|
+
type BuildDeptTreeOptions = {
|
|
49
|
+
/** 是否按节点 order 字段排序;默认 true。传 false 则保留后端返回的原始顺序。 */
|
|
50
|
+
sortByOrder?: boolean;
|
|
51
|
+
};
|
|
48
52
|
/** 部门成员树形结构 */
|
|
49
|
-
export declare function buildDeptTree(data: Array<any
|
|
53
|
+
export declare function buildDeptTree(data: Array<any>, options?: BuildDeptTreeOptions): any[];
|
|
50
54
|
export { getMemberBadgeLabels, resolveMemberBadgeText } from './memberBadgeText';
|
|
51
55
|
export type { MemberBadgeItem, MemberBadgeLabels, ResolveMemberBadgeOptions, } from './memberBadgeText';
|
|
52
56
|
export { getColorByName, getMemberDisplayName, getAvatarText, ENTITY_COLORS, buildTree, findNodeInTree, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MemberBadgeItem, MemberBadgeLabels } from './memberBadgeText';
|
|
2
|
+
type MemberSearchTreeTitleItem = MemberBadgeItem & {
|
|
3
|
+
avatarurl?: string;
|
|
4
|
+
nickname?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const buildMemberSearchTreeTitle: (item: MemberSearchTreeTitleItem, badgeLabels: MemberBadgeLabels, extraClassName: string) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { buildMemberSearchTreeTitle };
|
|
9
|
+
export type { MemberSearchTreeTitleItem };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CorpDeptMemberItem, DockUserGroup } from '../subcomponents/Panels/DeptUsersCorpDeptPanel/types';
|
|
2
|
+
declare const resolveDeptUsersExternalMembers: ({ dockUserList, isAllSelected, matchCorpId, }: {
|
|
3
|
+
dockUserList?: DockUserGroup[] | null;
|
|
4
|
+
isAllSelected: boolean;
|
|
5
|
+
matchCorpId?: string;
|
|
6
|
+
}) => CorpDeptMemberItem[];
|
|
7
|
+
export { resolveDeptUsersExternalMembers };
|
package/dist/components/DeptsMemberSelector/utils/resolveDeptUsersOrganizationEntryVisibility.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deptusers 模式下「组织架构」面板内/外组织入口的可见性。
|
|
3
|
+
* 由 useOrganizationPanelData(menuItems.visible)与 useDeptUsersOrganizationSearchGroup 共用,
|
|
4
|
+
* 修改本函数会同时影响浏览与搜索两侧,需一并核对。
|
|
5
|
+
*/
|
|
6
|
+
type DeptUsersOrganizationEntryVisibility = {
|
|
7
|
+
showInternal: boolean;
|
|
8
|
+
showExternal: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ResolveDeptUsersOrganizationEntryVisibilityInput = {
|
|
11
|
+
hasDock?: boolean;
|
|
12
|
+
hasDeptDock?: boolean;
|
|
13
|
+
deptChildEnable?: boolean;
|
|
14
|
+
departmentsCount: number;
|
|
15
|
+
labelCorpCount: number;
|
|
16
|
+
};
|
|
17
|
+
declare const resolveDeptUsersOrganizationEntryVisibility: ({ hasDock, hasDeptDock, deptChildEnable, departmentsCount, labelCorpCount, }: ResolveDeptUsersOrganizationEntryVisibilityInput) => DeptUsersOrganizationEntryVisibility;
|
|
18
|
+
export { resolveDeptUsersOrganizationEntryVisibility };
|
|
19
|
+
export type { DeptUsersOrganizationEntryVisibility, ResolveDeptUsersOrganizationEntryVisibilityInput, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type DockCorpResolvableNode = {
|
|
2
|
+
type?: string;
|
|
3
|
+
id?: string | number;
|
|
4
|
+
departmentId?: string | number;
|
|
5
|
+
owner_corpid?: string | number | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 从外部组织树节点解析对接企业 id(映射 member/list 的 current_corpid)。
|
|
9
|
+
* dockcorp:节点自身即企业,取 id 或 departmentId;其余节点取 owner_corpid。
|
|
10
|
+
*/
|
|
11
|
+
declare const resolveDockCorpId: (node: DockCorpResolvableNode | null | undefined, options?: {
|
|
12
|
+
emptyAsUndefined?: boolean;
|
|
13
|
+
}) => string | undefined;
|
|
14
|
+
export { resolveDockCorpId };
|
|
15
|
+
export type { DockCorpResolvableNode };
|
|
@@ -7,17 +7,22 @@
|
|
|
7
7
|
type TreeBaselineMode = 'all-roots' | 'single-root-only' | 'none';
|
|
8
8
|
type ResolveTreeExpandedKeysOptions = {
|
|
9
9
|
baselineMode: TreeBaselineMode;
|
|
10
|
-
/**
|
|
10
|
+
/** 选中项祖先链(path.slice(0, -1)) */
|
|
11
11
|
selectionExpandKeys?: Array<string | number>;
|
|
12
12
|
};
|
|
13
13
|
type TreeNodeWithId = {
|
|
14
|
-
_id
|
|
14
|
+
_id?: string | number;
|
|
15
|
+
children?: TreeNodeWithId[];
|
|
15
16
|
};
|
|
16
17
|
declare const resolveBaselineKeys: (treeData: TreeNodeWithId[], mode: TreeBaselineMode) => Array<string | number>;
|
|
18
|
+
declare const getNodePath: (nodes: TreeNodeWithId[], targetId: string | number, path?: Array<string | number>) => Array<string | number> | null;
|
|
19
|
+
declare const resolveSelectionExpandKeys: (treeData: TreeNodeWithId[], selectedIds?: Array<string | number>) => Array<string | number>;
|
|
17
20
|
/**
|
|
18
21
|
* 合并 baseline 与 selection 两层展开键:uniq(baseline ∪ selection)。
|
|
19
22
|
* 不可使用 ?? 二选一——选中根节点时 selection 为 [],会错误覆盖 baseline。
|
|
20
23
|
*/
|
|
21
24
|
declare const resolveTreeExpandedKeys: (treeData: TreeNodeWithId[], options: ResolveTreeExpandedKeysOptions) => Array<string | number>;
|
|
22
|
-
|
|
25
|
+
/** 展开键集合语义比较(忽略顺序与数组引用) */
|
|
26
|
+
declare const areExpandKeysEqual: (left: Array<string | number>, right: Array<string | number>) => boolean;
|
|
27
|
+
export { areExpandKeysEqual, getNodePath, resolveBaselineKeys, resolveSelectionExpandKeys, resolveTreeExpandedKeys, };
|
|
23
28
|
export type { ResolveTreeExpandedKeysOptions, TreeBaselineMode, TreeNodeWithId };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DepartmentPanelRequestGuard, RequestContext } from '../types/selector';
|
|
2
|
+
import { DeptUsersOrgPayload } from './deptUsersOrgDepartmentsData';
|
|
3
|
+
/** 组织架构内外双路预拉;面板与本地搜索共用 cacheKey。 */
|
|
4
|
+
declare const useDeptUsersOrgDepartmentsPrefetch: ({ readyInternal, readyExternal, requestContext, dockEnabled, departmentPanelRequestGuard, }: {
|
|
5
|
+
readyInternal: boolean;
|
|
6
|
+
readyExternal: boolean;
|
|
7
|
+
requestContext?: RequestContext;
|
|
8
|
+
dockEnabled: boolean;
|
|
9
|
+
departmentPanelRequestGuard?: DepartmentPanelRequestGuard;
|
|
10
|
+
}) => {
|
|
11
|
+
internalData: DeptUsersOrgPayload | undefined;
|
|
12
|
+
externalData: DeptUsersOrgPayload | undefined;
|
|
13
|
+
internalLoading: boolean;
|
|
14
|
+
externalLoading: boolean;
|
|
15
|
+
};
|
|
16
|
+
export { useDeptUsersOrgDepartmentsPrefetch };
|