@mu-cabin/opms-permission 0.8.32 → 0.8.33
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/index.cjs +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.d.mts
CHANGED
@@ -81,6 +81,13 @@ interface OrgRecord$1 {
|
|
81
81
|
systemList: any[];
|
82
82
|
}
|
83
83
|
|
84
|
+
/**
|
85
|
+
* 遍历嵌套数组并返回处理后的值
|
86
|
+
* @param items 数组
|
87
|
+
* @param callback 回调函数
|
88
|
+
* @returns 处理后的数组
|
89
|
+
*/
|
90
|
+
declare function iterateNestedArray<T = any>(items: T[], callback: (item: T, parent?: T) => T): T[];
|
84
91
|
declare function findFirstEnableNode(data: OrgTreeItem[]): OrgTreeItem | null;
|
85
92
|
|
86
93
|
interface OrgRecord {
|
@@ -102,6 +109,7 @@ interface PermissionOptions {
|
|
102
109
|
*/
|
103
110
|
declare const DataHandler: {
|
104
111
|
iterateOrgTree(orgTree: OrgRecord[]): OrgTreeItem[];
|
112
|
+
iterateNestedArray: typeof iterateNestedArray;
|
105
113
|
getAllUnitOptions(orgTree: OrgTreeItem[]): Option[];
|
106
114
|
getCompaniesOptions(orgTree: OrgTreeItem[], hasRootAuth: boolean): Option[];
|
107
115
|
topLevelUnitOrgCodes(orgTree: OrgTreeItem[]): string[];
|
package/dist/index.d.ts
CHANGED
@@ -81,6 +81,13 @@ interface OrgRecord$1 {
|
|
81
81
|
systemList: any[];
|
82
82
|
}
|
83
83
|
|
84
|
+
/**
|
85
|
+
* 遍历嵌套数组并返回处理后的值
|
86
|
+
* @param items 数组
|
87
|
+
* @param callback 回调函数
|
88
|
+
* @returns 处理后的数组
|
89
|
+
*/
|
90
|
+
declare function iterateNestedArray<T = any>(items: T[], callback: (item: T, parent?: T) => T): T[];
|
84
91
|
declare function findFirstEnableNode(data: OrgTreeItem[]): OrgTreeItem | null;
|
85
92
|
|
86
93
|
interface OrgRecord {
|
@@ -102,6 +109,7 @@ interface PermissionOptions {
|
|
102
109
|
*/
|
103
110
|
declare const DataHandler: {
|
104
111
|
iterateOrgTree(orgTree: OrgRecord[]): OrgTreeItem[];
|
112
|
+
iterateNestedArray: typeof iterateNestedArray;
|
105
113
|
getAllUnitOptions(orgTree: OrgTreeItem[]): Option[];
|
106
114
|
getCompaniesOptions(orgTree: OrgTreeItem[], hasRootAuth: boolean): Option[];
|
107
115
|
topLevelUnitOrgCodes(orgTree: OrgTreeItem[]): string[];
|
package/dist/index.mjs
CHANGED