@iyulab/data-components 0.6.1 → 0.7.1
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/CHANGELOG.md +22 -2
- package/README.md +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.133.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/decorate.js +2 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.133.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/decorateMetadata.js +2 -2
- package/dist/components/data-view/UDataView.d.ts +11 -3
- package/dist/components/data-view/UDataView.js +4 -3
- package/dist/components/simple-sheet/USimpleSheet.js +2 -2
- package/dist/components/u-rich-table/URichTable.js +6 -3
- package/dist/utilities/shadowDomProtection.js +1 -0
- package/package.json +14 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.1] - 2026-08-01
|
|
4
|
+
|
|
5
|
+
### Documentation
|
|
6
|
+
|
|
7
|
+
- 체인지로그와 마이그레이션 가이드에서 **발견 정황 서술을 제거**했다. 결함이 무엇이고 어떤
|
|
8
|
+
조건에서 재현되는지는 그대로이며, 라이브러리와 무관한 서술만 걷어냈다.
|
|
9
|
+
코드 변경은 없다 — 게시본 문서를 정리하기 위한 패치 릴리스다.
|
|
10
|
+
|
|
11
|
+
## [0.7.0] - 2026-07-19
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **이 패키지의 eslint 가 실제로 동작하기 시작했다.** `eslint.config.js` 의 두 결함 — (1) `files: ['src/**/*']` 가 ESLint 9 에서 universal 패턴이라 `.ts` 를 opt-in 하지 못함, (2) 배열 프리셋(`tseslint.configs.recommended`)을 객체 스프레드해 프리셋이 무력화됨 — 을 수정했다. `build` 스크립트의 `eslint &&` 게이트는 매칭 파일이 0개라 항상 통과하고 있었다. 복구 후 실측 결과 **error 0건** — 이 패키지의 소스는 이미 깨끗했다.
|
|
15
|
+
- `npm run lint` / `npm run lint:fix` 스크립트 추가.
|
|
16
|
+
- **`UDataView` 의 열린 타입 의도를 명시** — `items`/`renderCard`/`renderCell` 등에 흩어져 있던 `any` 8곳을 새 `DataItem`(`Record<string, any>`) 타입 한 곳으로 격리했다. 이 컴포넌트는 소비자 도메인 타입을 제한하지 않는 범용 뷰어이므로 열린 타입이 설계 의도이며, 이제 그 의도가 코드에 표현된다. `formatValue` 는 `unknown` 으로 좁혔다. 원시값 배열(`[1, 2, 3]`)을 `items` 로 넘기던 코드는 이제 타입 오류가 날 수 있다.
|
|
17
|
+
|
|
18
|
+
## [0.6.1] - 2026-07-08
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- `UDataView`: fallback 이 없던 `var(--u-*)` 참조 24개에 컨텍스트별 fallback 을 부여 — `@iyulab/components` 테마 토큰이 정의되지 않은 환경에서 색상이 비어 렌더되던 문제.
|
|
22
|
+
|
|
3
23
|
## [0.6.0] - 2026-06-11
|
|
4
24
|
|
|
5
25
|
### Added
|
|
6
|
-
- `USimpleSheet`: `theme` 속성 1급 지원 (`'light' | 'dark'`, attribute 리플렉트) — per-element 테마 지정 가능, `:host-context` 미지원 브라우저(Firefox/Safari)에서도 동작
|
|
26
|
+
- `USimpleSheet`: `theme` 속성 1급 지원 (`'light' | 'dark'`, attribute 리플렉트) — per-element 테마 지정 가능, `:host-context` 미지원 브라우저(Firefox/Safari)에서도 동작
|
|
7
27
|
- `USimpleSheet`: 조상 `data-theme="dark"` 컨텍스트에서도 다크 모드 적용 — Theme 유틸 없이 `data-theme`만 설정하는 앱에서 도구별 다크 적용이 비일관하던 문제 해소
|
|
8
28
|
|
|
9
29
|
### Changed
|
|
@@ -45,7 +65,7 @@ UDataGrid 대체: `@iyulab/flex-table` + `@iyulab/flex-table/odata` 조합 사
|
|
|
45
65
|
## [0.3.2] - 2026-05-07
|
|
46
66
|
|
|
47
67
|
### Added
|
|
48
|
-
- `docs/migrating-from-datagrid.md`: UDataGrid(DevExtreme)에서 `@iyulab/flex-table`로 전환하는 마이그레이션 가이드 추가 (
|
|
68
|
+
- `docs/migrating-from-datagrid.md`: UDataGrid(DevExtreme)에서 `@iyulab/flex-table`로 전환하는 마이그레이션 가이드 추가 (리스트 페이지 9개 전환 실증 기반)
|
|
49
69
|
- README에 UDataGrid 대안 섹션 및 마이그레이션 가이드 링크 추가
|
|
50
70
|
- `docs/UDataGrid.md` 상단에 마이그레이션 가이드 링크 추가
|
|
51
71
|
|
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ const sheet = document.querySelector('u-simple-sheet'); // USimpleSheet | null
|
|
|
124
124
|
|
|
125
125
|
- [USimpleSheet](./docs/USimpleSheet.md)
|
|
126
126
|
- [UDataView](./docs/UDataView.md)
|
|
127
|
-
- [
|
|
127
|
+
- URichTable — 문서 작성 예정([types.ts](./src/components/u-rich-table/types.ts) 참고)
|
|
128
128
|
- [UDataGrid 마이그레이션 가이드](./docs/migrating-from-datagrid.md)
|
|
129
129
|
|
|
130
130
|
## Theming
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -6,4 +6,4 @@ function __decorate(decorators, target, key, desc) {
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { __decorate };
|
|
9
|
+
export { __decorate as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorateMetadata.js
|
|
2
2
|
function __decorateMetadata(k, v) {
|
|
3
3
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4
4
|
}
|
|
5
5
|
//#endregion
|
|
6
|
-
export { __decorateMetadata };
|
|
6
|
+
export { __decorateMetadata as default };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
3
3
|
export type ViewMode = 'grid' | 'list' | 'table';
|
|
4
|
+
/**
|
|
5
|
+
* UDataView 가 표시하는 임의의 데이터 레코드.
|
|
6
|
+
*
|
|
7
|
+
* 이 컴포넌트는 소비자의 도메인 타입을 제한하지 않는 범용 뷰어이므로 열린
|
|
8
|
+
* 타입이 설계 의도다. `any` 를 컴포넌트 전역에 흩뿌리는 대신 여기 한 곳으로
|
|
9
|
+
* 격리해 의도를 명시한다.
|
|
10
|
+
*/
|
|
11
|
+
export type DataItem = Record<string, any>;
|
|
4
12
|
export interface DataColumn {
|
|
5
13
|
key: string;
|
|
6
14
|
label?: string;
|
|
@@ -13,7 +21,7 @@ export interface DataColumn {
|
|
|
13
21
|
export declare class UDataView extends UElement {
|
|
14
22
|
static styles: import('lit').CSSResultGroup[];
|
|
15
23
|
/** 표시할 데이터 배열 */
|
|
16
|
-
items:
|
|
24
|
+
items: DataItem[];
|
|
17
25
|
/** 현재 뷰 모드 */
|
|
18
26
|
mode: ViewMode;
|
|
19
27
|
/** 표시할 컬럼 설정 (미지정시 자동 감지) */
|
|
@@ -23,9 +31,9 @@ export declare class UDataView extends UElement {
|
|
|
23
31
|
/** 아이템 간격 */
|
|
24
32
|
gap: string;
|
|
25
33
|
/** 커스텀 렌더 함수 (grid/list 카드용) */
|
|
26
|
-
renderCard?: (item:
|
|
34
|
+
renderCard?: (item: DataItem, index: number) => TemplateResult;
|
|
27
35
|
/** 커스텀 셀 렌더 함수 (table용) */
|
|
28
|
-
renderCell?: (item:
|
|
36
|
+
renderCell?: (item: DataItem, column: DataColumn, index: number) => TemplateResult | string;
|
|
29
37
|
private selectedIndex;
|
|
30
38
|
render(): TemplateResult<1>;
|
|
31
39
|
private renderToolbar;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styles } from "./UDataView.styles.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
6
6
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
@@ -123,9 +123,10 @@ var UDataView = class UDataView extends UElement {
|
|
|
123
123
|
`;
|
|
124
124
|
}
|
|
125
125
|
renderDefaultCard(item) {
|
|
126
|
+
const cols = this.getColumns();
|
|
126
127
|
return html`
|
|
127
128
|
<div class="card-content">
|
|
128
|
-
${
|
|
129
|
+
${cols.slice(0, 5).map((col) => {
|
|
129
130
|
const value = item[col.key];
|
|
130
131
|
return html`
|
|
131
132
|
<div class="card-field">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { styles } from "./USimpleSheet.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { richTableStyles } from "./styles.js";
|
|
4
4
|
import { parseTSV, toTSV } from "./utils/clipboard.js";
|
|
5
5
|
import { LitElement, html } from "lit";
|
|
@@ -253,7 +253,10 @@ var URichTable = class URichTable extends LitElement {
|
|
|
253
253
|
}
|
|
254
254
|
return String(value ?? "");
|
|
255
255
|
}
|
|
256
|
-
if (col.type === "badge" && col.badgeColors)
|
|
256
|
+
if (col.type === "badge" && col.badgeColors) {
|
|
257
|
+
const color = col.badgeColors[String(value)] ?? "#f3f4f6";
|
|
258
|
+
return html`<span class="badge" style="background:${color}">${this._getOptionLabel(col, value)}</span>`;
|
|
259
|
+
}
|
|
257
260
|
if (col.type === "select" && col.options) return this._getOptionLabel(col, value);
|
|
258
261
|
if (col.type === "number" && value != null) return Number(value).toLocaleString();
|
|
259
262
|
return String(value ?? "");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/data-components",
|
|
3
3
|
"description": "iyulab data visualization components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-components",
|
|
@@ -53,10 +53,12 @@
|
|
|
53
53
|
"start": "vite",
|
|
54
54
|
"build": "eslint && vite build",
|
|
55
55
|
"test": "vitest run",
|
|
56
|
-
"test:watch": "vitest"
|
|
56
|
+
"test:watch": "vitest",
|
|
57
|
+
"lint": "eslint src/",
|
|
58
|
+
"lint:fix": "eslint src/ --fix"
|
|
57
59
|
},
|
|
58
60
|
"dependencies": {
|
|
59
|
-
"@iyulab/components": "^1.0
|
|
61
|
+
"@iyulab/components": "^1.8.0",
|
|
60
62
|
"lit": "^3.3.3"
|
|
61
63
|
},
|
|
62
64
|
"peerDependencies": {
|
|
@@ -74,17 +76,17 @@
|
|
|
74
76
|
"devDependencies": {
|
|
75
77
|
"@eslint/js": "^9.39.4",
|
|
76
78
|
"@lit/react": "^1.0.8",
|
|
77
|
-
"@types/node": "^
|
|
78
|
-
"@types/react": "^19.2.
|
|
79
|
+
"@types/node": "^26.1.1",
|
|
80
|
+
"@types/react": "^19.2.17",
|
|
79
81
|
"eslint": "^9.39.4",
|
|
80
82
|
"glob": "^13.0.6",
|
|
81
|
-
"globals": "^17.
|
|
82
|
-
"happy-dom": "^20.10.
|
|
83
|
-
"react": "^19.2.
|
|
83
|
+
"globals": "^17.7.0",
|
|
84
|
+
"happy-dom": "^20.10.6",
|
|
85
|
+
"react": "^19.2.7",
|
|
84
86
|
"typescript": "^5.9.3",
|
|
85
|
-
"typescript-eslint": "^8.
|
|
86
|
-
"vite": "^8.
|
|
87
|
-
"vite-plugin-dts": "^5.0.
|
|
88
|
-
"vitest": "^4.1.
|
|
87
|
+
"typescript-eslint": "^8.64.0",
|
|
88
|
+
"vite": "^8.1.4",
|
|
89
|
+
"vite-plugin-dts": "^5.0.3",
|
|
90
|
+
"vitest": "^4.1.10"
|
|
89
91
|
}
|
|
90
92
|
}
|