@novnox/grid 0.0.0-stage → 1.0.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/LICENSE.txt ADDED
@@ -0,0 +1,133 @@
1
+ NoxGrid 최종 사용자 사용권 계약 (EULA)
2
+ Copyright © 2026 Nox. All rights reserved.
3
+
4
+ 이 계약은 Nox(이하 "저작권자")와 NoxGrid 소프트웨어를 설치·복사·사용하는 개인 또는 단체(이하 "사용자") 사이의
5
+ 법적 계약입니다. 소프트웨어를 설치·복사·사용하면 이 계약에 동의한 것으로 봅니다. 동의하지 않으면 설치·사용하지 마십시오.
6
+
7
+ 제1조 (정의)
8
+ 1. "소프트웨어"란 NoxGrid 데스크톱(Nox.Grid, Nox.Grid.WinForms, Nox.Grid.Design), 서버(Nox.Grid.Server),
9
+ 웹(@novnox/grid, @novnox/grid-react, @novnox/grid-vue) 라이브러리와 이에 딸린 문서·예제·도구 및 그 업데이트를 말합니다.
10
+ 2. "런타임 파일"이란 응용 프로그램이 실행될 때 필요한 Nox.Grid.dll, Nox.Grid.WinForms.dll, Nox.Grid.Server.dll 과
11
+ 웹 라이브러리의 빌드 파일을 말합니다.
12
+ 3. "디자인 타임 파일"이란 Visual Studio 디자이너 기능을 위한 Nox.Grid.Design.dll 과 문서·예제를 말합니다.
13
+ 4. "개발자"란 소프트웨어를 사용해 응용 프로그램을 개발하는 사람 한 명을 말합니다.
14
+ 5. "응용 프로그램"이란 사용자가 소프트웨어를 이용해 만든 프로그램 또는 웹 서비스로서, 소프트웨어와 다른 주된 기능을 가진 것을 말합니다.
15
+ 6. "사용권 키"란 저작권자가 발급하는, 사용자와 사용권 종류가 적힌 전자 서명 글자를 말합니다.
16
+ 7. "기업"이란 (a) 컴퓨터 또는 사용자가 250대(명)를 넘거나 (b) 연 매출이 미화 100만 달러(또는 그에 해당하는 금액)를 넘는
17
+ 조직과 그 계열 조직을 말합니다.
18
+
19
+ 제2조 (사용권 종류)
20
+ 1. 버전 1.x 무료 사용권: 소프트웨어 버전 1.x 는 누구나(기업 포함) 무료로, 기간 제한 없이, 상업적 목적을 포함해
21
+ 응용 프로그램 개발에 사용할 수 있습니다. 이 권리는 이후 버전의 사용권 조건이 바뀌어도 버전 1.x 에 대해 유지됩니다.
22
+ 2. 버전 2.0 이후: 저작권자는 버전 2.0 부터 다음 사용권을 둘 수 있으며, 구체적 조건은 해당 버전과 함께 공지합니다.
23
+ 가. 커뮤니티 사용권(무료): 개인 개발자, 오픈 소스 프로젝트, 교육·연구, 비영리 단체, 기업이 아닌 조직(개발자 5명까지)
24
+ 나. 상용 사용권(유료): 기업, 그리고 커뮤니티 사용권 범위를 넘는 사용
25
+ 3. 사용권은 비독점적이며 양도할 수 없습니다. 한 개발자는 본인이 사용하는 여러 컴퓨터에 설치할 수 있습니다.
26
+
27
+ 제3조 (사용권 키)
28
+ 1. 저작권자는 사용권 키를 발급합니다. 버전 1.x 와 커뮤니티 사용권의 키는 무료입니다.
29
+ 2. 사용권 키가 없거나 맞지 않으면 소프트웨어는 개발 중 안내(디자이너·디버거) 또는 화면 한쪽의 작은 안내 문구를
30
+ 표시할 수 있습니다. 이미 배포된 응용 프로그램의 기능을 멈추게 하지는 않습니다.
31
+ 3. 사용권 키는 발급받은 사용자의 응용 프로그램에만 넣을 수 있으며, 공개하거나 다른 사람에게 주어서는 안 됩니다.
32
+ 4. 저작권자는 사용권 키 발급을 위해 이름·전자 우편 주소 등 최소한의 정보를 받을 수 있으며, 사용권 관리와
33
+ 제품 안내 외의 목적으로 쓰지 않습니다.
34
+
35
+ 제4조 (런타임 배포)
36
+ 1. 사용권을 가진 사용자는 응용 프로그램과 함께 런타임 파일을 최종 사용자에게 로열티 없이 배포할 수 있습니다.
37
+ 2. 디자인 타임 파일은 배포할 수 없습니다. 문서·예제는 응용 프로그램의 일부로 배포할 수 없습니다.
38
+ 3. 응용 프로그램의 사용권 조건은 이 계약보다 저작권자에게 불리하지 않아야 하며, 최종 사용자가 런타임 파일을
39
+ 응용 프로그램과 따로 쓰거나 개발 도구로 쓰지 못하게 해야 합니다.
40
+ 4. 런타임 파일의 저작권 표시를 지우거나 바꿀 수 없습니다.
41
+
42
+ 제5조 (제한)
43
+ 사용자는 다음을 할 수 없습니다.
44
+ 1. 소프트웨어를 대여·임대·재판매·재사용 허락하거나, 사용권을 다른 사람에게 넘기는 것 (저작권자가 서면으로 허락한 경우 제외)
45
+ 2. 소프트웨어와 같거나 경쟁하는 그리드·스프레드시트 컴포넌트, 개발 도구, 라이브러리를 만들거나 배포하는 데 쓰는 것
46
+ 3. 법이 명시적으로 허용하는 범위를 넘어 역설계·디컴파일·디스어셈블하거나 난독화를 푸는 것
47
+ 4. 사용권 확인 기능을 우회하거나 무력화하는 것, 사용권 키를 만들거나 바꾸는 것
48
+
49
+ 제6조 (소유권)
50
+ 소프트웨어와 그 복제본의 저작권 및 모든 지식재산권은 저작권자에게 있습니다. 이 계약은 사용권을 허락할 뿐
51
+ 소유권을 넘기지 않으며, 명시적으로 허락하지 않은 모든 권리는 저작권자에게 있습니다.
52
+
53
+ 제7조 (업데이트·지원)
54
+ 무료 사용권에는 기술 지원 의무가 없습니다. 상용 사용권의 업데이트·기술 지원 범위와 기간은 구매 조건에 따릅니다.
55
+ 업데이트에는 이 계약(또는 그 버전에 함께 공지된 계약)이 적용됩니다.
56
+
57
+ 제8조 (보증의 부인)
58
+ 법이 허용하는 최대 범위에서 소프트웨어는 "있는 그대로" 제공됩니다. 저작권자는 상품성, 특정 목적 적합성,
59
+ 권리 비침해를 포함한 명시적·묵시적 보증을 하지 않으며, 소프트웨어에 오류가 없거나 중단 없이 동작함을 보증하지 않습니다.
60
+
61
+ 제9조 (책임의 제한)
62
+ 법이 허용하는 최대 범위에서 저작권자는 소프트웨어의 사용 또는 사용 불능으로 생긴 간접·부수·특별·결과적 손해
63
+ (이익 손실, 데이터 손실, 업무 중단 포함)에 대해 책임지지 않습니다. 어떤 경우에도 저작권자의 총 책임은
64
+ 사용자가 이 소프트웨어 사용권에 실제로 낸 금액(무료 사용권은 0원)을 넘지 않습니다.
65
+
66
+ 제10조 (해지)
67
+ 사용자가 이 계약을 위반하면 사용권은 자동으로 끝납니다. 해지되면 사용자는 소프트웨어와 모든 복제본을 지워야 합니다.
68
+ 해지 전에 적법하게 배포한 응용 프로그램의 최종 사용자 권리는 유지됩니다.
69
+
70
+ 제11조 (준거법·관할)
71
+ 이 계약은 대한민국 법에 따르며, 이 계약과 관련한 분쟁은 저작권자 소재지를 관할하는 법원을 제1심 관할 법원으로 합니다.
72
+
73
+ 제12조 (기타)
74
+ 이 계약의 일부가 무효가 되더라도 나머지는 유효합니다. 이 계약은 소프트웨어에 관한 당사자 사이의 완전한 합의이며,
75
+ 별도 서면 계약이 있으면 그 계약이 우선합니다.
76
+
77
+ 제13조 (문의)
78
+ 이 계약과 소프트웨어, 사용권 키에 관한 문의: novnox.dev@gmail.com · https://novnox.dev
79
+
80
+ ------------------------------------------------------------------------------------------------------------
81
+
82
+ NoxGrid End User License Agreement (EULA)
83
+ Copyright © 2026 Nox. All rights reserved.
84
+
85
+ This Agreement is a legal agreement between Nox ("Licensor") and the individual or entity ("Licensee") that installs,
86
+ copies or uses the NoxGrid software. By installing, copying or using the Software, Licensee agrees to this Agreement.
87
+ In case of any inconsistency, the Korean text prevails.
88
+
89
+ 1. Definitions. "Software" means the NoxGrid desktop (Nox.Grid, Nox.Grid.WinForms, Nox.Grid.Design), server
90
+ (Nox.Grid.Server) and web (@novnox/grid, @novnox/grid-react, @novnox/grid-vue) libraries with accompanying
91
+ documentation, samples, tools and updates. "Runtime Files" means Nox.Grid.dll, Nox.Grid.WinForms.dll,
92
+ Nox.Grid.Server.dll and the build files of the web libraries. "Design-Time Files" means Nox.Grid.Design.dll,
93
+ documentation and samples. "Developer" means one person who uses the Software to develop applications.
94
+ "Application" means a program or web service created by Licensee that adds substantial primary functionality.
95
+ "License Key" means a digitally signed string issued by Licensor identifying the licensee and license type.
96
+ "Enterprise" means an organization (with its affiliates) that has (a) more than 250 PCs or users or (b) more than
97
+ US$1 million (or equivalent) in annual revenue.
98
+ 2. License Types. (a) Version 1.x Free License: versions 1.x of the Software may be used by anyone, including
99
+ Enterprises, free of charge, without time limit and for commercial purposes, to develop Applications. This right
100
+ remains for versions 1.x even if later versions are licensed differently. (b) From version 2.0, Licensor may offer
101
+ a free Community License (individual developers, open-source projects, education and research, non-profits, and
102
+ non-Enterprise organizations with up to 5 developers) and a paid Commercial License (Enterprises and any use beyond
103
+ the Community License); details will be published with those versions. (c) Licenses are non-exclusive and
104
+ non-transferable. A Developer may install the Software on multiple computers he or she uses.
105
+ 3. License Keys. Licensor issues License Keys; keys for version 1.x and the Community License are free. Without a
106
+ valid key the Software may show a development-time notice (designer/debugger) or a small notice text; it does not
107
+ stop deployed Applications. A License Key may be embedded only in the licensee's own Applications and must not be
108
+ published or shared. Licensor may collect minimal information (such as name and e-mail address) to issue keys and
109
+ uses it only for license management and product notices.
110
+ 4. Runtime Distribution. A licensed Licensee may distribute the Runtime Files royalty-free only as part of its
111
+ Applications. Design-Time Files may not be distributed; documentation and samples may not be distributed as part of
112
+ an Application. End users must not be permitted to use the Runtime Files separately or as a development tool.
113
+ Copyright notices must not be removed.
114
+ 5. Restrictions. Licensee may not (a) rent, lease, resell, sublicense or transfer the Software or the license without
115
+ written permission; (b) use the Software to create or distribute a competing grid/spreadsheet component, development
116
+ tool or library; (c) reverse engineer, decompile, disassemble or de-obfuscate the Software except as expressly
117
+ permitted by law; (d) circumvent license verification or create or alter License Keys.
118
+ 6. Ownership. The Software is licensed, not sold. All intellectual property rights remain with Licensor.
119
+ 7. Updates and Support. Free licenses include no support obligation. For Commercial Licenses, scope and period of
120
+ updates and support are as stated in the purchase terms. Updates are governed by this Agreement (or the agreement
121
+ published with that version).
122
+ 8. Disclaimer of Warranty. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF
123
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
124
+ 9. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY LAW, LICENSOR SHALL NOT BE LIABLE FOR ANY INDIRECT,
125
+ INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING LOSS OF PROFITS, DATA OR BUSINESS INTERRUPTION). LICENSOR'S
126
+ TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT ACTUALLY PAID BY LICENSEE FOR THE SOFTWARE LICENSE (ZERO FOR FREE LICENSES).
127
+ 10. Termination. This license terminates automatically if Licensee breaches this Agreement; Licensee must then destroy
128
+ all copies. Rights of end users of Applications lawfully distributed before termination survive.
129
+ 11. Governing Law. This Agreement is governed by the laws of the Republic of Korea. The court having jurisdiction over
130
+ Licensor's location shall have jurisdiction of first instance.
131
+ 12. Miscellaneous. If any provision is held invalid, the remainder remains in effect. A separate signed written agreement,
132
+ if any, prevails over this Agreement.
133
+ 13. Contact. novnox.dev@gmail.com · https://novnox.dev
package/README.md CHANGED
@@ -1,3 +1,454 @@
1
- # Temporary Holding Version
1
+ # @novnox/grid - NoxGrid Web Edition
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A custom-drawn (Canvas) data grid. It draws only the visible cells, so it scrolls smoothly even with 100,000+ rows.
4
+ Use it with any web UI technology: React, Vue, Angular, Blazor, or plain HTML.
5
+ Names and concepts match the desktop NoxGrid (WinForms).
6
+
7
+ **Where it fits.** Spreadsheet-style business screens: order and estimate entry, price lists, settlements, monthly reports and read-only lists. Excel copy and paste, keyboard editing, undo, totals, merged cells, multi-row headers, subtotals and formulas work by configuration.
8
+
9
+ **Where it does not fit yet.** List screens whose cells hold React components (badges, several action buttons, menus): cells are drawn on a canvas, so components cannot be placed inside them. A cell drawing function and several buttons per cell are planned for 1.1. Because cells are drawn, the browser's own Ctrl+F does not search the grid (use the grid's Ctrl+F), text is copied by selecting cells (Ctrl+C) rather than by dragging over text, and screen readers are not supported yet.
10
+
11
+ Features that differ between the desktop and web editions: [Desktop, web and server](https://novnox.dev/docs/articles/editions.html).
12
+
13
+ Copyright © 2026 Nox. All rights reserved. Terms of use are in `LICENSE.txt` (Korean and English; free license keys at https://novnox.dev/license/).
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @novnox/grid
19
+ ```
20
+
21
+ Or include the single build file with a `<script>` tag (`window.NoxGrid`).
22
+
23
+ ```html
24
+ <script src="nox-grid.iife.js"></script>
25
+ ```
26
+
27
+ | File (`dist/`) | Use | Size |
28
+ |---|---|---|
29
+ | `nox-grid.iife.js` | for a `<script>` tag (`window.NoxGrid`), minified | about 195KB (about 61KB gzip) |
30
+ | `nox-grid.min.js` | ES module for bundlers, minified | about 195KB |
31
+ | `nox-grid.js` | ES module for bundlers, not minified (debugging) | about 330KB |
32
+
33
+ Bundlers pick the right file when installed from npm. To inline the grid into an HTML string (for example WebView2 `NavigateToString`), put the contents of `nox-grid.iife.js` in a `<script>` element.
34
+
35
+ ## Getting Started
36
+
37
+ ```ts
38
+ import { NoxGrid } from '@novnox/grid';
39
+
40
+ const grid = new NoxGrid(document.getElementById('grid')!, {
41
+ colorScheme: 'modern',
42
+ allowFilter: true,
43
+ frozenColumns: 1,
44
+ rowCount: 100,
45
+ columns: [
46
+ { name: 'no', header: 'No.', kind: 'label', width: 80 },
47
+ { name: 'name', header: 'Name', required: true, maxLength: 10 },
48
+ { name: 'dept', header: 'Department', kind: 'combo', items: ['Internal Medicine', 'Surgery'], mergeMode: 'always' },
49
+ { name: 'age', header: 'Age', kind: 'number', minimum: 0, maximum: 130 },
50
+ { name: 'fee', header: 'Amount', kind: 'number', format: '"$"#,##0' },
51
+ { name: 'done', header: 'Done', kind: 'check' },
52
+ ],
53
+ });
54
+
55
+ grid.setValue(0, 'name', 'John Doe');
56
+ grid.cells(0, 'fee').backColor = '#fff2cc';
57
+ grid.sort([{ col: 'dept' }, { col: 'age', order: 'desc' }]);
58
+ grid.on('cellValueChanged', (e) => console.log(e.row, e.col, e.newValue));
59
+ ```
60
+
61
+ The host element must have a height (e.g. `height: 500px`).
62
+
63
+ ## Binding an Array of Objects
64
+
65
+ ```ts
66
+ const rows = [{ name: 'John Doe', age: 30 }, { name: 'Jane Smith', age: 25 }];
67
+ const grid = new NoxGrid(el, { columns: [{ field: 'name', header: 'Name' }, { field: 'age', header: 'Age', kind: 'number' }], data: rows });
68
+ // Editing updates the row objects.
69
+ // Sorting changes only the screen order; the rows array keeps its order. grid.data is the array you passed in.
70
+ // Rows inserted or removed in the grid are inserted into or removed from rows (while sorted, before the object that follows on screen).
71
+ grid.rowData(0); // the object on the first screen row
72
+ grid.dataIndex(0); // its index in rows (differs from the screen row after sorting)
73
+ ```
74
+
75
+ ## Common Settings for Business Screens
76
+
77
+ ```ts
78
+ const grid = new NoxGrid(el, {
79
+ columns, data: rows,
80
+ autoHeight: true, // the height follows the rows (the page scrolls); the element needs no height
81
+ maxHeight: 480, // with autoHeight: grows up to 480px, then scrolls inside
82
+ readOnly: true, // turns off typing, paste, Delete clearing and replace at once (selecting, copying, find still work)
83
+ sortCycle: 'ascDescNone', // header clicks: ascending → descending → original order
84
+ selectionMode: 'fullRow', // select whole rows (copying copies rows). Default 'cell'
85
+ initialSelection: 'none', // nothing shown as selected until the user clicks or uses the keyboard (lists)
86
+ hoverRow: true, // highlight the row under the mouse (color: setColors({ hoverBack }))
87
+ // Selected rows keep text colors from columns and conditional formats (like the desktop); selectionOverridesCellColors: true uses the selection color
88
+ // A verticalGridLines value you set is kept when colorScheme changes; with initialSelection: 'none', sorting by a header does not show a selection
89
+ captureFind: 'page', // Ctrl+F opens the grid's find even when focus is elsewhere on the page (if it is the only grid on screen). Off by default: it takes Ctrl+F from the browser
90
+ });
91
+
92
+ // Column options
93
+ // fillWeight: 1 takes this share of the spare width so the columns fill the grid (width is the minimum, like the desktop FillWeight)
94
+ // emptyText: '-' text shown in empty cells (display only; values, sorting and CSV unchanged)
95
+ // clickable: true cells that open something: pointer cursor, text underlined under the mouse (handle cellClick)
96
+ // sortValue: (row) => row?.daysLeft sort by a value of the row object instead of the shown text
97
+
98
+ grid.setData(rows2, { keepSort: true }); // keep the current sort when reloading or searching (React and Vue keep it by default)
99
+
100
+ // A search box above a list: keep rows where any visible column (or the given columns) contains the text.
101
+ // Works with the column filters; the footer row counts the remaining rows.
102
+ grid.setQuickFilter(searchText); // '' clears it
103
+ grid.setQuickFilter(searchText, { columns: ['name', 'vendor'] });
104
+ label.textContent = `${grid.visibleRowCount} results`; // rows left (subtotal rows not counted); row indices: grid.visibleRows()
105
+
106
+ // Tooltips: grid option showCellToolTips: true shows text that is cut off; column option toolTip: (row) => row?.url adds your own
107
+
108
+ // Where a cell is (automated tests, pop-ups): relative to the grid element, null when out of view (scrollToCell first)
109
+ const rect = grid.getCellRect(3, 'price'); // { x, y, width, height }
110
+ const head = grid.getHeaderRect('price');
111
+
112
+ // Footer text from a function (recalculated after filtering)
113
+ // column options footer: 'text', footerText: (ctx) => `${ctx.visibleRowCount} items`
114
+
115
+ // Every value change, including undo and redo. `source` is the reason; `nested` marks changes made inside a handler.
116
+ grid.on('cellValueChanged', (e) => {
117
+ if (e.nested) return; // skip the computed values set below (undo and redo keep nested, once per cell)
118
+ // e.source: 'edit' 'toggle' 'paste' 'delete' 'replace' 'undo' 'redo' 'code'
119
+ recalc(e.row); // computed columns such as amount = quantity × price; undone together with the user's change
120
+ });
121
+
122
+ // Your own sort order (return the ascending result; the grid reverses it for descending, 0 keeps the current order)
123
+ const order = ['Registered', 'Pending', 'Approved'];
124
+ columns.push({ field: 'state', header: 'State', sortCompare: (a, b) => order.indexOf(String(a)) - order.indexOf(String(b)) });
125
+ grid.clearSort(); // removes the sort and restores the rows array's order (clearSort(false) keeps the order)
126
+
127
+ // CSV straight to a file in the browser (UTF-8 with BOM, so Excel shows non-ASCII text correctly)
128
+ grid.downloadCsv('prices.csv', { raw: true, columns: ['code', 'name', 'price'] });
129
+ const text = grid.toCsv({ raw: true, headers: false }); // or as text
130
+
131
+ // Re-apply columns (permissions, screen modes): matched by name or field, widths kept
132
+ grid.setColumns(columns.map((c) => (c.name === 'price' ? { ...c, visible: canSeePrice } : c)));
133
+ ```
134
+
135
+ Text sorts in natural Korean order by default (2 before 10, `AP-2608-0002` before `AP-2608-0010`), and empty cells always go last.
136
+
137
+ **Dark mode and fonts**: the grid does not follow the page's dark mode by itself. When the page switches, set `grid.colorScheme = 'dark'` (or your light scheme) and override single colors with `grid.setColors({ cellBack: '#111827', headerBack: '#1f2937', fore: '#e5e7eb', accent: '#38bdf8' })`. The font does not follow the page either; pass `fontFamily: 'Inter, system-ui, sans-serif'`.
138
+
139
+ ```ts
140
+ const sync = () => (grid.colorScheme = document.documentElement.classList.contains('dark') ? 'dark' : 'modern');
141
+ new MutationObserver(sync).observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
142
+ sync();
143
+ ```
144
+
145
+ **Colors**: `setColors` takes 14 colors.
146
+
147
+ | Name | Where | Name | Where |
148
+ |---|---|---|---|
149
+ | `back` | grid background (outside cells) | `cellBack` | cell background |
150
+ | `altBack` | alternating rows | `fore` | text |
151
+ | `headerBack` | header background | `headerFore` | header text |
152
+ | `gridLine` | cell lines | `accent` | current cell border, highlights |
153
+ | `selBack` | selection background | `selFore` | selection text (when the cell has no text color) |
154
+ | `readOnlyBack` | read-only cell background | `readOnlyFore` | read-only cell text |
155
+ | `hoverBack` | row under the mouse (`hoverRow`) | `selBorder` | selection outline (default: `accent`) |
156
+
157
+ - Read the current colors with `grid.getColors()` (a copy).
158
+ - Changing `colorScheme` resets the colors to that scheme, so call `setColors` again afterwards. If the page keeps colors in CSS variables, read them with `getComputedStyle(document.documentElement).getPropertyValue('--bg-body').trim()` and pass them on.
159
+ - Colors set on cells (`cells(r, c).backColor`, `foreColor`) are stored with the cell and survive `colorScheme` and `setColors`. Priority (low to high): grid colors, column, row, cell, conditional formats.
160
+ - Selected cells use `selBack` as background (cell backgrounds are hidden while selected). Text keeps the color set by the cell, column or a conditional format, otherwise `selFore`. Set `selectionOverridesCellColors: true` to always use `selFore`. Cell text colors can be hard to read on a dark `selBack`; a light selection color is recommended.
161
+
162
+ **Copy and paste rules**: the grid uses the browser's `copy`, `cut` and `paste` events (not `navigator.clipboard`, so it also works on `about:blank` and `http` pages). Text is tab and newline separated; line breaks inside quoted cells are kept.
163
+
164
+ - Copy: every selected cell, read-only cells included; hidden columns and filtered-out rows are left out.
165
+ - Paste: starts at the current cell. Hidden columns and rows are skipped and the paste continues in the next visible column or row. **Read-only cells keep their position and their value is dropped** (like locked cells in Excel). Pasting a single value into a multi-cell selection fills the selection.
166
+ - Lines beyond the last row are dropped and reported by the `pasted` event's `droppedRows` (columns past the right edge: `droppedColumns`). With `pasteAddsRows: true` the missing rows are added at the end; they are part of the same undo step, and bound grids get the object made by `newRowData`.
167
+ - Each changed cell raises `cellValueChanged` with `source: 'paste'`.
168
+
169
+ ```ts
170
+ new NoxGrid(el, { columns, data, pasteAddsRows: true, newRowData: () => ({ kind: 'equipment', qty: 1 }) });
171
+ grid.on('pasted', (e) => { if (e.droppedRows) alert(`${e.droppedRows} lines were not pasted`); });
172
+ ```
173
+
174
+ **Arrow keys while editing (as in Excel)**: when editing started by typing, an arrow key moves to the next cell right away. When editing started with F2 or a double click, arrow keys move the caret and stay in the cell.
175
+
176
+ **Changing the bound array yourself**: the grid does not notice `push` or `splice` on the array you passed. Use the grid's `insertRows` and `removeRows` (they update the array too), or call `setData(array, { keepSort: true })` again after changing it. For rows that keep arriving (live lists), filling an unbound grid with `rowCount` and `setValues` is simpler.
177
+
178
+ **Only check boxes clickable**: `readOnly: true` blocks check boxes too. To let users change only check columns, use `allowEdit: false` (typing, paste, Delete and replace are off; check boxes still toggle by click and Space; `cellClick` and `cellDoubleClick` still fire).
179
+
180
+ **Undoable fields that are not shown**: add a hidden column such as `{ field: 'item_id', visible: false }` and change it with `setValue`. The change is recorded for undo, and hidden columns are left out of copy, paste, CSV (unless you list them) and quick search.
181
+
182
+ **Values used only on screen (selection check boxes and the like)**: even in a bound grid, a column with `name` but no `field` (`{ name: 'pick', kind: 'check' }`) keeps its values in the grid, not in the bound objects. Your data objects stay free of screen state, and the values follow their rows when sorting. Binding new data with `setData` clears them.
183
+
184
+ **Changing bound object values yourself**: `invalidate()` only repaints, so the footer row, conditional formats and filters keep the old values. After changing many rows directly, call `setData(array, { keepSort: true })` again with the same array (scroll position and selection are kept; about 12ms for 3,000 rows × 109 columns). To make the change undoable, use `setValue` inside `batch(() => …)`.
185
+
186
+ **Visible rows**: `isRowVisible(row)` is false for rows hidden with `setRowVisible`, rows filtered out by a header filter or the quick filter, and rows inside a collapsed group. The rows left after filtering are `visibleRows()`, their number `visibleRowCount` (subtotal rows not included).
187
+
188
+ **Read-only lists and screens that stay open all day**: `allowUndo: false` keeps no undo history (after creation: `grid.allowUndo = false`).
189
+
190
+ **Cell position and scrolling**: you can call `getCellRect` right after `scrollToCell(row, col)` (no need to wait for the next frame).
191
+
192
+ **More for list screens**
193
+
194
+ ```ts
195
+ new NoxGrid(el, {
196
+ columns: [
197
+ { field: 'sent', header: 'Sent', clickable: (row) => row?.sent === 'Y' }, // pointer and underline per row
198
+ { field: 'flu', header: 'Influenza A', headerToolTip: 'FLU-A' }, // header tooltip (a code, for example)
199
+ { name: 'pick', header: '', kind: 'check', headerCheckBox: true }, // selection column kept in the grid, with a header check box
200
+ ],
201
+ data,
202
+ rowKey: 'id', // row key (desktop RowKeyMember)
203
+ emptyMessage: 'No results', // text in the middle when no rows are shown
204
+ selectionKeepsBackColors: true, // selected rows keep cell, row and conditional backgrounds (status colors); the selection is outlined
205
+ });
206
+ grid.on('headerCheckChanged', (e) => console.log(e.col, e.checked)); // the header check box was clicked
207
+ const r = grid.indexOfKey('A-1024'); // find a row by key (also after sorting or filtering; -1 if none)
208
+ grid.setAllChecked('pick', true); // check every shown row (one undo step; { visibleOnly: false } for all rows)
209
+ grid.hideSelection(); // hide the selection (as at the start; it shows again on click or key)
210
+ grid.on('cellPasting', (e) => { // for each pasted cell (desktop CellPasting)
211
+ if (e.col === codeCol) e.value = String(e.text).trim().toUpperCase();
212
+ if (e.text === '-') e.cancel = true; // skip this cell
213
+ });
214
+ ```
215
+
216
+ - Row keys: the `rowKey` field of bound objects, or the key set with `setRowKey(row, key)` in unbound grids. Keys follow their rows, so `indexOfKey` finds them after inserts, removals and sorting, including hidden and filtered-out rows.
217
+ - With `showCellToolTips: true`, cut-off header text is shown in a tooltip too.
218
+ - `cellPasting` is not raised for formulas copied inside the grid.
219
+ - Clicking the header check box raises `headerCheckChanging` first (set `cancel` to stop), then `cellValueChanged` (`source: 'toggle'`) for each changed cell, then `headerCheckChanged`. Apps that report every check change can set a flag in `headerCheckChanging` and handle the whole change once in `headerCheckChanged`.
220
+ - `emptyMessage` also shows with `autoHeight`: when no rows are shown, two rows of space are kept between the header and the footer row.
221
+ - The header check box (`headerCheckBox`) changes only the shown rows (filtered-out and subtotal rows stay as they are) and shows a mixed state when some rows are checked. Clicking the header checks or unchecks all instead of sorting, in one undo step. The current state: `headerCheckState(col)`.
222
+ - With `selectionKeepsBackColors: true`, cells with their own background keep it and their text color when selected; only cells without one use `selBack`. The selection is outlined (color: `setColors({ selBorder })`).
223
+ - Header tooltips can be a function too: `headerToolTip: (col) => codes[col]`.
224
+
225
+ **Browsers**: the same browser tests pass in Edge/Chrome, Firefox and the Safari engine (WebKit); IME and touch emulation run in Edge. Testing on real iPhone and Android devices is planned for 1.1.
226
+
227
+ **Phones and tablets (touch)**: tap selects a cell, check boxes and buttons respond to taps, a double tap starts editing, and swiping scrolls (without changing the selection). Row height and check box size are sized for a mouse, and things that need a mouse hover (tooltips, the hover row) do not show on touch. Mobile tuning (finger-sized targets, long press, filter panel for small screens, testing on iPhone and Android devices) is planned for 1.1.
228
+
229
+ **Because cells are drawn on a canvas**: the browser's Ctrl+F does not search the grid. With the grid focused, Ctrl+F opens the grid's own find (which also finds rows scrolled out of view); `captureFind: 'page'` opens it from anywhere on the page. Text is copied by selecting cells and pressing Ctrl+C, not by dragging over text. Screen readers are not supported yet. Cells cannot hold React or Vue components; a cell drawing function and several buttons per cell are planned for 1.1.
230
+
231
+ ## Features
232
+
233
+ | Area | Details |
234
+ |---|---|
235
+ | Rendering | Custom-drawn Canvas, virtual scrolling (1,000,000 rows), frozen rows and columns, sharp on high-DPI displays (2x, etc.) |
236
+ | Column kinds | text, number, date, check, combo, button, label, image, progress |
237
+ | Editing | Type to edit (including IME composition), F2 or double-click, Enter/Tab to move, Esc to cancel, Alt+Enter for line breaks, combo and date pickers |
238
+ | Selection | Mouse drag and Shift to extend, row and column headers, select all, keyboard (arrows, Ctrl+arrows, Home/End, PageUp/Down) |
239
+ | Clipboard | Ctrl+C/X/V (tab-separated, round-trips with Excel), paste a single value -> fills the range |
240
+ | Undo | Ctrl+Z / Ctrl+Y, group changes with `batch()` |
241
+ | Sort and filter | Header click (Shift+click for multiple columns), filter popup (value list, search), `setFilter` (list or function) |
242
+ | Merge | Range merge `range(...).merge()`, same-value merge `mergeMode: 'always' / 'restricted'` |
243
+ | Formatting | Background and text color, bold, italic, underline, strikethrough, font size, horizontal and vertical alignment, word wrap, borders and outline borders, number and date formats |
244
+ | Color schemes | default, blue, green, gray, orange, classic, dark, modern, teal, purple, rose, midnight, nox (13, same as the desktop) |
245
+ | Conditional formatting | Value comparison, between, text contains/starts with/ends with, blank cells, expressions (function, entire row), color scales |
246
+ | Validation | Required, min/max, text length, regex, allowed list, input hints. Invalid values are marked in red |
247
+ | Multi-row headers · footer row | Column `group` merges headers above columns; `footerVisible` with `footer: 'sum' \| 'avg' \| 'count' \| 'min' \| 'max'` |
248
+ | Formulas | Same engine as the desktop (Excel syntax, 129 functions, cross-sheet references, error values such as #DIV/0!, circular reference #CIRC!). References follow row/column inserts, deletes, sorting, and copying. Custom function registration |
249
+
250
+ ## Multi-row Headers · Footer (Summary) Row
251
+
252
+ ```ts
253
+ const grid = new NoxGrid(el, {
254
+ footerVisible: true,
255
+ columns: [
256
+ { name: 'item', header: 'Item', footer: 'text', footerText: 'Total' },
257
+ { name: 'plan', header: 'Plan', kind: 'number', group: 'Quantity', footer: 'sum' },
258
+ { name: 'actual', header: 'Actual', kind: 'number', group: 'Quantity', footer: 'sum' },
259
+ { name: 'rate', header: 'Rate', kind: 'number', format: '0.0%', group: 'Quantity', footer: 'avg' },
260
+ { name: 'm1', header: 'Plan', kind: 'number', group: '2026 H1|January' }, // 3 levels ('|' or an array)
261
+ ],
262
+ });
263
+ // Rate total = actual sum / plan sum (not the average of the row rates)
264
+ grid.on('footerValue', (e) => {
265
+ if (e.col === grid.columns.indexOf('rate')) e.value = (grid.getFooterValue('actual') as number) / (grid.getFooterValue('plan') as number);
266
+ });
267
+ ```
268
+
269
+ - `group`: adjacent columns with the same group share one merged header cell. Columns without a group use the full header height.
270
+ - `footer`: `'sum' | 'avg' | 'count' | 'min' | 'max' | 'text'`, `footerFormat` (default: the column format). Only rows shown by the filter are counted (hidden and subtotal rows are skipped).
271
+ - Printing and `toSheetData()` keep the same layout (merged group cells; a `SUBTOTAL` footer row in Excel).
272
+
273
+ ## Formulas
274
+
275
+ ```ts
276
+ grid.setFormula(5, 'fee', '=SUM(E1:E5)'); // set from code
277
+ grid.allowUserFormulas = true; // let users type or paste =... into cells
278
+ grid.getFormula(5, 'fee'); // "=SUM(E1:E5)"
279
+ grid.getValue(5, 'fee'); // calculated result (FormulaError on error, e.g. #DIV/0!)
280
+ grid.evaluate('=AVERAGE(E1:E5)'); // calculate without putting it in a cell
281
+ NoxFormula.registerFunction('TAX', (args) => (args[0] as number) * 0.1);
282
+ ```
283
+
284
+ The desktop (C#) and web engines are verified against the same test data (`tests/shared/formula-cases.json`, 325 formulas) to produce identical results.
285
+
286
+ ## Workbooks (Sheet Tabs)
287
+
288
+ ```ts
289
+ import { NoxGridBook } from '@novnox/grid';
290
+ const book = new NoxGridBook(el, { sheets: [{ name: 'Intake', columns }, { name: 'Summary', rowCount: 10 }] });
291
+ book.sheet('Summary')!.setFormula(0, 0, '=SUMIF(Intake!C:C,"Internal Medicine",Intake!D:D)');
292
+ book.renameSheet('Intake', 'IntakeList'); // references in other sheets' formulas are updated too
293
+ book.activeSheet = 1;
294
+ book.loadWorkbookData(json); // load all sheets from server data
295
+ book.printAll({ title: 'Report' }); // each sheet starts a new page
296
+ ```
297
+
298
+ Tabs: click to switch, double-click to rename, drag to reorder, [+] to add, Ctrl+Shift+PageUp/PageDown.
299
+
300
+ ## Row Groups · Subtotals · Find · Print
301
+
302
+ ```ts
303
+ grid.addSubtotals({ groupBy: 'dept', columns: ['fee'], function: 'sum', sortFirst: true }); // subtotals + grand total (SUBTOTAL formulas)
304
+ grid.showOutlineLevel(2); // 1 = grand total only, 2 = down to subtotals, ... (same as the 1 2 3 corner buttons)
305
+ grid.groupRows(3, 8); // manual grouping · ungroupRows · collapseGroup · expandGroup
306
+ grid.removeSubtotals();
307
+ grid.findNext('John Doe', { matchCase: false, wholeCell: false });
308
+ grid.replaceAll('Surgery', 'General Surgery'); // skips read-only and formula cells, one undo step
309
+ grid.showFindDialog(true); // Ctrl+F / Ctrl+H / F3
310
+ grid.print({ title: 'Intake List', landscape: true }); // browser print (can save as PDF), headers repeat on every page
311
+ ```
312
+
313
+ ## Performance
314
+
315
+ [docs/WEB_PERFORMANCE.md](../../../docs/WEB_PERFORMANCE.md) - binding 100,000 rows x 20 columns in 23ms, 1.1ms per scroll repaint (median), 0.2ms at 1,000,000 rows, sorting 100,000 rows in 50-150ms, calculating 10,000 formulas in 8ms.
316
+
317
+ ## Server (Excel·CSV) - Nox.Grid.Server
318
+
319
+ In ASP.NET Core, the NuGet package `Nox.Grid.Server` converts Excel and CSV files to and from grid data (JSON).
320
+
321
+ ```ts
322
+ // file -> grid
323
+ const form = new FormData();
324
+ form.append('file', file);
325
+ grid.loadWorkbookData(await (await fetch('/api/import', { method: 'POST', body: form })).json());
326
+
327
+ // grid -> Excel
328
+ const res = await fetch('/api/export', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(grid.toWorkbookData()) });
329
+
330
+ // CSV without a server
331
+ const csv = grid.toCsv();
332
+ ```
333
+
334
+ - `loadSheetData(sheet, { headerRow })`: uses the first row as headers (default) and infers column kinds (number, date, check) from the values. Also loads formulas, formatting, merges, and frozen panes.
335
+ - `toSheetData({ headerRow })` / `toWorkbookData()`: adds a header row and shifts formula references down one row.
336
+ - Sample: [`server/aspnetcore`](https://github.com/novnox-dev/noxgrid-samples/tree/main/server/aspnetcore) (`dotnet run` -> http://localhost:5099)
337
+
338
+ ## React · Vue
339
+
340
+ ```bash
341
+ npm install @novnox/grid @novnox/grid-react # or @novnox/grid-vue
342
+ ```
343
+
344
+ ```tsx
345
+ import { NoxGridReact } from '@novnox/grid-react';
346
+ <NoxGridReact style={{ height: 500 }} columns={columns} data={rows} colorScheme="modern"
347
+ onReady={(grid) => …} on={{ cellValueChanged: (e) => … }} ref={gridRef} />
348
+ ```
349
+
350
+ ```ts
351
+ import { NoxGridVue } from '@novnox/grid-vue';
352
+ // <NoxGridVue :options="{ columns }" :data="rows" color-scheme="teal" :height="500"
353
+ // @ready="g => grid = g" @cell-value-changed="onChanged" />
354
+ ```
355
+
356
+ - The grid is created once from the initial options; afterwards changes to `data`, `columns` and `colorScheme` (React also `readOnly`, `autoHeight`, `maxHeight`) are applied. `columns` are matched by name or field and keep their widths; passing a new array with the same content on every render does nothing. For everything else, use the grid API.
357
+ - With `autoHeight`, the container needs no height (the React component then drops its 400px default).
358
+ - Verified with React StrictMode (double mount) and cleanup on unmount. Samples: [`react`](https://github.com/novnox-dev/noxgrid-samples/tree/main/react), [`vue`](https://github.com/novnox-dev/noxgrid-samples/tree/main/vue).
359
+
360
+ ## Search Engines (SEO)
361
+
362
+ The grid draws its cells on a canvas. **Search engines cannot read text drawn on a canvas, so the grid's contents are not indexed** (Google runs JavaScript, but it reads HTML text).
363
+
364
+ Decide per page:
365
+
366
+ | Page | What people search for | What to do |
367
+ |---|---|---|
368
+ | Content in the table **is** what people search for (calorie lists, glossaries, product lists) | the text in the table | Put the content in **HTML as well** (below) |
369
+ | Calculators, entry screens, admin screens (loan schedules, estimates) | the page's own text | The grid alone is fine; the table is the user's result, not search content |
370
+ | Screens behind a login | (not indexed) | The grid alone is fine |
371
+
372
+ **Pages whose content should be found (works today)**
373
+
374
+ 1. Render the content as an HTML table on the server or at build time. Pages with their own address per item (for example `/food/banana`) do best in search.
375
+ 2. Build the grid from the same data for searching, sorting and filtering.
376
+ 3. **Do not remove** the HTML table; hide it visually only. Hidden as below, **with the table wrapped in a `<div>` and the `<div>` hidden** (not `display: none`), search engines and screen readers still read it. It holds the same content as the grid, so it does not show search engines anything different.
377
+
378
+ ```html
379
+ <div class="sr-only"><table id="foods">…table rendered by the server…</table></div>
380
+ <div id="grid"></div>
381
+ <style>.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}</style>
382
+ ```
383
+
384
+ ```ts
385
+ new NoxGrid(document.getElementById('grid')!, { columns, data, autoHeight: true }); // same data as the table
386
+ ```
387
+
388
+ Do not put `sr-only` on the `<table>` itself: tables ignore the height, so the hidden table still takes its full height and leaves empty scrolling at the bottom of the page (a 400-row table made a 600px page 10,074px tall). Put it on the wrapping `<div>`.
389
+
390
+ To keep the table visible when JavaScript does not run, add `sr-only` to the wrapping `<div>` only after the grid is created.
391
+
392
+ 1.1 plans to make this shorter: `NoxGrid.fromTable(table)` turns an HTML table on the page into a grid and keeps the table, and `toHtml()` writes the grid's data as the same kind of HTML table. A table you render now can be passed to `fromTable` as it is.
393
+
394
+ ## License Key
395
+
396
+ ```ts
397
+ import { setLicenseKey } from '@novnox/grid';
398
+ setLicenseKey('NOX1....'); // once, before creating grids (free keys: https://novnox.dev/license/)
399
+ ```
400
+
401
+ - Without a valid key **everything still works**; only a small notice appears at the bottom right of the grid.
402
+ - **No notice on development addresses** even without a key: `localhost`, `127.x.x.x`, `::1`, host names ending in `.local`, `.localhost` or `.test`, and pages without a host name (`file://`, `about:blank`).
403
+ - A key issued for domains (`example.com, *.example.com`) is valid on those domains and their subdomains; a key without domains is valid anywhere. The key is tied to the page address, not to PCs, so any number of PCs can open the screen.
404
+ - Verifying a key needs the browser's Web Crypto, which is only available on `https` (or `localhost`). On a production `http` address the notice stays even with a key.
405
+
406
+ **Inside WebView2 (WinForms, WPF)**
407
+
408
+ | How the page is opened | Address the grid sees | Notice |
409
+ |---|---|---|
410
+ | `NavigateToString(html)` | `about:blank` (no host) | none, no key needed |
411
+ | App folder file `file:///...` | no host | none, no key needed |
412
+ | `SetVirtualHostNameToFolderMapping("app.local", folder, ...)`, then `https://app.local/...` (recommended) | `app.local` | none, no key needed |
413
+ | Company web server `https://erp.example.com/...` | `erp.example.com` | none with a key for that domain (or a key without domains) |
414
+
415
+ `about:blank` and `http` pages are not secure contexts, so Web Crypto is unavailable and calling `setLicenseKey` there logs "보안 연결(https)에서만 사용권 키를 확인할 수 있습니다" (keys can only be verified over https). Such pages count as development addresses and show no notice, so no key is needed. Copy and paste, IME input and printing do not need a secure context.
416
+
417
+ ## UI Language
418
+
419
+ Text shown by the grid (filter popup, find dialog, validation hints, subtotal labels, formula errors, AM/PM) is available in English (default) and Korean.
420
+
421
+ ```ts
422
+ new NoxGrid(el, { locale: 'ko', columns }); // or
423
+ import { setLocale } from '@novnox/grid';
424
+ setLocale('ko'); // all grids
425
+ ```
426
+
427
+ ## Number and Date Formats
428
+
429
+ | Format | Example |
430
+ |---|---|
431
+ | `#,##0` / `#,##0.00` / `0.0%` | 1,235 / 1,234.50 / 25.6% |
432
+ | `"₩"#,##0` / `#,##0" KRW"` / `#,##0,` | ₩15,000 / 1,234 KRW / 1,500 (thousands) |
433
+ | `#,##0;(#,##0);"-"` | positive;negative;zero |
434
+ | `N2` / `F1` / `P0` | .NET style |
435
+ | `yyyy-MM-dd HH:mm` / `"FY"yyyy` / `h:mm tt` | dates |
436
+
437
+ ## Desktop (WinForms) Name Mapping
438
+
439
+ | Desktop (C#·VB) | Web (TypeScript) |
440
+ |---|---|
441
+ | `grid.SetValue(r, c, v)` / `GetValue` / `GetText` / `SetText` | `grid.setValue(r, c, v)` / `getValue` / `getText` / `setText` |
442
+ | `grid.Cells(r, c).BackColor` | `grid.cells(r, c).backColor` |
443
+ | `grid.Cells(r1, c1, r2, c2).Merge()` | `grid.range(r1, c1, r2, c2).merge()` |
444
+ | `grid.Sort(cols, orders)` | `grid.sort([{ col, order }])` |
445
+ | `grid.ConditionalFormats.Add(...)` | `grid.conditionalFormats.add({...})` |
446
+ | `grid.ColorScheme = NoxGridColorScheme.Modern` | `grid.colorScheme = 'modern'` |
447
+ | `grid.Undo()` / `AllowUndo` / `BeginUpdate()` | `grid.undo()` / `allowUndo` / `beginUpdate()` |
448
+ | `CellValueChanged` event | `grid.on('cellValueChanged', fn)` |
449
+ | `grid.SetFormula(r, c, "=SUM(A1:A3)")` / `AllowUserFormulas` | `grid.setFormula(r, c, '=SUM(A1:A3)')` / `allowUserFormulas` |
450
+ | `NoxFormula.RegisterFunction(name, fn)` | `NoxFormula.registerFunction(name, fn)` |
451
+
452
+ ## Samples
453
+
454
+ Complete sample projects (plain HTML, React, Vue, ASP.NET Core, WinForms): https://github.com/novnox-dev/noxgrid-samples