@simplysm/sd-claude 14.0.47 → 14.0.49
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/{claude/references/sd-simplysm14/sd-claude/usage.md → README.md} +2 -2
- package/claude/rules/sd-claude-rules.md +25 -10
- package/claude/rules/sd-options.md +11 -6
- package/claude/sd-subagent-start.sh +6 -0
- package/claude/settings.json +1 -12
- package/claude/skills/sd-check/SKILL.md +43 -12
- package/claude/skills/sd-claude-docs/SKILL.md +30 -58
- package/claude/skills/sd-claude-docs/references/package-claudemd.md +12 -0
- package/claude/skills/sd-claude-docs/references/package-doc-gen.md +26 -13
- package/claude/skills/sd-commit/SKILL.md +1 -1
- package/claude/skills/sd-debug/SKILL.md +5 -3
- package/claude/skills/sd-deliverable/SKILL.md +1 -1
- package/claude/skills/sd-dev/SKILL.md +14 -9
- package/claude/skills/sd-doc-extract/SKILL.md +8 -10
- package/claude/skills/sd-doc-extract/_common.py +8 -1
- package/claude/skills/sd-doc-extract/_extract_docx.py +74 -34
- package/claude/skills/sd-doc-extract/_extract_pdf.py +12 -1
- package/claude/skills/sd-doc-extract/_extract_pptx.py +103 -23
- package/claude/skills/sd-doc-extract/_extract_xlsb.py +93 -4
- package/claude/skills/sd-doc-extract/_extract_xlsx.py +98 -36
- package/claude/skills/sd-doc-extract/extract.py +22 -3
- package/claude/skills/sd-inner-clarify/SKILL.md +78 -0
- package/claude/skills/sd-inner-debug/SKILL.md +1 -1
- package/claude/skills/sd-inner-review/SKILL.md +13 -0
- package/claude/skills/sd-issue/SKILL.md +1 -1
- package/claude/skills/sd-outlook/SKILL.md +1 -1
- package/claude/skills/sd-plan/SKILL.md +50 -17
- package/claude/skills/sd-prompt/SKILL.md +180 -178
- package/claude/skills/sd-prompt/references/eval-runner.md +5 -30
- package/claude/skills/sd-prompt/references/sd-eval-env-template.md +23 -0
- package/claude/skills/sd-refactor/SKILL.md +2 -2
- package/claude/skills/sd-tdd/SKILL.md +45 -16
- package/claude/skills/sd-use/SKILL.md +84 -80
- package/claude/skills/sd-wbs/SKILL.md +84 -27
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/assets.md +2 -3
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/hooks.md +7 -6
- package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/scripts.md +1 -9
- package/package.json +3 -2
- package/scripts/sync.mjs +4 -2
- package/claude/references/sd-simplysm14/angular/docs/bootstrap.md +0 -48
- package/claude/references/sd-simplysm14/angular/docs/directives.md +0 -236
- package/claude/references/sd-simplysm14/angular/docs/features.md +0 -379
- package/claude/references/sd-simplysm14/angular/docs/pipes.md +0 -32
- package/claude/references/sd-simplysm14/angular/docs/plugins.md +0 -37
- package/claude/references/sd-simplysm14/angular/docs/provider-types.md +0 -283
- package/claude/references/sd-simplysm14/angular/docs/providers.md +0 -379
- package/claude/references/sd-simplysm14/angular/docs/styling.md +0 -222
- package/claude/references/sd-simplysm14/angular/docs/type-utilities.md +0 -250
- package/claude/references/sd-simplysm14/angular/docs/ui-data.md +0 -275
- package/claude/references/sd-simplysm14/angular/docs/ui-form.md +0 -490
- package/claude/references/sd-simplysm14/angular/docs/ui-layout.md +0 -140
- package/claude/references/sd-simplysm14/angular/docs/ui-navigation.md +0 -273
- package/claude/references/sd-simplysm14/angular/docs/ui-overlay.md +0 -157
- package/claude/references/sd-simplysm14/angular/docs/ui-visual.md +0 -127
- package/claude/references/sd-simplysm14/angular/docs/utils.md +0 -295
- package/claude/references/sd-simplysm14/angular/usage.md +0 -489
- package/claude/references/sd-simplysm14/capacitor-plugin-auto-update/usage.md +0 -182
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/file-operations.md +0 -154
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/permissions.md +0 -84
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/storage-paths.md +0 -107
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/types.md +0 -83
- package/claude/references/sd-simplysm14/capacitor-plugin-file-system/usage.md +0 -133
- package/claude/references/sd-simplysm14/capacitor-plugin-intent/usage.md +0 -203
- package/claude/references/sd-simplysm14/capacitor-plugin-usb-storage/usage.md +0 -258
- package/claude/references/sd-simplysm14/core-browser/usage.md +0 -306
- package/claude/references/sd-simplysm14/core-common/docs/errors.md +0 -82
- package/claude/references/sd-simplysm14/core-common/docs/extensions.md +0 -167
- package/claude/references/sd-simplysm14/core-common/docs/features.md +0 -136
- package/claude/references/sd-simplysm14/core-common/docs/types.md +0 -245
- package/claude/references/sd-simplysm14/core-common/docs/utils.md +0 -591
- package/claude/references/sd-simplysm14/core-common/usage.md +0 -255
- package/claude/references/sd-simplysm14/core-node/docs/child-process.md +0 -182
- package/claude/references/sd-simplysm14/core-node/docs/features.md +0 -214
- package/claude/references/sd-simplysm14/core-node/docs/file-system.md +0 -509
- package/claude/references/sd-simplysm14/core-node/docs/file-watching.md +0 -139
- package/claude/references/sd-simplysm14/core-node/docs/logging.md +0 -180
- package/claude/references/sd-simplysm14/core-node/docs/path.md +0 -176
- package/claude/references/sd-simplysm14/core-node/docs/utilities-cpx.md +0 -194
- package/claude/references/sd-simplysm14/core-node/docs/utilities-fsx.md +0 -469
- package/claude/references/sd-simplysm14/core-node/docs/utilities-pathx.md +0 -151
- package/claude/references/sd-simplysm14/core-node/docs/worker-threads.md +0 -334
- package/claude/references/sd-simplysm14/core-node/docs/worker.md +0 -205
- package/claude/references/sd-simplysm14/core-node/usage.md +0 -259
- package/claude/references/sd-simplysm14/excel/docs/core-classes.md +0 -453
- package/claude/references/sd-simplysm14/excel/docs/types.md +0 -459
- package/claude/references/sd-simplysm14/excel/docs/utilities.md +0 -194
- package/claude/references/sd-simplysm14/excel/docs/wrapper.md +0 -73
- package/claude/references/sd-simplysm14/excel/usage.md +0 -134
- package/claude/references/sd-simplysm14/lint/usage.md +0 -130
- package/claude/references/sd-simplysm14/orm-common/docs/core.md +0 -188
- package/claude/references/sd-simplysm14/orm-common/docs/expression.md +0 -190
- package/claude/references/sd-simplysm14/orm-common/docs/models.md +0 -17
- package/claude/references/sd-simplysm14/orm-common/docs/query-builder.md +0 -97
- package/claude/references/sd-simplysm14/orm-common/docs/queryable-executable.md +0 -250
- package/claude/references/sd-simplysm14/orm-common/docs/schema-builders.md +0 -364
- package/claude/references/sd-simplysm14/orm-common/docs/types.md +0 -522
- package/claude/references/sd-simplysm14/orm-common/usage.md +0 -229
- package/claude/references/sd-simplysm14/orm-node/docs/connections.md +0 -137
- package/claude/references/sd-simplysm14/orm-node/docs/core.md +0 -131
- package/claude/references/sd-simplysm14/orm-node/docs/types.md +0 -173
- package/claude/references/sd-simplysm14/orm-node/usage.md +0 -143
- package/claude/references/sd-simplysm14/sd-cli/usage.md +0 -782
- package/claude/references/sd-simplysm14/service-client/docs/features.md +0 -217
- package/claude/references/sd-simplysm14/service-client/docs/main.md +0 -148
- package/claude/references/sd-simplysm14/service-client/docs/protocol.md +0 -53
- package/claude/references/sd-simplysm14/service-client/docs/transport.md +0 -131
- package/claude/references/sd-simplysm14/service-client/docs/types.md +0 -129
- package/claude/references/sd-simplysm14/service-client/usage.md +0 -202
- package/claude/references/sd-simplysm14/service-common/docs/app-structure.md +0 -175
- package/claude/references/sd-simplysm14/service-common/docs/events.md +0 -64
- package/claude/references/sd-simplysm14/service-common/docs/protocol.md +0 -331
- package/claude/references/sd-simplysm14/service-common/docs/service-types.md +0 -90
- package/claude/references/sd-simplysm14/service-common/docs/types.md +0 -19
- package/claude/references/sd-simplysm14/service-common/usage.md +0 -154
- package/claude/references/sd-simplysm14/service-server/docs/auth.md +0 -64
- package/claude/references/sd-simplysm14/service-server/docs/core.md +0 -174
- package/claude/references/sd-simplysm14/service-server/docs/legacy.md +0 -25
- package/claude/references/sd-simplysm14/service-server/docs/main.md +0 -88
- package/claude/references/sd-simplysm14/service-server/docs/protocol.md +0 -33
- package/claude/references/sd-simplysm14/service-server/docs/services.md +0 -94
- package/claude/references/sd-simplysm14/service-server/docs/transport-http.md +0 -93
- package/claude/references/sd-simplysm14/service-server/docs/transport-socket.md +0 -119
- package/claude/references/sd-simplysm14/service-server/docs/types.md +0 -36
- package/claude/references/sd-simplysm14/service-server/docs/utils.md +0 -22
- package/claude/references/sd-simplysm14/service-server/usage.md +0 -171
- package/claude/references/sd-simplysm14/storage/usage.md +0 -301
- package/claude/references/sd-simplysm14.md +0 -35
- package/claude/rules/sd-clarify.md +0 -23
- package/claude/sd-session-start.sh +0 -10
- /package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/cli.md +0 -0
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
# @simplysm/angular
|
|
2
|
-
|
|
3
|
-
Angular 21 기반 UI 컴포넌트 라이브러리. Zoneless, signal-based, standalone 컴포넌트로 구성된다.
|
|
4
|
-
|
|
5
|
-
> **NOTE:** 이 문서는 `@simplysm/angular` 라이브러리의 사용법만 다룬다. Angular 프레임워크 자체의 사용법(컴포넌트 작성, DI, 라우팅, signal 등)은 `angular-cli` MCP를 활용한다.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @simplysm/angular
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## API Overview
|
|
14
|
-
|
|
15
|
-
### Bootstrap
|
|
16
|
-
|
|
17
|
-
| API | Type | Description |
|
|
18
|
-
|-----|------|-------------|
|
|
19
|
-
| `provideSdAngular` | function | 모든 기반 설정을 제공하는 환경 프로바이더 팩토리 |
|
|
20
|
-
| `SdAngularConfigProvider` | class | `clientName` 설정을 보유하는 프로바이더 |
|
|
21
|
-
| `TXT_CHANGE_IGNORE_CONFIRM` | const | 변경사항 무시 확인 메시지 문자열 |
|
|
22
|
-
|
|
23
|
-
-> See [docs/bootstrap.md](./docs/bootstrap.md) for details.
|
|
24
|
-
|
|
25
|
-
### Providers
|
|
26
|
-
|
|
27
|
-
| API | Type | Description |
|
|
28
|
-
|-----|------|-------------|
|
|
29
|
-
| `SdThemeProvider` | class | 다크모드/폰트 크기 프로바이더 (`dark`, `fontSize` signal) |
|
|
30
|
-
| `SdThemeSelector` | component | 테마 설정 드롭다운 (다크모드 토글, 폰트 크기 조절) |
|
|
31
|
-
| `SdSystemLogProvider` | class | 시스템 로그 기록 프로바이더 |
|
|
32
|
-
| `SdAppStructureProvider` | class | 앱 구조(메뉴/권한) 관리 프로바이더 |
|
|
33
|
-
| `injectPermsSignal` | function | 현재 뷰의 권한 목록을 signal로 반환 |
|
|
34
|
-
| `SdAppStructureUtils` | class | 앱 구조 유틸리티 (메뉴/권한 조회 정적 메서드) |
|
|
35
|
-
| `SdFileDialogProvider` | class | 네이티브 파일 선택 대화상자 프로바이더 |
|
|
36
|
-
| `SdLocalStorageProvider` | class | `clientName` 스코프 localStorage 래퍼 |
|
|
37
|
-
| `SdSystemConfigProvider` | class | 비동기 설정 저장/조회 프로바이더 |
|
|
38
|
-
| `SdServiceClientFactoryProvider` | class | ServiceClient 인스턴스 팩토리/관리 |
|
|
39
|
-
| `SdSharedDataProvider` | class | 이벤트 기반 공유 데이터 캐시 추상 프로바이더 |
|
|
40
|
-
| `SdSharedDataChangeEvent` | const | 공유 데이터 변경 이벤트 정의 |
|
|
41
|
-
| `SdNavigateWindowProvider` | class | 새 윈도우 네비게이션 + 자동 닫기 |
|
|
42
|
-
| `SdActivatedModalProvider` | class | 모달 내부에서 inject하여 모달/컨텐츠 참조 |
|
|
43
|
-
| `SdToastProvider` | class | 토스트 알림 (info/success/warning/danger) |
|
|
44
|
-
| `SdBusyProvider` | class | 글로벌 busy 상태 관리 (spinner/bar/cube) |
|
|
45
|
-
| `SdPrintProvider` | class | 인쇄 및 PDF 생성 프로바이더 |
|
|
46
|
-
| `SdModalProvider` | class | 프로그래밍 방식 모달 생성 |
|
|
47
|
-
|
|
48
|
-
-> See [docs/providers.md](./docs/providers.md) for details.
|
|
49
|
-
|
|
50
|
-
### Provider Types
|
|
51
|
-
|
|
52
|
-
| API | Type | Description |
|
|
53
|
-
|-----|------|-------------|
|
|
54
|
-
| `SdMenu` | interface | 메뉴 트리 노드 |
|
|
55
|
-
| `SdFlatMenu` | interface | 플랫 메뉴 항목 |
|
|
56
|
-
| `SdPermission` | interface | 권한 트리 노드 |
|
|
57
|
-
| `SharedDataBase` | interface | 공유 데이터 기본 인터페이스 |
|
|
58
|
-
| `SharedDataInfo` | interface | 공유 데이터 등록 정보 |
|
|
59
|
-
| `SharedDataHandle` | interface | 공유 데이터 핸들 (items signal + get) |
|
|
60
|
-
| `SdModalContentDef` | interface | 모달 컴포넌트 구현 인터페이스 |
|
|
61
|
-
| `SdModalInfo` | interface | 모달 생성 시 전달하는 정보 |
|
|
62
|
-
| `SdModalOptions` | interface | 모달 옵션 (크기, 위치, 동작) |
|
|
63
|
-
| `SdToastContentDef` | interface | 토스트 컴포넌트 구현 인터페이스 |
|
|
64
|
-
| `SdToastInput` | interface | 커스텀 토스트 생성 입력 |
|
|
65
|
-
| `SdToastSeverity` | type | 토스트 심각도 (`"info" \| "success" \| "warning" \| "danger"`) |
|
|
66
|
-
| `SdToastTheme` | type | 토스트 테마 (severity + `"primary" \| "secondary" \| "gray" \| "blue-gray"`) |
|
|
67
|
-
| `SdBusyType` | type | busy 표시 유형 (`"spinner" \| "bar" \| "cube"`) |
|
|
68
|
-
| `SdPrint` | interface | 인쇄 컴포넌트 구현 인터페이스 |
|
|
69
|
-
| `SdPrintInput` | interface | 인쇄 생성 입력 |
|
|
70
|
-
| `SelectModalOutputResult` | interface | 모달 선택 결과 (`selectedItemKeys`, `selectedItems`) |
|
|
71
|
-
|
|
72
|
-
-> See [docs/provider-types.md](./docs/provider-types.md) for details.
|
|
73
|
-
|
|
74
|
-
### Directives
|
|
75
|
-
|
|
76
|
-
| API | Type | Description |
|
|
77
|
-
|-----|------|-------------|
|
|
78
|
-
| `SdEvents` | directive | `.capture`, `.passive`, `.once` 수식어 및 커스텀 이벤트 바인딩 |
|
|
79
|
-
| `SdRipple` | directive | `[sdRipple]` 리플 효과 |
|
|
80
|
-
| `SdShowEffect` | directive | `[sdShowEffect]` 뷰포트 진입 시 reveal 애니메이션 |
|
|
81
|
-
| `SdInvalid` | directive | `[sdInvalid]` 유효성 검증 표시기 |
|
|
82
|
-
| `SdTypedTemplate` | directive | `ng-template[typed]` 템플릿 컨텍스트 타입 가드 |
|
|
83
|
-
| `SdItemOfTemplate` | directive | `ng-template[itemOf]` 항목 반복 템플릿 타입 가드 |
|
|
84
|
-
| `SdItemOfTemplateContext` | interface | itemOf 템플릿 컨텍스트 (`$implicit`, `item`, `index`, `depth`) |
|
|
85
|
-
| `SdRouterLink` | directive | `[sdRouterLink]` 라우터 네비게이션 (Ctrl+클릭 새 창) |
|
|
86
|
-
| `SdCommandDirective` | directive | `[sdSaveCommand]`, `[sdRefreshCommand]`, `[sdInsertCommand]` 키보드 단축키 output 이벤트 디렉티브 |
|
|
87
|
-
| `SdResizeDirective` | directive | `[sdResize]` ResizeObserver 기반 resize output 이벤트 디렉티브 |
|
|
88
|
-
| `SdResizeEvent` | interface | resize 이벤트 데이터 (`heightChanged`, `widthChanged`, `target`, `contentRect`) |
|
|
89
|
-
| `SdIntersectionDirective` | directive | `[sdIntersection]` IntersectionObserver 기반 intersection output 이벤트 디렉티브 |
|
|
90
|
-
| `SdIntersectionEvent` | interface | intersection 이벤트 데이터 (`entry`) |
|
|
91
|
-
|
|
92
|
-
-> See [docs/directives.md](./docs/directives.md) for details.
|
|
93
|
-
|
|
94
|
-
### Plugins
|
|
95
|
-
|
|
96
|
-
| API | Type | Description |
|
|
97
|
-
|-----|------|-------------|
|
|
98
|
-
| `SdOptionEventPlugin` | class | `.capture`, `.passive`, `.once` 이벤트 옵션 플러그인 (`provideSdAngular`에서 자동 등록) |
|
|
99
|
-
| `SdGlobalErrorHandlerPlugin` | class | 글로벌 에러 핸들러 (PromiseRejection, ErrorEvent 등) |
|
|
100
|
-
|
|
101
|
-
-> See [docs/plugins.md](./docs/plugins.md) for details.
|
|
102
|
-
|
|
103
|
-
### Pipes
|
|
104
|
-
|
|
105
|
-
| API | Type | Description |
|
|
106
|
-
|-----|------|-------------|
|
|
107
|
-
| `FormatPipe` | pipe | DateTime/DateOnly/string 포매팅 파이프 |
|
|
108
|
-
|
|
109
|
-
-> See [docs/pipes.md](./docs/pipes.md) for details.
|
|
110
|
-
|
|
111
|
-
### Utils & Setups
|
|
112
|
-
|
|
113
|
-
| API | Type | Description |
|
|
114
|
-
|-----|------|-------------|
|
|
115
|
-
| `mark` | function | WritableSignal 변경 알림 트리거 (shallow copy) |
|
|
116
|
-
| `withBusy` | function | busy count 증감과 함께 비동기 작업 실행 |
|
|
117
|
-
| `injectParent` | function | 가장 가까운 부모 컴포넌트 인스턴스 주입 |
|
|
118
|
-
| `setSafeStyle` | function | Renderer2로 여러 CSS 스타일 일괄 적용 |
|
|
119
|
-
| `injectSdSystemConfigResource` | function | 시스템 설정 resource 래퍼 |
|
|
120
|
-
| `injectCurrentPageCodeSignal` | function | 현재 페이지 코드 signal |
|
|
121
|
-
| `injectFullPageCodeSignal` | function | 전체 페이지 코드 signal (NavigationEnd 기반) |
|
|
122
|
-
| `injectViewTitleSignal` | function | 현재 뷰 타이틀 signal |
|
|
123
|
-
| `injectViewTypeSignal` | function | 현재 뷰 타입 signal (`page \| modal \| control`) |
|
|
124
|
-
| `useSelectionManager` | function | 선택 관리 composable (single/multi) |
|
|
125
|
-
| `useSortingManager` | function | 정렬 관리 composable |
|
|
126
|
-
| `useExpandingManager` | function | 트리 확장/축소 관리 composable |
|
|
127
|
-
| `setupBgTheme` | function | body 배경 테마 색상 설정 |
|
|
128
|
-
| `setupRipple` | function | 리플 효과 설정 |
|
|
129
|
-
| `setupRevealOnShow` | function | 뷰포트 진입 시 reveal 애니메이션 설정 |
|
|
130
|
-
| `setupInvalid` | function | 유효성 검증 표시기 설정 |
|
|
131
|
-
| `setupModelHook` | function | model signal의 set을 가드 함수로 래핑 |
|
|
132
|
-
| `setupCanDeactivate` | function | 모달/라우트 canDeactivate 설정 |
|
|
133
|
-
| `setupCumulateSelectedKeys` | function | 선택된 항목의 키 누적 동기화 |
|
|
134
|
-
| `setupCloserWhenSingleSelectionChange` | function | 단일 선택 변경 시 모달 자동 닫기 |
|
|
135
|
-
|
|
136
|
-
-> See [docs/utils.md](./docs/utils.md) for details.
|
|
137
|
-
|
|
138
|
-
### Type Utilities
|
|
139
|
-
|
|
140
|
-
| API | Type | Description |
|
|
141
|
-
|-----|------|-------------|
|
|
142
|
-
| `DirectiveInputSignals` | type | InputSignal 프로퍼티에서 값 타입 추출 |
|
|
143
|
-
| `UndefToOptional` | type | undefined 포함 프로퍼티를 optional로 변환 |
|
|
144
|
-
| `WithOptional` | type | 특정 키를 optional로 변환 |
|
|
145
|
-
| `SdViewType` | type | 뷰 타입 (`"page" \| "modal" \| "control"`) |
|
|
146
|
-
| `SortingDef` | interface | 정렬 정의 (`key`, `desc`) |
|
|
147
|
-
| `ExpandItemDef` | interface | 트리 확장 항목 정의 |
|
|
148
|
-
| `SdSelectModal` | interface | 모달 선택 컴포넌트 인터페이스 |
|
|
149
|
-
| `SdSelectModalInfo` | type | 모달 선택 정보 타입 |
|
|
150
|
-
| `SdTextfieldTypes` | type | 텍스트필드 타입별 값 타입 매핑 |
|
|
151
|
-
| `sdTextfieldTypes` | const | 텍스트필드 타입 문자열 배열 |
|
|
152
|
-
| `SelectModeValue` | type | select mode별 value 타입 매핑 |
|
|
153
|
-
|
|
154
|
-
-> See [docs/type-utilities.md](./docs/type-utilities.md) for details.
|
|
155
|
-
|
|
156
|
-
### Features
|
|
157
|
-
|
|
158
|
-
| API | Type | Description |
|
|
159
|
-
|-----|------|-------------|
|
|
160
|
-
| `SdBaseContainer` | component | 페이지/모달/뷰 공통 레이아웃 컨테이너 |
|
|
161
|
-
| `SdAddressSearchModal` | component | Daum Postcode 주소 검색 모달 |
|
|
162
|
-
| `Address` | interface | 주소 검색 결과 |
|
|
163
|
-
| `SdPermissionTable` | component | 권한 매트릭스 테이블 (items, value) |
|
|
164
|
-
| `SdDataSheetBase` | class | 데이터 시트 CRUD 추상 클래스 |
|
|
165
|
-
| `SdDataSheet` | component | 데이터 시트 presentation 컴포넌트 |
|
|
166
|
-
| `SdDataSheetColumn` | directive | 데이터 시트 컬럼 (edit 추가) |
|
|
167
|
-
| `SdDataDetailBase` | class | 상세 폼 추상 클래스 |
|
|
168
|
-
| `SdDataDetail` | component | 상세 폼 presentation 컴포넌트 |
|
|
169
|
-
| `SdDataSelectButtonBase` | class | 모달 기반 선택 버튼 추상 클래스 |
|
|
170
|
-
| `SdDataSelectButton` | component | 선택 버튼 presentation 컴포넌트 |
|
|
171
|
-
| `SdSharedDataSelect` | component | 공유 데이터 드롭다운 선택 |
|
|
172
|
-
| `SdSharedDataSelectButton` | component | 공유 데이터 모달 선택 버튼 |
|
|
173
|
-
| `SdSharedDataSelectList` | component | 공유 데이터 목록형 선택 (selectedItem model) |
|
|
174
|
-
| `matchesSearchText` | function | 공백 구분 AND 조건 텍스트 검색 매칭 |
|
|
175
|
-
| `getOrmDataEditToastErrorMessage` | function | ORM 편집 에러 메시지 변환 (FK 위반 등 DB 에러를 한국어 메시지로) |
|
|
176
|
-
|
|
177
|
-
-> See [docs/features.md](./docs/features.md) for details.
|
|
178
|
-
|
|
179
|
-
### Feature Types
|
|
180
|
-
|
|
181
|
-
| API | Type | Description |
|
|
182
|
-
|-----|------|-------------|
|
|
183
|
-
| `SdDataSheetItemPropInfo` | interface | 데이터 시트 항목 속성 정보 |
|
|
184
|
-
| `SdDataSheetItemInfo` | interface | 데이터 시트 항목 정보 (key, canSelect 등) |
|
|
185
|
-
| `SdDataSheetSearchResult` | interface | 데이터 시트 검색 결과 |
|
|
186
|
-
| `SdDataDetailDataInfo` | interface | 상세 폼 데이터 정보 |
|
|
187
|
-
|
|
188
|
-
-> See [docs/features.md](./docs/features.md) for details.
|
|
189
|
-
|
|
190
|
-
### UI - Layout
|
|
191
|
-
|
|
192
|
-
| API | Type | Description |
|
|
193
|
-
|-----|------|-------------|
|
|
194
|
-
| `SdDockContainer` | component | 도킹 레이아웃 컨테이너 |
|
|
195
|
-
| `SdDock` | component | 도킹 영역 (top/bottom/left/right) |
|
|
196
|
-
| `SdGap` | component | 간격 (gap) 컴포넌트 |
|
|
197
|
-
| `SdKanbanBoard` | component | 칸반 보드 (드래그앤드롭, selectedValues) |
|
|
198
|
-
| `SdKanbanBoardDropInfo` | interface | 칸반 보드 드롭 이벤트 정보 |
|
|
199
|
-
| `SdKanbanDragRef` | interface | 칸반 드래그 참조 인터페이스 |
|
|
200
|
-
| `SdKanbanDropTarget` | interface | 칸반 드롭 타겟 인터페이스 |
|
|
201
|
-
| `SdKanban` | component | 칸반 아이템 |
|
|
202
|
-
| `SdKanbanLane` | component | 칸반 레인 |
|
|
203
|
-
|
|
204
|
-
-> See [docs/ui-layout.md](./docs/ui-layout.md) for details.
|
|
205
|
-
|
|
206
|
-
### UI - Form
|
|
207
|
-
|
|
208
|
-
| API | Type | Description |
|
|
209
|
-
|-----|------|-------------|
|
|
210
|
-
| `SdButton` | component | 버튼 |
|
|
211
|
-
| `SdAnchor` | component | 앵커 (인라인 버튼) |
|
|
212
|
-
| `SdAdditionalButton` | component | 추가 동작 버튼 (드롭다운 포함) |
|
|
213
|
-
| `SdModalSelectButton` | component | 모달 선택 버튼 |
|
|
214
|
-
| `SdTextfield` | component | 텍스트 입력 (13가지 타입: number, text, password, color, email, format, date, month, year, datetime, datetime-sec, time, time-sec) |
|
|
215
|
-
| `SdTextarea` | component | 멀티라인 텍스트 입력 |
|
|
216
|
-
| `SdNumpad` | component | 숫자 패드 |
|
|
217
|
-
| `SdRange` | component | 범위 슬라이더 |
|
|
218
|
-
| `SdDateRangePicker` | component | 날짜 범위 선택기 |
|
|
219
|
-
| `SdStatePreset` | component | 상태 프리셋 저장/불러오기 |
|
|
220
|
-
| `SdStatePresetDef` | interface | 상태 프리셋 데이터 (name, state) |
|
|
221
|
-
| `SdCheckbox` | component | 체크박스 |
|
|
222
|
-
| `SdSwitch` | component | 스위치 토글 |
|
|
223
|
-
| `SdCheckboxGroup` | component | 체크박스 그룹 |
|
|
224
|
-
| `SdCheckboxGroupItem` | component | 체크박스 그룹 항목 |
|
|
225
|
-
| `SdTiptapEditor` | component | TipTap 리치 텍스트 에디터 |
|
|
226
|
-
| `SdSelect` | component | 드롭다운 선택 (single/multi) |
|
|
227
|
-
| `SdSelectItem` | component | 드롭다운 선택 항목 |
|
|
228
|
-
| `SdSelectButton` | component | 버튼 스타일 선택 |
|
|
229
|
-
| `SdForm` | component | 폼 래퍼 (submit 이벤트, busy 관리) |
|
|
230
|
-
|
|
231
|
-
-> See [docs/ui-form.md](./docs/ui-form.md) for details.
|
|
232
|
-
|
|
233
|
-
### UI - Navigation
|
|
234
|
-
|
|
235
|
-
| API | Type | Description |
|
|
236
|
-
|-----|------|-------------|
|
|
237
|
-
| `SdCollapse` | component | 접기/펼치기 패널 |
|
|
238
|
-
| `SdCollapseIcon` | component | 접기/펼치기 아이콘 |
|
|
239
|
-
| `SdTab` | component | 탭 컨테이너 |
|
|
240
|
-
| `SdTabItem` | component | 탭 항목 |
|
|
241
|
-
| `SdPagination` | component | 페이지네이션 |
|
|
242
|
-
| `SdSidebarContainer` | component | 사이드바 컨테이너 |
|
|
243
|
-
| `SdSidebar` | component | 사이드바 |
|
|
244
|
-
| `SdSidebarMenu` | component | 사이드바 메뉴 |
|
|
245
|
-
| `SdSidebarUser` | component | 사이드바 사용자 영역 |
|
|
246
|
-
| `SdSidebarUserMenu` | interface | 사이드바 사용자 메뉴 항목 |
|
|
247
|
-
| `SdTopbarContainer` | component | 탑바 컨테이너 |
|
|
248
|
-
| `SdTopbar` | component | 탑바 |
|
|
249
|
-
| `SdTopbarMenu` | component | 탑바 메뉴 |
|
|
250
|
-
| `SdTopbarUser` | component | 탑바 사용자 영역 |
|
|
251
|
-
| `SdTopbarUserMenu` | interface | 탑바 사용자 메뉴 항목 |
|
|
252
|
-
| `getMenuRouterLinkOption` | function | 메뉴에서 라우터 링크 옵션 추출 |
|
|
253
|
-
| `getIsMenuSelected` | function | 메뉴 선택 여부 확인 |
|
|
254
|
-
|
|
255
|
-
-> See [docs/ui-navigation.md](./docs/ui-navigation.md) for details.
|
|
256
|
-
|
|
257
|
-
### UI - Data
|
|
258
|
-
|
|
259
|
-
| API | Type | Description |
|
|
260
|
-
|-----|------|-------------|
|
|
261
|
-
| `SdList` | component | 리스트 |
|
|
262
|
-
| `SdListItem` | component | 리스트 항목 |
|
|
263
|
-
| `SdSheet` | component | 스프레드시트 (정렬, 고정, 리사이즈). `key`로 설정 저장 |
|
|
264
|
-
| `SdSheetColumn` | directive | 시트 컬럼 정의 (헤더, 너비, 고정, 정렬 등) |
|
|
265
|
-
| `SdSheetColumnCellTemplate` | directive | 시트 컬럼 셀 내용 정의 (`ng-template[cell]`), `SdSheetCellContext` 타입 가드 제공 |
|
|
266
|
-
| `SdSheetCellContext` | interface | 시트 셀 템플릿 컨텍스트 (`$implicit`, `item`, `index`, `depth`, `edit`) |
|
|
267
|
-
| `SdSheetConfigModal` | component | 시트 설정 모달 |
|
|
268
|
-
| `SdSheetColumnDef` | interface | 시트 컬럼 정의 데이터 |
|
|
269
|
-
| `SdSheetConfig` | interface | 시트 설정 데이터 |
|
|
270
|
-
| `SdSheetHeaderDef` | interface | 시트 헤더 정의 |
|
|
271
|
-
| `SdSheetItemKeydownEventParam` | interface | 시트 항목 keydown 이벤트 파라미터 |
|
|
272
|
-
| `SdSheetCellKeydownEventParam` | interface | 시트 셀 keydown 이벤트 파라미터 |
|
|
273
|
-
|
|
274
|
-
-> See [docs/ui-data.md](./docs/ui-data.md) for details.
|
|
275
|
-
|
|
276
|
-
### UI - Visual
|
|
277
|
-
|
|
278
|
-
| API | Type | Description |
|
|
279
|
-
|-----|------|-------------|
|
|
280
|
-
| `SdLabel` | component | 라벨 (테마, 크기) |
|
|
281
|
-
| `SdNote` | component | 노트/알림 메시지 |
|
|
282
|
-
| `SdProgress` | component | 진행률 바 |
|
|
283
|
-
| `SdCalendar` | component | 캘린더 |
|
|
284
|
-
| `SdBarcode` | component | 바코드 생성 (bwip-js) |
|
|
285
|
-
| `SdEcharts` | component | ECharts 차트 래퍼 |
|
|
286
|
-
| `BarcodeType` | type | 바코드 타입 |
|
|
287
|
-
|
|
288
|
-
-> See [docs/ui-visual.md](./docs/ui-visual.md) for details.
|
|
289
|
-
|
|
290
|
-
### UI - Overlay
|
|
291
|
-
|
|
292
|
-
| API | Type | Description |
|
|
293
|
-
|-----|------|-------------|
|
|
294
|
-
| `SdDropdown` | component | 드롭다운 트리거 |
|
|
295
|
-
| `SdDropdownPopup` | component | 드롭다운 팝업 |
|
|
296
|
-
| `SdModal` | component | 모달 래퍼 컴포넌트 |
|
|
297
|
-
| `SdPromptModal` | component | 프롬프트 입력 모달 |
|
|
298
|
-
| `SdConfirmModal` | component | 확인/취소 모달 |
|
|
299
|
-
| `SdToast` | component | 토스트 개별 항목 |
|
|
300
|
-
| `SdToastContainer` | component | 토스트 컨테이너 |
|
|
301
|
-
| `SdBusyContainer` | component | busy 표시 컨테이너 |
|
|
302
|
-
|
|
303
|
-
-> See [docs/ui-overlay.md](./docs/ui-overlay.md) for details.
|
|
304
|
-
|
|
305
|
-
### Styling
|
|
306
|
-
|
|
307
|
-
| API | Type | Description |
|
|
308
|
-
|-----|------|-------------|
|
|
309
|
-
| `.flex-row`, `.flex-column` 등 | CSS class | Flexbox 레이아웃 유틸리티 |
|
|
310
|
-
| `.grid`, `.grid-{1..12}` | CSS class | Grid 레이아웃 유틸리티 |
|
|
311
|
-
| `.card` | CSS class | 카드 스타일 |
|
|
312
|
-
| `.form-box`, `.form-table` | CSS class | 폼 레이아웃 |
|
|
313
|
-
| `.table` | CSS class | 테이블 스타일 |
|
|
314
|
-
| `.p-*`, `.m-*`, `.gap-*` 등 | CSS class | 간격 유틸리티 |
|
|
315
|
-
| `--theme-*-*` | CSS custom property | OKLCH 색상 팔레트 (17+5색 x 7단계) |
|
|
316
|
-
| `.sd-theme-dark` | theme class | 다크 모드 테마 |
|
|
317
|
-
|
|
318
|
-
-> See [docs/styling.md](./docs/styling.md) for details.
|
|
319
|
-
|
|
320
|
-
## 컴포넌트 비동기 초기화 규칙
|
|
321
|
-
|
|
322
|
-
컴포넌트에서 비동기 초기화가 필요한 경우 `async ngOnInit()`을 사용한다.
|
|
323
|
-
|
|
324
|
-
```typescript
|
|
325
|
-
export class SomePage implements OnInit {
|
|
326
|
-
busyCount = signal(0);
|
|
327
|
-
|
|
328
|
-
async ngOnInit() {
|
|
329
|
-
this.busyCount.update((v) => v + 1);
|
|
330
|
-
await this._sdToast.try(async () => {
|
|
331
|
-
// 비동기 초기화 로직
|
|
332
|
-
});
|
|
333
|
-
this.busyCount.update((v) => v - 1);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
- constructor 내 `void (async () => { ... })()` IIFE 패턴 **금지**
|
|
339
|
-
- constructor 내 `void this._init()` 같은 수동 호출 패턴 **금지** — ngOnInit이 이미 같은 역할
|
|
340
|
-
- `resource()` / `httpResource()`는 데이터 로딩 → signal 매핑 용도. 사이드이펙트(라우팅, toast 등) 포함 초기화에는 사용하지 않는다
|
|
341
|
-
|
|
342
|
-
## 소비 프로젝트 네이밍 규칙
|
|
343
|
-
|
|
344
|
-
`@simplysm/angular`를 소비하는 앱 프로젝트에서의 파일명·클래스명 규칙이다.
|
|
345
|
-
파일명은 **kebab-case + dot-suffix**, 클래스명은 **PascalCase**를 따른다.
|
|
346
|
-
|
|
347
|
-
| 접미어 | 조건 | 파일명 예시 | 클래스명 예시 |
|
|
348
|
-
|--------|------|-------------|---------------|
|
|
349
|
-
| `.sheet.ts` / `*Sheet` | `SdDataSheetBase` 상속 | `outbound-instruction.sheet.ts` | `OutboundInstructionSheet` |
|
|
350
|
-
| `.detail.ts` / `*Detail` | `SdDataDetailBase` 상속 | `outbound-instruction.detail.ts` | `OutboundInstructionDetail` |
|
|
351
|
-
| `.view.ts` / `*View` | sheet/detail 아닌 병합 컴포넌트 + route 연결 | `dashboard.view.ts` | `DashboardView` |
|
|
352
|
-
| `.modal.ts` / `*Modal` | 모달 전용 컴포넌트 | `item-select.modal.ts` | `ItemSelectModal` |
|
|
353
|
-
| `.provider.ts` / `*Provider` | `@Injectable` 클래스 (**`*Service` 금지**) | `app-service.provider.ts` | `AppServiceProvider` |
|
|
354
|
-
| 접미어 없음 | route 미연결 일반 컨트롤 컴포넌트 | `instruction-item.ts` | `InstructionItem` |
|
|
355
|
-
|
|
356
|
-
- `pipe`, `directive` 등 기타 Angular 구성요소는 `@simplysm/angular` 패키지 자체의 네이밍 패턴(`.pipe.ts`, `.directive.ts`)을 따른다
|
|
357
|
-
|
|
358
|
-
## 소비 프로젝트 디렉토리 구조
|
|
359
|
-
|
|
360
|
-
```
|
|
361
|
-
src/
|
|
362
|
-
├── app/ # 라우팅 페이지 (사이드바 메뉴 트리 구조와 대응)
|
|
363
|
-
│ ├── login/
|
|
364
|
-
│ └── home/
|
|
365
|
-
│ ├── {메뉴-그룹}/ # 사이드바 메뉴 그룹
|
|
366
|
-
│ │ └── {도메인}/ # 개별 도메인 (트리 깊이 제한 없음)
|
|
367
|
-
│ │ ├── {도메인}.view.ts # route 연결 병합 컴포넌트
|
|
368
|
-
│ │ ├── {도메인}.sheet.ts # SdDataSheetBase 상속
|
|
369
|
-
│ │ ├── {도메인}.detail.ts # SdDataDetailBase 상속
|
|
370
|
-
│ │ ├── {이름}.modal.ts # 도메인 전용 모달
|
|
371
|
-
│ │ └── {이름}.ts # 일반 컨트롤 (route 미연결)
|
|
372
|
-
│ └── main/
|
|
373
|
-
├── controls/ # 앱 공유 컨트롤 컴포넌트
|
|
374
|
-
├── directives/ # 앱 공유 디렉티브
|
|
375
|
-
├── modals/ # 앱 전역 공통 모달
|
|
376
|
-
├── providers/ # 앱 전역 프로바이더
|
|
377
|
-
├── types/ # 타입 정의
|
|
378
|
-
└── utils/ # 유틸리티
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
- `app/` 하위 트리는 사이드바 메뉴 구조와 거의 대응된다
|
|
382
|
-
- **배치 기준은 "어느 도메인에 소속되는가"**이다. provider, modal, directive, print-template, util 등 모든 종류의 파일이 소속 도메인 폴더 안에 배치된다 (다른 도메인에서 import하여 사용하는 것은 자유)
|
|
383
|
-
- 특정 도메인에 소속되지 않는 공통 파일만 `src/` 직하의 `controls/`, `modals/`, `providers/` 등에 배치한다
|
|
384
|
-
|
|
385
|
-
## inject 네이밍 컨벤션
|
|
386
|
-
|
|
387
|
-
`Sd*Provider`를 `inject()`할 때 변수명은 다음 규칙을 따른다:
|
|
388
|
-
|
|
389
|
-
- **Sd 접두어 유지**: 클래스명에서 `Sd`를 camelCase로 변환하여 유지한다
|
|
390
|
-
- **Provider 접미어 제거**: 변수명에서 `Provider`를 제거한다
|
|
391
|
-
|
|
392
|
-
| inject 대상 | 클래스 필드 | 로컬 변수 |
|
|
393
|
-
|-------------|-----------|----------|
|
|
394
|
-
| `SdToastProvider` | `private _sdToast = inject(SdToastProvider)` | `const sdToast = inject(SdToastProvider)` |
|
|
395
|
-
| `SdModalProvider` | `private _sdModal = inject(SdModalProvider)` | `const sdModal = inject(SdModalProvider)` |
|
|
396
|
-
| `SdServiceClientFactoryProvider` | `private _sdServiceClientFactory = inject(SdServiceClientFactoryProvider)` | `const sdServiceClientFactory = inject(...)` |
|
|
397
|
-
|
|
398
|
-
## Usage Examples
|
|
399
|
-
|
|
400
|
-
### 앱 부트스트랩
|
|
401
|
-
|
|
402
|
-
```typescript
|
|
403
|
-
import { provideSdAngular } from "@simplysm/angular";
|
|
404
|
-
|
|
405
|
-
bootstrapApplication(AppComponent, {
|
|
406
|
-
providers: [
|
|
407
|
-
provideSdAngular({ clientName: "my-app" }),
|
|
408
|
-
provideRouter(routes),
|
|
409
|
-
],
|
|
410
|
-
});
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### 모달 표시
|
|
414
|
-
|
|
415
|
-
```typescript
|
|
416
|
-
import { SdModalProvider, type SdModalInfo } from "@simplysm/angular";
|
|
417
|
-
|
|
418
|
-
const sdModal = inject(SdModalProvider);
|
|
419
|
-
|
|
420
|
-
const result = await sdModal.showAsync(
|
|
421
|
-
{ title: "사용자 선택", type: UserSelectModal, inputs: { filter: "active" } },
|
|
422
|
-
{ useCloseByBackdrop: true },
|
|
423
|
-
);
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
### 서비스 + 이벤트 프록시 (AppServiceProvider 패턴)
|
|
427
|
-
|
|
428
|
-
소비 프로젝트에서 서비스와 이벤트를 한 곳에서 관리하는 패턴:
|
|
429
|
-
|
|
430
|
-
```typescript
|
|
431
|
-
import { inject, Injectable } from "@angular/core";
|
|
432
|
-
import { SdServiceClientFactoryProvider } from "@simplysm/angular";
|
|
433
|
-
import { createOrmClientConnector, type OrmClientConnector, type ServiceProxy } from "@simplysm/service-client";
|
|
434
|
-
import type { SystemLogServiceType } from "@my-server-package";
|
|
435
|
-
import type { OrderUpdatedEvent } from "@my-server-package"; // import type만 가능
|
|
436
|
-
|
|
437
|
-
@Injectable({ providedIn: "root" })
|
|
438
|
-
export class AppServiceProvider {
|
|
439
|
-
private readonly _sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
440
|
-
|
|
441
|
-
get client() {
|
|
442
|
-
return this._sdServiceClientFactory.get("MAIN");
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// 서비스 프록시 — getService() 패턴
|
|
446
|
-
get systemLog() {
|
|
447
|
-
return this.client.getService<SystemLogServiceType>("SystemLog");
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// 이벤트 프록시 — getEvent() 패턴 (getService()와 동일)
|
|
451
|
-
get orderUpdated() {
|
|
452
|
-
return this.client.getEvent<typeof OrderUpdatedEvent>("OrderUpdated");
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
사용처에서:
|
|
458
|
-
|
|
459
|
-
```typescript
|
|
460
|
-
const appSvc = inject(AppServiceProvider);
|
|
461
|
-
|
|
462
|
-
// 서비스 호출
|
|
463
|
-
await appSvc.systemLog.writeLog("hello");
|
|
464
|
-
|
|
465
|
-
// 이벤트 구독 — 이벤트 이름과 제네릭 타입을 반복 지정할 필요 없음
|
|
466
|
-
const key = await appSvc.orderUpdated.addListener({ orderId: 123 }, async (data) => {
|
|
467
|
-
// data.status는 string으로 타입 추론
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
// 이벤트 발행
|
|
471
|
-
await appSvc.orderUpdated.emit((info) => info.orderId === 123, { status: "shipped" });
|
|
472
|
-
|
|
473
|
-
// 구독 해제
|
|
474
|
-
await appSvc.orderUpdated.removeListener(key);
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
### 토스트 알림
|
|
478
|
-
|
|
479
|
-
```typescript
|
|
480
|
-
import { SdToastProvider } from "@simplysm/angular";
|
|
481
|
-
|
|
482
|
-
const sdToast = inject(SdToastProvider);
|
|
483
|
-
|
|
484
|
-
sdToast.success("저장되었습니다.");
|
|
485
|
-
const result = await sdToast.try(async () => {
|
|
486
|
-
return await someAsyncWork();
|
|
487
|
-
});
|
|
488
|
-
```
|
|
489
|
-
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# @simplysm/capacitor-plugin-auto-update
|
|
2
|
-
|
|
3
|
-
심플리즘 패키지 - Capacitor 자동 업데이트 플러그인. 서버 버전 비교 후 APK 다운로드·설치를 처리하며, 외부 저장소(USB 등)에서도 업데이트할 수 있다.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @simplysm/capacitor-plugin-auto-update
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
피어 의존성으로 `@capacitor/core ^7`이 필요하다. Android 네이티브 플러그인이 포함되어 있으므로 `npx cap sync` 후 사용한다.
|
|
12
|
-
|
|
13
|
-
## API Overview
|
|
14
|
-
|
|
15
|
-
### APK 설치
|
|
16
|
-
|
|
17
|
-
| API | Type | Description |
|
|
18
|
-
|-----|------|-------------|
|
|
19
|
-
| `VersionInfo` | interface | 앱 버전 정보 (versionName, versionCode) |
|
|
20
|
-
| `ApkInstallerPlugin` | interface | Capacitor 네이티브 플러그인 인터페이스 (직접 사용하지 않음) |
|
|
21
|
-
| `ApkInstaller` | abstract class | APK 설치 플러그인 정적 파사드 — 권한 확인/요청, 설치, 버전 조회 |
|
|
22
|
-
|
|
23
|
-
### 자동 업데이트
|
|
24
|
-
|
|
25
|
-
| API | Type | Description |
|
|
26
|
-
|-----|------|-------------|
|
|
27
|
-
| `AutoUpdate` | abstract class | 자동 업데이트 오케스트레이터 — 서버 또는 외부 저장소에서 최신 APK를 확인하고 설치 |
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## `VersionInfo`
|
|
32
|
-
|
|
33
|
-
앱 버전 정보를 나타내는 인터페이스.
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
export interface VersionInfo {
|
|
37
|
-
versionName: string;
|
|
38
|
-
versionCode: string;
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
| Field | Type | Description |
|
|
43
|
-
|-------|------|-------------|
|
|
44
|
-
| `versionName` | `string` | 앱 버전 이름. semver 형식 (예: `"1.2.3"`). `AutoUpdate`의 버전 비교에 사용된다. |
|
|
45
|
-
| `versionCode` | `string` | 앱 버전 코드. 정수를 문자열로 표현 (예: `"42"`). |
|
|
46
|
-
|
|
47
|
-
## `ApkInstallerPlugin`
|
|
48
|
-
|
|
49
|
-
Capacitor 네이티브 플러그인 인터페이스. 직접 사용하지 않고 `ApkInstaller` 파사드를 통해 접근한다. 타입 참조 목적으로만 export된다.
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
export interface ApkInstallerPlugin {
|
|
53
|
-
install(options: { uri: string }): Promise<void>;
|
|
54
|
-
checkPermissions(): Promise<{ granted: boolean; manifest: boolean }>;
|
|
55
|
-
requestPermissions(): Promise<void>;
|
|
56
|
-
getVersionInfo(): Promise<VersionInfo>;
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
| Method | Return | Description |
|
|
61
|
-
|--------|--------|-------------|
|
|
62
|
-
| `install(options: { uri: string })` | `Promise<void>` | `content://` URI(FileProvider URI)로 APK 설치 인텐트 실행 |
|
|
63
|
-
| `checkPermissions()` | `Promise<{ granted: boolean; manifest: boolean }>` | 설치 권한 승인 여부(`granted`)와 AndroidManifest 선언 여부(`manifest`) 동시 확인 |
|
|
64
|
-
| `requestPermissions()` | `Promise<void>` | `REQUEST_INSTALL_PACKAGES` 권한 요청 — 시스템 설정 화면으로 이동 |
|
|
65
|
-
| `getVersionInfo()` | `Promise<VersionInfo>` | PackageManager에서 현재 앱 버전 정보 조회 |
|
|
66
|
-
|
|
67
|
-
## `ApkInstaller`
|
|
68
|
-
|
|
69
|
-
APK 설치 플러그인 정적 파사드 클래스. Android에서는 네이티브 플러그인을 실행하고, 브라우저 환경에서는 `ApkInstallerWeb`으로 폴백한다. 브라우저 폴백: `install()`은 `alert()` 표시 후 반환, `checkPermissions()`는 항상 `{ granted: true, manifest: true }` 반환, `requestPermissions()`는 무동작, `getVersionInfo()`는 `env("__VER__") ?? "0.0.0"`을 `versionName`으로 반환.
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
export abstract class ApkInstaller {
|
|
73
|
-
static async checkPermissions(): Promise<{ granted: boolean; manifest: boolean }>;
|
|
74
|
-
static async requestPermissions(): Promise<void>;
|
|
75
|
-
static async install(apkUri: string): Promise<void>;
|
|
76
|
-
static async getVersionInfo(): Promise<VersionInfo>;
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
| Method | Parameters | Return | Description |
|
|
81
|
-
|--------|-----------|--------|-------------|
|
|
82
|
-
| `checkPermissions` | 없음 | `Promise<{ granted: boolean; manifest: boolean }>` | 설치 권한 승인 여부와 AndroidManifest 선언 여부 확인. `manifest: false`이면 APK를 재설치해야 한다. |
|
|
83
|
-
| `requestPermissions` | 없음 | `Promise<void>` | `REQUEST_INSTALL_PACKAGES` 권한 요청. 시스템 설정 화면으로 이동하므로 이후 `checkPermissions`로 결과를 폴링해야 한다. |
|
|
84
|
-
| `install` | `apkUri: string` | `Promise<void>` | `content://` URI(FileProvider URI)로 APK 설치. `FileSystem.getUri(filePath)`로 URI를 얻는다. |
|
|
85
|
-
| `getVersionInfo` | 없음 | `Promise<VersionInfo>` | 현재 설치된 앱의 버전 정보 조회. 브라우저 환경에서는 `env("__VER__") ?? "0.0.0"`을 `versionName`으로 반환한다. |
|
|
86
|
-
|
|
87
|
-
## `AutoUpdate`
|
|
88
|
-
|
|
89
|
-
자동 업데이트 오케스트레이터. 서버 또는 외부 저장소에서 최신 APK를 확인하고 설치한다. 모든 메서드가 `static`이며 인스턴스화하지 않는다. Android 환경 전용이며, 비-Android에서 호출하면 에러를 표시하고 앱을 무한 대기 상태로 전환한다.
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
export abstract class AutoUpdate {
|
|
93
|
-
static async run(opt: {
|
|
94
|
-
log: (messageHtml: string) => void;
|
|
95
|
-
serviceClient: ServiceClient;
|
|
96
|
-
}): Promise<void>;
|
|
97
|
-
|
|
98
|
-
static async runByExternalStorage(opt: {
|
|
99
|
-
log: (messageHtml: string) => void;
|
|
100
|
-
dirPath: string;
|
|
101
|
-
}): Promise<void>;
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
| Method | Parameters | Description |
|
|
106
|
-
|--------|-----------|-------------|
|
|
107
|
-
| `run` | `opt.log: (messageHtml: string) => void`, `opt.serviceClient: ServiceClient` | `AutoUpdateService.getLastVersion("android")`로 서버에서 최신 버전 정보를 조회한 뒤, 현재 버전보다 높으면 APK를 다운로드하여 설치한다. 업데이트 후 `_freezeApp()`으로 앱을 무한 대기 상태로 전환한다. |
|
|
108
|
-
| `runByExternalStorage` | `opt.log: (messageHtml: string) => void`, `opt.dirPath: string` | 외부 저장소의 `opt.dirPath` 디렉토리에서 `{semver}.apk` 패턴 파일 중 최신 버전을 찾아 설치한다. 현재 버전보다 높은 경우에만 업데이트한다. |
|
|
109
|
-
|
|
110
|
-
**`opt.log` 콜백**: HTML 문자열을 받아 사용자에게 진행 상황을 표시한다. 버튼(`<button>`) 등 인터랙티브 HTML이 포함될 수 있다. 에러 발생 시에도 `log`로 에러 메시지를 표시한 뒤 `_freezeApp()`으로 전환한다.
|
|
111
|
-
|
|
112
|
-
**권한 처리**: 두 메서드 모두 내부적으로 `_checkPermission()`을 호출한다. `manifest: false`이면 재설치 에러를 throw하고, `granted: false`이면 권한 요청 후 최대 300초간 폴링한다.
|
|
113
|
-
|
|
114
|
-
**버전 비교**: `semver` 라이브러리를 사용한다. `versionName`이 유효한 semver 형식이 아니면 업데이트 확인을 건너뛴다.
|
|
115
|
-
|
|
116
|
-
## Usage Examples
|
|
117
|
-
|
|
118
|
-
### 서버 기반 자동 업데이트
|
|
119
|
-
|
|
120
|
-
앱 부트스트랩 시 `AutoUpdate.run()`을 호출한다. `AutoUpdateService`는 `@simplysm/service-common`의 서비스 인터페이스다.
|
|
121
|
-
|
|
122
|
-
```typescript
|
|
123
|
-
import { AutoUpdate } from "@simplysm/capacitor-plugin-auto-update";
|
|
124
|
-
import type { ServiceClient } from "@simplysm/service-client";
|
|
125
|
-
|
|
126
|
-
async function checkForUpdate(serviceClient: ServiceClient) {
|
|
127
|
-
const statusEl = document.getElementById("status")!;
|
|
128
|
-
|
|
129
|
-
await AutoUpdate.run({
|
|
130
|
-
log: (messageHtml) => {
|
|
131
|
-
statusEl.innerHTML = messageHtml;
|
|
132
|
-
},
|
|
133
|
-
serviceClient,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// 업데이트가 없거나 업데이트가 완료되면(무한 대기 전환 전) 이 줄에 도달한다.
|
|
137
|
-
statusEl.innerHTML = "";
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### 외부 저장소(USB) 기반 업데이트
|
|
142
|
-
|
|
143
|
-
`opt.dirPath`는 외부 저장소 루트 기준 상대 경로다. 해당 경로에 `1.2.3.apk` 형식 파일이 있어야 한다.
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
import { AutoUpdate } from "@simplysm/capacitor-plugin-auto-update";
|
|
147
|
-
|
|
148
|
-
await AutoUpdate.runByExternalStorage({
|
|
149
|
-
log: (messageHtml) => {
|
|
150
|
-
document.getElementById("status")!.innerHTML = messageHtml;
|
|
151
|
-
},
|
|
152
|
-
dirPath: "updates/my-app",
|
|
153
|
-
});
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### APK 설치 직접 제어
|
|
157
|
-
|
|
158
|
-
`AutoUpdate`를 사용하지 않고 `ApkInstaller`를 직접 제어하는 경우:
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
import { ApkInstaller } from "@simplysm/capacitor-plugin-auto-update";
|
|
162
|
-
import { FileSystem } from "@simplysm/capacitor-plugin-file-system";
|
|
163
|
-
|
|
164
|
-
// 권한 확인
|
|
165
|
-
const { granted, manifest } = await ApkInstaller.checkPermissions();
|
|
166
|
-
if (!manifest) {
|
|
167
|
-
// AndroidManifest.xml에 REQUEST_INSTALL_PACKAGES 미선언 → APK 재설치 필요
|
|
168
|
-
throw new Error("앱을 재설치해야 합니다.");
|
|
169
|
-
}
|
|
170
|
-
if (!granted) {
|
|
171
|
-
await ApkInstaller.requestPermissions();
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// 현재 버전 확인
|
|
175
|
-
const versionInfo = await ApkInstaller.getVersionInfo();
|
|
176
|
-
// versionInfo.versionName → "1.2.3"
|
|
177
|
-
// versionInfo.versionCode → "42"
|
|
178
|
-
|
|
179
|
-
// APK 설치 (filePath는 FileSystem으로 저장한 경로)
|
|
180
|
-
const apkUri = await FileSystem.getUri("/path/to/latest.apk");
|
|
181
|
-
await ApkInstaller.install(apkUri);
|
|
182
|
-
```
|