@iyulab/enterprise 0.2.1 → 0.3.0
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 +58 -3
- package/dist/index.d.ts +0 -6
- package/dist/index.js +1 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @iyulab/enterprise
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
iyulab 프레임워크의 엔터프라이즈 통합 패키지. 폼 레이아웃 컴포넌트·API 설정·도메인 헬퍼를 제공합니다.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,16 +8,71 @@ 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. 심볼 출처 (v0.3.0부터 하위 패키지 재노출 제거됨)
|
|
26
|
+
|
|
27
|
+
`@iyulab/enterprise`는 **자기 고유 export만** 제공합니다(위 표). `@iyulab/components`(컴포넌트), `@iyulab/data-components`(데이터 그리드/시트), `@iyulab/modern-app`(앱 프레임워크, 라우팅)은 각 패키지에서 **직접 import**하세요.
|
|
28
|
+
|
|
29
|
+
> v0.2.x까지는 위 3개 패키지를 `export *`로 재노출했으나, 심볼 출처 혼란과 exact-pin(v0.2.2 이전) 조합 시 이중 인스턴스 위험 때문에 v0.3.0에서 제거했습니다. 재노출에 의존하던 코드는 `@iyulab/enterprise`가 아닌 각 하위 패키지에서 직접 import하도록 수정해야 합니다.
|
|
30
|
+
|
|
11
31
|
## Usage
|
|
12
32
|
|
|
33
|
+
### 폼 레이아웃 (React)
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { FormSection, FormRow } from '@iyulab/enterprise'
|
|
37
|
+
|
|
38
|
+
<FormSection title="기본 정보">
|
|
39
|
+
<FormRow>
|
|
40
|
+
<u-input label="이름" />
|
|
41
|
+
<u-input label="코드" />
|
|
42
|
+
</FormRow>
|
|
43
|
+
<FormRow full>
|
|
44
|
+
<u-textarea label="비고" />
|
|
45
|
+
</FormRow>
|
|
46
|
+
</FormSection>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- `FormRow`는 기본 2컬럼 그리드입니다. 한 칸을 차지하려면 `full`을 씁니다.
|
|
50
|
+
- (3컬럼 이상 등 커스텀 레이아웃이 필요하면 현재는 직접 CSS grid를 쓰세요. `columns` prop 확장은 로드맵에 있습니다.)
|
|
51
|
+
|
|
52
|
+
### API 설정
|
|
53
|
+
|
|
13
54
|
```typescript
|
|
14
|
-
import { } from '@iyulab/enterprise'
|
|
55
|
+
import { ApiConfig } from '@iyulab/enterprise'
|
|
56
|
+
|
|
57
|
+
ApiConfig.initialize({ baseUrl: '/', odataPrefix: '$data', apiPrefix: 'api' })
|
|
58
|
+
|
|
59
|
+
ApiConfig.getODataUrl('Orders') // → /$data/Orders
|
|
60
|
+
ApiConfig.getApiUrl('auth/me') // → /api/auth/me
|
|
61
|
+
ApiConfig.getUrlWithParams('report', { year: 2026, active: true })
|
|
62
|
+
ApiConfig.isDevelopment // 환경 판별
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 도메인 헬퍼
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { CurrencyHelper, DateHelper } from '@iyulab/enterprise'
|
|
69
|
+
|
|
70
|
+
CurrencyHelper.formatKRW(1234000) // ₩1,234,000
|
|
15
71
|
```
|
|
16
72
|
|
|
17
73
|
## Development
|
|
18
74
|
|
|
19
75
|
```bash
|
|
20
|
-
# Build
|
|
21
76
|
npm run build
|
|
22
77
|
```
|
|
23
78
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { FormSection } from './FormSection';
|
|
6
6
|
export { FormRow } from './FormRow';
|
|
7
|
-
/** Package version */
|
|
8
|
-
export declare const VERSION = "0.2.1";
|
|
9
|
-
export * from '@iyulab/components';
|
|
10
|
-
export * from '@iyulab/data-components';
|
|
11
|
-
export * from '@iyulab/modern-app';
|
|
12
|
-
export type { DialogOptions } from '@iyulab/components';
|
|
13
7
|
export * from './helpers';
|
|
14
8
|
export * from './ApiConfig';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
export * from "@iyulab/components";
|
|
3
|
-
export * from "@iyulab/data-components";
|
|
4
|
-
export * from "@iyulab/modern-app";
|
|
5
2
|
//#region src/FormSection.tsx
|
|
6
3
|
function FormSection({ title, children }) {
|
|
7
4
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -516,8 +513,4 @@ var ApiConfig = class {
|
|
|
516
513
|
}
|
|
517
514
|
};
|
|
518
515
|
//#endregion
|
|
519
|
-
|
|
520
|
-
/** Package version */
|
|
521
|
-
var VERSION = "0.2.1";
|
|
522
|
-
//#endregion
|
|
523
|
-
export { ApiConfig, CurrencyHelper, DateHelper, FormRow, FormSection, ProgressHelper, UrgencyHelper, VERSION };
|
|
516
|
+
export { ApiConfig, CurrencyHelper, DateHelper, FormRow, FormSection, ProgressHelper, UrgencyHelper };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/enterprise",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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.
|
|
35
|
-
"@iyulab/data-components": "0.
|
|
36
|
-
"@iyulab/modern-app": "0.3.
|
|
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",
|