feat(org-chart): support standalone React integration and update guides

This commit is contained in:
shkim4 committed 2026-10-13 16:03:05 +09:00
1 parent 5acaf8a295
commit b637f86631
19 files changed
+1455 -64

No files matched your search

@@ -5,21 +5,13 @@ import {
Avatar, AvatarFallback, AvatarImage, Button, Dialog, DialogBody, DialogClose,
DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle,
} from '@hm-design/ui';
import type { Employee, OrgChartEmployeeClickContext } from '@hm-design/org-chart';
export interface EmployeeDialogSelection {
employee: Employee;
context: OrgChartEmployeeClickContext;
}
import type { OrgChartEmployeeSelection, OrgChartEmployeePopupProps } from './types.js';
const statusNames = { active: '재직', dispatched: '파견', onLeave: '휴직' } as const;
/** Lazy React-only adapter. The Core and Vanilla remain independent of HM UI. */
export default function HMEmployeeDialog({ selection, onClose }: {
selection: EmployeeDialogSelection | null;
onClose: () => void;
}) {
const returnTarget = useRef<EmployeeDialogSelection | null>(null);
/** Explicit React-only adapter. The Core and default entry stay UI-independent. */
export default function HMEmployeeDialog({ selection, onClose }: OrgChartEmployeePopupProps) {
const returnTarget = useRef<OrgChartEmployeeSelection | null>(null);
const returnRoot = useRef<ShadowRoot | null>(null);
const returnContainer = useRef<HTMLElement | null>(null);
useLayoutEffect(() => {