@iyulab/enterprise 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +65 -3
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @iyulab/enterprise
2
2
 
3
- Enterprise utilities and components for iyulab framework.
3
+ iyulab 프레임워크의 엔터프라이즈 통합 패키지. 하위 UI/데이터/앱 패키지를 재노출하고, 폼 레이아웃 컴포넌트·API 설정·도메인 헬퍼를 제공합니다.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,16 +8,78 @@ Enterprise utilities and components for iyulab framework.
8
8
  npm install @iyulab/enterprise
9
9
  ```
10
10
 
11
+ ## 무엇을 제공하나
12
+
13
+ ### 1. 고유 export (enterprise에서만 제공)
14
+
15
+ | Export | 종류 | 용도 |
16
+ |--------|------|------|
17
+ | `FormSection` | React | 제목 + 세로 스택 폼 섹션 |
18
+ | `FormRow` | React | 2컬럼 그리드 폼 행(`full`로 1컬럼) |
19
+ | `ApiConfig` | class | baseUrl/OData·API prefix·dev 판별 중앙 설정 |
20
+ | `CurrencyHelper` | class | 통화 포맷(`formatKRW` 등) |
21
+ | `DateHelper` | class | 날짜 포맷/파싱 |
22
+ | `ProgressHelper` | class | 진행률 계산 |
23
+ | `UrgencyHelper` | class | 긴급도 계산 |
24
+
25
+ ### 2. 재노출 (편의를 위한 re-export)
26
+
27
+ `@iyulab/enterprise`는 하위 패키지를 `export *`로 재노출합니다:
28
+
29
+ - `@iyulab/components` (기반 UI 컴포넌트)
30
+ - `@iyulab/data-components` (데이터 그리드/시트)
31
+ - `@iyulab/modern-app` (앱 프레임워크)
32
+
33
+ > ⚠️ **재노출은 편의용이며 SoT가 아닙니다.** 프레임워크(`app`)·컴포넌트를 쓸 때는 **각 하위 패키지에서 직접 import**하는 것을 권장합니다. enterprise를 통한 간접 소비와 직접 소비를 섞으면 심볼 출처가 갈라져 혼란과(중복 설치 시) 이중 인스턴스 위험이 생길 수 있습니다.
34
+ > - 컴포넌트 → `@iyulab/components`
35
+ > - 프레임워크(`app`, 라우팅) → `@iyulab/modern-app`
36
+ > - 폼 레이아웃/API 설정/도메인 헬퍼 → `@iyulab/enterprise`
37
+
11
38
  ## Usage
12
39
 
40
+ ### 폼 레이아웃 (React)
41
+
42
+ ```tsx
43
+ import { FormSection, FormRow } from '@iyulab/enterprise'
44
+
45
+ <FormSection title="기본 정보">
46
+ <FormRow>
47
+ <u-input label="이름" />
48
+ <u-input label="코드" />
49
+ </FormRow>
50
+ <FormRow full>
51
+ <u-textarea label="비고" />
52
+ </FormRow>
53
+ </FormSection>
54
+ ```
55
+
56
+ - `FormRow`는 기본 2컬럼 그리드입니다. 한 칸을 차지하려면 `full`을 씁니다.
57
+ - (3컬럼 이상 등 커스텀 레이아웃이 필요하면 현재는 직접 CSS grid를 쓰세요. `columns` prop 확장은 로드맵에 있습니다.)
58
+
59
+ ### API 설정
60
+
61
+ ```typescript
62
+ import { ApiConfig } from '@iyulab/enterprise'
63
+
64
+ ApiConfig.initialize({ baseUrl: '/', odataPrefix: '$data', apiPrefix: 'api' })
65
+
66
+ ApiConfig.getODataUrl('Orders') // → /$data/Orders
67
+ ApiConfig.getApiUrl('auth/me') // → /api/auth/me
68
+ ApiConfig.getUrlWithParams('report', { year: 2026, active: true })
69
+ ApiConfig.isDevelopment // 환경 판별
70
+ ```
71
+
72
+ ### 도메인 헬퍼
73
+
13
74
  ```typescript
14
- import { } from '@iyulab/enterprise';
75
+ import { CurrencyHelper, DateHelper } from '@iyulab/enterprise'
76
+
77
+ CurrencyHelper.formatKRW(1234000) // ₩1,234,000
15
78
  ```
16
79
 
17
80
  ## Development
18
81
 
19
82
  ```bash
20
- # Build
21
83
  npm run build
22
84
  ```
23
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/enterprise",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Enterprise utilities and components for iyulab framework",
5
5
  "keywords": [
6
6
  "enterprise",
@@ -31,9 +31,9 @@
31
31
  "build": "vite build"
32
32
  },
33
33
  "dependencies": {
34
- "@iyulab/components": "1.0.10",
35
- "@iyulab/data-components": "0.4.1",
36
- "@iyulab/modern-app": "0.3.6"
34
+ "@iyulab/components": "^1.1.1",
35
+ "@iyulab/data-components": "^0.6.1",
36
+ "@iyulab/modern-app": "^0.3.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^25.8.0",