OPEN_GRID API - v1.3.1
    Preparing search index...

    Class IconRegistry

    IconRegistry — 시맨틱 role(예: 'sort.asc') 을 실제 아이콘 SVG 로 바꿔주는 등록소. 정렬 화살표·필터 깔때기 같은 아이콘을 코드 곳곳에 인라인 SVG 로 박아 두면, 아이콘 하나를 바꾸려 해도 렌더러 파일들을 찾아 고쳐야 한다 — 대신 렌더 코드는 "sort.asc 를 그려줘"라고만 요청하고, 실제 어떤 글리프인지는 이 레지스트리가 결정한다. 동작 순서: ① register(role, svgOrKey) 로 role↔글리프 매핑을 등록해 두면 → ② 렌더 시점에 render(role) 가 호출되어 → ③ 등록된 본문을 <svg> 로 감싸 문자열(또는 SVGElement)로 돌려준다. 저장 단위는 글리프 본문 문자열(/ 마크업)뿐이라, register(role, svgOrKey) 는

    • svgOrKey 가 BOOTSTRAP_ICONS 의 알려진 key 면 그 본문으로,
    • 아니면 원시 SVG 본문(사용자 커스텀 <path…>)으로 저장한다. 부모 체인(_parent)으로 per-instance 오버라이드 레지스트리를 전역 위에 얹는다(멀티그리드 격리). / IconRegistry — a registry that turns a semantic role (e.g. 'sort.asc') into an actual icon SVG. Hardcoding inline SVG for every sort arrow or filter funnel across render code means hunting down every renderer file just to swap one icon — instead render code simply asks "draw sort.asc", and this registry decides which glyph that is. Flow: ① register(role, svgOrKey) records a role↔glyph mapping → ② at render time render(role) is called → ③ it wraps the registered body in an <svg> and returns a string (or SVGElement). The storage unit is only the glyph body string (/ markup), so register(role, svgOrKey) stores either the body of a known BOOTSTRAP_ICONS key, or the raw SVG body otherwise. A parent chain (_parent) layers a per-instance override registry on top of the global one (multi-grid isolation).
    const reg = iconRegistry.child();
    reg.register('sort.asc', 'arrow-up'); // 이 그리드 인스턴스만 화살표를 교체 / swap the arrow for this grid instance only
    const svg = reg.render('sort.asc', { size: 16 }) as string;
    Index

    Constructors

    • Parameters

      • Optionalseed: Readonly<Record<string, string>>
      • Optionalparent: IconRegistry

      Returns IconRegistry

    Methods

    • 이 레지스트리를 부모로 하는 자식(per-instance 오버라이드용) 생성. / Create a child registry with this as parent (for per-instance overrides).

      Returns IconRegistry

    • role 이 (자신 또는 부모 체인에) 등록돼 있는가. / Whether a role is registered (self or parent chain).

      Parameters

      • role: string

      Returns boolean

    • role 에 글리프를 등록/교체. svgOrKey 가 알려진 아이콘 key 면 그 본문을, 아니면 원시 SVG 본문 마크업으로 간주한다(코어 편집 없이 아이콘 교체 — OCP). / Register/replace a glyph for a role. A known icon key resolves to its body; otherwise svgOrKey is treated as raw SVG body markup (swap icons without editing core — OCP).

      Parameters

      • role: string

        시맨틱 역할 키(예: 'sort.asc') / Semantic role key (e.g. 'sort.asc')

      • svgOrKey: string

        알려진 아이콘 key 또는 원시 SVG 본문 / A known icon key or raw SVG body

      Returns this

      체이닝용 this / this for chaining

      // 다른 Bootstrap 아이콘 key 로 교체 / Swap to a different Bootstrap icon key
      iconRegistry.register('row.delete', 'x-circle');
      // 원시 SVG 본문으로 통째 교체 / Replace entirely with a custom raw SVG body
      iconRegistry.register('menu', '<path d="M2 4h12v2H2z"/>');
    • role 을 <svg viewBox=ICON_VIEWBOX> 로 렌더. 기본 반환은 SVG 마크업 문자열(innerHTML 용); opts.el 이면 SVGElement. 미지원 role 은 빈 svg 폴백(never throw). 스킨 토큰: fill=currentColor(presentation attr) + stroke-linejoin=var(--og-icon-corner,miter). / Render a role as <svg viewBox=ICON_VIEWBOX>. Returns SVG markup string by default (for innerHTML); opts.el returns an SVGElement. Unknown roles fall back to an empty svg (never throws).

      Parameters

      • role: string

        렌더할 역할 키 / Role key to render

      • Optionalopts: IconRenderOptions

        렌더 옵션 / Render options

      Returns string | SVGElement

      SVG 마크업 문자열 또는 SVGElement(opts.el) / SVG markup string, or SVGElement when opts.el

    • role → 글리프 본문(inner markup). 미등록이면 null(부모 체인까지 조회). / role → glyph body (inner markup); null if unregistered (searches up the parent chain).

      Parameters

      • role: string

        조회할 역할 키 / Role key to resolve

      Returns string | null

      글리프 본문 또는 null / Glyph body or null

    • 등록된 role 목록(자신만, 디버깅/테스트용). / List of registered roles (self only; for debugging/tests).

      Returns string[]