v7.0.0-beta.2 release

This commit is contained in:
HeuJung committed 2026-04-20 20:37:49 +09:00
1 parent 6595fd0eb5
commit fa8eba7a0d
1165 files changed
+107118 -762127

No files matched your search

@@ -4,6 +4,40 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.0-beta.2] - 2026-04-20
### Added
- 모듈/플러그인/템플릿 정보 모달에 의존성 섹션 추가 — 코어 요구 버전, 의존 확장의 요구/설치 버전과 충족 상태 뱃지 표시
- 알림센터 구현 — 읽은/안 읽은 알림 표시, 개별/전체 삭제, 모두 읽기, 안 읽은 필터, 무한 스크롤
- 알림 전체 삭제 확인 모달 추가
- 실시간 알림 수신 시 뱃지 갱신 + 토스트 표시 (WebSocket 연동)
- 알림 시각 표시를 사용자 타임존 기준으로 변경
- 환경설정 알림 탭에 일괄 초기화 확인 모달 추가 — 진행 스피너, 대상 이름 표시, 경고 메시지 포함
- 편집된 알림 제목이 식별자 대신 다국어 이름으로 표시되도록 개선
### Removed
- 코어 환경설정 > SEO > 애널리틱스/사이트 소유권 확인 카드 제거 (미작동 기능)
### Changed
- 코어 최소 요구 버전을 7.0.0-beta.2 로 상향
- TabNavigation 컴포넌트를 반응형으로 개선 — 768px 미만에서 Select 드롭다운으로 전환
- 성능 테스트 fixture 파일(~19MB) 저장소에서 제거 — 테스트 실행 시 자동 생성/삭제로 전환
- 알림 템플릿 편집 모달 다국어 탭을 동적 생성으로 전환
- 언어 선택 UI를 하드코딩에서 `localeNames` 기반 동적 생성으로 전환
- 알림 발송 이력 레이아웃 재구성 — DataGrid 구조, 필터 분리, 일괄 삭제, expandable 상세보기
- HtmlContent DOMPurify를 FORBID 방식으로 전환 (보안 기본값 항상 유지)
### Fixed
- 확장 install/activate/deactivate/uninstall 직후 라우트·메뉴·다국어 미반영 수정 — `reloadExtensions` 핸들러 도입
- 여러 관리자 폼의 에러 핸들러에서 저장/삭제 버튼 로딩 상태 고정 수정
- FileUploader 갤러리 이미지 깨짐 수정 — stale closure로 인한 blob URL 문제
- FileInput onChange가 ActionDispatcher에서 무시되던 문제 수정
- 모달 내부 Select 드롭다운이 잘려 보이는 문제 수정
## [1.0.0-beta.1] - 2026-04-01
### Changed
@@ -0,0 +1,354 @@
/**
* @file admin-base-transition-overlay.test.tsx
* @description 어드민 베이스 레이아웃의 transition_overlay 설정 및 폼 컨테이너 blur 제거 회귀 테스트
*
* 이슈 #245 — 어드민 환경설정 진입 시 데이터 로드 전 폼 조작으로 인한 저장 실패 방지를 위해
* 베이스 레이아웃에 spinner 오버레이를 도입하고, 컨테이너 레벨의 전체 페이지 blur 처리를 제거한다.
*/
import * as fs from 'node:fs';
import * as path from 'node:path';
import { describe, it, expect } from 'vitest';
import adminBase from '../../layouts/_admin_base.json';
import adminSettings from '../../layouts/admin_settings.json';
import adminUserForm from '../../layouts/admin_user_form.json';
import adminUserDetail from '../../layouts/admin_user_detail.json';
import adminRoleForm from '../../layouts/admin_role_form.json';
import adminTemplateLayoutEdit from '../../layouts/admin_template_layout_edit.json';
import adminMenuPanelForm from '../../layouts/partials/admin_menu_list/_panel_form.json';
const LAYOUTS_DIR = path.resolve(__dirname, '../../layouts');
type LayoutNode = {
id?: string;
children?: LayoutNode[];
blur_until_loaded?: unknown;
[key: string]: unknown;
};
function findById(input: LayoutNode | LayoutNode[] | undefined, id: string): LayoutNode | undefined {
if (!input) return undefined;
const nodes = Array.isArray(input) ? input : [input];
for (const node of nodes) {
if (node.id === id) return node;
const slots = (node as any).slots as Record<string, LayoutNode[]> | undefined;
if (slots) {
for (const slotKey of Object.keys(slots)) {
const found = findById(slots[slotKey], id);
if (found) return found;
}
}
const found = findById(node.children, id);
if (found) return found;
}
return undefined;
}
function rootNodes(layout: any): LayoutNode | LayoutNode[] {
if (layout && Array.isArray(layout.components)) return layout.components as LayoutNode[];
return layout as LayoutNode;
}
describe('어드민 베이스 transition_overlay (이슈 #245)', () => {
it('_admin_base.json 에 spinner 오버레이가 활성화되어 있어야 한다', () => {
const overlay = (adminBase as any).transition_overlay;
expect(overlay).toBeDefined();
expect(overlay.enabled).toBe(true);
expect(overlay.style).toBe('spinner');
expect(overlay.target).toBe('right_content_area');
expect(overlay.spinner?.component).toBe('PageLoading');
});
it('베이스의 target 으로 지정된 right_content_area 가 main_content 의 부모 wrapper 여야 한다', () => {
// spinner target 은 slot 컨테이너(main_content) 자체가 아닌 부모 wrapper 여야 함
// 사용자 베이스의 main_content_area 와 동일 패턴 — 외부 DOM mount 가 React reconcile 에 영향 없음
const wrapper = findById((adminBase as any).components, 'right_content_area');
expect(wrapper).toBeDefined();
const inner = findById(wrapper!.children, 'main_content');
expect(inner).toBeDefined();
});
});
describe('목록 페이지 페이지네이션 transition_overlay_target 가드 (이슈 #245)', () => {
/**
* DataGrid 사용 + `params.query.page` 를 가진 navigate handler 가 있는 페이지에서,
* 해당 navigate 가 모두 `transition_overlay_target` 으로 DataGrid ID 를 명시해야 한다.
* 페이지 진입은 베이스 spinner(right_content_area), 페이지네이션 시는 DataGrid
* 영역만 spinner 표시 (방식 B).
*
* fs 동적 스캔 — 본문 + partials/<name>/* 모두 검사하여 신규 페이지 자동 커버.
*/
function findDataGridIds(node: any, out: Set<string> = new Set()): Set<string> {
if (!node || typeof node !== 'object') return out;
if (node.name === 'DataGrid' && typeof node.id === 'string') out.add(node.id);
for (const key of Object.keys(node)) {
const v = node[key];
if (Array.isArray(v)) for (const item of v) findDataGridIds(item, out);
else if (v && typeof v === 'object') findDataGridIds(v, out);
}
return out;
}
function findPageNavigates(node: any, out: any[] = []): any[] {
if (!node || typeof node !== 'object') return out;
if (node.handler === 'navigate' && node.params?.query && Object.prototype.hasOwnProperty.call(node.params.query, 'page')) {
out.push(node);
}
for (const key of Object.keys(node)) {
const v = node[key];
if (Array.isArray(v)) for (const item of v) findPageNavigates(item, out);
else if (v && typeof v === 'object') findPageNavigates(v, out);
}
return out;
}
function loadAllForLayout(name: string): { layout: any; allFiles: any[] } {
const layoutPath = path.join(LAYOUTS_DIR, `${name}.json`);
const layout = JSON.parse(fs.readFileSync(layoutPath, 'utf-8'));
const allFiles: any[] = [layout];
const partialDir = path.join(LAYOUTS_DIR, 'partials', name);
if (fs.existsSync(partialDir)) {
for (const f of fs.readdirSync(partialDir)) {
if (f.endsWith('.json')) {
allFiles.push(JSON.parse(fs.readFileSync(path.join(partialDir, f), 'utf-8')));
}
}
}
return { layout, allFiles };
}
const adminFiles = fs.readdirSync(LAYOUTS_DIR)
.filter((f) => f.startsWith('admin_') && f.endsWith('.json'))
.map((f) => path.basename(f, '.json'));
interface PaginationCase {
name: string;
gridIds: string[];
navigates: any[];
}
const cases: PaginationCase[] = adminFiles
.map((name) => {
const { allFiles } = loadAllForLayout(name);
const gridIds = new Set<string>();
const navigates: any[] = [];
for (const file of allFiles) {
findDataGridIds(file, gridIds);
findPageNavigates(file, navigates);
}
return { name, gridIds: Array.from(gridIds), navigates };
})
.filter((c) => c.gridIds.length > 0 && c.navigates.length > 0);
it('스캔 대상 어드민 페이지가 1개 이상이어야 한다 (회귀 방지)', () => {
expect(cases.length).toBeGreaterThan(0);
});
for (const c of cases) {
it(`${c.name}: 모든 페이지네이션 navigate 에 transition_overlay_target 이 DataGrid body id(\${gridId}__body) 로 명시되어야 한다`, () => {
// DataGrid root id 는 React tree + 외부 참조용으로 유지되고,
// spinner mount 대상(pagination 제외 영역)은 DataGrid 내부 body wrapper 의 `${id}__body` 이다.
const allowed = new Set(c.gridIds.map((id) => `${id}__body`));
for (let i = 0; i < c.navigates.length; i++) {
const nav = c.navigates[i];
const target = nav.params?.transition_overlay_target;
expect(typeof target, `${c.name} navigate[${i}]: transition_overlay_target 미명시`).toBe('string');
expect(allowed.has(target), `${c.name} navigate[${i}]: transition_overlay_target="${target}" 가 DataGrid body id 와 일치하지 않음 (기대: ${[...allowed].join('|')})`).toBe(true);
}
});
}
});
describe('채널 서브 탭 transition_overlay_target 가드 (이슈 #245, engine-v1.36.0)', () => {
/**
* 환경설정 알림 탭 안의 채널 서브 탭 클릭 시 채널 콘텐츠 영역에만 spinner 가
* 표시되도록 하는 navigate.params.transition_overlay_target 옵션의 회귀 가드.
* 두 partial 모두 channel sub-tab navigate handler 에 transition_overlay_target 이 명시되어야 함.
*/
const channelTabCases = [
{
name: 'admin_settings/_tab_notification_definitions',
partial: JSON.parse(fs.readFileSync(
path.resolve(LAYOUTS_DIR, 'partials/admin_settings/_tab_notification_definitions.json'),
'utf-8'
)),
wrapperId: 'notif_channel_content',
},
];
function collectNavigateHandlers(node: any, out: any[] = []): any[] {
if (!node || typeof node !== 'object') return out;
if (node.handler === 'navigate' && node.params && typeof node.params === 'object') {
out.push(node);
}
for (const key of Object.keys(node)) {
const value = node[key];
if (Array.isArray(value)) {
for (const item of value) collectNavigateHandlers(item, out);
} else if (value && typeof value === 'object') {
collectNavigateHandlers(value, out);
}
}
return out;
}
for (const { name, partial, wrapperId } of channelTabCases) {
it(`${name}: 채널 wrapper (${wrapperId}) 가 존재해야 한다`, () => {
const found = findById(partial, wrapperId);
expect(found, `${wrapperId} 미존재`).toBeDefined();
});
it(`${name}: 채널 탭 navigate 에 transition_overlay_target=${wrapperId} 가 명시되어야 한다`, () => {
const navs = collectNavigateHandlers(partial);
const channelNavs = navs.filter((n) =>
n.params?.query && Object.prototype.hasOwnProperty.call(n.params.query, 'channel')
);
expect(channelNavs.length, '채널 탭 navigate handler 미발견').toBeGreaterThan(0);
for (const nav of channelNavs) {
expect(nav.params.transition_overlay_target).toBe(wrapperId);
}
});
}
});
describe('admin_settings 탭 콘텐츠 영역 spinner (이슈 #245)', () => {
/**
* 환경설정 탭 클릭 시 탭 콘텐츠 영역(settings_tab_content)에만 spinner 가 표시되어야 한다.
* 사용자 마이페이지(target: mypage_tab_content)와 동일 패턴.
* 베이스의 target=right_content_area 를 admin_settings 가 settings_tab_content 로 override.
*/
it('admin_settings.transition_overlay.target 이 settings_tab_content 여야 한다', () => {
const overlay = (adminSettings as any).transition_overlay;
expect(overlay?.target).toBe('settings_tab_content');
});
it('admin_settings.transition_overlay.fallback_target 이 right_content_area 여야 한다', () => {
const overlay = (adminSettings as any).transition_overlay;
expect(overlay?.fallback_target).toBe('right_content_area');
});
it('admin_settings 의 settings_content 안에 settings_tab_content wrapper 가 존재해야 한다', () => {
const settingsContent = findById((adminSettings as any).slots?.content ?? [], 'settings_content');
expect(settingsContent, 'settings_content 미존재').toBeDefined();
const tabContent = findById(settingsContent!.children, 'settings_tab_content');
expect(tabContent, 'settings_tab_content wrapper 미존재').toBeDefined();
});
it('settings_tab_content 안에 9개 탭 partial 이 모두 들어 있어야 한다', () => {
const settingsContent = findById((adminSettings as any).slots?.content ?? [], 'settings_content');
const tabContent = findById(settingsContent!.children, 'settings_tab_content');
const partials = (tabContent!.children ?? []).filter((c: any) => c.partial?.includes('partials/admin_settings/_tab_'));
expect(partials.length).toBe(9);
});
});
describe('어드민 자식 레이아웃 wait_for 일괄 가드 (이슈 #245, engine-v1.30.0+)', () => {
/**
* _admin_base 를 extends 하는 모든 어드민 페이지에 대해:
* 1. progressive 데이터소스가 1개 이상 존재하면 transition_overlay.wait_for 명시 필수
* 2. wait_for 에는 해당 페이지의 모든 progressive(api, non-background) 데이터소스가 포함되어야 함
* 3. wait_for ID 는 모두 data_sources 에 존재해야 하며 background/websocket 이 아니어야 함
*
* fs 기반 동적 스캔으로 신규 페이지 추가 시 자동 검증.
*/
const adminFiles = fs.readdirSync(LAYOUTS_DIR)
.filter((f) => f.startsWith('admin_') && f.endsWith('.json'))
.map((f) => path.join(LAYOUTS_DIR, f));
interface PageInfo {
name: string;
layout: any;
progressiveIds: string[];
}
const pages: PageInfo[] = adminFiles
.map((file) => {
const layout = JSON.parse(fs.readFileSync(file, 'utf-8'));
const dataSources: any[] = layout.data_sources ?? [];
const progressiveIds = dataSources
.filter((s) => {
const type = s.type ?? 'api';
const strategy = s.loading_strategy ?? 'progressive';
return type !== 'websocket' && strategy !== 'blocking' && strategy !== 'background';
})
.map((s) => s.id as string);
return { name: path.basename(file, '.json'), layout, progressiveIds };
})
.filter((p) => p.layout.extends === '_admin_base' && p.progressiveIds.length > 0);
it('스캔 대상 페이지가 1개 이상이어야 한다 (회귀 방지)', () => {
expect(pages.length).toBeGreaterThan(0);
});
for (const page of pages) {
it(`${page.name}: transition_overlay.wait_for 가 명시되어야 한다`, () => {
const waitFor = page.layout.transition_overlay?.wait_for;
expect(waitFor, `${page.name}: wait_for 미명시`).toBeDefined();
expect(Array.isArray(waitFor)).toBe(true);
expect((waitFor as string[]).length).toBeGreaterThan(0);
});
it(`${page.name}: wait_for 가 모든 progressive 데이터소스를 포함해야 한다`, () => {
const waitFor: string[] = page.layout.transition_overlay?.wait_for ?? [];
for (const id of page.progressiveIds) {
expect(
waitFor.includes(id),
`${page.name}: progressive 데이터소스 "${id}" 가 wait_for 에 누락`
).toBe(true);
}
});
it(`${page.name}: wait_for ID 는 모두 data_sources 에 존재하고 background/websocket 이 아니어야 한다`, () => {
const waitFor: string[] = page.layout.transition_overlay?.wait_for ?? [];
const byId = new Map<string, any>((page.layout.data_sources ?? []).map((s: any) => [s.id, s]));
for (const id of waitFor) {
const source = byId.get(id);
expect(source, `${page.name}: data_sources 에 ${id} 미존재`).toBeDefined();
expect(source.type === 'websocket', `${page.name}: ${id} 가 websocket`).toBe(false);
expect((source.loading_strategy ?? 'progressive') === 'background', `${page.name}: ${id} 가 background`).toBe(false);
}
});
}
});
describe('어드민 자식 레이아웃 베이스 상속 (이슈 #245)', () => {
/**
* 베이스의 transition_overlay 가 자식 레이아웃에 자동 전파되는지 보장하기 위해,
* 어드민 폼/디테일 레이아웃이 _admin_base 를 extends 하는지 검증한다.
* (LayoutService 는 부모-자식 transition_overlay 병합을 child 우선/parent fallback 으로 처리)
*/
const inheritanceCases: Array<{ name: string; layout: any }> = [
{ name: 'admin_settings', layout: adminSettings },
{ name: 'admin_user_form', layout: adminUserForm },
{ name: 'admin_user_detail', layout: adminUserDetail },
{ name: 'admin_role_form', layout: adminRoleForm },
{ name: 'admin_template_layout_edit', layout: adminTemplateLayoutEdit },
];
for (const { name, layout } of inheritanceCases) {
it(`${name} 은 _admin_base 를 extends 해야 한다`, () => {
expect(layout.extends).toBe('_admin_base');
});
}
});
describe('어드민 폼 컨테이너 전체 페이지 blur 제거 (이슈 #245)', () => {
const cases: Array<{ name: string; layout: any; containerId: string }> = [
{ name: 'admin_settings#settings_content', layout: adminSettings, containerId: 'settings_content' },
{ name: 'admin_user_form#user_form_content', layout: adminUserForm, containerId: 'user_form_content' },
{ name: 'admin_user_detail#user_detail_content', layout: adminUserDetail, containerId: 'user_detail_content' },
{ name: 'admin_role_form#role_form', layout: adminRoleForm, containerId: 'role_form' },
{ name: 'admin_template_layout_edit#main_grid', layout: adminTemplateLayoutEdit, containerId: 'main_grid' },
{ name: 'admin_template_layout_edit#mobile_file_selector', layout: adminTemplateLayoutEdit, containerId: 'mobile_file_selector' },
{ name: 'admin_menu_list/_panel_form#menu_form', layout: adminMenuPanelForm, containerId: 'menu_form' },
];
for (const { name, layout, containerId } of cases) {
it(`${name} 컨테이너에 blur_until_loaded 가 정의되어 있지 않아야 한다`, () => {
const node = findById(layout.components ?? layout, containerId);
expect(node, `${containerId} 컨테이너를 찾지 못함`).toBeDefined();
expect(node!.blur_until_loaded).toBeUndefined();
});
}
});
@@ -0,0 +1,357 @@
/**
* @file admin-extension-detail-dependencies.test.tsx
* @description 모듈/플러그인/템플릿 정보 모달 - 의존성 섹션 렌더링 테스트
*
* 테스트 대상:
* - partials/admin_module_list/_modal_detail.json (dependencies_section)
* - partials/admin_plugin_list/_modal_detail.json (dependencies_section)
* - partials/admin_template_list/_modal_detail.json (dependencies_section)
*
* 검증:
* - 코어 요구 버전 배지 렌더링 (값 있음/없음)
* - 의존성 없을 때 "없음" 메시지
* - 의존 모듈/플러그인 행 렌더링 — 요구 버전, 설치 버전, 충족 상태 뱃지
*/
import React from 'react';
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { createLayoutTest, screen } from '@core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@core/template-engine/ComponentRegistry';
const TestDiv: React.FC<any> = ({ className, children }) => (
<div className={className}>{children}</div>
);
const TestSpan: React.FC<any> = ({ className, children, text }) => (
<span className={className}>{children || text}</span>
);
const TestP: React.FC<any> = ({ className, children, text }) => (
<p className={className}>{children || text}</p>
);
const TestIcon: React.FC<any> = ({ name, className }) => (
<i className={className} data-icon={name} />
);
const TestFragment: React.FC<any> = ({ children }) => <>{children}</>;
function setupRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
(registry as any).registry = {
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
Span: { component: TestSpan, metadata: { name: 'Span', type: 'basic' } },
P: { component: TestP, metadata: { name: 'P', type: 'basic' } },
Icon: { component: TestIcon, metadata: { name: 'Icon', type: 'basic' } },
Fragment: { component: TestFragment, metadata: { name: 'Fragment', type: 'layout' } },
};
return registry;
}
const translations = {
admin: {
modules: {
modals: {
dependencies: '의존성',
required_core_version: '코어 요구 버전',
no_required_core_version: '지정되지 않음',
no_dependencies_required: '의존하는 확장이 없습니다.',
dependency_required_version: '요구: {{version}}',
dependency_installed_version: '설치: {{version}}',
dependency_not_installed: '미설치',
dependency_met: '충족',
dependency_unmet_version: '버전 불일치',
dependency_inactive: '비활성',
},
},
plugins: {
modals: {
dependencies: '의존성',
required_core_version: '코어 요구 버전',
no_required_core_version: '지정되지 않음',
no_dependencies_required: '의존하는 확장이 없습니다.',
dependency_required_version: '요구: {{version}}',
dependency_installed_version: '설치: {{version}}',
dependency_not_installed: '미설치',
dependency_met: '충족',
dependency_unmet_version: '버전 불일치',
dependency_inactive: '비활성',
},
},
templates: {
modals: {
dependencies: '의존성',
required_core_version: '코어 요구 버전',
no_required_core_version: '지정되지 않음',
no_dependencies_required: '의존하는 확장이 없습니다.',
dependency_required_version: '요구: {{version}}',
dependency_installed_version: '설치: {{version}}',
dependency_not_installed: '미설치',
dependency_met: '충족',
dependency_unmet_version: '버전 불일치',
dependency_inactive: '비활성',
},
},
},
};
function loadModulePartial(relativePath: string): any {
const fs = require('fs');
const path = require('path');
const full = path.resolve(__dirname, '..', '..', 'layouts', relativePath);
const json = JSON.parse(fs.readFileSync(full, 'utf-8'));
const root = json.children?.[0] ?? json;
return (root.children ?? []).find((c: any) => c.id === 'dependencies_section');
}
function buildLayoutFromSection(section: any, globalKey: string, value: Record<string, any>) {
return {
version: '1.0.0',
layout_name: 'dependency_section_test',
initGlobal: { [globalKey]: value },
components: [section],
};
}
describe('모듈 정보 모달 - 의존성 섹션', () => {
let testUtils: ReturnType<typeof createLayoutTest>;
let registry: ComponentRegistry;
let section: any;
beforeEach(() => {
registry = setupRegistry();
section = loadModulePartial('partials/admin_module_list/_modal_detail.json');
});
afterEach(() => {
if (testUtils) testUtils.cleanup();
});
it('dependencies_section 이 partial 에 존재한다', () => {
expect(section).toBeDefined();
expect(section.id).toBe('dependencies_section');
});
it('requires_core 값이 있으면 버전 문자열이 배지로 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: '>=7.0.0-beta.2',
dependencies: [],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('>=7.0.0-beta.2')).toBeTruthy();
expect(screen.getByText('의존하는 확장이 없습니다.')).toBeTruthy();
});
it('requires_core 가 null 이면 "지정되지 않음" 메시지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: null,
dependencies: [],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('지정되지 않음')).toBeTruthy();
});
it('충족된 모듈 의존성 행에 "충족" 뱃지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: '>=7.0.0-beta.2',
dependencies: [
{
identifier: 'sirsoft-ecommerce',
name: '상점',
type: 'module',
required_version: '>=1.0.0',
installed_version: '1.2.0',
is_active: true,
is_met: true,
},
],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('상점 (sirsoft-ecommerce)')).toBeTruthy();
expect(screen.getByText('요구: >=1.0.0')).toBeTruthy();
expect(screen.getByText('설치: 1.2.0')).toBeTruthy();
expect(screen.getByText('충족')).toBeTruthy();
});
it('미설치 의존성 행에 "미설치" 뱃지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: '>=7.0.0-beta.2',
dependencies: [
{
identifier: 'missing-module',
name: 'missing-module',
type: 'module',
required_version: '>=1.0.0',
installed_version: null,
is_active: false,
is_met: false,
},
],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('미설치')).toBeTruthy();
});
it('설치되었지만 비활성 의존성에 "비활성" 뱃지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: '>=7.0.0-beta.2',
dependencies: [
{
identifier: 'inactive-module',
name: 'inactive-module',
type: 'module',
required_version: '>=1.0.0',
installed_version: '1.0.0',
is_active: false,
is_met: false,
},
],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('비활성')).toBeTruthy();
});
it('설치/활성이지만 버전 불일치인 의존성에 "버전 불일치" 뱃지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedModule', {
requires_core: '>=7.0.0-beta.2',
dependencies: [
{
identifier: 'old-module',
name: 'old-module',
type: 'module',
required_version: '>=2.0.0',
installed_version: '1.0.0',
is_active: true,
is_met: false,
},
],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('버전 불일치')).toBeTruthy();
});
});
describe('플러그인 정보 모달 - 의존성 섹션', () => {
let testUtils: ReturnType<typeof createLayoutTest>;
let registry: ComponentRegistry;
let section: any;
beforeEach(() => {
registry = setupRegistry();
section = loadModulePartial('partials/admin_plugin_list/_modal_detail.json');
});
afterEach(() => {
if (testUtils) testUtils.cleanup();
});
it('dependencies_section 이 plugin partial 에 존재한다', () => {
expect(section).toBeDefined();
});
it('requires_core 와 충족 뱃지가 함께 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedPlugin', {
requires_core: '>=7.0.0-beta.2',
dependencies: [
{
identifier: 'sirsoft-board',
name: '게시판',
type: 'module',
required_version: '>=1.0.0',
installed_version: '1.1.0',
is_active: true,
is_met: true,
},
],
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('>=7.0.0-beta.2')).toBeTruthy();
expect(screen.getByText('게시판 (sirsoft-board)')).toBeTruthy();
expect(screen.getByText('충족')).toBeTruthy();
});
});
describe('템플릿 정보 모달 - 의존성 섹션', () => {
let testUtils: ReturnType<typeof createLayoutTest>;
let registry: ComponentRegistry;
let section: any;
beforeEach(() => {
registry = setupRegistry();
section = loadModulePartial('partials/admin_template_list/_modal_detail.json');
});
afterEach(() => {
if (testUtils) testUtils.cleanup();
});
it('dependencies_section 이 template partial 에 존재한다', () => {
expect(section).toBeDefined();
});
it('의존성 없을 때 "없음" 메시지와 코어 요구 버전이 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedTemplate', {
requires_core: '>=7.0.0-beta.2',
dependencies: { modules: [], plugins: [] },
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('>=7.0.0-beta.2')).toBeTruthy();
expect(screen.getByText('의존하는 확장이 없습니다.')).toBeTruthy();
});
it('모듈 의존성에 버전 및 충족 뱃지가 표시된다', async () => {
testUtils = createLayoutTest(
buildLayoutFromSection(section, 'selectedTemplate', {
requires_core: '>=7.0.0-beta.2',
dependencies: {
modules: [
{
identifier: 'sirsoft-ecommerce',
name: '상점',
required_version: '>=1.0.0',
installed_version: '1.2.0',
is_active: true,
is_met: true,
},
],
plugins: [],
},
}),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('상점 (sirsoft-ecommerce)')).toBeTruthy();
expect(screen.getByText('요구: >=1.0.0')).toBeTruthy();
expect(screen.getByText('설치: 1.2.0')).toBeTruthy();
expect(screen.getByText('충족')).toBeTruthy();
});
});
@@ -0,0 +1,195 @@
/**
* @file admin-install-modal-vendor-mode.test.tsx
* @description 모듈/플러그인 설치 모달의 vendor_mode Select 필드 레이아웃 구조 회귀 테스트
*
* 테스트 대상:
* - templates/.../partials/admin_module_list/_modal_install.json
* - templates/.../partials/admin_plugin_list/_modal_install.json
*
* 검증 항목:
* - vendor_mode Select 컴포넌트 존재
* - options 배열에 auto/composer/bundled 3종 포함
* - apiCall body 에 vendor_mode 바인딩 포함
* - change 액션이 _global.{module|plugin}InstallVendorMode 로 setState
* - 다국어 키 ($t:admin.modules.modals.vendor_mode_* / admin.plugins.modals.vendor_mode_*) 사용
*/
import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
const repoRoot = path.resolve(__dirname, '../../../../..');
interface LayoutNode {
type?: string;
name?: string;
props?: Record<string, any>;
children?: LayoutNode[];
text?: string;
actions?: Array<{
type?: string;
handler: string;
params?: Record<string, any>;
target?: string;
onSuccess?: any[];
onError?: any[];
actions?: any[];
}>;
}
/**
* 트리 순회 헬퍼 — 조건을 만족하는 모든 노드를 수집한다.
*/
function findAll(node: LayoutNode | undefined, predicate: (n: LayoutNode) => boolean): LayoutNode[] {
if (!node) return [];
const result: LayoutNode[] = [];
if (predicate(node)) result.push(node);
if (Array.isArray(node.children)) {
for (const child of node.children) {
result.push(...findAll(child, predicate));
}
}
// actions 내부 sequence 의 중첩 actions 도 탐색
if (Array.isArray(node.actions)) {
for (const action of node.actions) {
if (Array.isArray((action as any).actions)) {
for (const sub of (action as any).actions) {
// sequence sub-actions — apiCall body 등 탐색 대상에 포함
result.push(...findAll(sub as LayoutNode, predicate));
}
}
}
}
return result;
}
function loadLayout(relativePath: string): LayoutNode {
const filePath = path.join(repoRoot, relativePath);
const content = fs.readFileSync(filePath, 'utf8');
return JSON.parse(content);
}
describe('admin install modals — vendor_mode Select 필드', () => {
describe('모듈 설치 모달 (_modal_install.json)', () => {
const layout = loadLayout(
'templates/_bundled/sirsoft-admin_basic/layouts/partials/admin_module_list/_modal_install.json'
);
it('Select 컴포넌트가 존재한다', () => {
const selects = findAll(layout, (n) => n.name === 'Select');
expect(selects.length).toBeGreaterThanOrEqual(1);
});
it('vendor_mode options 가 auto/composer/bundled 3종을 포함한다', () => {
const selects = findAll(
layout,
(n) => n.name === 'Select' && Array.isArray(n.props?.options),
);
const vendorSelect = selects.find((s) =>
(s.props?.options ?? []).some((opt: any) => opt?.value === 'auto'),
);
expect(vendorSelect).toBeDefined();
const values = (vendorSelect!.props!.options as Array<{ value: string }>).map((o) => o.value);
expect(values).toContain('auto');
expect(values).toContain('composer');
expect(values).toContain('bundled');
});
it('vendor_mode Select 가 _global.moduleInstallVendorMode 를 value 로 바인딩한다', () => {
const selects = findAll(layout, (n) => n.name === 'Select');
const vendorSelect = selects.find((s) =>
typeof s.props?.value === 'string' && s.props.value.includes('moduleInstallVendorMode'),
);
expect(vendorSelect).toBeDefined();
});
it('vendor_mode change 액션이 _global.moduleInstallVendorMode 로 setState 한다', () => {
const selects = findAll(layout, (n) => n.name === 'Select');
const vendorSelect = selects.find((s) =>
(s.props?.options ?? []).some((opt: any) => opt?.value === 'bundled'),
);
expect(vendorSelect).toBeDefined();
const changeAction = (vendorSelect!.actions ?? []).find(
(a) => a.type === 'change' && a.handler === 'setState',
);
expect(changeAction).toBeDefined();
expect(changeAction!.params).toMatchObject({
target: 'global',
moduleInstallVendorMode: expect.stringContaining('$event.target.value'),
});
});
it('다국어 키 admin.modules.modals.vendor_mode_* 를 사용한다', () => {
const content = JSON.stringify(layout);
expect(content).toContain('$t:admin.modules.modals.vendor_mode_label');
expect(content).toContain('$t:admin.modules.modals.vendor_mode_auto');
expect(content).toContain('$t:admin.modules.modals.vendor_mode_composer');
expect(content).toContain('$t:admin.modules.modals.vendor_mode_bundled');
});
it('apiCall body 에 vendor_mode 바인딩이 포함된다', () => {
// sequence 내부 apiCall 찾기
const content = JSON.stringify(layout);
expect(content).toContain('"vendor_mode"');
expect(content).toContain('{{_global.moduleInstallVendorMode');
});
});
describe('플러그인 설치 모달 (_modal_install.json)', () => {
const layout = loadLayout(
'templates/_bundled/sirsoft-admin_basic/layouts/partials/admin_plugin_list/_modal_install.json'
);
it('vendor_mode Select 가 auto/composer/bundled 를 제공한다', () => {
const selects = findAll(
layout,
(n) => n.name === 'Select' && Array.isArray(n.props?.options),
);
const vendorSelect = selects.find((s) =>
(s.props?.options ?? []).some((opt: any) => opt?.value === 'auto'),
);
expect(vendorSelect).toBeDefined();
const values = (vendorSelect!.props!.options as Array<{ value: string }>).map((o) => o.value);
expect(values).toEqual(expect.arrayContaining(['auto', 'composer', 'bundled']));
});
it('_global.pluginInstallVendorMode 를 value 로 바인딩한다', () => {
const selects = findAll(layout, (n) => n.name === 'Select');
const vendorSelect = selects.find((s) =>
typeof s.props?.value === 'string' && s.props.value.includes('pluginInstallVendorMode'),
);
expect(vendorSelect).toBeDefined();
});
it('change 액션이 _global.pluginInstallVendorMode 로 setState 한다', () => {
const selects = findAll(layout, (n) => n.name === 'Select');
const vendorSelect = selects.find((s) =>
(s.props?.options ?? []).some((opt: any) => opt?.value === 'bundled'),
);
const changeAction = (vendorSelect!.actions ?? []).find(
(a) => a.type === 'change' && a.handler === 'setState',
);
expect(changeAction).toBeDefined();
expect(changeAction!.params).toMatchObject({
target: 'global',
pluginInstallVendorMode: expect.stringContaining('$event.target.value'),
});
});
it('다국어 키 admin.plugins.modals.vendor_mode_* 를 사용한다', () => {
const content = JSON.stringify(layout);
expect(content).toContain('$t:admin.plugins.modals.vendor_mode_label');
expect(content).toContain('$t:admin.plugins.modals.vendor_mode_auto');
expect(content).toContain('$t:admin.plugins.modals.vendor_mode_composer');
expect(content).toContain('$t:admin.plugins.modals.vendor_mode_bundled');
});
it('apiCall body 에 vendor_mode 바인딩이 포함된다', () => {
const content = JSON.stringify(layout);
expect(content).toContain('"vendor_mode"');
expect(content).toContain('{{_global.pluginInstallVendorMode');
});
});
});
@@ -1,349 +0,0 @@
/**
* @file admin-mail-template-list.test.tsx
* @description 환경설정 메일 템플릿 탭 레이아웃 테스트
*
* 테스트 대상:
* - templates/.../partials/admin_settings/_tab_mail_templates.json
* - templates/.../partials/admin_settings/_modal_mail_template_form.json
*
* 검증 항목:
* - 검색 UI 렌더링 (검색 타입 Select, 검색 Input, 검색/초기화 버튼)
* - 페이지네이션 표시 조건
* - 편집 전용 모달 구조
* - 빈 목록 메시지 표시
* - 데이터 경로 (mailTemplates?.data?.data)
*/
import * as fs from 'fs';
import * as path from 'path';
import { describe, it, expect } from 'vitest';
// ==============================
// 실제 레이아웃 JSON 로드
// ==============================
const tabLayoutPath = path.resolve(
__dirname,
'../../layouts/partials/admin_settings/_tab_mail_templates.json'
);
const tabLayout = JSON.parse(fs.readFileSync(tabLayoutPath, 'utf-8'));
const formModalPath = path.resolve(
__dirname,
'../../layouts/partials/admin_settings/_modal_mail_template_form.json'
);
const formModalLayout = JSON.parse(fs.readFileSync(formModalPath, 'utf-8'));
// ==============================
// 헬퍼 함수: 컴포넌트 탐색
// ==============================
function findById(node: any, id: string): any {
if (node.id === id) return node;
const children = node.children ?? [];
for (const child of children) {
const found = findById(child, id);
if (found) return found;
}
return null;
}
function findAllByName(node: any, name: string): any[] {
const results: any[] = [];
if (node.name === name) results.push(node);
const children = node.children ?? [];
for (const child of children) {
results.push(...findAllByName(child, name));
}
return results;
}
// ==============================
// 테스트
// ==============================
describe('환경설정 메일 템플릿 탭 - 검색/페이지네이션/편집', () => {
describe('탭 레이아웃 구조 검증', () => {
it('탭 루트에 if 조건이 mail_templates 탭 확인이다', () => {
expect(tabLayout.if).toBe("{{(_global.activeSettingsTab || query.tab || 'general') === 'mail_templates'}}");
});
it('헤더 영역이 존재한다', () => {
expect(findById(tabLayout, 'mail_templates_header')).not.toBeNull();
});
it('검색 영역이 존재한다', () => {
expect(findById(tabLayout, 'mail_templates_search')).not.toBeNull();
});
it('정보 영역이 존재한다 (총 건수, 페이지당)', () => {
expect(findById(tabLayout, 'mail_templates_info')).not.toBeNull();
});
it('카드 목록이 존재한다', () => {
expect(findById(tabLayout, 'mail_templates_list')).not.toBeNull();
});
it('빈 목록 메시지가 존재한다', () => {
const empty = findById(tabLayout, 'mail_templates_empty');
expect(empty).not.toBeNull();
expect(empty.if).toBe('{{(mailTemplates?.data?.data ?? []).length === 0}}');
});
it('페이지네이션이 항상 표시된다', () => {
const pagination = findById(tabLayout, 'mail_templates_pagination');
expect(pagination).not.toBeNull();
expect(pagination.if).toBeUndefined();
});
});
describe('헤더 영역 검증', () => {
it('헤더에 새 템플릿 버튼이 없다 (등록 기능 제거됨)', () => {
const header = findById(tabLayout, 'mail_templates_header');
const buttons = findAllByName(header, 'Button');
const createButtons = buttons.filter((b: any) =>
b.actions?.some((a: any) => a.handler === 'sequence' &&
a.actions?.some((sa: any) => sa.handler === 'openModal'))
);
expect(createButtons.length).toBe(0);
});
});
describe('검색 영역 검증', () => {
it('검색 타입 Select가 3개 옵션을 가진다 (전체/제목/본문)', () => {
const search = findById(tabLayout, 'mail_templates_search');
const selects = findAllByName(search, 'Select');
expect(selects.length).toBeGreaterThanOrEqual(1);
const options = selects[0].props.options;
expect(options).toHaveLength(3);
expect(options.map((o: any) => o.value)).toEqual(['all', 'subject', 'body']);
});
it('검색 Input이 존재하고 로컬 상태에 바인딩된다', () => {
const search = findById(tabLayout, 'mail_templates_search');
const inputs = findAllByName(search, 'Input');
expect(inputs.length).toBeGreaterThanOrEqual(1);
expect(inputs[0].props.value).toBe("{{_local.mailTemplateFilter?.search || ''}}");
});
it('검색 Input에서 Enter 키 시 navigate(replace:true)로 URL 쿼리 업데이트', () => {
const search = findById(tabLayout, 'mail_templates_search');
const inputs = findAllByName(search, 'Input');
const keydownAction = inputs[0].actions.find((a: any) => a.type === 'keydown');
expect(keydownAction).toBeDefined();
expect(keydownAction.key).toBe('Enter');
expect(keydownAction.handler).toBe('navigate');
expect(keydownAction.params.replace).toBe(true);
expect(keydownAction.params.query.page).toBe(1);
expect(keydownAction.params.query.tab).toBe('mail_templates');
});
it('검색 버튼 클릭 시 navigate(replace:true)로 URL 쿼리 업데이트', () => {
const search = findById(tabLayout, 'mail_templates_search');
const buttons = findAllByName(search, 'Button');
const clickAction = buttons[0].actions[0];
expect(clickAction.handler).toBe('navigate');
expect(clickAction.params.replace).toBe(true);
expect(clickAction.params.query.page).toBe(1);
expect(clickAction.params.query.tab).toBe('mail_templates');
});
it('초기화 버튼이 필터를 기본값으로 리셋하고 navigate로 쿼리 정리', () => {
const search = findById(tabLayout, 'mail_templates_search');
const buttons = findAllByName(search, 'Button');
const resetBtn = buttons[1];
const clickAction = resetBtn.actions[0];
expect(clickAction.handler).toBe('sequence');
const setStateAction = clickAction.actions.find((a: any) => a.handler === 'setState');
expect(setStateAction.params.mailTemplateFilter.search).toBe('');
expect(setStateAction.params.mailTemplateFilter.searchType).toBe('all');
const navigateAction = clickAction.actions.find((a: any) => a.handler === 'navigate');
expect(navigateAction.params.replace).toBe(true);
expect(navigateAction.params.query.tab).toBe('mail_templates');
});
});
describe('카드 목록 검증', () => {
it('iteration source가 mailTemplates?.data?.data 경로를 사용한다', () => {
const card = findById(tabLayout, 'template_card');
expect(card).not.toBeNull();
expect(card.iteration.source).toBe('{{mailTemplates?.data?.data ?? []}}');
expect(card.iteration.item_var).toBe('tpl');
expect(card.iteration.index_var).toBe('tplIdx');
});
it('삭제 버튼이 없다 (삭제 기능 제거됨)', () => {
const deleteBtn = findById(tabLayout, 'btn_delete_{{tplIdx}}');
expect(deleteBtn).toBeNull();
});
it('기본값 복원 버튼에 if 조건이 있다 (is_default=false만)', () => {
const resetBtn = findById(tabLayout, 'btn_reset_{{tplIdx}}');
expect(resetBtn).not.toBeNull();
expect(resetBtn.if).toBe('{{!tpl.is_default}}');
});
it('편집 버튼이 modal_mail_template_form을 연다', () => {
const editBtn = findById(tabLayout, 'btn_edit_{{tplIdx}}');
expect(editBtn).not.toBeNull();
const clickAction = editBtn.actions[0];
const openModal = clickAction.actions.find((a: any) => a.handler === 'openModal');
expect(openModal.target).toBe('modal_mail_template_form');
});
it('편집 버튼이 editingTemplate에 tpl 데이터를 설정한다', () => {
const editBtn = findById(tabLayout, 'btn_edit_{{tplIdx}}');
const clickAction = editBtn.actions[0];
const setState = clickAction.actions.find((a: any) => a.handler === 'setState');
expect(setState.params.editingTemplate).toBe('{{tpl}}');
expect(setState.params.templateErrors).toBeNull();
expect(setState.params.isSaving).toBe(false);
});
});
describe('페이지네이션 검증', () => {
it('Pagination 컴포넌트가 올바른 props를 가진다', () => {
const paginationSection = findById(tabLayout, 'mail_templates_pagination');
const paginations = findAllByName(paginationSection, 'Pagination');
expect(paginations.length).toBe(1);
const pagination = paginations[0];
expect(pagination.props.currentPage).toBe('{{mailTemplates?.data?.pagination?.current_page || 1}}');
expect(pagination.props.totalPages).toBe('{{mailTemplates?.data?.pagination?.last_page || 1}}');
});
it('onPageChange 이벤트가 navigate(replace:true, mergeQuery:true)를 호출한다', () => {
const paginationSection = findById(tabLayout, 'mail_templates_pagination');
const paginations = findAllByName(paginationSection, 'Pagination');
const pageChangeAction = paginations[0].actions.find((a: any) => a.event === 'onPageChange');
expect(pageChangeAction.handler).toBe('navigate');
expect(pageChangeAction.params.replace).toBe(true);
expect(pageChangeAction.params.mergeQuery).toBe(true);
expect(pageChangeAction.params.query.page).toBe('{{$args[0]}}');
});
});
describe('편집 전용 모달 레이아웃 검증', () => {
it('모달 ID가 modal_mail_template_form이다', () => {
expect(formModalLayout.id).toBe('modal_mail_template_form');
});
it('모달이 xl 사이즈이다', () => {
expect(formModalLayout.props.size).toBe('xl');
});
it('모달 타이틀이 편집 전용이다', () => {
expect(formModalLayout.props.title).toContain('edit_modal.title');
});
it('type 입력 필드가 없다 (생성 모드 제거)', () => {
const typeInput = findById(formModalLayout, 'type_input_section');
expect(typeInput).toBeNull();
});
it('type 표시 섹션이 항상 표시된다 (조건 없음)', () => {
const typeDisplay = findById(formModalLayout, 'type_display_section');
expect(typeDisplay).not.toBeNull();
expect(typeDisplay.if).toBeUndefined();
});
it('한국어/영어 탭이 있다', () => {
const buttons = findAllByName(formModalLayout, 'Button');
const langButtons = buttons.filter((b: any) =>
b.text === '한국어' || b.text === 'English'
);
expect(langButtons.length).toBe(2);
});
it('한국어/영어 제목 입력 필드가 있다 (탭별 조건부)', () => {
const subjectKo = findById(formModalLayout, 'subject_ko');
const subjectEn = findById(formModalLayout, 'subject_en');
expect(subjectKo).not.toBeNull();
expect(subjectEn).not.toBeNull();
expect(subjectKo.if).toContain("=== 'ko'");
expect(subjectEn.if).toContain("=== 'en'");
});
it('한국어/영어 본문 HtmlEditor가 있다 (탭별 조건부)', () => {
const bodyKo = findById(formModalLayout, 'body_ko');
const bodyEn = findById(formModalLayout, 'body_en');
expect(bodyKo).not.toBeNull();
expect(bodyEn).not.toBeNull();
const editorsKo = findAllByName(bodyKo, 'HtmlEditor');
const editorsEn = findAllByName(bodyEn, 'HtmlEditor');
expect(editorsKo.length).toBe(1);
expect(editorsEn.length).toBe(1);
});
it('활성화 토글이 있다', () => {
const toggle = findById(formModalLayout, 'is_active_toggle');
expect(toggle).not.toBeNull();
const toggles = findAllByName(toggle, 'Toggle');
expect(toggles.length).toBe(1);
expect(toggles[0].props.checked).toBe('{{$parent._local.editingTemplate?.is_active ?? true}}');
});
it('변수 정보 섹션이 조건부 표시된다', () => {
const variablesInfo = findById(formModalLayout, 'variables_info');
expect(variablesInfo).not.toBeNull();
expect(variablesInfo.if).toBe('{{($parent._local.editingTemplate?.variables ?? []).length > 0}}');
});
it('검증 에러 배너가 조건부 표시된다', () => {
const errorBanner = findById(formModalLayout, 'validation_error_banner');
expect(errorBanner).not.toBeNull();
expect(errorBanner.if).toBe('{{$parent._local.templateErrors}}');
});
it('저장 버튼이 PUT 메서드로 편집 API를 호출한다', () => {
const saveBtn = findById(formModalLayout, 'btn_save');
expect(saveBtn).not.toBeNull();
const clickAction = saveBtn.actions[0];
expect(clickAction.handler).toBe('sequence');
const apiCallAction = clickAction.actions.find((a: any) => a.handler === 'apiCall');
expect(apiCallAction).toBeDefined();
expect(apiCallAction.target).toContain('editingTemplate');
expect(apiCallAction.params.method).toBe('PUT');
});
it('저장 성공 시 모달 닫기 + navigate로 목록 새로고침', () => {
const saveBtn = findById(formModalLayout, 'btn_save');
const apiCallAction = saveBtn.actions[0].actions.find((a: any) => a.handler === 'apiCall');
const onSuccess = apiCallAction.onSuccess;
const closeModal = onSuccess.find((a: any) => a.handler === 'closeModal');
expect(closeModal).toBeDefined();
expect(closeModal.target).toBe('modal_mail_template_form');
const navigateAction = onSuccess.find((a: any) => a.handler === 'navigate');
expect(navigateAction).toBeDefined();
expect(navigateAction.params.replace).toBe(true);
expect(navigateAction.params.mergeQuery).toBe(true);
});
it('저장 실패 시 에러 상태가 설정된다', () => {
const saveBtn = findById(formModalLayout, 'btn_save');
const apiCallAction = saveBtn.actions[0].actions.find((a: any) => a.handler === 'apiCall');
const onError = apiCallAction.onError;
const setStateAction = onError.find((a: any) => a.handler === 'setState');
expect(setStateAction).toBeDefined();
expect(setStateAction.params.templateErrors).toBe('{{error.errors}}');
expect(setStateAction.params.isSaving).toBe(false);
});
it('취소 버튼이 modal_mail_template_form을 닫는다', () => {
const cancelBtn = findById(formModalLayout, 'btn_cancel');
expect(cancelBtn).not.toBeNull();
const clickAction = cancelBtn.actions[0];
expect(clickAction.handler).toBe('closeModal');
expect(clickAction.target).toBe('modal_mail_template_form');
});
});
});
@@ -0,0 +1,335 @@
/**
* @file admin-notification-log-list.test.tsx
* @description 알림 발송 이력 관리자 페이지 레이아웃 렌더링 테스트
*
* 테스트 대상:
* - templates/.../admin_notification_log_list.json
*
* 검증 항목:
* - 레이아웃 구조 (extends, permissions, data_sources)
* - 채널 탭 동적 생성 (notificationChannels 기반)
* - 상태 필터 (sent/failed/skipped)
* - DataGrid 컬럼 정의
* - Pagination 컴포넌트
* - 상세 모달 참조
* - sort_order 파라미터
* - 상태 관리 (filter 초기값)
*
* @vitest-environment jsdom
*/
import React from 'react';
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { createLayoutTest } from '@core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@core/template-engine/ComponentRegistry';
// ==============================
// 테스트용 컴포넌트 정의
// ==============================
const TestDiv: React.FC<{ className?: string; children?: React.ReactNode; 'data-testid'?: string }> = ({ className, children, 'data-testid': testId }) => (
<div className={className} data-testid={testId}>{children}</div>
);
const TestButton: React.FC<{ type?: string; className?: string; disabled?: boolean; children?: React.ReactNode; onClick?: () => void; 'data-testid'?: string }> = ({ type, className, disabled, children, onClick, 'data-testid': testId }) => (
<button type={type as any} className={className} disabled={disabled} onClick={onClick} data-testid={testId}>{children}</button>
);
const TestSpan: React.FC<{ className?: string; children?: React.ReactNode; text?: string }> = ({ className, children, text }) => (
<span className={className}>{children || text}</span>
);
const TestH1: React.FC<{ className?: string; children?: React.ReactNode; text?: string }> = ({ className, children, text }) => (
<h1 className={className}>{children || text}</h1>
);
const TestP: React.FC<{ className?: string; children?: React.ReactNode; text?: string }> = ({ className, children, text }) => (
<p className={className}>{children || text}</p>
);
const TestIcon: React.FC<{ name?: string; className?: string }> = ({ name, className }) => (
<i className={`icon-${name} ${className || ''}`} data-icon={name} />
);
const TestInput: React.FC<{ type?: string; name?: string; placeholder?: string; className?: string; value?: string; onChange?: any; 'data-testid'?: string }> = ({ type, name, placeholder, className, value, onChange, 'data-testid': testId }) => (
<input type={type} name={name} placeholder={placeholder} className={className} value={value} onChange={onChange} data-testid={testId} />
);
const TestSelect: React.FC<{ name?: string; options?: any[]; value?: string; onChange?: any }> = ({ name, options, value, onChange }) => (
<div data-testid={`select-${name}`}>
<select name={name} value={value} onChange={onChange}>
{options?.map((opt: any) => <option key={opt.value} value={opt.value}>{opt.label}</option>)}
</select>
</div>
);
const TestDataGrid: React.FC<{ data?: any[]; columns?: any[]; loading?: boolean; 'data-testid'?: string }> = ({ data, columns, loading, 'data-testid': testId }) => (
<div data-testid={testId || 'datagrid'} data-loading={loading} data-columns={columns?.length} data-rows={data?.length}>
{columns?.map((col: any) => <span key={col.field} data-testid={`col-${col.field}`}>{col.header}</span>)}
</div>
);
const TestPagination: React.FC<{ currentPage?: number; totalPages?: number }> = ({ currentPage, totalPages }) => (
<div data-testid="pagination" data-current={currentPage} data-total={totalPages}>Pagination</div>
);
const TestLabel: React.FC<{ className?: string; children?: React.ReactNode }> = ({ className, children }) => (
<label className={className}>{children}</label>
);
const TestModal: React.FC<{ id?: string; title?: string; children?: React.ReactNode }> = ({ id, title, children }) => (
<div data-testid={`modal-${id}`} data-title={title}>{children}</div>
);
// ==============================
// 레지스트리 설정
// ==============================
function setupTestRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
(registry as any).registry = {
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
Button: { component: TestButton, metadata: { name: 'Button', type: 'basic' } },
Span: { component: TestSpan, metadata: { name: 'Span', type: 'basic' } },
H1: { component: TestH1, metadata: { name: 'H1', type: 'basic' } },
P: { component: TestP, metadata: { name: 'P', type: 'basic' } },
Icon: { component: TestIcon, metadata: { name: 'Icon', type: 'basic' } },
Input: { component: TestInput, metadata: { name: 'Input', type: 'basic' } },
Label: { component: TestLabel, metadata: { name: 'Label', type: 'basic' } },
Select: { component: TestSelect, metadata: { name: 'Select', type: 'composite' } },
DataGrid: { component: TestDataGrid, metadata: { name: 'DataGrid', type: 'composite' } },
Pagination: { component: TestPagination, metadata: { name: 'Pagination', type: 'composite' } },
Modal: { component: TestModal, metadata: { name: 'Modal', type: 'composite' } },
};
return registry;
}
// ==============================
// 테스트용 레이아웃 (admin_notification_log_list.json 기반)
// ==============================
const notificationLogListLayout = {
version: '1.0.0',
layout_name: 'admin_notification_log_list',
permissions: ['core.notification-logs.read'],
state: {
filter: {
search: '',
statuses: [],
notificationTypes: [],
},
},
data_sources: [
{
id: 'notificationChannels',
type: 'api',
endpoint: '/api/admin/notification-channels',
method: 'GET',
auto_fetch: true,
auth_required: true,
loading_strategy: 'progressive',
fallback: { data: { channels: [] } },
},
{
id: 'notificationLogs',
type: 'api',
endpoint: '/api/admin/notification-logs',
method: 'GET',
auto_fetch: true,
auth_required: true,
loading_strategy: 'progressive',
params: {
page: '{{query.page || 1}}',
per_page: '{{query.per_page || 20}}',
search: '{{query.search}}',
channel: '{{query.channel}}',
status: '{{query.status}}',
sort_by: "{{query.sort_by || 'sent_at'}}",
sort_order: "{{query.sort_order || 'desc'}}",
},
fallback: { data: { data: [], pagination: {} } },
},
],
components: [
{
id: 'notification_log_content',
type: 'basic',
name: 'Div',
props: { className: 'p-6 bg-gray-50 dark:bg-gray-900 min-h-screen' },
children: [
{
id: 'page_header',
type: 'basic',
name: 'Div',
children: [
{ type: 'basic', name: 'H1', text: '$t:admin.notification_log.page_title' },
{ type: 'basic', name: 'P', text: '$t:admin.notification_log.page_description' },
],
},
{
id: 'status_filter',
type: 'basic',
name: 'Div',
children: [
{
type: 'composite',
name: 'Select',
props: {
name: 'status',
options: [
{ value: '', label: '$t:common.all' },
{ value: 'sent', label: '$t:notification_log.status_sent' },
{ value: 'failed', label: '$t:notification_log.status_failed' },
{ value: 'skipped', label: '$t:notification_log.status_skipped' },
],
},
},
],
},
{
id: 'logs_datagrid',
type: 'composite',
name: 'DataGrid',
props: {
data: '{{notificationLogs?.data?.data ?? []}}',
'data-testid': 'notification-logs-grid',
columns: [
{ field: 'channel', header: '$t:notification_log.col_channel' },
{ field: 'recipient_identifier', header: '$t:notification_log.col_recipient' },
{ field: 'subject', header: '$t:notification_log.col_subject' },
{ field: 'status', header: '$t:notification_log.col_status' },
{ field: 'sent_at', header: '$t:notification_log.col_sent_at' },
],
},
},
{
id: 'pagination_section',
type: 'composite',
name: 'Pagination',
props: {
currentPage: '{{notificationLogs?.data?.pagination?.current_page ?? 1}}',
totalPages: '{{notificationLogs?.data?.pagination?.last_page ?? 1}}',
},
},
],
},
],
};
// ==============================
// 테스트
// ==============================
describe('admin_notification_log_list 레이아웃', () => {
let testUtils: ReturnType<typeof createLayoutTest>;
let registry: ComponentRegistry;
beforeEach(() => {
registry = setupTestRegistry();
testUtils = createLayoutTest(notificationLogListLayout, {
translations: {},
locale: 'ko',
componentRegistry: registry,
});
});
afterEach(() => {
testUtils.cleanup();
});
// ── 구조 검증 ──
it('core.notification-logs.read 권한이 설정되어 있다', () => {
expect(notificationLogListLayout.permissions).toContain('core.notification-logs.read');
});
it('notificationChannels 데이터소스가 정의되어 있다', () => {
const ds = notificationLogListLayout.data_sources.find((d) => d.id === 'notificationChannels');
expect(ds).toBeDefined();
expect(ds!.endpoint).toBe('/api/admin/notification-channels');
});
it('notificationLogs 데이터소스에 sort_order 파라미터가 포함된다', () => {
const ds = notificationLogListLayout.data_sources.find((d) => d.id === 'notificationLogs');
expect(ds).toBeDefined();
expect(ds!.params!.sort_order).toBeDefined();
expect(ds!.params!.sort_by).toBeDefined();
});
it('notificationLogs 데이터소스에 channel/status 필터 파라미터가 있다', () => {
const ds = notificationLogListLayout.data_sources.find((d) => d.id === 'notificationLogs');
expect(ds!.params!.channel).toBeDefined();
expect(ds!.params!.status).toBeDefined();
expect(ds!.params!.search).toBeDefined();
});
it('상태 필터 Select에 sent/failed/skipped 옵션이 있다', () => {
const content = notificationLogListLayout.components[0];
const filterSection = content.children[1]; // status_filter
const select = filterSection.children[0];
expect(select.name).toBe('Select');
const optionValues = select.props.options.map((o: any) => o.value);
expect(optionValues).toContain('sent');
expect(optionValues).toContain('failed');
expect(optionValues).toContain('skipped');
});
it('DataGrid에 5개 컬럼이 정의되어 있다', () => {
const content = notificationLogListLayout.components[0];
const datagrid = content.children[2]; // logs_datagrid
expect(datagrid.name).toBe('DataGrid');
expect(datagrid.props.columns).toHaveLength(5);
const fieldNames = datagrid.props.columns.map((c: any) => c.field);
expect(fieldNames).toContain('channel');
expect(fieldNames).toContain('recipient_identifier');
expect(fieldNames).toContain('subject');
expect(fieldNames).toContain('status');
expect(fieldNames).toContain('sent_at');
});
it('Pagination 컴포넌트가 포함되어 있다', () => {
const content = notificationLogListLayout.components[0];
const pagination = content.children[3]; // pagination_section
expect(pagination.name).toBe('Pagination');
expect(pagination.props.currentPage).toBeDefined();
expect(pagination.props.totalPages).toBeDefined();
});
// ── 상태 관리 검증 ──
it('필터 초기 상태가 올바르게 설정된다', async () => {
testUtils.mockApi('notificationChannels', {
response: { data: { channels: [] } },
});
testUtils.mockApi('notificationLogs', {
response: { data: { data: [], pagination: { current_page: 1, last_page: 1, per_page: 20, total: 0, from: null, to: null, has_more_pages: false } } },
});
await testUtils.render();
const state = testUtils.getState();
expect(state._local.filter.search).toBe('');
expect(state._local.filter.statuses).toEqual([]);
});
it('필터 상태를 변경할 수 있다', async () => {
testUtils.mockApi('notificationChannels', {
response: { data: { channels: [] } },
});
testUtils.mockApi('notificationLogs', {
response: { data: { data: [], pagination: { current_page: 1, last_page: 1, per_page: 20, total: 0, from: null, to: null, has_more_pages: false } } },
});
await testUtils.render();
testUtils.setState('filter.statuses', ['sent', 'failed'], 'local');
expect(testUtils.getState()._local.filter.statuses).toEqual(['sent', 'failed']);
testUtils.setState('filter.search', 'test@example.com', 'local');
expect(testUtils.getState()._local.filter.search).toBe('test@example.com');
});
});
@@ -0,0 +1,185 @@
/**
* @file admin-user-form-timezone.test.tsx
* @description 사용자 등록/수정 폼 - 타임존 Select 검색 지원 테스트
*
* 테스트 대상:
* - timezone Select가 `_global.appConfig.supportedTimezones`를 options로 사용
* - searchable=true 프로퍼티가 컴포넌트에 전달됨
* - 백엔드가 내려준 {value, label} 객체 배열 형식 그대로 바인딩
*/
import React from 'react';
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { createLayoutTest, screen } from '@core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@core/template-engine/ComponentRegistry';
type SelectOption = { value: string | number; label: string };
const TestDiv: React.FC<{
className?: string;
children?: React.ReactNode;
'data-testid'?: string;
}> = ({ className, children, 'data-testid': testId }) => (
<div className={className} data-testid={testId}>{children}</div>
);
const TestLabel: React.FC<{
className?: string;
children?: React.ReactNode;
text?: string;
}> = ({ className, children, text }) => (
<label className={className}>{children || text}</label>
);
const TestSelect: React.FC<{
name?: string;
value?: string;
options?: SelectOption[];
className?: string;
searchable?: boolean;
searchPlaceholder?: string;
defaultValue?: string;
'data-testid'?: string;
}> = ({ name, value, options, searchable, searchPlaceholder, defaultValue, 'data-testid': testId }) => (
<div
data-testid={testId || `select-${name}`}
data-name={name}
data-value={value ?? defaultValue ?? ''}
data-options={JSON.stringify(options ?? [])}
data-searchable={searchable ? 'true' : 'false'}
data-search-placeholder={searchPlaceholder ?? ''}
/>
);
const TestFragment: React.FC<{ children?: React.ReactNode }> = ({ children }) => <>{children}</>;
function setupTestRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
(registry as any).registry = {
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
Label: { component: TestLabel, metadata: { name: 'Label', type: 'basic' } },
Select: { component: TestSelect, metadata: { name: 'Select', type: 'composite' } },
Fragment: { component: TestFragment, metadata: { name: 'Fragment', type: 'layout' } },
};
return registry;
}
const mockTimezoneOptions: SelectOption[] = [
{ value: 'Pacific/Pago_Pago', label: '(UTC-11:00) Pacific/Pago_Pago' },
{ value: 'America/New_York', label: '(UTC-05:00) America/New_York' },
{ value: 'UTC', label: '(UTC+00:00) UTC' },
{ value: 'Europe/Paris', label: '(UTC+01:00) Europe/Paris' },
{ value: 'Asia/Seoul', label: '(UTC+09:00) Asia/Seoul' },
{ value: 'Asia/Tokyo', label: '(UTC+09:00) Asia/Tokyo' },
{ value: 'Pacific/Auckland', label: '(UTC+13:00) Pacific/Auckland' },
];
const timezoneFieldLayout = {
version: '1.0.0',
layout_name: 'test_admin_user_form_timezone_field',
components: [
{
id: 'field_timezone',
type: 'basic',
name: 'Div',
props: { className: 'md:col-span-1' },
children: [
{
type: 'basic',
name: 'Label',
props: { className: 'block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1' },
text: '시간대',
},
{
id: 'timezone_select',
type: 'composite',
name: 'Select',
props: {
name: 'timezone',
className: 'w-full',
defaultValue: 'Asia/Seoul',
options: '{{_global.appConfig?.supportedTimezones ?? []}}',
searchable: true,
searchPlaceholder: '검색',
},
},
],
},
],
};
describe('admin_user_form timezone Select 렌더링', () => {
let registry: ComponentRegistry;
let testUtils: ReturnType<typeof createLayoutTest>;
beforeEach(() => {
registry = setupTestRegistry();
});
afterEach(() => {
testUtils?.cleanup();
});
it('timezone Select가 렌더링되고 라벨이 보인다', async () => {
testUtils = createLayoutTest(timezoneFieldLayout, {
translations: {},
componentRegistry: registry,
initialState: {
_global: { appConfig: { supportedTimezones: mockTimezoneOptions } },
},
});
await testUtils.render();
expect(screen.getByText('시간대')).toBeInTheDocument();
expect(screen.getByTestId('select-timezone')).toBeInTheDocument();
});
it('_global.appConfig.supportedTimezones가 options에 그대로 바인딩된다', async () => {
testUtils = createLayoutTest(timezoneFieldLayout, {
translations: {},
componentRegistry: registry,
initialState: {
_global: { appConfig: { supportedTimezones: mockTimezoneOptions } },
},
});
await testUtils.render();
const select = screen.getByTestId('select-timezone');
const options = JSON.parse(select.getAttribute('data-options') || '[]');
expect(options).toEqual(mockTimezoneOptions);
expect(options[4]).toEqual({ value: 'Asia/Seoul', label: '(UTC+09:00) Asia/Seoul' });
});
it('searchable=true가 Select에 전달된다', async () => {
testUtils = createLayoutTest(timezoneFieldLayout, {
translations: {},
componentRegistry: registry,
initialState: {
_global: { appConfig: { supportedTimezones: mockTimezoneOptions } },
},
});
await testUtils.render();
const select = screen.getByTestId('select-timezone');
expect(select.getAttribute('data-searchable')).toBe('true');
expect(select.getAttribute('data-search-placeholder')).toBe('검색');
});
it('supportedTimezones가 없을 때 빈 배열로 fallback', async () => {
testUtils = createLayoutTest(timezoneFieldLayout, {
translations: {},
componentRegistry: registry,
});
await testUtils.render();
const select = screen.getByTestId('select-timezone');
const options = JSON.parse(select.getAttribute('data-options') || '[]');
expect(options).toEqual([]);
});
});
@@ -3056,6 +3056,19 @@
}
}
},
{
"name": "PageLoading",
"type": "composite",
"description": "transition_overlay spinner 스타일에서 사용하는 페이지 로딩 인디케이터 (React 트리 외부 렌더링용 인라인 스타일 컴포넌트)",
"path": "src/components/composite/PageLoading.tsx",
"props": {
"options": {
"type": "object",
"required": false,
"description": "엔진이 transition_overlay.spinner.text 등을 전달하는 옵션 객체"
}
}
},
{
"name": "Toggle",
"type": "composite",
@@ -1 +1 @@
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--Line truncated
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--Line truncated
@@ -1,13 +1,13 @@
var SirsoftAdminBasic=(function(Q,c,m,fr){"use strict";function Jf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=Jf(m),Rf=()=>window.G7Core,oe=m.forwardRef(({children:e,variant:t="primary",size:n="md",className:a="",...r},o)=>{const s="inline-flex items-center justify-center",i=Rf()?.style?.mergeClasses?.(s,a)??`${s} ${a}`;return c.jsx("button",{ref:o,className:i,...r,children:e})});oe.displayName="Button";const Vi=m.forwardRef(({accept:e,maxSize:t,onChange:n,onError:a,buttonText:r="Browse",placeholder:o="No file selected",className:s="",disabled:i,...l},f)=>{const u=m.useRef(null),d=f||u,[g,h]=m.useState(""),b=m.useCallback(()=>{!i&&d.current&&d.current.click()},[i,d]),p=m.useCallback(v=>{const O=v.target.files?.[0]||null;if(!O){h(""),n?.(null);return}if(t&&O.size>t*1024*1024){const k=`File size exceeds ${t}MB limit`;a?.(k),d.current&&(d.current.value=""),h("");return}h(O.name),n?.(O)},[t,n,a,d]),x=m.useCallback(v=>{v.stopPropagation(),d.current&&(d.current.value=""),h(""),n?.(null)},[n,d]);return c.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[c.jsx("input",{ref:d,type:"file",accept:e,onChange:p,disabled:i,className:"hidden",...l}),c.jsx("button",{type:"button",onClick:b,disabled:i,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:r}),c.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:g||o}),g&&!i&&c.jsx("button",{type:"button",onClick:x,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Vi.displayName="FileInput";const gt=m.forwardRef(({label:e,error:t,className:n="",onChange:a,onKeyPress:r,value:o,defaultValue:s,type:i="text",checked:l,defaultChecked:f,...u},d)=>{const g=i==="radio"||i==="checkbox",h=m.useRef(!1),b=m.useRef(null);m.useImperativeHandle(d,()=>b.current);const[p,x]=m.useState(o??s??"");m.useEffect(()=>{if(!g&&!h.current&&o!==void 0){if(b.current&&document.activeElement===b.current)return;x(o)}},[o,g]);const v=m.useCallback(()=>{h.current=!0},[]),O=m.useCallback(w=>{if(h.current=!1,a){const I=w.target.value;x(I);const L=new Event("change",{bubbles:!0});Object.defineProperty(L,"target",{writable:!1,value:{value:I}}),Object.defineProperty(L,"currentTarget",{writable:!1,value:{value:I}}),a(L)}},[a]),k=m.useCallback(w=>{const I=w.target.value;x(I),!h.current&&a&&a(w)},[a]),C=m.useCallback(w=>{h.current||r&&r(w)},[r]),{loadingactions:N,formdata:E,...S}=u;if(g)return c.jsx("input",{ref:b,type:i,className:n,onChange:a,checked:l,defaultChecked:f,value:o,...S});const y=o!==void 0?{value:p}:{defaultValue:s};return c.jsx("input",{ref:b,type:i,className:n,onChange:k,onKeyPress:C,onCompositionStart:v,onCompositionEnd:O,...y,...S})});gt.displayName="Input";const vr=({label:e,error:t,className:n="",onChange:a,value:r,defaultValue:o,...s})=>{const i=m.useRef(!1),l=m.useRef(null),[f,u]=m.useState(r??o??"");m.useEffect(()=>{!i.current&&r!==void 0&&u(r)},[r]);const d=m.useCallback(()=>{i.current=!0},[]),g=m.useCallback(O=>{if(i.current=!1,a){const k=O.target.value;u(k);const C=new Event("change",{bubbles:!0});Object.defineProperty(C,"target",{writable:!1,value:{value:k}}),Object.defineProperty(C,"currentTarget",{writable:!1,value:{value:k}}),a(C)}},[a]),h=m.useCallback(O=>{const k=O.target.value;u(k),!i.current&&a&&a(O)},[a]),{loadingactions:b,formdata:p,...x}=s,v=r!==void 0?{value:f}:{defaultValue:o};return c.jsx("textarea",{ref:l,className:n,onChange:h,onCompositionStart:d,onCompositionEnd:g,...v,...x})},$t=({children:e,className:t="",...n})=>c.jsx("label",{className:t,...n,children:e}),D=m.forwardRef(({children:e,className:t="",...n},a)=>c.jsx("div",{ref:a,className:t,...n,children:e})),Z=({children:e,className:t="",...n})=>c.jsx("span",{className:t,...n,children:e}),ut=({children:e,className:t="",...n})=>c.jsx("p",{className:t,...n,children:e}),ar=({className:e="",alt:t="",...n})=>c.jsx("img",{className:e,alt:t,...n}),Ao=({children:e,className:t="",...n})=>c.jsx("h1",{className:t,...n,children:e}),Er=({children:e,className:t="",...n})=>c.jsx("h2",{className:t,...n,children:e}),Vr=({children:e,className:t="",...n})=>c.jsx("h3",{className:t,...n,children:e}),Hi=({children:e,className:t="",...n})=>c.jsx("h4",{className:t,...n,children:e}),Io=({children:e,className:t="",...n})=>c.jsx("ul",{className:t,.Line truncated
var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=Jf(m),Rf=()=>window.G7Core,re=m.forwardRef(({children:e,variant:t="primary",size:n="md",className:a="",...r},o)=>{const s="inline-flex items-center justify-center",i=Rf()?.style?.mergeClasses?.(s,a)??`${s} ${a}`;return c.jsx("button",{ref:o,className:i,...r,children:e})});re.displayName="Button";const Vi=m.forwardRef(({accept:e,maxSize:t,onChange:n,onError:a,buttonText:r="Browse",placeholder:o="No file selected",className:s="",disabled:i,...l},g)=>{const u=m.useRef(null),d=g||u,[f,h]=m.useState(""),v=m.useCallback(()=>{!i&&d.current&&d.current.click()},[i,d]),p=m.useCallback(b=>{const O=b.target.files?.[0]||null;if(!O){h(""),n?.({target:{value:null,name:""}});return}if(t&&O.size>t*1024*1024){const C=`File size exceeds ${t}MB limit`;a?.(C),d.current&&(d.current.value=""),h("");return}h(O.name),n?.({target:{value:O,name:O.name}})},[t,n,a,d]),x=m.useCallback(b=>{b.stopPropagation(),d.current&&(d.current.value=""),h(""),n?.({target:{value:null,name:""}})},[n,d]);return c.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[c.jsx("input",{ref:d,type:"file",accept:e,onChange:p,disabled:i,className:"hidden",...l}),c.jsx("button",{type:"button",onClick:v,disabled:i,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:r}),c.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!i&&c.jsx("button",{type:"button",onClick:x,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Vi.displayName="FileInput";const ft=m.forwardRef(({label:e,error:t,className:n="",onChange:a,onKeyPress:r,value:o,defaultValue:s,type:i="text",checked:l,defaultChecked:g,...u},d)=>{const f=i==="radio"||i==="checkbox",h=m.useRef(!1),v=m.useRef(null);m.useImperativeHandle(d,()=>v.current);const[p,x]=m.useState(o??s??"");m.useEffect(()=>{if(!f&&!h.current&&o!==void 0){if(v.current&&document.activeElement===v.current)return;x(o)}},[o,f]);const b=m.useCallback(()=>{h.current=!0},[]),O=m.useCallback(w=>{if(h.current=!1,a){const A=w.target.value;x(A);const D=new Event("change",{bubbles:!0});Object.defineProperty(D,"target",{writable:!1,value:{value:A}}),Object.defineProperty(D,"currentTarget",{writable:!1,value:{value:A}}),a(D)}},[a]),C=m.useCallback(w=>{const A=w.target.value;x(A),!h.current&&a&&a(w)},[a]),E=m.useCallback(w=>{h.current||r&&r(w)},[r]),{loadingactions:N,formdata:S,...k}=u;if(f)return c.jsx("input",{ref:v,type:i,className:n,onChange:a,checked:l,defaultChecked:g,value:o,...k});const y=o!==void 0?{value:p}:{defaultValue:s};return c.jsx("input",{ref:v,type:i,className:n,onChange:C,onKeyPress:E,onCompositionStart:b,onCompositionEnd:O,...y,...k})});ft.displayName="Input";const vr=({label:e,error:t,className:n="",onChange:a,value:r,defaultValue:o,...s})=>{const i=m.useRef(!1),l=m.useRef(null),[g,u]=m.useState(r??o??"");m.useEffect(()=>{!i.current&&r!==void 0&&u(r)},[r]);const d=m.useCallback(()=>{i.current=!0},[]),f=m.useCallback(O=>{if(i.current=!1,a){const C=O.target.value;u(C);const E=new Event("change",{bubbles:!0});Object.defineProperty(E,"target",{writable:!1,value:{value:C}}),Object.defineProperty(E,"currentTarget",{writable:!1,value:{value:C}}),a(E)}},[a]),h=m.useCallback(O=>{const C=O.target.value;u(C),!i.current&&a&&a(O)},[a]),{loadingactions:v,formdata:p,...x}=s,b=r!==void 0?{value:g}:{defaultValue:o};return c.jsx("textarea",{ref:l,className:n,onChange:h,onCompositionStart:d,onCompositionEnd:f,...b,...x})},Ft=({children:e,className:t="",...n})=>c.jsx("label",{className:t,...n,children:e}),_=m.forwardRef(({children:e,className:t="",...n},a)=>c.jsx("div",{ref:a,className:t,...n,children:e})),Z=({children:e,className:t="",...n})=>c.jsx("span",{className:t,...n,children:e}),dt=({children:e,className:t="",...n})=>c.jsx("p",{className:t,...n,children:e}),or=({className:e="",alt:t="",...n})=>c.jsx("img",{className:e,alt:t,...n}),Io=({children:e,className:t="",...n})=>c.jsx("h1",{className:t,...n,children:e}),Er=({children:e,className:t="",...n})=>c.jsx("h2",{className:t,...n,children:e}),Hr=({children:e,className:t="",...n})=>c.jsx("h3",{className:t,...n,children:e}),Hi=({children:e,className:t="",...n})=>c.jsx("h4",{className:t,...Line truncated
inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium
${ee?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}
`,children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),A($),ee&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),!ee&&c.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>M($),disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]}),ee&&q&&U()]}),n==="textarea"?c.jsx(vr,{name:`${g}[${$}]`,value:k[$]||"",onChange:re=>P($,re.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:f,rows:u,className:`${R} resize-vertical`}):c.jsx(gt,{type:"text",name:`${g}[${$}]`,value:k[$]||"",onChange:re=>P($,re.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:f,className:R})]},$)},[g,k,P,s,i,l,f,u,n,A,v,M,U,p]),G=m.useCallback($=>{const J=`w-full px-3 py-2 border ${p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500"} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2`,R=`${s}${s?" (":""}${A($)}${s?")":""}`;return c.jsx(D,{children:n==="textarea"?c.jsx(vr,{name:`${g}[${$}]`,value:k[$]||"",onChange:ee=>P($,ee.target.value),placeholder:R,required:i&&$===v,disabled:l,maxLength:f,rows:u,className:`${J} resize-vertical`}):c.jsx(gt,{type:"text",name:`${g}[${$}]`,value:k[$]||"",onChange:ee=>P($,ee.target.value),placeholder:R,required:i&&$===v,disabled:l,maxLength:f,className:J})},$)},[g,k,P,s,i,l,f,u,n,v,A]),H=()=>c.jsx(D,{className:d,children:c.jsx(D,{className:"space-y-4",children:S.map(($,q)=>Y($,q===0))})}),B=()=>c.jsxs(D,{className:d,children:[c.jsxs(D,{className:"flex items-center gap-2 mb-3",children:[S.map($=>c.jsxs(oe,{type:"button",className:`
`,children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),I(F),ee&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),!ee&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>T(F),disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]}),ee&&Y&&V()]}),n==="textarea"?c.jsx(vr,{name:`${f}[${F}]`,value:C[F]||"",onChange:oe=>L(F,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,rows:u,className:`${ae} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${F}]`,value:C[F]||"",onChange:oe=>L(F,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,className:ae})]},F)},[f,C,L,s,i,l,g,u,n,I,b,T,V,p]),G=m.useCallback(F=>{const R=`w-full px-3 py-2 border ${p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500"} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2`,ae=`${s}${s?" (":""}${I(F)}${s?")":""}`;return c.jsx(_,{children:n==="textarea"?c.jsx(vr,{name:`${f}[${F}]`,value:C[F]||"",onChange:ee=>L(F,ee.target.value),placeholder:ae,required:i&&F===b,disabled:l,maxLength:g,rows:u,className:`${R} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${F}]`,value:C[F]||"",onChange:ee=>L(F,ee.target.value),placeholder:ae,required:i&&F===b,disabled:l,maxLength:g,className:R})},F)},[f,C,L,s,i,l,g,u,n,b,I]),H=()=>c.jsx(_,{className:d,children:c.jsx(_,{className:"space-y-4",children:k.map((F,Y)=>z(F,Y===0))})}),W=()=>c.jsxs(_,{className:d,children:[c.jsxs(_,{className:"flex items-center gap-2 mb-3",children:[k.map(F=>c.jsxs(re,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${w===$?$===v?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":$===v?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>I($),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),h?c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:A($)}),c.jsx(Z,{className:"inline md:hidden",children:$.toUpperCase()})]}):A($),$===v&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),j($)&&w!==$&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),$!==v&&c.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:q=>{q.stopPropagation(),M($)},disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]},$)),U()]}),S.map($=>c.jsx(D,{className:w===$?"block":"hidden",children:G($)},$))]}),z=()=>{const $=p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500";return c.jsx(D,{className:d,children:c.jsxs(D,{className:"flex items-center gap-1",children:[c.jsx(D,{className:"flex items-center shrink-0",children:S.map(q=>c.jsxs(oe,{type:"button",className:`
${w===F?F===b?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":F===b?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>A(F),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),h?c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:I(F)}),c.jsx(Z,{className:"inline md:hidden",children:F.toUpperCase()})]}):I(F),F===b&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),j(F)&&w!==F&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),F!==b&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Y=>{Y.stopPropagation(),T(F)},disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]},F)),V()]}),k.map(F=>c.jsx(_,{className:w===F?"block":"hidden",children:G(F)},F))]}),B=()=>{const F=p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500";return c.jsx(_,{className:d,children:c.jsxs(_,{className:"flex items-center gap-1",children:[c.jsx(_,{className:"flex items-center shrink-0",children:k.map(Y=>c.jsxs(re,{type:"button",className:`
px-2 py-1.5 text-xs font-medium border-y border-l first:rounded-l last:rounded-r last:border-r transition-colors
${w===q?"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}
`,onClick:()=>I(q),title:A(q),children:[q.toUpperCase(),q===v&&c.jsx(Z,{className:"text-red-400 ml-0.5",children:"*"})]},q))}),c.jsx(D,{className:"flex-1 min-w-0",children:n==="textarea"?c.jsx(vr,{name:`${g}[${w}]`,value:k[w]||"",onChange:q=>P(w,q.target.value),placeholder:s,required:i&&w===v,disabled:l,maxLength:f,rows:u,className:`w-full px-2 py-1.5 border ${$} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`}):c.jsx(gt,{type:"text",name:`${g}[${w}]`,value:k[w]||"",onChange:q=>P(w,q.target.value),placeholder:s,required:i&&w===v,disabled:l,maxLength:f,className:`w-full px-2 py-1.5 border ${$} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`})})]})})};return c.jsxs(D,{className:l?"opacity-50 cursor-not-allowed":void 0,children:[a==="compact"?z():a==="tabs"?B():H(),p&&b&&c.jsx(Z,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:b})]})};Uo.displayName="MultilingualInput";const gg=()=>window.G7Core,Vo=({checked:e,value:t,onChange:n,disabled:a=!1,label:r,description:o,size:s="md",className:i="",name:l})=>{const[f,u]=m.useState(()=>e??t??!1);m.useEffect(()=>{u(e??t??!1)},[e,t]);const d=p=>{const x=p.target.checked;u(x),n&&!a&&n(p)},h={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[s],b=()=>{if(!a){const p=!f;if(u(p),n){const x=gg();x?.createChangeEvent&&n(x.createChangeEvent({checked:p,name:l}))}}};return c.jsxs("div",{className:`inline-flex flex-wrap items-start gap-x-2 w-auto ${i}`,children:[c.jsxs("div",{className:`relative inline-flex items-center flex-shrink-0 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:p=>{p.preventDefault(),p.stopPropagation(),b()},children:[c.jsx("input",{type:"checkbox",id:l,name:l,checked:f,onChange:d,disabled:a,className:"sr-only peer",tabIndex:-1}),c.jsx("div",{className:`
${w===Y?"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}
`,onClick:()=>A(Y),title:I(Y),children:[Y.toUpperCase(),Y===b&&c.jsx(Z,{className:"text-red-400 ml-0.5",children:"*"})]},Y))}),c.jsx(_,{className:"flex-1 min-w-0",children:n==="textarea"?c.jsx(vr,{name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,rows:u,className:`w-full px-2 py-1.5 border ${F} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`}):c.jsx(ft,{type:"text",name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,className:`w-full px-2 py-1.5 border ${F} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`})})]})})};return c.jsxs(_,{className:l?"opacity-50 cursor-not-allowed":void 0,children:[a==="compact"?B():a==="tabs"?W():H(),p&&v&&c.jsx(Z,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:v})]})};Uo.displayName="MultilingualInput";const gg=()=>window.G7Core,Vo=({checked:e,value:t,onChange:n,disabled:a=!1,label:r,description:o,size:s="md",className:i="",name:l})=>{const[g,u]=m.useState(()=>e??t??!1);m.useEffect(()=>{u(e??t??!1)},[e,t]);const d=p=>{const x=p.target.checked;u(x),n&&!a&&n(p)},h={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[s],v=()=>{if(!a){const p=!g;if(u(p),n){const x=gg();x?.createChangeEvent&&n(x.createChangeEvent({checked:p,name:l}))}}};return c.jsxs("div",{className:`inline-flex flex-wrap items-start gap-x-2 w-auto ${i}`,children:[c.jsxs("div",{className:`relative inline-flex items-center flex-shrink-0 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:p=>{p.preventDefault(),p.stopPropagation(),v()},children:[c.jsx("input",{type:"checkbox",id:l,name:l,checked:g,onChange:d,disabled:a,className:"sr-only peer",tabIndex:-1}),c.jsx("div",{className:`
relative ${h.track}
bg-gray-200 dark:bg-gray-700
rounded-full
@@ -29,116 +29,114 @@ var SirsoftAdminBasic=(function(Q,c,m,fr){"use strict";function Jf(e){const t=Ob
peer-checked:after:translate-x-full
peer-checked:after:border-white
transition-colors
`})]}),r&&c.jsx("span",{className:`text-sm font-medium text-gray-900 dark:text-white ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:b,children:r}),o&&c.jsx("p",{className:"w-full mt-1 text-xs text-gray-500 dark:text-gray-400",children:o})]})},fa=({status:e,label:t,showIcon:n=!0,iconName:a,className:r="",style:o})=>{const s={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},i={success:de.CheckCircle,warning:de.ExclamationTriangle,error:de.XCircle,info:de.InfoCircle,pending:de.Clock,default:de.QuestionCircle},l={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},f=a||i[e],u=t||l[e],d=s[e];return c.jsxs(Z,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${d} ${r}`,style:o,children:[n&&c.jsx(ne,{name:f,className:"w-4 h-4"}),c.jsx(Z,{children:u})]})},Bi={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},Wi={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Yi=({color:e="gray",text:t,size:n="md",className:a="",style:r,children:o})=>{const s=Bi[e]||Bi.gray,i=Wi[n]||Wi.md;return c.jsxs(Z,{className:`inline-flex items-center rounded-full font-medium ${i} ${s} ${a}`,style:r,children:[t,o]})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:qi,setPrototypeOf:Ki,isFrozen:hg,getPrototypeOf:pg,getOwnPropertyDescriptor:bg}=Object;let{freeze:Nt,seal:zt,create:Xi}=Object,{apply:Ho,construct:jo}=typeof Reflect<"u"&&Reflect;Nt||(Nt=function(t){return t}),zt||(zt=function(t){return t}),Ho||(Ho=function(t,n,a){return t.apply(n,a)}),jo||(jo=function(t,n){return new t(...n)});const ga=Ft(Array.prototype.forEach),Zi=Ft(Array.prototype.pop),mn=Ft(Array.prototype.push),ha=Ft(String.prototype.toLowerCase),zo=Ft(String.prototype.toString),Qi=Ft(String.prototype.match),vn=Ft(String.prototype.replace),mg=Ft(String.prototype.indexOf),vg=Ft(String.prototype.trim),Zt=Ft(Object.prototype.hasOwnProperty),Ot=Ft(RegExp.prototype.test),yn=yg(TypeError);function Ft(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Ho(e,t,a)}}function yg(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return jo(e,n)}}function Ue(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ha;Ki&&Ki(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(hg(t)||(t[a]=o),r=o)}e[r]=!0}return e}function xg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Nr(e){const t=Xi(null);for(const[n,a]of qi(e))Zt(e,n)&&(Array.isArray(a)?t[n]=xg(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=Nr(a):t[n]=a);return t}function xn(e,t){for(;e!==null;){const a=bg(e,t);if(a){if(a.get)return Ft(a.get);if(typeof a.value=="function")return Ft(a.value)}e=pg(e)}function n(){return null}return n}const Ji=Nt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","stri Line truncated
`+ke),le&&ga([F,T,P],Kt=>{ke=vn(ke,Kt," ")}),C&&We?C.createHTML(ke):ke},t.setConfig=function(){let we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};it(we),ce=!0},t.clearConfig=function(){_e=null,ce=!1},t.isValidAttribute=function(we,K,se){_e||it({});const W=me(we),ie=me(K);return Ur(W,ie,se)},t.addHook=function(we,K){typeof K=="function"&&(L[we]=L[we]||[],mn(L[we],K))},t.removeHook=function(we){if(L[we])return Zi(L[we])},t.removeHooks=function(we){L[we]&&(L[we]=[])},t.removeAllHooks=function(){L={}},t}var Dg=ol();const qo=({content:e,text:t,isHtml:n=!0,className:a="",purifyConfig:r})=>{const o=t??e??"";if(!o||o.trim()==="")return null;if(!n){const f=`
`})]}),r&&c.jsx("span",{className:`text-sm font-medium text-gray-900 dark:text-white ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:v,children:r}),o&&c.jsx("p",{className:"w-full mt-1 text-xs text-gray-500 dark:text-gray-400",children:o})]})},fa=({status:e,label:t,showIcon:n=!0,iconName:a,className:r="",style:o})=>{const s={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},i={success:ue.CheckCircle,warning:ue.ExclamationTriangle,error:ue.XCircle,info:ue.InfoCircle,pending:ue.Clock,default:ue.QuestionCircle},l={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},g=a||i[e],u=t||l[e],d=s[e];return c.jsxs(Z,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${d} ${r}`,style:o,children:[n&&c.jsx(ne,{name:g,className:"w-4 h-4"}),c.jsx(Z,{children:u})]})},Bi={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},Wi={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Yi=({color:e="gray",text:t,size:n="md",className:a="",style:r,children:o})=>{const s=Bi[e]||Bi.gray,i=Wi[n]||Wi.md;return c.jsxs(Z,{className:`inline-flex items-center rounded-full font-medium ${i} ${s} ${a}`,style:r,children:[t,o]})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:qi,setPrototypeOf:Ki,isFrozen:hg,getPrototypeOf:pg,getOwnPropertyDescriptor:bg}=Object;let{freeze:Ot,seal:zt,create:Xi}=Object,{apply:Ho,construct:jo}=typeof Reflect<"u"&&Reflect;Ot||(Ot=function(t){return t}),zt||(zt=function(t){return t}),Ho||(Ho=function(t,n,a){return t.apply(n,a)}),jo||(jo=function(t,n){return new t(...n)});const ga=Ut(Array.prototype.forEach),Zi=Ut(Array.prototype.pop),vn=Ut(Array.prototype.push),ha=Ut(String.prototype.toLowerCase),zo=Ut(String.prototype.toString),Qi=Ut(String.prototype.match),yn=Ut(String.prototype.replace),mg=Ut(String.prototype.indexOf),vg=Ut(String.prototype.trim),Zt=Ut(Object.prototype.hasOwnProperty),Tt=Ut(RegExp.prototype.test),xn=yg(TypeError);function Ut(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Ho(e,t,a)}}function yg(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return jo(e,n)}}function je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ha;Ki&&Ki(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(hg(t)||(t[a]=o),r=o)}e[r]=!0}return e}function xg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Nr(e){const t=Xi(null);for(const[n,a]of qi(e))Zt(e,n)&&(Array.isArray(a)?t[n]=xg(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=Nr(a):t[n]=a);return t}function wn(e,t){for(;e!==null;){const a=bg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=pg(e)}function n(){return null}return n}const Ji=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","stri Line truncated
`+Ve),se&&ga([$,M,L],Ne=>{Ve=yn(Ve,Ne," ")}),E&&Be?E.createHTML(Ve):Ve},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(ke),ce=!0},t.clearConfig=function(){Le=null,ce=!1},t.isValidAttribute=function(ke,q,ie){Le||at({});const ye=fe(ke),K=fe(q);return la(ye,K,ie)},t.addHook=function(ke,q){typeof q=="function"&&(D[ke]=D[ke]||[],vn(D[ke],q))},t.removeHook=function(ke){if(D[ke])return Zi(D[ke])},t.removeHooks=function(ke){D[ke]&&(D[ke]=[])},t.removeAllHooks=function(){D={}},t}var Dg=ol();const qo=({content:e,text:t,isHtml:n=!0,className:a="",purifyConfig:r})=>{const o=t??e??"";if(!o||o.trim()==="")return null;if(!n){const g=`
whitespace-pre-wrap
text-gray-900 dark:text-gray-100
font-sans
${a}
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:f,children:o})}const s={ALLOWED_TAGS:["p","br","strong","em","u","s","strike","del","ins","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","blockquote","code","pre","table","thead","tbody","tr","th","td","div","span"],ALLOWED_ATTR:["href","target","rel","title","alt","src","width","height","class","style","id","data-*"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"],SAFE_FOR_TEMPLATES:!0},i=m.useMemo(()=>{const f=r||s;return Dg.sanitize(o,f).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(d,g,h,b)=>(h.startsWith("http://")||h.startsWith("https://"))&&!d.includes("rel=")?`<a ${g}href="${h}"${b} rel="noopener noreferrer">`:d)},[o,r,s]),l=`
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:g,children:o})}const s={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},i=m.useMemo(()=>{const g=r?{...s,...r,FORBID_TAGS:[...s.FORBID_TAGS,...r.FORBID_TAGS||[]],FORBID_ATTR:[...s.FORBID_ATTR,...r.FORBID_ATTR||[]]}:s;return Dg.sanitize(o,g).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(d,f,h,v)=>(h.startsWith("http://")||h.startsWith("https://"))&&!d.includes("rel=")?`<a ${f}href="${h}"${v} rel="noopener noreferrer">`:d)},[o,r]),l=`
prose dark:prose-invert max-w-none
prose-p:my-2
prose-headings:font-bold prose-headings:mt-6 prose-headings:mb-4
prose-h1:text-2xl prose-h2:text-xl prose-h3:text-lg
prose-a:text-blue-600 dark:prose-a:text-blue-400
prose-a:no-underline hover:prose-a:underline
prose-img:rounded-lg prose-img:shadow-md
prose-blockquote:border-l-4 prose-blockquote:border-gray-300 dark:prose-blockquote:border-gray-600
prose-blockquote:pl-4 prose-blockquote:italic
prose-code:bg-gray-100 dark:prose-code:bg-gray-800
prose-code:px-1 prose-code:py-0.5 prose-code:rounded
prose-pre:bg-gray-100 dark:prose-pre:bg-gray-800
prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto
prose-table:border prose-table:border-gray-300 dark:prose-table:border-gray-600
prose-th:bg-gray-100 dark:prose-th:bg-gray-800
prose-th:border prose-th:border-gray-300 dark:prose-th:border-gray-600
prose-th:px-4 prose-th:py-2
prose-td:border prose-td:border-gray-300 dark:prose-td:border-gray-600
prose-td:px-4 prose-td:py-2
[&_table]:w-full [&_table]:border-collapse [&_table]:border [&_table]:border-gray-300
dark:[&_table]:border-gray-600
[&_th]:border [&_th]:border-gray-300 [&_th]:px-4 [&_th]:py-2 [&_th]:bg-gray-100 [&_th]:text-left
dark:[&_th]:border-gray-600 dark:[&_th]:bg-gray-800
[&_td]:border [&_td]:border-gray-300 [&_td]:px-4 [&_td]:py-2
dark:[&_td]:border-gray-600
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
after:content-[''] after:block after:clear-both
${a}
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:l,dangerouslySetInnerHTML:{__html:i}})},ba=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},kn=(e,t)=>window.G7Core?.t?.(e,t)??e,Ko={Div:D,Span:Z,Button:oe,Icon:ne,Checkbox:Xt,P:ut,A:Hr,Label:$t,Input:gt,H1:Ao,H2:Er,H3:Vr,H4:Hi,Img:ar,Select:pn,Textarea:vr,Table:_o,Thead:Po,Tbody:$o,Tfoot:Fo,Tr:yr,Th:jr,Td:Lt,MultilingualInput:Uo,Toggle:Vo,StatusBadge:fa,Badge:Yi,HtmlContent:qo,ActionMenu:bn},Xo=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Xo(t)).join(", ");if(typeof e=="object"){if(m.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ba.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},sl=(e,t)=>{if(!e)return!0;const n=e.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const a=n[1].trim();try{return!!new Function("row",`return ${a}`)(t)}catch(r){return ba.warn("subRow 조건 평가 실패:",e,r),!0}},Cn=(e,t,n,a="",r)=>{const o=window.G7Core;if(o?.renderItemChildren){const s={row:t,value:n,$value:n};return o.renderItemChildren(e,s,Ko,a,r?{componentContext:r}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Zo=(e,t,n="",a)=>{const r=window.G7Core;if(r?.renderItemChildren){const o={row:t,$value:t};return r.renderItemChildren(e,o,Ko,n,a?{componentContext:a}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},_g=({columns:e,data:t,sortable:n=!0,pagination:a=!1,pageSize:r=10,onRowClick:o,className:s="",style:i,sortField:l,sortDirection:f,onSortChange:u,selectable:d=!1,selectedIds:g=[],onSelectionChange:h,idField:b="id",showColumnSelector:p=!1,visibleColumns:x,onColumnVisibilityChange:v,responsiveBreakpoint:O=768,cardRenderer:k,rowActions:C,onRowAction:N,alwaysShowPagination:E=!1,serverSidePagination:S=!1,serverCurrentPage:y,serverTotalPages:w,onPageChange:I,prevText:L,nextText:F,columnSelectorText:T,emptyMessage:P,actionsColumnHeader:V,requiredText:M,selectedCountText:A,showFirstLast:j=!0,expandable:U=!1,expandedRowIds:Y,onExpandChange:G,expandChildren:H,expandedRowRender:B,expandColumnWidth:z="48px",expandIconExpanded:$=de.ChevronDown,expandIconCollapsed:q=de.ChevronRight,expandConditionField:J,dynamicColumns:R,dynamicColumnsInsertAfter:ee,expandContext:X,__componentContext:re,subRowChildren:le,subRowCondition:ve,subRowClassName:he="px-6 py-2 bg-gray-50 dark:bg-gray-750",subRowRender:ce,footerCells:ye,footerClassName:pe="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Le})=>{const We=L||void 0,He=F||void 0,te=T??kn("common.column_selector"),Ae=P??kn("common.no_data"),De=V??kn("common.actions"),Oe=M??kn("common.required"),Fe=A??kn("common.selected_count"),Ze=window.G7Core,Qe=Ze?.useControllableState,ze=Ze?.shallowArrayEqual,[ae,ue]=Qe?Qe(l,null,W=>{W!==null&&u?.(W,fe)}):[l??null,()=>{}],[fe,ge]=Qe?Qe(f,"asc",W=>{ae!==null&&u?.(ae,W)}):[f??"asc",()=>{}],[Ce,Ie]=m.useState(1),[be,Pe]=Qe?Qe(Y,[],G,{isEqual:ze}):[Y??[],()=>{}],[Te,Re]=m.useState(!1),Ge=m.useRef(null),rt=Ze?.useResponsive,qe=rt?.(),me=qe?qe.width<O:typeof window<"u"&&window.innerWidth<O,_e=m.useMemo(()=>{if(!R||!Array.isArray(R)||R.length===0)return e;if(ee){const W=e.findIndex(ie=>ie.field===ee);if(W!==-1)return[...e.slice(0,W+1),...R,...e.slice(W+1)]}return[...e,...R]},[e,R,ee]),[Be,st]=m.useState(()=>x&&x.length>0?x:e.filter(W=>!W.hidden).map(W=>W.field));m.useEffect(()=>{x&&x.length>0&&st(x)},[x]);const it=m.useRef("");m.useEffect(()=>{const W=e.map(ie=>ie.field).join(",");it.current&&W!==it.current&&(!x||x.length===0)&&st(e.filter(ie=>!ie.hidden).map(ie=>ie.field)),it.current=W},[e,x]);const et=m.useRef([]),at=m.useRef(null);m.useEffect(()=>{if(R&&R.length>0){const W=R.map($e=>$e.field);if(at.current===null&&(at.current=x!==void 0&&x.length>0,at.current)){et.current=W;return}const ie=et.current,xe=W.filter($e=>!ie.includes($e));if(xe.length>0){const $e=xe.filter(ke=>!Be.includes(ke));if($e.length>0){const ke=[...Be,...$e];st(ke),v?.(ke)}}et.current=W}},[R]),m.useEffect(()=>{S||Ie(1)},[t,S]),m.useEffect(()=>{const W=ie=>{Ge.current&&!Ge.current.contains(ie.target)&&Re(!1)};return Te&&document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[Te]);const vt=m.useMemo(()=>!p&&(!x||x.length===0)?_e.filter(W=>!W.hidden):_e.filter(W=>Be.includes(W.field)),[_e,Be,p,x]),nt=m.useMemo(()=>!ae||!n||!t?t||[]:[...t].sort((W,ie)=>{const xe=W[ae],$e=ie[ae];if(xe===$e)return 0;const ke=xe>$e?1:-1;return fe==="asc"?ke:-ke}),[t,ae,fe,n]),Ye=m.useMemo(()=>{if(S||!a)return nt;const W=(Ce-1)*r,ie=W+r;return nt.slice(W,ie)},[nt,Ce,r,a,S]),At=S?y||1:Ce,ot=S?w||1:Math.ceil((nt?.length||0)/r),Ht=m.useCallback(W=>{S&&I?I(W):Ie(W)},[S,I]),dr=W=>{if(!n||e.find($e=>$e. Line truncated
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:l,dangerouslySetInnerHTML:{__html:i}})},ba=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},Cn=(e,t)=>window.G7Core?.t?.(e,t)??e,Ko={Div:_,Span:Z,Button:re,Icon:ne,Checkbox:Xt,P:dt,A:jr,Label:Ft,Input:ft,H1:Io,H2:Er,H3:Hr,H4:Hi,Img:or,Select:zr,Textarea:vr,Table:_o,Thead:Po,Tbody:$o,Tfoot:Fo,Tr:yr,Th:Gr,Td:Dt,MultilingualInput:Uo,Toggle:Vo,StatusBadge:fa,Badge:Yi,HtmlContent:qo,ActionMenu:mn},Xo=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Xo(t)).join(", ");if(typeof e=="object"){if(m.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ba.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},sl=(e,t)=>{if(!e)return!0;const n=e.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const a=n[1].trim();try{return!!new Function("row",`return ${a}`)(t)}catch(r){return ba.warn("subRow 조건 평가 실패:",e,r),!0}},Sn=(e,t,n,a="",r)=>{const o=window.G7Core;if(o?.renderItemChildren){const s={row:t,value:n,$value:n};return o.renderItemChildren(e,s,Ko,a,r?{componentContext:r}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Zo=(e,t,n="",a)=>{const r=window.G7Core;if(r?.renderItemChildren){const o={row:t,$value:t};return r.renderItemChildren(e,o,Ko,n,a?{componentContext:a}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},_g=({id:e,columns:t,data:n,sortable:a=!0,pagination:r=!1,pageSize:o=10,onRowClick:s,className:i="",style:l,sortField:g,sortDirection:u,onSortChange:d,selectable:f=!1,selectedIds:h=[],onSelectionChange:v,idField:p="id",showColumnSelector:x=!1,visibleColumns:b,onColumnVisibilityChange:O,responsiveBreakpoint:C=768,cardRenderer:E,rowActions:N,onRowAction:S,alwaysShowPagination:k=!1,serverSidePagination:y=!1,serverCurrentPage:w,serverTotalPages:A,onPageChange:D,prevText:$,nextText:M,columnSelectorText:L,emptyMessage:U,actionsColumnHeader:T,requiredText:I,selectedCountText:j,showFirstLast:V=!0,expandable:z=!1,expandedRowIds:G,onExpandChange:H,expandChildren:W,expandedRowRender:B,expandColumnWidth:F="48px",expandIconExpanded:Y=ue.ChevronDown,expandIconCollapsed:R=ue.ChevronRight,expandConditionField:ae,dynamicColumns:ee,dynamicColumnsInsertAfter:X,expandContext:oe,__componentContext:se,subRowChildren:pe,subRowCondition:we,subRowClassName:ce="px-6 py-2 bg-gray-50 dark:bg-gray-750",subRowRender:me,footerCells:ge,footerClassName:De="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Be})=>{const Ye=$||void 0,te=M||void 0,Ie=L??Cn("common.column_selector"),_e=U??Cn("common.no_data"),Ae=T??Cn("common.actions"),Fe=I??Cn("common.required"),Qe=j??Cn("common.selected_count"),rt=window.G7Core,$e=rt?.useControllableState,st=rt?.shallowArrayEqual,[J,be]=$e?$e(g,null,K=>{K!==null&&d?.(K,he)}):[g??null,()=>{}],[he,xe]=$e?$e(u,"asc",K=>{J!==null&&d?.(J,K)}):[u??"asc",()=>{}],[de,Pe]=m.useState(1),[Ce,Ue]=$e?$e(G,[],H,{isEqual:st}):[G??[],()=>{}],[Te,Je]=m.useState(!1),qe=m.useRef(null),ut=rt?.useResponsive,fe=ut?.(),Le=fe?fe.width<C:typeof window<"u"&&window.innerWidth<C,He=m.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return t;if(X){const K=t.findIndex(le=>le.field===X);if(K!==-1)return[...t.slice(0,K+1),...ee,...t.slice(K+1)]}return[...t,...ee]},[t,ee,X]),[Re,at]=m.useState(()=>b&&b.length>0?b:t.filter(K=>!K.hidden).map(K=>K.field));m.useEffect(()=>{b&&b.length>0&&at(b)},[b]);const tt=m.useRef("");m.useEffect(()=>{const K=t.map(le=>le.field).join(",");tt.current&&K!==tt.current&&(!b||b.length===0)&&at(t.filter(le=>!le.hidden).map(le=>le.field)),tt.current=K},[t,b]);const ot=m.useRef([]),qt=m.useRef(null);m.useEffect(()=>{if(ee&&ee.length>0){const K=ee.map(Ve=>Ve.field);if(qt.current===null&&(qt.current=b!==void 0&&b.length>0,qt.current)){ot.current=K;return}const le=ot.current,ve=K.filter(Ve=>!le.includes(Ve));if(ve.length>0){const Ve=ve.filter(Ne=>!Re.includes(Ne));if(Ve.length>0){const Ne=[...Re,...Ve];at(Ne),O?.(Ne)}}ot.current=K}},[ee]),m.useEffect(()=>{y||Pe(1)},[n,y]),m.useEffect(()=>{const K=le=>{qe.current&&!qe.current.contains(le.target)&&Je(!1)};return Te&&document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[Te]);const et=m.useMemo(()=>!x&&(!b||b.length===0)?He.filter(K=>!K.hidden):He.filter(K=>Re.includes(K.field)),[He,Re,x,b]),kt=m.useMemo(()=>!J||!a||!n?n||[]:[...n].sort((K,le)=>{const ve=K[J],Ve=le[J];if(ve===Ve)return 0;const Ne=ve>Ve?1:-1;return he==="asc"?Ne:-Ne}),[n,J,he,a]),We=m.useMemo(()=>{if(y||!r)return kt;const K=(de-1)*o,le=K+o;return kt.slice(K,le)},[kt,de,o,r,y]),it=y?w||1:de,At=y?A||1:Math.ceil((kt?.length||0)/o),nr=m.useCallback(K=>{y&&D?D(K):Pe(K)},[y,D]),jt=K=>{if(!a||t.find( Line truncated
px-4 py-2 rounded-md font-medium transition-colors
focus:outline-none focus:ring-2 focus:ring-offset-2
disabled:opacity-50 disabled:cursor-not-allowed
${d[g.variant||"primary"]}
`,children:[g.iconName&&c.jsx(ne,{name:g.iconName,className:"w-4 h-4 mr-2 inline-block"}),g.label]},h))})]})},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,hl=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,cancelText:o,onConfirm:s,onCancel:i,confirmButtonVariant:l="primary",cancelButtonVariant:f="secondary",width:u="500px",closeOnOverlay:d=!0,isLoading:g=!1,loadingText:h})=>{const b=r??ts("common.confirm"),p=o??ts("common.cancel"),x=h??ts("common.loading"),v=()=>{s()},O=()=>{g||(i?.(),t())},k=()=>{g||t()},C={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"};return c.jsxs(ma,{isOpen:e,onClose:k,title:n,width:u,children:[c.jsx(D,{className:"py-2",children:typeof a=="string"?c.jsx(ut,{className:"text-gray-700 dark:text-gray-300",children:a}):a}),c.jsxs(D,{className:"flex justify-end gap-3 mt-6",children:[c.jsx(oe,{onClick:O,disabled:g,className:"px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(Z,{children:p})}),c.jsxs(oe,{onClick:v,disabled:g,className:`flex items-center gap-2 px-4 py-2 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed ${C[l]}`,children:[g&&c.jsx(ne,{name:de.Spinner,className:"w-4 h-4 animate-spin"}),c.jsx(Z,{children:g?x:b})]})]})]})},t0=(e,t)=>window.G7Core?.t?.(e,t)??e,r0=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,onConfirm:o,confirmButtonVariant:s="primary",width:i="500px",closeOnOverlay:l=!0})=>{const d=[{label:r??t0("common.confirm"),onClick:()=>{o?.(),t()},variant:s}],g=typeof a=="string"?c.jsx(ut,{className:"text-gray-700 dark:text-gray-300",children:a}):a;return c.jsx(gl,{isOpen:e,onClose:t,title:n,content:g,actions:d,width:i,closeOnOverlay:l})},n0=(e,t)=>window.G7Core?.t?.(e,t)??e,a0={success:de.CheckCircle,error:de.XCircle,warning:de.ExclamationTriangle,info:de.InfoCircle},pl={success:{bg:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",text:"text-green-800 dark:text-green-300"},error:{bg:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",text:"text-red-800 dark:text-red-300"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",text:"text-yellow-800 dark:text-yellow-300"},info:{bg:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",text:"text-blue-800 dark:text-blue-300"}},o0={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},s0=({toasts:e,position:t="bottom-center",duration:n=3e3,onRemove:a})=>{const[r,o]=m.useState(new Map),s=m.useCallback(i=>{o(l=>{const f=new Map(l);return f.set(i,!1),f}),setTimeout(()=>{if(a)a(i);else{const l=window.G7Core;l?.state?.update&&l.state.update(f=>({toasts:(Array.isArray(f.toasts)?f.toasts:[]).filter(d=>d.id!==i)}))}},300)},[a]);return m.useEffect(()=>{!e||e.length===0||e.forEach(i=>{if(r.has(i.id))return;o(f=>{const u=new Map(f);return u.set(i.id,!0),u});const l=i.duration||n;l>0&&setTimeout(()=>{s(i.id)},l)})},[e,n,s,r]),!e||e.length===0?null:c.jsx(D,{className:`fixed z-[9999] flex flex-col gap-2 ${o0[t]}`,"aria-live":"polite","aria-atomic":"true",children:e.map(i=>c.jsx(i0,{toast:i,position:t,isVisible:r.get(i.id)??!0,onClose:()=>s(i.id)},i.id))})},i0=({toast:e,position:t,isVisible:n,onClose:a})=>{const r=pl[e.type]||pl.info,o=e.icon?e.icon:a0[e.type],s=t.startsWith("bottom")?"translate-y-2":"-translate-y-2";return c.jsxs(D,{className:`
${d[f.variant||"primary"]}
`,children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-4 h-4 mr-2 inline-block"}),f.label]},h))})]})},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,hl=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,cancelText:o,onConfirm:s,onCancel:i,confirmButtonVariant:l="primary",cancelButtonVariant:g="secondary",width:u="500px",closeOnOverlay:d=!0,isLoading:f=!1,loadingText:h})=>{const v=r??ts("common.confirm"),p=o??ts("common.cancel"),x=h??ts("common.loading"),b=()=>{s()},O=()=>{f||(i?.(),t())},C=()=>{f||t()},E={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"};return c.jsxs(ma,{isOpen:e,onClose:C,title:n,width:u,children:[c.jsx(_,{className:"py-2",children:typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a}),c.jsxs(_,{className:"flex justify-end gap-3 mt-6",children:[c.jsx(re,{onClick:O,disabled:f,className:"px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(Z,{children:p})}),c.jsxs(re,{onClick:b,disabled:f,className:`flex items-center gap-2 px-4 py-2 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed ${E[l]}`,children:[f&&c.jsx(ne,{name:ue.Spinner,className:"w-4 h-4 animate-spin"}),c.jsx(Z,{children:f?x:v})]})]})]})},t0=(e,t)=>window.G7Core?.t?.(e,t)??e,r0=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,onConfirm:o,confirmButtonVariant:s="primary",width:i="500px",closeOnOverlay:l=!0})=>{const d=[{label:r??t0("common.confirm"),onClick:()=>{o?.(),t()},variant:s}],f=typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a;return c.jsx(gl,{isOpen:e,onClose:t,title:n,content:f,actions:d,width:i,closeOnOverlay:l})},n0=(e,t)=>window.G7Core?.t?.(e,t)??e,a0={success:ue.CheckCircle,error:ue.XCircle,warning:ue.ExclamationTriangle,info:ue.InfoCircle},pl={success:{bg:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",text:"text-green-800 dark:text-green-300"},error:{bg:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",text:"text-red-800 dark:text-red-300"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",text:"text-yellow-800 dark:text-yellow-300"},info:{bg:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",text:"text-blue-800 dark:text-blue-300"}},o0={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},s0=({toasts:e,position:t="bottom-center",duration:n=3e3,onRemove:a})=>{const[r,o]=m.useState(new Map),s=m.useCallback(i=>{o(l=>{const g=new Map(l);return g.set(i,!1),g}),setTimeout(()=>{if(a)a(i);else{const l=window.G7Core;l?.state?.update&&l.state.update(g=>({toasts:(Array.isArray(g.toasts)?g.toasts:[]).filter(d=>d.id!==i)}))}},300)},[a]);return m.useEffect(()=>{!e||e.length===0||e.forEach(i=>{if(r.has(i.id))return;o(g=>{const u=new Map(g);return u.set(i.id,!0),u});const l=i.duration||n;l>0&&setTimeout(()=>{s(i.id)},l)})},[e,n,s,r]),!e||e.length===0?null:c.jsx(_,{className:`fixed z-[9999] flex flex-col gap-2 ${o0[t]}`,"aria-live":"polite","aria-atomic":"true",children:e.map(i=>c.jsx(i0,{toast:i,position:t,isVisible:r.get(i.id)??!0,onClose:()=>s(i.id)},i.id))})},i0=({toast:e,position:t,isVisible:n,onClose:a})=>{const r=pl[e.type]||pl.info,o=e.icon?e.icon:a0[e.type],s=t.startsWith("bottom")?"translate-y-2":"-translate-y-2";return c.jsxs(_,{className:`
flex items-center gap-3 p-4 rounded-lg border shadow-lg
min-w-[300px] max-w-md
transition-all duration-300
${r.bg}
${n?"opacity-100 translate-y-0":`opacity-0 ${s}`}
`,role:"alert",children:[c.jsx(ne,{name:o,className:`w-5 h-5 flex-shrink-0 ${r.text}`}),c.jsx(Z,{className:`flex-1 text-sm font-medium ${r.text}`,children:e.message}),c.jsx(oe,{onClick:a,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${r.text} focus:outline-none`,"aria-label":n0("common.close_notification"),children:c.jsx(ne,{name:de.Times,className:"w-4 h-4"})})]})},bl=({items:e,separator:t=c.jsx(ne,{name:de.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:a="/",maxItems:r,className:o=""})=>{let i=n?[{label:"Home",href:a},...e]:e,l=i,f=!1;if(r&&i.length>r){f=!0;const u=i.slice(0,1),d=i.slice(-(r-2));l=[...u,...d]}return c.jsx(ua,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",children:c.jsx(D,{className:"flex items-center space-x-2",children:l.map((u,d)=>{const g=d===l.length-1,h=d===0;return c.jsxs(m.Fragment,{children:[f&&h&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:!1}),c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:"..."}),l.length>1&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!f||!h)&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:g}),!g&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},d)})})})},ml=({item:e,isLast:t})=>t||!e.href&&!e.onClick?c.jsx(Z,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?c.jsx(Hr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):c.jsx(Hr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),l0=({title:e,description:t,iconName:n,illustrationSrc:a,illustrationAlt:r="Empty state illustration",actions:o=[],className:s=""})=>{const i={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return c.jsxs(D,{className:`flex flex-col items-center justify-center p-8 text-center ${s}`,role:"status","aria-live":"polite",children:[a?c.jsx(ar,{src:a,alt:r,className:"w-48 h-48 mb-6 object-contain"}):n?c.jsx(D,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:c.jsx(ne,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&c.jsx(ut,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&c.jsx(D,{className:"flex flex-wrap gap-3 justify-center",children:o.map((l,f)=>c.jsxs(oe,{onClick:l.onClick,className:`
`,role:"alert",children:[c.jsx(ne,{name:o,className:`w-5 h-5 flex-shrink-0 ${r.text}`}),c.jsx(Z,{className:`flex-1 text-sm font-medium ${r.text}`,children:e.message}),c.jsx(re,{onClick:a,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${r.text} focus:outline-none`,"aria-label":n0("common.close_notification"),children:c.jsx(ne,{name:ue.Times,className:"w-4 h-4"})})]})},bl=({items:e,separator:t=c.jsx(ne,{name:ue.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:a="/",maxItems:r,className:o=""})=>{let i=n?[{label:"Home",href:a},...e]:e,l=i,g=!1;if(r&&i.length>r){g=!0;const u=i.slice(0,1),d=i.slice(-(r-2));l=[...u,...d]}return c.jsx(ua,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",children:c.jsx(_,{className:"flex items-center space-x-2",children:l.map((u,d)=>{const f=d===l.length-1,h=d===0;return c.jsxs(m.Fragment,{children:[g&&h&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:!1}),c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:"..."}),l.length>1&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!g||!h)&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:f}),!f&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},d)})})})},ml=({item:e,isLast:t})=>t||!e.href&&!e.onClick?c.jsx(Z,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?c.jsx(jr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):c.jsx(jr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),l0=({title:e,description:t,iconName:n,illustrationSrc:a,illustrationAlt:r="Empty state illustration",actions:o=[],className:s=""})=>{const i={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return c.jsxs(_,{className:`flex flex-col items-center justify-center p-8 text-center ${s}`,role:"status","aria-live":"polite",children:[a?c.jsx(or,{src:a,alt:r,className:"w-48 h-48 mb-6 object-contain"}):n?c.jsx(_,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:c.jsx(ne,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&c.jsx(dt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&c.jsx(_,{className:"flex flex-wrap gap-3 justify-center",children:o.map((l,g)=>c.jsxs(re,{onClick:l.onClick,className:`
px-4 py-2 rounded-md font-medium transition-colors
focus:outline-none focus:ring-2 focus:ring-offset-2
${i[l.variant||"primary"]}
`,children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4 mr-2 inline-block"}),l.label]},f))})]})},c0=(e,t)=>window.G7Core?.t?.(e,t)??e,u0=({id:e,size:t="md",color:n="text-blue-600",fullscreen:a=!1,text:r,className:o=""})=>{const s={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},i={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},l=c.jsxs(D,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[c.jsx(D,{className:`
`,children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4 mr-2 inline-block"}),l.label]},g))})]})},c0=(e,t)=>window.G7Core?.t?.(e,t)??e,u0=({id:e,size:t="md",color:n="text-blue-600",fullscreen:a=!1,text:r,className:o=""})=>{const s={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},i={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},l=c.jsxs(_,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[c.jsx(_,{className:`
${s[t]}
border-gray-200 dark:border-gray-700 border-t-current
rounded-full animate-spin
${n}
`,role:"status","aria-label":c0("common.loading")}),r&&c.jsx(Z,{className:`${i[t]} ${n} font-medium`,children:r})]});return a?c.jsx(D,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",children:l}):c.jsx(D,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",children:l})},lt=({className:e="",children:t,style:n,...a})=>c.jsx("i",{className:e,style:n,...a,children:t}),Gr=()=>window.G7Core,rs=(e,t)=>window.G7Core?.t?.(e,t)??e,d0=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:a=!1,onToggleCollapse:r,className:o="",currentLocale:s})=>{const[i,l]=m.useState(new Set),[f,u]=m.useState(s||Gr()?.locale?.current?.()||"ko"),[d,g]=m.useState(window.location.pathname),h=m.useMemo(()=>{const S=[],y=w=>{for(const I of w)I.url&&S.push(I.url),I.children&&y(I.children)};return y(n),S},[n]),b=m.useCallback(S=>{let y=null;for(const w of h)(S===w||S.startsWith(w+"/"))&&(!y||w.length>y.length)&&(y=w);return y},[h]);m.useEffect(()=>{const S=Gr();return S?.state?.subscribe?S.state.subscribe(w=>{const I=w?._global?.locale||S?.locale?.current?.()||"ko";u(I);const L=w?._global?.currentPath||window.location.pathname;g(L)}):void 0},[]),m.useEffect(()=>{const S=()=>{g(window.location.pathname)};return window.addEventListener("popstate",S),()=>window.removeEventListener("popstate",S)},[]),m.useEffect(()=>{s&&u(s)},[s]);const p=(S,y)=>!S||typeof y!="string"?!1:y===S?!0:y.startsWith(S+"/")?b(y)===S:!1,x=(S,y)=>{const w=new Set,I=L=>{for(const F of L)if(F.children&&F.children.length>0){if(I(F.children)||p(F.url,y))return w.add(F.id),!0}else if(p(F.url,y))return!0;return!1};return I(S),w};m.useEffect(()=>{if(n.length>0&&d){const S=x(n,d);S.size>0&&l(y=>new Set([...y,...S]))}},[d,n]);const v=S=>p(S,d),O=S=>S.children?S.children.some(y=>v(y.url)||O(y)):!1,k=S=>{l(y=>{const w=new Set(y);return w.has(S)?w.delete(S):w.add(S),w})},C=S=>typeof S=="string"?S:S[f]||S.en||Object.values(S)[0]||"",N=(S,y)=>{Gr()?.dispatch?(S.preventDefault(),Gr().navigation?.onComplete(()=>{Gr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Gr().dispatch({handler:"navigate",params:{path:y}})):window.location.href=y},E=(S,y=0)=>{const w=S.children&&S.children.length>0,I=i.has(S.id),L=y*16+16,F=C(S.name),T=v(S.url),P=O(S),V="w-full flex items-center justify-between px-4 py-3 transition-colors",M="bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 border-l-4 border-blue-500",A="text-blue-600 dark:text-blue-400",j="text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700";return c.jsxs(D,{children:[w&&S.url?c.jsxs(D,{className:`
${V}
${T?M:P?A:j}
`,role:"status","aria-label":c0("common.loading")}),r&&c.jsx(Z,{className:`${i[t]} ${n} font-medium`,children:r})]});return a?c.jsx(_,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",children:l}):c.jsx(_,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",children:l})},lt=({className:e="",children:t,style:n,...a})=>c.jsx("i",{className:e,style:n,...a,children:t}),Wr=()=>window.G7Core,rs=(e,t)=>window.G7Core?.t?.(e,t)??e,d0=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:a=!1,onToggleCollapse:r,className:o="",currentLocale:s})=>{const[i,l]=m.useState(new Set),[g,u]=m.useState(s||Wr()?.locale?.current?.()||"ko"),[d,f]=m.useState(window.location.pathname),h=m.useMemo(()=>{const k=[],y=w=>{for(const A of w)A.url&&k.push(A.url),A.children&&y(A.children)};return y(n),k},[n]),v=m.useCallback(k=>{let y=null;for(const w of h)(k===w||k.startsWith(w+"/"))&&(!y||w.length>y.length)&&(y=w);return y},[h]);m.useEffect(()=>{const k=Wr();return k?.state?.subscribe?k.state.subscribe(w=>{const A=w?._global?.locale||k?.locale?.current?.()||"ko";u(A);const D=w?._global?.currentPath||window.location.pathname;f(D)}):void 0},[]),m.useEffect(()=>{const k=()=>{f(window.location.pathname)};return window.addEventListener("popstate",k),()=>window.removeEventListener("popstate",k)},[]),m.useEffect(()=>{s&&u(s)},[s]);const p=(k,y)=>!k||typeof y!="string"?!1:y===k?!0:y.startsWith(k+"/")?v(y)===k:!1,x=(k,y)=>{const w=new Set,A=D=>{for(const $ of D)if($.children&&$.children.length>0){if(A($.children)||p($.url,y))return w.add($.id),!0}else if(p($.url,y))return!0;return!1};return A(k),w};m.useEffect(()=>{if(n.length>0&&d){const k=x(n,d);k.size>0&&l(y=>new Set([...y,...k]))}},[d,n]);const b=k=>p(k,d),O=k=>k.children?k.children.some(y=>b(y.url)||O(y)):!1,C=k=>{l(y=>{const w=new Set(y);return w.has(k)?w.delete(k):w.add(k),w})},E=k=>typeof k=="string"?k:k[g]||k.en||Object.values(k)[0]||"",N=(k,y)=>{Wr()?.dispatch?(k.preventDefault(),Wr().navigation?.onComplete(()=>{Wr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Wr().dispatch({handler:"navigate",params:{path:y}})):window.location.href=y},S=(k,y=0)=>{const w=k.children&&k.children.length>0,A=i.has(k.id),D=y*16+16,$=E(k.name),M=b(k.url),L=O(k),U="w-full flex items-center justify-between px-4 py-3 transition-colors",T="bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 border-l-4 border-blue-500",I="text-blue-600 dark:text-blue-400",j="text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700";return c.jsxs(_,{children:[w&&k.url?c.jsxs(_,{className:`
${U}
${M?T:L?I:j}
${a?"justify-center":""}
`,style:{paddingLeft:a?void 0:`${L}px`},children:[c.jsxs(oe,{onClick:Y=>N(Y,S.url),className:"flex items-center justify-start flex-1 min-w-0",children:[S.icon&&c.jsx(lt,{className:`${S.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{className:"truncate",children:F})]}),!a&&c.jsxs(D,{className:"flex items-center gap-1",children:[S.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(oe,{onClick:()=>k(S.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":rs(I?"common.collapse":"common.expand"),children:c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${I?"rotate-180":""}`})})]})]}):w?c.jsxs(oe,{onClick:()=>k(S.id),className:`
${V}
${P?A:j}
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(re,{onClick:z=>N(z,k.url),className:"flex items-center justify-start flex-1 min-w-0",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{className:"truncate",children:$})]}),!a&&c.jsxs(_,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(re,{onClick:()=>C(k.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":rs(A?"common.collapse":"common.expand"),children:c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})})]})]}):w?c.jsxs(re,{onClick:()=>C(k.id),className:`
${U}
${L?I:j}
${a?"justify-center":""}
`,style:{paddingLeft:a?void 0:`${L}px`},children:[c.jsxs(D,{className:"flex items-center",children:[S.icon&&c.jsx(lt,{className:`${S.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&c.jsxs(D,{className:"flex items-center gap-1",children:[S.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${I?"rotate-180":""}`})]})]}):S.url?c.jsxs(oe,{onClick:Y=>N(Y,S.url),className:`
${V}
${T?M:j}
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&c.jsxs(_,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})]})]}):k.url?c.jsxs(re,{onClick:z=>N(z,k.url),className:`
${U}
${M?T:j}
${a?"justify-center":""}
text-left
`,style:{paddingLeft:a?void 0:`${L}px`},children:[c.jsxs(D,{className:"flex items-center",children:[S.icon&&c.jsx(lt,{className:`${S.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&S.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}):c.jsxs(oe,{className:`
${V}
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}):c.jsxs(re,{className:`
${U}
text-gray-400 dark:text-gray-500 cursor-default
${a?"justify-center":""}
text-left
`,style:{paddingLeft:a?void 0:`${L}px`},children:[c.jsxs(D,{className:"flex items-center",children:[S.icon&&c.jsx(lt,{className:`${S.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&S.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}),w&&!a&&I&&c.jsx(D,{className:"bg-gray-50 dark:bg-gray-900",children:S.children.map(Y=>E(Y,y+1))})]},S.id)};return c.jsxs(D,{className:o,children:[(e||r)&&c.jsxs(D,{className:"flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700",children:[e&&!a&&c.jsx(ar,{src:e,alt:t,className:"h-8"}),r&&c.jsx(oe,{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors","aria-label":rs(a?"common.expand_sidebar":"common.collapse_sidebar"),children:c.jsx(lt,{className:`${a?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-gray-600 dark:text-gray-400`})})]}),c.jsx(D,{children:n.map(S=>E(S))})]})},Sn=(e,t)=>window.G7Core?.t?.(e,t)??e,f0=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:a,onLogoutClick:r,className:o=""})=>{const[s,i]=m.useState(!1),[l,f]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),g=t.filter(h=>!h.read).length;return m.useEffect(()=>{const h=b=>{u.current&&!u.current.contains(b.target)&&i(!1),d.current&&!d.current.contains(b.target)&&f(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),c.jsxs(D,{className:`
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}),w&&!a&&A&&c.jsx(_,{className:"bg-gray-50 dark:bg-gray-900",children:k.children.map(z=>S(z,y+1))})]},k.id)};return c.jsxs(_,{className:o,children:[(e||r)&&c.jsxs(_,{className:"flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700",children:[e&&!a&&c.jsx(or,{src:e,alt:t,className:"h-8"}),r&&c.jsx(re,{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors","aria-label":rs(a?"common.expand_sidebar":"common.collapse_sidebar"),children:c.jsx(lt,{className:`${a?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-gray-600 dark:text-gray-400`})})]}),c.jsx(_,{children:n.map(k=>S(k))})]})},En=(e,t)=>window.G7Core?.t?.(e,t)??e,f0=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:a,onLogoutClick:r,className:o=""})=>{const[s,i]=m.useState(!1),[l,g]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),f=t.filter(h=>!h.read).length;return m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&i(!1),d.current&&!d.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),c.jsxs(_,{className:`
bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-4 flex items-center justify-end gap-4
${o}
`,children:[c.jsxs(D,{ref:u,className:"relative",children:[c.jsxs(oe,{onClick:()=>i(!s),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":Sn("common.notifications"),children:[c.jsx(ne,{name:de.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),g>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:g>9?"9+":g})]}),s&&c.jsxs(D,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsx(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:Sn("common.notifications")})}),c.jsx(D,{className:"max-h-96 overflow-y-auto",children:t.length===0?c.jsx(D,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:c.jsx(Z,{children:Sn("common.no_notifications")})}):t.map(h=>c.jsx(oe,{onClick:()=>{h.onClick?.(),n?.(h.id),i(!1)},className:`
`,children:[c.jsxs(_,{ref:u,className:"relative",children:[c.jsxs(re,{onClick:()=>i(!s),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":En("common.notifications"),children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:f>9?"9+":f})]}),s&&c.jsxs(_,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsx(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:En("common.notifications")})}),c.jsx(_,{className:"max-h-96 overflow-y-auto",children:t.length===0?c.jsx(_,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:c.jsx(Z,{children:En("common.no_notifications")})}):t.map(h=>c.jsx(re,{onClick:()=>{h.onClick?.(),n?.(h.id),i(!1)},className:`
w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-100 dark:border-gray-700 transition-colors
${h.read?"":"bg-blue-50 dark:bg-blue-900/20"}
`,children:c.jsxs(D,{className:"flex items-start gap-3",children:[h.iconName&&c.jsx(ne,{name:h.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),c.jsxs(D,{className:"flex-1",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:h.title}),c.jsx(D,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:h.message}),c.jsx(D,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:h.time})]}),!h.read&&c.jsx(Z,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},h.id))})]})]}),c.jsxs(D,{ref:d,className:"relative",children:[c.jsxs(oe,{onClick:()=>f(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?c.jsx(ar,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(D,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(D,{className:"hidden md:block text-left",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&c.jsxs(D,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),c.jsxs(D,{className:"py-2",children:[c.jsxs(oe,{onClick:()=>{a?.(),f(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[c.jsx(ne,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{children:Sn("common.profile_settings")})]}),c.jsxs(oe,{onClick:()=>{r?.(),f(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[c.jsx(ne,{name:de.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:Sn("common.logout")})]})]})]})]})]})},g0=({notifications:e=[],titleText:t="Notifications",emptyText:n="No notifications",onNotificationClick:a,className:r=""})=>{const[o,s]=m.useState(!1),i=m.useRef(null),l=e.filter(f=>!f.read).length;return m.useEffect(()=>{const f=u=>{i.current&&!i.current.contains(u.target)&&s(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]),c.jsxs(D,{ref:i,className:`relative ${r}`,children:[c.jsxs(oe,{onClick:()=>s(!o),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":t,children:[c.jsx(ne,{name:de.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),l>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:l>9?"9+":l})]}),o&&c.jsxs(D,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsx(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:t})}),c.jsx(D,{className:"max-h-96 overflow-y-auto",children:e.length===0?c.jsx(D,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:c.jsx(Z,{children:n})}):e.map(f=>c.jsx(oe,{onClick:()=>{f.onClick?.(),a?.(f.id),s(!1)},className:`
w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-100 dark:border-gray-700 transition-colors
${f.read?"":"bg-blue-50 dark:bg-gray-700"}
`,children:c.jsxs(D,{className:"flex items-start gap-3",children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),c.jsxs(D,{className:"flex-1",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:f.title}),c.jsx(D,{className:"text-gray-600 dark:text-gray-300 text-sm mt-1",children:f.message}),c.jsx(D,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:f.time})]}),!f.read&&c.jsx(Z,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},f.id))})]})]})},va=window.G7Core?.createLogger?.("Comp:LanguageSelector")??{log:(...e)=>console.log("[Comp:LanguageSelector]",...e),warn:(...e)=>console.warn("[Comp:LanguageSelector]",...e),error:(...e)=>console.error("[Comp:LanguageSelector]",...e)},vl=e=>({ko:"한국어",en:"English",ja:"日本語",zh:"中文",es:"Español",fr:"Français",de:"Deutsch"})[e]||e,yl=({availableLocales:e=["ko","en"],languageText:t="Language",apiEndpoint:n="/api/admin/users/me/language",onLanguageChange:a,className:r="",inline:o=!1})=>{const[s,i]=m.useState(!1),[l,f]=m.useState(!1),[u,d]=m.useState(()=>localStorage.getItem("g7_locale")||"ko"),g=m.useRef(null);m.useEffect(()=>{if(o)return;const x=v=>{g.current&&!g.current.contains(v.target)&&i(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[o]);const h=()=>{const v=`; ${document.cookie}`.split("; XSRF-TOKEN=");return v.length===2?decodeURIComponent(v.pop()?.split(";").shift()||""):null},b=()=>localStorage.getItem("auth_token"),p=async x=>{if(!(l||x===u))try{f(!0);const v=h(),O=b();try{const k=await fetch(n,{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json",...v&&{"X-XSRF-TOKEN":v},...O&&{Authorization:`Bearer ${O}`}},credentials:"include",body:JSON.stringify({language:x})});k.ok||va.warn("언어 설정 저장 실패 (UI는 변경됨):",k.statusText)}catch(k){va.warn("언어 설정 API 호출 실패 (UI는 변경됨):",k)}d(x),i(!1),a?.(x),window.__templateApp?await window.__templateApp.changeLocale(x):(va.warn("TemplateApp not found, reloading page"),window.location.reload())}catch(v){va.error("언어 변경 오류:",v)}finally{f(!1)}};return o?c.jsxs(D,{className:`${r}`,children:[c.jsxs(oe,{onClick:()=>i(!s),disabled:l,className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors",children:[c.jsx(ne,{name:de.Globe,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white flex-1",children:t}),c.jsx(Z,{className:"px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 rounded",children:u.toUpperCase()}),c.jsx(ne,{name:de.ChevronDown,className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${s?"rotate-180":""}`})]}),s&&c.jsx(D,{className:"px-4 py-2 flex flex-wrap gap-2",children:e.map(x=>c.jsx(oe,{onClick:()=>p(x),disabled:l,className:`
`,children:c.jsxs(_,{className:"flex items-start gap-3",children:[h.iconName&&c.jsx(ne,{name:h.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),c.jsxs(_,{className:"flex-1",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:h.title}),c.jsx(_,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:h.message}),c.jsx(_,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:h.time})]}),!h.read&&c.jsx(Z,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},h.id))})]})]}),c.jsxs(_,{ref:d,className:"relative",children:[c.jsxs(re,{onClick:()=>g(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(_,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(_,{className:"hidden md:block text-left",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&c.jsxs(_,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{a?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{children:En("common.profile_settings")})]}),c.jsxs(re,{onClick:()=>{r?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:En("common.logout")})]})]})]})]})]})},g0=({notifications:e=[],unreadCount:t=0,hasMore:n=!1,loading:a=!1,titleText:r="Notifications",emptyText:o="No notifications",markAllReadText:s="Mark all as read",deleteAllText:i="Delete all",unreadOnlyText:l="Unread only",unreadOnly:g=!1,onNotificationClick:u,onClose:d,onLoadMore:f,onMarkAllRead:h,onDeleteAll:v,onDelete:p,onUnreadOnlyToggle:x,dropdownAlign:b="right",className:O=""})=>{const[C,E]=m.useState(!1),N=m.useRef(null),S=m.useRef(null),k=m.useRef(null),y=m.useRef(new Set);m.useEffect(()=>{if(!k.current||!S.current||!n||a||!C)return;const $=new IntersectionObserver(([M])=>{M.isIntersecting&&f?.()},{root:S.current,threshold:.1});return $.observe(k.current),()=>$.disconnect()},[n,a,C,f,e.length]),m.useEffect(()=>{if(!S.current||!C)return;const $=new IntersectionObserver(L=>{L.forEach(U=>{const T=U.target.getAttribute("data-notification-id"),I=U.target.getAttribute("data-unread")==="true";T&&I&&U.isIntersecting&&y.current.add(T)})},{root:S.current,threshold:.5});return S.current.querySelectorAll("[data-notification-id]").forEach(L=>$.observe(L)),()=>$.disconnect()},[C,e]);const w=m.useCallback(()=>{if(C){const $=Array.from(y.current);$.length>0&&d?.($),y.current.clear(),E(!1)}},[C,d]);m.useEffect(()=>{if(!C)return;const $=M=>{N.current&&!N.current.contains(M.target)&&w()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[C,w]);const A=m.useCallback(()=>{C?w():E(!0)},[C,w]),D=t>0?t:e.filter($=>!$.read).length;return c.jsxs(_,{ref:N,className:`relative ${O}`,children:[c.jsxs(re,{onClick:A,className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":r,children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),D>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:D>99?"99+":D})]}),C&&c.jsxs(_,{className:`absolute ${b==="left"?"left-0":"right-0"} mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`,children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2",children:[c.jsxs(_,{className:"flex items-center gap-3 min-w-0",children:[c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:r}),x&&c.jsxs(_,{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>x(!g),children:[c.jsx(ft Line truncated
px-3 py-1.5 text-sm font-medium rounded-md transition-colors
${u===x?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
${l?"opacity-50 cursor-not-allowed":""}
`,children:vl(x)},x))})]}):c.jsxs(D,{ref:g,className:`relative ${r}`,children:[c.jsx(oe,{onClick:()=>i(!s),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":t,children:c.jsx(ne,{name:de.Globe,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),s&&c.jsx(D,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsx(D,{className:"py-2",children:e.map(x=>c.jsxs(oe,{onClick:()=>p(x),disabled:l,className:`
`,children:vl(x)},x))})]}):c.jsxs(_,{ref:f,className:`relative ${r}`,children:[c.jsx(re,{onClick:()=>i(!s),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":t,children:c.jsx(ne,{name:ue.Globe,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),s&&c.jsx(_,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsx(_,{className:"py-2",children:e.map(x=>c.jsxs(re,{onClick:()=>p(x),disabled:l,className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${u===x?"bg-gray-50 dark:bg-gray-700":""}
${l?"opacity-50 cursor-not-allowed":""}
`,children:[c.jsx(Z,{className:"text-gray-900 dark:text-white flex-1",children:vl(x)}),u===x&&c.jsx(ne,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},xl=window.G7Core?.createLogger?.("Comp:UserProfile")??{log:(...e)=>console.log("[Comp:UserProfile]",...e),warn:(...e)=>console.warn("[Comp:UserProfile]",...e),error:(...e)=>console.error("[Comp:UserProfile]",...e)},h0=({user:e={name:"",email:""},profileText:t="Profile Settings",logoutText:n="Logout",languageText:a="Language",availableLocales:r=["ko","en"],onProfileClick:o,onLogoutClick:s,className:i="",logoutEndpoint:l="/api/admin/auth/logout",redirectPath:f="/admin/login"})=>{const[u,d]=m.useState(!1),[g,h]=m.useState(!1),b=m.useRef(null);m.useEffect(()=>{const O=k=>{b.current&&!b.current.contains(k.target)&&d(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const p=()=>{const k=`; ${document.cookie}`.split("; XSRF-TOKEN=");return k.length===2?decodeURIComponent(k.pop()?.split(";").shift()||""):null},x=()=>localStorage.getItem("auth_token"),v=async()=>{if(!g)try{if(h(!0),d(!1),s){s();return}const O=p(),k=x(),C=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...O&&{"X-XSRF-TOKEN":O},...k&&{Authorization:`Bearer ${k}`}},credentials:"include"});C.ok?(localStorage.removeItem("auth_token"),window.location.href=f):(xl.error("로그아웃 실패:",C.statusText),localStorage.removeItem("auth_token"),window.location.href=f)}catch(O){xl.error("로그아웃 오류:",O),localStorage.removeItem("auth_token"),window.location.href=f}finally{h(!1)}};return c.jsxs(D,{ref:b,className:`relative ${i}`,children:[c.jsxs(oe,{onClick:()=>d(!u),className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors w-full",children:[e.avatar?c.jsx(ar,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(D,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(D,{className:"flex-1 text-left",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),u&&c.jsxs(D,{className:"absolute bottom-full left-0 mb-2 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",onClick:()=>{d(!1),window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}`}})},children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),r.length>1&&c.jsx(D,{className:"border-b border-gray-200 dark:border-gray-700",children:c.jsx(yl,{availableLocales:r,languageText:a,inline:!0,onLanguageChange:()=>d(!1)})}),c.jsxs(D,{className:"py-2",children:[c.jsxs(oe,{onClick:()=>{d(!1),o?o():window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}/edit`}})},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 transition-colors",children:[c.jsx(ne,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:t})]}),c.jsxs(oe,{onClick:v,disabled:g,className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 text-red-600 dark:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(ne,{name:de.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:g?"Logging out...":n})]})]})]})]})},p0=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:a="",changelogModalId:r,copyrightModalId:o})=>{const s=m.useCallback(()=>{r&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:r}],onError:[{handler:"openModal",target:r}]}]})},[r]),i=m.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return c.jsx(D,{className:`
`,children:[c.jsx(Z,{className:"text-gray-900 dark:text-white flex-1",children:vl(x)}),u===x&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},xl=window.G7Core?.createLogger?.("Comp:UserProfile")??{log:(...e)=>console.log("[Comp:UserProfile]",...e),warn:(...e)=>console.warn("[Comp:UserProfile]",...e),error:(...e)=>console.error("[Comp:UserProfile]",...e)},h0=({user:e={name:"",email:""},profileText:t="Profile Settings",logoutText:n="Logout",languageText:a="Language",availableLocales:r=["ko","en"],onProfileClick:o,onLogoutClick:s,className:i="",logoutEndpoint:l="/api/admin/auth/logout",redirectPath:g="/admin/login"})=>{const[u,d]=m.useState(!1),[f,h]=m.useState(!1),v=m.useRef(null);m.useEffect(()=>{const O=C=>{v.current&&!v.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const p=()=>{const C=`; ${document.cookie}`.split("; XSRF-TOKEN=");return C.length===2?decodeURIComponent(C.pop()?.split(";").shift()||""):null},x=()=>localStorage.getItem("auth_token"),b=async()=>{if(!f)try{if(h(!0),d(!1),s){s();return}const O=p(),C=x(),E=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...O&&{"X-XSRF-TOKEN":O},...C&&{Authorization:`Bearer ${C}`}},credentials:"include"});E.ok?(localStorage.removeItem("auth_token"),window.location.href=g):(xl.error("로그아웃 실패:",E.statusText),localStorage.removeItem("auth_token"),window.location.href=g)}catch(O){xl.error("로그아웃 오류:",O),localStorage.removeItem("auth_token"),window.location.href=g}finally{h(!1)}};return c.jsxs(_,{ref:v,className:`relative ${i}`,children:[c.jsxs(re,{onClick:()=>d(!u),className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors w-full",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(_,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(_,{className:"flex-1 text-left",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),u&&c.jsxs(_,{className:"absolute bottom-full left-0 mb-2 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",onClick:()=>{d(!1),window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}`}})},children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),r.length>1&&c.jsx(_,{className:"border-b border-gray-200 dark:border-gray-700",children:c.jsx(yl,{availableLocales:r,languageText:a,inline:!0,onLanguageChange:()=>d(!1)})}),c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{d(!1),o?o():window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}/edit`}})},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 transition-colors",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:t})]}),c.jsxs(re,{onClick:b,disabled:f,className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 text-red-600 dark:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:f?"Logging out...":n})]})]})]})]})},p0=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:a="",changelogModalId:r,copyrightModalId:o})=>{const s=m.useCallback(()=>{r&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:r}],onError:[{handler:"openModal",target:r}]}]})},[r]),i=m.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return c.jsx(_,{className:`
bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 px-6 py-4
${a}
`,children:c.jsxs(D,{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[c.jsxs(D,{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[c.jsx(Z,{className:o?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":"",onClick:o?i:void 0,children:e}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:"•"}),c.jsxs(Z,{className:`flex items-center gap-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":""}`,onClick:r?s:void 0,children:[c.jsx(ne,{name:de.Tag,className:"w-4 h-4"}),c.jsxs(Z,{children:["v",t]})]})]})]}),n.length>0&&c.jsx(D,{className:"flex items-center gap-4",children:n.map(l=>c.jsxs(Hr,{href:l.url,className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4"}),c.jsx(Z,{children:l.label})]},l.id))})]})})},b0=({title:e,description:t,breadcrumbItems:n,tabs:a,onTabChange:r,actions:o,className:s="",children:i})=>{const l=(f="secondary")=>`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${{primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800"}[f]}`;return c.jsxs(D,{className:s,children:[n&&n.length>0&&c.jsx(D,{className:"mb-4",children:c.jsx(bl,{items:n})}),c.jsxs(D,{className:"flex items-center justify-between mb-6",children:[c.jsxs(D,{children:[c.jsx(Ao,{className:"text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white",children:e}),t&&c.jsx(ut,{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t})]}),i?c.jsx(D,{className:"flex items-center gap-2",children:i}):o&&o.length>0?c.jsx(D,{className:"flex items-center gap-2",children:o.map(f=>c.jsxs(oe,{onClick:f.onClick,disabled:f.disabled,className:l(f.variant),children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-5 h-5"}),f.variant!=="ghost"&&f.label&&c.jsx(D,{children:f.label})]},f.id))}):null]}),a&&a.length>0&&c.jsx(D,{className:"flex gap-6 border-b border-gray-200 dark:border-gray-700 mb-6",children:a.map(f=>c.jsxs(oe,{onClick:()=>r?.(f.value),className:`
`,children:c.jsxs(_,{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[c.jsxs(_,{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[c.jsx(Z,{className:o?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":"",onClick:o?i:void 0,children:e}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:"•"}),c.jsxs(Z,{className:`flex items-center gap-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":""}`,onClick:r?s:void 0,children:[c.jsx(ne,{name:ue.Tag,className:"w-4 h-4"}),c.jsxs(Z,{children:["v",t]})]})]})]}),n.length>0&&c.jsx(_,{className:"flex items-center gap-4",children:n.map(l=>c.jsxs(jr,{href:l.url,className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4"}),c.jsx(Z,{children:l.label})]},l.id))})]})})},b0=({title:e,description:t,breadcrumbItems:n,tabs:a,onTabChange:r,actions:o,className:s="",children:i})=>{const l=(g="secondary")=>`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${{primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800"}[g]}`;return c.jsxs(_,{className:s,children:[n&&n.length>0&&c.jsx(_,{className:"mb-4",children:c.jsx(bl,{items:n})}),c.jsxs(_,{className:"flex items-center justify-between mb-6",children:[c.jsxs(_,{children:[c.jsx(Io,{className:"text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white",children:e}),t&&c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t})]}),i?c.jsx(_,{className:"flex items-center gap-2",children:i}):o&&o.length>0?c.jsx(_,{className:"flex items-center gap-2",children:o.map(g=>c.jsxs(re,{onClick:g.onClick,disabled:g.disabled,className:l(g.variant),children:[g.iconName&&c.jsx(ne,{name:g.iconName,className:"w-5 h-5"}),g.variant!=="ghost"&&g.label&&c.jsx(_,{children:g.label})]},g.id))}):null]}),a&&a.length>0&&c.jsx(_,{className:"flex gap-6 border-b border-gray-200 dark:border-gray-700 mb-6",children:a.map(g=>c.jsxs(re,{onClick:()=>r?.(g.value),className:`
px-1 py-3 border-b-2 transition-colors font-medium flex items-center gap-2 -mb-px
${f.active?"border-blue-600 text-blue-600 dark:text-blue-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[c.jsx(D,{children:f.label}),f.badge!==void 0&&c.jsx(D,{className:`
${g.active?"border-blue-600 text-blue-600 dark:text-blue-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[c.jsx(_,{children:g.label}),g.badge!==void 0&&c.jsx(_,{className:`
px-2 py-0.5 rounded-full text-xs font-semibold
${f.active?"bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}
`,children:f.badge})]},f.id))})]})},xr=(e,t)=>window.G7Core?.t?.(e,t)??e,m0=({image:e,imageAlt:t,vendor:n,name:a,version:r,status:o,updateAvailable:s=!1,latestVersion:i,dependencies:l=[],showLayoutEditButton:f=!1,actions:u=[],onLayoutEditClick:d,className:g=""})=>{const h=p=>({active:"success",inactive:"default",pending:"pending",error:"error"})[p],b=p=>({active:xr("common.status_active"),inactive:xr("common.status_inactive"),pending:xr("common.status_pending"),error:xr("common.status_error")})[p];return c.jsxs(D,{className:`
${g.active?"bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}
`,children:g.badge})]},g.id))})]})},xr=(e,t)=>window.G7Core?.t?.(e,t)??e,m0=({image:e,imageAlt:t,vendor:n,name:a,version:r,status:o,updateAvailable:s=!1,latestVersion:i,dependencies:l=[],showLayoutEditButton:g=!1,actions:u=[],onLayoutEditClick:d,className:f=""})=>{const h=p=>({active:"success",inactive:"default",pending:"pending",error:"error"})[p],v=p=>({active:xr("common.status_active"),inactive:xr("common.status_inactive"),pending:xr("common.status_pending"),error:xr("common.status_error")})[p];return c.jsxs(_,{className:`
bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow
${g}
`,children:[e&&c.jsxs(D,{className:"relative",children:[c.jsx(ar,{src:e,alt:t||xr("common.template_preview",{vendor:n,name:a}),className:"w-full h-48 object-cover"}),c.jsx(D,{className:"absolute top-3 right-3",children:c.jsx(fa,{status:h(o),label:b(o),showIcon:!0})}),s&&c.jsx(D,{className:"absolute top-3 left-3",children:c.jsxs(Z,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[c.jsx(ne,{name:de.ExclamationTriangle,className:"w-3 h-3"}),c.jsx(Z,{children:xr("common.update_available")})]})})]}),c.jsxs(D,{className:"p-4",children:[c.jsxs(D,{className:"flex items-start justify-between mb-3",children:[c.jsxs(D,{className:"flex-1",children:[c.jsxs(Vr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",a]}),c.jsxs(D,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[c.jsxs(Z,{children:["v",r]}),s&&i&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{children:"→"}),c.jsxs(Z,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",i]})]})]}),!e&&c.jsx(D,{className:"mt-2",children:c.jsx(fa,{status:h(o),label:b(o),showIcon:!0})})]}),u.length>0&&c.jsx(bn,{items:u,triggerIconName:de.EllipsisVertical,position:"left"})]}),l.length>0&&c.jsxs(D,{className:"mb-3",children:[c.jsxs(ut,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[xr("common.dependencies"),":"]}),c.jsx(D,{className:"flex flex-wrap gap-1",children:l.map((p,x)=>c.jsx(Z,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:p},x))})]}),f&&d&&c.jsxs(oe,{onClick:d,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[c.jsx(ne,{name:de.Edit,className:"w-4 h-4"}),c.jsx(Z,{children:xr("common.edit_layout")})]})]})]})},wl=({type:e,message:t,dismissible:n=!1,onDismiss:a,className:r=""})=>{const s={info:{bgColor:"bg-blue-100 dark:bg-blue-900",borderColor:"border-blue-400 dark:border-blue-600",textColor:"text-blue-800 dark:text-blue-200",iconColor:"text-blue-600 dark:text-blue-400",icon:de.InfoCircle},success:{bgColor:"bg-green-100 dark:bg-green-900",borderColor:"border-green-400 dark:border-green-600",textColor:"text-green-800 dark:text-green-200",iconColor:"text-green-600 dark:text-green-400",icon:de.CheckCircle},warning:{bgColor:"bg-yellow-100 dark:bg-yellow-900",borderColor:"border-yellow-400 dark:border-yellow-600",textColor:"text-yellow-800 dark:text-yellow-200",iconColor:"text-yellow-600 dark:text-yellow-400",icon:de.ExclamationTriangle},error:{bgColor:"bg-red-100 dark:bg-red-900",borderColor:"border-red-400 dark:border-red-600",textColor:"text-red-800 dark:text-red-200",iconColor:"text-red-600 dark:text-red-400",icon:de.TimesCircle}}[e],i=`
${f}
`,children:[e&&c.jsxs(_,{className:"relative",children:[c.jsx(or,{src:e,alt:t||xr("common.template_preview",{vendor:n,name:a}),className:"w-full h-48 object-cover"}),c.jsx(_,{className:"absolute top-3 right-3",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})}),s&&c.jsx(_,{className:"absolute top-3 left-3",children:c.jsxs(Z,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[c.jsx(ne,{name:ue.ExclamationTriangle,className:"w-3 h-3"}),c.jsx(Z,{children:xr("common.update_available")})]})})]}),c.jsxs(_,{className:"p-4",children:[c.jsxs(_,{className:"flex items-start justify-between mb-3",children:[c.jsxs(_,{className:"flex-1",children:[c.jsxs(Hr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",a]}),c.jsxs(_,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[c.jsxs(Z,{children:["v",r]}),s&&i&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{children:"→"}),c.jsxs(Z,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",i]})]})]}),!e&&c.jsx(_,{className:"mt-2",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})})]}),u.length>0&&c.jsx(mn,{items:u,triggerIconName:ue.EllipsisVertical,position:"left"})]}),l.length>0&&c.jsxs(_,{className:"mb-3",children:[c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[xr("common.dependencies"),":"]}),c.jsx(_,{className:"flex flex-wrap gap-1",children:l.map((p,x)=>c.jsx(Z,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:p},x))})]}),g&&d&&c.jsxs(re,{onClick:d,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[c.jsx(ne,{name:ue.Edit,className:"w-4 h-4"}),c.jsx(Z,{children:xr("common.edit_layout")})]})]})]})},wl=({type:e,message:t,dismissible:n=!1,onDismiss:a,className:r=""})=>{const s={info:{bgColor:"bg-blue-100 dark:bg-blue-900",borderColor:"border-blue-400 dark:border-blue-600",textColor:"text-blue-800 dark:text-blue-200",iconColor:"text-blue-600 dark:text-blue-400",icon:ue.InfoCircle},success:{bgColor:"bg-green-100 dark:bg-green-900",borderColor:"border-green-400 dark:border-green-600",textColor:"text-green-800 dark:text-green-200",iconColor:"text-green-600 dark:text-green-400",icon:ue.CheckCircle},warning:{bgColor:"bg-yellow-100 dark:bg-yellow-900",borderColor:"border-yellow-400 dark:border-yellow-600",textColor:"text-yellow-800 dark:text-yellow-200",iconColor:"text-yellow-600 dark:text-yellow-400",icon:ue.ExclamationTriangle},error:{bgColor:"bg-red-100 dark:bg-red-900",borderColor:"border-red-400 dark:border-red-600",textColor:"text-red-800 dark:text-red-200",iconColor:"text-red-600 dark:text-red-400",icon:ue.TimesCircle}}[e],i=`
flex items-start gap-3 p-4 rounded-lg border
${s.bgColor}
${s.borderColor}
${r}
`.trim().replace(/\s+/g," ");return c.jsxs(D,{className:i,role:"alert","aria-live":"polite",children:[c.jsx(ne,{name:s.icon,className:`${s.iconColor} flex-shrink-0 mt-0.5`,ariaLabel:`${e} icon`}),c.jsx(ut,{className:`flex-1 ${s.textColor} text-sm`,children:t}),n&&c.jsx(oe,{onClick:a,className:`${s.textColor} hover:opacity-70 flex-shrink-0 bg-transparent border-0 p-0 cursor-pointer`,"aria-label":"Close alert",children:c.jsx(ne,{name:de.Times,className:s.iconColor,ariaLabel:"Close"})})]})},v0=({layoutName:e,onBack:t,onPreview:n,onSave:a,isSaving:r=!1,className:o=""})=>{const s=`
`.trim().replace(/\s+/g," ");return c.jsxs(_,{className:i,role:"alert","aria-live":"polite",children:[c.jsx(ne,{name:s.icon,className:`${s.iconColor} flex-shrink-0 mt-0.5`,ariaLabel:`${e} icon`}),c.jsx(dt,{className:`flex-1 ${s.textColor} text-sm`,children:t}),n&&c.jsx(re,{onClick:a,className:`${s.textColor} hover:opacity-70 flex-shrink-0 bg-transparent border-0 p-0 cursor-pointer`,"aria-label":"Close alert",children:c.jsx(ne,{name:ue.Times,className:s.iconColor,ariaLabel:"Close"})})]})},v0=({layoutName:e,onBack:t,onPreview:n,onSave:a,isSaving:r=!1,className:o=""})=>{const s=`
flex items-center justify-between gap-4 p-4 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700
${o}
`.trim().replace(/\s+/g," ");return c.jsxs(D,{className:s,children:[c.jsxs(D,{className:"flex items-center gap-3",children:[c.jsx(oe,{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:c.jsx(ne,{name:de.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:e})]}),c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(oe,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:de.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),c.jsx("span",{children:"미리보기"})]})}),c.jsx(oe,{onClick:a,disabled:r,className:`
`.trim().replace(/\s+/g," ");return c.jsxs(_,{className:s,children:[c.jsxs(_,{className:"flex items-center gap-3",children:[c.jsx(re,{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:c.jsx(ne,{name:ue.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:e})]}),c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(re,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:ue.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),c.jsx("span",{children:"미리보기"})]})}),c.jsx(re,{onClick:a,disabled:r,className:`
px-4 py-2 rounded-lg transition-colors border-0 cursor-pointer
${r?"bg-blue-400 dark:bg-blue-600 cursor-not-allowed":"bg-blue-600 dark:bg-blue-500 hover:bg-blue-700 dark:hover:bg-blue-600"}
text-white
`.trim().replace(/\s+/g," "),"aria-label":r?"저장 중...":"저장",children:c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:r?de.Spinner:de.Save,className:`text-white ${r?"animate-spin":""}`,ariaLabel:r?"저장 중 아이콘":"저장 아이콘"}),c.jsx("span",{children:r?"저장 중...":"저장"})]})})]})]})},y0=({files:e,selectedId:t,onSelect:n,className:a=""})=>{const r=i=>{try{const l=new Date(i);if(isNaN(l.getTime()))return i;const f=l.getFullYear(),u=String(l.getMonth()+1).padStart(2,"0"),d=String(l.getDate()).padStart(2,"0"),g=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${f}-${u}-${d} ${g}:${h}`}catch{return i}},o=i=>{n(i)},s=`
`.trim().replace(/\s+/g," "),"aria-label":r?"저장 중...":"저장",children:c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:r?ue.Spinner:ue.Save,className:`text-white ${r?"animate-spin":""}`,ariaLabel:r?"저장 중 아이콘":"저장 아이콘"}),c.jsx("span",{children:r?"저장 중...":"저장"})]})})]})]})},y0=({files:e,selectedId:t,onSelect:n,className:a=""})=>{const r=i=>{try{const l=new Date(i);if(isNaN(l.getTime()))return i;const g=l.getFullYear(),u=String(l.getMonth()+1).padStart(2,"0"),d=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${g}-${u}-${d} ${f}:${h}`}catch{return i}},o=i=>{n(i)},s=`
w-full
${a}
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:s,children:e.length===0?c.jsx(D,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):c.jsx(Io,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(i=>{const l=i.id===t,f=`
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:s,children:e.length===0?c.jsx(_,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):c.jsx(Ao,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(i=>{const l=i.id===t,g=`
flex items-center justify-between p-4 cursor-pointer
transition-colors duration-150
${l?"bg-blue-100 dark:bg-blue-900 border-l-4 border-blue-500":"hover:bg-gray-100 dark:hover:bg-gray-800"}
@@ -148,8 +146,8 @@ var SirsoftAdminBasic=(function(Q,c,m,fr){"use strict";function Jf(e){const t=Ob
`.trim().replace(/\s+/g," "),d=`
text-sm
${l?"text-blue-700 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}
`.trim().replace(/\s+/g," ");return c.jsx(Lo,{className:f,onClick:()=>o(i.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),o(i.id))},children:c.jsxs(D,{className:"flex flex-col gap-1",children:[c.jsx(Z,{className:u,children:i.name}),c.jsx(Z,{className:d,children:r(i.updated_at)})]})},i.id)})})})};function kl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function x0(e){if(Array.isArray(e))return e}function w0(e,t,n){return(t=M0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){f=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function C0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(n),!0).forEach(function(a){w0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function S0(e,t){if(e==null)return{};var n,a,r=E0(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E0(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function N0(e,t){return x0(e)||k0(e,t)||T0(e,t)||C0()}function O0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M0(e){var t=O0(e,"string");return typeof t=="symbol"?t:t+""}function T0(e,t){if(e){if(typeof e=="string")return kl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kl(e,t):void 0}}function A0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?El(Object(n),!0).forEach(function(a){A0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function I0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){return t.reduceRight(function(r,o){return o(r)},a)}}function En(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return t.apply(n,[].concat(r,i))}}}function ya(e){return{}.toString.call(e).includes("Object")}function L0(e){return!Object.keys(e).length}function Nn(e){return typeof e=="function"}function D0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _0(e,t){return ya(t)||wr("changeType"),Object.keys(t).some(function(n){return!D0(e,n)})&&wr("changeField"),t}function P0(e){Nn(e)||wr("selectorType")}function $0(e){Nn(e)||ya(e)||wr("handlerType"),ya(e)&&Object.values(e).some(function(t){return!Nn(t)})&&wr("handlersType")}function F0(e){e||wr("initialIsRequired"),ya(e)||wr("initialType"),L0(e)&&wr("initialContent")}function U0(e,t){throw new Error(e[t]||e.default)}var V0={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wr=En(U0)(V0),xa={changes:_0,selector:P0,handler:$0,initial:F0};function H0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xa.initial(e),xa.handler(t);var n={current:e},a=En(G0)(n,t),r=En(z0)(n),o=En(xa.changes)(e),s=En(j0)(n);function i(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return xa.selector(f),f(n.current)}function l(f){I0(a,r,o,s)(f)}return[i,l]}function j0(e,t){return Nn(t)?t(e.current):t}function z0(e,t){return e.current=Nl(Nl({},e.current),t),t}function G0(e,t,n){return Nn(t)?t(e.current):Object.keys(n).forEach(function(a){var r;return(r=t[a])===null||r===void 0?void 0:r.call(t,e.current[a])}),n}var B0={create:H0},W0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function Y0(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l]; Line truncated
`.trim().replace(/\s+/g," ");return c.jsx(Lo,{className:g,onClick:()=>o(i.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(i.id))},children:c.jsxs(_,{className:"flex flex-col gap-1",children:[c.jsx(Z,{className:u,children:i.name}),c.jsx(Z,{className:d,children:r(i.updated_at)})]})},i.id)})})})};function kl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function x0(e){if(Array.isArray(e))return e}function w0(e,t,n){return(t=T0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,g=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){g=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function C0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(n),!0).forEach(function(a){w0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function S0(e,t){if(e==null)return{};var n,a,r=E0(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E0(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function N0(e,t){return x0(e)||k0(e,t)||M0(e,t)||C0()}function O0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T0(e){var t=O0(e,"string");return typeof t=="symbol"?t:t+""}function M0(e,t){if(e){if(typeof e=="string")return kl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kl(e,t):void 0}}function I0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?El(Object(n),!0).forEach(function(a){I0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function A0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){return t.reduceRight(function(r,o){return o(r)},a)}}function Nn(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return t.apply(n,[].concat(r,i))}}}function ya(e){return{}.toString.call(e).includes("Object")}function L0(e){return!Object.keys(e).length}function On(e){return typeof e=="function"}function D0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _0(e,t){return ya(t)||wr("changeType"),Object.keys(t).some(function(n){return!D0(e,n)})&&wr("changeField"),t}function P0(e){On(e)||wr("selectorType")}function $0(e){On(e)||ya(e)||wr("handlerType"),ya(e)&&Object.values(e).some(function(t){return!On(t)})&&wr("handlersType")}function F0(e){e||wr("initialIsRequired"),ya(e)||wr("initialType"),L0(e)&&wr("initialContent")}function U0(e,t){throw new Error(e[t]||e.default)}var V0={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wr=Nn(U0)(V0),xa={changes:_0,selector:P0,handler:$0,initial:F0};function H0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xa.initial(e),xa.handler(t);var n={current:e},a=Nn(G0)(n,t),r=Nn(z0)(n),o=Nn(xa.changes)(e),s=Nn(j0)(n);function i(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return xa.selector(g),g(n.current)}function l(g){A0(a,r,o,s)(g)}return[i,l]}function j0(e,t){return On(t)?t(e.current):t}function z0(e,t){return e.current=Nl(Nl({},e.current),t),t}function G0(e,t,n){return On(t)?t(e.current):Object.keys(n).forEach(function(a){var r;return(r=t[a])===null||r===void 0?void 0:r.call(t,e.current[a])}),n}var B0={create:H0},W0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function Y0(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l]; Line truncated
You are using deprecated way of configuration.
Instead of using
@@ -158,28 +156,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},Ml=Y0(Z0)(Ol),Q0={config:K0},J0=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function Tl(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Tl(e[n],t[n]))}),Sl(Sl({},e),t)}var R0={type:"cancelation",msg:"operation is manually canceled"};function ns(e){var t=!1,n=new Promise(function(a,r){e.then(function(o){return t?r(R0):a(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var eh=["monaco"],th=B0.create({config:W0,isInitialized:!1,resolve:null,reject:null,monaco:null}),Al=N0(th,2),On=Al[0],wa=Al[1];function rh(e){var t=Q0.config(e),n=t.monaco,a=S0(t,eh);wa(function(r){return{config:Tl(r.config,a),monaco:n}})}function nh(){var e=On(function(t){var n=t.monaco,a=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:a,resolve:r}});if(!e.isInitialized){if(wa({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ns(as);if(window.monaco&&window.monaco.editor)return Il(window.monaco),e.resolve(window.monaco),ns(as);J0(ah,sh)(ih)}return ns(as)}function ah(e){return document.body.appendChild(e)}function oh(e){var t=document.createElement("script");return e&&(t.src=e),t}function sh(e){var t=On(function(a){var r=a.config,o=a.reject;return{config:r,reject:o}}),n=oh("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ih(){var e=On(function(n){var a=n.config,r=n.resolve,o=n.reject;return{config:a,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var a=n.m;Il(a),e.resolve(a)},function(n){e.reject(n)})}function Il(e){On().monaco||wa({monaco:e})}function lh(){return On(function(e){var t=e.monaco;return t})}var as=new Promise(function(e,t){return wa({resolve:e,reject:t})}),Ll={config:rh,init:nh,__getMonacoInstance:lh},ch={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},os=ch,uh={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dh=uh;function fh({children:e}){return m.createElement("div",{style:dh.container},e)}var gh=fh,hh=gh;function ph({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:o,wrapperProps:s}){return m.createElement("section",{style:{...os.wrapper,width:e,height:t},...s},!n&&m.createElement(hh,null,a),m.createElement("div",{ref:r,style:{...os.fullWidth,...!n&&os.hide},className:o}))}var bh=ph,Dl=m.memo(bh);function mh(e){m.useEffect(e,[])}var _l=mh;function vh(e,t,n=!0){let a=m.useRef(!0);m.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Ut=vh;function Mn(){}function Br(e,t,n,a){return yh(e,a)||xh(e,t,n,a)}function yh(e,t){return e.editor.getModel(Pl(e,t))}function xh(e,t,n,a){return e.editor.createModel(t,n,a?Pl(e,a):void 0)}function Pl(e,t){return e.Uri.parse(t)}function wh({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:i=!1,keepCurrentModifiedModel:l=!1,theme:f="light",loading:u="Loading...",options:d={},height:g="100%",width:h="100%",className:b,wrapperProps:p={},beforeMount:x=Mn,onMount:v=Mn}){let[O,k]=m.useState(!1),[C,N]=m.useState(!0),E=m.useRef(null),S=m.useRef(null),y=m.useRef(null),w=m.useRef(v),I=m.useRef(x),L=m.useRef(!1);_l(()=>{let V=Ll.init();return V.then(M=>(S.current=M)&&N(!1)).catch(M=>M?.type!=="cancelation"&&console.error("Monaco initialization: error:",M)),()=>E.current?P():V.cancel()}),Ut(()=>{if(E.current&&S.current){let V=E.current.getOriginalEditor(),M=Br(S.current,e||"",a||n||"text",o||"");M!==V.getModel()&&V.setModel(M)}},[o],O),Ut(()=>{if(E.current&&S.current){let V=E.current.getModifiedEditor(),M=Br(S.current,t||"",r||n||"text",s||"");M!==V.getModel()&&V.setModel(M)}},[s],O),Ut(()=>{let V=E.current.getModifiedEditor();V.getOption(S.current.editor.EditorOption.readOnly)?V.setValue(t||""):t!==V.getValue()&&(V.executeEdits("",[{range:V.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),V.pushUndoStop())},[t],O),Ut(()=>{E.current?.getModel()?.original.setValue(e||"")},[e],O),Ut(()=>{let{original:V,modified:M}=E.current.getModel();S.current.editor.setModelLanguage(V,a||n||"text"),S.current.editor.setModelLanguage(M,r||n||"text")},[n,a,r],O),Ut(()=>{S.current?.editor.setTheme(f)},[f],O),Ut(()=>{E.current?.updateOptions(d)},[d],O);let F=m.useCallback(()=>{if(!S.current)return;I.current(S.current);let V=Br(S.current,e||"",a||n||"text",o||""),M=Br(S.current,t||"",r||n||"text",s||"");E.current?.setModel({original:V,modified:M})},[n,t,r,e,a,o,s]),T=m.useCallback(()=>{!L.current&&y.current&&(E.current=S.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...d}),F(),S.current?.editor.setTheme(f),k(!0),L.current=!0)},[d,f,F]);m.useEffect(()=>{O&&w.current(E.current,S.current)},[O]),m.useEffect(()=>{!C&&!O&&T()},[C,O,T]);function P(){let V=E.current?.getModel();i||V?.original?.disp Line truncated
`},Tl=Y0(Z0)(Ol),Q0={config:K0},J0=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function Ml(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Ml(e[n],t[n]))}),Sl(Sl({},e),t)}var R0={type:"cancelation",msg:"operation is manually canceled"};function ns(e){var t=!1,n=new Promise(function(a,r){e.then(function(o){return t?r(R0):a(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var eh=["monaco"],th=B0.create({config:W0,isInitialized:!1,resolve:null,reject:null,monaco:null}),Il=N0(th,2),Tn=Il[0],wa=Il[1];function rh(e){var t=Q0.config(e),n=t.monaco,a=S0(t,eh);wa(function(r){return{config:Ml(r.config,a),monaco:n}})}function nh(){var e=Tn(function(t){var n=t.monaco,a=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:a,resolve:r}});if(!e.isInitialized){if(wa({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ns(as);if(window.monaco&&window.monaco.editor)return Al(window.monaco),e.resolve(window.monaco),ns(as);J0(ah,sh)(ih)}return ns(as)}function ah(e){return document.body.appendChild(e)}function oh(e){var t=document.createElement("script");return e&&(t.src=e),t}function sh(e){var t=Tn(function(a){var r=a.config,o=a.reject;return{config:r,reject:o}}),n=oh("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ih(){var e=Tn(function(n){var a=n.config,r=n.resolve,o=n.reject;return{config:a,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var a=n.m;Al(a),e.resolve(a)},function(n){e.reject(n)})}function Al(e){Tn().monaco||wa({monaco:e})}function lh(){return Tn(function(e){var t=e.monaco;return t})}var as=new Promise(function(e,t){return wa({resolve:e,reject:t})}),Ll={config:rh,init:nh,__getMonacoInstance:lh},ch={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},os=ch,uh={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dh=uh;function fh({children:e}){return m.createElement("div",{style:dh.container},e)}var gh=fh,hh=gh;function ph({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:o,wrapperProps:s}){return m.createElement("section",{style:{...os.wrapper,width:e,height:t},...s},!n&&m.createElement(hh,null,a),m.createElement("div",{ref:r,style:{...os.fullWidth,...!n&&os.hide},className:o}))}var bh=ph,Dl=m.memo(bh);function mh(e){m.useEffect(e,[])}var _l=mh;function vh(e,t,n=!0){let a=m.useRef(!0);m.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Vt=vh;function Mn(){}function Yr(e,t,n,a){return yh(e,a)||xh(e,t,n,a)}function yh(e,t){return e.editor.getModel(Pl(e,t))}function xh(e,t,n,a){return e.editor.createModel(t,n,a?Pl(e,a):void 0)}function Pl(e,t){return e.Uri.parse(t)}function wh({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:i=!1,keepCurrentModifiedModel:l=!1,theme:g="light",loading:u="Loading...",options:d={},height:f="100%",width:h="100%",className:v,wrapperProps:p={},beforeMount:x=Mn,onMount:b=Mn}){let[O,C]=m.useState(!1),[E,N]=m.useState(!0),S=m.useRef(null),k=m.useRef(null),y=m.useRef(null),w=m.useRef(b),A=m.useRef(x),D=m.useRef(!1);_l(()=>{let U=Ll.init();return U.then(T=>(k.current=T)&&N(!1)).catch(T=>T?.type!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>S.current?L():U.cancel()}),Vt(()=>{if(S.current&&k.current){let U=S.current.getOriginalEditor(),T=Yr(k.current,e||"",a||n||"text",o||"");T!==U.getModel()&&U.setModel(T)}},[o],O),Vt(()=>{if(S.current&&k.current){let U=S.current.getModifiedEditor(),T=Yr(k.current,t||"",r||n||"text",s||"");T!==U.getModel()&&U.setModel(T)}},[s],O),Vt(()=>{let U=S.current.getModifiedEditor();U.getOption(k.current.editor.EditorOption.readOnly)?U.setValue(t||""):t!==U.getValue()&&(U.executeEdits("",[{range:U.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),U.pushUndoStop())},[t],O),Vt(()=>{S.current?.getModel()?.original.setValue(e||"")},[e],O),Vt(()=>{let{original:U,modified:T}=S.current.getModel();k.current.editor.setModelLanguage(U,a||n||"text"),k.current.editor.setModelLanguage(T,r||n||"text")},[n,a,r],O),Vt(()=>{k.current?.editor.setTheme(g)},[g],O),Vt(()=>{S.current?.updateOptions(d)},[d],O);let $=m.useCallback(()=>{if(!k.current)return;A.current(k.current);let U=Yr(k.current,e||"",a||n||"text",o||""),T=Yr(k.current,t||"",r||n||"text",s||"");S.current?.setModel({original:U,modified:T})},[n,t,r,e,a,o,s]),M=m.useCallback(()=>{!D.current&&y.current&&(S.current=k.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...d}),$(),k.current?.editor.setTheme(g),C(!0),D.current=!0)},[d,g,$]);m.useEffect(()=>{O&&w.current(S.current,k.current)},[O]),m.useEffect(()=>{!E&&!O&&M()},[E,O,M]);function L(){let U=S.current?.getModel();i||U?.original?.disp Line truncated
p-3 rounded-lg border cursor-pointer transition-colors
${o?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 hover:border-gray-400 dark:border-gray-600 dark:hover:border-gray-500"}
`,onClick:()=>n?.(r.id),children:c.jsxs(D,{className:"flex justify-between items-start",children:[c.jsxs(D,{className:"flex-1",children:[c.jsxs(Z,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",r.version]}),c.jsx(Z,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:a(r.created_at)})]}),c.jsxs(D,{className:"flex gap-3 text-sm",children:[c.jsxs(Z,{className:"text-green-600 dark:text-green-400",children:["+",r.changes_summary.added]}),c.jsxs(Z,{className:"text-red-600 dark:text-red-400",children:["-",r.changes_summary.removed]})]})]})},r.id)})})},Ah=({layoutId:e,versions:t,onRestore:n})=>{const[a,r]=m.useState(),o=l=>{r(l)},s=()=>{a!==void 0&&n(a)},i=a===void 0;return c.jsxs(D,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[c.jsx(D,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:c.jsx($l,{versions:t,selectedId:a,onSelect:o})}),c.jsx(D,{className:"flex justify-end",children:c.jsx(oe,{variant:"primary",disabled:i,onClick:s,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Ih=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:a="Processing...",emailPlaceholder:r="Email",passwordPlaceholder:o="Password",forgotPasswordText:s="Forgot your password?",forgotPasswordUrl:i="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:f="Please enter a valid email address.",passwordRequiredError:u="Please enter your password.",onSubmit:d,loadingActions:g={},isLoading:h=!1,disabled:b=!1,apiError:p="",className:x="",style:v})=>{const[O,k]=m.useState(""),[C,N]=m.useState(""),[E,S]=m.useState({}),y=p,w=Object.values(g).some(P=>P===!0),I=h||w,L=b||I,F=()=>{const P={},V=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!O||O.trim()===""?P.email=l:V.test(O)||(P.email=f),(!C||C.trim()==="")&&(P.password=u),S(P),Object.keys(P).length===0},T=async P=>{if(!F()){P.preventDefault();return}S({}),d?await d(P):P.preventDefault()};return c.jsx(D,{className:`w-full ${x}`,style:v,children:c.jsxs(Do,{onSubmit:T,className:"space-y-6",noValidate:!0,children:[y&&c.jsx(D,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:c.jsx(ut,{className:"text-sm text-red-600 dark:text-red-400",children:y})}),c.jsxs(D,{children:[c.jsx($t,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),c.jsx(gt,{id:"email",name:"email",type:"email",value:O,onChange:P=>k(P.target.value),placeholder:r,disabled:L,className:`
`,onClick:()=>n?.(r.id),children:c.jsxs(_,{className:"flex justify-between items-start",children:[c.jsxs(_,{className:"flex-1",children:[c.jsxs(Z,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",r.version]}),c.jsx(Z,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:a(r.created_at)})]}),c.jsxs(_,{className:"flex gap-3 text-sm",children:[c.jsxs(Z,{className:"text-green-600 dark:text-green-400",children:["+",r.changes_summary.added]}),c.jsxs(Z,{className:"text-red-600 dark:text-red-400",children:["-",r.changes_summary.removed]})]})]})},r.id)})})},Ih=({layoutId:e,versions:t,onRestore:n})=>{const[a,r]=m.useState(),o=l=>{r(l)},s=()=>{a!==void 0&&n(a)},i=a===void 0;return c.jsxs(_,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[c.jsx(_,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:c.jsx($l,{versions:t,selectedId:a,onSelect:o})}),c.jsx(_,{className:"flex justify-end",children:c.jsx(re,{variant:"primary",disabled:i,onClick:s,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Ah=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:a="Processing...",emailPlaceholder:r="Email",passwordPlaceholder:o="Password",forgotPasswordText:s="Forgot your password?",forgotPasswordUrl:i="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:g="Please enter a valid email address.",passwordRequiredError:u="Please enter your password.",onSubmit:d,loadingActions:f={},isLoading:h=!1,disabled:v=!1,apiError:p="",className:x="",style:b})=>{const[O,C]=m.useState(""),[E,N]=m.useState(""),[S,k]=m.useState({}),y=p,w=Object.values(f).some(L=>L===!0),A=h||w,D=v||A,$=()=>{const L={},U=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!O||O.trim()===""?L.email=l:U.test(O)||(L.email=g),(!E||E.trim()==="")&&(L.password=u),k(L),Object.keys(L).length===0},M=async L=>{if(!$()){L.preventDefault();return}k({}),d?await d(L):L.preventDefault()};return c.jsx(_,{className:`w-full ${x}`,style:b,children:c.jsxs(Do,{onSubmit:M,className:"space-y-6",noValidate:!0,children:[y&&c.jsx(_,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:c.jsx(dt,{className:"text-sm text-red-600 dark:text-red-400",children:y})}),c.jsxs(_,{children:[c.jsx(Ft,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),c.jsx(ft,{id:"email",name:"email",type:"email",value:O,onChange:L=>C(L.target.value),placeholder:r,disabled:D,className:`
w-full px-4 py-3 rounded-lg border
${E.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
${S.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
text-gray-900 dark:text-white
placeholder-gray-400 dark:placeholder-gray-500
focus:outline-none focus:ring-2
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
`}),E.email&&c.jsx(ut,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.email})]}),c.jsxs(D,{children:[c.jsx($t,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),c.jsx(gt,{id:"password",name:"password",type:"password",value:C,onChange:P=>N(P.target.value),placeholder:o,disabled:L,className:`
`}),S.email&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:S.email})]}),c.jsxs(_,{children:[c.jsx(Ft,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),c.jsx(ft,{id:"password",name:"password",type:"password",value:E,onChange:L=>N(L.target.value),placeholder:o,disabled:D,className:`
w-full px-4 py-3 rounded-lg border
${E.password?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
${S.password?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
text-gray-900 dark:text-white
placeholder-gray-400 dark:placeholder-gray-500
focus:outline-none focus:ring-2
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
`}),E.password&&c.jsx(ut,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.password})]}),i&&c.jsx(D,{className:"flex items-center justify-end",children:c.jsx(Hr,{href:i,className:"text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300 transition-colors duration-200",children:s})}),c.jsx(oe,{type:"submit",disabled:L,className:`
`}),S.password&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:S.password})]}),i&&c.jsx(_,{className:"flex items-center justify-end",children:c.jsx(jr,{href:i,className:"text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300 transition-colors duration-200",children:s})}),c.jsx(re,{type:"submit",disabled:D,className:`
w-full px-4 py-3 rounded-lg font-medium
bg-blue-600 hover:bg-blue-700
dark:bg-blue-500 dark:hover:bg-blue-600
@@ -189,16 +187,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
flex items-center justify-center
`,children:I?c.jsxs(c.Fragment,{children:[c.jsxs(gr,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a]}):n})]})})},Fl=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,ss=e=>{const t=Fl(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Lh=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},Dh=({onThemeChange:e,className:t="",autoText:n="System",lightText:a="Light",darkText:r="Dark"})=>{const o=Lh(),[s,i]=m.useState(o),[l,f]=m.useState(!1),u=m.useRef(null);m.useEffect(()=>{ss(s)},[]),m.useEffect(()=>{if(s!=="auto")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),b=()=>{ss("auto")};return h.addEventListener("change",b),()=>h.removeEventListener("change",b)},[s]),m.useEffect(()=>{const h=b=>{u.current&&!u.current.contains(b.target)&&f(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const d=h=>{i(h),localStorage.setItem("g7_color_scheme",h),ss(h),f(!1),e?.(h)},g=()=>Fl(s)==="dark"?de.Moon:de.Sun;return c.jsxs(D,{ref:u,className:`relative ${t}`,children:[c.jsx(oe,{onClick:()=>f(!l),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":"Toggle theme",children:c.jsx(ne,{name:g(),className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),l&&c.jsx(D,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsxs(D,{className:"py-2",children:[c.jsxs(oe,{onClick:()=>d("auto"),className:`
`,children:A?c.jsxs(c.Fragment,{children:[c.jsxs(gr,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a]}):n})]})})},Fl=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,ss=e=>{const t=Fl(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Lh=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},Dh=({onThemeChange:e,className:t="",autoText:n="System",lightText:a="Light",darkText:r="Dark"})=>{const o=Lh(),[s,i]=m.useState(o),[l,g]=m.useState(!1),u=m.useRef(null);m.useEffect(()=>{ss(s)},[]),m.useEffect(()=>{if(s!=="auto")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{ss("auto")};return h.addEventListener("change",v),()=>h.removeEventListener("change",v)},[s]),m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const d=h=>{i(h),localStorage.setItem("g7_color_scheme",h),ss(h),g(!1),e?.(h)},f=()=>Fl(s)==="dark"?ue.Moon:ue.Sun;return c.jsxs(_,{ref:u,className:`relative ${t}`,children:[c.jsx(re,{onClick:()=>g(!l),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":"Toggle theme",children:c.jsx(ne,{name:f(),className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),l&&c.jsx(_,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>d("auto"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:de.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),s==="auto"&&c.jsx(ne,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(oe,{onClick:()=>d("light"),className:`
`,children:[c.jsx(ne,{name:ue.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),s==="auto"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>d("light"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="light"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:de.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:a}),s==="light"&&c.jsx(ne,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(oe,{onClick:()=>d("dark"),className:`
`,children:[c.jsx(ne,{name:ue.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:a}),s==="light"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>d("dark"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:de.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),s==="dark"&&c.jsx(ne,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ul=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},Vl=(e,t)=>window.G7Core?.t?.(e,t)??e,_h=()=>window.G7Core,Ph=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:a,triggerLabel:r,triggerIconName:o=de.Sliders,position:s="right",className:i="",style:l,requiredText:f,menuTitle:u,menuDescription:d,defaultColumns:g,triggerClassName:h,labelClassName:b,dynamicColumns:p,dynamicColumnsInsertAfter:x})=>{const v=r??Vl("common.column_selector"),O=f??Vl("common.required"),k=m.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(x){const z=t.findIndex($=>$.field===x);if(z!==-1)return[...t.slice(0,z+1),...p,...t.slice(z+1)]}return[...t,...p]},[t,p,x]),[C,N]=m.useState(!1),E=m.useRef(null),S=m.useRef(null),[y,w]=m.useState(!1),[I,L]=m.useState(s),F=m.useMemo(()=>{try{const z=window.G7Core?.AuthManager?.getInstance();return z?z.getUser()?.uuid:void 0}catch{return}},[]),T=e?`g7_columns_${e}${F!==void 0?`_${F}`:""}`:null,P=()=>{if(!T)return null;try{const z=localStorage.getItem(T);if(z){const $=JSON.parse(z);if(Array.isArray($)&&$.length>0)return $}}catch(z){Ul.warn("Failed to load from localStorage:",z)}return null},V=z=>{if(T)try{localStorage.setItem(T,JSON.stringify(z))}catch($){Ul.warn("Failed to save to localStorage:",$)}},M=()=>{const z=P();return z||(n&&n.length>0?n:g&&g.length>0?g:k.filter($=>$.visible!==!1).map($=>$.field))},[A,j]=m.useState(M);m.useEffect(()=>{y||(a&&A.length>0&&a(A),w(!0))},[y,a,A]),m.useEffect(()=>{y&&n&&n.length>0&&(P()||j(n))},[n,y]);const U=m.useRef([]),Y=m.useRef(null);m.useEffect(()=>{if(y&&p&&p.length>0){const z=p.map(J=>J.field);if(Y.current===null){const J=P();if(Y.current=J!==null,J!==null){U.current=z;return}}const $=U.current,q=z.filter(J=>!$.includes(J));if(q.length>0){const J=n&&n.length>0?n:A,R=q.filter(ee=>!J.includes(ee));if(R.length>0){const ee=[...J,...R];j(ee),V(ee),a?.(ee)}}U.current=z}},[p,y]);const G=n&&n.length>0?n:A;m.useEffect(()=>{const z=$=>{E.current&&!E.current.contains($.target)&&N(!1)};return C&&document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[C]),m.useEffect(()=>{if(C&&S.current&&E.current){const z=S.current.getBoundingClientRect(),$=E.current.getBoundingClientRect(),q=window.innerWidth,J=z.width||256;s==="right"?$.right-J<0?L("left"):L("right"):$.left+J>q?L("right"):L("left")}},[C,s]);const H=z=>{if(k.find(J=>J.field===z)?.required)return;const q=G.includes(z)?G.filter(J=>J!==z):[...G,z];j(q),V(q),a?.(q)},B=I==="left"?"left-0":"right-0";return c.jsxs(D,{ref:E,className:`relative inline-block ${i}`,style:l,children:[c.jsxs(oe,{onClick:()=>N(!C),className:_h()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",h)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${h??""}`,children:[c.jsx(ne,{name:o,className:"w-5 h-5"}),v&&c.jsx(Z,{className:`${b||"hidden sm:inline"} text-sm`,children:v})]}),C&&c.jsxs(D,{ref:S,className:`absolute ${B} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(u||d)&&c.jsxs(D,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[u&&c.jsx(Z,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:u}),d&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:d})]}),c.jsx(D,{className:"p-2 max-h-64 overflow-y-auto",children:k.map(z=>{const $=G.includes(z.field),q=z.required===!0;return c.jsxs(D,{onClick:()=>!q&&H(z.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${q?"cursor-default":"cursor-pointer"}`,children:[c.jsx(Xt,{checked:$,disabled:q,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),c.jsx(Z,{className:"text-sm text-gray-700 dark:text-gray-300",children:z.header}),q&&O&&c.jsx(Z,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:O})]},z.field)})})]})]})},$h=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},Fh=({className:e="",style:t})=>{const[n,a]=m.useState(!1);return m.useEffect(()=>{const r=window.G7Core?.Trans Line truncated
`,children:[c.jsx(ne,{name:ue.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),s==="dark"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ul=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},Vl=(e,t)=>window.G7Core?.t?.(e,t)??e,_h=()=>window.G7Core,Ph=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:a,triggerLabel:r,triggerIconName:o=ue.Sliders,position:s="right",className:i="",style:l,requiredText:g,menuTitle:u,menuDescription:d,defaultColumns:f,triggerClassName:h,labelClassName:v,dynamicColumns:p,dynamicColumnsInsertAfter:x})=>{const b=r??Vl("common.column_selector"),O=g??Vl("common.required"),C=m.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(x){const B=t.findIndex(F=>F.field===x);if(B!==-1)return[...t.slice(0,B+1),...p,...t.slice(B+1)]}return[...t,...p]},[t,p,x]),[E,N]=m.useState(!1),S=m.useRef(null),k=m.useRef(null),[y,w]=m.useState(!1),[A,D]=m.useState(s),$=m.useMemo(()=>{try{const B=window.G7Core?.AuthManager?.getInstance();return B?B.getUser()?.uuid:void 0}catch{return}},[]),M=e?`g7_columns_${e}${$!==void 0?`_${$}`:""}`:null,L=()=>{if(!M)return null;try{const B=localStorage.getItem(M);if(B){const F=JSON.parse(B);if(Array.isArray(F)&&F.length>0)return F}}catch(B){Ul.warn("Failed to load from localStorage:",B)}return null},U=B=>{if(M)try{localStorage.setItem(M,JSON.stringify(B))}catch(F){Ul.warn("Failed to save to localStorage:",F)}},T=()=>{const B=L();return B||(n&&n.length>0?n:f&&f.length>0?f:C.filter(F=>F.visible!==!1).map(F=>F.field))},[I,j]=m.useState(T);m.useEffect(()=>{y||(a&&I.length>0&&a(I),w(!0))},[y,a,I]),m.useEffect(()=>{y&&n&&n.length>0&&(L()||j(n))},[n,y]);const V=m.useRef([]),z=m.useRef(null);m.useEffect(()=>{if(y&&p&&p.length>0){const B=p.map(R=>R.field);if(z.current===null){const R=L();if(z.current=R!==null,R!==null){V.current=B;return}}const F=V.current,Y=B.filter(R=>!F.includes(R));if(Y.length>0){const R=n&&n.length>0?n:I,ae=Y.filter(ee=>!R.includes(ee));if(ae.length>0){const ee=[...R,...ae];j(ee),U(ee),a?.(ee)}}V.current=B}},[p,y]);const G=n&&n.length>0?n:I;m.useEffect(()=>{const B=F=>{S.current&&!S.current.contains(F.target)&&N(!1)};return E&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[E]),m.useEffect(()=>{if(E&&k.current&&S.current){const B=k.current.getBoundingClientRect(),F=S.current.getBoundingClientRect(),Y=window.innerWidth,R=B.width||256;s==="right"?F.right-R<0?D("left"):D("right"):F.left+R>Y?D("right"):D("left")}},[E,s]);const H=B=>{if(C.find(R=>R.field===B)?.required)return;const Y=G.includes(B)?G.filter(R=>R!==B):[...G,B];j(Y),U(Y),a?.(Y)},W=A==="left"?"left-0":"right-0";return c.jsxs(_,{ref:S,className:`relative inline-block ${i}`,style:l,children:[c.jsxs(re,{onClick:()=>N(!E),className:_h()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",h)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${h??""}`,children:[c.jsx(ne,{name:o,className:"w-5 h-5"}),b&&c.jsx(Z,{className:`${v||"hidden sm:inline"} text-sm`,children:b})]}),E&&c.jsxs(_,{ref:k,className:`absolute ${W} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(u||d)&&c.jsxs(_,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[u&&c.jsx(Z,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:u}),d&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:d})]}),c.jsx(_,{className:"p-2 max-h-64 overflow-y-auto",children:C.map(B=>{const F=G.includes(B.field),Y=B.required===!0;return c.jsxs(_,{onClick:()=>!Y&&H(B.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${Y?"cursor-default":"cursor-pointer"}`,children:[c.jsx(Xt,{checked:F,disabled:Y,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),c.jsx(Z,{className:"text-sm text-gray-700 dark:text-gray-300",children:B.header}),Y&&O&&c.jsx(Z,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:O})]},B.field)})})]})]})},$h=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},Fh=({className:e="",style:t})=>{const[n,a]=m.useState(!1);return m.useEffect(()=>{const r=window.G7Core?.Tr Line truncated
@keyframes loading {
0% {
transform: translateX(-100%);
@@ -210,19 +208,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
transform: translateX(-100%);
}
}
`})]}):null};function Or(e){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(e)}function Uh(e,t){if(Or(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Or(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hl(e){var t=Uh(e,"string");return Or(t)=="symbol"?t:t+""}function Tn(e,t,n){return(t=Hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jl(Object(n),!0).forEach(function(a){Tn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Vh(e){if(Array.isArray(e))return e}function Hh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){f=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function is(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function zl(e,t){if(e){if(typeof e=="string")return is(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(e,t):void 0}}function jh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hr(e,t){return Vh(e)||Hh(e,t)||zl(e,t)||jh()}function zh(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function or(e,t){if(e==null)return{};var n,a,r=zh(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Gh=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Gl(e){var t=e.defaultInputValue,n=t===void 0?"":t,a=e.defaultMenuIsOpen,r=a===void 0?!1:a,o=e.defaultValue,s=o===void 0?null:o,i=e.inputValue,l=e.menuIsOpen,f=e.onChange,u=e.onInputChange,d=e.onMenuClose,g=e.onMenuOpen,h=e.value,b=or(e,Gh),p=m.useState(i!==void 0?i:n),x=hr(p,2),v=x[0],O=x[1],k=m.useState(l!==void 0?l:r),C=hr(k,2),N=C[0],E=C[1],S=m.useState(h!==void 0?h:s),y=hr(S,2),w=y[0],I=y[1],L=m.useCallback(function(j,U){typeof f=="function"&&f(j,U),I(j)},[f]),F=m.useCallback(function(j,U){var Y;typeof u=="function"&&(Y=u(j,U)),O(Y!==void 0?Y:j)},[u]),T=m.useCallback(function(){typeof g=="function"&&g(),E(!0)},[g]),P=m.useCallback(function(){typeof d=="function"&&d(),E(!1)},[d]),V=i!==void 0?i:v,M=l!==void 0?l:N,A=h!==void 0?h:w;return Ee(Ee({},b),{},{inputValue:V,menuIsOpen:M,onChange:L,onInputChange:F,onMenuClose:P,onMenuOpen:T,value:A})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Me.apply(null,arguments)}function Bh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bl(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Hl(a.key),a)}}function Wh(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ls(e,t){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ls(e,t)}function Yh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ls(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wl=function(){return!!e})()}function qh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kh(e,t){if(t&&(Or(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qh(e)}function Xh(e){var t=Wl();return function(){var n,a=Ca(e);if(t){var r=Ca(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Kh(this,n)}}function Zh(e){if(Array.isArray(e))return is(e)}function Qh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(e){return Zh(e)||Qh(e)||zl(e)||Jh()}function Rh(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ep(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var tp=(function(){function e(n){var a=this;this._insertTag=function(r){var o;a.tags.length===0?a.insertionPoint?o=a.insertionPoint.nextSibling:a.prepend?o=a.container.firstChild:o=a.before:o=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,o),a.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ep(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Rh(r);try{o.insertRule(a,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var r;return(r=a.parentNode)==null?void 0:r.removeChild(a)}),this.tags=[],this.ctr=0},e})(),kt="-ms-",Sa="-moz-",Ke="-webkit-",Yl="comm",cs="rule",us="decl",rp="@import",ql="@keyframes",np="@layer",ap=Math.abs,Ea=String.fromCharCode,op=Object.assign;function sp(e,t){return yt(e,0)^45?(((t<<2^yt(e,0))<<2^yt(e,1))<<2^yt(e,2))<<2^yt(e,3):0}function Kl(e){return e.trim()}function ip(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function ds(e,t){return e.indexOf(t)}function yt(e,t){return e.charCodeAt(t)|0}function An(e,t,n){return e.slice(t,n)}function sr(e){return e.length}function fs(e){return e.length}function Na(e,t){return t.push(e),e}function lp(e,t){return e.map(t).join("")}var Oa=1,Yr=1,Xl=0,Dt=0,dt=0,qr="";function Ma(e,t,n,a,r,o,s){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:Oa,column:Yr,length:s,return:""}}function In(e,t){return op(Ma("",null,null,"",null,null,0),e,{length:-e.length},t)}function cp(){return dt}function up(){return dt=Dt>0?yt(qr,--Dt):0,Yr--,dt===10&&(Yr=1,Oa--),dt}function Vt(){return dt=Dt<Xl?yt(qr,Dt++):0,Yr++,dt===10&&(Yr=1,Oa++),dt}function ir(){return yt(qr,Dt)}function Ta(){return Dt}function Ln(e,t){return An(qr,e,t)}function Dn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zl(e){return Oa=Yr=1,Xl=sr(qr=e),Dt=0,[]}function Ql(e){return qr="",e}function Aa(e){return Kl(Ln(Dt-1,gs(e===91?e+2:e===40?e+1:e)))}function dp(e){for(;(dt=ir())&&dt<33;)Vt();return Dn(e)>2||Dn(dt)>3?"":" "}function fp(e,t){for(;--t&&Vt()&&!(dt<48||dt>102||dt>57&&dt<65||dt>70&&dt<97););return Ln(e,Ta()+(t<6&&ir()==32&&Vt()==32))}function gs(e){for(;Vt();)switch(dt){case e:return Dt;case 34:case 39:e!==34&&e!==39&&gs(dt);break;case 40:e===41&&gs(e);break;case 92:Vt();break}return Dt}function gp(e,t){for(;Vt()&&e+dt!==57;)if(e+dt===84&&ir()===47)break;return"/*"+Ln(t,Dt-1)+"*"+Ea(e===47?e:Vt())}function hp(e){for(;!Dn(ir());)Vt();return Ln(e,Dt)}function pp(e){return Ql(Ia("",null,null,null,[""],e=Zl(e),0,[0],e))}function Ia(e,t,n,a,r,o,s,i,l){for(var f=0,u=0,d=s,g=0,h=0,b=0,p=1,x=1,v=1,O=0,k="",C=r,N=o,E=a,S=k;x;)switch(b=O,O=Vt()){case 40:if(b!=108&&yt(S,d-1)==58){ds(S+=Xe(Aa(O),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Aa(O);break;case 9:case 10:case 13:case 32:S+=dp(b);break;case 92:S+=fp(Ta()-1,7);continue;case 47:switch(ir()){case 42:case 47:Na(bp(gp(Vt(),Ta()),t,n),l);break;default:S+="/"}break;case 123*p:i[f++]=sr(S)*v;case 125*p:case 59:case 0:switch(O){case 0:case 125:x=0;case 59+u:v==-1&&(S=Xe(S,/\f/g,"")),h>0&&sr(S)-d&&Na(h>32?Rl(S+";",a,n,d-1):Rl(Xe(S," ","")+";",a,n,d-2),l);break;case 59:S+=";";default:if(Na(E=Jl(S,t,n,f,u,r,i,k,C=[],N=[],d),o),O===123)if(u===0)Ia(S,t,E,E,C,o,d,i,N);else switch(g===99&&yt(S,3)===110?100:g){case 100:case 108:case 109:case 115:Ia(e,E,E,a&&Na(Jl(e,E,E,0,0,r,i,k,r,C=[],d),N),r,N,d,i,a?C:N);break;default:Ia(S,E,E,E,[""],N,0,i,N)}}f=u=h=0,p=v=1,k=S="",d=s;break;case 58:d=1+sr(S),h=b;default:if(p<1){if(O==123)--p;else if(O==125&&p++==0&&up()==125)continue}switch(S+=Ea(O),O*p){case 38:v=u>0?1:(S+="\f",-1);break;case 44:i[f++]=(sr(S)-1)*v,v=1;break;case 64:ir()===45&&(S+=Aa(Vt())),g=ir(),u=d=sr(k=S+=hp(Ta())),O++;break;case 45:b===45&&sr(S)==2&&(p=0)}}return o}function Jl(e,t,n,a,r,o,s,i,l,f,u){for(var d=r-1,g=r===0?o:[""],h=fs(g),b=0,p=0,x=0;b<a;++b)for(var v=0,O=An(e,d+1,d=ap(p=s[b])),k=e;v<h;++v)(k=Kl(p>0?g[v]+" "+O:Xe(O,/&\f/g,g[v])))&&(l[x++]=k);retu Line truncated
`})]}):null},Uh=(e,t)=>window.G7Core?.t?.(e,t)??e,Vh=({options:e})=>{const t=document.documentElement.classList.contains("dark"),n=t?"rgb(17,24,39)":"rgb(249,250,251)",a=t?"#6b7280":"#9ca3af",r=t?"#9ca3af":"#6b7280";return c.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[c.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${a}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),c.jsx("span",{style:{color:r,fontSize:"14px"},children:e?.text||Uh("nav.loading")})]})};function Or(e){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(e)}function Hh(e,t){if(Or(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Or(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hl(e){var t=Hh(e,"string");return Or(t)=="symbol"?t:t+""}function In(e,t,n){return(t=Hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jl(Object(n),!0).forEach(function(a){In(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jh(e){if(Array.isArray(e))return e}function zh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,g=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){g=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function is(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function zl(e,t){if(e){if(typeof e=="string")return is(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(e,t):void 0}}function Gh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hr(e,t){return jh(e)||zh(e,t)||zl(e,t)||Gh()}function Bh(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function sr(e,t){if(e==null)return{};var n,a,r=Bh(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Wh=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Gl(e){var t=e.defaultInputValue,n=t===void 0?"":t,a=e.defaultMenuIsOpen,r=a===void 0?!1:a,o=e.defaultValue,s=o===void 0?null:o,i=e.inputValue,l=e.menuIsOpen,g=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=sr(e,Wh),p=m.useState(i!==void 0?i:n),x=hr(p,2),b=x[0],O=x[1],C=m.useState(l!==void 0?l:r),E=hr(C,2),N=E[0],S=E[1],k=m.useState(h!==void 0?h:s),y=hr(k,2),w=y[0],A=y[1],D=m.useCallback(function(j,V){typeof g=="function"&&g(j,V),A(j)},[g]),$=m.useCallback(function(j,V){var z;typeof u=="function"&&(z=u(j,V)),O(z!==void 0?z:j)},[u]),M=m.useCallback(function(){typeof f=="function"&&f(),S(!0)},[f]),L=m.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),U=i!==void 0?i:b,T=l!==void 0?l:N,I=h!==void 0?h:w;return Ee(Ee({},v),{},{inputValue:U,menuIsOpen:T,onChange:D,onInputChange:$,onMenuClose:L,onMenuOpen:M,value:I})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Me.apply(null,arguments)}function Yh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bl(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Hl(a.key),a)}}function qh(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ls(e,t){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ls(e,t)}function Kh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ls(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wl=function(){return!!e})()}function Xh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zh(e,t){if(t&&(Or(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xh(e)}function Qh(e){var t=Wl();return function(){var n,a=Ca(e);if(t){var r=Ca(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Zh(this,n)}}function Jh(e){if(Array.isArray(e))return is(e)}function Rh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(e){return Jh(e)||Rh(e)||zl(e)||ep()}function tp(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rp(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var np=(function(){function e(n){var a=this;this._insertTag=function(r){var o;a.tags.length===0?a.insertionPoint?o=a.insertionPoint.nextSibling:a.prepend?o=a.container.firstChild:o=a.before:o=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,o),a.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rp(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=tp(r);try{o.insertRule(a,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var r;return(r=a.parentNode)==null?void 0:r.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Ct="-ms-",Sa="-moz-",Ke="-webkit-",Yl="comm",cs="rule",us="decl",ap="@import",ql="@keyframes",op="@layer",sp=Math.abs,Ea=String.fromCharCode,ip=Object.assign;function lp(e,t){return yt(e,0)^45?(((t<<2^yt(e,0))<<2^yt(e,1))<<2^yt(e,2))<<2^yt(e,3):0}function Kl(e){return e.trim()}function cp(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function ds(e,t){return e.indexOf(t)}function yt(e,t){return e.charCodeAt(t)|0}function An(e,t,n){return e.slice(t,n)}function ir(e){return e.length}function fs(e){return e.length}function Na(e,t){return t.push(e),e}function up(e,t){return e.map(t).join("")}var Oa=1,Kr=1,Xl=0,_t=0,gt=0,Xr="";function Ta(e,t,n,a,r,o,s){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:Oa,column:Kr,length:s,return:""}}function Ln(e,t){return ip(Ta("",null,null,"",null,null,0),e,{length:-e.length},t)}function dp(){return gt}function fp(){return gt=_t>0?yt(Xr,--_t):0,Kr--,gt===10&&(Kr=1,Oa--),gt}function Ht(){return gt=_t<Xl?yt(Xr,_t++):0,Kr++,gt===10&&(Kr=1,Oa++),gt}function lr(){return yt(Xr,_t)}function Ma(){return _t}function Dn(e,t){return An(Xr,e,t)}function _n(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zl(e){return Oa=Kr=1,Xl=ir(Xr=e),_t=0,[]}function Ql(e){return Xr="",e}function Ia(e){return Kl(Dn(_t-1,gs(e===91?e+2:e===40?e+1:e)))}function gp(e){for(;(gt=lr())&&gt<33;)Ht();return _n(e)>2||_n(gt)>3?"":" "}function hp(e,t){for(;--t&&Ht()&&!(gt<48||gt>102||gt>57&&gt<65||gt>70&&gt<97););return Dn(e,Ma()+(t<6&&lr()==32&&Ht()==32))}function gs(e){for(;Ht();)switch(gt){case e:return _t;case 34:case 39:e!==34&&e!==39&&gs(gt);break;case 40:e===41&&gs(e);break;case 92:Ht();break}return _t}function pp(e,t){for(;Ht()&&e+gt!==57;)if(e+gt===84&&lr()===47)break;return"/*"+Dn(t,_t-1)+"*"+Ea(e===47?e:Ht())}function bp(e){for(;!_n(lr());)Ht();return Dn(e,_t)}function mp(e){return Ql(Aa("",null,null,null,[""],e=Zl(e),0,[0],e))}function Aa(e,t,n,a,r,o,s,i,l){for(var g=0,u=0,d=s,f=0,h=0,v=0,p=1,x=1,b=1,O=0,C="",E=r,N=o,S=a,k=C;x;)switch(v=O,O=Ht()){case 40:if(v!=108&&yt(k,d-1)==58){ds(k+=Xe(Ia(O),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Ia(O);break;case 9:case 10:case 13:case 32:k+=gp(v);break;case 92:k+=hp(Ma()-1,7);continue;case 47:switch(lr()){case 42:case 47:Na(vp(pp(Ht(),Ma()),t,n),l);break;default:k+="/"}break;case 123*p:i[g++]=ir(k)*b;case 125*p:case 59:case 0:switch(O){case 0:case 125:x=0;case 59+u:b==-1&&(k=Xe(k,/\f/g,"")),h>0&&ir(k)-d&&Na(h>32?Rl(k+";",a,n,d-1):Rl(Xe(k," ","")+";",a,n,d-2),l);break;case 59:k+=";";default:if(Na(S=Jl(k,t,n,g,u,r,i,C,E=[],N=[],d),o),O===123)if(u===0)Aa(k,t,S,S,E,o,d,i,N);else switch(f===99&&yt(k,3)===110?100:f){case 100:case 108:case 109:case 115:Aa(e,S,S,a&&Na(Jl(e,S,S,0,0,r,i,C,r,E=[],d),N),r,N,d,i,a?E:N);break;default:Aa(k,S,S,S,[""],N,0,i,N)}}g=u=h=0,p=b=1,C=k="",d=s;break;case 58:d=1+ir(k),h=v;default:if(p<1){if(O==123)--p;else if(O==125&&p++==0&&fp()==125)continue}switch(k+=Ea(O),O*p){case 38:b=u>0?1:(k+="\f",-1);break;case 44:i[g++]=(ir(k)-1)*b,b=1;break;case 64:lr()===45&&(k+=Ia(Ht())),f=lr(),u=d=ir(C=k+=bp(Ma())),O++;break;case 45:v===45&&ir(k)==2&&(p=0)}}return o}function Jl(e,t,n,a,r,o,s,i,l,g,u){for(var d=r-1,f=r===0?o:[""],h=fs(f),v=0,p=0,x=0;v<a;++v)for(var b=0,O=An(e,d+1,d=sp(p=s[v])),C=e;b<h;++b)(C=Kl(p>0?f[b]+" "+O:Xe(O,/&\f/g,f[b])))&&(l[x++]=C);retu Line truncated
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rc;function Tp(){if(rc)return Je;rc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function k(N){if(typeof N=="object"&&N!==null){var E=N.$$typeof;switch(E){case t:switch(N=N.type,N){case l:case f:case a:case o:case r:case d:return N;default:switch(N=N&&N.$$typeof,N){case i:case u:case b:case h:case s:return N;default:return E}}case n:return E}}}function C(N){return k(N)===f}return Je.AsyncMode=l,Je.ConcurrentMode=f,Je.ContextConsumer=i,Je.ContextProvider=s,Je.Element=t,Je.ForwardRef=u,Je.Fragment=a,Je.Lazy=b,Je.Memo=h,Je.Portal=n,Je.Profiler=o,Je.StrictMode=r,Je.Suspense=d,Je.isAsyncMode=function(N){return C(N)||k(N)===l},Je.isConcurrentMode=C,Je.isContextConsumer=function(N){return k(N)===i},Je.isContextProvider=function(N){return k(N)===s},Je.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},Je.isForwardRef=function(N){return k(N)===u},Je.isFragment=function(N){return k(N)===a},Je.isLazy=function(N){return k(N)===b},Je.isMemo=function(N){return k(N)===h},Je.isPortal=function(N){return k(N)===n},Je.isProfiler=function(N){return k(N)===o},Je.isStrictMode=function(N){return k(N)===r},Je.isSuspense=function(N){return k(N)===d},Je.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===f||N===o||N===r||N===d||N===g||typeof N=="object"&&N!==null&&(N.$$typeof===b||N.$$typeof===h||N.$$typeof===s||N.$$typeof===i||N.$$typeof===u||N.$$typeof===x||N.$$typeof===v||N.$$typeof===O||N.$$typeof===p)},Je.typeOf=k,Je}var nc;function Ap(){return nc||(nc=1,hs.exports=Tp()),hs.exports}var ps,ac;function Ip(){if(ac)return ps;ac=1;var e=Ap(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=a,o[e.Memo]=r;function s(b){return e.isMemo(b)?r:o[b.$$typeof]||t}var i=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,g=Object.prototype;function h(b,p,x){if(typeof p!="string"){if(g){var v=d(p);v&&v!==g&&h(b,v,x)}var O=l(p);f&&(O=O.concat(f(p)));for(var k=s(b),C=s(p),N=0;N<O.length;++N){var E=O[N];if(!n[E]&&!(x&&x[E])&&!(C&&C[E])&&!(k&&k[E])){var S=u(p,E);try{i(b,E,S)}catch{}}}}return b}return ps=h,ps}Ip();var Lp=!0;function Dp(e,t,n){var a="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(a+=r+" ")}),a}var oc=function(t,n,a){var r=t.key+"-"+n.name;(a===!1||Lp===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},_p=function(t,n,a){oc(t,n,a);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+r:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Pp(e){for(var t=0,n,a=0,r=e.length;r>=4;++a,r-=4)n=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var $p={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Fp=/[A-Z]|^ms/g,Up=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sc=function(t){return t.charCodeAt(1)===45},ic=functioLine truncated
*/var rc;function Ap(){if(rc)return Ze;rc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function C(N){if(typeof N=="object"&&N!==null){var S=N.$$typeof;switch(S){case t:switch(N=N.type,N){case l:case g:case a:case o:case r:case d:return N;default:switch(N=N&&N.$$typeof,N){case i:case u:case v:case h:case s:return N;default:return S}}case n:return S}}}function E(N){return C(N)===g}return Ze.AsyncMode=l,Ze.ConcurrentMode=g,Ze.ContextConsumer=i,Ze.ContextProvider=s,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=a,Ze.Lazy=v,Ze.Memo=h,Ze.Portal=n,Ze.Profiler=o,Ze.StrictMode=r,Ze.Suspense=d,Ze.isAsyncMode=function(N){return E(N)||C(N)===l},Ze.isConcurrentMode=E,Ze.isContextConsumer=function(N){return C(N)===i},Ze.isContextProvider=function(N){return C(N)===s},Ze.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},Ze.isForwardRef=function(N){return C(N)===u},Ze.isFragment=function(N){return C(N)===a},Ze.isLazy=function(N){return C(N)===v},Ze.isMemo=function(N){return C(N)===h},Ze.isPortal=function(N){return C(N)===n},Ze.isProfiler=function(N){return C(N)===o},Ze.isStrictMode=function(N){return C(N)===r},Ze.isSuspense=function(N){return C(N)===d},Ze.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===g||N===o||N===r||N===d||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===h||N.$$typeof===s||N.$$typeof===i||N.$$typeof===u||N.$$typeof===x||N.$$typeof===b||N.$$typeof===O||N.$$typeof===p)},Ze.typeOf=C,Ze}var nc;function Lp(){return nc||(nc=1,hs.exports=Ap()),hs.exports}var ps,ac;function Dp(){if(ac)return ps;ac=1;var e=Lp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=a,o[e.Memo]=r;function s(v){return e.isMemo(v)?r:o[v.$$typeof]||t}var i=Object.defineProperty,l=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(v,p,x){if(typeof p!="string"){if(f){var b=d(p);b&&b!==f&&h(v,b,x)}var O=l(p);g&&(O=O.concat(g(p)));for(var C=s(v),E=s(p),N=0;N<O.length;++N){var S=O[N];if(!n[S]&&!(x&&x[S])&&!(E&&E[S])&&!(C&&C[S])){var k=u(p,S);try{i(v,S,k)}catch{}}}}return v}return ps=h,ps}Dp();var _p=!0;function Pp(e,t,n){var a="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(a+=r+" ")}),a}var oc=function(t,n,a){var r=t.key+"-"+n.name;(a===!1||_p===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},$p=function(t,n,a){oc(t,n,a);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+r:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Fp(e){for(var t=0,n,a=0,r=e.length;r>=4;++a,r-=4)n=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Up={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vp=/[A-Z]|^ms/g,Hp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sc=function(t){return t.charCodeAt(1)===45},ic=functioLine truncated
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),nm=function(t,n){var a=t.isFocused,r=t.size,o=t.theme,s=o.colors,i=o.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:a?s.neutral60:s.neutral20,padding:i*2})},Ns=function(t){var n=t.delay,a=t.offset;return Se("span",{css:ys({animation:"".concat(rm," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},am=function(t){var n=t.innerProps,a=t.isRtl,r=t.size,o=r===void 0?4:r,s=or(t,Kb);return Se("div",Me({},ct(Ee(Ee({},s),{},{innerProps:n,isRtl:a,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Se(Ns,{delay:0,offset:a}),Se(Ns,{delay:160,offset:!0}),Se(Ns,{delay:320,offset:!a}))},om=function(t,n){var a=t.isDisabled,r=t.isFocused,o=t.theme,s=o.colors,i=o.borderRadius,l=o.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:a?s.neutral5:s.neutral0,borderColor:a?s.neutral10:r?s.primary:s.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:r?s.primary:s.neutral30}})},sm=function(t){var n=t.children,a=t.isDisabled,r=t.isFocused,o=t.innerRef,s=t.innerProps,i=t.menuIsOpen;return Se("div",Me({ref:o},ct(t,"control",{control:!0,"control--is-disabled":a,"control--is-focused":r,"control--menu-is-open":i}),s,{"aria-disabled":a||void 0}),n)},im=sm,lm=["data"],cm=function(t,n){var a=t.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},um=function(t){var n=t.children,a=t.cx,r=t.getStyles,o=t.getClassNames,s=t.Heading,i=t.headingProps,l=t.innerProps,f=t.label,u=t.theme,d=t.selectProps;return Se("div",Me({},ct(t,"group",{group:!0}),l),Se(s,Me({},i,{selectProps:d,theme:u,getStyles:r,getClassNames:o,cx:a}),f),Se("div",null,n))},dm=function(t,n){var a=t.theme,r=a.colors,o=a.spacing;return Ee({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},fm=function(t){var n=wc(t);n.data;var a=or(n,lm);return Se("div",Me({},ct(t,"groupHeading",{"group-heading":!0}),a))},gm=um,hm=["innerRef","isDisabled","isHidden","inputClassName"],pm=function(t,n){var a=t.isDisabled,r=t.value,o=t.theme,s=o.spacing,i=o.colors;return Ee(Ee({visibility:a?"hidden":"visible",transform:r?"translateZ(0)":""},bm),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:i.neutral80})},Dc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},bm={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Dc)},mm=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Dc)},vm=function(t){var n=t.cx,a=t.value,r=wc(t),o=r.innerRef,s=r.isDisabled,i=r.isHidden,l=r.inputClassName,f=or(r,hm);return Se("div",Me({},ct(t,"input",{"input-container":!0}),{"data-value":a||""}),Se("input",Me({className:n({input:!0},l),ref:o,style:mm(i),disabled:s},f)))},ym=vm,xm=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},wm=function(t,n){var a=t.theme,r=a.borderRadius,o=a.colors,s=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},km=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors,i=t.isFocused;return Ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:i?s.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},_c=function(t){var n=t.children,a=t.innerProps;return Se("div",a,n)},Cm=_c,Sm=_c;function Em(e){var t=e.children,n=e.innerProps;return Se("div",Me({role:"button"},n),t||Se(Es,{size:14}))}var Nm=function(t){var n=t.children,a=t.components,r=t.data,o=t.innerProps,s=t.isDisabled,i=t.removeProps,l=t.selectProps,f=a.Container,u=a.Label,d=a.Remove;return Se(f,{data:r,innerProps:Ee(Ee({},ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Se(u,{data:r,innerProps:Ee({},ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Se(d,{data:r,innerProps:Ee(Ee({},ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),s Line truncated
`]))),om=function(t,n){var a=t.isFocused,r=t.size,o=t.theme,s=o.colors,i=o.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:a?s.neutral60:s.neutral20,padding:i*2})},Ns=function(t){var n=t.delay,a=t.offset;return Se("span",{css:ys({animation:"".concat(am," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},sm=function(t){var n=t.innerProps,a=t.isRtl,r=t.size,o=r===void 0?4:r,s=sr(t,Zb);return Se("div",Me({},ct(Ee(Ee({},s),{},{innerProps:n,isRtl:a,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Se(Ns,{delay:0,offset:a}),Se(Ns,{delay:160,offset:!0}),Se(Ns,{delay:320,offset:!a}))},im=function(t,n){var a=t.isDisabled,r=t.isFocused,o=t.theme,s=o.colors,i=o.borderRadius,l=o.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:a?s.neutral5:s.neutral0,borderColor:a?s.neutral10:r?s.primary:s.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:r?s.primary:s.neutral30}})},lm=function(t){var n=t.children,a=t.isDisabled,r=t.isFocused,o=t.innerRef,s=t.innerProps,i=t.menuIsOpen;return Se("div",Me({ref:o},ct(t,"control",{control:!0,"control--is-disabled":a,"control--is-focused":r,"control--menu-is-open":i}),s,{"aria-disabled":a||void 0}),n)},cm=lm,um=["data"],dm=function(t,n){var a=t.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},fm=function(t){var n=t.children,a=t.cx,r=t.getStyles,o=t.getClassNames,s=t.Heading,i=t.headingProps,l=t.innerProps,g=t.label,u=t.theme,d=t.selectProps;return Se("div",Me({},ct(t,"group",{group:!0}),l),Se(s,Me({},i,{selectProps:d,theme:u,getStyles:r,getClassNames:o,cx:a}),g),Se("div",null,n))},gm=function(t,n){var a=t.theme,r=a.colors,o=a.spacing;return Ee({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},hm=function(t){var n=wc(t);n.data;var a=sr(n,um);return Se("div",Me({},ct(t,"groupHeading",{"group-heading":!0}),a))},pm=fm,bm=["innerRef","isDisabled","isHidden","inputClassName"],mm=function(t,n){var a=t.isDisabled,r=t.value,o=t.theme,s=o.spacing,i=o.colors;return Ee(Ee({visibility:a?"hidden":"visible",transform:r?"translateZ(0)":""},vm),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:i.neutral80})},Dc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},vm={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Dc)},ym=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Dc)},xm=function(t){var n=t.cx,a=t.value,r=wc(t),o=r.innerRef,s=r.isDisabled,i=r.isHidden,l=r.inputClassName,g=sr(r,bm);return Se("div",Me({},ct(t,"input",{"input-container":!0}),{"data-value":a||""}),Se("input",Me({className:n({input:!0},l),ref:o,style:ym(i),disabled:s},g)))},wm=xm,km=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},Cm=function(t,n){var a=t.theme,r=a.borderRadius,o=a.colors,s=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Sm=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors,i=t.isFocused;return Ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:i?s.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},_c=function(t){var n=t.children,a=t.innerProps;return Se("div",a,n)},Em=_c,Nm=_c;function Om(e){var t=e.children,n=e.innerProps;return Se("div",Me({role:"button"},n),t||Se(Es,{size:14}))}var Tm=function(t){var n=t.children,a=t.components,r=t.data,o=t.innerProps,s=t.isDisabled,i=t.removeProps,l=t.selectProps,g=a.Container,u=a.Label,d=a.Remove;return Se(g,{data:r,innerProps:Ee(Ee({},ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Se(u,{data:r,innerProps:Ee({},ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Se(d,{data:r,innerProps:Ee(Ee({},ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),s Line truncated
px-4 py-2.5 bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
text-gray-700 dark:text-gray-200 font-medium
@@ -231,27 +229,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
min-w-[200px]
`,"aria-haspopup":"listbox","aria-expanded":g,children:[c.jsxs(D,{className:"flex items-center gap-2",children:[f,c.jsx(Z,{className:"truncate",children:N})]}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${g?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),g&&c.jsxs(D,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[c.jsx(D,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx("input",{id:O,type:"text",value:b,onChange:S,placeholder:r,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),c.jsxs(D,{className:"max-h-80 overflow-auto",children:[I&&c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),L&&c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:s}),F&&c.jsx(D,{className:"py-2",children:C.map(T=>{const P=w(T.value);return c.jsxs(oe,{type:"button",onClick:()=>!T.disabled&&y(T.value),disabled:T.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":f,children:[c.jsxs(_,{className:"flex items-center gap-2",children:[g,c.jsx(Z,{className:"truncate",children:N})]}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&c.jsxs(_,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[c.jsx(_,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx("input",{id:O,type:"text",value:v,onChange:k,placeholder:r,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),c.jsxs(_,{className:"max-h-80 overflow-auto",children:[A&&c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),D&&c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:s}),$&&c.jsx(_,{className:"py-2",children:E.map(M=>{const L=w(M.value);return c.jsxs(re,{type:"button",onClick:()=>!M.disabled&&y(M.value),disabled:M.disabled,className:`
w-full px-4 py-3 text-left
flex items-start gap-3
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${T.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":P,children:[c.jsx(D,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:P&&c.jsx(gr,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),c.jsxs(D,{className:"flex-1 min-w-0",children:[c.jsx(D,{className:`font-medium ${P?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:T.label}),T.description&&c.jsx(D,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:T.description})]})]},T.value)})})]})]})]})},Fn={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},_v=({options:e=[],value:t=[],onChange:n,placeholder:a="No items selected",disabled:r=!1,className:o=""})=>{const s=m.useCallback(u=>e.find(g=>String(g.value)===String(u))?.label||String(u),[e]),i=m.useCallback(u=>{if(r)return;const d=t.filter(g=>String(g)!==String(u));n?.(d)},[t,n,r]),l=m.useMemo(()=>t.map(u=>({value:u,label:s(u)})),[t,s]),f=`${Fn.container.base} ${r?Fn.container.disabled:""} ${o}`.trim();return c.jsx(D,{className:f,children:l.length===0?c.jsx(Z,{className:Fn.placeholder,children:a}):l.map(u=>c.jsxs(Z,{className:Fn.tag,children:[u.label,!r&&c.jsx(Z,{className:Fn.tagRemove,onClick:()=>i(u.value),role:"button","aria-label":`Remove ${u.label}`,children:c.jsx(gr,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},u.value))})};function Pv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>a=>{t.forEach(r=>r(a))},t)}const Ya=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Fs(e){return"nodeType"in e}function Mt(e){var t,n;return e?Qr(e)?e:Fs(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Us(e){const{Document:t}=Mt(e);return e instanceof t}function Un(e){return Qr(e)?!1:e instanceof Mt(e).HTMLElement}function gu(e){return e instanceof Mt(e).SVGElement}function Jr(e){return e?Qr(e)?e.document:Fs(e)?Us(e)?e:Un(e)||gu(e)?e.ownerDocument:document:document:document}const Qt=Ya?m.useLayoutEffect:m.useEffect;function qa(e){const t=m.useRef(e);return Qt(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return t.current==null?void 0:t.current(...a)},[])}function $v(){const e=m.useRef(null),t=m.useCallback((a,r)=>{e.current=setInterval(a,r)},[]),n=m.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Vn(e,t){t===void 0&&(t=[e]);const n=m.useRef(e);return Qt(()=>{n.current!==e&&(n.current=e)},t),n}function Hn(e,t){const n=m.useRef();return m.useMemo(()=>{const a=e(n.current);return n.current=a,a},[...t])}function Ka(e){const t=qa(e),n=m.useRef(null),a=m.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,a]}function Xa(e){const t=m.useRef();return m.useEffect(()=>{t.current=e},[e]),t.current}let Vs={};function jn(e,t){return m.useMemo(()=>{if(t)return t;const n=Vs[e]==null?0:Vs[e]+1;return Vs[e]=n,e+"-"+n},[e,t])}function hu(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return a.reduce((o,s)=>{const i=Object.entries(s);for(const[l,f]of i){const u=o[l];u!=null&&(o[l]=u+e*f)}return o},{...t})}}const Rr=hu(1),zn=hu(-1);function Fv(e){return"clientX"in e&&"clientY"in e}function Za(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function Uv(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function Qa(e){if(Uv(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Fv(e)?{x:e.clientX,y:e.clientY}:null}const cr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[cr.Translate.toString(e),cr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:a}=e;return t+" "+n+"ms "+a}}}),pu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Vv(e){return e.matches(pu)?e:e.querySelector(pu)}const Hv={display:"none"};function jv(e){let{id:t,value:n}=e;return m.createElement("div",{id:t,style:Hv},n)}function zv(e){le Line truncated
${M.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":L,children:[c.jsx(_,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:L&&c.jsx(gr,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),c.jsxs(_,{className:"flex-1 min-w-0",children:[c.jsx(_,{className:`font-medium ${L?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:M.label}),M.description&&c.jsx(_,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:M.description})]})]},M.value)})})]})]})]})},Un={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},$v=({options:e=[],value:t=[],onChange:n,placeholder:a="No items selected",disabled:r=!1,className:o=""})=>{const s=m.useCallback(u=>e.find(f=>String(f.value)===String(u))?.label||String(u),[e]),i=m.useCallback(u=>{if(r)return;const d=t.filter(f=>String(f)!==String(u));n?.(d)},[t,n,r]),l=m.useMemo(()=>t.map(u=>({value:u,label:s(u)})),[t,s]),g=`${Un.container.base} ${r?Un.container.disabled:""} ${o}`.trim();return c.jsx(_,{className:g,children:l.length===0?c.jsx(Z,{className:Un.placeholder,children:a}):l.map(u=>c.jsxs(Z,{className:Un.tag,children:[u.label,!r&&c.jsx(Z,{className:Un.tagRemove,onClick:()=>i(u.value),role:"button","aria-label":`Remove ${u.label}`,children:c.jsx(gr,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},u.value))})};function Fv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>a=>{t.forEach(r=>r(a))},t)}const Ya=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Fs(e){return"nodeType"in e}function Mt(e){var t,n;return e?Rr(e)?e:Fs(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Us(e){const{Document:t}=Mt(e);return e instanceof t}function Vn(e){return Rr(e)?!1:e instanceof Mt(e).HTMLElement}function gu(e){return e instanceof Mt(e).SVGElement}function en(e){return e?Rr(e)?e.document:Fs(e)?Us(e)?e:Vn(e)||gu(e)?e.ownerDocument:document:document:document}const Qt=Ya?m.useLayoutEffect:m.useEffect;function qa(e){const t=m.useRef(e);return Qt(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return t.current==null?void 0:t.current(...a)},[])}function Uv(){const e=m.useRef(null),t=m.useCallback((a,r)=>{e.current=setInterval(a,r)},[]),n=m.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Hn(e,t){t===void 0&&(t=[e]);const n=m.useRef(e);return Qt(()=>{n.current!==e&&(n.current=e)},t),n}function jn(e,t){const n=m.useRef();return m.useMemo(()=>{const a=e(n.current);return n.current=a,a},[...t])}function Ka(e){const t=qa(e),n=m.useRef(null),a=m.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,a]}function Xa(e){const t=m.useRef();return m.useEffect(()=>{t.current=e},[e]),t.current}let Vs={};function zn(e,t){return m.useMemo(()=>{if(t)return t;const n=Vs[e]==null?0:Vs[e]+1;return Vs[e]=n,e+"-"+n},[e,t])}function hu(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return a.reduce((o,s)=>{const i=Object.entries(s);for(const[l,g]of i){const u=o[l];u!=null&&(o[l]=u+e*g)}return o},{...t})}}const tn=hu(1),Gn=hu(-1);function Vv(e){return"clientX"in e&&"clientY"in e}function Za(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function Hv(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function Qa(e){if(Hv(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Vv(e)?{x:e.clientX,y:e.clientY}:null}const ur=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ur.Translate.toString(e),ur.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:a}=e;return t+" "+n+"ms "+a}}}),pu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jv(e){return e.matches(pu)?e:e.querySelector(pu)}const zv={display:"none"};function Gv(e){let{id:t,value:n}=e;return m.createElement("div",{id:t,style:zv},n)}function Bv(e){le Line truncated
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},qv={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kv(e){let{announcements:t=qv,container:n,hiddenTextDescribedById:a,screenReaderInstructions:r=Yv}=e;const{announce:o,announcement:s}=Gv(),i=jn("DndLiveRegion"),[l,f]=m.useState(!1);if(m.useEffect(()=>{f(!0)},[]),Bv(m.useMemo(()=>({onDragStart(d){let{active:g}=d;o(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&o(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;o(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;o(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;o(t.onDragCancel({active:g,over:h}))}}),[o,t])),!l)return null;const u=m.createElement(m.Fragment,null,m.createElement(jv,{id:a,value:r.draggable}),m.createElement(zv,{id:i,announcement:s}));return n?fr.createPortal(u,n):u}var ft;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ft||(ft={}));function Ja(){}function en(e,t){return m.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Hs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Jt=Object.freeze({x:0,y:0});function mu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Xv(e,t){const n=Qa(e);if(!n)return"0 0";const a={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return a.x+"% "+a.y+"%"}function vu(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return n-a}function Zv(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return a-n}function yu(e){let{left:t,top:n,height:a,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+a},{x:t+r,y:n+a}]}function xu(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function wu(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const js=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=wu(t,t.left,t.top),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const f=mu(wu(l),r);o.push({id:i,data:{droppableContainer:s,value:f}})}}return o.sort(vu)},Qv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=yu(t),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const f=yu(l),u=r.reduce((g,h,b)=>g+mu(f[b],h),0),d=Number((u/4).toFixed(4));o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(vu)};function Jv(e,t){const n=Math.max(t.top,e.top),a=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=r-a,i=o-n;if(a<r&&n<o){const l=t.width*t.height,f=e.width*e.height,u=s*i,d=u/(l+f-u);return Number(d.toFixed(4))}return 0}const Rv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=[];for(const o of a){const{id:s}=o,i=n.get(s);if(i){const l=Jv(i,t);l>0&&r.push({id:s,data:{droppableContainer:o,value:l}})}}return r.sort(Zv)};function ey(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ku(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jt}function ty(e){return function(n){for(var a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>({...s,top:s.top+e*i.y,bottom:s.bottom+e*i.y,left:s.left+e*i.x,right:s.right+e*i.x}),{...n})}}const ry=ty(1);function Cu(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ny(e,t,n){const a=Cu(t);if(!a)return e;const{scaleX:r,scaleY:o,x:s,y:i}=a,l=e.left-s-(1-r)*parseFloat(n),f=e.top-i-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:f,right:l+u,bottom:f+d,left:l}}const ay={ignoreTransform:!1};function tn(e,t){t===void 0&&(t=ay);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:f,transformOrigin:u}=Mt(e).getComputedStyle(e);f&&(n=ny(n,f,u))}const{top:a,left:r,width:o,height:s,bottom:i,right:l}=n;return{top:a,left:r,width:o,height:s,bottom:i,right:l}}function Su(e){return tn(e,{ignoreTransform:!0})}function oy(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function sy(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.posit Line truncated
`},Xv={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zv(e){let{announcements:t=Xv,container:n,hiddenTextDescribedById:a,screenReaderInstructions:r=Kv}=e;const{announce:o,announcement:s}=Wv(),i=zn("DndLiveRegion"),[l,g]=m.useState(!1);if(m.useEffect(()=>{g(!0)},[]),Yv(m.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const u=m.createElement(m.Fragment,null,m.createElement(Gv,{id:a,value:r.draggable}),m.createElement(Bv,{id:i,announcement:s}));return n?ar.createPortal(u,n):u}var ht;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ht||(ht={}));function Ja(){}function rn(e,t){return m.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Hs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Jt=Object.freeze({x:0,y:0});function mu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Qv(e,t){const n=Qa(e);if(!n)return"0 0";const a={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return a.x+"% "+a.y+"%"}function vu(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return n-a}function Jv(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return a-n}function yu(e){let{left:t,top:n,height:a,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+a},{x:t+r,y:n+a}]}function xu(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function wu(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const js=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=wu(t,t.left,t.top),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=mu(wu(l),r);o.push({id:i,data:{droppableContainer:s,value:g}})}}return o.sort(vu)},Rv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=yu(t),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=yu(l),u=r.reduce((f,h,v)=>f+mu(g[v],h),0),d=Number((u/4).toFixed(4));o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(vu)};function ey(e,t){const n=Math.max(t.top,e.top),a=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=r-a,i=o-n;if(a<r&&n<o){const l=t.width*t.height,g=e.width*e.height,u=s*i,d=u/(l+g-u);return Number(d.toFixed(4))}return 0}const ty=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=[];for(const o of a){const{id:s}=o,i=n.get(s);if(i){const l=ey(i,t);l>0&&r.push({id:s,data:{droppableContainer:o,value:l}})}}return r.sort(Jv)};function ry(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ku(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jt}function ny(e){return function(n){for(var a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>({...s,top:s.top+e*i.y,bottom:s.bottom+e*i.y,left:s.left+e*i.x,right:s.right+e*i.x}),{...n})}}const ay=ny(1);function Cu(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oy(e,t,n){const a=Cu(t);if(!a)return e;const{scaleX:r,scaleY:o,x:s,y:i}=a,l=e.left-s-(1-r)*parseFloat(n),g=e.top-i-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:g,right:l+u,bottom:g+d,left:l}}const sy={ignoreTransform:!1};function nn(e,t){t===void 0&&(t=sy);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:u}=Mt(e).getComputedStyle(e);g&&(n=oy(n,g,u))}const{top:a,left:r,width:o,height:s,bottom:i,right:l}=n;return{top:a,left:r,width:o,height:s,bottom:i,right:l}}function Su(e){return nn(e,{ignoreTransform:!0})}function iy(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ly(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.posit Line truncated
w-full flex items-center justify-between px-3 py-2
bg-white dark:bg-gray-800
border border-gray-300 dark:border-gray-600 rounded-lg
text-left text-sm
${i?"opacity-50 cursor-not-allowed":"hover:border-gray-400 dark:hover:border-gray-500"}
focus:outline-none focus:ring-2 focus:ring-blue-500
`,children:[c.jsx(D,{className:"flex items-center gap-2",children:b?c.jsxs(c.Fragment,{children:[c.jsx(ne,{name:b.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:b.label})]}):c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:a})}),c.jsx(ne,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${f?"rotate-180":""}`})]}),l&&c.jsx("input",{type:"hidden",name:l,value:e||""}),f&&c.jsxs(D,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[c.jsx(D,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:c.jsx(gt,{type:"text",value:d,onChange:v=>g(v.target.value),placeholder:r,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),c.jsx(D,{className:"max-h-56 overflow-y-auto",children:p.length>0?p.map(v=>c.jsxs(oe,{type:"button",onClick:()=>x(v),className:`
`,children:[c.jsx(_,{className:"flex items-center gap-2",children:v?c.jsxs(c.Fragment,{children:[c.jsx(ne,{name:v.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:v.label})]}):c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:a})}),c.jsx(ne,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${g?"rotate-180":""}`})]}),l&&c.jsx("input",{type:"hidden",name:l,value:e||""}),g&&c.jsxs(_,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[c.jsx(_,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:c.jsx(ft,{type:"text",value:d,onChange:b=>f(b.target.value),placeholder:r,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),c.jsx(_,{className:"max-h-56 overflow-y-auto",children:p.length>0?p.map(b=>c.jsxs(re,{type:"button",onClick:()=>x(b),className:`
w-full flex items-center gap-3 px-3 py-2 text-left text-sm
${b?.faIcon===v.faIcon?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}
`,children:[c.jsx(ne,{name:v.faIcon,className:"w-4 h-4"}),c.jsx(Z,{children:v.label}),b?.faIcon===v.faIcon&&c.jsx(ne,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},v.value)):c.jsx(D,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ei=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:a="",style:r,children:o,disabled:s=!1})=>{const[i,l]=m.useState(e),f=t!==void 0,u=f?t:i,d=m.useRef(null),[g,h]=m.useState(e?void 0:0),b=()=>{if(s)return;const x=!u;f||l(x),n?.(x)};m.useEffect(()=>{if(d.current)if(u){h(d.current.scrollHeight);const x=setTimeout(()=>{h(void 0)},300);return()=>clearTimeout(x)}else h(d.current.scrollHeight),requestAnimationFrame(()=>{h(0)})},[u]);const p={};if(m.Children.forEach(o,x=>{if(m.isValidElement(x)){const v=x.props?.slot;v==="trigger"?p.trigger=x:v==="content"&&(p.content=x)}}),!p.trigger&&!p.content){const x=m.Children.toArray(o);x.length>=2?(p.trigger=x[0],p.content=x.slice(1)):x.length===1&&(p.content=x[0])}return c.jsxs(D,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${a}`,style:r,children:[c.jsxs(oe,{type:"button",onClick:b,disabled:s,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${s?"opacity-50 cursor-not-allowed":""} ${u?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":u,children:[c.jsx(D,{className:"flex-1",children:p.trigger}),!p.trigger&&c.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx(D,{ref:d,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:g!==void 0?`${g}px`:"auto"},children:c.jsx(D,{className:"bg-white dark:bg-gray-800",children:p.content})})]})},Qn=window.G7Core,ld=Qn?.useControllableState,Ex=(e,t)=>window.G7Core?.t?.(e,t)??e,Nx={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Ox=({options:e,value:t,onChange:n,disabled:a=!1})=>{const[r,o]=m.useState(!1),[s,i]=m.useState({}),l=m.useRef(null),f=e.find(d=>d.value===t)??e[0];m.useEffect(()=>{if(!r)return;const d=h=>{l.current&&!l.current.contains(h.target)&&o(!1)},g=()=>{if(!l.current)return;const h=l.current.getBoundingClientRect();i({position:"fixed",top:h.bottom+4,right:window.innerWidth-h.right,zIndex:9999})};return document.addEventListener("mousedown",d),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{document.removeEventListener("mousedown",d),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[r]);const u=m.useCallback(()=>{if(a||!l.current)return;const d=l.current.getBoundingClientRect();i({position:"fixed",top:d.bottom+4,right:window.innerWidth-d.right,zIndex:9999}),o(g=>!g)},[a]);return c.jsxs(D,{ref:l,className:"relative flex-shrink-0",children:[c.jsxs(D,{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),d.preventDefault(),u()},onMouseDown:d=>d.stopPropagation(),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),d.preventDefault(),u()),d.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${a?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[c.jsx(Z,{children:f?.label??""}),c.jsx(ne,{name:de.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),r&&c.jsx(D,{style:s,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(d=>{const g=d.value??"",h=Nx[g],b=h?Ex(h):"",p=d.value===t;return c.jsxs(D,{role:"option","aria-selected":p,onClick:x=>{x.stopPropagation(),x.preventDefault(),n(d.value),o(!1)},onMouseDown:x=>x.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[c.jsxs(D,{className:"flex items-center justify-between",children:[c.jsx(Z,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:d.label}),p&&c.jsx(ne,{name:de.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),b&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:b})]},g||"__null__")})})]})},Mx=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r.id-o.id),a=[...t].sort((r,o)=>r.id-o.id);return n.every((r,o)=>r.id===a[o].id&&r.scope_type===a[o].scope_type)},Tx=({data:e=[],value:t=[],onChange:n,scopeOptions:a=[],className:r="",disabled:o=!1,desktopColumns:s=2,installedModules:i=[],installedPl Line truncated
${v?.faIcon===b.faIcon?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}
`,children:[c.jsx(ne,{name:b.faIcon,className:"w-4 h-4"}),c.jsx(Z,{children:b.label}),v?.faIcon===b.faIcon&&c.jsx(ne,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},b.value)):c.jsx(_,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ei=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:a="",style:r,children:o,disabled:s=!1})=>{const[i,l]=m.useState(e),g=t!==void 0,u=g?t:i,d=m.useRef(null),[f,h]=m.useState(e?void 0:0),v=()=>{if(s)return;const x=!u;g||l(x),n?.(x)};m.useEffect(()=>{if(d.current)if(u){h(d.current.scrollHeight);const x=setTimeout(()=>{h(void 0)},300);return()=>clearTimeout(x)}else h(d.current.scrollHeight),requestAnimationFrame(()=>{h(0)})},[u]);const p={};if(m.Children.forEach(o,x=>{if(m.isValidElement(x)){const b=x.props?.slot;b==="trigger"?p.trigger=x:b==="content"&&(p.content=x)}}),!p.trigger&&!p.content){const x=m.Children.toArray(o);x.length>=2?(p.trigger=x[0],p.content=x.slice(1)):x.length===1&&(p.content=x[0])}return c.jsxs(_,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${a}`,style:r,children:[c.jsxs(re,{type:"button",onClick:v,disabled:s,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${s?"opacity-50 cursor-not-allowed":""} ${u?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":u,children:[c.jsx(_,{className:"flex-1",children:p.trigger}),!p.trigger&&c.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx(_,{ref:d,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:f!==void 0?`${f}px`:"auto"},children:c.jsx(_,{className:"bg-white dark:bg-gray-800",children:p.content})})]})},Jn=window.G7Core,ld=Jn?.useControllableState,Ox=(e,t)=>window.G7Core?.t?.(e,t)??e,Tx={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Mx=({options:e,value:t,onChange:n,disabled:a=!1})=>{const[r,o]=m.useState(!1),[s,i]=m.useState({}),l=m.useRef(null),g=e.find(d=>d.value===t)??e[0];m.useEffect(()=>{if(!r)return;const d=h=>{l.current&&!l.current.contains(h.target)&&o(!1)},f=()=>{if(!l.current)return;const h=l.current.getBoundingClientRect();i({position:"fixed",top:h.bottom+4,right:window.innerWidth-h.right,zIndex:9999})};return document.addEventListener("mousedown",d),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",d),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[r]);const u=m.useCallback(()=>{if(a||!l.current)return;const d=l.current.getBoundingClientRect();i({position:"fixed",top:d.bottom+4,right:window.innerWidth-d.right,zIndex:9999}),o(f=>!f)},[a]);return c.jsxs(_,{ref:l,className:"relative flex-shrink-0",children:[c.jsxs(_,{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),d.preventDefault(),u()},onMouseDown:d=>d.stopPropagation(),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),d.preventDefault(),u()),d.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${a?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[c.jsx(Z,{children:g?.label??""}),c.jsx(ne,{name:ue.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),r&&c.jsx(_,{style:s,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(d=>{const f=d.value??"",h=Tx[f],v=h?Ox(h):"",p=d.value===t;return c.jsxs(_,{role:"option","aria-selected":p,onClick:x=>{x.stopPropagation(),x.preventDefault(),n(d.value),o(!1)},onMouseDown:x=>x.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[c.jsxs(_,{className:"flex items-center justify-between",children:[c.jsx(Z,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:d.label}),p&&c.jsx(ne,{name:ue.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),v&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:v})]},f||"__null__")})})]})},Ix=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r.id-o.id),a=[...t].sort((r,o)=>r.id-o.id);return n.every((r,o)=>r.id===a[o].id&&r.scope_type===a[o].scope_type)},Ax=({data:e=[],value:t=[],onChange:n,scopeOptions:a=[],className:r="",disabled:o=!1,desktopColumns:s=2,installedModules:i=[],installedPl Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -270,12 +268,12 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let Ii;function Y1(e,t){return new Promise(((n,a)=>{Ii||(Ii=(function(s){const i=[];return i.push(s),URL.createObjectURL(new Blob(i))})(W1));const r=new Worker(Ii);r.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)r.terminate();else if(s.data.progress===void 0){if(s.data.error)return a(new Error(s.data.error)),void r.terminate();n(s.data.file),r.terminate()}else t.onProgress(s.data.progress)})),r.addEventListener("error",a),t.signal&&t.signal.addEventListener("abort",(()=>{a(t.signal.reason),r.terminate()})),r.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Et(e,t){return new Promise((function(n,a){let r,o,s,i,l,f;if(r={...t},s=0,{onProgress:i}=r,r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof r.useWebWorker!="boolean"||r.useWebWorker,delete r.useWebWorker,r.onProgress=h=>{s=h,typeof i=="function"&&i(s)},!(e instanceof Blob||e instanceof B1))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(f=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||f)return Lf(e,r).then(function(h){try{return o=h,g.call(this)}catch(b){return a(b)}}.bind(this),a);var u=function(){try{return g.call(this)}catch(h){return a(h)}}.bind(this),d=function(h){try{return Lf(e,r).then((function(b){try{return o=b,u()}catch(p){return a(p)}}),a)}catch(b){return a(b)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Y1(e,r).then((function(h){try{return o=h,u()}catch{return d()}}),d)}catch{d()}function g(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{r.preserveExif&&e.type==="image/jpeg"&&(!r.fileType||r.fileType&&r.fileType===e.type)&&(o=wf(e,o))}catch{}return n(o)}}))}Et.getDataUrlFromFile=Ef,Et.getFilefromDataUrl=Ai,Et.loadImage=Nf,Et.drawImageInCanvas=Mf,Et.drawFileInCanvas=Co,Et.canvasToFile=So,Et.getExifOrientation=Tf,Et.handleMaxWidthOrHeight=Af,Et.followExifOrientation=If,Et.cleanupCanvasMemory=ur,Et.isAutoOrientationInBrowser=fn,Et.approximateBelowMaximumCanvasSizeOfBrowser=Of,Et.copyExifWithoutOrientation=wf,Et.getBrowserName=$r,Et.version="2.0.2";const q1=window.G7Core,Li=e=>{const t=["B","KB","MB","GB"];let n=0,a=e;for(;a>=1024&&n<t.length-1;)a/=1024,n++;return`${a.toFixed(2)} ${t[n]}`},K1=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},X1=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",wt=(e,t)=>q1?.t?.(e,t)??e,Df=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},Fr=window.G7Core;function Z1(e){const{attachmentableType:t,attachmentableId:n,collection:a,maxFiles:r,maxSize:o,maxConcurrentUploads:s,accept:i,imageCompression:l,roleIds:f,autoUpload:u,initialFiles:d,endpoints:g,onFilesChange:h,onUploadComplete:b,onUploadError:p,onRemove:x,onReorder:v,uploadTriggerEvent:O,confirmBeforeRemove:k,uploadParams:C}=e,[N,E]=m.useState(d),[S,y]=m.useState([]),[w,I]=m.useState(!1),L=m.useRef(null),F=m.useRef(0),T=m.useRef(new Set),P=m.useRef(new Map),[V,M]=m.useState(!1),[A,j]=m.useState(null),[U,Y]=m.useState(!1),G=m.useRef(!1),[H,B]=m.useState([]),[z,$]=m.useState(!1),[q,J]=m.useState(0),R=m.useRef(0),[ee,X]=m.useState(new Map),re=m.useRef(h);re.current=h,m.useEffect(()=>{re.current?.(S)},[S]),m.useEffect(()=>{if(G.current)return;const ae=d.filter(ge=>!T.current.has(ge.id)&&(!ge.hash||!T.current.has(ge.hash))),ue=new Set(ae.map(ge=>ge.id)),fe=Array.from(P.current.values()).filter(ge=>!ue.has(ge.id)&&!T.current.has(ge.id));E([...ae,...fe])},[d]);const le=m.useCallback(async ae=>{const ue={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Et(ae,ue)},[l]),ve=m.useCallback(async ae=>{const ue=N.length+S.length,fe=r-ue,ge=Array.from(ae).slice(0,fe);for(const Ce of ge){if(Ce.size>o*1024*1024){p?.(`[${Ce.name}] 파일 크기(${Li(Ce.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,Ce);continue}if(i){const be="."+Ce.name.split(".").pop()?.toLowerCase();if(!i.split(",").map(Te=>Te.trim().toLowerCase()).includes(be)){p?.(`[${Ce.name}] 허용되지 않는 파일 형식입니다. (허용: ${i})`,Ce);continue}}const Ie={id:`pending-${Date.now()}Line truncated
`;let Ai;function K1(e,t){return new Promise(((n,a)=>{Ai||(Ai=(function(s){const i=[];return i.push(s),URL.createObjectURL(new Blob(i))})(q1));const r=new Worker(Ai);r.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)r.terminate();else if(s.data.progress===void 0){if(s.data.error)return a(new Error(s.data.error)),void r.terminate();n(s.data.file),r.terminate()}else t.onProgress(s.data.progress)})),r.addEventListener("error",a),t.signal&&t.signal.addEventListener("abort",(()=>{a(t.signal.reason),r.terminate()})),r.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Nt(e,t){return new Promise((function(n,a){let r,o,s,i,l,g;if(r={...t},s=0,{onProgress:i}=r,r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof r.useWebWorker!="boolean"||r.useWebWorker,delete r.useWebWorker,r.onProgress=h=>{s=h,typeof i=="function"&&i(s)},!(e instanceof Blob||e instanceof Y1))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||g)return Lf(e,r).then(function(h){try{return o=h,f.call(this)}catch(v){return a(v)}}.bind(this),a);var u=function(){try{return f.call(this)}catch(h){return a(h)}}.bind(this),d=function(h){try{return Lf(e,r).then((function(v){try{return o=v,u()}catch(p){return a(p)}}),a)}catch(v){return a(v)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",K1(e,r).then((function(h){try{return o=h,u()}catch{return d()}}),d)}catch{d()}function f(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{r.preserveExif&&e.type==="image/jpeg"&&(!r.fileType||r.fileType&&r.fileType===e.type)&&(o=wf(e,o))}catch{}return n(o)}}))}Nt.getDataUrlFromFile=Ef,Nt.getFilefromDataUrl=Ii,Nt.loadImage=Nf,Nt.drawImageInCanvas=Tf,Nt.drawFileInCanvas=Co,Nt.canvasToFile=So,Nt.getExifOrientation=Mf,Nt.handleMaxWidthOrHeight=If,Nt.followExifOrientation=Af,Nt.cleanupCanvasMemory=dr,Nt.isAutoOrientationInBrowser=hn,Nt.approximateBelowMaximumCanvasSizeOfBrowser=Of,Nt.copyExifWithoutOrientation=wf,Nt.getBrowserName=$r,Nt.version="2.0.2";const X1=window.G7Core,Li=e=>{const t=["B","KB","MB","GB"];let n=0,a=e;for(;a>=1024&&n<t.length-1;)a/=1024,n++;return`${a.toFixed(2)} ${t[n]}`},Z1=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Q1=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",wt=(e,t)=>X1?.t?.(e,t)??e,Df=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},Fr=window.G7Core;function J1(e){const{attachmentableType:t,attachmentableId:n,collection:a,maxFiles:r,maxSize:o,maxConcurrentUploads:s,accept:i,imageCompression:l,roleIds:g,autoUpload:u,initialFiles:d,endpoints:f,onFilesChange:h,onUploadComplete:v,onUploadError:p,onRemove:x,onReorder:b,uploadTriggerEvent:O,confirmBeforeRemove:C,uploadParams:E}=e,[N,S]=m.useState(d),[k,y]=m.useState([]),[w,A]=m.useState(!1),D=m.useRef(null),$=m.useRef(0),M=m.useRef(new Set),L=m.useRef(new Map),[U,T]=m.useState(!1),[I,j]=m.useState(null),[V,z]=m.useState(!1),G=m.useRef(!1),[H,W]=m.useState([]),[B,F]=m.useState(!1),[Y,R]=m.useState(0),ae=m.useRef(0),[ee,X]=m.useState(new Map),oe=m.useRef(new Map),se=m.useRef(h);se.current=h,m.useEffect(()=>{se.current?.(k)},[k]),m.useEffect(()=>{if(G.current)return;const J=d.filter(xe=>!M.current.has(xe.id)&&(!xe.hash||!M.current.has(xe.hash))),be=new Set(J.map(xe=>xe.id)),he=Array.from(L.current.values()).filter(xe=>!be.has(xe.id)&&!M.current.has(xe.id));S([...J,...he])},[d]);const pe=m.useCallback(async J=>{const be={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Nt(J,be)},[l]),we=m.useCallback(async J=>{const be=N.length+k.length,he=r-be,xe=Array.from(J).slice(0,he);for(const de of xe){if(de.size>o*1024*1024){p?.(`[${de.name}] 파일 크기(${Li(de.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,de);continue}if(i){const Ce="."+de.name.split(".").pop()?.toLowerCase();if(!i.split(",").map(Te=>Te.trim().toLowerCase()).includes(Ce)){p?.(`[${de.name}] 허용되지 않는 파일 형식입니다. (허용: ${i})`,de);continue}}const Pe={id:`pendinLine truncated
relative border-2 border-dashed rounded-lg transition-colors
${l?"opacity-60 cursor-not-allowed":""}
${e&&!l?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:d=>{d.preventDefault(),u&&a(!0)},onDragLeave:()=>a(!1),onDrop:d=>{d.preventDefault(),a(!1),u&&n(d.dataTransfer.files)},children:[c.jsx("input",{ref:r,type:"file",multiple:!0,accept:o,onChange:d=>d.target.files&&!l&&n(d.target.files),className:"hidden",disabled:l}),!f&&c.jsxs(D,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&r.current?.click(),children:[c.jsx(lt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),c.jsx(ut,{className:"text-sm text-gray-600 dark:text-gray-400",children:wt("attachment.drop_or_click")}),c.jsxs(ut,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[wt("attachment.upload_limit",{maxFiles:s,maxSize:i}),o&&` (${o})`]})]}),f]})},J1=window.G7Core,R1=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},ek=({file:e,onRemove:t,onRetry:n,onImageClick:a,onDownload:r,isPrimary:o,onPrimaryClick:s,disabled:i})=>{const{attributes:l,listeners:f,setNodeRef:u,transform:d,transition:g,isDragging:h}=lo({id:"hash"in e?e.hash:e.id}),b={transform:cr.Transform.toString(d),transition:g,opacity:h?.5:1},p="status"in e&&e.status!==void 0,x=p?e.status:"done",v=x==="uploading",O=x==="compressing",k=x==="error",C=p?e.progress:100,N=p?e.preview:void 0,E=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[S,y]=m.useState(void 0),w=!p&&E?e.download_url:void 0;m.useEffect(()=>{if(!w){y(void 0);return}let L=!0,F;return(async()=>{try{const P=await J1.api.get(w,{responseType:"blob"});L&&P&&(F=URL.createObjectURL(P),y(F))}catch(P){R1.error("Failed to load authenticated image:",P)}})(),()=>{L=!1,F&&URL.revokeObjectURL(F)}},[w]);const I=S;return c.jsxs(D,{ref:u,style:b,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[c.jsxs(D,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${E||!p?"cursor-pointer":""}`,onClick:()=>{v||O||(E&&a?a():!p&&r&&r())},children:[N||I?c.jsx(ar,{src:N||I,alt:e.original_filename,className:"w-full h-full object-cover"}):c.jsx(lt,{className:`fa-solid ${X1(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(v||O)&&c.jsxs(D,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[c.jsx(D,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:c.jsx(D,{className:"h-full bg-blue-500 transition-all",style:{width:`${C}%`}})}),c.jsxs(Z,{className:"text-white text-xs mt-1",children:[C,"%"]})]}),k&&c.jsx(D,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:c.jsx(lt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),s&&c.jsx(oe,{type:"button",onClick:L=>{L.stopPropagation(),s()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:wt(o?"attachment.primary_image":"attachment.set_as_primary"),children:c.jsx(lt,{className:"fa-solid fa-star text-xs"})}),c.jsxs(D,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${i?"hidden":""}`,children:[c.jsx(oe,{type:"button",...l,...f,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:wt("attachment.drag_to_reorder"),onClick:L=>L.stopPropagation(),children:c.jsx(lt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&r&&c.jsx(oe,{type:"button",onClick:L=>{L.stopPropagation(),r()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:wt("common.download"),children:c.jsx(lt,{className:"fa-solid fa-download text-sm"})}),k&&n&&c.jsx(oe,{type:"button",onClick:L=>{L.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:wt("common.retry"),children:c.jsx(lt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),c.jsx(oe,{type:"button",onClick:L=>{L.stopPropagation(),t()},disabled:v||O,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:wt("common.delete"),children:c.jsx(lt,{className:"fa-solid fa-times text-sm"})})]})]}),c.jsxs(D,{className:`p-2 ${!p&&r?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&r&&r()},children:[c.jsx(ut,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),c.jsx(ut,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.siz Line truncated
${b.radio}
`,onDragOver:d=>{d.preventDefault(),u&&a(!0)},onDragLeave:()=>a(!1),onDrop:d=>{d.preventDefault(),a(!1),u&&n(d.dataTransfer.files)},children:[c.jsx("input",{ref:r,type:"file",multiple:!0,accept:o,onChange:d=>d.target.files&&!l&&n(d.target.files),className:"hidden",disabled:l}),!g&&c.jsxs(_,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&r.current?.click(),children:[c.jsx(lt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400",children:wt("attachment.drop_or_click")}),c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[wt("attachment.upload_limit",{maxFiles:s,maxSize:i}),o&&` (${o})`]})]}),g]})},ek=window.G7Core,tk=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},rk=({file:e,onRemove:t,onRetry:n,onImageClick:a,onDownload:r,isPrimary:o,onPrimaryClick:s,disabled:i})=>{const{attributes:l,listeners:g,setNodeRef:u,transform:d,transition:f,isDragging:h}=lo({id:"hash"in e?e.hash:e.id}),v={transform:ur.Transform.toString(d),transition:f,opacity:h?.5:1},p="status"in e&&e.status!==void 0,x=p?e.status:"done",b=x==="uploading",O=x==="compressing",C=x==="error",E=p?e.progress:100,N=p?e.preview:void 0,S=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[k,y]=m.useState(void 0),w=!p&&S?e.download_url:void 0;m.useEffect(()=>{if(!w){y(void 0);return}let D=!0,$;return(async()=>{try{const L=await ek.api.get(w,{responseType:"blob"});D&&L&&($=URL.createObjectURL(L),y($))}catch(L){tk.error("Failed to load authenticated image:",L)}})(),()=>{D=!1,$&&URL.revokeObjectURL($)}},[w]);const A=k;return c.jsxs(_,{ref:u,style:v,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[c.jsxs(_,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${S||!p?"cursor-pointer":""}`,onClick:()=>{b||O||(S&&a?a():!p&&r&&r())},children:[N||A?c.jsx(or,{src:N||A,alt:e.original_filename,className:"w-full h-full object-cover"}):c.jsx(lt,{className:`fa-solid ${Q1(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||O)&&c.jsxs(_,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[c.jsx(_,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:c.jsx(_,{className:"h-full bg-blue-500 transition-all",style:{width:`${E}%`}})}),c.jsxs(Z,{className:"text-white text-xs mt-1",children:[E,"%"]})]}),C&&c.jsx(_,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:c.jsx(lt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),s&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),s()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:wt(o?"attachment.primary_image":"attachment.set_as_primary"),children:c.jsx(lt,{className:"fa-solid fa-star text-xs"})}),c.jsxs(_,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${i?"hidden":""}`,children:[c.jsx(re,{type:"button",...l,...g,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:wt("attachment.drag_to_reorder"),onClick:D=>D.stopPropagation(),children:c.jsx(lt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&r&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),r()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:wt("common.download"),children:c.jsx(lt,{className:"fa-solid fa-download text-sm"})}),C&&n&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:wt("common.retry"),children:c.jsx(lt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),t()},disabled:b||O,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:wt("common.delete"),children:c.jsx(lt,{className:"fa-solid fa-times text-sm"})})]})]}),c.jsxs(_,{className:`p-2 ${!p&&r?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&r&&r()},children:[c.jsx(dt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),c.jsx(dt,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.siz Line truncated
${v.radio}
text-blue-600
bg-gray-100 dark:bg-gray-700
border-gray-300 dark:border-gray-600
@@ -284,13 +282,13 @@ self.addEventListener('message', async (e) => {
dark:ring-offset-gray-800
${O?"cursor-not-allowed":"cursor-pointer"}
`}),c.jsx(Z,{className:`
${b.label}
${v.label}
font-medium
text-gray-900 dark:text-gray-300
`,children:x.label})]},x.value)})}),f&&c.jsx(Z,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:f})]})},gn=()=>window.G7Core,Eo=(e,t)=>gn()?.t?.(e,t)??e,nk=()=>gn()?.locale?.supported?.()??["ko","en"],ak=()=>gn()?.locale?.current?.()??"ko",Pf=e=>{const t=Eo(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},ok=({content:e="",value:t,onChange:n,multilingual:a=!1,isHtml:r=!1,onIsHtmlChange:o,rows:s=15,placeholder:i="",label:l,showHtmlModeToggle:f=!0,contentClassName:u="",purifyConfig:d,className:g="",name:h="content",htmlFieldName:b="content_mode",readOnly:p=!1})=>{const x=m.useMemo(()=>nk(),[]),v=m.useMemo(()=>ak(),[]),[O,k]=m.useState(v),[C,N]=m.useState(r),[E,S]=m.useState(e),[y,w]=m.useState(t??{}),[I,L]=m.useState(!1);m.useEffect(()=>{N(r)},[r]),m.useEffect(()=>{a||S(e)},[e,a]),m.useEffect(()=>{a&&t&&w(t)},[t,a]);const F=m.useCallback(U=>{const Y=U.target.value;if(S(Y),n){const G=gn()?.createChangeEvent?.({value:Y,name:h,type:"textarea"})??{target:{name:h,value:Y}};n(G)}},[n,h]),T=m.useCallback((U,Y)=>{const G={...y,[U]:Y};if(w(G),n){const H=gn()?.createChangeEvent?.({value:G,name:h,type:"multilingual"})??{target:{name:h,value:G}};n(H)}},[n,h,y]),P=m.useCallback(U=>{const Y=U.target.checked;if(N(Y),Y||L(!1),o){const G=gn()?.createChangeEvent?.({checked:Y,name:b,type:"checkbox"})??{target:{name:b,checked:Y}};o(G)}},[o,b]),V=m.useCallback(()=>{L(U=>!U)},[]),M=a?y[O]??"":E,A=m.useCallback(U=>!!y[U]?.trim(),[y]),j=()=>c.jsx(D,{className:"flex items-center gap-2 mb-3",children:x.map(U=>{const Y=U===v,G=O===U;return c.jsxs(oe,{type:"button",className:`
`,children:x.label})]},x.value)})}),g&&c.jsx(Z,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:g})]})},pn=()=>window.G7Core,Eo=(e,t)=>pn()?.t?.(e,t)??e,ok=()=>pn()?.locale?.supported?.()??["ko","en"],sk=()=>pn()?.locale?.current?.()??"ko",Pf=e=>{const t=Eo(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},ik=({content:e="",value:t,onChange:n,multilingual:a=!1,isHtml:r=!1,onIsHtmlChange:o,rows:s=15,placeholder:i="",label:l,showHtmlModeToggle:g=!0,contentClassName:u="",purifyConfig:d,className:f="",name:h="content",htmlFieldName:v="content_mode",readOnly:p=!1})=>{const x=m.useMemo(()=>ok(),[]),b=m.useMemo(()=>sk(),[]),[O,C]=m.useState(b),[E,N]=m.useState(r),[S,k]=m.useState(e),[y,w]=m.useState(t??{}),[A,D]=m.useState(!1);m.useEffect(()=>{N(r)},[r]),m.useEffect(()=>{a||k(e)},[e,a]),m.useEffect(()=>{a&&t&&w(t)},[t,a]);const $=m.useCallback(V=>{const z=V.target.value;if(k(z),n){const G=pn()?.createChangeEvent?.({value:z,name:h,type:"textarea"})??{target:{name:h,value:z}};n(G)}},[n,h]),M=m.useCallback((V,z)=>{const G={...y,[V]:z};if(w(G),n){const H=pn()?.createChangeEvent?.({value:G,name:h,type:"multilingual"})??{target:{name:h,value:G}};n(H)}},[n,h,y]),L=m.useCallback(V=>{const z=V.target.checked;if(N(z),z||D(!1),o){const G=pn()?.createChangeEvent?.({checked:z,name:v,type:"checkbox"})??{target:{name:v,checked:z}};o(G)}},[o,v]),U=m.useCallback(()=>{D(V=>!V)},[]),T=a?y[O]??"":S,I=m.useCallback(V=>!!y[V]?.trim(),[y]),j=()=>c.jsx(_,{className:"flex items-center gap-2 mb-3",children:x.map(V=>{const z=V===b,G=O===V;return c.jsxs(re,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${G?Y?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":Y?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>k(U),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),c.jsx(Z,{children:Pf(U)}),Y&&c.jsx(Z,{className:"text-red-500",children:"*"}),A(U)&&!G&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},U)})});return c.jsxs(D,{className:`space-y-2 ${g}`,children:[c.jsxs(D,{className:"flex items-center justify-between",children:[l&&c.jsx($t,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),c.jsxs(D,{className:"flex items-center gap-3",children:[C&&!p&&c.jsx(oe,{type:"button",onClick:V,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${I?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Eo(I?"common.preview_off":"common.preview")}),f&&c.jsxs($t,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[c.jsx(gt,{type:"checkbox",name:b,checked:C,onChange:P,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),c.jsx(D,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Eo("common.html_mode")})]})]})]}),a&&j(),!I&&(a?x.map(U=>c.jsx(D,{className:O===U?"block":"hidden",children:c.jsx(vr,{name:`${h}[${U}]`,value:y[U]??"",onChange:Y=>T(U,Y.target.value),placeholder:`${i} (${Pf(U)})`,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},U)):c.jsx(vr,{name:h,value:E,onChange:F,placeholder:i,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),I&&c.jsx(D,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:c.jsx(qo,{content:M,isHtml:!0,className:u||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:d})})]})},$f="g7_dismissed_warnings";function Ff(){try{const e=sessionStorage.getItem($f);return e?JSON.parse(e):[]}catch{return[]}}function sk(e){try{const t=Ff();t.includes(e)||(t.push(e),sessionStorage.setItem($f,JSON.stringify(t)))}catch{}}function ik(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const lk=({warnings:e,className:t=""})=>{const[n,a]=m.useState([]);m.useEffect(()=>{a(Ff())},[]);const r=m.useCallback(s=>{sk(s),a(i=>[...i,s])},[]);if(!e||e.length===0)return null;const o=e.filter(s=>!n.includes(s.id));return o.length===0?null:c.jsx(D,{className:`space-y-2 ${t}`.trim(),children:o.map(s=>c.jsx(wl,{type:ik(s.level),message:s.message,dismissible:!0,onDismiss:()=>r(s.id)},s.id))})},Uf=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},ck=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:a})=>{const[r,o]=m.useState(!1),s=m.useRef(!0),i=m.useMemo(()=>{try{const g=window.G7Core?.AuthManager?.getInstance();return g?g.getUser()?.uuid:void 0}catch{return}},[]),l=m.useMemo(()=>`g7_filters_${e}${i!==void 0?`_${i}`:""}`,[e,i]),f=m.useCallback(()=>{try{const g=localStorage.getItem(l);if(g){const h=JSON.parse(g);if(Array.isArray(h))return h}}catch(g){Uf.warn("Failed to load from localStorage:",g)}return null},[l]),u=m.useCallback(g=>{try{localStorage.setItem(l,JSON.stringify(g))}catch(h){Uf.warn("Failed to save to localStorage:",h)}},[l]),d=m.useCallback(()=>{const g=f();return g||(t&&t.length>0?t:n)},[f,t,n]);return m.useEffect(()=>{if(!r){const g=d();a&&g.length>0&&a(g),o(!0)}},[r,a,d]),m.useEffect(()=>{if(r&&t&&t.length>0){if(s.current){s.current=!1;return}u(t)}},[r,t,u]),null},uk=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log Line truncated
${G?z?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":z?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>C(V),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),c.jsx(Z,{children:Pf(V)}),z&&c.jsx(Z,{className:"text-red-500",children:"*"}),I(V)&&!G&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},V)})});return c.jsxs(_,{className:`space-y-2 ${f}`,children:[c.jsxs(_,{className:"flex items-center justify-between",children:[l&&c.jsx(Ft,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),c.jsxs(_,{className:"flex items-center gap-3",children:[E&&!p&&c.jsx(re,{type:"button",onClick:U,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${A?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Eo(A?"common.preview_off":"common.preview")}),g&&c.jsxs(Ft,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[c.jsx(ft,{type:"checkbox",name:v,checked:E,onChange:L,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),c.jsx(_,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Eo("common.html_mode")})]})]})]}),a&&j(),!A&&(a?x.map(V=>c.jsx(_,{className:O===V?"block":"hidden",children:c.jsx(vr,{name:`${h}[${V}]`,value:y[V]??"",onChange:z=>M(V,z.target.value),placeholder:`${i} (${Pf(V)})`,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${E?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},V)):c.jsx(vr,{name:h,value:S,onChange:$,placeholder:i,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${E?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),A&&c.jsx(_,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:c.jsx(qo,{content:T,isHtml:!0,className:u||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:d})})]})},$f="g7_dismissed_warnings";function Ff(){try{const e=sessionStorage.getItem($f);return e?JSON.parse(e):[]}catch{return[]}}function lk(e){try{const t=Ff();t.includes(e)||(t.push(e),sessionStorage.setItem($f,JSON.stringify(t)))}catch{}}function ck(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const uk=({warnings:e,className:t=""})=>{const[n,a]=m.useState([]);m.useEffect(()=>{a(Ff())},[]);const r=m.useCallback(s=>{lk(s),a(i=>[...i,s])},[]);if(!e||e.length===0)return null;const o=e.filter(s=>!n.includes(s.id));return o.length===0?null:c.jsx(_,{className:`space-y-2 ${t}`.trim(),children:o.map(s=>c.jsx(wl,{type:ck(s.level),message:s.message,dismissible:!0,onDismiss:()=>r(s.id)},s.id))})},Uf=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},dk=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:a})=>{const[r,o]=m.useState(!1),s=m.useRef(!0),i=m.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=m.useMemo(()=>`g7_filters_${e}${i!==void 0?`_${i}`:""}`,[e,i]),g=m.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const h=JSON.parse(f);if(Array.isArray(h))return h}}catch(f){Uf.warn("Failed to load from localStorage:",f)}return null},[l]),u=m.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(h){Uf.warn("Failed to save to localStorage:",h)}},[l]),d=m.useCallback(()=>{const f=g();return f||(t&&t.length>0?t:n)},[g,t,n]);return m.useEffect(()=>{if(!r){const f=d();a&&f.length>0&&a(f),o(!0)}},[r,a,d]),m.useEffect(()=>{if(r&&t&&t.length>0){if(s.current){s.current=!1;return}u(t)}},[r,t,u]),null},fk=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log Line truncated
w-full px-4 py-2.5
bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
@@ -299,11 +297,11 @@ self.addEventListener('message', async (e) => {
flex items-center justify-between gap-2
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
`,"aria-haspopup":"listbox","aria-expanded":u,children:[c.jsx(D,{className:"flex-1 min-w-0",children:O()}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),u&&c.jsx(D,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:c.jsx(D,{className:"overflow-auto",style:{maxHeight:s},children:e.length===0?c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Vf("common.no_options")}):e.map((C,N)=>{const E=String(C.value)===String(t);return c.jsx(oe,{type:"button",onClick:()=>!C.disabled&&x(C.value),disabled:C.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":u,children:[c.jsx(_,{className:"flex-1 min-w-0",children:O()}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),u&&c.jsx(_,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:c.jsx(_,{className:"overflow-auto",style:{maxHeight:s},children:e.length===0?c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Vf("common.no_options")}):e.map((E,N)=>{const S=String(E.value)===String(t);return c.jsx(re,{type:"button",onClick:()=>!E.disabled&&x(E.value),disabled:E.disabled,className:`
w-full px-4 py-3 text-left
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${E?"bg-blue-50 dark:bg-blue-900/20":""}
${C.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":E,"data-item-value":C.value,"data-item-index":N,"data-item-selected":E,children:f?.item?Hf(f.item,{item:C,index:N,isSelected:E},`item-${N}`):i||k(C,E)},C.value)})})})]})};function gk(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const hk=({value:e,checked:t=!1,icon:n,label:a,variant:r="blue",customColor:o,className:s="",style:i,onChange:l})=>{const[f,u]=m.useState(!1),d="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const p=gk(o),x=document.documentElement.classList.contains("dark");let v;return t?v={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:f?.85:1}:v=p?{backgroundColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${f?x?.25:.12:x?.15:.06})`,color:o,borderColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${x?.3:.2})`}:{},c.jsxs($t,{className:`${d} ${s}`,style:{...v,...i},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[c.jsx(gt,{type:"checkbox",value:e,checked:t,onChange:O=>{l?.(O)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(D,{children:a})]})}const b=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[r]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[r];return c.jsxs($t,{className:`${d} ${b} ${s}`,style:i,children:[c.jsx(gt,{type:"checkbox",value:e,checked:t,onChange:p=>{l?.(p)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(D,{children:a})]})},pk=({label:e,icon:t,iconPosition:n="left",position:a="right",className:r="",style:o,children:s})=>{const[i,l]=m.useState(!1),[f,u]=m.useState({top:0,left:0}),d=m.useRef(null),g=m.useRef(null),h=m.useCallback(()=>{if(!d.current)return;const p=d.current.getBoundingClientRect(),x=224;let v=a==="right"?p.right-x:p.left;const O=p.bottom+8;v<8&&(v=8),v+x>window.innerWidth-8&&(v=window.innerWidth-x-8),u({top:O,left:v})},[a]);m.useEffect(()=>{i&&h()},[i,h]),m.useEffect(()=>{if(!i)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[i]),m.useEffect(()=>{const p=x=>{const v=x.target,O=d.current?.contains(v),k=g.current?.contains(v);!O&&!k&&l(!1)};return i&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[i]);const b=i?fr.createPortal(c.jsx("div",{ref:g,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:f.top,left:f.left},onClick:()=>l(!1),children:s}),document.body):null;return c.jsxs(D,{className:`relative inline-block ${r}`,style:o,children:[c.jsxs(oe,{ref:d,onClick:()=>l(!i),className:"flex items-center gap-2",children:[n==="left"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"}),e&&c.jsx(Z,{className:"text-sm font-medium",children:e}),n==="right"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"})]}),b]})},bk=({label:e,icon:t,variant:n="default",disabled:a=!1,divider:r=!1,className:o="",style:s,onClick:i})=>{if(r)return c.jsx(D,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:s});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",f=a?"opacity-50 cursor-not-allowed":"cursor-pointer",u=()=>{!a&&i&&i()};return c.jsxs(D,{onClick:u,className:`flex items-center gap-3 px-4 py-3 transition-colors ${l} ${f} ${o}`,styl Line truncated
${S?"bg-blue-50 dark:bg-blue-900/20":""}
${E.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":S,"data-item-value":E.value,"data-item-index":N,"data-item-selected":S,children:g?.item?Hf(g.item,{item:E,index:N,isSelected:S},`item-${N}`):i||C(E,S)},E.value)})})})]})};function pk(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const bk=({value:e,checked:t=!1,icon:n,label:a,variant:r="blue",customColor:o,className:s="",style:i,onChange:l})=>{const[g,u]=m.useState(!1),d="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const p=pk(o),x=document.documentElement.classList.contains("dark");let b;return t?b={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:g?.85:1}:b=p?{backgroundColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${g?x?.25:.12:x?.15:.06})`,color:o,borderColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${x?.3:.2})`}:{},c.jsxs(Ft,{className:`${d} ${s}`,style:{...b,...i},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:O=>{l?.(O)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(_,{children:a})]})}const v=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[r]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[r];return c.jsxs(Ft,{className:`${d} ${v} ${s}`,style:i,children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:p=>{l?.(p)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(_,{children:a})]})},mk=({label:e,icon:t,iconPosition:n="left",position:a="right",className:r="",style:o,children:s})=>{const[i,l]=m.useState(!1),[g,u]=m.useState({top:0,left:0}),d=m.useRef(null),f=m.useRef(null),h=m.useCallback(()=>{if(!d.current)return;const p=d.current.getBoundingClientRect(),x=224;let b=a==="right"?p.right-x:p.left;const O=p.bottom+8;b<8&&(b=8),b+x>window.innerWidth-8&&(b=window.innerWidth-x-8),u({top:O,left:b})},[a]);m.useEffect(()=>{i&&h()},[i,h]),m.useEffect(()=>{if(!i)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[i]),m.useEffect(()=>{const p=x=>{const b=x.target,O=d.current?.contains(b),C=f.current?.contains(b);!O&&!C&&l(!1)};return i&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[i]);const v=i?ar.createPortal(c.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:g.top,left:g.left},onClick:()=>l(!1),children:s}),document.body):null;return c.jsxs(_,{className:`relative inline-block ${r}`,style:o,children:[c.jsxs(re,{ref:d,onClick:()=>l(!i),className:"flex items-center gap-2",children:[n==="left"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"}),e&&c.jsx(Z,{className:"text-sm font-medium",children:e}),n==="right"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"})]}),v]})},vk=({label:e,icon:t,variant:n="default",disabled:a=!1,divider:r=!1,className:o="",style:s,onClick:i})=>{if(r)return c.jsx(_,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:s});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",g=a?"opacity-50 cursor-not-allowed":"cursor-pointer",u=()=>{!a&&i&&i()};return c.jsxs(_,{onClick:u,className:`flex items-center gap-3 px-4 py-3 transition-colors ${l} ${g} ${o}`,styl Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/basic/I.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../.Line truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/basic/I.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../node_modules/@babel/rLine truncated
@@ -4,8 +4,13 @@ export interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInput
accept?: string;
/** 최대 파일 크기 (MB) */
maxSize?: number;
/** 파일 선택 시 콜백 */
onChange?: (file: File | null) => void;
/** 파일 선택 시 콜백 ({ target: { value } } 패턴) */
onChange?: (event: {
target: {
value: File | null;
name: string;
};
}) => void;
/** 에러 발생 시 콜백 */
onError?: (error: string) => void;
/** 버튼 텍스트 */
@@ -13,6 +13,10 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
value: string | number;
};
}) => void;
/** 드롭다운 내 검색 input 활성화 (engine-v1.40.0+) */
searchable?: boolean;
/** 검색 input placeholder */
searchPlaceholder?: string;
}
/**
* 커스텀 Select 컴포넌트
@@ -86,6 +86,8 @@ export interface DataGridFooterCell {
text?: string;
}
export interface DataGridProps {
/** DOM id (transition_overlay.target / overlay_target 으로 spinner mount 영역 지정용) */
id?: string;
columns: DataGridColumn[];
data: any[];
sortable?: boolean;
@@ -35,7 +35,6 @@ export interface HtmlContentProps {
* @example
* // HTML 렌더링 (기본값)
* <HtmlContent content="<p>안녕하세요</p>" />
* <HtmlContent content="<p>안녕하세요</p>" isHtml={true} />
*
* // 일반 텍스트 렌더링
* <HtmlContent
@@ -10,6 +10,7 @@ export interface NotificationItem {
time: string;
read?: boolean;
iconName?: IconName;
data?: Record<string, unknown>;
onClick?: () => void;
}
/**
@@ -18,18 +19,46 @@ export interface NotificationItem {
export interface NotificationCenterProps {
/** 알림 목록 */
notifications?: NotificationItem[];
/** 서버 기반 미읽음 알림 수 */
unreadCount?: number;
/** 추가 로드 가능 여부 */
hasMore?: boolean;
/** 로딩 상태 */
loading?: boolean;
/** 알림 제목 텍스트 */
titleText?: string;
/** 알림 없음 텍스트 */
emptyText?: string;
/** 알림 클릭 핸들러 */
onNotificationClick?: (id: string | number) => void;
/** "모두 읽음" 버튼 텍스트 */
markAllReadText?: string;
/** "모두 삭제" 버튼 텍스트 */
deleteAllText?: string;
/** "미읽음만" 체크박스 텍스트 */
unreadOnlyText?: string;
/** "미읽음만" 체크박스 상태 */
unreadOnly?: boolean;
/** 알림 클릭 핸들러 (알림 전체 객체 전달) */
onNotificationClick?: (notification: NotificationItem) => void;
/** 드롭다운 닫힐 때 (뷰포트에 들어온 미읽음 알림 ID 목록) */
onClose?: (visibleUnreadIds: (string | number)[]) => void;
/** 추가 로드 요청 */
onLoadMore?: () => void;
/** 모두 읽음 처리 요청 */
onMarkAllRead?: () => void;
/** 모두 삭제 요청 */
onDeleteAll?: () => void;
/** 개별 알림 삭제 요청 (알림 전체 객체 전달) */
onDelete?: (notification: NotificationItem) => void;
/** "미읽음만" 체크박스 토글 */
onUnreadOnlyToggle?: (checked: boolean) => void;
/** 드롭다운 정렬 방향 — "right"(기본): 우측 정렬되어 좌측으로 확장 / "left": 좌측 정렬되어 우측으로 확장 */
dropdownAlign?: 'left' | 'right';
className?: string;
}
/**
* NotificationCenter 컴포넌트
*
* 알림 센터 - 알림 목록 표시 및 관리
* 알림 센터 - 알림 목록 표시, 무한스크롤, 읽음 추적
*
* @example
* ```tsx
@@ -37,6 +66,8 @@ export interface NotificationCenterProps {
* notifications={[
* { id: 1, title: '새 댓글', message: '게시물에 댓글이 달렸습니다', time: '5분 전' }
* ]}
* unreadCount={5}
* hasMore={true}
* titleText="Notifications"
* emptyText="No notifications"
* />
@@ -0,0 +1,23 @@
import { default as React } from 'react';
/**
* 페이지 로딩 컴포넌트 Props (엔진에서 전달)
*
* @since engine-v1.29.0
*/
export interface PageLoadingProps {
options?: {
text?: string;
};
}
/**
* 어드민 페이지 로딩 인디케이터 컴포넌트
*
* `transition_overlay` 의 spinner 스타일에서 사용된다.
* 엔진은 타겟 요소 내부에 빈 컨테이너만 삽입하며, 포지셔닝/배경/z-index/다크모드
* 등 모든 비주얼 스타일은 이 컴포넌트가 결정한다. React 트리 외부에 렌더링되므로
* 인라인 스타일을 사용한다.
*
* @since engine-v1.29.0
*/
declare const PageLoading: React.FC<PageLoadingProps>;
export default PageLoading;
@@ -14,6 +14,8 @@ export interface TabNavigationProps {
variant?: 'default' | 'pills' | 'underline';
className?: string;
style?: React.CSSProperties;
/** 모바일 전환 임계값 (px). 기본값 768 — G7 ResponsiveContext mobile 프리셋과 동일 */
mobileBreakpoint?: number;
}
/**
* TabNavigation 집합 컴포넌트
@@ -21,10 +23,14 @@ export interface TabNavigationProps {
* 탭 네비게이션을 제공하는 컴포넌트입니다.
* 여러 탭을 전환할 수 있으며, 아이콘과 뱃지를 지원합니다.
*
* 반응형: G7Core.useResponsive() hook으로 화면 너비를 구독하여
* mobileBreakpoint(기본 768px) 미만일 때 Select 드롭다운으로 자동 전환됩니다.
* Tailwind hidden md:flex 분기를 사용하지 않으므로 위지윅 편집기의 디바이스 미리보기와도 호환됩니다.
*
* **주의**: 이 컴포넌트는 순수 네비게이션 UI만 제공하며,
* 실제 탭 컨텐츠는 부모 컴포넌트에서 activeTabId를 기반으로 조건부 렌더링해야 합니다.
*
* 기본 컴포넌트 조합: Nav + Button + Icon + Div + Span
* 기본 컴포넌트 조합: Nav + Button + Icon + Div + Span + Select
*
* @example
* // 레이아웃 JSON 사용 예시
@@ -38,15 +44,5 @@ export interface TabNavigationProps {
* ]
* }
* }
*
* // 부모 컴포넌트에서 컨텐츠 렌더링 예시:
* const [activeTab, setActiveTab] = useState(1);
* return (
* <>
* <TabNavigation tabs={tabs} activeTabId={activeTab} onTabChange={setActiveTab} />
* {activeTab === 1 && <ProfileContent />}
* {activeTab === 2 && <SettingsContent />}
* </>
* );
*/
export declare const TabNavigation: React.FC<TabNavigationProps>;
@@ -54,6 +54,8 @@ export interface TabNavigationScrollProps {
* - 내부 상태로 활성 탭 관리 (React useState)
* - scrollToSectionHandler를 사용하여 자동 스크롤
* - 탭 클릭 시 즉시 UI 업데이트 + 스크롤 이동
* - 반응형: G7Core.useResponsive() hook으로 화면 너비를 구독하여 768px 미만 시
* Select 드롭다운으로 자동 전환 (Tailwind hidden md:flex 분기 미사용 — 위지윅 미리보기 호환)
*
* @example
* ```json
@@ -78,6 +78,8 @@ export { ColumnSelector } from './ColumnSelector';
export type { ColumnSelectorProps, ColumnItem } from './ColumnSelector';
export { PageTransitionIndicator } from './PageTransitionIndicator';
export type { PageTransitionIndicatorProps } from './PageTransitionIndicator';
export { default as PageLoading } from './PageLoading';
export type { PageLoadingProps } from './PageLoading';
export { Toggle } from './Toggle';
export type { ToggleProps } from './Toggle';
export { TagInput } from './TagInput';
@@ -2,6 +2,9 @@
"auth": {
"$partial": "partial/en/auth.json"
},
"nav": {
"$partial": "partial/en/nav.json"
},
"admin": {
"$partial": "partial/en/admin.json"
},
@@ -2,6 +2,9 @@
"auth": {
"$partial": "partial/ko/auth.json"
},
"nav": {
"$partial": "partial/ko/nav.json"
},
"admin": {
"$partial": "partial/ko/admin.json"
},
@@ -7,6 +7,14 @@
"language": "Language",
"notifications": "Notifications",
"no_notifications": "No notifications",
"notifications_mark_all_read": "Mark all as read",
"notifications_delete_all": "Delete all",
"notifications_delete_all_title": "Delete all notifications",
"notifications_delete_all_confirm": "Are you sure you want to delete all notifications? This action cannot be undone.",
"notifications_delete_all_success": "All notifications have been deleted.",
"notifications_delete_all_failed": "Failed to delete all notifications.",
"notifications_unread_only": "Unread only",
"new_notification_received": "New notification received",
"base_layout_description": "Gnuboard7 Admin",
"mobile_menu": "Mobile Menu",
"close_menu": "Close Menu",
@@ -230,10 +238,6 @@
"blocked": "Blocked",
"withdrawn": "Withdrawn"
},
"language_options": {
"ko": "Korean",
"en": "English"
},
"timezone_options": {
"Asia/Seoul": "Asia/Seoul (UTC+9)",
"Asia/Tokyo": "Asia/Tokyo (UTC+9)",
@@ -352,6 +356,18 @@
"admin_menus": "Admin Menus",
"admin_menus_count": "{{count}} menu(s) will be registered.",
"no_admin_menus": "No admin menus to register.",
"dependencies": "Dependencies",
"required_core_version": "Required core version",
"required_modules": "Required modules",
"required_plugins": "Required plugins",
"no_required_core_version": "Not specified",
"no_dependencies_required": "No extension dependencies.",
"dependency_required_version": "Required: {{version}}",
"dependency_installed_version": "Installed: {{version}}",
"dependency_not_installed": "Not installed",
"dependency_met": "Satisfied",
"dependency_unmet_version": "Version mismatch",
"dependency_inactive": "Inactive",
"permissions": "Permissions",
"permissions_count": "{{count}} permission(s) will be registered.",
"no_permissions": "No permissions to register.",
@@ -364,6 +380,11 @@
"install_title": "Install Module",
"install_confirm": "Do you want to install {{name}} module?",
"install_description": "After installation, you can activate the module to use its features.",
"vendor_mode_label": "Vendor install mode",
"vendor_mode_hint": "Use 'Bundled' on shared hosting where Composer is unavailable.",
"vendor_mode_auto": "Auto (Recommended)",
"vendor_mode_composer": "Composer",
"vendor_mode_bundled": "Bundled vendor",
"uninstall_title": "Uninstall Module",
"uninstall_confirm": "Are you sure you want to uninstall {{name}} module?",
"uninstall_warning": "This action cannot be undone.",
@@ -409,7 +430,16 @@
"view_changelog": "View Changelog",
"changelog": "Changelog",
"no_changelog": "No changelog available.",
"update_changelog_title": "Changes in this update"
"update_changelog_title": "Changes in this update",
"layout_strategy_title": "Layout Strategy",
"layout_strategy_overwrite": "Overwrite All",
"layout_strategy_overwrite_desc": "Replace all layouts with the new version.",
"layout_strategy_keep": "Keep Modifications",
"layout_strategy_keep_desc": "Preserve user-modified layouts.",
"modified_layouts_warning": "{{count}} modified layout(s) exist. Choosing 'Overwrite All' will discard the modifications.",
"no_modified_layouts": "No modified layouts.",
"modified_layouts_list_title": "Modified layouts to keep ({{count}})",
"modified_layouts_keep_notice": "These layouts will retain their current content after the update."
},
"tabs": {
"file_upload": "File Upload",
@@ -501,6 +531,18 @@
"field_update_source": "Update Source",
"field_license": "License",
"field_status": "Status",
"dependencies": "Dependencies",
"required_core_version": "Required core version",
"required_modules": "Required modules",
"required_plugins": "Required plugins",
"no_required_core_version": "Not specified",
"no_dependencies_required": "No extension dependencies.",
"dependency_required_version": "Required: {{version}}",
"dependency_installed_version": "Installed: {{version}}",
"dependency_not_installed": "Not installed",
"dependency_met": "Satisfied",
"dependency_unmet_version": "Version mismatch",
"dependency_inactive": "Inactive",
"permissions": "Permissions",
"permissions_description": "List of permissions registered by this plugin.",
"no_permissions": "No permissions registered.",
@@ -516,6 +558,11 @@
"install_title": "Install Plugin",
"install_confirm": "Do you want to install {{name}} plugin?",
"install_description": "After installation, you can activate the plugin to use its features.",
"vendor_mode_label": "Vendor install mode",
"vendor_mode_hint": "Use 'Bundled' on shared hosting where Composer is unavailable.",
"vendor_mode_auto": "Auto (Recommended)",
"vendor_mode_composer": "Composer",
"vendor_mode_bundled": "Bundled vendor",
"uninstall_title": "Confirm Plugin Removal",
"uninstall_confirm": "Are you sure you want to remove {{name}} plugin?",
"uninstall_warning": "This action cannot be undone.",
@@ -560,7 +607,16 @@
"view_changelog": "View Changelog",
"changelog": "Changelog",
"no_changelog": "No changelog available.",
"update_changelog_title": "Changes in this update"
"update_changelog_title": "Changes in this update",
"layout_strategy_title": "Layout Strategy",
"layout_strategy_overwrite": "Overwrite All",
"layout_strategy_overwrite_desc": "Replace all layouts with the new version.",
"layout_strategy_keep": "Keep Modifications",
"layout_strategy_keep_desc": "Preserve user-modified layouts.",
"modified_layouts_warning": "{{count}} modified layout(s) exist. Choosing 'Overwrite All' will discard the modifications.",
"no_modified_layouts": "No modified layouts.",
"modified_layouts_list_title": "Modified layouts to keep ({{count}})",
"modified_layouts_keep_notice": "These layouts will retain their current content after the update."
},
"tabs": {
"file_upload": "File Upload",
@@ -927,7 +983,7 @@
"security": "Security",
"drivers": "Drivers",
"advanced": "Advanced",
"mail_templates": "Mail Templates",
"notification_definitions": "Notifications",
"info": "Info"
},
"general": {
@@ -1155,11 +1211,20 @@
"desc": "Configure WebSocket server for real-time communication.",
"enabled": "Enable WebSocket",
"enabled_desc": "Enable real-time features via Laravel Reverb.",
"app_id": "App ID",
"app_key": "App Key",
"app_secret": "App Secret",
"host": "Host",
"port": "Port",
"scheme": "Protocol",
"reverb_notice": "Reverb server must be running when WebSocket is enabled."
"reverb_notice": "Reverb server must be running when WebSocket is enabled.",
"verify_ssl": "SSL Certificate Verification",
"verify_ssl_desc": "Disable for self-signed certificates. Must be enabled in production.",
"server_endpoint_title": "Server Endpoint (Backend → Reverb)",
"server_endpoint_desc": "Internal address used by the backend to deliver broadcast events to the Reverb server. The host/port above is for browser access, while this value is for backend → Reverb internal communication. Leave empty to use the same values as the client endpoint above.",
"server_host": "Server Host (Internal)",
"server_port": "Server Port (Internal)",
"server_scheme": "Server Scheme (Internal)"
},
"search_engine": {
"title": "Search Engine",
@@ -1205,11 +1270,25 @@
"core_update_github_url": "GitHub Repository URL",
"core_update_github_url_desc": "GitHub repository URL to check for core updates. (Core only)",
"core_update_github_token": "GitHub Access Token",
"core_update_github_token_desc": "Used for core and extension updates from private repositories. Fine-grained PAT permission: Contents (Read-only). Leave empty for public repositories."
"core_update_github_token_desc": "Used for core and extension updates from private repositories. Fine-grained PAT permission: Contents (Read-only). Leave empty for public repositories.",
"geoip_section": "IP-based Timezone Detection (MaxMind GeoLite2)",
"geoip_section_desc": "Automatically detects the timezone from the IP address of unauthenticated users. Requires a free MaxMind license key.",
"geoip_enabled": "Enable IP-based timezone detection",
"geoip_enabled_desc": "Turning this on enables the license key input and periodic DB updates.",
"geoip_license_key": "MaxMind License Key",
"geoip_license_key_desc": "Enter the license key issued from your free MaxMind account. Get one at https://www.maxmind.com/en/geolite2/signup.",
"geoip_auto_update_enabled": "Auto-update GeoIP DB",
"geoip_auto_update_enabled_desc": "Automatically re-downloads the MaxMind GeoLite2-City DB once a week (Wednesday 03:00).",
"geoip_last_updated_at": "Last updated",
"geoip_manual_update": "Update now",
"geoip_updating": "Updating...",
"geoip_update_success": "GeoIP DB update completed.",
"geoip_update_failed": "GeoIP DB update failed."
},
"mail_templates": {
"title": "Mail Template Management",
"description": "Manage the subject and body of system emails.",
"notification_definitions": {
"title": "Notification Settings",
"description": "Manage notification templates by channel.",
"channel_management": "Notification Channels",
"active": "Active",
"inactive": "Inactive",
"default_badge": "Default",
@@ -1225,29 +1304,72 @@
"search_type_body": "Body",
"total_count": "Total {{count}} items",
"per_page_label": "Per page",
"empty_message": "No mail templates found.",
"empty_message": "No notification settings found.",
"empty_no_results": "No results found.",
"toggle_success": "Mail template active status has been changed.",
"reset_success": "Mail template has been reset to default.",
"save_success": "Mail template has been saved.",
"save_error": "Failed to save mail template.",
"toggle_success": "Notification active status has been changed.",
"reset_success": "Notification has been reset to default.",
"reset_failed": "Failed to reset notification.",
"reset_modal": {
"title": "Reset to Default",
"confirm_message": "All channel templates of this notification will be restored to defaults.",
"warning_message": "The saved subject, body, and recipient settings will be permanently lost.",
"target_label": "Target:",
"btn_confirm": "Reset",
"btn_confirming": "Resetting..."
},
"no_template_for_channel": "No template for this channel.",
"body_preview": "Body Preview",
"save_success": "Notification settings have been saved.",
"save_error": "Failed to save notification settings.",
"types": {
"welcome": "Welcome",
"reset_password": "Password Reset",
"password_changed": "Password Changed"
},
"channels_label": "Channels:",
"edit_modal": {
"title": "Edit Mail Template",
"title": "Edit Notification Template",
"type_label": "Type:",
"subject": "Subject",
"body": "Body",
"click_url": "Click URL",
"click_url_hint": "URL to navigate when the notification is clicked. Use {variable} for dynamic values. (e.g., /mypage/orders/{order_number})",
"channel_label": "Channel:",
"variables_title": "Available Variables",
"btn_preview": "Preview",
"is_active_label": "Active",
"validation_error": "Please check the input fields."
},
"recipients_label": "Recipients:",
"recipients": {
"title": "Recipient Settings",
"add_rule": "+ Add Recipient Rule",
"rule_label": "Recipient Rule {{index}}",
"type_label": "Type",
"role_label": "Role",
"relation_label": "Relation",
"users_label": "Users",
"exclude_trigger_user": "Exclude trigger user",
"types": {
"trigger_user": "Trigger User",
"related_user": "Related User",
"role": "Role-based",
"specific_users": "Specific Users"
},
"badge": {
"trigger_user": "Trigger User",
"related_user": "Related User ({{relation}})",
"role": "{{role}} Role",
"specific_users": "Specific Users ({{count}})",
"exclude_self": "(excl. self)"
},
"no_recipients": "No recipients configured",
"role_search_placeholder": "Search roles",
"users_placeholder": "Search users",
"users_no_options": "No results found"
},
"preview_modal": {
"title": "Mail Preview",
"title": "Notification Preview",
"subject_label": "Subject",
"body_label": "Body"
}
@@ -1475,6 +1597,14 @@
"force_activate_description": "Force activating may cause the template to malfunction.",
"confirm_activate": "Activate Anyway",
"dependencies": "Dependencies",
"required_core_version": "Required core version",
"no_required_core_version": "Not specified",
"no_dependencies_required": "No extension dependencies.",
"dependency_required_version": "Required: {{version}}",
"dependency_installed_version": "Installed: {{version}}",
"dependency_not_installed": "Not installed",
"dependency_unmet_version": "Version mismatch",
"dependency_inactive": "Inactive",
"required_modules": "Required Modules",
"required_plugins": "Required Plugins",
"dependency_met": "Met",
@@ -1711,5 +1841,71 @@
"modal_title": "License",
"license_text": "License",
"view_license": "View License"
},
"notification_log": {
"page_title": "Notification Logs",
"page_description": "View the history of notifications sent by the system.",
"tab_all": "All",
"extension_core": "Core",
"extension_module": "Module",
"extension_plugin": "Plugin",
"status_sent": "Sent",
"status_failed": "Failed",
"status_skipped": "Skipped",
"search_placeholder": "Search recipient, subject",
"total_count": "Total {{count}} items",
"col_channel": "Channel",
"col_recipient": "Recipient",
"col_sender": "Sender",
"col_type": "Type",
"col_subject": "Subject",
"col_status": "Status",
"col_sent_at": "Sent At",
"col_extension": "Extension",
"system_sender": "System",
"empty_message": "No notification logs found.",
"detail_title": "Log Detail",
"detail_body": "Body",
"detail_error": "Error Message",
"filter": {
"search_type_all": "All",
"search_type_recipient": "Recipient",
"search_type_subject": "Subject",
"status_label": "Status",
"status_all": "All",
"extension_type_label": "Extension Type",
"extension_type_all": "All",
"search_button": "Search",
"reset_button": "Reset"
},
"sort": {
"sent_at_desc": "Newest",
"sent_at_asc": "Oldest",
"recipient_name_asc": "Recipient",
"subject_asc": "Subject"
},
"detail": {
"error_label": "Error:",
"source_label": "Source:",
"notification_type_label": "Notification Type:",
"body_label": "Body",
"no_body": "No body content."
},
"action": {
"view_member": "View Member",
"search_by_sender": "Search by Sender",
"search_by_recipient": "Search by Recipient"
},
"delete": {
"button": "Delete",
"selected_count": "{{count}} selected",
"bulk_button": "Bulk Delete",
"confirm_title": "Delete Notification Log",
"confirm_message": "Are you sure you want to delete this notification log? This action cannot be undone.",
"success": "Notification log has been deleted.",
"bulk_confirm_title": "Bulk Delete Confirmation",
"bulk_confirm_message": "Are you sure you want to delete all selected notification logs? This action cannot be undone.",
"bulk_success": "Selected notification logs have been deleted."
}
}
}
@@ -73,8 +73,6 @@
"scope_type_self_desc": "Only resources created by you",
"scope_type_role_desc": "Only resources from users with the same role",
"multilingual": {
"add_language": "Add Language",
"language_ko": "한국어",
"language_en": "English"
"add_language": "Add Language"
}
}
@@ -0,0 +1,3 @@
{
"loading": "Loading..."
}
@@ -7,6 +7,14 @@
"language": "언어",
"notifications": "알림",
"no_notifications": "알림이 없습니다",
"notifications_mark_all_read": "모두 읽기",
"notifications_delete_all": "모두 삭제",
"notifications_delete_all_title": "전체 알림 삭제",
"notifications_delete_all_confirm": "모든 알림을 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
"notifications_delete_all_success": "모든 알림이 삭제되었습니다.",
"notifications_delete_all_failed": "전체 알림 삭제에 실패했습니다.",
"notifications_unread_only": "안 읽은 알림만",
"new_notification_received": "새 알림이 도착했습니다",
"base_layout_description": "그누보드7 관리자",
"mobile_menu": "모바일 메뉴",
"close_menu": "메뉴 닫기",
@@ -240,10 +248,6 @@
"blocked": "차단",
"withdrawn": "탈퇴"
},
"language_options": {
"ko": "한국어",
"en": "English"
},
"timezone_options": {
"Asia/Seoul": "아시아/서울 (UTC+9)",
"Asia/Tokyo": "아시아/도쿄 (UTC+9)",
@@ -362,6 +366,18 @@
"admin_menus": "관리자 메뉴",
"admin_menus_count": "{{count}}개의 메뉴가 등록됩니다.",
"no_admin_menus": "등록되는 관리자 메뉴가 없습니다.",
"dependencies": "의존성",
"required_core_version": "코어 요구 버전",
"required_modules": "의존 모듈",
"required_plugins": "의존 플러그인",
"no_required_core_version": "지정되지 않음",
"no_dependencies_required": "의존하는 확장이 없습니다.",
"dependency_required_version": "요구: {{version}}",
"dependency_installed_version": "설치: {{version}}",
"dependency_not_installed": "미설치",
"dependency_met": "충족",
"dependency_unmet_version": "버전 불일치",
"dependency_inactive": "비활성",
"permissions": "권한",
"permissions_count": "{{count}}개의 권한이 등록됩니다.",
"no_permissions": "등록되는 권한이 없습니다.",
@@ -374,6 +390,11 @@
"install_title": "모듈 설치 확인",
"install_confirm": "{{name}} 모듈을 설치하시겠습니까?",
"install_description": "설치 후 모듈을 활성화하면 기능을 사용할 수 있습니다.",
"vendor_mode_label": "Vendor 설치 방식",
"vendor_mode_hint": "Composer 사용 불가 환경에서는 '번들'을 선택하세요.",
"vendor_mode_auto": "자동 (권장)",
"vendor_mode_composer": "Composer 실행",
"vendor_mode_bundled": "번들 Vendor 사용",
"uninstall_title": "모듈 제거 확인",
"uninstall_confirm": "{{name}} 모듈을 제거하시겠습니까?",
"uninstall_warning": "이 작업은 되돌릴 수 없습니다.",
@@ -419,7 +440,16 @@
"view_changelog": "변경사항 보기",
"changelog": "변경 내역",
"no_changelog": "변경 내역 정보가 없습니다.",
"update_changelog_title": "이 업데이트의 변경사항"
"update_changelog_title": "이 업데이트의 변경사항",
"layout_strategy_title": "레이아웃 처리 방식",
"layout_strategy_overwrite": "모두 교체",
"layout_strategy_overwrite_desc": "모든 레이아웃을 새 버전으로 교체합니다.",
"layout_strategy_keep": "수정 유지",
"layout_strategy_keep_desc": "사용자가 수정한 레이아웃을 유지합니다.",
"modified_layouts_warning": "수정된 레이아웃이 {{count}}개 있습니다. '모두 교체'를 선택하면 수정 내용이 삭제됩니다.",
"no_modified_layouts": "수정된 레이아웃이 없습니다.",
"modified_layouts_list_title": "유지될 수정 레이아웃 ({{count}}개)",
"modified_layouts_keep_notice": "위 레이아웃은 업데이트 후에도 현재 내용이 유지됩니다."
},
"tabs": {
"file_upload": "파일 업로드",
@@ -511,6 +541,18 @@
"field_update_source": "업데이트 소스",
"field_license": "라이센스",
"field_status": "상태",
"dependencies": "의존성",
"required_core_version": "코어 요구 버전",
"required_modules": "의존 모듈",
"required_plugins": "의존 플러그인",
"no_required_core_version": "지정되지 않음",
"no_dependencies_required": "의존하는 확장이 없습니다.",
"dependency_required_version": "요구: {{version}}",
"dependency_installed_version": "설치: {{version}}",
"dependency_not_installed": "미설치",
"dependency_met": "충족",
"dependency_unmet_version": "버전 불일치",
"dependency_inactive": "비활성",
"permissions": "권한",
"permissions_description": "이 플러그인에서 등록하는 권한 목록입니다.",
"no_permissions": "등록되는 권한이 없습니다.",
@@ -526,6 +568,11 @@
"install_title": "플러그인 설치 확인",
"install_confirm": "{{name}} 플러그인을 설치하시겠습니까?",
"install_description": "설치 후 플러그인을 활성화하면 기능을 사용할 수 있습니다.",
"vendor_mode_label": "Vendor 설치 방식",
"vendor_mode_hint": "Composer 사용 불가 환경에서는 '번들'을 선택하세요.",
"vendor_mode_auto": "자동 (권장)",
"vendor_mode_composer": "Composer 실행",
"vendor_mode_bundled": "번들 Vendor 사용",
"uninstall_title": "플러그인 제거 확인",
"uninstall_confirm": "{{name}} 플러그인을 제거하시겠습니까?",
"uninstall_warning": "이 작업은 되돌릴 수 없습니다.",
@@ -570,7 +617,16 @@
"view_changelog": "변경사항 보기",
"changelog": "변경 내역",
"no_changelog": "변경 내역 정보가 없습니다.",
"update_changelog_title": "이 업데이트의 변경사항"
"update_changelog_title": "이 업데이트의 변경사항",
"layout_strategy_title": "레이아웃 처리 방식",
"layout_strategy_overwrite": "모두 교체",
"layout_strategy_overwrite_desc": "모든 레이아웃을 새 버전으로 교체합니다.",
"layout_strategy_keep": "수정 유지",
"layout_strategy_keep_desc": "사용자가 수정한 레이아웃을 유지합니다.",
"modified_layouts_warning": "수정된 레이아웃이 {{count}}개 있습니다. '모두 교체'를 선택하면 수정 내용이 삭제됩니다.",
"no_modified_layouts": "수정된 레이아웃이 없습니다.",
"modified_layouts_list_title": "유지될 수정 레이아웃 ({{count}}개)",
"modified_layouts_keep_notice": "위 레이아웃은 업데이트 후에도 현재 내용이 유지됩니다."
},
"tabs": {
"file_upload": "파일 업로드",
@@ -937,7 +993,7 @@
"security": "보안",
"drivers": "드라이버",
"advanced": "고급",
"mail_templates": "메일 템플릿",
"notification_definitions": "알림 설정",
"info": "정보"
},
"general": {
@@ -1165,11 +1221,20 @@
"desc": "실시간 통신을 위한 웹소켓 서버를 설정합니다.",
"enabled": "웹소켓 사용",
"enabled_desc": "Laravel Reverb를 통한 실시간 기능을 활성화합니다.",
"app_id": "앱 ID",
"app_key": "앱 키",
"app_secret": "앱 시크릿",
"host": "호스트",
"port": "포트",
"scheme": "프로토콜",
"reverb_notice": "웹소켓 사용 시 Reverb 서버를 실행해야 합니다."
"reverb_notice": "웹소켓 사용 시 Reverb 서버를 실행해야 합니다.",
"verify_ssl": "SSL 인증서 검증",
"verify_ssl_desc": "자체 서명 인증서 사용 시 비활성화하세요. 프로덕션 환경에서는 반드시 활성화해야 합니다.",
"server_endpoint_title": "서버 엔드포인트 (백엔드 → Reverb)",
"server_endpoint_desc": "백엔드가 broadcast 이벤트를 Reverb 서버에 전달할 때 사용하는 내부 주소입니다. 위 호스트/포트는 브라우저 접속용이고, 이 값은 백엔드 → Reverb 내부 통신용입니다. 비워두면 위 클라이언트 값과 동일하게 사용됩니다.",
"server_host": "서버 호스트 (내부)",
"server_port": "서버 포트 (내부)",
"server_scheme": "서버 프로토콜 (내부)"
},
"search_engine": {
"title": "검색엔진",
@@ -1215,11 +1280,25 @@
"core_update_github_url": "GitHub 저장소 URL",
"core_update_github_url_desc": "코어 업데이트를 확인할 GitHub 저장소 URL입니다. (코어 전용)",
"core_update_github_token": "GitHub 액세스 토큰",
"core_update_github_token_desc": "프라이빗 저장소의 코어 및 확장 업데이트에 사용됩니다. Fine-grained PAT 권한: Contents (Read-only). 공개 저장소는 비워둘 수 있습니다."
"core_update_github_token_desc": "프라이빗 저장소의 코어 및 확장 업데이트에 사용됩니다. Fine-grained PAT 권한: Contents (Read-only). 공개 저장소는 비워둘 수 있습니다.",
"geoip_section": "IP 기반 타임존 감지 (MaxMind GeoLite2)",
"geoip_section_desc": "로그인하지 않은 사용자의 IP 주소로부터 타임존을 자동으로 감지합니다. MaxMind 무료 라이선스 키가 필요합니다.",
"geoip_enabled": "IP 기반 타임존 감지 사용",
"geoip_enabled_desc": "토글을 켜면 라이선스 키 입력과 주기적 DB 업데이트가 활성화됩니다.",
"geoip_license_key": "MaxMind 라이선스 키",
"geoip_license_key_desc": "MaxMind 무료 계정에서 발급받은 라이선스 키를 입력하세요. https://www.maxmind.com/en/geolite2/signup 에서 무료로 발급 가능합니다.",
"geoip_auto_update_enabled": "GeoIP DB 자동 업데이트",
"geoip_auto_update_enabled_desc": "주 1회(수요일 03:00) MaxMind GeoLite2-City DB를 자동으로 재다운로드합니다.",
"geoip_last_updated_at": "마지막 업데이트",
"geoip_manual_update": "지금 업데이트",
"geoip_updating": "업데이트 중...",
"geoip_update_success": "GeoIP DB 업데이트가 완료되었습니다.",
"geoip_update_failed": "GeoIP DB 업데이트에 실패했습니다."
},
"mail_templates": {
"title": "메일 템플릿 관리",
"description": "시스템에서 발송하는 이메일의 제목과 본문을 관리합니다.",
"notification_definitions": {
"title": "알림 설정",
"description": "채널별 알림 템플릿을 관리합니다.",
"channel_management": "알림 채널 관리",
"active": "활성",
"inactive": "비활성",
"default_badge": "기본",
@@ -1235,29 +1314,72 @@
"search_type_body": "본문",
"total_count": "총 {{count}}건",
"per_page_label": "페이지당",
"empty_message": "등록된 메일 템플릿이 없습니다.",
"empty_message": "등록된 알림 설정이 없습니다.",
"empty_no_results": "검색 결과가 없습니다.",
"toggle_success": "메일 템플릿 활성 상태가 변경되었습니다.",
"reset_success": "메일 템플릿이 기본값으로 복원되었습니다.",
"save_success": "메일 템플릿이 저장되었습니다.",
"save_error": "메일 템플릿 저장에 실패했습니다.",
"toggle_success": "알림 활성 상태가 변경되었습니다.",
"reset_success": "알림 설정이 기본값으로 복원되었습니다.",
"reset_failed": "알림 설정 복원에 실패했습니다.",
"reset_modal": {
"title": "기본값으로 복원",
"confirm_message": "이 알림의 모든 채널 템플릿을 기본값으로 복원합니다.",
"warning_message": "저장된 제목/본문/수신자 설정이 모두 사라지며 복구할 수 없습니다.",
"target_label": "복원 대상:",
"btn_confirm": "복원",
"btn_confirming": "복원 중..."
},
"no_template_for_channel": "이 채널에 대한 템플릿이 없습니다.",
"body_preview": "본문 미리보기",
"save_success": "알림 설정이 저장되었습니다.",
"save_error": "알림 설정 저장에 실패했습니다.",
"types": {
"welcome": "회원가입 환영",
"reset_password": "비밀번호 재설정",
"password_changed": "비밀번호 변경 알림"
},
"channels_label": "채널:",
"edit_modal": {
"title": "메일 템플릿 편집",
"title": "알림 템플릿 편집",
"type_label": "유형:",
"subject": "제목",
"body": "본문",
"click_url": "클릭 시 이동 URL",
"click_url_hint": "알림 클릭 시 이동할 경로입니다. {변수명} 형식으로 동적 값을 사용할 수 있습니다. (예: /mypage/orders/{order_number})",
"channel_label": "채널:",
"variables_title": "사용 가능한 변수",
"btn_preview": "미리보기",
"validation_error": "입력 정보를 확인해주세요.",
"is_active_label": "활성화"
},
"recipients_label": "수신자:",
"recipients": {
"title": "수신자 설정",
"add_rule": "+ 수신자 규칙 추가",
"rule_label": "수신자 규칙 {{index}}",
"type_label": "타입",
"role_label": "역할",
"relation_label": "관계",
"users_label": "사용자",
"exclude_trigger_user": "이벤트 유발자 제외",
"types": {
"trigger_user": "이벤트 유발자",
"related_user": "관련 사용자",
"role": "역할 기반",
"specific_users": "특정 사용자"
},
"badge": {
"trigger_user": "이벤트 유발자",
"related_user": "관련 사용자 ({{relation}})",
"role": "{{role}} 역할",
"specific_users": "지정 사용자 ({{count}}명)",
"exclude_self": "(본인 제외)"
},
"no_recipients": "수신자 미설정",
"role_search_placeholder": "역할을 검색하세요",
"users_placeholder": "사용자를 검색하세요",
"users_no_options": "검색 결과가 없습니다"
},
"preview_modal": {
"title": "메일 미리보기",
"title": "알림 미리보기",
"subject_label": "제목",
"body_label": "본문"
}
@@ -1485,6 +1607,14 @@
"force_activate_description": "강제로 활성화하면 템플릿이 정상적으로 동작하지 않을 수 있습니다.",
"confirm_activate": "그래도 활성화",
"dependencies": "의존성",
"required_core_version": "코어 요구 버전",
"no_required_core_version": "지정되지 않음",
"no_dependencies_required": "의존하는 확장이 없습니다.",
"dependency_required_version": "요구: {{version}}",
"dependency_installed_version": "설치: {{version}}",
"dependency_not_installed": "미설치",
"dependency_unmet_version": "버전 불일치",
"dependency_inactive": "비활성",
"required_modules": "필수 모듈",
"required_plugins": "필수 플러그인",
"dependency_met": "충족",
@@ -1721,5 +1851,71 @@
"modal_title": "라이선스",
"license_text": "라이선스",
"view_license": "라이선스 보기"
},
"notification_log": {
"page_title": "알림 발송 이력",
"page_description": "시스템에서 발송한 알림의 이력을 확인합니다.",
"tab_all": "전체",
"extension_core": "코어",
"extension_module": "모듈",
"extension_plugin": "플러그인",
"status_sent": "성공",
"status_failed": "실패",
"status_skipped": "건너뜀",
"search_placeholder": "수신자, 제목 검색",
"total_count": "총 {{count}}건",
"col_channel": "채널",
"col_recipient": "수신자",
"col_sender": "발송자",
"col_type": "알림 타입",
"col_subject": "제목",
"col_status": "상태",
"col_sent_at": "발송일시",
"col_extension": "확장",
"system_sender": "시스템",
"empty_message": "발송 이력이 없습니다.",
"detail_title": "발송 상세",
"detail_body": "본문",
"detail_error": "에러 메시지",
"filter": {
"search_type_all": "전체",
"search_type_recipient": "수신자",
"search_type_subject": "제목",
"status_label": "상태",
"status_all": "전체",
"extension_type_label": "확장 타입",
"extension_type_all": "전체",
"search_button": "검색",
"reset_button": "초기화"
},
"sort": {
"sent_at_desc": "최신순",
"sent_at_asc": "오래된순",
"recipient_name_asc": "수신자순",
"subject_asc": "제목순"
},
"detail": {
"error_label": "에러:",
"source_label": "소스:",
"notification_type_label": "알림 타입:",
"body_label": "본문",
"no_body": "본문 내용이 없습니다."
},
"action": {
"view_member": "회원 정보 보기",
"search_by_sender": "이 발송자로 검색",
"search_by_recipient": "이 수신자로 검색"
},
"delete": {
"button": "삭제",
"selected_count": "{{count}}건 선택",
"bulk_button": "일괄 삭제",
"confirm_title": "발송 이력 삭제",
"confirm_message": "선택한 발송 이력을 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
"success": "발송 이력이 삭제되었습니다.",
"bulk_confirm_title": "일괄 삭제 확인",
"bulk_confirm_message": "선택한 발송 이력을 모두 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
"bulk_success": "선택한 발송 이력이 모두 삭제되었습니다."
}
}
}
@@ -73,8 +73,6 @@
"scope_type_self_desc": "본인이 생성한 리소스만",
"scope_type_role_desc": "같은 역할의 사용자 리소스만",
"multilingual": {
"add_language": "언어 추가",
"language_ko": "한국어",
"language_en": "English"
"add_language": "언어 추가"
}
}
@@ -0,0 +1,3 @@
{
"loading": "로딩 중..."
}
@@ -6,6 +6,14 @@
"description": "$t:admin.base_layout_description",
"is_base": true
},
"transition_overlay": {
"enabled": true,
"style": "spinner",
"target": "right_content_area",
"spinner": {
"component": "PageLoading"
}
},
"data_sources": [
{
"id": "admin_menu",
@@ -32,7 +40,24 @@
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive"
"loading_strategy": "progressive",
"params": {
"per_page": 15,
"read": "{{(_global.notificationsUnreadOnly ?? true) ? 'unread' : 'all'}}"
}
},
{
"id": "notification_unread_count",
"type": "api",
"endpoint": "/api/admin/notifications/unread-count",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"initGlobal": {
"key": "adminNotificationCount",
"path": "unread_count"
}
},
{
"id": "installed_modules",
@@ -59,6 +84,32 @@
"key": "installedPlugins",
"path": "data"
}
},
{
"id": "notification_ws",
"type": "websocket",
"channel": "core.user.notifications.{{current_user.data.uuid}}",
"event": "notification.received",
"channel_type": "private",
"target_source": "notification_unread_count",
"onReceive": [
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "toast",
"params": {
"type": "info",
"message": "{{$args[0].subject ?? '$t:admin.new_notification_received'}}",
"duration": 5000
}
}
]
}
],
"components": [
@@ -205,13 +256,211 @@
"type": "composite",
"name": "NotificationCenter",
"props": {
"notifications": "{{notifications.data.data}}",
"notifications": "{{(notifications?.data?.data ?? []).map(n => ({ id: n.id, title: n.subject ?? '', message: n.body ?? '', time: n.created_at ?? '', read: !!n.read_at, url: n.url ?? '', data: n.data ?? {} }))}}",
"unreadCount": "{{_global.adminNotificationCount ?? 0}}",
"hasMore": "{{_global.notificationsHasMore ?? notifications?.data?.pagination?.has_more_pages ?? false}}",
"loading": "{{_global.notificationsLoadingMore ?? notifications?.loading ?? false}}",
"titleText": "$t:admin.notifications",
"emptyText": "$t:admin.no_notifications"
"emptyText": "$t:admin.no_notifications",
"markAllReadText": "$t:admin.notifications_mark_all_read",
"deleteAllText": "$t:admin.notifications_delete_all",
"unreadOnlyText": "$t:admin.notifications_unread_only",
"unreadOnly": "{{_global.notificationsUnreadOnly ?? true}}",
"dropdownAlign": "left"
},
"data_binding": {
"notifications": "notifications.data.data"
}
"actions": [
{
"event": "onClose",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/read-batch",
"params": {
"method": "POST",
"body": {
"ids": "{{$args[0]}}"
}
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onNotificationClick",
"handler": "parallel",
"params": {
"actions": [
{
"handler": "navigate",
"params": { "path": "{{$args[0].url ?? '/admin/notification-logs'}}" }
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/{{$args[0].id}}/read",
"params": {
"method": "PATCH"
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onMarkAllRead",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/read-all",
"params": { "method": "POST" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onUnreadOnlyToggle",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsUnreadOnly": "{{$args[0]}}",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
}
]
}
},
{
"event": "onDelete",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/{{$args[0].id}}",
"params": { "method": "DELETE" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
},
{
"event": "onDeleteAll",
"handler": "openModal",
"target": "notification_delete_all_confirm_modal"
},
{
"event": "onLoadMore",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsLoadingMore": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications",
"params": {
"method": "GET",
"query": {
"page": "{{(_global.notificationsCurrentPage ?? notifications?.data?.pagination?.current_page ?? 1) + 1}}",
"per_page": 15
}
},
"onSuccess": [
{
"handler": "appendDataSource",
"params": {
"dataSourceId": "notifications",
"dataPath": "data.data",
"newData": "{{response.data.data ?? []}}"
}
},
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": "{{response.data.pagination.current_page}}",
"notificationsHasMore": "{{response.data.pagination.has_more_pages}}",
"notificationsLoadingMore": false
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsLoadingMore": false
}
}
]
}
]
}
}
]
}
]
}
@@ -404,13 +653,210 @@
"type": "composite",
"name": "NotificationCenter",
"props": {
"notifications": "{{notifications.data.data}}",
"notifications": "{{(notifications?.data?.data ?? []).map(n => ({ id: n.id, title: n.subject ?? '', message: n.body ?? '', time: n.created_at ?? '', read: !!n.read_at, url: n.url ?? '', data: n.data ?? {} }))}}",
"unreadCount": "{{_global.adminNotificationCount ?? 0}}",
"hasMore": "{{_global.notificationsHasMore ?? notifications?.data?.pagination?.has_more_pages ?? false}}",
"loading": "{{_global.notificationsLoadingMore ?? notifications?.loading ?? false}}",
"titleText": "$t:admin.notifications",
"emptyText": "$t:admin.no_notifications"
"emptyText": "$t:admin.no_notifications",
"markAllReadText": "$t:admin.notifications_mark_all_read",
"deleteAllText": "$t:admin.notifications_delete_all",
"unreadOnlyText": "$t:admin.notifications_unread_only",
"unreadOnly": "{{_global.notificationsUnreadOnly ?? true}}"
},
"data_binding": {
"notifications": "notifications.data.data"
}
"actions": [
{
"event": "onClose",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/read-batch",
"params": {
"method": "POST",
"body": {
"ids": "{{$args[0]}}"
}
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onNotificationClick",
"handler": "parallel",
"params": {
"actions": [
{
"handler": "navigate",
"params": { "path": "{{$args[0].url ?? '/admin/notification-logs'}}" }
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/{{$args[0].id}}/read",
"params": {
"method": "PATCH"
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onMarkAllRead",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/read-all",
"params": { "method": "POST" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
}
]
}
},
{
"event": "onUnreadOnlyToggle",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsUnreadOnly": "{{$args[0]}}",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
}
]
}
},
{
"event": "onDelete",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/{{$args[0].id}}",
"params": { "method": "DELETE" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
}
]
},
{
"event": "onDeleteAll",
"handler": "openModal",
"target": "notification_delete_all_confirm_modal"
},
{
"event": "onLoadMore",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsLoadingMore": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications",
"params": {
"method": "GET",
"query": {
"page": "{{(_global.notificationsCurrentPage ?? notifications?.data?.pagination?.current_page ?? 1) + 1}}",
"per_page": 15
}
},
"onSuccess": [
{
"handler": "appendDataSource",
"params": {
"dataSourceId": "notifications",
"dataPath": "data.data",
"newData": "{{response.data.data ?? []}}"
}
},
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": "{{response.data.pagination.current_page}}",
"notificationsHasMore": "{{response.data.pagination.has_more_pages}}",
"notificationsLoadingMore": false
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsLoadingMore": false
}
}
]
}
]
}
}
]
}
]
}
@@ -461,6 +907,9 @@
},
{
"partial": "partials/_modal_changelog.json"
},
{
"partial": "partials/_modal_notification_delete_all_confirm.json"
}
]
}
@@ -8,6 +8,11 @@
"meta": {
"title": "$t:admin.activity_log.page_title"
},
"transition_overlay": {
"wait_for": [
"activityLogs"
]
},
"state": {
"filter": {
"searchType": "all",
@@ -84,7 +89,8 @@
"created_by": "{{_local.filter.createdBy || undefined}}",
"date_from": "{{_local.filter.dateFrom || undefined}}",
"date_to": "{{_local.filter.dateTo || undefined}}"
}
},
"transition_overlay_target": "activity_log_datagrid__body"
}
}
},
@@ -231,7 +237,8 @@
"sort_by": "created_at",
"sort_order": "{{$event.target.value.split('_').pop()}}",
"page": 1
}
},
"transition_overlay_target": "activity_log_datagrid__body"
}
}
]
@@ -244,10 +251,22 @@
"className": "w-20 px-3 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm",
"value": "{{query.per_page || '20'}}",
"options": [
{ "value": "10", "label": "10" },
{ "value": "20", "label": "20" },
{ "value": "50", "label": "50" },
{ "value": "100", "label": "100" }
{
"value": "10",
"label": "10"
},
{
"value": "20",
"label": "20"
},
{
"value": "50",
"label": "50"
},
{
"value": "100",
"label": "100"
}
]
},
"actions": [
@@ -261,7 +280,8 @@
"query": {
"per_page": "{{$event.target.value}}",
"page": 1
}
},
"transition_overlay_target": "activity_log_datagrid__body"
}
}
]
@@ -448,10 +468,24 @@
],
"errorHandling": {
"403": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
}
}
@@ -610,10 +644,24 @@
],
"errorHandling": {
"403": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
}
}
@@ -10,6 +10,16 @@
"description": "$t:admin.dashboard.description",
"auth_required": true
},
"transition_overlay": {
"wait_for": [
"dashboard_stats",
"dashboard_resources",
"dashboard_activities",
"dashboard_modules",
"dashboard_plugins",
"dashboard_templates"
]
},
"data_sources": [
{
"id": "dashboard_stats",
@@ -151,7 +161,7 @@
{
"id": "dashboard_stats_ws",
"type": "websocket",
"channel": "admin.dashboard",
"channel": "core.admin.dashboard",
"event": "dashboard.stats.updated",
"channel_type": "private",
"target_source": "dashboard_stats"
@@ -159,7 +169,7 @@
{
"id": "dashboard_resources_ws",
"type": "websocket",
"channel": "admin.dashboard",
"channel": "core.admin.dashboard",
"event": "dashboard.resources.updated",
"channel_type": "private",
"target_source": "dashboard_resources"
@@ -281,7 +291,9 @@
"children": [
{
"id": "total_users_card",
"permissions": ["core.users.read"],
"permissions": [
"core.users.read"
],
"type": "basic",
"name": "Div",
"props": {
@@ -364,7 +376,9 @@
},
{
"id": "installed_modules_card",
"permissions": ["core.modules.read"],
"permissions": [
"core.modules.read"
],
"type": "basic",
"name": "Div",
"props": {
@@ -431,7 +445,9 @@
},
{
"id": "active_plugins_card",
"permissions": ["core.plugins.read"],
"permissions": [
"core.plugins.read"
],
"type": "basic",
"name": "Div",
"props": {
@@ -514,7 +530,9 @@
},
{
"id": "system_status_card",
"permissions": ["core.dashboard.system-status"],
"permissions": [
"core.dashboard.system-status"
],
"type": "basic",
"name": "Div",
"props": {
@@ -610,7 +628,9 @@
"children": [
{
"id": "system_resources_card",
"permissions": ["core.dashboard.resources"],
"permissions": [
"core.dashboard.resources"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -827,7 +847,9 @@
},
{
"id": "recent_activity_card",
"permissions": ["core.dashboard.activities"],
"permissions": [
"core.dashboard.activities"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -974,7 +996,9 @@
"children": [
{
"id": "module_status_card",
"permissions": ["core.modules.read"],
"permissions": [
"core.modules.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -1120,7 +1144,9 @@
},
{
"id": "plugin_status_card",
"permissions": ["core.plugins.read"],
"permissions": [
"core.plugins.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -1266,7 +1292,9 @@
},
{
"id": "template_status_card",
"permissions": ["core.templates.read"],
"permissions": [
"core.templates.read"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -1423,7 +1451,9 @@
{
"id": "system_alerts_card",
"if": "false",
"permissions": ["core.dashboard.alerts"],
"permissions": [
"core.dashboard.alerts"
],
"type": "basic",
"name": "Div",
"blur_until_loaded": {
@@ -29,6 +29,13 @@
"roles": []
}
},
"transition_overlay": {
"wait_for": [
"menus",
"modules",
"roles"
]
},
"data_sources": [
{
"id": "menus",
@@ -12,6 +12,11 @@
"state": {
"searchQuery": ""
},
"transition_overlay": {
"wait_for": [
"modules"
]
},
"init_actions": [
{
"handler": "setState",
@@ -718,9 +723,32 @@
"handler": "setState",
"params": {
"target": "global",
"selectedModule": "{{row}}"
"selectedModule": "{{row}}",
"moduleLayoutStrategy": "overwrite",
"hasModifiedModuleLayouts": false,
"modifiedModuleLayoutsCount": 0,
"modifiedModuleLayouts": []
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/modules/{{row.identifier}}/check-modified-layouts",
"params": {
"method": "GET"
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"hasModifiedModuleLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedModuleLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedModuleLayouts": "{{response.data?.modified_layouts ?? []}}"
}
}
]
},
{
"handler": "apiCall",
"auth_required": true,
@@ -835,13 +863,7 @@
}
},
{
"handler": "reloadRoutes"
},
{
"handler": "reloadTranslations"
},
{
"handler": "reloadModuleHandlers",
"handler": "reloadExtensions",
"params": {
"moduleInfo": "{{result}}",
"action": "{{$event.target.checked ? 'add' : 'remove'}}"
@@ -1,12 +1,12 @@
{
"version": "1.0.0",
"layout_name": "admin_mail_send_log_list",
"layout_name": "admin_notification_log_list",
"permissions": [
"core.mail-send-logs.read"
"core.notification-logs.read"
],
"extends": "_admin_base",
"meta": {
"title": "$t:admin.mail_send_log.page_title"
"title": "$t:admin.notification_log.page_title"
},
"state": {
"filter": {
@@ -16,11 +16,31 @@
"statuses": []
}
},
"transition_overlay": {
"wait_for": [
"notificationChannels",
"notificationLogs"
]
},
"data_sources": [
{
"id": "mailSendLogs",
"id": "notificationChannels",
"type": "api",
"endpoint": "/api/admin/mail-send-logs",
"endpoint": "/api/admin/notification-channels",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"loading_strategy": "progressive",
"fallback": {
"data": {
"channels": []
}
}
},
{
"id": "notificationLogs",
"type": "api",
"endpoint": "/api/admin/notification-logs",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
@@ -30,8 +50,10 @@
"per_page": "{{query.per_page || 20}}",
"search": "{{query.search}}",
"search_type": "{{query.search_type}}",
"extension_type[]": "{{query['extension_type[]']}}",
"status[]": "{{query['status[]']}}",
"channel": "{{query.channel}}",
"notification_type": "{{query.notification_type}}",
"extension_type": "{{query.extension_type}}",
"status": "{{query.status}}",
"sort_by": "{{query.sort_by || 'sent_at'}}",
"sort_order": "{{query.sort_order || 'desc'}}"
},
@@ -42,6 +64,12 @@
"target": "content"
}
}
},
"fallback": {
"data": {
"data": [],
"pagination": []
}
}
}
],
@@ -54,33 +82,35 @@
"filter": {
"searchType": "{{query.search_type || 'all'}}",
"search": "{{query.search || ''}}",
"extensionTypes": "{{query['extension_type[]'] || []}}",
"statuses": "{{query['status[]'] || []}}"
"extensionTypes": "{{query.extension_type ? [query.extension_type] : []}}",
"statuses": "{{query.status ? [query.status] : []}}"
}
}
}
}
],
"named_actions": {
"searchMailSendLogs": {
"searchNotificationLogs": {
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs",
"path": "/admin/notification-logs",
"replace": true,
"mergeQuery": true,
"query": {
"page": 1,
"search": "{{_local.filter.search || undefined}}",
"search_type": "{{_local.filter.searchType !== 'all' ? _local.filter.searchType : undefined}}",
"extension_type[]": "{{_local.filter.extensionTypes?.length > 0 ? _local.filter.extensionTypes : undefined}}",
"status[]": "{{_local.filter.statuses?.length > 0 ? _local.filter.statuses : undefined}}"
}
"extension_type": "{{_local.filter.extensionTypes?.length > 0 ? _local.filter.extensionTypes[0] : undefined}}",
"status": "{{_local.filter.statuses?.length > 0 ? _local.filter.statuses[0] : undefined}}"
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
},
"slots": {
"content": [
{
"id": "mail_send_log_list_content",
"id": "notification_log_list_content",
"type": "basic",
"name": "Div",
"props": {
@@ -105,7 +135,7 @@
"props": {
"className": "page-title"
},
"text": "$t:admin.mail_send_log.page_title"
"text": "$t:admin.notification_log.page_title"
},
{
"type": "basic",
@@ -113,7 +143,7 @@
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mt-1"
},
"text": "$t:admin.mail_send_log.page_description"
"text": "$t:admin.notification_log.page_description"
}
]
},
@@ -122,6 +152,7 @@
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "p-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"
},
"actions": [
@@ -129,7 +160,7 @@
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs",
"path": "/admin/notification-logs",
"mergeQuery": false
}
}
@@ -148,7 +179,120 @@
]
},
{
"partial": "partials/admin_mail_send_log_list/_partial_filter.json"
"id": "channel_tabs",
"type": "basic",
"name": "Div",
"props": {
"className": "border-b border-gray-200 dark:border-gray-700 mb-6"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-1 -mb-px overflow-x-auto"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "{{!query.channel ? 'px-4 py-2.5 text-sm font-medium border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400 whitespace-nowrap' : 'px-4 py-2.5 text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-b-2 border-transparent whitespace-nowrap'}}"
},
"text": "$t:admin.notification_log.tab_all",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/notification-logs",
"replace": true,
"query": []
}
}
]
},
{
"type": "basic",
"name": "Button",
"iteration": {
"source": "{{notificationChannels?.data?.channels ?? []}}",
"item_var": "ch"
},
"props": {
"type": "button",
"className": "{{query.channel === ch.id ? 'px-4 py-2.5 text-sm font-medium border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400 whitespace-nowrap' : 'px-4 py-2.5 text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-b-2 border-transparent whitespace-nowrap'}}"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{ch.icon ?? 'fas fa-bell'}}",
"className": "mr-2"
}
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-start"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "{{ch.name?.[$locale] ?? ch.name?.ko ?? ch.id}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{ch.source !== 'core'}}",
"props": {
"className": "flex items-center gap-0.5 text-[10px] text-indigo-500 dark:text-indigo-400"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fas fa-puzzle-piece",
"className": "text-[8px]"
}
},
{
"type": "basic",
"name": "Span",
"text": "{{ch.source_label?.[$locale] ?? ch.source_label?.ko ?? ch.source ?? ''}}"
}
]
}
]
}
],
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/notification-logs",
"replace": true,
"query": {
"channel": "{{ch.id}}",
"page": 1
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
]
}
]
}
]
},
{
"partial": "partials/admin_notification_log_list/_partial_filter.json"
},
{
"id": "data_table_section",
@@ -179,7 +323,7 @@
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.pagination.total|count={{mailSendLogs?.data?.pagination?.total || 0}}"
"text": "$t:admin.notification_log.total_count|count={{notificationLogs?.data?.pagination?.total || 0}}"
}
]
},
@@ -200,19 +344,19 @@
"options": [
{
"value": "sent_at_desc",
"label": "$t:admin.mail_send_log.sort.sent_at_desc"
"label": "$t:admin.notification_log.sort.sent_at_desc"
},
{
"value": "sent_at_asc",
"label": "$t:admin.mail_send_log.sort.sent_at_asc"
"label": "$t:admin.notification_log.sort.sent_at_asc"
},
{
"value": "recipient_email_asc",
"label": "$t:admin.mail_send_log.sort.recipient_email_asc"
"value": "recipient_name_asc",
"label": "$t:admin.notification_log.sort.recipient_name_asc"
},
{
"value": "subject_asc",
"label": "$t:admin.mail_send_log.sort.subject_asc"
"label": "$t:admin.notification_log.sort.subject_asc"
}
]
},
@@ -221,14 +365,15 @@
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs",
"path": "/admin/notification-logs",
"replace": true,
"mergeQuery": true,
"query": {
"sort_by": "{{$event.target.value.split('_').slice(0, -1).join('_')}}",
"sort_order": "{{$event.target.value.split('_').pop()}}",
"page": 1
}
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
]
@@ -241,10 +386,22 @@
"className": "w-20 px-3 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm",
"value": "{{query.per_page || '20'}}",
"options": [
{ "value": "10", "label": "10" },
{ "value": "20", "label": "20" },
{ "value": "50", "label": "50" },
{ "value": "100", "label": "100" }
{
"value": "10",
"label": "10"
},
{
"value": "20",
"label": "20"
},
{
"value": "50",
"label": "50"
},
{
"value": "100",
"label": "100"
}
]
},
"actions": [
@@ -252,13 +409,14 @@
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs",
"path": "/admin/notification-logs",
"replace": true,
"mergeQuery": true,
"query": {
"per_page": "{{$event.target.value}}",
"page": 1
}
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
]
@@ -281,7 +439,7 @@
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 whitespace-nowrap"
},
"text": "$t:admin.mail_send_log.delete.selected_count|count={{(_global.selectedIds_admin_mail_send_logs ?? []).length}}"
"text": "$t:admin.notification_log.delete.selected_count|count={{(_global.selectedIds_admin_notification_logs ?? []).length}}"
},
{
"type": "basic",
@@ -297,9 +455,9 @@
"props": {
"type": "button",
"className": "px-3 py-1.5 text-sm font-medium text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg hover:bg-red-100 dark:hover:bg-red-900/30 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
"disabled": "{{(_global.selectedIds_admin_mail_send_logs ?? []).length === 0 || mailSendLogs?.data?.abilities?.can_delete !== true}}"
"disabled": "{{(_global.selectedIds_admin_notification_logs ?? []).length === 0 || notificationLogs?.data?.abilities?.can_delete !== true}}"
},
"text": "$t:admin.mail_send_log.delete.bulk_button",
"text": "$t:admin.notification_log.delete.bulk_button",
"actions": [
{
"type": "click",
@@ -311,7 +469,7 @@
]
},
{
"partial": "partials/admin_mail_send_log_list/_partial_datagrid.json"
"partial": "partials/admin_notification_log_list/_partial_datagrid.json"
}
]
}
@@ -325,7 +483,7 @@
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.mail_send_log.delete.confirm_title",
"title": "$t:admin.notification_log.delete.confirm_title",
"size": "sm"
},
"children": [
@@ -342,7 +500,7 @@
"props": {
"className": "text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.mail_send_log.delete.confirm_message"
"text": "$t:admin.notification_log.delete.confirm_message"
}
]
},
@@ -387,73 +545,89 @@
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/mail-send-logs/{{_global.modal_data.id}}",
"params": {
"method": "DELETE"
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": true
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notification-logs/{{_global.modal_data.id}}",
"params": {
"method": "DELETE"
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "mailSendLogs"
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "notificationLogs"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.notification_log.delete.success"
}
},
{
"handler": "closeModal"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.mail_send_log.delete.success"
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message}}"
}
}
},
{
"handler": "closeModal"
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message}}"
}
}
],
"errorHandling": {
"403": {
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
],
"errorHandling": {
"403": {
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
}
}
}
}
]
]
}
}
],
"children": [
@@ -473,7 +647,7 @@
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.mail_send_log.delete.bulk_confirm_title",
"title": "$t:admin.notification_log.delete.bulk_confirm_title",
"size": "sm"
},
"children": [
@@ -490,7 +664,7 @@
"props": {
"className": "text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.mail_send_log.delete.bulk_confirm_message"
"text": "$t:admin.notification_log.delete.bulk_confirm_message"
}
]
},
@@ -535,77 +709,93 @@
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/mail-send-logs/bulk-delete",
"params": {
"method": "POST",
"body": {
"ids": "{{_global.selectedIds_admin_mail_send_logs ?? []}}"
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": true
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false,
"selectedIds_admin_mail_send_logs": []
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notification-logs/bulk-delete",
"params": {
"method": "POST",
"body": {
"ids": "{{_global.selectedIds_admin_notification_logs ?? []}}"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "mailSendLogs"
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false,
"selectedIds_admin_notification_logs": []
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "notificationLogs"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.notification_log.delete.bulk_success"
}
},
{
"handler": "closeModal"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.mail_send_log.delete.bulk_success"
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message}}"
}
}
},
{
"handler": "closeModal"
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message}}"
}
}
],
"errorHandling": {
"403": {
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
],
"errorHandling": {
"403": {
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeleting": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
}
}
}
}
]
]
}
}
],
"children": [
@@ -621,4 +811,4 @@
]
}
]
}
}
@@ -12,6 +12,11 @@
"state": {
"searchQuery": ""
},
"transition_overlay": {
"wait_for": [
"plugins"
]
},
"init_actions": [
{
"handler": "setState",
@@ -721,9 +726,32 @@
"handler": "setState",
"params": {
"target": "global",
"selectedPlugin": "{{row}}"
"selectedPlugin": "{{row}}",
"pluginLayoutStrategy": "overwrite",
"hasModifiedPluginLayouts": false,
"modifiedPluginLayoutsCount": 0,
"modifiedPluginLayouts": []
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/plugins/{{row.identifier}}/check-modified-layouts",
"params": {
"method": "GET"
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"hasModifiedPluginLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedPluginLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedPluginLayouts": "{{response.data?.modified_layouts ?? []}}"
}
}
]
},
{
"handler": "apiCall",
"auth_required": true,
@@ -838,13 +866,7 @@
}
},
{
"handler": "reloadRoutes"
},
{
"handler": "reloadTranslations"
},
{
"handler": "reloadPluginHandlers",
"handler": "reloadExtensions",
"params": {
"pluginInfo": "{{result}}",
"action": "{{$event.target.checked ? 'add' : 'remove'}}"
@@ -9,6 +9,18 @@
"title": "{{route?.id ? '$t:admin.roles.form.edit_title' : '$t:admin.roles.form.create_title'}}",
"description": "{{route?.id ? '$t:admin.roles.form.edit_description' : '$t:admin.roles.form.create_description'}}"
},
"state": {
"form": {
"is_active": true
}
},
"transition_overlay": {
"wait_for": [
"role_check",
"clone_source",
"permissions"
]
},
"data_sources": [
{
"id": "role",
@@ -107,11 +119,6 @@
}
}
],
"state": {
"form": {
"is_active": true
}
},
"slots": {
"content": [
{
@@ -267,7 +274,6 @@
"name": "Form",
"dataKey": "form",
"trackChanges": true,
"blur_until_loaded": "{{_global.isSaving}}",
"props": {
"id": "role_form",
"className": "mt-6 space-y-6"
@@ -301,17 +307,45 @@
},
"errorHandling": {
"403": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
},
"500": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:errors.server_error"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:errors.server_error"
}
}
]
}
}
},
@@ -12,6 +12,11 @@
"state": {
"searchQuery": ""
},
"transition_overlay": {
"wait_for": [
"roles"
]
},
"init_actions": [
{
"handler": "setState",
@@ -190,7 +195,8 @@
"query": {
"search": "{{_local.searchQuery || undefined}}",
"page": 1
}
},
"transition_overlay_target": "roles_data_grid__body"
}
}
]
@@ -446,7 +452,8 @@
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
},
"transition_overlay_target": "roles_data_grid__body"
}
},
{
@@ -13,6 +13,13 @@
"searchQuery": "",
"searchType": ""
},
"transition_overlay": {
"wait_for": [
"schedules"
],
"target": "schedules_tab_content",
"fallback_target": "right_content_area"
},
"init_actions": [
{
"handler": "setState",
@@ -69,7 +76,8 @@
"search": "{{_local.searchQuery || undefined}}",
"search_type": "{{_local.searchType || undefined}}",
"page": 1
}
},
"transition_overlay_target": "schedules_data_grid__body"
}
}
},
@@ -206,7 +214,14 @@
]
},
{
"partial": "partials/admin_schedule_list/_tab_schedules.json"
"id": "schedules_tab_content",
"type": "basic",
"name": "Div",
"children": [
{
"partial": "partials/admin_schedule_list/_tab_schedules.json"
}
]
}
]
}
@@ -12,6 +12,17 @@
"computed": {
"isReadOnly": "{{!!_global.settingsAbilities && !(_global.settingsAbilities?.can_update ?? false)}}"
},
"transition_overlay": {
"target": "settings_tab_content",
"fallback_target": "right_content_area",
"wait_for": [
"settings",
"systemInfo",
"appKey",
"notificationDefinitions",
"availableChannels"
]
},
"data_sources": [
{
"id": "settings",
@@ -62,9 +73,9 @@
}
},
{
"id": "mailTemplates",
"id": "notificationDefinitions",
"type": "api",
"endpoint": "/api/admin/mail-templates",
"endpoint": "/api/admin/notification-definitions",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
@@ -72,14 +83,26 @@
"page": "{{query.page || 1}}",
"per_page": "{{query.per_page || 20}}",
"search": "{{query.search}}",
"search_type": "{{query.search_type}}"
"search_type": "{{query.search_type}}",
"extension_identifier": "core"
},
"fallback": {
"data": {
"data": [],
"pagination": {}
"pagination": []
}
}
},
{
"id": "availableChannels",
"type": "api",
"endpoint": "/api/admin/notification-channels",
"method": "GET",
"auto_fetch": true,
"auth_required": true,
"fallback": {
"data": []
}
}
],
"slots": {
@@ -88,7 +111,6 @@
"id": "settings_content",
"type": "basic",
"name": "Div",
"blur_until_loaded": "{{_local.isSaving}}",
"dataKey": "form",
"trackChanges": true,
"props": {
@@ -108,6 +130,7 @@
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "p-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"
},
"actions": [
@@ -203,8 +226,8 @@
"label": "$t:admin.settings.tabs.advanced"
},
{
"id": "mail_templates",
"label": "$t:admin.settings.tabs.mail_templates"
"id": "notification_definitions",
"label": "$t:admin.settings.tabs.notification_definitions"
},
{
"id": "info",
@@ -219,140 +242,149 @@
"event": "onTabChange",
"type": "change",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"errors": null
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"errors": null
}
},
{
"handler": "setState",
"params": {
"target": "global",
"activeSettingsTab": "{{$args[0]}}"
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"query": {
"tab": "{{$args[0]}}"
},
"replace": true
}
}
},
{
"handler": "setState",
"params": {
"target": "global",
"activeSettingsTab": "{{$args[0]}}"
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"query": {
"tab": "{{$args[0]}}"
},
"replace": true
}
}
]
]
}
}
]
},
{
"id": "validation_error",
"id": "settings_tab_content",
"type": "basic",
"name": "Div",
"if": "{{_local.errors}}",
"props": {
"className": "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 mt-6"
},
"children": [
{
"id": "validation_error",
"type": "basic",
"name": "Div",
"if": "{{_local.errors}}",
"props": {
"className": "flex gap-3"
"className": "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 mt-6"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "triangle-exclamation",
"className": "w-5 h-5 text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
}
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-3"
},
"children": [
{
"type": "basic",
"name": "H3",
"name": "Icon",
"props": {
"className": "text-sm font-medium text-red-800 dark:text-red-200"
},
"text": "$t:admin.settings.validation_error"
"name": "triangle-exclamation",
"className": "w-5 h-5 text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
}
},
{
"type": "basic",
"name": "P",
"if": "{{typeof _local.errors === 'string'}}",
"props": {
"className": "mt-2 text-sm text-red-700 dark:text-red-300"
},
"text": "{{_local.errors}}"
},
{
"type": "basic",
"name": "Ul",
"if": "{{typeof _local.errors === 'object' && Object.keys(_local.errors).length > 0}}",
"props": {
"className": "mt-2 list-disc list-inside space-y-1"
},
"iteration": {
"source": "Object.entries(_local.errors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
"item_var": "message"
},
"name": "Div",
"children": [
{
"type": "basic",
"name": "Li",
"name": "H3",
"props": {
"className": "text-sm text-red-700 dark:text-red-300"
"className": "text-sm font-medium text-red-800 dark:text-red-200"
},
"text": "{{message}}"
"text": "$t:admin.settings.validation_error"
},
{
"type": "basic",
"name": "P",
"if": "{{typeof _local.errors === 'string'}}",
"props": {
"className": "mt-2 text-sm text-red-700 dark:text-red-300"
},
"text": "{{_local.errors}}"
},
{
"type": "basic",
"name": "Ul",
"if": "{{typeof _local.errors === 'object' && Object.keys(_local.errors).length > 0}}",
"props": {
"className": "mt-2 list-disc list-inside space-y-1"
},
"iteration": {
"source": "Object.entries(_local.errors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
"item_var": "message"
},
"children": [
{
"type": "basic",
"name": "Li",
"props": {
"className": "text-sm text-red-700 dark:text-red-300"
},
"text": "{{message}}"
}
]
}
]
}
]
}
]
},
{
"partial": "partials/admin_settings/_tab_general.json"
},
{
"partial": "partials/admin_settings/_tab_mail.json"
},
{
"partial": "partials/admin_settings/_tab_upload.json"
},
{
"partial": "partials/admin_settings/_tab_seo.json"
},
{
"partial": "partials/admin_settings/_tab_security.json"
},
{
"partial": "partials/admin_settings/_tab_drivers.json"
},
{
"partial": "partials/admin_settings/_tab_advanced.json"
},
{
"partial": "partials/admin_settings/_tab_notification_definitions.json"
},
{
"partial": "partials/admin_settings/_tab_info.json"
}
]
},
{
"partial": "partials/admin_settings/_tab_general.json"
},
{
"partial": "partials/admin_settings/_tab_mail.json"
},
{
"partial": "partials/admin_settings/_tab_upload.json"
},
{
"partial": "partials/admin_settings/_tab_seo.json"
},
{
"partial": "partials/admin_settings/_tab_security.json"
},
{
"partial": "partials/admin_settings/_tab_drivers.json"
},
{
"partial": "partials/admin_settings/_tab_advanced.json"
},
{
"partial": "partials/admin_settings/_tab_mail_templates.json"
},
{
"partial": "partials/admin_settings/_tab_info.json"
},
{
"id": "footer_buttons",
"type": "basic",
"name": "Div",
"if": "{{!_computed.isReadOnly && (_global.activeSettingsTab || query.tab || 'general') !== 'info' && (_global.activeSettingsTab || query.tab || 'general') !== 'mail_templates'}}",
"if": "{{!_computed.isReadOnly && (_global.activeSettingsTab || query.tab || 'general') !== 'info'}}",
"props": {
"className": "flex justify-end gap-3 mt-6"
},
@@ -393,79 +425,81 @@
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "emitEvent",
"params": {
"event": "upload:site_logo"
}
},
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": true,
"errors": null
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/settings",
"params": {
"method": "POST",
"body": "{{(function() { const tab = _global.activeSettingsTab || query.tab || 'general'; const form = _local.form || {}; return { _tab: tab, [tab]: form[tab] || {} }; })()}}"
"params": {
"actions": [
{
"handler": "emitEvent",
"params": {
"event": "upload:site_logo"
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": false,
"hasChanges": false
}
},
{
"handler": "setState",
"params": {
"target": "global",
"settings": "{{result.data.settings}}",
"uploadSettings": "{{result.data.settings.upload}}"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.settings.save_success"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "settings"
}
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": true,
"errors": null
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": false,
"errors": "{{error.errors}}"
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/settings",
"params": {
"method": "POST",
"body": "{{(function() { const tab = _global.activeSettingsTab || query.tab || 'general'; const form = _local.form || {}; if (tab === 'notification_definitions') { return { _tab: 'notifications', notifications: { channels: form.notifications?.channels || [] } }; } return { _tab: tab, [tab]: form[tab] || {} }; })()}}"
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:admin.settings.save_error"
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": false,
"hasChanges": false
}
},
{
"handler": "setState",
"params": {
"target": "global",
"settings": "{{result.data.settings}}",
"uploadSettings": "{{result.data.settings.upload}}"
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.settings.save_success"
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "settings"
}
}
}
]
}
]
],
"onError": [
{
"handler": "setState",
"params": {
"target": "local",
"isSaving": false,
"errors": "{{error.errors}}"
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:admin.settings.save_error"
}
}
]
}
]
}
}
],
"children": [
@@ -506,10 +540,13 @@
"partial": "partials/admin_settings/_modal_cache_delete.json"
},
{
"partial": "partials/admin_settings/_modal_mail_template_form.json"
"partial": "partials/admin_settings/_modal_notification_template_form.json"
},
{
"partial": "partials/admin_settings/_modal_mail_template_preview.json"
"partial": "partials/admin_settings/_modal_notification_template_preview.json"
},
{
"partial": "partials/admin_settings/_modal_notification_definition_reset.json"
},
{
"partial": "partials/admin_settings/_modal_core_update_result.json"
@@ -523,12 +560,13 @@
],
"initLocal": {
"driverTestResults": [],
"activeNotificationChannel": null,
"editingDefinition": null,
"editingTemplate": null,
"editLang": "ko",
"previewData": null,
"isSaving": false,
"templateErrors": null,
"expandedMailTemplateIds": [],
"checkingCoreUpdate": false,
"coreUpdateInfo": null,
"coreChangelog": null,
@@ -539,7 +577,7 @@
"handler": "setState",
"params": {
"target": "local",
"mailTemplateFilter": {
"notificationDefinitionFilter": {
"search": "{{query.search || ''}}",
"searchType": "{{query.search_type || 'all'}}"
}
@@ -9,6 +9,13 @@
"title": "$t:admin.templates.layout_edit.title",
"description": "$t:admin.templates.layout_edit.description"
},
"transition_overlay": {
"wait_for": [
"template_info",
"current_layout",
"layout_versions"
]
},
"data_sources": [
{
"id": "template_info",
@@ -281,7 +288,6 @@
"id": "mobile_file_selector",
"type": "basic",
"name": "Div",
"blur_until_loaded": "{{_global.isSaving}}",
"props": {
"className": "hidden"
},
@@ -436,7 +442,6 @@
"id": "main_grid",
"type": "basic",
"name": "Div",
"blur_until_loaded": "{{_global.isSaving}}",
"props": {
"className": "mt-6 flex flex-row gap-6"
},
@@ -12,6 +12,13 @@
"state": {
"searchQuery": ""
},
"transition_overlay": {
"wait_for": [
"templates"
],
"target": "templates_tab_content",
"fallback_target": "right_content_area"
},
"init_actions": [
{
"handler": "setState",
@@ -358,10 +365,17 @@
]
},
{
"partial": "partials/admin_template_list/_tab_admin.json"
},
{
"partial": "partials/admin_template_list/_tab_user.json"
"id": "templates_tab_content",
"type": "basic",
"name": "Div",
"children": [
{
"partial": "partials/admin_template_list/_tab_admin.json"
},
{
"partial": "partials/admin_template_list/_tab_user.json"
}
]
}
]
}
@@ -9,6 +9,14 @@
"title": "$t:admin.users.detail.page_title",
"description": "$t:admin.users.detail.page_description"
},
"state": {
"activeTab": "basic_info"
},
"transition_overlay": {
"wait_for": [
"user"
]
},
"data_sources": [
{
"id": "user",
@@ -20,11 +28,18 @@
}
],
"errorHandling": {
"403": { "handler": "showErrorPage", "params": { "target": "content" } },
"404": { "handler": "showErrorPage", "params": { "target": "content" } }
},
"state": {
"activeTab": "basic_info"
"403": {
"handler": "showErrorPage",
"params": {
"target": "content"
}
},
"404": {
"handler": "showErrorPage",
"params": {
"target": "content"
}
}
},
"slots": {
"content": [
@@ -32,7 +47,6 @@
"id": "user_detail_content",
"type": "basic",
"name": "Div",
"blur_until_loaded": true,
"props": {
"className": "p-6 bg-gray-50 dark:bg-gray-900 min-h-screen"
},
@@ -57,78 +71,78 @@
"id": "page_header",
"type": "composite",
"name": "PageHeader",
"props": {
"title": "$t:admin.users.detail.page_title",
"description": "$t:admin.users.detail.page_description_with_info|name={{user?.data?.name ?? ''}}|email={{user?.data?.email ?? ''}}",
"backLink": "/admin/users",
"backLinkText": "$t:admin.users.detail.back_to_list"
},
"children": [
{
"id": "header_back_button",
"type": "basic",
"name": "Button",
"props": {
"className": "flex items-center gap-2 px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 font-medium transition-colors"
"title": "$t:admin.users.detail.page_title",
"description": "$t:admin.users.detail.page_description_with_info|name={{user?.data?.name ?? ''}}|email={{user?.data?.email ?? ''}}",
"backLink": "/admin/users",
"backLinkText": "$t:admin.users.detail.back_to_list"
},
"actions": [
{
"type": "click",
"handler": "navigateBack"
}
],
"children": [
{
"id": "header_back_button",
"type": "basic",
"name": "Icon",
"name": "Button",
"props": {
"name": "arrow-left",
"className": "w-4 h-4"
}
"className": "flex items-center gap-2 px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 font-medium transition-colors"
},
"actions": [
{
"type": "click",
"handler": "navigateBack"
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "arrow-left",
"className": "w-4 h-4"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:common.back"
}
]
},
{
"id": "header_edit_button",
"type": "basic",
"name": "Span",
"text": "$t:common.back"
}
]
},
{
"id": "header_edit_button",
"type": "basic",
"name": "Button",
"props": {
"disabled": "{{user?.data?.abilities?.can_update !== true}}",
"className": "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/users/{{route?.id}}/edit"
}
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"name": "Button",
"props": {
"name": "pencil",
"className": "w-4 h-4"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:admin.users.detail.edit"
"disabled": "{{user?.data?.abilities?.can_update !== true}}",
"className": "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/users/{{route?.id}}/edit"
}
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "pencil",
"className": "w-4 h-4"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:admin.users.detail.edit"
}
]
}
]
}
]
}
]
},
{
"id": "user_detail_tabs",
@@ -2,13 +2,25 @@
"version": "1.0.0",
"layout_name": "admin_user_form",
"permissions": {
"or": ["core.users.create", "core.users.update"]
"or": [
"core.users.create",
"core.users.update"
]
},
"extends": "_admin_base",
"meta": {
"title": "{{route?.id ? '$t:admin.users.form.page_title_edit' : '$t:admin.users.form.page_title_create'}}",
"description": "{{route?.id ? '$t:admin.users.form.page_description_edit' : '$t:admin.users.form.page_description_create'}}"
},
"state": {
"activeTab": "basic_info"
},
"transition_overlay": {
"wait_for": [
"user",
"roles"
]
},
"data_sources": [
{
"id": "user",
@@ -271,16 +283,12 @@
}
]
},
"state": {
"activeTab": "basic_info"
},
"slots": {
"content": [
{
"id": "user_form_content",
"type": "basic",
"name": "Div",
"blur_until_loaded": true,
"dataKey": "form",
"props": {
"className": "p-6 bg-gray-50 dark:bg-gray-900 min-h-screen"
@@ -310,151 +318,179 @@
"title": "{{route?.id ? '$t:admin.users.form.page_title_edit' : '$t:admin.users.form.page_title_create'}}",
"description": "{{route?.id ? '$t:admin.users.form.page_description_edit|name=' + (user?.data?.name ?? '') + '|email=' + (user?.data?.email ?? '') : '$t:admin.users.form.page_description_create'}}"
},
"children": [
{
"id": "header_cancel_button",
"type": "basic",
"name": "Button",
"props": {
"className": "px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 font-medium transition-colors"
},
"actions": [
{
"type": "click",
"handler": "navigateBack"
}
],
"children": [
{
"id": "header_cancel_button",
"type": "basic",
"name": "Span",
"text": "$t:common.cancel"
}
]
},
{
"id": "header_save_button",
"type": "basic",
"name": "Button",
"props": {
"disabled": "{{_global.isSaving}}",
"className": "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"actions": [
{
"type": "click",
"handler": "sequence",
"name": "Button",
"props": {
"className": "px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 font-medium transition-colors"
},
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": true
}
},
"type": "click",
"handler": "navigateBack"
}
],
"children": [
{
"handler": "apiCall",
"auth_required": true,
"target": "{{route?.id ? '/api/admin/users/' + route?.id : '/api/admin/users'}}",
"params": {
"method": "{{route?.id ? 'PUT' : 'POST'}}",
"body": "{{_local.form}}"
},
"errorHandling": {
"403": {
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
},
"500": {
"handler": "toast",
"params": {
"type": "error",
"message": "$t:errors.server_error"
}
}
},
"onSuccess": [
"type": "basic",
"name": "Span",
"text": "$t:common.cancel"
}
]
},
{
"id": "header_save_button",
"type": "basic",
"name": "Button",
"props": {
"disabled": "{{_global.isSaving}}",
"className": "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
"isSaving": true
}
},
{
"handler": "toast",
"handler": "apiCall",
"auth_required": true,
"target": "{{route?.id ? '/api/admin/users/' + route?.id : '/api/admin/users'}}",
"params": {
"type": "success",
"message": "{{route?.id ? '$t:admin.users.form.update_success' : '$t:admin.users.form.create_success'}}"
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/users"
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "setState",
"params": {
"target": "local",
"errors": "{{error.errors ?? null}}"
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:admin.users.form.validation_error"
}
"method": "{{route?.id ? 'PUT' : 'POST'}}",
"body": "{{_local.form}}"
},
"errorHandling": {
"403": {
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
},
"500": {
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:errors.server_error"
}
}
]
}
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "{{route?.id ? '$t:admin.users.form.update_success' : '$t:admin.users.form.create_success'}}"
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/users"
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "setState",
"params": {
"target": "local",
"errors": "{{error.errors ?? null}}"
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:admin.users.form.validation_error"
}
}
]
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{!_global.isSaving}}",
"props": {
"name": "save",
"size": "sm"
}
},
{
"type": "basic",
"name": "Icon",
"if": "{{_global.isSaving}}",
"props": {
"name": "spinner",
"size": "sm",
"spin": true
}
},
{
"type": "basic",
"name": "Span",
"text": "{{_global.isSaving ? $t:common.saving : $t:common.save}}"
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{!_global.isSaving}}",
"props": {
"name": "save",
"size": "sm"
}
},
{
"type": "basic",
"name": "Icon",
"if": "{{_global.isSaving}}",
"props": {
"name": "spinner",
"size": "sm",
"spin": true
}
},
{
"type": "basic",
"name": "Span",
"text": "{{_global.isSaving ? $t:common.saving : $t:common.save}}"
}
]
}
]
}
]
},
{
"id": "user_form_tabs",
@@ -1215,7 +1251,10 @@
"type": "extension_point",
"name": "address_search_slot",
"props": {
"readOnlyFields": ["zipcode", "address"],
"readOnlyFields": [
"zipcode",
"address"
],
"targetFields": {
"zipcode": "form.zipcode",
"address": "form.address",
@@ -1309,17 +1348,8 @@
"props": {
"name": "language",
"className": "w-full",
"defaultValue": "ko",
"options": [
{
"label": "$t:admin.users.form.language_options.ko",
"value": "ko"
},
{
"label": "$t:admin.users.form.language_options.en",
"value": "en"
}
]
"defaultValue": "{{$locale}}",
"options": "{{($locales ?? []).map(l => ({ value: l, label: _global.appConfig?.localeNames?.[l] ?? l }))}}"
}
}
]
@@ -1344,7 +1374,9 @@
"name": "timezone",
"className": "w-full",
"defaultValue": "Asia/Seoul",
"options": "{{_global.appConfig?.supportedTimezones?.map(tz => ({ value: tz, label: $t('admin.users.form.timezone_options.' + tz) })) ?? []}}"
"options": "{{_global.appConfig?.supportedTimezones ?? []}}",
"searchable": true,
"searchPlaceholder": "{{$t('common.search')}}"
}
}
]
@@ -1662,17 +1694,45 @@
},
"errorHandling": {
"403": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:auth.permission_denied"
}
}
]
}
},
"500": {
"handler": "toast",
"handler": "sequence",
"params": {
"type": "error",
"message": "$t:errors.server_error"
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isSaving": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "$t:errors.server_error"
}
}
]
}
}
},
@@ -13,6 +13,11 @@
"searchField": "all",
"searchQuery": ""
},
"transition_overlay": {
"wait_for": [
"users"
]
},
"init_actions": [
{
"handler": "setState",
@@ -770,7 +775,8 @@
"sort_by": "{{$event.target.value.split('_').slice(0, -1).join('_')}}",
"sort_order": "{{$event.target.value.split('_').pop()}}",
"page": 1
}
},
"transition_overlay_target": "users_data_grid__body"
}
}
]
@@ -811,7 +817,8 @@
"query": {
"per_page": "{{$event.target.value}}",
"page": 1
}
},
"transition_overlay_target": "users_data_grid__body"
}
}
]
@@ -1040,7 +1047,8 @@
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
},
"transition_overlay_target": "users_data_grid__body"
}
},
{
@@ -0,0 +1,142 @@
{
"meta": {
"is_partial": true,
"description": "알림 전체 삭제 확인 모달"
},
"id": "notification_delete_all_confirm_modal",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.notifications_delete_all_title",
"size": "small"
},
"children": [
{
"type": "basic",
"name": "P",
"props": {
"className": "text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.notifications_delete_all_confirm"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-end gap-3 mt-6"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{_global.isDeletingAllNotifications}}",
"type": "button"
},
"actions": [
{
"type": "click",
"handler": "closeModal",
"target": "notification_delete_all_confirm_modal"
}
],
"text": "$t:common.cancel"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "flex items-center gap-2 px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{_global.isDeletingAllNotifications}}",
"type": "button"
},
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeletingAllNotifications": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notifications/all",
"params": { "method": "DELETE" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeletingAllNotifications": false,
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.notifications_delete_all_success"
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
},
{
"handler": "closeModal",
"target": "notification_delete_all_confirm_modal"
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isDeletingAllNotifications": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message ?? $t:admin.notifications_delete_all_failed}}"
}
}
]
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{_global.isDeletingAllNotifications}}",
"props": {
"name": "spinner",
"className": "w-4 h-4 animate-spin"
}
},
{
"type": "basic",
"name": "Span",
"text": "{{_global.isDeletingAllNotifications ? $t:common.deleting : $t:common.delete}}"
}
]
}
]
}
]
}
@@ -362,7 +362,9 @@
{
"type": "basic",
"name": "Span",
"props": { "className": "text-gray-500 dark:text-gray-400" },
"props": {
"className": "text-gray-500 dark:text-gray-400"
},
"text": "-",
"if": "{{!row.user}}"
},
@@ -405,18 +407,24 @@
{
"type": "basic",
"name": "Div",
"props": { "className": "min-w-0 flex-1" },
"props": {
"className": "min-w-0 flex-1"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": { "className": "font-medium text-gray-900 dark:text-gray-100 truncate block" },
"props": {
"className": "font-medium text-gray-900 dark:text-gray-100 truncate block"
},
"text": "{{row.user.name}}"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-xs text-gray-500 dark:text-gray-400 truncate block" },
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400 truncate block"
},
"text": "({{row.user.email}})",
"if": "{{!!row.user.email}}"
}
@@ -433,7 +441,9 @@
"cases": {
"view_member": {
"handler": "openWindow",
"params": { "path": "/admin/users/{{row.user.uuid}}" }
"params": {
"path": "/admin/users/{{row.user.uuid}}"
}
},
"search_by_actor": {
"handler": "sequence",
@@ -454,7 +464,8 @@
"query": {
"created_by": "{{row.user.uuid}}",
"page": 1
}
},
"transition_overlay_target": "activity_log_datagrid__body"
}
}
]
@@ -508,7 +519,8 @@
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
},
"transition_overlay_target": "activity_log_datagrid__body"
}
},
{
@@ -1,326 +0,0 @@
{
"meta": {
"is_partial": true,
"description": "Mail Send Log List DataGrid"
},
"id": "mail_send_log_datagrid",
"type": "composite",
"name": "DataGrid",
"props": {
"data": "{{mailSendLogs?.data?.data}}",
"pagination": true,
"serverSidePagination": true,
"serverCurrentPage": "{{mailSendLogs?.data?.pagination?.current_page ?? 1}}",
"serverTotalPages": "{{mailSendLogs?.data?.pagination?.last_page ?? 1}}",
"pageSize": "{{+(query.per_page || 20)}}",
"alwaysShowPagination": true,
"idField": "id",
"selectable": "{{mailSendLogs?.data?.abilities?.can_delete === true}}",
"selectedIds": "{{_global.selectedIds_admin_mail_send_logs || []}}",
"loading": "{{mailSendLogs?.loading}}",
"expandable": true,
"expandChildren": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "p-4 bg-gray-50 dark:bg-gray-900 space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"if": "{{row.error_message}}",
"props": {
"className": "flex items-start gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-red-600 dark:text-red-400 shrink-0"
},
"text": "$t:admin.mail_send_log.detail.error_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-red-500 dark:text-red-300"
},
"text": "{{row.error_message}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 shrink-0"
},
"text": "$t:admin.mail_send_log.detail.source_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "{{row.source ?? '-'}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.mail_send_log.detail.body_label"
},
{
"type": "composite",
"name": "HtmlContent",
"if": "{{row.body}}",
"props": {
"content": "{{row.body}}",
"isHtml": true,
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 max-h-64 overflow-y-auto text-sm"
}
},
{
"type": "basic",
"name": "Span",
"if": "{{!row.body}}",
"props": {
"className": "text-sm text-gray-400 dark:text-gray-500 italic"
},
"text": "$t:admin.mail_send_log.detail.no_body"
}
]
}
]
}
],
"rowActions": [
{
"id": "delete",
"label": "$t:admin.mail_send_log.delete.button",
"iconName": "trash",
"variant": "danger",
"disabledField": "abilities.can_delete"
}
],
"actionsColumnHeader": "$t:common.actions",
"columns": [
{
"field": "sender",
"header": "$t:admin.mail_send_log.table.column.sender",
"width": "180px",
"cellChildren": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{row.sender_email ?? '-'}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{row.sender_name}}",
"props": {
"className": "block text-xs text-gray-500 dark:text-gray-400"
},
"text": "{{row.sender_name}}"
}
]
}
]
},
{
"field": "recipient",
"header": "$t:admin.mail_send_log.table.column.recipient",
"width": "200px",
"cellChildren": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{row.recipient_email}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{row.recipient_name}}",
"props": {
"className": "block text-xs text-gray-500 dark:text-gray-400"
},
"text": "{{row.recipient_name}}"
}
]
}
]
},
{
"field": "subject",
"header": "$t:admin.mail_send_log.table.column.subject",
"width": "250px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300 line-clamp-1"
},
"text": "{{row.subject ?? '-'}}"
}
]
},
{
"field": "template_type",
"header": "$t:admin.mail_send_log.table.column.template_type",
"width": "120px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300"
},
"text": "{{row.template_type ?? '-'}}"
}
]
},
{
"field": "extension_type",
"header": "$t:admin.mail_send_log.table.column.extension_type",
"width": "100px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300"
},
"text": "{{row.extension_type ?? '-'}}"
}
]
},
{
"field": "extension_identifier",
"header": "$t:admin.mail_send_log.table.column.extension_identifier",
"width": "140px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300"
},
"text": "{{row.extension_identifier ?? '-'}}"
}
]
},
{
"field": "status",
"header": "$t:admin.mail_send_log.table.column.status",
"sortable": true,
"width": "100px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "{{row.status === 'sent' ? 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300' : row.status === 'failed' ? 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300' : 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300'}}"
},
"text": "{{row.status === 'sent' ? '$t:admin.mail_send_log.status.sent' : row.status === 'failed' ? '$t:admin.mail_send_log.status.failed' : '$t:admin.mail_send_log.status.skipped'}}"
}
]
},
{
"field": "sent_at",
"header": "$t:admin.mail_send_log.table.column.sent_at",
"sortable": true,
"width": "160px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "{{row.sent_at ?? '-'}}"
}
]
}
]
},
"actions": [
{
"event": "onPageChange",
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs",
"replace": true,
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
}
},
{
"event": "onSelectionChange",
"type": "action",
"handler": "setState",
"params": {
"target": "global",
"selectedIds_admin_mail_send_logs": "{{$args[0]}}"
}
},
{
"event": "onRowAction",
"type": "action",
"handler": "switch",
"cases": {
"delete": {
"handler": "setState",
"params": {
"target": "global",
"modal_data": "{{$args[1]}}"
},
"onSuccess": [
{
"handler": "openModal",
"target": "delete_confirm_modal"
}
]
}
}
}
]
}
@@ -183,7 +183,6 @@
},
{
"id": "menu_form",
"blur_until_loaded": "{{_global.isSaving}}",
"type": "basic",
"name": "Form",
"dataKey": "_global.formData",
@@ -247,6 +247,193 @@
}
]
},
{
"id": "dependencies_section",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 mb-3"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "link",
"className": "w-5 h-5 text-gray-500"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.modules.modals.dependencies"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.modules.modals.required_core_version"
},
{
"type": "basic",
"name": "Span",
"if": "{{_global.selectedModule.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 rounded font-mono"
},
"text": "{{_global.selectedModule.requires_core}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{!_global.selectedModule.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded"
},
"text": "$t:admin.modules.modals.no_required_core_version"
}
]
},
{
"type": "basic",
"name": "P",
"if": "{{!_global.selectedModule.dependencies || _global.selectedModule.dependencies.length === 0}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.modules.modals.no_dependencies_required"
},
{
"type": "basic",
"name": "Div",
"if": "{{_global.selectedModule.dependencies && _global.selectedModule.dependencies.length > 0}}",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "_global.selectedModule.dependencies",
"item_var": "dep"
},
"props": {
"className": "flex flex-wrap items-center gap-2 p-2 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{dep.type === 'module'}}",
"props": {
"name": "cube",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Icon",
"if": "{{dep.type === 'plugin'}}",
"props": {
"name": "puzzle-piece",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{dep.name}} ({{dep.identifier}})"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded font-mono"
},
"text": "$t:admin.modules.modals.dependency_required_version|version={{dep.required_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{dep.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded font-mono"
},
"text": "$t:admin.modules.modals.dependency_installed_version|version={{dep.installed_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{dep.is_met}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded"
},
"text": "$t:admin.modules.modals.dependency_met"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && !dep.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded"
},
"text": "$t:admin.modules.modals.dependency_not_installed"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && dep.installed_version && !dep.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-700 dark:text-yellow-300 rounded"
},
"text": "$t:admin.modules.modals.dependency_inactive"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && dep.installed_version && dep.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300 rounded"
},
"text": "$t:admin.modules.modals.dependency_unmet_version"
}
]
}
]
}
]
}
]
},
{
"id": "admin_menus_section",
"type": "basic",
@@ -308,10 +308,11 @@
}
},
{
"handler": "reloadRoutes"
},
{
"handler": "reloadTranslations"
"handler": "reloadExtensions",
"params": {
"moduleInfo": "{{result}}",
"action": "add"
}
}
]
},
@@ -352,10 +352,11 @@
}
},
{
"handler": "reloadRoutes"
},
{
"handler": "reloadTranslations"
"handler": "reloadExtensions",
"params": {
"moduleInfo": "{{result}}",
"action": "remove"
}
}
]
},
@@ -36,6 +36,54 @@
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.modules.modals.vendor_mode_label"
},
{
"type": "basic",
"name": "Select",
"props": {
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white",
"value": "{{_global.moduleInstallVendorMode ?? 'auto'}}",
"options": [
{ "value": "auto", "label": "$t:admin.modules.modals.vendor_mode_auto" },
{ "value": "composer", "label": "$t:admin.modules.modals.vendor_mode_composer" },
{ "value": "bundled", "label": "$t:admin.modules.modals.vendor_mode_bundled" }
]
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"moduleInstallVendorMode": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "P",
"props": {
"className": "mt-1 text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.modules.modals.vendor_mode_hint"
}
]
},
{
"type": "basic",
"name": "Div",
@@ -90,7 +138,8 @@
"params": {
"method": "POST",
"body": {
"module_name": "{{_global.selectedModule.identifier}}"
"module_name": "{{_global.selectedModule.identifier}}",
"vendor_mode": "{{_global.moduleInstallVendorMode ?? 'auto'}}"
}
},
"onSuccess": [
@@ -127,6 +176,9 @@
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -455,6 +455,9 @@
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -651,6 +651,13 @@
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions",
"params": {
"moduleInfo": "{{result}}",
"action": "remove"
}
},
{
"handler": "closeModal"
}
@@ -295,6 +295,240 @@
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4 p-3 bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.modules.modals.layout_strategy_title"
},
{
"type": "basic",
"name": "Div",
"if": "{{_global.hasModifiedModuleLayouts}}",
"props": {
"className": "mb-2 p-2 bg-amber-50 dark:bg-amber-900/30 border border-amber-200 dark:border-amber-700 rounded text-xs text-amber-700 dark:text-amber-400"
},
"text": "$t:admin.modules.modals.modified_layouts_warning|count={{_global.modifiedModuleLayoutsCount ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"if": "{{!_global.hasModifiedModuleLayouts}}",
"props": {
"className": "mb-2 p-2 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 rounded text-xs text-green-700 dark:text-green-400"
},
"text": "$t:admin.modules.modals.no_modified_layouts"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "flex items-start gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "radio",
"name": "module_layout_strategy",
"value": "overwrite",
"checked": "{{(_global.moduleLayoutStrategy ?? 'overwrite') === 'overwrite'}}",
"className": "mt-0.5"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"moduleLayoutStrategy": "overwrite"
}
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.modules.modals.layout_strategy_overwrite"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.modules.modals.layout_strategy_overwrite_desc"
}
]
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "flex items-start gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "radio",
"name": "module_layout_strategy",
"value": "keep",
"checked": "{{(_global.moduleLayoutStrategy ?? 'overwrite') === 'keep'}}",
"className": "mt-0.5"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"moduleLayoutStrategy": "keep"
}
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.modules.modals.layout_strategy_keep"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.modules.modals.layout_strategy_keep_desc"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{(_global.moduleLayoutStrategy ?? 'overwrite') === 'keep' && _global.modifiedModuleLayouts && _global.modifiedModuleLayouts.length > 0}}",
"props": {
"className": "ml-6 mt-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-xs font-medium text-amber-700 dark:text-amber-300 mb-2"
},
"text": "$t:admin.modules.modals.modified_layouts_list_title|count={{_global.modifiedModuleLayouts?.length ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-1 max-h-40 overflow-y-auto"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "_global.modifiedModuleLayouts",
"item_var": "modLayout"
},
"props": {
"className": "flex items-center gap-3 text-xs px-2 py-1.5 bg-white dark:bg-gray-800 rounded"
},
"children": [
{
"type": "composite",
"name": "Icon",
"props": {
"name": "file-alt",
"className": "text-amber-500 shrink-0"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-mono flex-1 text-gray-700 dark:text-gray-300"
},
"text": "{{modLayout.name}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-gray-400 dark:text-gray-500 shrink-0"
},
"text": "{{modLayout.updated_at}}"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-2 text-xs text-amber-600 dark:text-amber-400 flex items-center gap-1"
},
"children": [
{
"type": "composite",
"name": "Icon",
"props": {
"name": "info-circle",
"size": "xs"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:admin.modules.modals.modified_layouts_keep_notice"
}
]
}
]
}
]
}
]
}
]
},
@@ -353,7 +587,10 @@
"auth_required": true,
"target": "/api/admin/modules/{{_global.selectedModule.identifier}}/update",
"params": {
"method": "POST"
"method": "POST",
"body": {
"layout_strategy": "{{_global.moduleLayoutStrategy ?? 'overwrite'}}"
}
},
"onSuccess": [
{
@@ -367,7 +604,11 @@
"handler": "setState",
"params": {
"target": "global",
"selectedModule": null
"selectedModule": null,
"moduleLayoutStrategy": "overwrite",
"hasModifiedModuleLayouts": false,
"modifiedModuleLayoutsCount": 0,
"modifiedModuleLayouts": []
}
},
{
@@ -0,0 +1,259 @@
{
"meta": {
"is_partial": true,
"description": "알림 발송 이력 상세 모달"
},
"id": "modal_notification_log_detail",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.notification_log.detail_title",
"size": "lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-2 gap-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_channel"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-900 dark:text-white"
},
"text": "{{$parent._local.selectedLog?.channel ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_status"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "{{($parent._local.selectedLog?.status === 'sent') ? 'text-sm text-green-600 dark:text-green-400 font-medium' : ($parent._local.selectedLog?.status === 'failed') ? 'text-sm text-red-600 dark:text-red-400 font-medium' : 'text-sm text-gray-500 dark:text-gray-400 font-medium'}}"
},
"text": "{{$parent._local.selectedLog?.status ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_type"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-mono text-gray-900 dark:text-white"
},
"text": "{{$parent._local.selectedLog?.notification_type ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_sent_at"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-900 dark:text-white"
},
"text": "{{$parent._local.selectedLog?.sent_at ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_recipient"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-900 dark:text-white"
},
"text": "{{($parent._local.selectedLog?.recipient_name ?? '') + ' (' + ($parent._local.selectedLog?.recipient_identifier ?? '') + ')'}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_extension"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-900 dark:text-white"
},
"text": "{{$parent._local.selectedLog?.extension_identifier ?? ''}}"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{$parent._local.selectedLog?.subject}}",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.col_subject"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-900 dark:text-white"
},
"text": "{{$parent._local.selectedLog?.subject ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{$parent._local.selectedLog?.body}}",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1"
},
"text": "$t:admin.notification_log.detail_body"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300 bg-gray-50 dark:bg-gray-900/50 rounded-lg p-3 max-h-64 overflow-y-auto",
"dangerouslySetInnerHTML": "{{$parent._local.selectedLog?.body ?? ''}}"
}
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{$parent._local.selectedLog?.error_message}}",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-xs font-medium text-red-500 dark:text-red-400 mb-1"
},
"text": "$t:admin.notification_log.detail_error"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-red-700 dark:text-red-300 bg-red-50 dark:bg-red-900/20 rounded-lg p-3"
},
"text": "{{$parent._local.selectedLog?.error_message ?? ''}}"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-end pt-4 border-t border-gray-200 dark:border-gray-700 mt-4"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700"
},
"text": "$t:common.close",
"actions": [
{
"type": "click",
"handler": "closeModal",
"target": "modal_notification_log_detail"
}
]
}
]
}
]
}
@@ -0,0 +1,524 @@
{
"meta": {
"is_partial": true,
"description": "Notification Log List DataGrid"
},
"id": "notification_log_datagrid",
"type": "composite",
"name": "DataGrid",
"props": {
"data": "{{notificationLogs?.data?.data}}",
"pagination": true,
"serverSidePagination": true,
"serverCurrentPage": "{{notificationLogs?.data?.pagination?.current_page ?? 1}}",
"serverTotalPages": "{{notificationLogs?.data?.pagination?.last_page ?? 1}}",
"pageSize": "{{+(query.per_page || 20)}}",
"alwaysShowPagination": true,
"idField": "id",
"selectable": "{{notificationLogs?.data?.abilities?.can_delete === true}}",
"selectedIds": "{{_global.selectedIds_admin_notification_logs || []}}",
"selectedCountText": "",
"loading": "{{notificationLogs?.loading}}",
"expandable": true,
"expandChildren": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "p-4 bg-gray-50 dark:bg-gray-900 space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"if": "{{row.error_message}}",
"props": {
"className": "flex items-start gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-red-600 dark:text-red-400 shrink-0"
},
"text": "$t:admin.notification_log.detail.error_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-red-500 dark:text-red-300"
},
"text": "{{row.error_message}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 shrink-0"
},
"text": "$t:admin.notification_log.detail.source_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "{{row.source ?? '-'}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 shrink-0"
},
"text": "$t:admin.notification_log.detail.notification_type_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-mono text-gray-600 dark:text-gray-400"
},
"text": "{{row.notification_type ?? '-'}}"
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.notification_log.detail.body_label"
},
{
"type": "composite",
"name": "HtmlContent",
"if": "{{row.body}}",
"props": {
"content": "{{row.body}}",
"isHtml": true,
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 max-h-64 overflow-y-auto text-sm"
}
},
{
"type": "basic",
"name": "Span",
"if": "{{!row.body}}",
"props": {
"className": "text-sm text-gray-400 dark:text-gray-500 italic"
},
"text": "$t:admin.notification_log.detail.no_body"
}
]
}
]
}
],
"rowActions": [
{
"id": "delete",
"label": "$t:admin.notification_log.delete.button",
"iconName": "trash",
"variant": "danger",
"disabledField": "abilities.can_delete"
}
],
"actionsColumnHeader": "$t:common.actions",
"columns": [
{
"field": "channel",
"header": "$t:admin.notification_log.col_channel",
"width": "100px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-300"
},
"text": "{{row.channel ?? '-'}}"
}
]
},
{
"field": "recipient",
"header": "$t:admin.notification_log.col_recipient",
"width": "180px",
"cellChildren": [
{
"type": "basic",
"name": "Div",
"if": "{{!row.recipient}}",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{row.recipient_name ?? row.recipient_identifier ?? '-'}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{row.recipient_name && row.recipient_identifier}}",
"props": {
"className": "block text-xs text-gray-500 dark:text-gray-400"
},
"text": "{{row.recipient_identifier}}"
}
]
},
{
"type": "composite",
"name": "ActionMenu",
"if": "{{!!row.recipient}}",
"props": {
"position": "right",
"items": [
{
"id": "view_member",
"label": "$t:admin.notification_log.action.view_member",
"iconName": "user"
},
{
"id": "search_by_recipient",
"label": "$t:admin.notification_log.action.search_by_recipient",
"iconName": "search"
}
]
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg px-1 py-0.5 transition-colors"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fa-regular fa-user",
"className": "text-gray-400 dark:text-gray-500 flex-shrink-0"
}
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-w-0 flex-1"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-medium text-gray-900 dark:text-gray-100 truncate block text-sm"
},
"text": "{{row.recipient.name}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400 truncate block"
},
"text": "({{row.recipient.email}})",
"if": "{{!!row.recipient.email}}"
}
]
}
]
}
],
"actions": [
{
"event": "onItemClick",
"handler": "switch",
"value": "{{$args[0]}}",
"cases": {
"view_member": {
"handler": "openWindow",
"params": {
"path": "/admin/users/{{row.recipient.uuid}}"
}
},
"search_by_recipient": {
"handler": "navigate",
"params": {
"path": "/admin/notification-logs",
"replace": true,
"query": {
"recipient_user_id": "{{row.recipient_user_id}}",
"page": 1
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
}
}
]
}
]
},
{
"field": "sender",
"header": "$t:admin.notification_log.col_sender",
"width": "150px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"if": "{{!row.sender}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 italic"
},
"text": "$t:admin.notification_log.system_sender"
},
{
"type": "composite",
"name": "ActionMenu",
"if": "{{!!row.sender}}",
"props": {
"position": "right",
"items": [
{
"id": "view_member",
"label": "$t:admin.notification_log.action.view_member",
"iconName": "user"
},
{
"id": "search_by_sender",
"label": "$t:admin.notification_log.action.search_by_sender",
"iconName": "search"
}
]
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg px-1 py-0.5 transition-colors"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fa-regular fa-user",
"className": "text-gray-400 dark:text-gray-500 flex-shrink-0"
}
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-w-0 flex-1"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-medium text-gray-900 dark:text-gray-100 truncate block text-sm"
},
"text": "{{row.sender.name}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400 truncate block"
},
"text": "({{row.sender.email}})",
"if": "{{!!row.sender.email}}"
}
]
}
]
}
],
"actions": [
{
"event": "onItemClick",
"handler": "switch",
"value": "{{$args[0]}}",
"cases": {
"view_member": {
"handler": "openWindow",
"params": {
"path": "/admin/users/{{row.sender.uuid}}"
}
},
"search_by_sender": {
"handler": "navigate",
"params": {
"path": "/admin/notification-logs",
"replace": true,
"query": {
"sender_user_id": "{{row.sender_user_id}}",
"page": 1
},
"transition_overlay_target": "notification_log_datagrid__body"
}
}
}
}
]
}
]
},
{
"field": "subject",
"header": "$t:admin.notification_log.col_subject",
"width": "250px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300 line-clamp-1"
},
"text": "{{row.subject ?? '-'}}"
}
]
},
{
"field": "extension_type",
"header": "$t:admin.notification_log.col_extension",
"width": "120px",
"cellChildren": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300"
},
"text": "{{row.extension_type ?? '-'}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{row.extension_identifier && row.extension_identifier !== row.extension_type}}",
"props": {
"className": "block text-xs text-gray-500 dark:text-gray-400 mt-0.5"
},
"text": "{{row.extension_identifier}}"
}
]
}
]
},
{
"field": "status",
"header": "$t:admin.notification_log.col_status",
"sortable": true,
"width": "100px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "{{row.status === 'sent' ? 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300' : row.status === 'failed' ? 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300' : 'inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300'}}"
},
"text": "{{row.status === 'sent' ? '$t:admin.notification_log.status_sent' : row.status === 'failed' ? '$t:admin.notification_log.status_failed' : '$t:admin.notification_log.status_skipped'}}"
}
]
},
{
"field": "sent_at",
"header": "$t:admin.notification_log.col_sent_at",
"sortable": true,
"width": "160px",
"cellChildren": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "{{row.sent_at ?? '-'}}"
}
]
}
]
},
"actions": [
{
"event": "onPageChange",
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/notification-logs",
"replace": true,
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
},
"transition_overlay_target": "notification_log_datagrid__body"
}
},
{
"event": "onSelectionChange",
"type": "action",
"handler": "setState",
"params": {
"target": "global",
"selectedIds_admin_notification_logs": "{{$args[0]}}"
}
},
{
"event": "onRowAction",
"type": "action",
"handler": "switch",
"cases": {
"delete": {
"handler": "setState",
"params": {
"target": "global",
"modal_data": "{{$args[1]}}"
},
"onSuccess": [
{
"handler": "openModal",
"target": "delete_confirm_modal"
}
]
}
}
}
]
}
@@ -1,7 +1,7 @@
{
"meta": {
"is_partial": true,
"description": "Mail Send Log List Filter Section"
"description": "Notification Log List Filter Section"
},
"id": "filter_section",
"type": "basic",
@@ -35,19 +35,15 @@
"options": [
{
"value": "all",
"label": "$t:admin.mail_send_log.filter.search_type_all"
"label": "$t:admin.notification_log.filter.search_type_all"
},
{
"value": "recipient_email",
"label": "$t:admin.mail_send_log.filter.search_type_recipient_email"
},
{
"value": "recipient_name",
"label": "$t:admin.mail_send_log.filter.search_type_recipient_name"
"value": "recipient",
"label": "$t:admin.notification_log.filter.search_type_recipient"
},
{
"value": "subject",
"label": "$t:admin.mail_send_log.filter.search_type_subject"
"label": "$t:admin.notification_log.filter.search_type_subject"
}
]
},
@@ -83,7 +79,7 @@
"props": {
"name": "search",
"type": "text",
"placeholder": "$t:admin.mail_send_log.filter.search_placeholder",
"placeholder": "$t:admin.notification_log.search_placeholder",
"className": "input w-full pl-10",
"value": "{{_local.filter.search || ''}}"
},
@@ -99,7 +95,7 @@
{
"type": "keydown",
"key": "Enter",
"actionRef": "searchMailSendLogs"
"actionRef": "searchNotificationLogs"
}
]
}
@@ -117,177 +113,6 @@
"className": "flex flex-col"
},
"children": [
{
"id": "extension_type_filter",
"type": "basic",
"name": "Div",
"props": {
"className": "filter-row"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "filter-label w-32"
},
"text": "$t:admin.mail_send_log.filter.extension_type_label"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{!_local.filter.extensionTypes || _local.filter.extensionTypes.length === 0}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{[]}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.extension_type_all"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('core')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'core'), 'core'] : (_local.filter.extensionTypes || []).filter(m => m !== 'core')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.extension_type_core"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('module')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'module'), 'module'] : (_local.filter.extensionTypes || []).filter(m => m !== 'module')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.extension_type_module"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('plugin')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'plugin'), 'plugin'] : (_local.filter.extensionTypes || []).filter(m => m !== 'plugin')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.extension_type_plugin"
}
]
}
]
}
]
},
{
"id": "status_filter",
"type": "basic",
@@ -302,7 +127,7 @@
"props": {
"className": "filter-label w-32"
},
"text": "$t:admin.mail_send_log.filter.status_label"
"text": "$t:admin.notification_log.filter.status_label"
},
{
"type": "basic",
@@ -343,7 +168,7 @@
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.status_all"
"text": "$t:admin.notification_log.filter.status_all"
}
]
},
@@ -379,7 +204,7 @@
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.status_sent"
"text": "$t:admin.notification_log.status_sent"
}
]
},
@@ -415,7 +240,7 @@
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.status_failed"
"text": "$t:admin.notification_log.status_failed"
}
]
},
@@ -451,7 +276,178 @@
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.mail_send_log.filter.status_skipped"
"text": "$t:admin.notification_log.status_skipped"
}
]
}
]
}
]
},
{
"id": "extension_type_filter",
"type": "basic",
"name": "Div",
"props": {
"className": "filter-row"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "filter-label w-32"
},
"text": "$t:admin.notification_log.filter.extension_type_label"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{!_local.filter.extensionTypes || _local.filter.extensionTypes.length === 0}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{[]}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.notification_log.filter.extension_type_all"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('core')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'core'), 'core'] : (_local.filter.extensionTypes || []).filter(m => m !== 'core')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.notification_log.extension_core"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('module')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'module'), 'module'] : (_local.filter.extensionTypes || []).filter(m => m !== 'module')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.notification_log.extension_module"
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "inline-flex items-center gap-2 cursor-pointer"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "checkbox",
"className": "checkbox",
"checked": "{{(_local.filter.extensionTypes || []).includes('plugin')}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"filter.extensionTypes": "{{$event.target.checked ? [...(_local.filter.extensionTypes || []).filter(m => m !== 'plugin'), 'plugin'] : (_local.filter.extensionTypes || []).filter(m => m !== 'plugin')}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400"
},
"text": "$t:admin.notification_log.extension_plugin"
}
]
}
@@ -490,11 +486,11 @@
}
}
},
"text": "$t:admin.mail_send_log.filter.search_button",
"text": "$t:admin.notification_log.filter.search_button",
"actions": [
{
"type": "click",
"actionRef": "searchMailSendLogs"
"actionRef": "searchNotificationLogs"
}
]
},
@@ -512,35 +508,37 @@
}
}
},
"text": "$t:admin.mail_send_log.filter.reset_button",
"text": "$t:admin.notification_log.filter.reset_button",
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"filter": {
"searchType": "all",
"search": "",
"extensionTypes": [],
"statuses": []
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"filter": {
"searchType": "all",
"search": "",
"extensionTypes": [],
"statuses": []
}
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/notification-logs"
}
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/mail-send-logs"
}
}
]
]
}
}
]
}
]
}
]
}
}
@@ -261,6 +261,193 @@
}
]
},
{
"id": "dependencies_section",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 mb-3"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "link",
"className": "w-5 h-5 text-gray-500"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.plugins.modals.dependencies"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.plugins.modals.required_core_version"
},
{
"type": "basic",
"name": "Span",
"if": "{{_global.selectedPlugin.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 rounded font-mono"
},
"text": "{{_global.selectedPlugin.requires_core}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{!_global.selectedPlugin.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded"
},
"text": "$t:admin.plugins.modals.no_required_core_version"
}
]
},
{
"type": "basic",
"name": "P",
"if": "{{!_global.selectedPlugin.dependencies || _global.selectedPlugin.dependencies.length === 0}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.plugins.modals.no_dependencies_required"
},
{
"type": "basic",
"name": "Div",
"if": "{{_global.selectedPlugin.dependencies && _global.selectedPlugin.dependencies.length > 0}}",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "_global.selectedPlugin.dependencies",
"item_var": "dep"
},
"props": {
"className": "flex flex-wrap items-center gap-2 p-2 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{dep.type === 'module'}}",
"props": {
"name": "cube",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Icon",
"if": "{{dep.type === 'plugin'}}",
"props": {
"name": "puzzle-piece",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{dep.name}} ({{dep.identifier}})"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded font-mono"
},
"text": "$t:admin.plugins.modals.dependency_required_version|version={{dep.required_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{dep.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded font-mono"
},
"text": "$t:admin.plugins.modals.dependency_installed_version|version={{dep.installed_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{dep.is_met}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded"
},
"text": "$t:admin.plugins.modals.dependency_met"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && !dep.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded"
},
"text": "$t:admin.plugins.modals.dependency_not_installed"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && dep.installed_version && !dep.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-700 dark:text-yellow-300 rounded"
},
"text": "$t:admin.plugins.modals.dependency_inactive"
},
{
"type": "basic",
"name": "Span",
"if": "{{!dep.is_met && dep.installed_version && dep.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300 rounded"
},
"text": "$t:admin.plugins.modals.dependency_unmet_version"
}
]
}
]
}
]
}
]
},
{
"id": "permissions_section",
"type": "basic",
@@ -306,6 +306,13 @@
"params": {
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions",
"params": {
"pluginInfo": "{{result}}",
"action": "add"
}
}
]
},
@@ -350,6 +350,13 @@
"params": {
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions",
"params": {
"pluginInfo": "{{result}}",
"action": "remove"
}
}
]
},
@@ -36,6 +36,54 @@
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.plugins.modals.vendor_mode_label"
},
{
"type": "basic",
"name": "Select",
"props": {
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white",
"value": "{{_global.pluginInstallVendorMode ?? 'auto'}}",
"options": [
{ "value": "auto", "label": "$t:admin.plugins.modals.vendor_mode_auto" },
{ "value": "composer", "label": "$t:admin.plugins.modals.vendor_mode_composer" },
{ "value": "bundled", "label": "$t:admin.plugins.modals.vendor_mode_bundled" }
]
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"pluginInstallVendorMode": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "P",
"props": {
"className": "mt-1 text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.plugins.modals.vendor_mode_hint"
}
]
},
{
"type": "basic",
"name": "Div",
@@ -90,7 +138,8 @@
"params": {
"method": "POST",
"body": {
"plugin_name": "{{_global.selectedPlugin.identifier}}"
"plugin_name": "{{_global.selectedPlugin.identifier}}",
"vendor_mode": "{{_global.pluginInstallVendorMode ?? 'auto'}}"
}
},
"onSuccess": [
@@ -127,6 +176,9 @@
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -449,6 +449,9 @@
"dataSourceId": "plugins"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -651,6 +651,13 @@
"dataSourceId": "admin_menu"
}
},
{
"handler": "reloadExtensions",
"params": {
"pluginInfo": "{{result}}",
"action": "remove"
}
},
{
"handler": "closeModal"
}
@@ -295,6 +295,240 @@
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4 p-3 bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.plugins.modals.layout_strategy_title"
},
{
"type": "basic",
"name": "Div",
"if": "{{_global.hasModifiedPluginLayouts}}",
"props": {
"className": "mb-2 p-2 bg-amber-50 dark:bg-amber-900/30 border border-amber-200 dark:border-amber-700 rounded text-xs text-amber-700 dark:text-amber-400"
},
"text": "$t:admin.plugins.modals.modified_layouts_warning|count={{_global.modifiedPluginLayoutsCount ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"if": "{{!_global.hasModifiedPluginLayouts}}",
"props": {
"className": "mb-2 p-2 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 rounded text-xs text-green-700 dark:text-green-400"
},
"text": "$t:admin.plugins.modals.no_modified_layouts"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "flex items-start gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "radio",
"name": "plugin_layout_strategy",
"value": "overwrite",
"checked": "{{(_global.pluginLayoutStrategy ?? 'overwrite') === 'overwrite'}}",
"className": "mt-0.5"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"pluginLayoutStrategy": "overwrite"
}
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.plugins.modals.layout_strategy_overwrite"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.plugins.modals.layout_strategy_overwrite_desc"
}
]
}
]
},
{
"type": "basic",
"name": "Label",
"props": {
"className": "flex items-start gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "radio",
"name": "plugin_layout_strategy",
"value": "keep",
"checked": "{{(_global.pluginLayoutStrategy ?? 'overwrite') === 'keep'}}",
"className": "mt-0.5"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "global",
"pluginLayoutStrategy": "keep"
}
}
]
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.plugins.modals.layout_strategy_keep"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.plugins.modals.layout_strategy_keep_desc"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{(_global.pluginLayoutStrategy ?? 'overwrite') === 'keep' && _global.modifiedPluginLayouts && _global.modifiedPluginLayouts.length > 0}}",
"props": {
"className": "ml-6 mt-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-xs font-medium text-amber-700 dark:text-amber-300 mb-2"
},
"text": "$t:admin.plugins.modals.modified_layouts_list_title|count={{_global.modifiedPluginLayouts?.length ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-1 max-h-40 overflow-y-auto"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "_global.modifiedPluginLayouts",
"item_var": "modLayout"
},
"props": {
"className": "flex items-center gap-3 text-xs px-2 py-1.5 bg-white dark:bg-gray-800 rounded"
},
"children": [
{
"type": "composite",
"name": "Icon",
"props": {
"name": "file-alt",
"className": "text-amber-500 shrink-0"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "font-mono flex-1 text-gray-700 dark:text-gray-300"
},
"text": "{{modLayout.name}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-gray-400 dark:text-gray-500 shrink-0"
},
"text": "{{modLayout.updated_at}}"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-2 text-xs text-amber-600 dark:text-amber-400 flex items-center gap-1"
},
"children": [
{
"type": "composite",
"name": "Icon",
"props": {
"name": "info-circle",
"size": "xs"
}
},
{
"type": "basic",
"name": "Span",
"text": "$t:admin.plugins.modals.modified_layouts_keep_notice"
}
]
}
]
}
]
}
]
}
]
},
@@ -353,7 +587,10 @@
"auth_required": true,
"target": "/api/admin/plugins/{{_global.selectedPlugin.identifier}}/update",
"params": {
"method": "POST"
"method": "POST",
"body": {
"layout_strategy": "{{_global.pluginLayoutStrategy ?? 'overwrite'}}"
}
},
"onSuccess": [
{
@@ -367,7 +604,11 @@
"handler": "setState",
"params": {
"target": "global",
"selectedPlugin": null
"selectedPlugin": null,
"pluginLayoutStrategy": "overwrite",
"hasModifiedPluginLayouts": false,
"modifiedPluginLayoutsCount": 0,
"modifiedPluginLayouts": []
}
},
{
@@ -1,622 +0,0 @@
{
"meta": {
"is_partial": true,
"description": "메일 템플릿 편집 모달"
},
"id": "modal_mail_template_form",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.settings.mail_templates.edit_modal.title",
"size": "xl",
"closeOnOverlayClick": false
},
"children": [
{
"id": "form_container",
"type": "basic",
"name": "Div",
"blur_until_loaded": "{{$parent._local.isSaving}}",
"props": {
"className": "flex flex-col max-h-[70vh]"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 overflow-y-auto space-y-5 pr-1"
},
"children": [
{
"id": "validation_error_banner",
"type": "basic",
"name": "Div",
"if": "{{$parent._local.templateErrors}}",
"props": {
"className": "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-3"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "triangle-exclamation",
"size": "sm",
"className": "text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
}
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-sm font-medium text-red-800 dark:text-red-200"
},
"text": "$t:admin.settings.mail_templates.edit_modal.validation_error"
},
{
"type": "basic",
"name": "Ul",
"if": "{{typeof $parent._local.templateErrors === 'object' && Object.keys($parent._local.templateErrors).length > 0}}",
"props": {
"className": "mt-2 list-disc list-inside space-y-1"
},
"iteration": {
"source": "Object.entries($parent._local.templateErrors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
"item_var": "errMsg"
},
"children": [
{
"type": "basic",
"name": "Li",
"props": {
"className": "text-sm text-red-700 dark:text-red-300"
},
"text": "{{errMsg}}"
}
]
}
]
}
]
}
]
},
{
"id": "type_display_section",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 mb-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.mail_templates.edit_modal.type_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.mail_templates.types.{{$parent._local.editingTemplate?.type ?? ''}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-mono px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded"
},
"text": "{{$parent._local.editingTemplate?.type ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex border-b border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "{{($parent._local.editLang ?? $locale) === 'ko' ? 'border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}} px-4 py-2 text-sm font-medium focus:outline-none"
},
"text": "한국어",
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "$parent._local",
"editLang": "ko"
}
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "{{($parent._local.editLang ?? $locale) === 'en' ? 'border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}} px-4 py-2 text-sm font-medium focus:outline-none"
},
"text": "English",
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "$parent._local",
"editLang": "en"
}
}
]
}
]
},
{
"id": "subject_ko",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editLang ?? $locale) === 'ko'}}",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:admin.settings.mail_templates.edit_modal.subject"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-red-500 dark:text-red-400 ml-1" },
"text": "*"
}
]
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"value": "{{$parent._local.editingTemplate?.subject?.ko ?? ''}}",
"className": "{{$parent._local.templateErrors?.['subject.ko'] ? 'w-full px-3 py-2 border border-red-500 dark:border-red-500 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-red-500 focus:border-red-500' : 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500'}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate.subject.ko": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"if": "{{$parent._local.templateErrors?.['subject.ko']}}",
"props": {
"className": "text-red-500 dark:text-red-400 text-xs mt-1"
},
"text": "{{$parent._local.templateErrors?.['subject.ko']?.[0] ?? ''}}"
}
]
},
{
"id": "subject_en",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editLang ?? $locale) === 'en'}}",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.settings.mail_templates.edit_modal.subject"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"value": "{{$parent._local.editingTemplate?.subject?.en ?? ''}}",
"className": "{{$parent._local.templateErrors?.['subject.en'] ? 'w-full px-3 py-2 border border-red-500 dark:border-red-500 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-red-500 focus:border-red-500' : 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500'}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate.subject.en": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"if": "{{$parent._local.templateErrors?.['subject.en']}}",
"props": {
"className": "text-red-500 dark:text-red-400 text-xs mt-1"
},
"text": "{{$parent._local.templateErrors?.['subject.en']?.[0] ?? ''}}"
}
]
},
{
"id": "body_ko",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editLang ?? $locale) === 'ko'}}",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:admin.settings.mail_templates.edit_modal.body"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-red-500 dark:text-red-400 ml-1" },
"text": "*"
}
]
},
{
"type": "composite",
"name": "HtmlEditor",
"props": {
"content": "{{$parent._local.editingTemplate?.body?.ko ?? ''}}",
"isHtml": true,
"showHtmlModeToggle": false,
"className": "{{$parent._local.templateErrors?.['body.ko'] ? 'min-h-[200px] border border-red-500 rounded-md' : 'min-h-[200px]'}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate.body.ko": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"if": "{{$parent._local.templateErrors?.['body.ko']}}",
"props": {
"className": "text-red-500 dark:text-red-400 text-xs mt-1"
},
"text": "{{$parent._local.templateErrors?.['body.ko']?.[0] ?? ''}}"
}
]
},
{
"id": "body_en",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editLang ?? $locale) === 'en'}}",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.settings.mail_templates.edit_modal.body"
},
{
"type": "composite",
"name": "HtmlEditor",
"props": {
"content": "{{$parent._local.editingTemplate?.body?.en ?? ''}}",
"isHtml": true,
"showHtmlModeToggle": false,
"className": "{{$parent._local.templateErrors?.['body.en'] ? 'min-h-[200px] border border-red-500 rounded-md' : 'min-h-[200px]'}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate.body.en": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"if": "{{$parent._local.templateErrors?.['body.en']}}",
"props": {
"className": "text-red-500 dark:text-red-400 text-xs mt-1"
},
"text": "{{$parent._local.templateErrors?.['body.en']?.[0] ?? ''}}"
}
]
},
{
"id": "is_active_toggle",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-3"
},
"children": [
{
"type": "composite",
"name": "Toggle",
"props": {
"name": "templateIsActive",
"checked": "{{$parent._local.editingTemplate?.is_active ?? true}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate.is_active": "{{$event.target.checked}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.settings.mail_templates.edit_modal.is_active_label"
}
]
},
{
"id": "variables_info",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editingTemplate?.variables ?? []).length > 0}}",
"props": {
"className": "bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md p-4"
},
"children": [
{
"type": "basic",
"name": "H4",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.settings.mail_templates.edit_modal.variables_title"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"iteration": {
"source": "{{$parent._local.editingTemplate?.variables ?? []}}",
"item_var": "v",
"index_var": "vi"
},
"props": {
"className": "inline-flex items-center gap-1 text-xs px-2 py-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "{"
},
{
"type": "basic",
"name": "Span",
"text": "{{v.key}}"
},
{
"type": "basic",
"name": "Span",
"text": "} - {{v.description ?? ''}}"
}
]
}
]
}
]
}
]
},
{
"id": "modal_footer",
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-end items-center pt-4 border-t border-gray-200 dark:border-gray-700 mt-4 flex-shrink-0 sticky bottom-0 bg-white dark:bg-gray-800 pb-1"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-2"
},
"children": [
{
"id": "btn_cancel",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-sm px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{$parent._local.isSaving ?? false}}"
},
"text": "$t:common.cancel",
"actions": [
{
"type": "click",
"handler": "closeModal",
"target": "modal_mail_template_form"
}
]
},
{
"id": "btn_save",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "flex items-center gap-2 text-sm px-4 py-2 rounded-md bg-indigo-600 text-white hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{$parent._local.isSaving ?? false}}"
},
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{$parent._local.isSaving}}",
"props": { "name": "spinner", "className": "animate-spin", "size": "sm" }
},
{
"type": "basic",
"name": "Span",
"text": "{{$parent._local.isSaving ? '$t:common.saving' : '$t:common.save'}}"
}
],
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": true,
"templateErrors": null
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "{{'/api/admin/mail-templates/' + $parent._local.editingTemplate?.id}}",
"params": {
"method": "PUT",
"body": "{{(function() { const tpl = $parent._local.editingTemplate ?? {}; return { subject: tpl.subject ?? {}, body: tpl.body ?? {}, is_active: tpl.is_active ?? true }; })()}}"
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": false,
"templateErrors": null,
"editingTemplate": null
}
},
{
"handler": "closeModal",
"target": "modal_mail_template_form"
},
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {}
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.mail_templates.save_success",
"type": "success"
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": false,
"templateErrors": "{{error.errors}}"
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.mail_templates.save_error",
"type": "error"
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
@@ -0,0 +1,175 @@
{
"meta": {
"is_partial": true,
"description": "알림 정의 기본값 복원 확인 모달 (스피너 포함)"
},
"id": "modal_notification_definition_reset",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.settings.notification_definitions.reset_modal.title",
"size": "small"
},
"children": [
{
"type": "basic",
"name": "P",
"props": {
"className": "text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.settings.notification_definitions.reset_modal.confirm_message"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-4 p-3 bg-gray-100 dark:bg-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": { "className": "text-xs text-gray-500 dark:text-gray-400 block mb-1" },
"text": "$t:admin.settings.notification_definitions.reset_modal.target_label"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "font-medium text-gray-900 dark:text-white" },
"text": "{{_global.resetTargetName ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-3 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-red-700 dark:text-red-300"
},
"text": "$t:admin.settings.notification_definitions.reset_modal.warning_message"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-end gap-3 mt-6"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{_global.isResettingNotification}}"
},
"actions": [
{
"type": "click",
"handler": "closeModal",
"target": "modal_notification_definition_reset"
}
],
"text": "$t:common.cancel"
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "flex items-center gap-2 px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{_global.isResettingNotification}}"
},
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"isResettingNotification": true
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notification-definitions/{{_global.resetTargetId}}/reset",
"params": { "method": "POST" },
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"isResettingNotification": false,
"resetTargetId": null,
"resetTargetName": ""
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notificationDefinitions" }
},
{
"handler": "toast",
"params": {
"type": "success",
"message": "$t:admin.settings.notification_definitions.reset_success"
}
},
{
"handler": "closeModal",
"target": "modal_notification_definition_reset"
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "global",
"isResettingNotification": false
}
},
{
"handler": "toast",
"params": {
"type": "error",
"message": "{{error.message ?? '$t:admin.settings.notification_definitions.reset_failed'}}"
}
}
]
}
]
}
],
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{_global.isResettingNotification}}",
"props": {
"name": "spinner",
"className": "w-4 h-4 animate-spin"
}
},
{
"type": "basic",
"name": "Span",
"text": "{{_global.isResettingNotification ? '$t:admin.settings.notification_definitions.reset_modal.btn_confirming' : '$t:admin.settings.notification_definitions.reset_modal.btn_confirm'}}"
}
]
}
]
}
]
}
@@ -0,0 +1,925 @@
{
"meta": {
"is_partial": true,
"description": "알림 템플릿 편집 모달 — 단일 채널 template 편집"
},
"id": "modal_notification_template_form",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.settings.notification_definitions.edit_modal.title",
"size": "xl",
"closeOnOverlayClick": false
},
"children": [
{
"id": "template_form_container",
"type": "basic",
"name": "Div",
"blur_until_loaded": "{{$parent._local.isSaving}}",
"props": {
"className": "flex flex-col max-h-[calc(90vh-140px)] -my-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 overflow-y-auto space-y-5 pr-1"
},
"children": [
{
"id": "template_validation_error",
"type": "basic",
"name": "Div",
"if": "{{$parent._local.templateErrors}}",
"props": {
"className": "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-3"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "triangle-exclamation",
"size": "sm",
"className": "text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
}
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-sm font-medium text-red-800 dark:text-red-200"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.validation_error"
},
{
"type": "basic",
"name": "Ul",
"if": "{{typeof $parent._local.templateErrors === 'object' && Object.keys($parent._local.templateErrors).length > 0}}",
"props": {
"className": "mt-2 list-disc list-inside space-y-1"
},
"iteration": {
"source": "Object.entries($parent._local.templateErrors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
"item_var": "errMsg"
},
"children": [
{
"type": "basic",
"name": "Li",
"props": {
"className": "text-sm text-red-700 dark:text-red-300"
},
"text": "{{errMsg}}"
}
]
}
]
}
]
}
]
},
{
"id": "template_type_channel",
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.type_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.notification_definitions.types.{{$parent._local.editingDefinition?.type ?? ''}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-mono px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded"
},
"text": "{{$parent._local.editingDefinition?.type ?? ''}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-400 dark:text-gray-500"
},
"text": "·"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.channel_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-indigo-600 dark:text-indigo-400"
},
"text": "{{(availableChannels?.data?.channels ?? []).find(c => c.id === $parent._local.editingTemplate?.channel)?.name?.[$locale] ?? $parent._local.editingTemplate?.channel ?? ''}}"
}
]
},
{
"id": "template_recipients_section",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-purple-50 dark:bg-purple-900/20 border border-purple-200 dark:border-purple-700 rounded-lg p-4 space-y-3"
},
"children": [
{
"type": "basic",
"name": "H4",
"props": {
"className": "text-sm font-medium text-purple-800 dark:text-purple-200"
},
"text": "$t:admin.settings.notification_definitions.recipients.title"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "{{$parent._local.editingRecipients ?? []}}",
"item_var": "rcpt",
"index_var": "rcptIdx"
},
"props": {
"className": "bg-white dark:bg-gray-800 border border-purple-200 dark:border-purple-600 rounded-lg p-3 space-y-2"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-medium text-purple-700 dark:text-purple-300"
},
"text": "$t:admin.settings.notification_definitions.recipients.rule_label|index={{rcptIdx + 1}}"
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "p-1 text-gray-400 hover:text-red-500 dark:hover:text-red-400 transition-colors"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": { "name": "fa-solid fa-xmark", "size": "sm" }
}
],
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{($parent._local.editingRecipients ?? []).filter((_, i) => i !== rcptIdx)}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": { "className": "space-y-1" },
"children": [
{
"type": "basic",
"name": "Label",
"props": { "className": "block text-xs font-medium text-gray-600 dark:text-gray-400" },
"text": "$t:admin.settings.notification_definitions.recipients.type_label"
},
{
"type": "composite",
"name": "Select",
"props": {
"value": "{{rcpt.type ?? ''}}",
"className": "w-full text-sm",
"options": [
{ "value": "trigger_user", "label": "$t:admin.settings.notification_definitions.recipients.types.trigger_user" },
{ "value": "related_user", "label": "$t:admin.settings.notification_definitions.recipients.types.related_user" },
{ "value": "role", "label": "$t:admin.settings.notification_definitions.recipients.types.role" },
{ "value": "specific_users", "label": "$t:admin.settings.notification_definitions.recipients.types.specific_users" }
]
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{($parent._local.editingRecipients ?? []).map((r, i) => i === rcptIdx ? {...r, type: $event.target.value} : r)}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{rcpt.type === 'related_user'}}",
"props": { "className": "space-y-1" },
"children": [
{
"type": "basic",
"name": "Label",
"props": { "className": "block text-xs font-medium text-gray-600 dark:text-gray-400" },
"text": "$t:admin.settings.notification_definitions.recipients.relation_label"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block w-full px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 border border-gray-200 dark:border-gray-600 rounded-md"
},
"text": "{{rcpt.relation ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{rcpt.type === 'role'}}",
"props": { "className": "space-y-1" },
"children": [
{
"type": "basic",
"name": "Label",
"props": { "className": "block text-xs font-medium text-gray-600 dark:text-gray-400" },
"text": "$t:admin.settings.notification_definitions.recipients.role_label"
},
{
"type": "composite",
"name": "SearchableDropdown",
"props": {
"value": "{{rcpt.value ?? ''}}",
"options": "{{$parent._local.recipientRoleSearchResults ?? []}}",
"searchPlaceholder": "$t:admin.settings.notification_definitions.recipients.role_search_placeholder",
"noResultsText": "$t:admin.settings.notification_definitions.recipients.users_no_options",
"initialText": "$t:admin.settings.notification_definitions.recipients.role_search_placeholder",
"triggerLabel": "$t:admin.settings.notification_definitions.recipients.role_label",
"className": "w-full"
},
"actions": [
{
"event": "onSearch",
"handler": "apiCall",
"debounce": 300,
"auth_required": true,
"target": "/api/admin/roles",
"params": {
"method": "GET",
"query": {
"search": "{{$args[0]}}",
"per_page": 50
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"recipientRoleSearchResults": "{{(response.data?.data ?? []).map(r => ({ value: r.identifier, label: r.name, description: r.identifier }))}}"
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"recipientRoleSearchResults": []
}
}
]
},
{
"event": "onChange",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{($parent._local.editingRecipients ?? []).map((r, i) => i === rcptIdx ? {...r, value: $args[0]} : r)}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{rcpt.type === 'specific_users'}}",
"props": { "className": "space-y-1" },
"children": [
{
"type": "basic",
"name": "Label",
"props": { "className": "block text-xs font-medium text-gray-600 dark:text-gray-400" },
"text": "$t:admin.settings.notification_definitions.recipients.users_label"
},
{
"id": "rcpt_users_{{rcptIdx}}",
"type": "composite",
"name": "SearchableDropdown",
"props": {
"multiple": true,
"value": "{{rcpt.value ?? []}}",
"options": "{{$parent._local.recipientUserSearchResults ?? []}}",
"searchPlaceholder": "$t:admin.settings.notification_definitions.recipients.users_placeholder",
"noResultsText": "$t:admin.settings.notification_definitions.recipients.users_no_options",
"initialText": "$t:admin.settings.notification_definitions.recipients.users_placeholder",
"triggerLabel": "$t:admin.settings.notification_definitions.recipients.users_label",
"className": "w-full"
},
"actions": [
{
"event": "onSearch",
"handler": "apiCall",
"debounce": 300,
"auth_required": true,
"target": "/api/admin/users/search",
"params": {
"method": "GET",
"query": {
"keyword": "{{$args[0]}}"
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"recipientUserSearchResults": "{{(response.data ?? []).map(u => ({ value: u.uuid, label: u.name, description: u.email }))}}"
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"recipientUserSearchResults": []
}
}
]
},
{
"event": "onChange",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{($parent._local.editingRecipients ?? []).map((r, i) => i === rcptIdx ? {...r, value: $args[0]} : r)}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{rcpt.type === 'role' || rcpt.type === 'specific_users'}}",
"props": { "className": "flex items-center gap-2" },
"children": [
{
"type": "composite",
"name": "Toggle",
"props": {
"checked": "{{rcpt.exclude_trigger_user ?? false}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{($parent._local.editingRecipients ?? []).map((r, i) => i === rcptIdx ? {...r, exclude_trigger_user: !(r.exclude_trigger_user ?? false)} : r)}}"
}
}
]
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-xs text-gray-600 dark:text-gray-400" },
"text": "$t:admin.settings.notification_definitions.recipients.exclude_trigger_user"
}
]
}
]
}
]
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-sm text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-200 font-medium"
},
"text": "$t:admin.settings.notification_definitions.recipients.add_rule",
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingRecipients": "{{[...($parent._local.editingRecipients ?? []), {type: 'trigger_user'}]}}"
}
}
]
}
]
},
{
"id": "template_lang_tabs",
"type": "basic",
"name": "Div",
"props": {
"className": "flex border-b border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Button",
"iteration": {
"source": "{{$locales}}",
"item_var": "loc"
},
"props": {
"type": "button",
"className": "{{($parent._local.editLang ?? $locale) === loc ? 'border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}} px-4 py-2 text-sm font-medium focus:outline-none"
},
"text": "{{_global.appConfig?.localeNames?.[loc] ?? loc}}",
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "$parent._local",
"editLang": "{{loc}}"
}
}
]
}
]
},
{
"id": "template_subject_input",
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:admin.settings.notification_definitions.edit_modal.subject"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-red-500 dark:text-red-400 ml-1" },
"text": "*"
}
]
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"value": "{{$parent._local.editingTemplate?.subject?.[$parent._local.editLang ?? $locale] ?? ''}}",
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate": "{{Object.assign({}, $parent._local.editingTemplate, {subject: Object.assign({}, $parent._local.editingTemplate?.subject, {[$parent._local.editLang ?? $locale]: $event.target.value})})}}"
}
}
]
}
]
},
{
"id": "template_body_input",
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:admin.settings.notification_definitions.edit_modal.body"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "text-red-500 dark:text-red-400 ml-1" },
"text": "*"
}
]
},
{
"type": "composite",
"name": "HtmlEditor",
"props": {
"content": "{{$parent._local.editingTemplate?.body?.[$parent._local.editLang ?? $locale] ?? ''}}",
"isHtml": true,
"showHtmlModeToggle": false,
"className": "min-h-[200px]"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate": "{{Object.assign({}, $parent._local.editingTemplate, {body: Object.assign({}, $parent._local.editingTemplate?.body, {[$parent._local.editLang ?? $locale]: $event.target.value})})}}"
}
}
]
}
]
},
{
"id": "template_click_url_input",
"type": "basic",
"name": "Div",
"if": "{{$parent._local.editingTemplate?.channel === 'database'}}",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.click_url"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"value": "{{$parent._local.editingTemplate?.click_url ?? ''}}",
"placeholder": "/mypage/orders/{order_number}",
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "$parent._local",
"editingTemplate": "{{Object.assign({}, $parent._local.editingTemplate, {click_url: $event.target.value || null})}}"
}
}
]
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400 mt-1"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.click_url_hint"
}
]
},
{
"id": "template_variables_info",
"type": "basic",
"name": "Div",
"if": "{{($parent._local.editingDefinition?.variables ?? []).length > 0}}",
"props": {
"className": "bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md p-4"
},
"children": [
{
"type": "basic",
"name": "H4",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.variables_title"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"iteration": {
"source": "{{$parent._local.editingDefinition?.variables ?? []}}",
"item_var": "v"
},
"props": {
"className": "inline-flex items-center gap-1 text-xs px-2 py-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded text-gray-700 dark:text-gray-300"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": { "className": "font-mono" },
"text": "{"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "font-mono" },
"text": "{{v.key}}"
},
{
"type": "basic",
"name": "Span",
"props": { "className": "font-mono" },
"text": "}"
},
{
"type": "basic",
"name": "Span",
"text": " — {{v.description ?? ''}}"
}
]
}
]
}
]
}
]
},
{
"id": "template_modal_footer",
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-between items-center pt-4 pb-4 border-t border-gray-200 dark:border-gray-700 mt-4 flex-shrink-0"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-sm px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",
"disabled": "{{$parent._local.isSaving ?? false}}"
},
"text": "$t:admin.settings.notification_definitions.edit_modal.btn_preview",
"actions": [
{
"type": "click",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/notification-templates/preview",
"params": {
"method": "POST",
"body": {
"definition_id": "{{$parent._local.editingDefinition?.id}}",
"subject": "{{$parent._local.editingTemplate?.subject}}",
"body": "{{$parent._local.editingTemplate?.body}}",
"locale": "{{$parent._local.editLang ?? $locale}}"
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"previewData": "{{response.data}}"
}
},
{
"handler": "openModal",
"target": "modal_notification_template_preview"
}
]
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex gap-2"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "text-sm px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{$parent._local.isSaving ?? false}}"
},
"text": "$t:common.cancel",
"actions": [
{
"type": "click",
"handler": "closeModal",
"target": "modal_notification_template_form"
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "flex items-center gap-2 text-sm px-4 py-2 rounded-md bg-indigo-600 text-white hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
"disabled": "{{$parent._local.isSaving ?? false}}"
},
"children": [
{
"type": "basic",
"name": "Icon",
"if": "{{$parent._local.isSaving}}",
"props": { "name": "spinner", "className": "animate-spin", "size": "sm" }
},
{
"type": "basic",
"name": "Span",
"text": "{{$parent._local.isSaving ? '$t:common.saving' : '$t:common.save'}}"
}
],
"actions": [
{
"type": "click",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": true,
"templateErrors": null
}
},
{
"handler": "apiCall",
"auth_required": true,
"target": "{{'/api/admin/notification-templates/' + $parent._local.editingTemplate?.id}}",
"params": {
"method": "PUT",
"body": {
"subject": "{{$parent._local.editingTemplate?.subject}}",
"body": "{{$parent._local.editingTemplate?.body}}",
"click_url": "{{$parent._local.editingTemplate?.click_url ?? null}}",
"recipients": "{{$parent._local.editingRecipients ?? []}}"
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": false,
"templateErrors": null,
"editingTemplate": null,
"editingDefinition": null,
"editingRecipients": null
}
},
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "notificationDefinitions"
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.notification_definitions.save_success",
"type": "success"
}
},
{
"handler": "closeModal",
"target": "modal_notification_template_form"
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "$parent._local",
"isSaving": false,
"templateErrors": "{{error.errors}}"
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.notification_definitions.save_error",
"type": "error"
}
}
]
}
]
}
}
]
}
]
}
]
}
]
}
]
}
@@ -3,11 +3,11 @@
"is_partial": true,
"description": "메일 템플릿 미리보기 모달"
},
"id": "modal_mail_template_preview",
"id": "modal_notification_template_preview",
"type": "composite",
"name": "Modal",
"props": {
"title": "$t:admin.settings.mail_templates.preview_modal.title",
"title": "$t:admin.settings.notification_definitions.preview_modal.title",
"size": "lg"
},
"children": [
@@ -32,7 +32,7 @@
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"
},
"text": "$t:admin.settings.mail_templates.preview_modal.subject_label"
"text": "$t:admin.settings.notification_definitions.preview_modal.subject_label"
},
{
"type": "basic",
@@ -40,7 +40,7 @@
"props": {
"className": "text-base font-medium text-gray-900 dark:text-white bg-gray-50 dark:bg-gray-900 rounded-md px-3 py-2"
},
"text": "{{_local.previewData?.subject ?? ''}}"
"text": "{{$parent._local.previewData?.subject ?? ''}}"
}
]
},
@@ -57,14 +57,15 @@
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"
},
"text": "$t:admin.settings.mail_templates.preview_modal.body_label"
"text": "$t:admin.settings.notification_definitions.preview_modal.body_label"
},
{
"type": "basic",
"name": "Div",
"type": "composite",
"name": "HtmlContent",
"props": {
"className": "border border-gray-200 dark:border-gray-700 rounded-md overflow-hidden",
"dangerouslySetInnerHTML": "{{_local.previewData?.body ?? ''}}"
"content": "{{$parent._local.previewData?.body ?? ''}}",
"isHtml": true,
"className": "prose dark:prose-invert prose-sm max-w-none border border-gray-200 dark:border-gray-700 rounded-md p-4 max-h-[400px] overflow-y-auto bg-white dark:bg-gray-900"
}
}
]
@@ -89,7 +90,7 @@
{
"type": "click",
"handler": "closeModal",
"target": "modal_mail_template_preview"
"target": "modal_notification_template_preview"
}
]
}
@@ -949,6 +949,284 @@
]
}
]
},
{
"id": "card_geoip_settings",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-6"
},
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white mb-1"
},
"text": "$t:admin.settings.advanced.geoip_section"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mb-6"
},
"text": "$t:admin.settings.advanced.geoip_section_desc"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-6"
},
"children": [
{
"id": "toggle_geoip_enabled",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between py-3 border-b border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.advanced.geoip_enabled"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.advanced.geoip_enabled_desc"
}
]
},
{
"type": "composite",
"name": "Toggle",
"props": {
"name": "advanced.geoip_enabled",
"size": "md",
"disabled": "{{_computed.isReadOnly}}"
}
}
]
},
{
"id": "geoip_settings_detail",
"type": "basic",
"name": "Div",
"if": "{{_local.form?.advanced?.geoip_enabled}}",
"props": {
"className": "ml-4 pl-4 border-l-2 border-blue-200 dark:border-blue-800 space-y-4"
},
"children": [
{
"id": "input_geoip_license_key",
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-1"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.advanced.geoip_license_key"
}
]
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.advanced.geoip_license_key_desc"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "password",
"name": "advanced.geoip_license_key",
"placeholder": "xxxxxxxxxxxxxxxx",
"autoComplete": "off",
"disabled": "{{_computed.isReadOnly}}",
"className": "{{_local.errors?.['advanced.geoip_license_key'] ? 'w-full px-3 py-2 border border-red-500 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm' : 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm'}}"
}
},
{
"type": "basic",
"name": "Span",
"if": "{{_local.errors?.['advanced.geoip_license_key']}}",
"props": {
"className": "text-red-500 text-xs mt-1 block"
},
"text": "{{_local.errors?.['advanced.geoip_license_key']?.[0] ?? ''}}"
}
]
},
{
"id": "toggle_geoip_auto_update",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between py-2"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.advanced.geoip_auto_update_enabled"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.advanced.geoip_auto_update_enabled_desc"
}
]
},
{
"type": "composite",
"name": "Toggle",
"props": {
"name": "advanced.geoip_auto_update_enabled",
"size": "md",
"disabled": "{{_computed.isReadOnly}}"
}
}
]
},
{
"id": "geoip_last_updated_block",
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white block"
},
"text": "$t:admin.settings.advanced.geoip_last_updated_at"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col md:flex-row md:items-center md:gap-3 space-y-2 md:space-y-0"
},
"children": [
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"disabled": true,
"value": "{{_local.form?.advanced?.geoip_last_updated_at ?? '-'}}",
"className": "w-full md:flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-900 text-gray-700 dark:text-gray-300 text-sm"
}
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly || _local.geoipUpdating === true}}",
"className": "w-full md:w-auto px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white text-sm font-medium rounded-lg transition-colors whitespace-nowrap"
},
"text": "{{_local.geoipUpdating === true ? $t('admin.settings.advanced.geoip_updating') : $t('admin.settings.advanced.geoip_manual_update')}}",
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "local",
"geoipUpdating": true,
"errors": {}
},
"onSuccess": [
{
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/settings/geoip/update",
"params": {
"method": "POST"
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "local",
"geoipUpdating": false,
"form": {
"advanced": {
"geoip_last_updated_at": "{{response.data?.last_updated_at ?? ''}}"
}
}
}
}
],
"onError": [
{
"handler": "setState",
"params": {
"target": "local",
"geoipUpdating": false,
"errors": {
"advanced.geoip_license_key": ["{{error.message ?? $t('admin.settings.advanced.geoip_update_failed')}}"]
}
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
File diff suppressed because it is too large. Load diff
@@ -449,7 +449,9 @@
"className": "w-full",
"disabled": "{{_computed.isReadOnly}}",
"placeholder": "$t:admin.settings.general.select_timezone",
"options": "{{_global.appConfig?.supportedTimezones?.map(tz => ({ value: tz, label: tz })) ?? []}}",
"options": "{{_global.appConfig?.supportedTimezones ?? []}}",
"searchable": true,
"searchPlaceholder": "{{$t('common.search')}}",
"error": "{{_local.errors?.['general.timezone']?.[0] ?? ''}}"
}
},
@@ -85,11 +85,7 @@
"className": "w-full",
"disabled": "{{_computed.isReadOnly}}",
"placeholder": "$t:admin.settings.mail.select_mailer",
"options": [
{ "label": "SMTP", "value": "smtp" },
{ "label": "Mailgun", "value": "mailgun" },
{ "label": "SES (Amazon)", "value": "ses" }
],
"options": "{{(_local.form?.available_drivers?.mail ?? []).map(d => ({value: d.id, label: $localized(d.label)}))}}",
"error": "{{_local.errors?.['mail.mailer']?.[0] ?? ''}}"
}
}
@@ -1,679 +0,0 @@
{
"meta": {
"is_partial": true,
"description": "환경설정 메일 템플릿 탭 콘텐츠"
},
"id": "tab_content_mail_templates",
"type": "basic",
"name": "Div",
"if": "{{(_global.activeSettingsTab || query.tab || 'general') === 'mail_templates'}}",
"props": {
"className": "mt-6 space-y-6"
},
"children": [
{
"id": "mail_templates_header",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between"
},
"children": [
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.mail_templates.title"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mt-1"
},
"text": "$t:admin.settings.mail_templates.description"
}
]
}
]
},
{
"id": "mail_templates_search",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "composite",
"name": "Select",
"props": {
"name": "mailTemplateSearchType",
"className": "w-32 px-3 py-2 bg-gray-100 dark:bg-gray-700 border-0 rounded-lg text-sm font-medium text-gray-700 dark:text-gray-300 focus:ring-2 focus:ring-indigo-500",
"value": "{{_local.mailTemplateFilter?.searchType || 'all'}}",
"options": [
{ "value": "all", "label": "$t:admin.settings.mail_templates.search_type_all" },
{ "value": "subject", "label": "$t:admin.settings.mail_templates.search_type_subject" },
{ "value": "body", "label": "$t:admin.settings.mail_templates.search_type_body" }
]
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"mailTemplateFilter.searchType": "{{$event.target.value}}"
}
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "relative flex-1"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fa-solid fa-search",
"className": "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500 text-sm pointer-events-none"
}
},
{
"type": "basic",
"name": "Input",
"props": {
"name": "mailTemplateSearch",
"type": "text",
"placeholder": "$t:admin.settings.mail_templates.search_placeholder",
"className": "w-full pl-10 pr-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",
"value": "{{_local.mailTemplateFilter?.search || ''}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"mailTemplateFilter.search": "{{$event.target.value}}"
}
},
{
"type": "keydown",
"key": "Enter",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"query": {
"tab": "mail_templates",
"page": 1,
"search": "{{_local.mailTemplateFilter?.search || undefined}}",
"search_type": "{{_local.mailTemplateFilter?.searchType !== 'all' ? _local.mailTemplateFilter?.searchType : undefined}}",
"per_page": "{{query.per_page || undefined}}"
}
}
}
]
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 transition-colors"
},
"text": "$t:admin.settings.mail_templates.btn_search",
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"query": {
"tab": "mail_templates",
"page": 1,
"search": "{{_local.mailTemplateFilter?.search || undefined}}",
"search_type": "{{_local.mailTemplateFilter?.searchType !== 'all' ? _local.mailTemplateFilter?.searchType : undefined}}",
"per_page": "{{query.per_page || undefined}}"
}
}
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 text-sm font-medium rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
},
"text": "$t:admin.settings.mail_templates.btn_reset_filter",
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"mailTemplateFilter": {
"search": "",
"searchType": "all"
}
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"query": {
"tab": "mail_templates"
},
"replace": true
}
}
]
}
]
}
]
}
]
},
{
"id": "mail_templates_info",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.mail_templates.total_count|count={{mailTemplates?.data?.pagination?.total ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.mail_templates.per_page_label"
},
{
"type": "composite",
"name": "Select",
"props": {
"name": "mailTemplatePerPage",
"className": "w-20 px-3 py-1.5 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm",
"value": "{{String(query.per_page || 20)}}",
"options": [
{ "value": "10", "label": "10" },
{ "value": "20", "label": "20" },
{ "value": "50", "label": "50" },
{ "value": "100", "label": "100" }
]
},
"actions": [
{
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {
"per_page": "{{$event.target.value}}",
"page": 1
}
}
}
]
}
]
}
]
},
{
"id": "mail_templates_list",
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-1 gap-4"
},
"children": [
{
"id": "template_card",
"type": "basic",
"name": "Div",
"iteration": {
"source": "{{mailTemplates?.data?.data ?? []}}",
"item_var": "tpl",
"index_var": "tplIdx"
},
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-5 flex items-start gap-3"
},
"children": [
{
"id": "btn_expand_{{tplIdx}}",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-shrink-0 pt-0.5"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "p-1.5 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{(_local.expandedMailTemplateIds ?? []).includes(tpl.id) ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'}}",
"className": "text-sm"
}
}
],
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "local",
"expandedMailTemplateIds": "{{(_local.expandedMailTemplateIds ?? []).includes(tpl.id) ? (_local.expandedMailTemplateIds ?? []).filter(id => id !== tpl.id) : [...(_local.expandedMailTemplateIds ?? []), tpl.id]}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-start justify-between"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 mb-1"
},
"children": [
{
"type": "basic",
"name": "H4",
"if": "{{tpl.is_default}}",
"props": {
"className": "text-base font-medium text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.mail_templates.types.{{tpl.type}}"
},
{
"type": "basic",
"name": "H4",
"if": "{{!tpl.is_default}}",
"props": {
"className": "text-base font-medium text-gray-900 dark:text-white"
},
"text": "{{tpl.type}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-mono px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded"
},
"text": "{{tpl.type}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "{{tpl.is_active ? 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300' : 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400'}} text-xs font-medium px-2 py-0.5 rounded-full"
},
"text": "{{tpl.is_active ? '$t:admin.settings.mail_templates.active' : '$t:admin.settings.mail_templates.inactive'}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{tpl.is_default}}",
"props": {
"className": "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300 text-xs font-medium px-2 py-0.5 rounded-full"
},
"text": "$t:admin.settings.mail_templates.default_badge"
}
]
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 truncate"
},
"text": "{{tpl.subject?.[$locale] ?? tpl.subject?.ko ?? ''}}"
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 ml-4 flex-shrink-0"
},
"children": [
{
"id": "btn_toggle_{{tplIdx}}",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly}}",
"className": "text-sm px-3 py-1.5 rounded-md border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"text": "{{tpl.is_active ? '$t:admin.settings.mail_templates.btn_deactivate' : '$t:admin.settings.mail_templates.btn_activate'}}",
"actions": [
{
"type": "click",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/mail-templates/{{tpl.id}}/toggle-active",
"params": {
"method": "PATCH"
},
"onSuccess": [
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {}
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.mail_templates.toggle_success",
"type": "success"
}
}
]
}
]
},
{
"id": "btn_edit_{{tplIdx}}",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly}}",
"className": "text-sm px-3 py-1.5 rounded-md bg-indigo-600 text-white hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"text": "$t:admin.settings.mail_templates.btn_edit",
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"editingTemplate": "{{tpl}}",
"editLang": "{{$locale}}",
"templateErrors": null,
"isSaving": false
}
},
{
"handler": "openModal",
"target": "modal_mail_template_form"
}
]
}
]
},
{
"id": "btn_reset_{{tplIdx}}",
"type": "basic",
"name": "Button",
"if": "{{!tpl.is_default}}",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly}}",
"className": "text-sm px-3 py-1.5 rounded-md border border-orange-300 dark:border-orange-600 text-orange-700 dark:text-orange-400 hover:bg-orange-50 dark:hover:bg-orange-900/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"text": "$t:admin.settings.mail_templates.btn_reset",
"actions": [
{
"type": "click",
"handler": "apiCall",
"auth_required": true,
"target": "/api/admin/mail-templates/{{tpl.id}}/reset",
"params": {
"method": "POST"
},
"onSuccess": [
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {}
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.mail_templates.reset_success",
"type": "success"
}
}
]
}
]
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "mt-3 flex flex-wrap gap-1.5"
},
"children": [
{
"type": "basic",
"name": "Span",
"iteration": {
"source": "{{tpl.variables ?? []}}",
"item_var": "variable",
"index_var": "varIdx"
},
"props": {
"className": "inline-flex items-center text-xs px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400 rounded font-mono"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "{"
},
{
"type": "basic",
"name": "Span",
"text": "{{variable.key}}"
},
{
"type": "basic",
"name": "Span",
"text": "} - {{variable.description ?? ''}}"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{(_local.expandedMailTemplateIds ?? []).includes(tpl.id)}}",
"props": {
"className": "mt-3 pt-3 border-t border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 mb-2"
},
"text": "$t:admin.settings.mail_templates.edit_modal.body"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-xs text-gray-700 dark:text-gray-300 bg-gray-50 dark:bg-gray-900/50 rounded-lg p-3 max-h-48 overflow-y-auto whitespace-pre-wrap font-mono"
},
"text": "{{tpl.body?.[$locale] ?? tpl.body?.ko ?? ''}}"
}
]
}
]
}
]
}
]
},
{
"id": "mail_templates_empty",
"type": "basic",
"name": "Div",
"if": "{{(mailTemplates?.data?.data ?? []).length === 0}}",
"props": {
"className": "text-center py-12 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fa-solid fa-envelope",
"className": "text-4xl text-gray-300 dark:text-gray-600 mb-3"
}
},
{
"type": "basic",
"name": "P",
"if": "{{query.search || query.search_type}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.mail_templates.empty_no_results"
},
{
"type": "basic",
"name": "P",
"if": "{{!query.search && !query.search_type}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.mail_templates.empty_message"
}
]
},
{
"id": "mail_templates_pagination",
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-center"
},
"children": [
{
"type": "composite",
"name": "Pagination",
"props": {
"currentPage": "{{mailTemplates?.data?.pagination?.current_page || 1}}",
"totalPages": "{{mailTemplates?.data?.pagination?.last_page || 1}}"
},
"actions": [
{
"event": "onPageChange",
"type": "action",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
}
}
]
}
]
}
]
}
@@ -0,0 +1,724 @@
{
"meta": {
"is_partial": true,
"description": "환경설정 알림 설정 탭 — 채널 토글 + 2단 탭 + 채널별 템플릿 목록"
},
"id": "tab_content_notification_definitions",
"type": "basic",
"name": "Div",
"if": "{{(_global.activeSettingsTab || query.tab || 'general') === 'notification_definitions'}}",
"props": {
"className": "mt-6 space-y-6"
},
"children": [
{
"id": "notif_header",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.notification_definitions.title"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mt-1"
},
"text": "$t:admin.settings.notification_definitions.description"
}
]
},
{
"id": "channel_toggles",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4"
},
"children": [
{
"type": "basic",
"name": "H4",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3"
},
"text": "$t:admin.settings.notification_definitions.channel_management"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "{{availableChannels?.data?.channels ?? []}}",
"item_var": "ch",
"index_var": "chIdx"
},
"props": {
"className": "flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{ch.icon ?? 'fas fa-bell'}}",
"className": "text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{ch.name?.[$locale] ?? ch.name?.ko ?? ch.id}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-xs text-gray-400 dark:text-gray-500"
},
"text": "{{ch.source_label?.[$locale] ?? ch.source_label?.ko ?? ch.source}}"
}
]
}
]
},
{
"type": "composite",
"name": "Toggle",
"props": {
"checked": "{{(_local.form?.notifications?.channels ?? []).find(c => c.id === ch.id)?.is_active ?? false}}",
"disabled": "{{_computed.isReadOnly}}"
},
"actions": [
{
"type": "change",
"handler": "setState",
"params": {
"target": "local",
"form.notifications.channels": "{{(_local.form?.notifications?.channels ?? []).map(c => c.id === ch.id ? {...c, is_active: !c.is_active} : c)}}",
"hasChanges": true
}
}
]
}
]
}
]
}
]
},
{
"id": "channel_sub_tabs",
"type": "basic",
"name": "Div",
"props": {
"className": "flex border-b border-gray-200 dark:border-gray-700 overflow-x-auto"
},
"children": [
{
"type": "basic",
"name": "Button",
"iteration": {
"source": "{{(availableChannels?.data?.channels ?? []).filter(c => (_local.form?.notifications?.channels ?? []).find(nc => nc.id === c.id)?.is_active !== false)}}",
"item_var": "ch",
"index_var": "chIdx"
},
"props": {
"type": "button",
"className": "{{(_local.activeNotificationChannel ?? query.channel ?? (availableChannels?.data?.channels ?? [])[0]?.id ?? 'mail') === ch.id ? 'border-b-2 border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'}} px-4 py-2.5 text-sm font-medium whitespace-nowrap flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{ch.icon ?? 'fas fa-bell'}}",
"className": "text-sm"
}
},
{
"type": "basic",
"name": "Span",
"text": "{{ch.name?.[$locale] ?? ch.name?.ko ?? ch.id}}"
}
],
"actions": [
{
"type": "click",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"activeNotificationChannel": "{{ch.id}}"
}
},
{
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {
"channel": "{{ch.id}}",
"page": 1
},
"transition_overlay_target": "notif_channel_content"
}
}
]
}
}
]
}
]
},
{
"id": "notif_channel_content",
"type": "basic",
"name": "Div",
"children": [
{
"id": "notif_list_info",
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center justify-between"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.total_count|count={{notificationDefinitions?.data?.pagination?.total ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.per_page_label"
},
{
"type": "composite",
"name": "Select",
"props": {
"name": "notifPerPage",
"className": "w-20 px-3 py-1.5 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm",
"value": "{{String(query.per_page || 20)}}",
"options": [
{
"value": "10",
"label": "10"
},
{
"value": "20",
"label": "20"
},
{
"value": "50",
"label": "50"
}
]
},
"actions": [
{
"type": "change",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {
"per_page": "{{$event.target.value}}",
"page": 1
}
}
}
]
}
]
}
]
},
{
"id": "notif_definitions_list",
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"iteration": {
"source": "{{notificationDefinitions?.data?.data ?? []}}",
"item_var": "def",
"index_var": "defIdx"
},
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-start gap-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-shrink-0 pt-0.5"
},
"children": [
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "p-1.5 rounded-md text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{(_local.expandedNotifications ?? {})[def.id] ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'}}",
"size": "sm"
}
}
],
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "local",
"expandedNotifications": "{{Object.assign({}, _local.expandedNotifications ?? {}, {[def.id]: !(_local.expandedNotifications ?? {})[def.id]})}}"
}
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 min-w-0"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap items-center gap-2 mb-1"
},
"children": [
{
"type": "basic",
"name": "H4",
"props": {
"className": "text-base font-medium text-gray-900 dark:text-white"
},
"text": "$t:admin.settings.notification_definitions.types.{{def.type}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-mono px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded"
},
"text": "{{def.type}}"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "{{def.is_active ? 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300' : 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400'}} text-xs font-medium px-2 py-0.5 rounded-full"
},
"text": "{{def.is_active ? '$t:admin.settings.notification_definitions.active' : '$t:admin.settings.notification_definitions.inactive'}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{def.is_default}}",
"props": {
"className": "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300 text-xs font-medium px-2 py-0.5 rounded-full"
},
"text": "$t:admin.settings.notification_definitions.default_badge"
}
]
},
{
"type": "basic",
"name": "P",
"if": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 truncate"
},
"text": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.subject?.[$locale] ?? ''}}"
},
{
"type": "basic",
"name": "P",
"if": "{{!(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))}}",
"props": {
"className": "text-sm text-gray-400 dark:text-gray-500 italic"
},
"text": "$t:admin.settings.notification_definitions.no_template_for_channel"
},
{
"id": "recipients_badge",
"type": "basic",
"name": "Div",
"if": "{{((def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.recipients ?? []).length > 0}}",
"props": {
"className": "flex flex-wrap items-center gap-1.5 mt-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.recipients_label"
},
{
"type": "basic",
"name": "Span",
"iteration": {
"source": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.recipients ?? []}}",
"item_var": "rcpt"
},
"props": {
"className": "inline-flex items-center gap-1 text-xs px-2 py-0.5 bg-purple-50 dark:bg-purple-900/30 border border-purple-200 dark:border-purple-700 text-purple-700 dark:text-purple-300 rounded-full"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "{{rcpt.type === 'trigger_user' ? '$t:admin.settings.notification_definitions.recipients.types.trigger_user' : rcpt.type === 'related_user' ? '$t:admin.settings.notification_definitions.recipients.types.related_user' + (rcpt.relation ? ' (' + rcpt.relation + ')' : '') : rcpt.type === 'role' ? '$t:admin.settings.notification_definitions.recipients.types.role' + ': ' + (rcpt.display_name ?? rcpt.value ?? '') : rcpt.type === 'specific_users' ? '$t:admin.settings.notification_definitions.recipients.types.specific_users' + ': ' + ((rcpt.display_names ?? []).join(', ') || '') : rcpt.type}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{rcpt.exclude_trigger_user}}",
"props": {
"className": "text-purple-500 dark:text-purple-400"
},
"text": "$t:admin.settings.notification_definitions.recipients.badge.exclude_self"
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{(def.variables ?? []).length > 0}}",
"props": {
"className": "flex flex-wrap gap-1 mt-2"
},
"children": [
{
"type": "basic",
"name": "Span",
"iteration": {
"source": "{{def.variables ?? []}}",
"item_var": "v"
},
"props": {
"className": "text-xs px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded font-mono"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "{"
},
{
"type": "basic",
"name": "Span",
"text": "{{v.key}}"
},
{
"type": "basic",
"name": "Span",
"text": "}"
}
]
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-3 flex-shrink-0"
},
"children": [
{
"type": "composite",
"name": "Toggle",
"if": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))}}",
"props": {
"checked": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.is_active ?? false}}",
"disabled": "{{_computed.isReadOnly}}"
},
"actions": [
{
"type": "change",
"handler": "apiCall",
"auth_required": true,
"target": "{{'/api/admin/notification-templates/' + (def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.id + '/toggle-active'}}",
"params": {
"method": "PATCH"
},
"onSuccess": [
{
"handler": "refetchDataSource",
"params": {
"dataSourceId": "notificationDefinitions"
}
},
{
"handler": "toast",
"params": {
"message": "$t:admin.settings.notification_definitions.toggle_success",
"type": "success"
}
}
]
}
]
},
{
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly}}",
"className": "text-sm px-3 py-1.5 rounded-md bg-indigo-600 text-white hover:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"text": "$t:admin.settings.notification_definitions.btn_edit",
"actions": [
{
"type": "click",
"handler": "sequence",
"params": {
"actions": [
{
"handler": "setState",
"params": {
"target": "local",
"editingDefinition": "{{def}}",
"editingTemplate": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))}}",
"editingRecipients": "{{JSON.parse(JSON.stringify((def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.recipients ?? []))}}",
"editLang": "{{$locale}}",
"templateErrors": null,
"isSaving": false
}
},
{
"handler": "openModal",
"target": "modal_notification_template_form"
}
]
}
}
]
},
{
"type": "basic",
"name": "Button",
"if": "{{!def.is_default || (def.templates ?? []).some(t => t.is_default === false)}}",
"props": {
"type": "button",
"disabled": "{{_computed.isReadOnly}}",
"className": "text-sm px-3 py-1.5 rounded-md border border-orange-300 dark:border-orange-600 text-orange-700 dark:text-orange-400 hover:bg-orange-50 dark:hover:bg-orange-900/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
},
"text": "$t:admin.settings.notification_definitions.btn_reset",
"actions": [
{
"type": "click",
"handler": "sequence",
"actions": [
{
"handler": "setState",
"params": {
"target": "global",
"resetTargetId": "{{def.id}}",
"resetTargetName": "$t:admin.settings.notification_definitions.types.{{def.type}}"
}
},
{
"handler": "openModal",
"target": "modal_notification_definition_reset"
}
]
}
]
}
]
}
]
},
{
"type": "basic",
"name": "Div",
"if": "{{(_local.expandedNotifications ?? {})[def.id]}}",
"props": {
"className": "mt-3 pt-3 border-t border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 mb-2 block"
},
"text": "$t:admin.settings.notification_definitions.body_preview"
},
{
"type": "composite",
"name": "HtmlContent",
"props": {
"content": "{{(def.templates ?? []).find(t => t.channel === (_local.activeNotificationChannel ?? query.channel ?? 'mail'))?.body?.[$locale] ?? ''}}",
"isHtml": true,
"className": "prose dark:prose-invert prose-sm max-w-none bg-gray-50 dark:bg-gray-900/50 rounded-lg p-3 max-h-48 overflow-y-auto"
}
}
]
}
]
}
]
}
]
}
]
},
{
"id": "notif_empty",
"type": "basic",
"name": "Div",
"if": "{{(notificationDefinitions?.data?.data ?? []).length === 0}}",
"props": {
"className": "text-center py-12 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "fa-solid fa-envelope",
"className": "text-4xl text-gray-300 dark:text-gray-600 mb-3"
}
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.settings.notification_definitions.empty_message"
}
]
},
{
"id": "notif_pagination",
"type": "basic",
"name": "Div",
"props": {
"className": "flex justify-center mt-4"
},
"children": [
{
"type": "composite",
"name": "Pagination",
"props": {
"currentPage": "{{notificationDefinitions?.data?.pagination?.current_page || 1}}",
"totalPages": "{{notificationDefinitions?.data?.pagination?.last_page || 1}}"
},
"actions": [
{
"event": "onPageChange",
"type": "action",
"handler": "navigate",
"params": {
"path": "/admin/settings",
"replace": true,
"mergeQuery": true,
"query": {
"page": "{{$args[0]}}"
}
}
}
]
}
]
}
]
}
]
}
@@ -149,162 +149,6 @@
}
]
},
{
"id": "card_analytics_settings",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-6"
},
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white mb-1"
},
"text": "$t:admin.settings.seo.analytics_settings"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mb-6"
},
"text": "$t:admin.settings.seo.analytics_settings_desc"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "space-y-4"
},
"children": [
{
"id": "field_google_analytics_id",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
},
"text": "$t:admin.settings.seo.google_analytics_id"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"name": "seo.google_analytics_id",
"placeholder": "G-XXXXXXXXXX",
"disabled": "{{_computed.isReadOnly}}",
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:text-gray-400 dark:disabled:text-gray-500 disabled:cursor-not-allowed"
}
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400 mt-1"
},
"text": "$t:admin.settings.seo.google_analytics_id_hint"
}
]
}
]
}
]
},
{
"id": "card_verification_settings",
"type": "basic",
"name": "Div",
"props": {
"className": "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-6"
},
"children": [
{
"type": "basic",
"name": "H3",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white mb-1"
},
"text": "$t:admin.settings.seo.verification_settings"
},
{
"type": "basic",
"name": "P",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400 mb-6"
},
"text": "$t:admin.settings.seo.verification_settings_desc"
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "grid grid-cols-1 md:grid-cols-2 gap-4"
},
"children": [
{
"id": "field_google_site_verification",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
},
"text": "$t:admin.settings.seo.google_site_verification"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"name": "seo.google_site_verification",
"placeholder": "google-site-verification=XXXX...",
"disabled": "{{_computed.isReadOnly}}",
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:text-gray-400 dark:disabled:text-gray-500 disabled:cursor-not-allowed"
}
}
]
},
{
"id": "field_naver_site_verification",
"type": "basic",
"name": "Div",
"children": [
{
"type": "basic",
"name": "Label",
"props": {
"className": "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
},
"text": "$t:admin.settings.seo.naver_site_verification"
},
{
"type": "basic",
"name": "Input",
"props": {
"type": "text",
"name": "seo.naver_site_verification",
"placeholder": "naver-site-verification=XXXX...",
"disabled": "{{_computed.isReadOnly}}",
"className": "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:text-gray-400 dark:disabled:text-gray-500 disabled:cursor-not-allowed"
}
}
]
}
]
}
]
},
{
"id": "card_bot_settings",
"type": "basic",
@@ -130,7 +130,13 @@
}
},
{
"handler": "refresh"
"handler": "refetchDataSource",
"params": {
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
}
],
"errorHandling": {
@@ -124,6 +124,9 @@
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -393,7 +393,6 @@
"id": "dependencies_section",
"type": "basic",
"name": "Div",
"if": "{{_global.selectedTemplate.dependencies && ((_global.selectedTemplate.dependencies.modules && _global.selectedTemplate.dependencies.modules.length > 0) || (_global.selectedTemplate.dependencies.plugins && _global.selectedTemplate.dependencies.plugins.length > 0))}}",
"children": [
{
"type": "basic",
@@ -420,6 +419,50 @@
}
]
},
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex items-center gap-2 mb-3"
},
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-700 dark:text-gray-300"
},
"text": "$t:admin.templates.modals.required_core_version"
},
{
"type": "basic",
"name": "Span",
"if": "{{_global.selectedTemplate.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 rounded font-mono"
},
"text": "{{_global.selectedTemplate.requires_core}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{!_global.selectedTemplate.requires_core}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded"
},
"text": "$t:admin.templates.modals.no_required_core_version"
}
]
},
{
"type": "basic",
"name": "P",
"if": "{{(!_global.selectedTemplate.dependencies?.modules || _global.selectedTemplate.dependencies.modules.length === 0) && (!_global.selectedTemplate.dependencies?.plugins || _global.selectedTemplate.dependencies.plugins.length === 0)}}",
"props": {
"className": "text-sm text-gray-500 dark:text-gray-400"
},
"text": "$t:admin.templates.modals.no_dependencies_required"
},
{
"type": "basic",
"name": "Div",
@@ -451,32 +494,77 @@
"item_var": "mod"
},
"props": {
"className": "flex items-center gap-2"
"className": "flex flex-wrap items-center gap-2 p-2 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{mod.is_met ? 'check-circle' : 'exclamation-circle'}}",
"className": "{{mod.is_met ? 'w-4 h-4 text-green-500' : 'w-4 h-4 text-amber-500'}}"
"name": "cube",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300"
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{mod.name || mod.identifier}}"
"text": "{{mod.name || mod.identifier}} ({{mod.identifier}})"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded font-mono"
},
"text": "({{mod.required_version}})"
"text": "$t:admin.templates.modals.dependency_required_version|version={{mod.required_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{mod.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded font-mono"
},
"text": "$t:admin.templates.modals.dependency_installed_version|version={{mod.installed_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{mod.is_met}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_met"
},
{
"type": "basic",
"name": "Span",
"if": "{{!mod.is_met && !mod.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_not_installed"
},
{
"type": "basic",
"name": "Span",
"if": "{{!mod.is_met && mod.installed_version && !mod.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-700 dark:text-yellow-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_inactive"
},
{
"type": "basic",
"name": "Span",
"if": "{{!mod.is_met && mod.installed_version && mod.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_unmet_version"
}
]
}
@@ -512,32 +600,77 @@
"item_var": "plug"
},
"props": {
"className": "flex items-center gap-2"
"className": "flex flex-wrap items-center gap-2 p-2 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700"
},
"children": [
{
"type": "basic",
"name": "Icon",
"props": {
"name": "{{plug.is_met ? 'check-circle' : 'exclamation-circle'}}",
"className": "{{plug.is_met ? 'w-4 h-4 text-green-500' : 'w-4 h-4 text-amber-500'}}"
"name": "puzzle-piece",
"className": "w-4 h-4 text-gray-500 dark:text-gray-400"
}
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-700 dark:text-gray-300"
"className": "text-sm font-medium text-gray-900 dark:text-white"
},
"text": "{{plug.name || plug.identifier}}"
"text": "{{plug.name || plug.identifier}} ({{plug.identifier}})"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs text-gray-500 dark:text-gray-400"
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded font-mono"
},
"text": "({{plug.required_version}})"
"text": "$t:admin.templates.modals.dependency_required_version|version={{plug.required_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{plug.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded font-mono"
},
"text": "$t:admin.templates.modals.dependency_installed_version|version={{plug.installed_version}}"
},
{
"type": "basic",
"name": "Span",
"if": "{{plug.is_met}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_met"
},
{
"type": "basic",
"name": "Span",
"if": "{{!plug.is_met && !plug.installed_version}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_not_installed"
},
{
"type": "basic",
"name": "Span",
"if": "{{!plug.is_met && plug.installed_version && !plug.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-700 dark:text-yellow-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_inactive"
},
{
"type": "basic",
"name": "Span",
"if": "{{!plug.is_met && plug.installed_version && plug.is_active}}",
"props": {
"className": "px-2 py-0.5 text-xs bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300 rounded"
},
"text": "$t:admin.templates.modals.dependency_unmet_version"
}
]
}
@@ -294,7 +294,13 @@
}
},
{
"handler": "refresh"
"handler": "refetchDataSource",
"params": {
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "toast",
@@ -121,6 +121,9 @@
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -449,6 +449,9 @@
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -295,6 +295,9 @@
"dataSourceId": "templates"
}
},
{
"handler": "reloadExtensions"
},
{
"handler": "closeModal"
}
@@ -314,16 +314,16 @@
{
"type": "basic",
"name": "Div",
"if": "{{_global.hasModifiedLayouts}}",
"if": "{{_global.hasModifiedTemplateLayouts}}",
"props": {
"className": "mb-2 p-2 bg-amber-50 dark:bg-amber-900/30 border border-amber-200 dark:border-amber-700 rounded text-xs text-amber-700 dark:text-amber-400"
},
"text": "$t:admin.templates.modals.modified_layouts_warning|count={{_global.modifiedLayoutsCount ?? 0}}"
"text": "$t:admin.templates.modals.modified_layouts_warning|count={{_global.modifiedTemplateLayoutsCount ?? 0}}"
},
{
"type": "basic",
"name": "Div",
"if": "{{!_global.hasModifiedLayouts}}",
"if": "{{!_global.hasModifiedTemplateLayouts}}",
"props": {
"className": "mb-2 p-2 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 rounded text-xs text-green-700 dark:text-green-400"
},
@@ -443,7 +443,7 @@
{
"type": "basic",
"name": "Div",
"if": "{{(_global.templateLayoutStrategy ?? 'overwrite') === 'keep' && _global.modifiedLayouts && _global.modifiedLayouts.length > 0}}",
"if": "{{(_global.templateLayoutStrategy ?? 'overwrite') === 'keep' && _global.modifiedTemplateLayouts && _global.modifiedTemplateLayouts.length > 0}}",
"props": {
"className": "ml-6 mt-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg"
},
@@ -454,7 +454,7 @@
"props": {
"className": "text-xs font-medium text-amber-700 dark:text-amber-300 mb-2"
},
"text": "$t:admin.templates.modals.modified_layouts_list_title|count={{_global.modifiedLayouts?.length ?? 0}}"
"text": "$t:admin.templates.modals.modified_layouts_list_title|count={{_global.modifiedTemplateLayouts?.length ?? 0}}"
},
{
"type": "basic",
@@ -467,7 +467,7 @@
"type": "basic",
"name": "Div",
"iteration": {
"source": "_global.modifiedLayouts",
"source": "_global.modifiedTemplateLayouts",
"item_var": "modLayout"
},
"props": {
@@ -615,9 +615,9 @@
"target": "global",
"selectedTemplate": null,
"templateLayoutStrategy": "overwrite",
"hasModifiedLayouts": false,
"modifiedLayoutsCount": 0,
"modifiedLayouts": []
"hasModifiedTemplateLayouts": false,
"modifiedTemplateLayoutsCount": 0,
"modifiedTemplateLayouts": []
}
},
{
@@ -428,9 +428,9 @@
"target": "global",
"selectedTemplate": "{{row}}",
"templateLayoutStrategy": "overwrite",
"hasModifiedLayouts": false,
"modifiedLayoutsCount": 0,
"modifiedLayouts": []
"hasModifiedTemplateLayouts": false,
"modifiedTemplateLayoutsCount": 0,
"modifiedTemplateLayouts": []
}
},
{
@@ -445,9 +445,9 @@
"handler": "setState",
"params": {
"target": "global",
"hasModifiedLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedLayouts": "{{response.data?.modified_layouts ?? []}}"
"hasModifiedTemplateLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedTemplateLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedTemplateLayouts": "{{response.data?.modified_layouts ?? []}}"
}
}
]
@@ -531,9 +531,9 @@
"target": "global",
"selectedTemplate": "{{row}}",
"templateLayoutStrategy": "overwrite",
"hasModifiedLayouts": false,
"modifiedLayoutsCount": 0,
"modifiedLayouts": []
"hasModifiedTemplateLayouts": false,
"modifiedTemplateLayoutsCount": 0,
"modifiedTemplateLayouts": []
}
},
{
@@ -548,9 +548,9 @@
"handler": "setState",
"params": {
"target": "global",
"hasModifiedLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedLayouts": "{{response.data?.modified_layouts ?? []}}"
"hasModifiedTemplateLayouts": "{{response.data?.has_modified_layouts ?? false}}",
"modifiedTemplateLayoutsCount": "{{response.data?.modified_count ?? 0}}",
"modifiedTemplateLayouts": "{{response.data?.modified_layouts ?? []}}"
}
}
]
@@ -1,6 +1,6 @@
{
"name": "sirsoft-admin_basic",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "Gnuboard7 Basic Admin Template Components",
"type": "module",
"main": "dist/components.js",
@@ -139,12 +139,12 @@
}
},
{
"path": "*/admin/mail-send-logs",
"layout": "admin_mail_send_log_list",
"path": "*/admin/notification-logs",
"layout": "admin_notification_log_list",
"auth_required": true,
"meta": {
"title": "$t:admin.mail_send_log.page_title",
"permission": "core.mail-send-logs.read"
"title": "$t:admin.notification_log.page_title",
"permission": "core.notification-logs.read"
}
},
{
@@ -119,10 +119,10 @@ const generateLargeJSON = (sizeInMB: number): string => {
const generateFixtures = () => {
const fixturesDir = path.join(__dirname, '../src/components/__tests__/__fixtures__');
// 디렉토리 확인
// 디렉토리 확인 및 자동 생성
if (!fs.existsSync(fixturesDir)) {
console.error(`❌ 디렉토리가 존재하지 않습니다: ${fixturesDir}`);
process.exit(1);
fs.mkdirSync(fixturesDir, { recursive: true });
console.log(`📁 디렉토리 생성: ${fixturesDir}`);
}
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
@@ -1,8 +1,8 @@
import React from 'react';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { describe, it, expect, vi, beforeAll, beforeEach, afterEach, afterAll } from 'vitest';
import { render, screen, waitFor, cleanup } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { readFileSync } from 'fs';
import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync, rmdirSync } from 'fs';
import { join } from 'path';
import { CodeEditor } from '../composite/CodeEditor';
import { LayoutFileList, LayoutFileItem } from '../composite/LayoutFileList';
@@ -42,6 +42,67 @@ vi.mock('@monaco-editor/react', () => ({
},
}));
const FIXTURES_DIR = join(__dirname, '__fixtures__');
const FIXTURE_FILES = [
{ size: 1, filename: 'test-1mb.json' },
{ size: 5, filename: 'test-5mb.json' },
{ size: 10, filename: 'test-10mb.json' },
];
/**
* 대용량 JSON 데이터 생성 (generate-test-fixtures.ts와 동일 로직)
*/
const generateLargeJSON = (sizeInMB: number): string => {
const targetSize = sizeInMB * 1024 * 1024;
const baseObject = {
id: 1,
name: 'test-layout',
version: '1.0.0',
components: [] as any[],
};
const sampleComponent = {
id: 'component-0',
type: 'div',
className: 'container flex flex-col items-center justify-center p-4 m-2',
children: [
{ id: 'child-0-1', type: 'h1', className: 'text-2xl font-bold', content: 'Title Component' },
{ id: 'child-0-2', type: 'p', className: 'text-base', content: 'Description text for the component' },
],
metadata: {
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
author: 'system',
tags: ['component', 'layout', 'container', 'responsive'],
},
};
const sampleJSON = JSON.stringify({ components: [sampleComponent] }, null, 2);
const componentSize = sampleJSON.length - JSON.stringify({ components: [] }, null, 2).length;
const baseSize = JSON.stringify(baseObject).length;
const componentsNeeded = Math.ceil((targetSize - baseSize) / componentSize * 1.1);
for (let i = 0; i < componentsNeeded; i++) {
baseObject.components.push({
id: `component-${i}`,
type: 'div',
className: 'container flex flex-col items-center justify-center p-4 m-2',
children: [
{ id: `child-${i}-1`, type: 'h1', className: 'text-2xl font-bold', content: `Title Component ${i}` },
{ id: `child-${i}-2`, type: 'p', className: 'text-base', content: `Description text for the component ${i}` },
],
metadata: {
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
author: 'system',
tags: ['component', 'layout', 'container', 'responsive'],
},
});
}
return JSON.stringify(baseObject, null, 2);
};
/**
* 픽스처 파일에서 테스트 데이터 로드
*/
@@ -77,6 +138,35 @@ const generateLargeVersionList = (count: number): VersionItem[] => {
};
describe('레이아웃 에디터 성능 테스트', () => {
beforeAll(() => {
// fixture 디렉토리 생성
if (!existsSync(FIXTURES_DIR)) {
mkdirSync(FIXTURES_DIR, { recursive: true });
}
// fixture 파일 생성
for (const { size, filename } of FIXTURE_FILES) {
const filePath = join(FIXTURES_DIR, filename);
if (!existsSync(filePath)) {
const data = generateLargeJSON(size);
writeFileSync(filePath, data, 'utf-8');
}
}
});
afterAll(() => {
// fixture 파일 삭제
for (const { filename } of FIXTURE_FILES) {
const filePath = join(FIXTURES_DIR, filename);
if (existsSync(filePath)) {
unlinkSync(filePath);
}
}
// fixture 디렉토리 삭제 (비어있을 때만)
if (existsSync(FIXTURES_DIR)) {
try { rmdirSync(FIXTURES_DIR); } catch { /* 디렉토리가 비어있지 않으면 무시 */ }
}
});
beforeEach(() => {
vi.clearAllMocks();
});
@@ -5,8 +5,8 @@ export interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInput
accept?: string;
/** 최대 파일 크기 (MB) */
maxSize?: number;
/** 파일 선택 시 콜백 */
onChange?: (file: File | null) => void;
/** 파일 선택 시 콜백 ({ target: { value } } 패턴) */
onChange?: (event: { target: { value: File | null; name: string } }) => void;
/** 에러 발생 시 콜백 */
onError?: (error: string) => void;
/** 버튼 텍스트 */
@@ -46,7 +46,7 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(({
if (!file) {
setFileName('');
onChange?.(null);
onChange?.({ target: { value: null, name: '' } });
return;
}
@@ -63,7 +63,7 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(({
}
setFileName(file.name);
onChange?.(file);
onChange?.({ target: { value: file, name: file.name } });
}, [maxSize, onChange, onError, inputRef]);
const handleClear = useCallback((e: React.MouseEvent) => {
@@ -72,7 +72,7 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(({
inputRef.current.value = '';
}
setFileName('');
onChange?.(null);
onChange?.({ target: { value: null, name: '' } });
}, [onChange, inputRef]);
return (
@@ -1,8 +1,10 @@
import React, { useMemo, useState, useRef, useEffect } from 'react';
import React, { useMemo, useState, useRef, useEffect, useCallback } from 'react';
import { createPortal } from 'react-dom';
import { Div } from './Div';
import { Button } from './Button';
import { Span } from './Span';
import { Svg } from './Svg';
import { Input } from './Input';
// Logger 설정 (G7Core 초기화 전에도 동작하도록 폴백 포함)
const logger = ((window as any).G7Core?.createLogger?.('Comp:Select')) ?? {
@@ -22,6 +24,10 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
error?: string;
options?: SelectOption[] | string[];
onChange?: (e: React.ChangeEvent<HTMLSelectElement> | { target: { value: string | number } }) => void;
/** 드롭다운 내 검색 input 활성화 (engine-v1.40.0+) */
searchable?: boolean;
/** 검색 input placeholder */
searchPlaceholder?: string;
}
/**
@@ -56,11 +62,17 @@ export const Select: React.FC<SelectProps> = ({
value,
onChange,
disabled,
searchable = false,
searchPlaceholder,
...props
}) => {
const [isOpen, setIsOpen] = useState(false);
const [searchTerm, setSearchTerm] = useState('');
const [dropdownPos, setDropdownPos] = useState<{ top?: number; bottom?: number; left: number; width: number } | null>(null);
const containerRef = useRef<HTMLDivElement>(null);
const buttonRef = useRef<HTMLButtonElement>(null);
const searchInputRef = useRef<HTMLInputElement>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
// options를 SelectOption[] 형식으로 정규화
const normalizedOptions = useMemo((): SelectOption[] | null => {
@@ -94,10 +106,79 @@ export const Select: React.FC<SelectProps> = ({
return selected?.label || '';
}, [normalizedOptions, value]);
// 외부 클릭 시 드롭다운 닫기
// searchable 모드에서 검색어로 필터링된 옵션
const visibleOptions = useMemo((): SelectOption[] | null => {
if (!normalizedOptions) return null;
if (!searchable || searchTerm.trim() === '') return normalizedOptions;
const needle = searchTerm.trim().toLowerCase();
return normalizedOptions.filter(opt =>
opt.label.toLowerCase().includes(needle) ||
String(opt.value).toLowerCase().includes(needle)
);
}, [normalizedOptions, searchable, searchTerm]);
// 드롭다운 열릴 때 검색어 초기화 및 input 포커스
useEffect(() => {
if (isOpen && searchable) {
setSearchTerm('');
// 다음 tick에 포커스 (DOM 렌더 이후)
const timer = setTimeout(() => searchInputRef.current?.focus(), 0);
return () => clearTimeout(timer);
}
if (!isOpen) {
setSearchTerm('');
}
}, [isOpen, searchable]);
/**
* 드롭다운 위치 계산 (버튼 기준 fixed positioning)
* Modal 등 overflow:hidden 컨테이너 내부에서도 정상 표시
*/
const updateDropdownPos = useCallback(() => {
if (!buttonRef.current) return;
const rect = buttonRef.current.getBoundingClientRect();
const spaceBelow = window.innerHeight - rect.bottom;
const dropdownMaxH = 280; // max-h-60(240px) + search(~40px)
// 아래 공간 부족 시 위로 열기
const openUpward = spaceBelow < dropdownMaxH && rect.top > spaceBelow;
if (openUpward) {
setDropdownPos({
bottom: window.innerHeight - rect.top + 4,
left: rect.left,
width: rect.width,
});
} else {
setDropdownPos({
top: rect.bottom + 4,
left: rect.left,
width: rect.width,
});
}
}, []);
// 드롭다운 열릴 때 위치 계산 + 스크롤/리사이즈 추적
useEffect(() => {
if (!isOpen) {
setDropdownPos(null);
return;
}
updateDropdownPos();
window.addEventListener('scroll', updateDropdownPos, true);
window.addEventListener('resize', updateDropdownPos);
return () => {
window.removeEventListener('scroll', updateDropdownPos, true);
window.removeEventListener('resize', updateDropdownPos);
};
}, [isOpen, updateDropdownPos]);
// 외부 클릭 시 드롭다운 닫기 (Portal 영역 포함)
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (containerRef.current && !containerRef.current.contains(event.target as Node)) {
const target = event.target as Node;
if (
containerRef.current && !containerRef.current.contains(target) &&
(!dropdownRef.current || !dropdownRef.current.contains(target))
) {
setIsOpen(false);
}
};
@@ -190,13 +271,34 @@ export const Select: React.FC<SelectProps> = ({
</Svg>
</Button>
{isOpen && (
{isOpen && dropdownPos && createPortal(
<Div
className="absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden"
ref={dropdownRef}
className="fixed z-[9999] bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden"
style={{ top: dropdownPos.top, bottom: dropdownPos.bottom, left: dropdownPos.left, width: dropdownPos.width }}
role="listbox"
>
{searchable && (
<Div className="p-2 border-b border-gray-200 dark:border-gray-600">
<Input
ref={searchInputRef}
type="text"
value={searchTerm}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setSearchTerm(e.target.value)}
placeholder={searchPlaceholder ?? 'Search...'}
className="w-full px-3 py-2 bg-gray-100 dark:bg-gray-700 border-0 rounded-lg text-sm text-gray-700 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:outline-none"
role="searchbox"
aria-label={searchPlaceholder ?? 'Search'}
/>
</Div>
)}
<Div className="py-2 max-h-60 overflow-auto">
{normalizedOptions.map((option) => {
{visibleOptions && visibleOptions.length === 0 && (
<Div className="px-4 py-3 text-sm text-gray-500 dark:text-gray-400 text-center">
{searchTerm ? 'No results' : ''}
</Div>
)}
{(visibleOptions ?? []).map((option) => {
const isSelected = String(option.value) === String(value);
return (
<Button
@@ -225,7 +327,8 @@ export const Select: React.FC<SelectProps> = ({
);
})}
</Div>
</Div>
</Div>,
document.body
)}
</Div>
);
@@ -53,7 +53,7 @@ describe('FileInput 컴포넌트', () => {
fireEvent.change(fileInput);
expect(handleChange).toHaveBeenCalledWith(file);
expect(handleChange).toHaveBeenCalledWith({ target: { value: file, name: 'test.zip' } });
});
it('파일 선택 시 파일명이 표시된다', () => {
@@ -114,7 +114,7 @@ describe('FileInput 컴포넌트', () => {
fireEvent.change(fileInput);
expect(handleError).not.toHaveBeenCalled();
expect(handleChange).toHaveBeenCalledWith(file);
expect(handleChange).toHaveBeenCalledWith({ target: { value: file, name: 'small.zip' } });
});
});
@@ -147,12 +147,12 @@ describe('FileInput 컴포넌트', () => {
});
fireEvent.change(fileInput);
expect(handleChange).toHaveBeenCalledWith(file);
expect(handleChange).toHaveBeenCalledWith({ target: { value: file, name: 'test.zip' } });
const clearButton = screen.getByLabelText('Clear file');
fireEvent.click(clearButton);
expect(handleChange).toHaveBeenLastCalledWith(null);
expect(handleChange).toHaveBeenLastCalledWith({ target: { value: null, name: '' } });
expect(screen.getByText('No file selected')).toBeTruthy();
});
});
@@ -216,7 +216,7 @@ describe('FileInput 컴포넌트', () => {
fireEvent.change(fileInput);
expect(handleChange).toHaveBeenCalledWith(null);
expect(handleChange).toHaveBeenCalledWith({ target: { value: null, name: '' } });
});
});
});
@@ -614,4 +614,124 @@ describe('Select 컴포넌트', () => {
expect(select).toBeTruthy();
});
});
// ========================================
// searchable 모드 (engine-v1.40.0+)
// ========================================
describe('searchable 모드', () => {
const timezoneOptions = [
{ value: 'Asia/Seoul', label: '(UTC+09:00) Asia/Seoul' },
{ value: 'Asia/Tokyo', label: '(UTC+09:00) Asia/Tokyo' },
{ value: 'America/New_York', label: '(UTC-05:00) America/New_York' },
{ value: 'Europe/London', label: '(UTC+00:00) Europe/London' },
{ value: 'Pacific/Auckland', label: '(UTC+13:00) Pacific/Auckland' },
];
it('searchable=false 기본값에서는 검색 input이 렌더링되지 않는다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} />);
fireEvent.click(screen.getByRole('button'));
expect(screen.queryByRole('searchbox')).toBeNull();
});
it('searchable=true 시 드롭다운 내 검색 input이 렌더링된다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
fireEvent.click(screen.getByRole('button'));
expect(screen.getByRole('searchbox')).toBeTruthy();
});
it('searchPlaceholder가 input placeholder로 적용된다', () => {
render(
<Select
options={timezoneOptions}
value="Asia/Seoul"
onChange={() => {}}
searchable
searchPlaceholder="타임존 검색..."
/>
);
fireEvent.click(screen.getByRole('button'));
const input = screen.getByRole('searchbox') as HTMLInputElement;
expect(input.placeholder).toBe('타임존 검색...');
});
it('검색어 입력 시 라벨 기준으로 옵션이 필터링된다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
fireEvent.click(screen.getByRole('button'));
const input = screen.getByRole('searchbox');
fireEvent.change(input, { target: { value: 'tokyo' } });
const visibleOptions = screen.getAllByRole('option');
expect(visibleOptions.length).toBe(1);
expect(visibleOptions[0].textContent).toContain('Asia/Tokyo');
});
it('검색은 대소문자를 구분하지 않는다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
fireEvent.click(screen.getByRole('button'));
fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'LONDON' } });
const visibleOptions = screen.getAllByRole('option');
expect(visibleOptions.length).toBe(1);
expect(visibleOptions[0].textContent).toContain('Europe/London');
});
it('value 문자열에 대해서도 검색된다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
fireEvent.click(screen.getByRole('button'));
fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'pacific' } });
const visibleOptions = screen.getAllByRole('option');
expect(visibleOptions.length).toBe(1);
expect(visibleOptions[0].textContent).toContain('Pacific/Auckland');
});
it('검색 결과가 없으면 "No results" 메시지가 표시된다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
fireEvent.click(screen.getByRole('button'));
fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'nonexistent-zzz' } });
expect(screen.queryAllByRole('option').length).toBe(0);
expect(screen.getByText('No results')).toBeTruthy();
});
it('필터된 옵션 선택 시 onChange가 호출되고 드롭다운이 닫힌다', () => {
const handleChange = vi.fn();
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={handleChange} searchable />);
fireEvent.click(screen.getByRole('button'));
fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'tokyo' } });
const tokyoOption = screen.getAllByRole('option')[0];
fireEvent.click(tokyoOption);
expect(handleChange).toHaveBeenCalledTimes(1);
expect(handleChange).toHaveBeenCalledWith(
expect.objectContaining({ target: { value: 'Asia/Tokyo' } })
);
expect(screen.queryByRole('listbox')).toBeNull();
});
it('드롭다운을 다시 열면 검색어가 초기화된다', () => {
render(<Select options={timezoneOptions} value="Asia/Seoul" onChange={() => {}} searchable />);
// 첫 번째 열기 + 필터링
fireEvent.click(screen.getByRole('button'));
fireEvent.change(screen.getByRole('searchbox'), { target: { value: 'tokyo' } });
expect(screen.getAllByRole('option').length).toBe(1);
// 닫기 (외부 클릭 대신 ESC)
fireEvent.keyDown(document, { key: 'Escape' });
expect(screen.queryByRole('listbox')).toBeNull();
// 다시 열기 — 검색어가 초기화되어 모든 옵션이 보여야 함
fireEvent.click(screen.getByRole('button'));
expect(screen.getAllByRole('option').length).toBe(timezoneOptions.length);
const input = screen.getByRole('searchbox') as HTMLInputElement;
expect(input.value).toBe('');
});
});
});
@@ -168,6 +168,8 @@ export interface DataGridFooterCell {
}
export interface DataGridProps {
/** DOM id (transition_overlay.target / overlay_target 으로 spinner mount 영역 지정용) */
id?: string;
columns: DataGridColumn[];
data: any[];
sortable?: boolean;
@@ -556,6 +558,7 @@ const renderSubRowChildren = (
* }
*/
export const DataGrid: React.FC<DataGridProps> = ({
id,
columns,
data,
sortable = true,
@@ -1112,7 +1115,7 @@ export const DataGrid: React.FC<DataGridProps> = ({
// 모바일 카드 뷰
if (isMobileView) {
return (
<Div className={`w-full ${className}`} style={style}>
<Div id={id} className={`w-full ${className}`} style={style}>
{/* 컬럼 선택 메뉴 */}
{showColumnSelector && (
<Div className="mb-4 flex justify-end">
@@ -1168,20 +1171,22 @@ export const DataGrid: React.FC<DataGridProps> = ({
</Div>
)}
{/* 카드 목록 */}
{paginatedData && paginatedData.length > 0 ? (
paginatedData.map((row, index) => (
<Div key={row[idField] || index}>
{cardRenderer
? cardRenderer(row, displayColumns)
: defaultCardRenderer(row, displayColumns)}
{/* 카드 목록 — body wrapper 에 `${id}__body` 부여 (pagination 제외 영역) */}
<Div id={id ? `${id}__body` : undefined}>
{paginatedData && paginatedData.length > 0 ? (
paginatedData.map((row, index) => (
<Div key={row[idField] || index}>
{cardRenderer
? cardRenderer(row, displayColumns)
: defaultCardRenderer(row, displayColumns)}
</Div>
))
) : (
<Div className="text-center py-8 text-gray-500 dark:text-gray-400">
{resolvedEmptyMessage}
</Div>
))
) : (
<Div className="text-center py-8 text-gray-500 dark:text-gray-400">
{resolvedEmptyMessage}
</Div>
)}
)}
</Div>
{/* 푸터 (모바일 카드 뷰) - v1.19.0+ */}
{footerCells && footerCells.length > 0 && paginatedData && paginatedData.length > 0 && (
@@ -1229,7 +1234,7 @@ export const DataGrid: React.FC<DataGridProps> = ({
// 데스크톱 테이블 뷰
return (
<Div className={`w-full ${className}`} style={style}>
<Div id={id} className={`w-full ${className}`} style={style}>
{/* 컬럼 선택 메뉴 */}
{showColumnSelector && (
<Div className="mb-4 flex justify-end">
@@ -1285,8 +1290,8 @@ export const DataGrid: React.FC<DataGridProps> = ({
</Div>
)}
{/* 테이블 */}
<Div className="overflow-x-auto border border-gray-200 dark:border-gray-700 rounded-lg">
{/* 테이블 — body wrapper 에 `${id}__body` 부여 (pagination 제외 영역) */}
<Div id={id ? `${id}__body` : undefined} className="overflow-x-auto border border-gray-200 dark:border-gray-700 rounded-lg">
<Table className="w-full">
<Thead className="bg-gray-50 dark:bg-gray-700">
<Tr>
@@ -147,6 +147,8 @@ export function useFileUploader(options: UseFileUploaderOptions): UseFileUploade
const galleryKeyRef = useRef(0);
// 인증된 이미지 URL 캐시 (기존 첨부파일용)
const [authenticatedImageUrls, setAuthenticatedImageUrls] = useState<Map<number, string>>(new Map());
// ref로 URL 캐시 추적 (stale closure 방지 — cleanup/has 체크에서 항상 최신 참조)
const authenticatedImageUrlsRef = useRef<Map<number, string>>(new Map());
// onFilesChange를 ref로 관리하여 useEffect 의존성에서 제거
// (Form 자동 바인딩이 매 렌더링마다 새 함수 참조를 생성하므로
@@ -651,35 +653,56 @@ export function useFileUploader(options: UseFileUploaderOptions): UseFileUploade
// 기존 첨부파일 인증된 이미지 URL 로드 (갤러리용)
useEffect(() => {
let cancelled = false;
const loadAuthenticatedUrls = async () => {
const existingImageFiles = existingFiles.filter((f) => f.mime_type?.startsWith('image/') ?? false);
// is_image 필드 사용 (imageFiles 필터와 일치)
const existingImageFiles = existingFiles.filter((f) => f.is_image);
// existingFiles에서 제거된 파일의 URL 정리
const currentIds = new Set(existingImageFiles.map((f) => f.id));
for (const [id, url] of authenticatedImageUrlsRef.current) {
if (!currentIds.has(id)) {
URL.revokeObjectURL(url);
authenticatedImageUrlsRef.current.delete(id);
}
}
for (const file of existingImageFiles) {
if (!authenticatedImageUrls.has(file.id)) {
try {
const blob = await G7Core.api.get(file.download_url, {
responseType: 'blob',
});
if (blob) {
const objectUrl = URL.createObjectURL(blob);
setAuthenticatedImageUrls((prev) => new Map(prev).set(file.id, objectUrl));
}
} catch (error) {
logger.error('Failed to load authenticated image:', error);
if (cancelled) break;
// ref 기반 has 체크 (stale closure 방지)
if (authenticatedImageUrlsRef.current.has(file.id)) continue;
try {
const blob = await G7Core.api.get(file.download_url, {
responseType: 'blob',
});
if (!cancelled && blob) {
const objectUrl = URL.createObjectURL(blob);
authenticatedImageUrlsRef.current.set(file.id, objectUrl);
setAuthenticatedImageUrls(new Map(authenticatedImageUrlsRef.current));
}
} catch (error) {
logger.error('Failed to load authenticated image:', error);
}
}
};
loadAuthenticatedUrls();
// 클린업: 컴포넌트 언마운트 시 URL 해제
return () => {
authenticatedImageUrls.forEach((url) => URL.revokeObjectURL(url));
cancelled = true;
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [existingFiles]);
// 언마운트 시에만 모든 인증된 이미지 URL 해제
useEffect(() => {
return () => {
authenticatedImageUrlsRef.current.forEach((url) => URL.revokeObjectURL(url));
authenticatedImageUrlsRef.current.clear();
};
}, []);
// 파일 다운로드 실행
const handleDownload = useCallback(async (item: Attachment) => {
const { executeImageDownload } = await import('../ImageGallery');
Loaded 100 of 1165 files, more files were not shown because too many files have changed in this diff. Show more