@mu-cabin/opms-permission 0.9.27 → 0.9.29

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 CHANGED
@@ -323,7 +323,11 @@ var filterTreeByOrgCodes = (tree, orgCodes) => {
323
323
  const shouldDisableNode = (node) => {
324
324
  const isTarget = orgCodes.includes(node.value);
325
325
  if (!isTarget) return true;
326
- return hasTargetDescendants(node);
326
+ const hasDescendants = hasTargetDescendants(node);
327
+ if (hasDescendants) {
328
+ return true;
329
+ }
330
+ return node.disabled;
327
331
  };
328
332
  const buildFilteredTree = (node) => {
329
333
  const isTarget = orgCodes.includes(node.value);
package/dist/index.d.mts CHANGED
@@ -203,6 +203,7 @@ interface UserOrgTreeParams {
203
203
  menuResourceId?: number;
204
204
  stewardUnitLevel?: number;
205
205
  keepHead?: boolean;
206
+ withBrotherUnit?: boolean;
206
207
  }
207
208
  type ResultViewType = 'LIST' | 'TREE' | 'FOREST';
208
209
  type OrgDirectionType = 'NONE' | 'FROM_SELF_TO_ROOT' | 'FROM_SELF_TO_LEAF' | 'TWO_WAY';
package/dist/index.d.ts CHANGED
@@ -203,6 +203,7 @@ interface UserOrgTreeParams {
203
203
  menuResourceId?: number;
204
204
  stewardUnitLevel?: number;
205
205
  keepHead?: boolean;
206
+ withBrotherUnit?: boolean;
206
207
  }
207
208
  type ResultViewType = 'LIST' | 'TREE' | 'FOREST';
208
209
  type OrgDirectionType = 'NONE' | 'FROM_SELF_TO_ROOT' | 'FROM_SELF_TO_LEAF' | 'TWO_WAY';
package/dist/index.mjs CHANGED
@@ -273,7 +273,11 @@ var filterTreeByOrgCodes = (tree, orgCodes) => {
273
273
  const shouldDisableNode = (node) => {
274
274
  const isTarget = orgCodes.includes(node.value);
275
275
  if (!isTarget) return true;
276
- return hasTargetDescendants(node);
276
+ const hasDescendants = hasTargetDescendants(node);
277
+ if (hasDescendants) {
278
+ return true;
279
+ }
280
+ return node.disabled;
277
281
  };
278
282
  const buildFilteredTree = (node) => {
279
283
  const isTarget = orgCodes.includes(node.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mu-cabin/opms-permission",
3
- "version": "0.9.27",
3
+ "version": "0.9.29",
4
4
  "description": "Frontend SDK for OPMS permission and auth management.",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",