feat(org-chart): add core cards and fixed-layout integration

This commit is contained in:
shkim4 committed 2026-10-12 17:58:30 +09:00
1 parent d18e3c3380
commit 61c6f8d1f1
161 files changed
+13044 -1

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { createOrgChartView } from './core/index.js';
import type { OrgChartHandle, OrgChartOptions } from './core/types.js';
/** Standalone summaries share the same source, validation, update/reload and
* dispose contract as OrgChart. Only the independent core CSS is required. */
export interface OrgChartSummaryComponentOptions extends Pick<OrgChartOptions, 'container' | 'dataSource' | 'aggregationPolicy' | 'onStateChange'> {
stylesheetUrl: string;
}
function summaryOptions(options: OrgChartSummaryComponentOptions): OrgChartOptions {
return { ...options, stylesheetUrls: { core: options.stylesheetUrl, engine: '' } };
}
export function createPositionSummary(options: OrgChartSummaryComponentOptions): OrgChartHandle {
return createOrgChartView(summaryOptions(options), 'positionSummary');
}
export function createAffiliationSummary(options: OrgChartSummaryComponentOptions): OrgChartHandle {
return createOrgChartView(summaryOptions(options), 'affiliationSummary');
}
export function createStatusSummary(options: OrgChartSummaryComponentOptions): OrgChartHandle {
return createOrgChartView(summaryOptions(options), 'statusSummary');
}
/** Tree-only component: no title, leader composition, hub or summary modules. */
export function createOrgChartTree(options: OrgChartOptions): OrgChartHandle {
return createOrgChartView(options, 'tree');
}