1
0
forked from baron/baron-sso

ci: add code check badges and coverage reports

This commit is contained in:
2026-05-29 12:05:43 +09:00
parent c489c7c38f
commit a830242947
164 changed files with 9059 additions and 2012 deletions

View File

@@ -3,19 +3,19 @@ import type { Node as ReactFlowNode } from "@xyflow/react";
import * as React from "react";
import { useLocation, useParams } from "react-router-dom";
import {
type TenantSummary,
type UserSummary,
fetchAllTenants,
fetchPublicOrgChart,
fetchUsers,
type TenantSummary,
type UserSummary,
} from "../../../lib/adminApi";
import { type TenantNode, buildTenantFullTree } from "../../../lib/tenantTree";
import { buildTenantFullTree, type TenantNode } from "../../../lib/tenantTree";
import {
orderHanmacFamilyChildren,
orderHanmacFamilyTenants,
} from "../hanmacFamilyOrder";
import { filterTenantsByVisibility, getOrgUnitType } from "../tenantVisibility";
import { getOrgRankWeight } from "../rankPriority";
import { filterTenantsByVisibility, getOrgUnitType } from "../tenantVisibility";
import { getOrgChartUserDisplayName, getUserOrgProfile } from "../userDisplay";
export type OrgNode = {
@@ -160,7 +160,7 @@ function getComplementaryColor(hexColor: string) {
function getDisplayTextWidthUnit(value: string) {
return Array.from(value).reduce((sum, char) => {
if (char === " ") return sum + 0.4;
if (/^[\x00-\x7f]$/.test(char)) return sum + 0.55;
if (char.charCodeAt(0) <= 0x7f) return sum + 0.55;
return sum + 1;
}, 0);
}
@@ -206,7 +206,7 @@ export function getMemberGridMetrics(
? NODE_WIDTH
: Math.max(
NODE_WIDTH,
NODE_PADDING_Y * 2 +
NODE_PADDING_Y * 2 +
columnCount * memberColumnWidth +
(columnCount - 1) * MEMBER_COLUMN_GAP,
);