@iyulab/data-components 0.11.0 β†’ 0.12.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/CHANGELOG.md CHANGED
@@ -1,7 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.12.0] - 2026-08-04
4
+
5
+ ### Fixed
6
+
7
+ - πŸ”΄**`u-rich-table` 의 전체선택이 λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택을 쑰용히 νŒŒκ΄΄ν–ˆλ‹€.** μ„œλ²„ νŽ˜μ΄μ§•
8
+ (`totalCount`/`currentPage`/`page-change`)μ—μ„œ 선택 μƒνƒœλŠ” νŽ˜μ΄μ§€λ₯Ό λ„˜μ–΄ μœ μ§€λ˜λŠ”λ°,
9
+ 전체선택 μ²΄ν¬λ°•μŠ€λ§Œ κ·Έ 사싀을 λͺ¨λ₯΄κ³  μžˆμ—ˆλ‹€:
10
+ - 체크 μƒνƒœλ₯Ό **Β«λˆ„μ  선택 수 == 이 νŽ˜μ΄μ§€ ν–‰ 수»** 둜 κ³„μ‚°ν–ˆλ‹€ β‡’ 1νŽ˜μ΄μ§€λ₯Ό μ „λŸ‰ μ„ νƒν•˜κ³ 
11
+ 2νŽ˜μ΄μ§€λ‘œ λ„˜μ–΄κ°€λ©΄ **아무것도 κ³ λ₯΄μ§€ μ•Šμ•˜λŠ”λ° 켜져 λ³΄μ˜€λ‹€.**
12
+ - κ·Έ μƒνƒœμ—μ„œ μ²΄ν¬λ°•μŠ€λ₯Ό 끄면 선택 집합을 **ν†΅μ§Έλ‘œ λΉ„μ› λ‹€** β‡’ μ‚¬μš©μžμ—κ²ŒλŠ” *"이 νŽ˜μ΄μ§€ ν•΄μ œ"*
13
+ 둜 λ³΄μ΄λŠ” μ‘°μž‘μ΄ 1νŽ˜μ΄μ§€μ˜ 선택을 말없이 μ§€μ› λ‹€.
14
+ - μΌœλŠ” μͺ½λ„ 합집합이 μ•„λ‹ˆλΌ **μΉ˜ν™˜**μ΄μ—ˆλ‹€ β‡’ 2νŽ˜μ΄μ§€μ—μ„œ μ „μ²΄μ„ νƒν•˜λ©΄ 1νŽ˜μ΄μ§€ 선택뢄이 μ‚¬λΌμ‘Œλ‹€.
15
+ `Ctrl`/`Cmd` + `A` 도 같은 κ²½λ‘œμ˜€λ‹€.
16
+
17
+ β‡’ 전체선택/ν•΄μ œμ˜ λ²”μœ„λ₯Ό **ν˜„μž¬ νŽ˜μ΄μ§€**둜 ν™•μ •ν–ˆλ‹€(ν•©μ§‘ν•©Β·μ°¨μ§‘ν•©). μ²΄ν¬λ°•μŠ€μ˜ λΆ„μžμ™€ λΆ„λͺ¨κ°€
18
+ λͺ¨λ‘ ν˜„μž¬ νŽ˜μ΄μ§€ 기쀀이 λ˜μ–΄, λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄이 이 νŽ˜μ΄μ§€μ˜ ν‘œμ‹œλ‘œ μƒˆμ§€ μ•ŠλŠ”λ‹€.
19
+
20
+ ⚠**단일 νŽ˜μ΄μ§€ μ‚¬μš©(`totalCount = 0`)μ—μ„œλŠ” λ™μž‘μ΄ μ’…μ „κ³Ό μ™„μ „νžˆ κ°™λ‹€** β€” ν˜„μž¬ νŽ˜μ΄μ§€κ°€
21
+ κ³§ μ „μ²΄μ΄λ―€λ‘œ 합집합·차집합이 μΉ˜ν™˜Β·μ „μ—­μ†Œκ±°μ™€ μΌμΉ˜ν•œλ‹€.
22
+
23
+ ### Added
24
+
25
+ - **선택 집합을 읽고 μ“Έ 수 μžˆλ‹€** β€” μ’…μ „μ—λŠ” 선택 μƒνƒœκ°€ `private` 이라 μ†ŒλΉ„μ•±μ΄ Β«ν•΄μ œΒ»μ™€
26
+ Β«λ‹€λ₯Έ νŽ˜μ΄μ§€μ— μžˆμŒΒ»μ„ ꡬ뢄할 방법이 μ—†μ—ˆκ³ , κ·Έλž˜μ„œ μΆ”μ •ν•  μˆ˜λ°–μ— μ—†μ—ˆλ‹€.
27
+ - **`selectedRowIds`** *(getter)* β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§ˆλŸ¬ λˆ„μ λœ **λͺ¨λ“ ** 선택 μ‹λ³„μž.
28
+ `getSelectedRows()` λŠ” ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체만 μ£Όλ―€λ‘œ(κ°–κ³  μžˆμ§€ μ•Šμ€ 행을 λ§Œλ“€ 수 μ—†λ‹€)
29
+ *"μ—¬λŸ¬ νŽ˜μ΄μ§€μ— 걸쳐 κ³ λ₯Έ λ’€ 일괄 처리"* μ—λŠ” 이μͺ½μ΄ ν•„μš”ν•˜λ‹€. **μŠ€λƒ…μƒ·**이라 λŒλ €λ°›μ€
30
+ 집합을 고쳐도 λ‚΄λΆ€ μƒνƒœκ°€ 흔듀리지 μ•ŠλŠ”λ‹€.
31
+ - **`setSelection(ids)`** β€” 선택을 ν†΅μ§Έλ‘œ λŒ€μ²΄ν•œλ‹€. ν˜„μž¬ νŽ˜μ΄μ§€μ— μ—†λŠ” μ‹λ³„μžλ„ λ°›λŠ”λ‹€.
32
+ ⚠**같은 집합이면 아무 일도 ν•˜μ§€ μ•ŠλŠ”λ‹€** β€” `selection-change` λ₯Ό λ°›μ•„ μ•± μƒνƒœλ₯Ό κ°±μ‹ ν•˜κ³ 
33
+ λ‹€μ‹œ 이것을 λΆ€λ₯΄λŠ” 배선이 μžμ—°μŠ€λŸ¬μš΄λ°, 무쑰건 λ°œμƒμ‹œν‚€λ©΄ κ·Έ μžλ¦¬κ°€ λ¬΄ν•œ 루프가 λœλ‹€.
34
+ - **`clearSelection()`** β€” λˆ„μ λΆ„κΉŒμ§€ μ „λΆ€ λΉ„μš΄λ‹€. 전체선택 μ²΄ν¬λ°•μŠ€κ°€ «이 νŽ˜μ΄μ§€Β» λ²”μœ„κ°€
35
+ λ˜λ©΄μ„œ μ „μ—­ μ†Œκ±°μ˜ μžλ¦¬κ°€ μ—†μ–΄μ‘Œκ³ , 일괄 처리 ν›„ 앱이 μƒνƒœλ₯Ό λ˜λŒλ¦¬λŠ” κ²½λ‘œκ°€ μ—¬κΈ°λ‹€.
36
+ - **`selection-change` detail 에 `selectedIds: string[]` μΆ”κ°€** β€” `selectedRows`(ν˜„μž¬ νŽ˜μ΄μ§€)와
37
+ λ‚˜λž€νžˆ λˆ„μ  μ‹λ³„μžλ₯Ό μ‹£λŠ”λ‹€. 두 ν•„λ“œμ˜ 길이가 λ‹€λ₯Έ 것이 μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œλŠ” 정상이닀.
38
+ - **`select-all` 이벀트** β€” μ‚¬μš©μžκ°€ 전체선택 μ²΄ν¬λ°•μŠ€λ₯Ό μ‘°μž‘ν–ˆλ‹€λŠ” **μ˜λ„**λ₯Ό λ”°λ‘œ μ•Œλ¦°λ‹€.
39
+ `selection-change` λ§ŒμœΌλ‘œλŠ” *"μ„Έ 행을 κ³¨λžλ‹€"* 와 *"전체선택을 λˆŒλ €λ‹€"* κ°€ κ΅¬λΆ„λ˜μ§€ μ•ŠλŠ”λ°,
40
+ μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ ν›„μžλŠ” 앱이 *"쑰건에 λ§žλŠ” N건 μ „λΆ€"* λ₯Ό μ œμ•ˆν•  μžλ¦¬λ‹€.
41
+ ⚠**`scope: 'page' | 'all'` ν•„λ“œλŠ” 두지 μ•Šμ•˜λ‹€** β€” 이 μ»΄ν¬λ„ŒνŠΈλŠ” `'all'` 을 λ‚Ό 수 μ—†λ‹€.
42
+ μ „μ—­ 전체선택은 μ‹λ³„μž λͺ©λ‘μ΄ μ•„λ‹ˆλΌ **쑰회 쑰건**이라 μ»΄ν¬λ„ŒνŠΈκ°€ ν‘œν˜„ν•  수 μžˆλŠ” 것이 μ•„λ‹ˆκ³ ,
43
+ 값이 ν•˜λ‚˜λΏμΈ μœ λ‹ˆμ˜¨μ€ λΌμ΄λΈŒλŸ¬λ¦¬κ°€ λͺ¨λ₯΄λŠ” κ°œλ…μ„ μ•„λŠ” μ²™ν•˜λŠ” ν•„λ“œκ°€ λœλ‹€.
44
+
45
+ ### Changed
46
+
47
+ - **선택 건수 라벨이 두 숫자λ₯Ό ꡬ뢄해 μ•Œλ¦°λ‹€** β€” 선택이 νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λ©΄
48
+ `4 selected (1 on this page)` 처럼 λˆ„μ κ³Ό 이 νŽ˜μ΄μ§€ λͺ«μ„ ν•¨κ»˜ λ‚Έλ‹€. ν•œ νŽ˜μ΄μ§€ μ•ˆμ— λ¨Έλ¬΄λŠ”
49
+ λ™μ•ˆμ—λŠ” μ’…μ „λŒ€λ‘œ `3 selected` λ‹€. 두 μˆ«μžκ°€ λ‹€λ₯΄λ‹€λŠ” 사싀 μžμ²΄κ°€ μ‚¬μš©μžμ—κ²Œ 보여야 ν•œλ‹€.
50
+ - **선택 κ±΄μˆ˜Β·νŽ˜μ΄μ§€ 크기 문ꡬ가 λ‘œμΌ€μΌ λ ˆμ§€μŠ€νŠΈλ¦¬λ‘œ μ΄μ£Όν–ˆλ‹€**(`selected` Β·
51
+ `selectedAcrossPages` Β· `rowsPerPage`). `0.11.0` 의 이주가 쀑첩 ν…œν”Œλ¦Ώ μ•ˆμ˜ 두 건을
52
+ 남겨 두어, λ‹€λ₯Έ 문ꡬ가 μ „λΆ€ μ˜μ–΄μΈ ν™˜κ²½μ—μ„œ 이 λ‘˜λ§Œ ν•œκ΅­μ–΄λ‘œ λ‚˜μ™”λ‹€.
53
+
3
54
  ## [0.11.0] - 2026-08-04
