@bwg-ui/core 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/BwgLargeUploader-1yDku10l.cjs +3 -0
- package/dist/chunks/BwgLargeUploader-1yDku10l.cjs.map +1 -0
- package/dist/chunks/{BwgLargeUploader-CZllyq7K.js → BwgLargeUploader-DsaIHpYz.js} +311 -297
- package/dist/chunks/BwgLargeUploader-DsaIHpYz.js.map +1 -0
- package/dist/chunks/LoadingOverlay-CAO6_FuF.js +29 -0
- package/dist/chunks/LoadingOverlay-CAO6_FuF.js.map +1 -0
- package/dist/chunks/LoadingOverlay-NX9Mo_6n.cjs +2 -0
- package/dist/chunks/LoadingOverlay-NX9Mo_6n.cjs.map +1 -0
- package/dist/chunks/{PublicLayout-BiTPwkVq.cjs → PublicLayout-3v46YZdi.cjs} +2 -2
- package/dist/chunks/{PublicLayout-BiTPwkVq.cjs.map → PublicLayout-3v46YZdi.cjs.map} +1 -1
- package/dist/chunks/{PublicLayout-g9WMtoZ0.js → PublicLayout-B4wGo0ut.js} +2 -2
- package/dist/chunks/{PublicLayout-g9WMtoZ0.js.map → PublicLayout-B4wGo0ut.js.map} +1 -1
- package/dist/chunks/{SSOHandler-Bu3v95k0.js → SSOHandler-DNvCpRTu.js} +2565 -2568
- package/dist/chunks/SSOHandler-DNvCpRTu.js.map +1 -0
- package/dist/chunks/SSOHandler-Qm_2PekO.cjs +184 -0
- package/dist/chunks/SSOHandler-Qm_2PekO.cjs.map +1 -0
- package/dist/chunks/ScreenProtectContext-3my4PHFa.js +154 -0
- package/dist/chunks/ScreenProtectContext-3my4PHFa.js.map +1 -0
- package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs +2 -0
- package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs.map +1 -0
- package/dist/chunks/{UtilsContext-CSgz9o2Z.js → UtilsContext-BKUZmmKx.js} +2 -2
- package/dist/chunks/{UtilsContext-CSgz9o2Z.js.map → UtilsContext-BKUZmmKx.js.map} +1 -1
- package/dist/chunks/{UtilsContext-5l7yFRQI.cjs → UtilsContext-DczQBfFi.cjs} +2 -2
- package/dist/chunks/{UtilsContext-5l7yFRQI.cjs.map → UtilsContext-DczQBfFi.cjs.map} +1 -1
- package/dist/chunks/{commonUtils-BV6WFv-z.js → commonUtils-Cvx6_eK2.js} +24 -23
- package/dist/chunks/commonUtils-Cvx6_eK2.js.map +1 -0
- package/dist/chunks/commonUtils-DaFg0y7C.cjs +2 -0
- package/dist/chunks/commonUtils-DaFg0y7C.cjs.map +1 -0
- package/dist/chunks/menuViewStore-BhfgX53f.js +343 -0
- package/dist/chunks/menuViewStore-BhfgX53f.js.map +1 -0
- package/dist/chunks/menuViewStore-w4fLSR6N.cjs +3 -0
- package/dist/chunks/menuViewStore-w4fLSR6N.cjs.map +1 -0
- package/dist/components/common/BwgButtonGroup.d.ts +2 -2
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgTitleBox.d.ts +2 -2
- package/dist/components/common/BwgTitleBox.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/QuickServiceToggle.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgForm.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts +5 -0
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/components/layout/LoadingOverlay.d.ts +5 -0
- package/dist/components/layout/LoadingOverlay.d.ts.map +1 -0
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +3 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +295 -291
- package/dist/index.js.map +1 -1
- package/dist/provider/contexts/ScreenProtectContext.d.ts +9 -4
- package/dist/provider/contexts/ScreenProtectContext.d.ts.map +1 -1
- package/dist/provider/hooks/index.d.ts +0 -1
- package/dist/provider/hooks/index.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +2 -2
- package/dist/stores/favoriteStore.d.ts +1 -1
- package/dist/stores/favoriteStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.cjs.map +1 -1
- package/dist/stores/index.d.ts +36 -3
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/index.js +17 -15
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/menuModelStore.d.ts +36 -0
- package/dist/stores/menuModelStore.d.ts.map +1 -0
- package/dist/stores/menuViewStore.d.ts +33 -0
- package/dist/stores/menuViewStore.d.ts.map +1 -0
- package/dist/styles/assets/images/contents/icon/ico-quick-tab-move.svg +4 -4
- package/dist/styles/assets/images/logos/krx-logo-full.svg +35 -35
- package/dist/styles/components.css +2 -2
- package/dist/styles/layout.css +7 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +10 -4
- package/scripts/gen-component-registry.js +138 -0
- package/dist/chunks/BwgLargeUploader-CZllyq7K.js.map +0 -1
- package/dist/chunks/BwgLargeUploader-xAjj4TQ1.cjs +0 -3
- package/dist/chunks/BwgLargeUploader-xAjj4TQ1.cjs.map +0 -1
- package/dist/chunks/SSOHandler-Bu3v95k0.js.map +0 -1
- package/dist/chunks/SSOHandler-kghWABfM.cjs +0 -184
- package/dist/chunks/SSOHandler-kghWABfM.cjs.map +0 -1
- package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs +0 -2
- package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs.map +0 -1
- package/dist/chunks/ScreenProtectContext-zByHldrr.js +0 -115
- package/dist/chunks/ScreenProtectContext-zByHldrr.js.map +0 -1
- package/dist/chunks/commonUtils-BV6WFv-z.js.map +0 -1
- package/dist/chunks/commonUtils-L9Jgc5y-.cjs +0 -2
- package/dist/chunks/commonUtils-L9Jgc5y-.cjs.map +0 -1
- package/dist/chunks/menuStore-2zsN-PRt.js +0 -266
- package/dist/chunks/menuStore-2zsN-PRt.js.map +0 -1
- package/dist/chunks/menuStore-D7zl2c89.cjs +0 -2
- package/dist/chunks/menuStore-D7zl2c89.cjs.map +0 -1
- package/dist/provider/hooks/useViewState.d.ts +0 -15
- package/dist/provider/hooks/useViewState.d.ts.map +0 -1
- package/dist/stores/menuStore.d.ts +0 -53
- package/dist/stores/menuStore.d.ts.map +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// dev_core/scripts/gen-component-registry.js
|
|
3
|
+
// ★ 자동 생성 스크립트 (marker-only)
|
|
4
|
+
// - export const cpntTabId (필수), export const cpntTabTitle (선택) 이 있는 파일만 레지스트리에 포함
|
|
5
|
+
// - 중복 cpntTabId 발견 시 빌드 실패
|
|
6
|
+
// - 접미사/폴더 규칙 없음 (원하면 GLOB_PATTERN 좁혀도 됨)
|
|
7
|
+
|
|
8
|
+
import fs from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import fg from "fast-glob";
|
|
11
|
+
|
|
12
|
+
// ── CLI 인자 처리 ───────────────────────────────────────────────
|
|
13
|
+
const args = process.argv.slice(2);
|
|
14
|
+
let rootDir = process.cwd();
|
|
15
|
+
let includePattern = "src/pages/views/content/**/*.tsx";
|
|
16
|
+
|
|
17
|
+
for (let i = 0; i < args.length; i++) {
|
|
18
|
+
if (args[i] === "--root" && args[i + 1]) {
|
|
19
|
+
rootDir = path.resolve(args[i + 1]);
|
|
20
|
+
i++;
|
|
21
|
+
} else if (args[i] === "--include" && args[i + 1]) {
|
|
22
|
+
includePattern = args[i + 1];
|
|
23
|
+
i++;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// ── 설정 ───────────────────────────────────────────────────────
|
|
28
|
+
const PKG_ROOT = rootDir;
|
|
29
|
+
const SRC_DIR = path.join(PKG_ROOT, "src");
|
|
30
|
+
|
|
31
|
+
// 스캔할 범위
|
|
32
|
+
const GLOB_PATTERN = includePattern;
|
|
33
|
+
const EXCLUDES = ["**/*.internal.*"];
|
|
34
|
+
|
|
35
|
+
// 생성 대상 파일(이 모듈을 앱에서 import)
|
|
36
|
+
const OUT_FILE = path.join(SRC_DIR, "pages", "views", "componentRegistry.ts");
|
|
37
|
+
|
|
38
|
+
// ── 유틸 ───────────────────────────────────────────────────────
|
|
39
|
+
function readFileSafe(p) {
|
|
40
|
+
try {
|
|
41
|
+
return fs.readFileSync(p, "utf8");
|
|
42
|
+
} catch {
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function extractMeta(src) {
|
|
48
|
+
// export const cpntTabId = '...'; export const cpntTabTitle = '...';
|
|
49
|
+
const id = src.match(/export\s+const\s+cpntTabId\s*=\s*["'`](.+?)["'`]/);
|
|
50
|
+
const cpntTabTitle = src.match(
|
|
51
|
+
/export\s+const\s+cpntTabTitle\s*=\s*["'`](.+?)["'`]/
|
|
52
|
+
);
|
|
53
|
+
return {
|
|
54
|
+
cpntTabId: id?.[1] ?? null,
|
|
55
|
+
cpntTabTitle: cpntTabTitle?.[1] ?? null,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function importPathFromRel(rel) {
|
|
60
|
+
// ./views로 시작하도록 경로 변경 (src/pages/ 제거)
|
|
61
|
+
return "./" + rel.replace(/\\/g, "/").replace("src/pages/views/", "");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ── 메인 ───────────────────────────────────────────────────────
|
|
65
|
+
async function run() {
|
|
66
|
+
const files = await fg(GLOB_PATTERN, { ignore: EXCLUDES, onlyFiles: true });
|
|
67
|
+
const idSet = new Set();
|
|
68
|
+
const entries = [];
|
|
69
|
+
|
|
70
|
+
for (const rel of files) {
|
|
71
|
+
const abs = path.join(PKG_ROOT, rel);
|
|
72
|
+
const src = readFileSafe(abs);
|
|
73
|
+
if (!src) continue;
|
|
74
|
+
|
|
75
|
+
const { cpntTabId, cpntTabTitle } = extractMeta(src);
|
|
76
|
+
if (!cpntTabId) continue; // ✅ 마커 없는 파일 제외
|
|
77
|
+
|
|
78
|
+
if (idSet.has(cpntTabId)) {
|
|
79
|
+
console.error(`\n❌ 중복 cpntTabId 감지: "${cpntTabId}"`);
|
|
80
|
+
console.error(` 충돌 파일 중 하나: ${rel}`);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
idSet.add(cpntTabId);
|
|
84
|
+
|
|
85
|
+
const importPath = importPathFromRel(rel);
|
|
86
|
+
const baseNameNoExt = path.basename(rel).replace(/\.[tj]sx?$/i, "");
|
|
87
|
+
entries.push({
|
|
88
|
+
cpntTabId,
|
|
89
|
+
label: cpntTabTitle || baseNameNoExt,
|
|
90
|
+
importPath,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 정렬(가독성)
|
|
95
|
+
entries.sort((a, b) => a.cpntTabId.localeCompare(b.cpntTabId));
|
|
96
|
+
|
|
97
|
+
const header = `// ★ 자동 생성 파일 (수정 금지)
|
|
98
|
+
// 생성시각: ${new Date().toISOString()}
|
|
99
|
+
// 기준: export const cpntTabId[; cpntTabTitle] 마커가 있는 파일만 포함됩니다.
|
|
100
|
+
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
const componentsBlock = `export const COMPONENTS: Record<string, () => Promise<any>> = {
|
|
104
|
+
${entries
|
|
105
|
+
.map(
|
|
106
|
+
(e) =>
|
|
107
|
+
` ${JSON.stringify(e.cpntTabId)}: () => import(${JSON.stringify(
|
|
108
|
+
e.importPath
|
|
109
|
+
)}),`
|
|
110
|
+
)
|
|
111
|
+
.join("\n")}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
const labelsBlock = `export const COMPONENT_LABEL: Record<string, string> = {
|
|
117
|
+
${entries
|
|
118
|
+
.map((e) => ` ${JSON.stringify(e.cpntTabId)}: ${JSON.stringify(e.label)},`)
|
|
119
|
+
.join("\n")}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
const code = header + componentsBlock + labelsBlock;
|
|
125
|
+
|
|
126
|
+
fs.mkdirSync(path.dirname(OUT_FILE), { recursive: true });
|
|
127
|
+
fs.writeFileSync(OUT_FILE, code, "utf8");
|
|
128
|
+
console.log(
|
|
129
|
+
`✅ Generated: ${path.relative(PKG_ROOT, OUT_FILE)} (entries: ${
|
|
130
|
+
entries.length
|
|
131
|
+
})`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
run().catch((err) => {
|
|
136
|
+
console.error(err);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
});
|