@iyulab/flex-table 0.34.3 → 0.36.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 +50 -0
- package/README.md +63 -3
- package/dist/{flex-table-BbeD49ly.js → flex-table-D5FjaSJV.js} +1058 -298
- package/dist/flex-table.d.ts +30 -2
- package/dist/flex-table.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/locale.d.ts +32 -0
- package/dist/react.js +1 -1
- package/package.json +4 -7
package/dist/flex-table.d.ts
CHANGED
|
@@ -366,6 +366,8 @@ export declare class FlexTable extends LitElement {
|
|
|
366
366
|
private _onKeyDown;
|
|
367
367
|
private _handleCtrlKey;
|
|
368
368
|
private _handleAltKey;
|
|
369
|
+
/** Widen (positive) or narrow (negative) a visible column by `delta` px, never below its minimum. */
|
|
370
|
+
private _resizeColumnBy;
|
|
369
371
|
private _handleNavigation;
|
|
370
372
|
private _handleCopy;
|
|
371
373
|
private _handlePaste;
|
|
@@ -402,7 +404,26 @@ export declare class FlexTable extends LitElement {
|
|
|
402
404
|
*/
|
|
403
405
|
private _getPinnedRightLeft;
|
|
404
406
|
private _renderHeaderCell;
|
|
407
|
+
/** Hidden columns directly adjacent to `col` (before and after) — the ones its menu can show again. */
|
|
408
|
+
private _hiddenNeighbors;
|
|
405
409
|
private _onHeaderContextMenu;
|
|
410
|
+
/**
|
|
411
|
+
* The header's column menu button — the same menu a right-click opens, anchored under the button.
|
|
412
|
+
* It is the pointer-sized, keyboard-reachable way to every per-column action: filtering, hiding,
|
|
413
|
+
* and resizing without dragging the 6px handle (WCAG 2.2 SC 2.5.7 / 2.5.8).
|
|
414
|
+
*/
|
|
415
|
+
private _onColumnMenuBtnClick;
|
|
416
|
+
private _menuItems;
|
|
417
|
+
private _columnMenuButton;
|
|
418
|
+
private _closeHeaderMenu;
|
|
419
|
+
private _onHeaderMenuKeydown;
|
|
420
|
+
/**
|
|
421
|
+
* Menu keyboard pattern shared by the column menu and the cell context menu: arrows and Home/End
|
|
422
|
+
* move focus between the items (wrapping), Escape closes and returns focus, Tab closes.
|
|
423
|
+
*/
|
|
424
|
+
private _onMenuKeydown;
|
|
425
|
+
/** Open the filter dropdown for `key` from its column menu, focusing its first control. */
|
|
426
|
+
private _openFilterFromMenu;
|
|
406
427
|
private _showHiddenBefore;
|
|
407
428
|
private _renderHeaderContextMenu;
|
|
408
429
|
private _renderBodyContextMenu;
|
|
@@ -411,9 +432,15 @@ export declare class FlexTable extends LitElement {
|
|
|
411
432
|
private _commitCommentPopup;
|
|
412
433
|
private _cancelCommentPopup;
|
|
413
434
|
private _renderCommentPopup;
|
|
435
|
+
/**
|
|
436
|
+
* Sort by one column from a menu — the column menu (the keyboard path to sorting) and the cell
|
|
437
|
+
* context menu. Same contract as a header click: server mode only reports, and `sort-change`
|
|
438
|
+
* carries `{ criteria }`.
|
|
439
|
+
*/
|
|
414
440
|
private _applySortFromMenu;
|
|
441
|
+
/** Keep a fixed-position menu inside the viewport — a menu opened near the right or bottom edge would spill off-screen. */
|
|
442
|
+
private _keepMenuInView;
|
|
415
443
|
private _adjustFilterDropdown;
|
|
416
|
-
private _onFilterBtnClick;
|
|
417
444
|
private _renderFilterDropdown;
|
|
418
445
|
private _buildTextPredicate;
|
|
419
446
|
private _applyTextFilter;
|
|
@@ -439,7 +466,8 @@ export declare class FlexTable extends LitElement {
|
|
|
439
466
|
private _applyDateFilter;
|
|
440
467
|
private _renderBooleanFilter;
|
|
441
468
|
private _clearColumnFilter;
|
|
442
|
-
|
|
469
|
+
/** Size a column to its widest rendered content — the resize handle's double-click and the column menu. */
|
|
470
|
+
private _autoFitColumn;
|
|
443
471
|
private _onResizeStart;
|
|
444
472
|
private _onHeaderMouseDown;
|
|
445
473
|
private _startColumnGhost;
|
package/dist/flex-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r,
|
|
2
|
-
export {
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./flex-table-D5FjaSJV.js";
|
|
2
|
+
export { a as FlexTable, t as RowSelectionState, i as UndoStack, n as exportData, e as flexTableLocale, r as renderCell };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export type { UndoAction } from './core/undo.js';
|
|
|
9
9
|
export type { ExportFormat } from './export/export.js';
|
|
10
10
|
export { exportData } from './export/export.js';
|
|
11
11
|
export { renderCell } from './renderers/cell-renderer.js';
|
|
12
|
+
export { flexTableLocale } from './locale.js';
|
|
13
|
+
export type { FlexTableMessageKey } from './locale.js';
|
package/dist/locale.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@iyulab/flex-table` 가 스스로 그리는 chrome 문자열의 로케일 묶음.
|
|
3
|
+
*
|
|
4
|
+
* ★**왜 자체 레지스트리를 만들지 않는가**: `@iyulab/components` 가 정확히 이 용도의 primitive 를
|
|
5
|
+
* 갖고 있다(`Locale.namespace<K>()` — 키 유니온을 소비자가 정하므로 그 라이브러리의 키셋은
|
|
6
|
+
* 커지지 않는다). 이 패키지는 그것을 **이미 필수 peer 로 선언**하고 있고(스타일시트가 `--u-*`
|
|
7
|
+
* 토큰을 56곳에서 쓴다), 그러므로 이 패키지를 쓰는 소비자는 그 패키지를 이미 설치한다.
|
|
8
|
+
* 여기서 두 번째 레지스트리를 만드는 것은 새 능력이 아니라 **사본**이다.
|
|
9
|
+
*
|
|
10
|
+
* ⚠**종전 판단이 뒤집힌 자리다.** `odata/use-odata-source.ts` 에 *"한 문자열을 위해
|
|
11
|
+
* `@iyulab/components` 런타임 의존을 들이는 것은 비용이 이득을 넘는다"* 라고 적혀 있었고,
|
|
12
|
+
* 그 전제는 **「한 문자열」** 이었다. 실측하니 이 패키지의 하드코딩 chrome 문자열은 **31건**
|
|
13
|
+
* 이고 필터·찾기/바꾸기 UI 전체가 거기 있다 — 전제가 참이 아니게 되면 결론도 따라가야 한다.
|
|
14
|
+
*
|
|
15
|
+
* ⚠**기본은 영어이고 내장은 en·ko 둘뿐이다.** 다른 언어는 소비자가 더한다:
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { flexTableLocale } from '@iyulab/flex-table';
|
|
18
|
+
* flexTableLocale.register('ja', { contains: '含む', … });
|
|
19
|
+
* ```
|
|
20
|
+
* 14개 언어를 여기서 미리 채우지 않는 이유는 `@iyulab/components` 와 이 패키지의 위치가
|
|
21
|
+
* 다르기 때문이다 — 그쪽은 어떤 앱에든 들어가는 기반이고, 이쪽은 아직 실측된 소비 범위가
|
|
22
|
+
* 좁다. 필요해지는 언어는 요청과 함께 온다.
|
|
23
|
+
*
|
|
24
|
+
* ⚠**기호와 연산자는 이 표에 없다** — `AND`/`OR`(필터 결합 연산자), `◀`·`▶`·`✕`·`Aa`·`[ ]`
|
|
25
|
+
* (아이콘 자리의 글리프)는 어느 로케일에서도 같은 것을 뜻하며, 번역하면 오히려 읽히지 않는다.
|
|
26
|
+
* 그 판단은 «번역하지 않기로 한 것»이지 «빠뜨린 것»이 아니다.
|
|
27
|
+
*/
|
|
28
|
+
export type FlexTableMessageKey = 'showHiddenColumns' | 'columnMenu' | 'cellActions' | 'noColumnsDefined' | 'addCommentPlaceholder' | 'cancel' | 'save' | 'clear' | 'blankCells' | 'emptyOnly' | 'nonEmptyOnly' | 'blankAll' | 'all' | 'contains' | 'startsWith' | 'endsWith' | 'wildcard' | 'searchPlaceholder' | 'valuePlaceholder' | 'fromPlaceholder' | 'toPlaceholder' | 'findPlaceholder' | 'findPrevious' | 'findNext' | 'matchCase' | 'wholeCell' | 'closeFind' | 'replaceWithPlaceholder' | 'replace' | 'replaceAll';
|
|
29
|
+
/** 이 패키지의 chrome 문자열 묶음. 소비자가 `register()` 로 언어를 더하거나 문구를 덮을 수 있다. */
|
|
30
|
+
export declare const flexTableLocale: import("@iyulab/components/dist/utilities/Locale.js").LocaleNamespace<FlexTableMessageKey>;
|
|
31
|
+
/** 짧은 조회 별칭 — 렌더 코드가 읽히게 유지한다. */
|
|
32
|
+
export declare const t: (key: FlexTableMessageKey) => string;
|
package/dist/react.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/flex-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A minimalist, input-centric data grid web component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/flex-table.js",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
47
47
|
"test": "vitest run",
|
|
48
48
|
"test:watch": "vitest",
|
|
49
|
-
"test:coverage": "vitest run --coverage",
|
|
50
49
|
"lint": "eslint src/",
|
|
51
50
|
"lint:fix": "eslint src/ --fix"
|
|
52
51
|
},
|
|
@@ -91,16 +90,14 @@
|
|
|
91
90
|
"@types/react-dom": "^19.2.7",
|
|
92
91
|
"@typescript-eslint/eslint-plugin": "^8.64.0",
|
|
93
92
|
"@typescript-eslint/parser": "^8.64.0",
|
|
94
|
-
"@vitest/browser-playwright": "^
|
|
93
|
+
"@vitest/browser-playwright": "^5.0.0",
|
|
95
94
|
"eslint": "^10.1.0",
|
|
96
95
|
"eslint-plugin-lit": "^2.3.1",
|
|
97
|
-
"jsdom": "^
|
|
98
|
-
"loupe": "^3.2.1",
|
|
96
|
+
"jsdom": "^30.0.1",
|
|
99
97
|
"react": "^19.2.7",
|
|
100
98
|
"react-dom": "^19.2.8",
|
|
101
|
-
"strip-literal": "^3.1.0",
|
|
102
99
|
"typescript": "^6.0.2",
|
|
103
100
|
"vite": "^8.1.4",
|
|
104
|
-
"vitest": "^
|
|
101
|
+
"vitest": "^5.0.0"
|
|
105
102
|
}
|
|
106
103
|
}
|