4
55
 
56
+ ### Fixed
57
+
58
+ - πŸ”΄**`LICENSE` 파일이 μ—†μ–΄ κ²Œμ‹œλ³Έμ— MIT 원문이 λΉ μ Έ μžˆμ—ˆλ‹€.** `package.json` 이
59
+ `"license": "MIT"` λ₯Ό μ„ μ–Έν•˜κ³  `files` 에 `LICENSE` λ₯Ό λ‚˜μ—΄ν–ˆμ§€λ§Œ 파일 μžμ²΄κ°€ μ—†μ—ˆλ‹€
60
+ β‡’ `0.10.0` κΉŒμ§€μ˜ tarball 에 λΌμ΄μ„ μŠ€ 원문이 λ“€μ–΄ μžˆμ§€ μ•Šλ‹€. MIT λŠ” *"μœ„ μ €μž‘κΆŒ 고지와
61
+ 이 ν—ˆκ°€ κ³ μ§€λ₯Ό λͺ¨λ“  사본에 ν¬ν•¨μ‹œμΌœμ•Ό ν•œλ‹€"* λŠ” 쑰건뢀 ν—ˆκ°€μ΄λ―€λ‘œ, 원문 λˆ„λ½μ€ κ·Έ 쑰건을
62
+ 슀슀둜 μ΄ν–‰ν•˜μ§€ λͺ»ν•œ μƒνƒœμ˜€λ‹€. ⚠`npm view … license` κ°€ `MIT` λ₯Ό 보여 μ£ΌλŠ” 것은
63
+ `package.json` ν•„λ“œλ₯Ό 읽은 것이지 **원문이 λ°°ν¬λλ‹€λŠ” 뜻이 μ•„λ‹ˆλ‹€.**
64
+
5
65
  ### Changed
6
66
 
7
67
  - **`u-rich-table` 의 `_id` λΆ€μž¬ κ²½κ³ κ°€ μ˜μ–΄λ‘œ μ΄μ£Όν–ˆλ‹€** β€” 개발자 λŒ€λ©΄ μ§„λ‹¨μ΄λ―€λ‘œ λ‘œμΌ€μΌ
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 iyulab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -40,6 +40,35 @@ export declare class URichTable extends LitElement {
40
40
  revertRow(_rowId: string): void;
41
41
  setRowError(rowId: string, message: string): void;
42
42
  clearRowError(rowId: string): void;
43
+ /**
44
+ * μ„ νƒλœ ν–‰μ˜ **μ‹λ³„μž μ§‘ν•©** β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§ˆλŸ¬ λˆ„μ λœ μ „λΆ€.
45
+ *
46
+ * `getSelectedRows()` λŠ” ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체만 λŒλ €μ£Όλ―€λ‘œ(κ°–κ³  μžˆμ§€ μ•Šμ€ 행을 λ§Œλ“€ 수 μ—†λ‹€)
47
+ * *"μ—¬λŸ¬ νŽ˜μ΄μ§€μ— 걸쳐 κ³ λ₯Έ λ’€ 일괄 처리"* μ—λŠ” 이μͺ½μ΄ ν•„μš”ν•˜λ‹€.
48
+ *
49
+ * ⚠**μŠ€λƒ…μƒ·μ΄λ‹€.** λ‚΄λΆ€ 집합을 κ·ΈλŒ€λ‘œ λ„˜κΈ°λ©΄ `ReadonlySet` 이 νƒ€μž… μˆ˜μ€€ 약속일 뿐이라
50
+ * JS μ†ŒλΉ„μžκ°€ `add` 둜 λ‚΄λΆ€ μƒνƒœλ₯Ό **κ°±μ‹  μ‹ ν˜Έ 없이** λ§κ°€λœ¨λ¦΄ 수 μžˆλ‹€. 볡제 λΉ„μš©μ€
51
+ * 선택 크기에 λΉ„λ‘€ν•˜κ³  λ¬΄μ‹œν•  μˆ˜μ€€μ΄λ‹€.
52
+ */
53
+ get selectedRowIds(): ReadonlySet<string>;
54
+ /**
55
+ * 선택을 **ν†΅μ§Έλ‘œ λŒ€μ²΄**ν•œλ‹€ β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” λˆ„μ λΆ„κΉŒμ§€.
56
+ *
57
+ * 앱이 자기 μƒνƒœλ₯Ό μ •λ³ΈμœΌλ‘œ μ‚ΌλŠ” 경우(μ™ΈλΆ€ μ €μž₯·볡원, ν•„ν„° λ³€κ²½ μ‹œ 정리)의 μ§„μž…μ μ΄λ‹€.
58
+ * ν˜„μž¬ νŽ˜μ΄μ§€μ— μ—†λŠ” μ‹λ³„μžλ₯Ό 넣어도 λœλ‹€ β€” κ·Έ νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•˜λ©΄ μ„ νƒλœ κ²ƒμœΌλ‘œ λ Œλ”λœλ‹€.
59
+ *
60
+ * ⚠**같은 집합이면 아무 일도 ν•˜μ§€ μ•ŠλŠ”λ‹€.** 앱이 `selection-change` λ₯Ό λ°›μ•„ 자기 μƒνƒœλ₯Ό
61
+ * κ°±μ‹ ν•˜κ³  λ‹€μ‹œ 이것을 λΆ€λ₯΄λŠ” 것이 μžμ—°μŠ€λŸ¬μš΄ 배선인데, 무쑰건 λ°œμƒμ‹œν‚€λ©΄ κ·Έ μžλ¦¬κ°€
62
+ * **λ¬΄ν•œ 루프**κ°€ λœλ‹€.
63
+ */
64
+ setSelection(ids: Iterable<string>): void;
65
+ /**
66
+ * 선택을 **μ „λΆ€** λΉ„μš΄λ‹€ β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” λˆ„μ λΆ„κΉŒμ§€.
67
+ *
68
+ * 전체선택 μ²΄ν¬λ°•μŠ€λŠ” «이 νŽ˜μ΄μ§€Β»λ§Œ λ‹€λ£¨λ―€λ‘œ μ „μ—­ μ†Œκ±°μ˜ μžλ¦¬κ°€ μ—†λ‹€. 일괄 처리λ₯Ό 끝낸 λ’€
69
+ * 앱이 μƒνƒœλ₯Ό λ˜λŒλ¦¬λŠ” κ²½λ‘œκ°€ μ—¬κΈ°λ‹€. `selection-change` λ₯Ό λ°œμƒμ‹œν‚¨λ‹€.
70
+ */
71
+ clearSelection(): void;
43
72
  /**
44
73
  * ν–‰μ˜ μ‹λ³„μž. 선택·확μž₯Β·ν–‰ 였λ₯˜ μƒνƒœκ°€ μ „λΆ€ 이 κ°’μœΌλ‘œ μΆ”μ λœλ‹€.
45
74
  *
@@ -52,8 +81,24 @@ export declare class URichTable extends LitElement {
52
81
  private _rowId;
53
82
  private _warnedMissingRowId;
54
83
  private _warnMissingRowId;
84
+ /**
85
+ * **ν˜„μž¬ νŽ˜μ΄μ§€μ˜** μ„ νƒλœ ν–‰. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄은 μ—¬κΈ° μ—†λ‹€ β€”
86
+ * 이 μ»΄ν¬λ„ŒνŠΈκ°€ κ°–κ³  μžˆμ§€ μ•Šμ€ 행을 λŒλ €μ€„ μˆ˜λŠ” μ—†κΈ° λ•Œλ¬Έμ΄λ‹€.
87
+ * νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” 선택 집합이 ν•„μš”ν•˜λ©΄ {@link selectedRowIds} λ₯Ό μ“΄λ‹€.
88
+ */
55
89
  getSelectedRows(): Record<string, unknown>[];
90
+ /** 이 νŽ˜μ΄μ§€ ν–‰λ“€μ˜ μ‹λ³„μž. 전체선택/ν•΄μ œκ°€ «이 νŽ˜μ΄μ§€Β» λ²”μœ„μž„μ„ μ •μ˜ν•˜λŠ” 값이닀. */
91
+ private _pageRowIds;
92
+ /** ν˜„μž¬ νŽ˜μ΄μ§€μ—μ„œ μ„ νƒλœ ν–‰ 수 β€” 전체선택 μ²΄ν¬λ°•μŠ€μ˜ Β«λΆ„μžΒ». */
93
+ private get _selectedOnPage();
56
94
  render(): TemplateResult;
95
+ /**
96
+ * ⚠**두 숫자λ₯Ό μ„žμ§€ μ•ŠλŠ”λ‹€.** μ²΄ν¬λ°•μŠ€λŠ” «이 νŽ˜μ΄μ§€Β»λ₯Ό 켜고 λ„λ―€λ‘œ κ·Έ μƒνƒœλ„ νŽ˜μ΄μ§€ 기쀀이고,
97
+ * 라벨의 κ±΄μˆ˜λŠ” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” **λˆ„μ **이닀. μ’…μ „μ—λŠ” λΆ„μžλ§Œ λˆ„μ μ΄κ³  λΆ„λͺ¨κ°€ νŽ˜μ΄μ§€λΌ
98
+ * λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄이 이 νŽ˜μ΄μ§€μ˜ 체크 μƒνƒœλ‘œ μƒˆμ–΄ λ‚˜μ™”λ‹€ β€” νŽ˜μ΄μ§€ 1을 μ „λŸ‰ μ„ νƒν•˜κ³ 
99
+ * λ„˜μ–΄κ°€λ©΄ νŽ˜μ΄μ§€ 2μ—μ„œ 아무것도 κ³ λ₯΄μ§€ μ•Šμ•˜λŠ”λ° μ²΄ν¬λ°•μŠ€κ°€ 켜져 λ³΄μ˜€κ³ , 그것을 끄면
100
+ * νŽ˜μ΄μ§€ 1의 선택이 쑰용히 μ‚¬λΌμ‘Œλ‹€.
101
+ */
57
102
  private _renderToolbar;
58
103
  private _renderHeader;
59
104
  private _renderFilterRow;
@@ -62,6 +107,23 @@ export declare class URichTable extends LitElement {
62
107
  private _renderCellContent;
63
108
  private _renderNewRow;
64
109
  private _renderPagination;
110
+ /**
111
+ * 전체선택 μ²΄ν¬λ°•μŠ€ β€” λ²”μœ„λŠ” **ν˜„μž¬ νŽ˜μ΄μ§€**λ‹€(ν•©μ§‘ν•©/μ°¨μ§‘ν•©, μΉ˜ν™˜μ΄ μ•„λ‹ˆλ‹€).
112
+ * μ’…μ „μ—λŠ” μΌ€ λ•Œ `new Set(ν˜„μž¬ νŽ˜μ΄μ§€)` 둜 **μΉ˜ν™˜**ν•˜κ³  끌 λ•Œ `new Set()` 으둜 **μ „μ—­ μ†Œκ±°**ν•΄μ„œ,
113
+ * μ–΄λŠ μͺ½μ΄λ“  λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄이 ν•¨κ»˜ λ‚ μ•„κ°”λ‹€. μ „μ—­ μ†Œκ±°κ°€ ν•„μš”ν•˜λ©΄ {@link clearSelection}.
114
+ *
115
+ * ## μ™œ `select-all` 을 λ”°λ‘œ λ‚΄λ³΄λ‚΄λŠ”κ°€
116
+ *
117
+ * `selection-change` λ§ŒμœΌλ‘œλŠ” *"μ‚¬μš©μžκ°€ μ„Έ 행을 κ³¨λžλ‹€"* 와 *"μ‚¬μš©μžκ°€ 전체선택을 λˆŒλ €λ‹€"* κ°€
118
+ * κ΅¬λΆ„λ˜μ§€ μ•ŠλŠ”λ‹€. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ κ·Έ ꡬ뢄은 앱에 ν•„μš”ν•˜λ‹€ β€” 전체선택을 λˆ„λ₯Έ μˆœκ°„μ΄
119
+ * *"이 쑰건에 λ§žλŠ” N건 μ „λΆ€"* λ₯Ό μ œμ•ˆν•  자리이기 λ•Œλ¬Έμ΄λ‹€.
120
+ *
121
+ * ⚠**`scope: 'page' | 'all'` ν•„λ“œλŠ” 두지 μ•Šμ•˜λ‹€.** 이 μ»΄ν¬λ„ŒνŠΈλŠ” `'all'` 을 **λ‚Ό 수 μ—†λ‹€** β€”
122
+ * λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 행을 κ°–κ³  μžˆμ§€ μ•Šκ³ , μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ Β«μ „μ—­ 전체선택»은 id λͺ©λ‘μ΄ μ•„λ‹ˆλΌ
123
+ * **쑰회 쑰건**이라 μ»΄ν¬λ„ŒνŠΈκ°€ ν‘œν˜„ν•  수 μžˆλŠ” 것이 μ•„λ‹ˆλ‹€. 값이 ν•˜λ‚˜λΏμΈ μœ λ‹ˆμ˜¨μ€
124
+ * *"λΌμ΄λΈŒλŸ¬λ¦¬κ°€ λͺ¨λ₯΄λŠ” κ°œλ…μ„ μ•„λŠ” μ²™ν•˜λŠ”"* ν•„λ“œκ°€ λœλ‹€. β‡’ μ»΄ν¬λ„ŒνŠΈλŠ” **μ˜λ„λ§Œ** μ•Œλ¦¬κ³ 
125
+ * μ „μ—­ 해석은 앱이 ν•œλ‹€.
126
+ */
65
127
  private _onSelectAll;
66
128
  private _onRowSelect;
67
129
  private _lastSelectedIndex;
@@ -83,6 +145,12 @@ export declare class URichTable extends LitElement {
83
145
  private _getOptionLabel;
84
146
  private _getPageNumbers;
85
147
  private _moveToNextEditableCell;
148
+ /**
149
+ * ⚠**두 ν•„λ“œκ°€ μ„œλ‘œ λ‹€λ₯Έ 것을 μ„Όλ‹€.** `selectedRows` λŠ” **ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체**이고
150
+ * `selectedIds` λŠ” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” **λˆ„μ  μ‹λ³„μž**λ‹€. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ λ‘˜μ˜ 길이가
151
+ * λ‹€λ₯Έ 것이 정상이며, κ·Έ 차이λ₯Ό 감좜 방법은 μ—†λ‹€ β€” μ»΄ν¬λ„ŒνŠΈκ°€ λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 행을
152
+ * κ°–κ³  μžˆμ§€ μ•ŠκΈ° λ•Œλ¬Έμ΄λ‹€.
153
+ */
86
154
  private _fireSelectionChange;
87
155
  connectedCallback(): void;
88
156
  disconnectedCallback(): void;
@@ -90,6 +158,7 @@ export declare class URichTable extends LitElement {
90
158
  private _handleCopy;
91
159
  private _handlePaste;
92
160
  private _moveFocus;
161
+ /** `Ctrl`/`Cmd` + `A` β€” 전체선택 μ²΄ν¬λ°•μŠ€μ™€ 같은 λ²”μœ„(ν˜„μž¬ νŽ˜μ΄μ§€ ν•©μ§‘ν•©)μ—¬μ•Ό ν•œλ‹€. */
93
162
  private _selectAll;
94
163
  static define(tagName?: string): void;
95
164
  }
@@ -102,6 +102,44 @@ var URichTable = class URichTable extends LitElement {
102
102
  this.rowErrors = next;
103
103
  }
104
104
  /**
105
+ * μ„ νƒλœ ν–‰μ˜ **μ‹λ³„μž μ§‘ν•©** β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§ˆλŸ¬ λˆ„μ λœ μ „λΆ€.
106
+ *
107
+ * `getSelectedRows()` λŠ” ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체만 λŒλ €μ£Όλ―€λ‘œ(κ°–κ³  μžˆμ§€ μ•Šμ€ 행을 λ§Œλ“€ 수 μ—†λ‹€)
108
+ * *"μ—¬λŸ¬ νŽ˜μ΄μ§€μ— 걸쳐 κ³ λ₯Έ λ’€ 일괄 처리"* μ—λŠ” 이μͺ½μ΄ ν•„μš”ν•˜λ‹€.
109
+ *
110
+ * ⚠**μŠ€λƒ…μƒ·μ΄λ‹€.** λ‚΄λΆ€ 집합을 κ·ΈλŒ€λ‘œ λ„˜κΈ°λ©΄ `ReadonlySet` 이 νƒ€μž… μˆ˜μ€€ 약속일 뿐이라
111
+ * JS μ†ŒλΉ„μžκ°€ `add` 둜 λ‚΄λΆ€ μƒνƒœλ₯Ό **κ°±μ‹  μ‹ ν˜Έ 없이** λ§κ°€λœ¨λ¦΄ 수 μžˆλ‹€. 볡제 λΉ„μš©μ€
112
+ * 선택 크기에 λΉ„λ‘€ν•˜κ³  λ¬΄μ‹œν•  μˆ˜μ€€μ΄λ‹€.
113
+ */
114
+ get selectedRowIds() {
115
+ return new Set(this.selectedIds);
116
+ }
117
+ /**
118
+ * 선택을 **ν†΅μ§Έλ‘œ λŒ€μ²΄**ν•œλ‹€ β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” λˆ„μ λΆ„κΉŒμ§€.
119
+ *
120
+ * 앱이 자기 μƒνƒœλ₯Ό μ •λ³ΈμœΌλ‘œ μ‚ΌλŠ” 경우(μ™ΈλΆ€ μ €μž₯·볡원, ν•„ν„° λ³€κ²½ μ‹œ 정리)의 μ§„μž…μ μ΄λ‹€.
121
+ * ν˜„μž¬ νŽ˜μ΄μ§€μ— μ—†λŠ” μ‹λ³„μžλ₯Ό 넣어도 λœλ‹€ β€” κ·Έ νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•˜λ©΄ μ„ νƒλœ κ²ƒμœΌλ‘œ λ Œλ”λœλ‹€.
122
+ *
123
+ * ⚠**같은 집합이면 아무 일도 ν•˜μ§€ μ•ŠλŠ”λ‹€.** 앱이 `selection-change` λ₯Ό λ°›μ•„ 자기 μƒνƒœλ₯Ό
124
+ * κ°±μ‹ ν•˜κ³  λ‹€μ‹œ 이것을 λΆ€λ₯΄λŠ” 것이 μžμ—°μŠ€λŸ¬μš΄ 배선인데, 무쑰건 λ°œμƒμ‹œν‚€λ©΄ κ·Έ μžλ¦¬κ°€
125
+ * **λ¬΄ν•œ 루프**κ°€ λœλ‹€.
126
+ */
127
+ setSelection(ids) {
128
+ const next = new Set(ids);
129
+ if (next.size === this.selectedIds.size && [...next].every((id) => this.selectedIds.has(id))) return;
130
+ this.selectedIds = next;
131
+ this._fireSelectionChange();
132
+ }
133
+ /**
134
+ * 선택을 **μ „λΆ€** λΉ„μš΄λ‹€ β€” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” λˆ„μ λΆ„κΉŒμ§€.
135
+ *
136
+ * 전체선택 μ²΄ν¬λ°•μŠ€λŠ” «이 νŽ˜μ΄μ§€Β»λ§Œ λ‹€λ£¨λ―€λ‘œ μ „μ—­ μ†Œκ±°μ˜ μžλ¦¬κ°€ μ—†λ‹€. 일괄 처리λ₯Ό 끝낸 λ’€
137
+ * 앱이 μƒνƒœλ₯Ό λ˜λŒλ¦¬λŠ” κ²½λ‘œκ°€ μ—¬κΈ°λ‹€. `selection-change` λ₯Ό λ°œμƒμ‹œν‚¨λ‹€.
138
+ */
139
+ clearSelection() {
140
+ this.setSelection([]);
141
+ }
142
+ /**
105
143
  * ν–‰μ˜ μ‹λ³„μž. 선택·확μž₯Β·ν–‰ 였λ₯˜ μƒνƒœκ°€ μ „λΆ€ 이 κ°’μœΌλ‘œ μΆ”μ λœλ‹€.
106
144
  *
107
145
  * ⚠`_id` λŠ” 이 μ»΄ν¬λ„ŒνŠΈκ°€ **λΆ€μ—¬ν•˜μ§€ μ•ŠλŠ”λ‹€.** μ†ŒλΉ„μžκ°€ λ„£μ–΄ μ£Όμ§€ μ•ŠμœΌλ©΄ λͺ¨λ“  ν–‰μ˜
@@ -121,9 +159,22 @@ var URichTable = class URichTable extends LitElement {
121
159
  this._warnedMissingRowId = true;
122
160
  console.warn("[@iyulab/data-components] u-rich-table: rows have no `_id`, so selection is tracked by **position**. Re-sorting or re-paging the data moves the selection to a different row. Give every row a unique `_id`.");
123
161
  }
162
+ /**
163
+ * **ν˜„μž¬ νŽ˜μ΄μ§€μ˜** μ„ νƒλœ ν–‰. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄은 μ—¬κΈ° μ—†λ‹€ β€”
164
+ * 이 μ»΄ν¬λ„ŒνŠΈκ°€ κ°–κ³  μžˆμ§€ μ•Šμ€ 행을 λŒλ €μ€„ μˆ˜λŠ” μ—†κΈ° λ•Œλ¬Έμ΄λ‹€.
165
+ * νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” 선택 집합이 ν•„μš”ν•˜λ©΄ {@link selectedRowIds} λ₯Ό μ“΄λ‹€.
166
+ */
124
167
  getSelectedRows() {
125
168
  return this.data.filter((row, i) => this.selectedIds.has(this._rowId(row, i)));
126
169
  }
170
+ /** 이 νŽ˜μ΄μ§€ ν–‰λ“€μ˜ μ‹λ³„μž. 전체선택/ν•΄μ œκ°€ «이 νŽ˜μ΄μ§€Β» λ²”μœ„μž„μ„ μ •μ˜ν•˜λŠ” 값이닀. */
171
+ _pageRowIds() {
172
+ return this.data.map((row, i) => this._rowId(row, i));
173
+ }
174
+ /** ν˜„μž¬ νŽ˜μ΄μ§€μ—μ„œ μ„ νƒλœ ν–‰ 수 β€” 전체선택 μ²΄ν¬λ°•μŠ€μ˜ Β«λΆ„μžΒ». */
175
+ get _selectedOnPage() {
176
+ return this._pageRowIds().reduce((n, id) => n + (this.selectedIds.has(id) ? 1 : 0), 0);
177
+ }
127
178
  render() {
128
179
  return html`
129
180
  ${this._renderToolbar()}
@@ -138,19 +189,31 @@ var URichTable = class URichTable extends LitElement {
138
189
  ${this._renderPagination()}
139
190
  `;
140
191
  }
192
+ /**
193
+ * ⚠**두 숫자λ₯Ό μ„žμ§€ μ•ŠλŠ”λ‹€.** μ²΄ν¬λ°•μŠ€λŠ” «이 νŽ˜μ΄μ§€Β»λ₯Ό 켜고 λ„λ―€λ‘œ κ·Έ μƒνƒœλ„ νŽ˜μ΄μ§€ 기쀀이고,
194
+ * 라벨의 κ±΄μˆ˜λŠ” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” **λˆ„μ **이닀. μ’…μ „μ—λŠ” λΆ„μžλ§Œ λˆ„μ μ΄κ³  λΆ„λͺ¨κ°€ νŽ˜μ΄μ§€λΌ
195
+ * λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄이 이 νŽ˜μ΄μ§€μ˜ 체크 μƒνƒœλ‘œ μƒˆμ–΄ λ‚˜μ™”λ‹€ β€” νŽ˜μ΄μ§€ 1을 μ „λŸ‰ μ„ νƒν•˜κ³ 
196
+ * λ„˜μ–΄κ°€λ©΄ νŽ˜μ΄μ§€ 2μ—μ„œ 아무것도 κ³ λ₯΄μ§€ μ•Šμ•˜λŠ”λ° μ²΄ν¬λ°•μŠ€κ°€ 켜져 λ³΄μ˜€κ³ , 그것을 끄면
197
+ * νŽ˜μ΄μ§€ 1의 선택이 쑰용히 μ‚¬λΌμ‘Œλ‹€.
198
+ */
141
199
  _renderToolbar() {
142
- const selectedCount = this.selectedIds.size;
200
+ const total = this.selectedIds.size;
201
+ const onPage = this._selectedOnPage;
202
+ const crossesPages = total > onPage;
143
203
  return html`
144
204
  <div class="toolbar">
145
205
  ${this.selectable ? html`
146
206
  <div class="selection-info">
147
207
  <input type="checkbox"
148
- .checked=${selectedCount > 0 && selectedCount === this.data.length}
149
- .indeterminate=${selectedCount > 0 && selectedCount < this.data.length}
208
+ .checked=${this.data.length > 0 && onPage === this.data.length}
209
+ .indeterminate=${onPage > 0 && onPage < this.data.length}
150
210
  @change=${this._onSelectAll} />
151
- ${selectedCount > 0 ? html`<span>${selectedCount}건 선택됨</span>` : ""}
211
+ ${total > 0 ? html`<span>${crossesPages ? messages.text("selectedAcrossPages", {
212
+ count: total,
213
+ onPage
214
+ }) : messages.text("selected", { count: total })}</span>` : ""}
152
215
  </div>
153
- ${selectedCount > 0 ? html`<slot name="bulk-actions"></slot>` : ""}
216
+ ${total > 0 ? html`<slot name="bulk-actions"></slot>` : ""}
154
217
  ` : ""}
155
218
  <div style="flex:1"></div>
156
219
  <slot name="toolbar-end"></slot>
@@ -332,16 +395,45 @@ var URichTable = class URichTable extends LitElement {
332
395
  25,
333
396
  50,
334
397
  100
335
- ].map((s) => html`<option value=${s} ?selected=${s === this.pageSize}>${s}ν–‰</option>`)}
398
+ ].map((s) => html`<option value=${s} ?selected=${s === this.pageSize}>${messages.text("rowsPerPage", { size: s })}</option>`)}
336
399
  </select>
337
400
  </div>
338
401
  </div>
339
402
  `;
340
403
  }
404
+ /**
405
+ * 전체선택 μ²΄ν¬λ°•μŠ€ β€” λ²”μœ„λŠ” **ν˜„μž¬ νŽ˜μ΄μ§€**λ‹€(ν•©μ§‘ν•©/μ°¨μ§‘ν•©, μΉ˜ν™˜μ΄ μ•„λ‹ˆλ‹€).
406
+ * μ’…μ „μ—λŠ” μΌ€ λ•Œ `new Set(ν˜„μž¬ νŽ˜μ΄μ§€)` 둜 **μΉ˜ν™˜**ν•˜κ³  끌 λ•Œ `new Set()` 으둜 **μ „μ—­ μ†Œκ±°**ν•΄μ„œ,
407
+ * μ–΄λŠ μͺ½μ΄λ“  λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 선택뢄이 ν•¨κ»˜ λ‚ μ•„κ°”λ‹€. μ „μ—­ μ†Œκ±°κ°€ ν•„μš”ν•˜λ©΄ {@link clearSelection}.
408
+ *
409
+ * ## μ™œ `select-all` 을 λ”°λ‘œ λ‚΄λ³΄λ‚΄λŠ”κ°€
410
+ *
411
+ * `selection-change` λ§ŒμœΌλ‘œλŠ” *"μ‚¬μš©μžκ°€ μ„Έ 행을 κ³¨λžλ‹€"* 와 *"μ‚¬μš©μžκ°€ 전체선택을 λˆŒλ €λ‹€"* κ°€
412
+ * κ΅¬λΆ„λ˜μ§€ μ•ŠλŠ”λ‹€. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ κ·Έ ꡬ뢄은 앱에 ν•„μš”ν•˜λ‹€ β€” 전체선택을 λˆ„λ₯Έ μˆœκ°„μ΄
413
+ * *"이 쑰건에 λ§žλŠ” N건 μ „λΆ€"* λ₯Ό μ œμ•ˆν•  자리이기 λ•Œλ¬Έμ΄λ‹€.
414
+ *
415
+ * ⚠**`scope: 'page' | 'all'` ν•„λ“œλŠ” 두지 μ•Šμ•˜λ‹€.** 이 μ»΄ν¬λ„ŒνŠΈλŠ” `'all'` 을 **λ‚Ό 수 μ—†λ‹€** β€”
416
+ * λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 행을 κ°–κ³  μžˆμ§€ μ•Šκ³ , μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ Β«μ „μ—­ 전체선택»은 id λͺ©λ‘μ΄ μ•„λ‹ˆλΌ
417
+ * **쑰회 쑰건**이라 μ»΄ν¬λ„ŒνŠΈκ°€ ν‘œν˜„ν•  수 μžˆλŠ” 것이 μ•„λ‹ˆλ‹€. 값이 ν•˜λ‚˜λΏμΈ μœ λ‹ˆμ˜¨μ€
418
+ * *"λΌμ΄λΈŒλŸ¬λ¦¬κ°€ λͺ¨λ₯΄λŠ” κ°œλ…μ„ μ•„λŠ” μ²™ν•˜λŠ”"* ν•„λ“œκ°€ λœλ‹€. β‡’ μ»΄ν¬λ„ŒνŠΈλŠ” **μ˜λ„λ§Œ** μ•Œλ¦¬κ³ 
419
+ * μ „μ—­ 해석은 앱이 ν•œλ‹€.
420
+ */
341
421
  _onSelectAll(e) {
342
- if (e.target.checked) this.selectedIds = new Set(this.data.map((r, i) => this._rowId(r, i)));
343
- else this.selectedIds = /* @__PURE__ */ new Set();
422
+ const checked = e.target.checked;
423
+ const pageIds = this._pageRowIds();
424
+ const next = new Set(this.selectedIds);
425
+ for (const id of pageIds) if (checked) next.add(id);
426
+ else next.delete(id);
427
+ this.selectedIds = next;
344
428
  this._fireSelectionChange();
429
+ this.dispatchEvent(new CustomEvent("select-all", {
430
+ detail: {
431
+ checked,
432
+ pageRowIds: pageIds
433
+ },
434
+ bubbles: true,
435
+ composed: true
436
+ }));
345
437
  }
346
438
  _onRowSelect(rowId) {
347
439
  const next = new Set(this.selectedIds);
@@ -578,9 +670,18 @@ var URichTable = class URichTable extends LitElement {
578
670
  const value = this.data[rowIndex]?.[this.columns[colIndex]?.key];
579
671
  this._onCellDblClick(rowIndex, colIndex, value);
580
672
  }
673
+ /**
674
+ * ⚠**두 ν•„λ“œκ°€ μ„œλ‘œ λ‹€λ₯Έ 것을 μ„Όλ‹€.** `selectedRows` λŠ” **ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체**이고
675
+ * `selectedIds` λŠ” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” **λˆ„μ  μ‹λ³„μž**λ‹€. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ λ‘˜μ˜ 길이가
676
+ * λ‹€λ₯Έ 것이 정상이며, κ·Έ 차이λ₯Ό 감좜 방법은 μ—†λ‹€ β€” μ»΄ν¬λ„ŒνŠΈκ°€ λ‹€λ₯Έ νŽ˜μ΄μ§€μ˜ 행을
677
+ * κ°–κ³  μžˆμ§€ μ•ŠκΈ° λ•Œλ¬Έμ΄λ‹€.
678
+ */
581
679
  _fireSelectionChange() {
582
680
  this.dispatchEvent(new CustomEvent("selection-change", {
583
- detail: { selectedRows: this.getSelectedRows() },
681
+ detail: {
682
+ selectedRows: this.getSelectedRows(),
683
+ selectedIds: [...this.selectedIds]
684
+ },
584
685
  bubbles: true,
585
686
  composed: true
586
687
  }));
@@ -620,8 +721,11 @@ var URichTable = class URichTable extends LitElement {
620
721
  colIndex: newCol
621
722
  };
622
723
  }
724
+ /** `Ctrl`/`Cmd` + `A` β€” 전체선택 μ²΄ν¬λ°•μŠ€μ™€ 같은 λ²”μœ„(ν˜„μž¬ νŽ˜μ΄μ§€ ν•©μ§‘ν•©)μ—¬μ•Ό ν•œλ‹€. */
623
725
  _selectAll() {
624
- this.selectedIds = new Set(this.data.map((r, i) => this._rowId(r, i)));
726
+ const next = new Set(this.selectedIds);
727
+ for (const id of this._pageRowIds()) next.add(id);
728
+ this.selectedIds = next;
625
729
  this._fireSelectionChange();
626
730
  }
627
731
  static define(tagName = "u-rich-table") {
@@ -31,8 +31,24 @@ export interface FilterState {
31
31
  [field: string]: string;
32
32
  }
33
33
  export interface RichTableEventMap {
34
+ /**
35
+ * βš λ‘ ν•„λ“œκ°€ μ„œλ‘œ λ‹€λ₯Έ 것을 μ„Όλ‹€ β€” `selectedRows` λŠ” **ν˜„μž¬ νŽ˜μ΄μ§€μ˜ ν–‰ 객체**,
36
+ * `selectedIds` λŠ” νŽ˜μ΄μ§€λ₯Ό κ°€λ‘œμ§€λ₯΄λŠ” **λˆ„μ  μ‹λ³„μž**λ‹€. μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ 길이가 λ‹€λ₯Έ 것이 정상이닀.
37
+ */
34
38
  'selection-change': CustomEvent<{
35
39
  selectedRows: Record<string, unknown>[];
40
+ selectedIds: string[];
41
+ }>;
42
+ /**
43
+ * μ‚¬μš©μžκ°€ **전체선택 μ²΄ν¬λ°•μŠ€**λ₯Ό μ‘°μž‘ν–ˆλ‹€. `selection-change` 와 ν•¨κ»˜ λ°œμƒν•œλ‹€.
44
+ *
45
+ * 이 μ΄λ²€νŠΈκ°€ λ”°λ‘œ μžˆλŠ” μ΄μœ λŠ” *"μ„Έ 행을 κ³¨λžλ‹€"* 와 *"전체선택을 λˆŒλ €λ‹€"* λ₯Ό κ°€λ₯΄κΈ° μœ„ν•΄μ„œλ‹€ β€”
46
+ * μ„œλ²„ νŽ˜μ΄μ§•μ—μ„œ ν›„μžλŠ” 앱이 *"쑰건에 λ§žλŠ” 전체 N건"* 을 μ œμ•ˆν•  μžλ¦¬λ‹€.
47
+ * `pageRowIds` λŠ” 이번 μ‘°μž‘μ΄ λ”ν•˜κ±°λ‚˜ λΊ€ **ν˜„μž¬ νŽ˜μ΄μ§€μ˜** μ‹λ³„μžλ‹€.
48
+ */
49
+ 'select-all': CustomEvent<{
50
+ checked: boolean;
51
+ pageRowIds: string[];
36
52
  }>;
37
53
  'row-create': CustomEvent<{
38
54
  row: Record<string, unknown>;
package/dist/react.d.ts CHANGED
@@ -2,7 +2,6 @@ import { EventName } from '@lit/react';
2
2
  import { USimpleSheet } from './components/simple-sheet/USimpleSheet';
3
3
  import { UDataView } from './components/data-view/UDataView';
4
4
  import { URichTable } from './components/u-rich-table/URichTable';
5
- import { RichTableEventMap } from './components/u-rich-table/types';
6
5
  /** USimpleSheet React 래퍼 β€” `change` μ΄λ²€νŠΈλŠ” `onChange`둜 λ…ΈμΆœ */
7
6
  export declare const USimpleSheetReact: import('@lit/react').ReactWebComponent<USimpleSheet, {
8
7
  onChange: EventName<CustomEvent<{
@@ -13,15 +12,44 @@ export declare const USimpleSheetReact: import('@lit/react').ReactWebComponent<U
13
12
  export declare const UDataViewReact: import('@lit/react').ReactWebComponent<UDataView, {}>;
14
13
  /** URichTable React 래퍼 β€” RichTableEventMap의 λͺ¨λ“  이벀트λ₯Ό onXxx둜 λ…ΈμΆœ */
15
14
  export declare const URichTableReact: import('@lit/react').ReactWebComponent<URichTable, {
16
- onSelectionChange: EventName<RichTableEventMap["selection-change"]>;
17
- onRowCreate: EventName<RichTableEventMap["row-create"]>;
18
- onRowUpdate: EventName<RichTableEventMap["row-update"]>;
19
- onRowDelete: EventName<RichTableEventMap["row-delete"]>;
20
- onRowExpand: EventName<RichTableEventMap["row-expand"]>;
21
- onSortChange: EventName<RichTableEventMap["sort-change"]>;
22
- onFilterChange: EventName<RichTableEventMap["filter-change"]>;
23
- onPageChange: EventName<RichTableEventMap["page-change"]>;
24
- onPaste: EventName<RichTableEventMap["paste"]>;
15
+ readonly onSelectionChange: EventName<CustomEvent<{
16
+ selectedRows: Record<string, unknown>[];
17
+ selectedIds: string[];
18
+ }>>;
19
+ readonly onSelectAll: EventName<CustomEvent<{
20
+ checked: boolean;
21
+ pageRowIds: string[];
22
+ }>>;
23
+ readonly onRowCreate: EventName<CustomEvent<{
24
+ row: Record<string, unknown>;
25
+ }>>;
26
+ readonly onRowUpdate: EventName<CustomEvent<{
27
+ row: Record<string, unknown>;
28
+ field: string;
29
+ value: unknown;
30
+ oldValue: unknown;
31
+ }>>;
32
+ readonly onRowDelete: EventName<CustomEvent<{
33
+ row: Record<string, unknown>;
34
+ }>>;
35
+ readonly onRowExpand: EventName<CustomEvent<{
36
+ row: Record<string, unknown>;
37
+ expanded: boolean;
38
+ }>>;
39
+ readonly onSortChange: EventName<CustomEvent<{
40
+ field: string;
41
+ direction: "asc" | "desc" | null;
42
+ }>>;
43
+ readonly onFilterChange: EventName<CustomEvent<{
44
+ filters: import('./react').FilterState;
45
+ }>>;
46
+ readonly onPageChange: EventName<CustomEvent<{
47
+ page: number;
48
+ pageSize: number;
49
+ }>>;
50
+ readonly onPaste: EventName<CustomEvent<{
51
+ rows: Record<string, unknown>[];
52
+ }>>;
25
53
  }>;
26
54
  export { USimpleSheet, UDataView, URichTable };
27
55
  export type { SheetColumn } from './components/simple-sheet/USimpleSheet';
package/dist/react.js CHANGED
@@ -34,6 +34,7 @@ var URichTableReact = createComponent({
34
34
  react: React,
35
35
  events: {
36
36
  onSelectionChange: "selection-change",
37
+ onSelectAll: "select-all",
37
38
  onRowCreate: "row-create",
38
39
  onRowUpdate: "row-update",
39
40
  onRowDelete: "row-delete",
@@ -21,5 +21,5 @@
21
21
  * λ”Έλ € μ˜¨λ‹€**(`Locale.getValue('valueMissing')`). 같은 λ¬Έμž₯을 이 ν‘œμ— λ³΅μ œν•˜λ©΄ 두 곳이
22
22
  * κ°ˆλΌμ§„λ‹€.
23
23
  */
24
- export type DataMessageKey = 'empty' | 'loading' | 'filterPlaceholder' | 'filterAll' | 'addRow' | 'pageInfo' | 'noMatch';
24
+ export type DataMessageKey = 'empty' | 'loading' | 'filterPlaceholder' | 'filterAll' | 'addRow' | 'pageInfo' | 'noMatch' | 'selected' | 'selectedAcrossPages' | 'rowsPerPage';
25
25
  export declare const messages: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<DataMessageKey>;
@@ -8,7 +8,10 @@ messages.register("en", {
8
8
  filterAll: "All",
9
9
  addRow: "+ New row",
10
10
  pageInfo: "Showing {start}-{end} of {total}",
11
- noMatch: "No matching item"
11
+ noMatch: "No matching item",
12
+ selected: "{count} selected",
13
+ selectedAcrossPages: "{count} selected ({onPage} on this page)",
14
+ rowsPerPage: "{size} rows"
12
15
  });
13
16
  messages.register("ko", {
14
17
  empty: "데이터가 μ—†μŠ΅λ‹ˆλ‹€",
@@ -17,7 +20,10 @@ messages.register("ko", {
17
20
  filterAll: "전체",
18
21
  addRow: "+ μƒˆ ν–‰",
19
22
  pageInfo: "전체 {total}건 쀑 {start}-{end} ν‘œμ‹œ",
20
- noMatch: "μΌμΉ˜ν•˜λŠ” ν•­λͺ© μ—†μŒ"
23
+ noMatch: "μΌμΉ˜ν•˜λŠ” ν•­λͺ© μ—†μŒ",
24
+ selected: "{count}건 선택됨",
25
+ selectedAcrossPages: "{count}건 선택됨 (이 νŽ˜μ΄μ§€ {onPage}건)",
26
+ rowsPerPage: "{size}ν–‰"
21
27
  });
22
28
  //#endregion
23
29
  export { messages };
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.11.0",
4
+ "version": "0.12.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-components",
@@ -51,11 +51,12 @@
51
51
  ],
52
52
  "scripts": {
53
53
  "start": "vite",
54
- "build": "eslint && vite build",
54
+ "build": "npm run typecheck && eslint && vite build",
55
55
  "test": "vitest run",
56
56
  "test:watch": "vitest",
57
57
  "lint": "eslint src/",
58
- "lint:fix": "eslint src/ --fix"
58
+ "lint:fix": "eslint src/ --fix",
59
+ "typecheck": "tsc --noEmit"
59
60
  },
60
61
  "dependencies": {
61
62
  "@iyulab/components": "^1.23.0",